@tscircuit/runframe 0.0.557 → 0.0.558
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.
|
@@ -1105,7 +1105,7 @@ var RenderLogViewer = ({
|
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
1107
1107
|
// package.json
|
|
1108
|
-
var version = "0.0.
|
|
1108
|
+
var version = "0.0.557";
|
|
1109
1109
|
|
|
1110
1110
|
// lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
|
|
1111
1111
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
package/dist/preview.js
CHANGED
package/dist/runner.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
useOrderDialog,
|
|
28
28
|
useOrderDialogCli,
|
|
29
29
|
useRunFrameStore
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AEWBBJRD.js";
|
|
31
31
|
|
|
32
32
|
// lib/components/RunFrame/RunFrame.tsx
|
|
33
33
|
import { createCircuitWebWorker } from "@tscircuit/eval/worker";
|
|
@@ -372,9 +372,15 @@ var RunFrame = (props) => {
|
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
374
|
const handleReportAutoroutingLog = async (name, data) => {
|
|
375
|
+
let urlPath = "";
|
|
376
|
+
try {
|
|
377
|
+
urlPath = window.location.pathname || "";
|
|
378
|
+
} catch {
|
|
379
|
+
}
|
|
380
|
+
const title = urlPath ? `${urlPath} - ${name}` : name;
|
|
375
381
|
await registryKy.post("autorouting/bug_reports/create", {
|
|
376
382
|
json: {
|
|
377
|
-
title
|
|
383
|
+
title,
|
|
378
384
|
simple_route_json: data.simpleRouteJson
|
|
379
385
|
}
|
|
380
386
|
}).json().then(({ autorouting_bug_report }) => {
|
|
@@ -13462,4 +13462,4 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return qie}KFt();function $Te(r,e,t,n=
|
|
|
13462
13462
|
&:hover {
|
|
13463
13463
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13464
13464
|
}
|
|
13465
|
-
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),v6t=({children:r,elements:e})=>{const[t,n]=y1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=vt.useState(!1),[o,s]=vt.useState(!1),[l,c]=vt.useState(!1),[A,u]=y1(j=>[j.selected_layer,j.selectLayer]),[d,p,v,E,C,_]=y1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),S=y1(j=>j.setEditMode),w=y1(j=>j.setIsShowingRatsNest),k=y1(j=>j.setIsShowingMultipleTracesLength),V=y1(j=>j.setIsShowingAutorouting),z=y1(j=>j.setIsShowingDrcErrors);ZQ("1",()=>u("top")),ZQ("2",()=>u("bottom")),ZQ("3",()=>u("inner1")),ZQ("4",()=>u("inner2")),ZQ("5",()=>u("inner3")),ZQ("6",()=>u("inner4")),ZQ("7",()=>u("inner5")),ZQ("8",()=>u("inner6"));const K=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",m6t.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:T_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(s3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:o3[A]},children:A})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Rae.map(j=>j.replace(/-/g,"")).map(j=>dt.jsx(y6t,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),dt.jsxs(s3,{style:K>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[K," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,$)=>dt.jsxs(vt.Fragment,{children:[dt.jsx("div",{children:j.error_type}),dt.jsx("div",{children:j.message})]},$))})]}),dt.jsx(s3,{style:{},onClick:()=>{S(p?"off":"draw_trace")},children:dt.jsxs("div",{children:[p?"✖ ":"","Edit Traces"]})}),dt.jsx(s3,{style:{},onClick:()=>{S(d?"off":"move_footprint")},children:dt.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),dt.jsx(s3,{style:{},onClick:()=>{w(!v)},children:dt.jsxs("div",{children:[v?"✖ ":"","Rats Nest"]})}),dt.jsx(s3,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(Pae,{label:"Show All Trace Lengths",checked:E,onClick:()=>{k(!E)}}),dt.jsx(Pae,{label:"Show Autorouting Animation",checked:C,onClick:()=>{V(!C)}}),dt.jsx(Pae,{label:"Show DRC Errors",checked:_,onClick:()=>{z(!_)}})]})]})})]})]})},I6t=r=>{const{transform:e,elements:t}=r,[n,i]=vt.useMemo(()=>{const c=r.elements.flatMap(u=>DLt(u,r.elements)),A=l2(r.elements);return[c,A]},[r.elements]),[a,o]=vt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=vt.useMemo(()=>wLt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=vt.useCallback(c=>{var d,p;const A=[];for(const v of c)if(v._element){const E=i.getNetConnectedToId("pcb_port_id"in v._element?(d=v._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in v._element?(p=v._element)==null?void 0:p.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(v=>v._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return dt.jsx(g6t,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(XLt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(n6t,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(ZLt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx(v6t,{elements:t,children:dt.jsx(a6t,{transform:e,elements:t,children:dt.jsx(p6t,{transform:e,soup:t,children:dt.jsx(jLt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(WLt,{transform:e,elements:t,children:dt.jsx(JLt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},C6t=Fd(jh(400,300),U1(40,-40)),E6t=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=vt.useState(!l),[u,d]=kae(),[p,v]=vt.useState(C6t),{ref:E,setTransform:C,cancelDrag:_}=QLt({transform:p,onSetTransform:v,enabled:c});let[S,w]=vt.useState([]);S=a??S;const k=vt.useRef(!1),V=vt.useRef(null),z=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,K=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:Ce,height:Be}=$.some(Ie=>Ie.type.startsWith("pcb_"))?yLt($.filter(Ie=>Ie.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/Ce,(oe.height??0)/Be,100)*.75,_e=Fd(jh((oe.width??0)/2,(oe.height??0)/2),U1(pe,-pe,0,0),jh(-de.x,-de.y));C(_e)};vt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(k.current||(K(),k.current=!0))},[r,d]);const j=vt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[z]),$=vt.useMemo(()=>hot({circuitJson:j,editEvents:S}),[j,S]),J=oe=>{w([...S,oe]),o==null||o([...S,oe])},ce=oe=>{const de=S.map(Ce=>Ce.edit_event_id===oe.edit_event_id?{...Ce,...oe}:Ce);w(de),o==null||o(de)};return dt.jsxs("div",{ref:E,style:{position:"relative"},children:[dt.jsx("div",{ref:u,children:dt.jsxs(ILt,{initialState:n,children:[dt.jsx(I6t,{transform:p,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:ce,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:$,debugGraphics:e},d.width),dt.jsx(ELt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{A(!0),K()},onTouchStart:oe=>{const de=oe.touches[0];V.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],Ce=V.current;if(!Ce)return;const Be=Math.abs(de.clientX-Ce.x),pe=Math.abs(de.clientY-Ce.y);Be<10&&pe<10&&(oe.preventDefault(),A(!0),K()),V.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:T_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const _6t=({containerClassName:r,...e})=>{const t=vt.useRef(null),[n,i]=vt.useState(620);return vt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(E6t,{...e,height:n})})},B6t='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-\\[60vw\\]{max-width:60vw!important}.\\!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-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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-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-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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',x6t=()=>{vt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=B6t,document.head.appendChild(e)},[])},hke=r=>`hsl(${hx.indexOf(r)*137.5%360}, 70%, 50%)`,b6t=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:hx.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:hke(t)},children:dt.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,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},S6t=({renderLog:r})=>{const[e,t]=vt.useState("chronological");if(!r)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>hx.indexOf(a[0])-hx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(b6t,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:hx.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:hke(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Q6t="0.0.556",w6t=["assembly","bom","circuit_json","errors","render_log"],M6t=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:p=!0,className:v,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:S,autoroutingLog:w,onReportAutoroutingLog:k,isRunningCode:V,hasCodeChangedSinceLastRun:z,onEditEvent:K,editEvents:j,defaultActiveTab:$,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:ce=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1})=>{var Fe;x6t();const Ce=vt.useMemo(()=>i?i.filter(nt=>nt&&"error_type"in nt||nt.type.includes("error")):null,[i]),[Be,pe]=vt.useState($??"pcb"),[_e,Ie]=vt.useState(de),Re=vt.useCallback(nt=>{pe(nt),u==null||u(nt)},[u]),De=()=>{Ie(!_e)};vt.useEffect(()=>{t&&Re("errors")},[t]),vt.useEffect(()=>{(Be==="code"||Be==="errors")&&i&&!t&&Re($??"pcb")},[i]);const ke=vt.useCallback(nt=>{window.TSCIRCUIT_3D_OBJECT_REF=nt===null?void 0:nt},[]);return dt.jsx("div",{className:Yv("flex flex-col relative rf-overflow-x-hidden",v),children:dt.jsx("div",{className:Yv("rf-md:sticky rf-md:top-2",_e&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(ELe,{value:Be,onValueChange:Re,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Yv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&dt.jsx("div",{className:"rf-flex-grow"}),!C&&V&&dt.jsx(x5e,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&dt.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Fe=d.lastRenderEvent)==null?void 0:Fe.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(x5e,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&dt.jsxs(Vse,{children:[s&&dt.jsx(jw,{value:"code",children:"Code"}),dt.jsxs(jw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Yv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(jw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Yv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(jw,{value:"cad",children:[i&&dt.jsx("span",{className:Yv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Be)&&dt.jsx(jw,{value:Be,children:Yse(Be)}),dt.jsxs(U4e,{children:[dt.jsx(k4e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(UNt,{className:"rf-w-4 rf-h-4"}),(Ce&&Ce.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(lie,{className:"rf-*:text-xs",children:[w6t.map(nt=>dt.jsxs(vG,{onSelect:()=>Re(nt),children:[Be!==nt&&dt.jsx(B5e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Be===nt&&dt.jsx(E5e,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Yse(nt)}),nt==="errors"&&(Ce&&Ce.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ce==null?void 0:Ce.length})]},nt)),dt.jsx(vG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Q6t.split(".").map((nt,rt)=>rt===2?parseInt(nt)+1:nt).join(".")]})})]})]})]}),oe&&dt.jsx(GQ,{onClick:De,variant:"ghost",children:_e?dt.jsx(PNt,{size:16}):dt.jsx(kNt,{size:16})})]}),s&&dt.jsx(Ab,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:l})}),dt.jsx(Ab,{value:"pcb",children:dt.jsx("div",{className:Yv("rf-overflow-hidden",_e?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(_6t,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Yv("rf-h-full rf-w-full",_e?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:nt=>{K&&nt.forEach(rt=>K(rt))}}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"assembly",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:i?dt.jsx(dFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"schematic",children:dt.jsx("div",{className:Yv("rf-overflow-auto rf-bg-white",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(cFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:nt=>{K==null||K(nt)},debugGrid:ce}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"cad",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{FallbackComponent:CNt,children:i?dt.jsx(vNt,{ref:ke,circuitJson:i,autoRotateDisabled:J}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"bom",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(mFt,{circuitJson:i}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"circuit_json",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:i?dt.jsx(gFt,{elements:i}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"errors",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ce&&Ce.length>0?dt.jsx(UUt,{code:r,circuitJsonErrors:Ce,errorMessage:t,errorStack:n,autoroutingLog:w,onReportAutoroutingLog:k}):dt.jsx(Mw,{onRunClicked:e})})}),A&&dt.jsx(Ab,{value:"render_log",children:dt.jsx(S6t,{renderLog:d})})]})})})};use.createRoot(document.getElementById("root")).render(dt.jsx(M6t,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const D6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
|
13465
|
+
`,onClick:n=>{n.stopPropagation(),t()},children:[dt.jsx("input",{type:"checkbox",checked:e}),dt.jsx("span",{style:{color:"#eee"},children:r})]}),v6t=({children:r,elements:e})=>{const[t,n]=y1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=vt.useState(!1),[o,s]=vt.useState(!1),[l,c]=vt.useState(!1),[A,u]=y1(j=>[j.selected_layer,j.selectLayer]),[d,p,v,E,C,_]=y1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),S=y1(j=>j.setEditMode),w=y1(j=>j.setIsShowingRatsNest),k=y1(j=>j.setIsShowingMultipleTracesLength),V=y1(j=>j.setIsShowingAutorouting),z=y1(j=>j.setIsShowingDrcErrors);ZQ("1",()=>u("top")),ZQ("2",()=>u("bottom")),ZQ("3",()=>u("inner1")),ZQ("4",()=>u("inner2")),ZQ("5",()=>u("inner3")),ZQ("6",()=>u("inner4")),ZQ("7",()=>u("inner5")),ZQ("8",()=>u("inner6"));const K=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return dt.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,dt.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",m6t.version]}),dt.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:T_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[dt.jsxs(s3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[dt.jsxs("div",{children:["layer:"," ",dt.jsx("span",{style:{marginLeft:2,fontWeight:500,color:o3[A]},children:A})]}),o&&dt.jsx("div",{style:{marginTop:4,minWidth:120},children:Rae.map(j=>j.replace(/-/g,"")).map(j=>dt.jsx(y6t,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),dt.jsxs(s3,{style:K>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[dt.jsxs("div",{children:[K," errors"]}),l&&dt.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,$)=>dt.jsxs(vt.Fragment,{children:[dt.jsx("div",{children:j.error_type}),dt.jsx("div",{children:j.message})]},$))})]}),dt.jsx(s3,{style:{},onClick:()=>{S(p?"off":"draw_trace")},children:dt.jsxs("div",{children:[p?"✖ ":"","Edit Traces"]})}),dt.jsx(s3,{style:{},onClick:()=>{S(d?"off":"move_footprint")},children:dt.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),dt.jsx(s3,{style:{},onClick:()=>{w(!v)},children:dt.jsxs("div",{children:[v?"✖ ":"","Rats Nest"]})}),dt.jsx(s3,{onClick:()=>{a(!i)},children:dt.jsxs("div",{children:[dt.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",dt.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&dt.jsxs("div",{style:{marginTop:4,minWidth:120},children:[dt.jsx(Pae,{label:"Show All Trace Lengths",checked:E,onClick:()=>{k(!E)}}),dt.jsx(Pae,{label:"Show Autorouting Animation",checked:C,onClick:()=>{V(!C)}}),dt.jsx(Pae,{label:"Show DRC Errors",checked:_,onClick:()=>{z(!_)}})]})]})})]})]})},I6t=r=>{const{transform:e,elements:t}=r,[n,i]=vt.useMemo(()=>{const c=r.elements.flatMap(u=>DLt(u,r.elements)),A=l2(r.elements);return[c,A]},[r.elements]),[a,o]=vt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=vt.useMemo(()=>wLt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=vt.useCallback(c=>{var d,p;const A=[];for(const v of c)if(v._element){const E=i.getNetConnectedToId("pcb_port_id"in v._element?(d=v._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in v._element?(p=v._element)==null?void 0:p.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(v=>v._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return dt.jsx(g6t,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:dt.jsx(XLt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(n6t,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:dt.jsx(ZLt,{transform:e,focusOnHover:r.focusOnHover,children:dt.jsx(v6t,{elements:t,children:dt.jsx(a6t,{transform:e,elements:t,children:dt.jsx(p6t,{transform:e,soup:t,children:dt.jsx(jLt,{transform:e,debugGraphics:r.debugGraphics,children:dt.jsx(WLt,{transform:e,elements:t,children:dt.jsx(JLt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},C6t=Fd(jh(400,300),U1(40,-40)),E6t=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=vt.useState(!l),[u,d]=kae(),[p,v]=vt.useState(C6t),{ref:E,setTransform:C,cancelDrag:_}=QLt({transform:p,onSetTransform:v,enabled:c});let[S,w]=vt.useState([]);S=a??S;const k=vt.useRef(!1),V=vt.useRef(null),z=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,K=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:Ce,height:Be}=$.some(Ie=>Ie.type.startsWith("pcb_"))?yLt($.filter(Ie=>Ie.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/Ce,(oe.height??0)/Be,100)*.75,_e=Fd(jh((oe.width??0)/2,(oe.height??0)/2),U1(pe,-pe,0,0),jh(-de.x,-de.y));C(_e)};vt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(k.current||(K(),k.current=!0))},[r,d]);const j=vt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[z]),$=vt.useMemo(()=>hot({circuitJson:j,editEvents:S}),[j,S]),J=oe=>{w([...S,oe]),o==null||o([...S,oe])},ce=oe=>{const de=S.map(Ce=>Ce.edit_event_id===oe.edit_event_id?{...Ce,...oe}:Ce);w(de),o==null||o(de)};return dt.jsxs("div",{ref:E,style:{position:"relative"},children:[dt.jsx("div",{ref:u,children:dt.jsxs(ILt,{initialState:n,children:[dt.jsx(I6t,{transform:p,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:ce,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:$,debugGraphics:e},d.width),dt.jsx(ELt,{})]})}),l&&!c&&dt.jsx("div",{onClick:()=>{A(!0),K()},onTouchStart:oe=>{const de=oe.touches[0];V.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],Ce=V.current;if(!Ce)return;const Be=Math.abs(de.clientX-Ce.x),pe=Math.abs(de.clientY-Ce.y);Be<10&&pe<10&&(oe.preventDefault(),A(!0),K()),V.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:T_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:dt.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const _6t=({containerClassName:r,...e})=>{const t=vt.useRef(null),[n,i]=vt.useState(620);return vt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),dt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:dt.jsx(E6t,{...e,height:n})})},B6t='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-\\[60vw\\]{max-width:60vw!important}.\\!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-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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-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-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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',x6t=()=>{vt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=B6t,document.head.appendChild(e)},[])},hke=r=>`hsl(${hx.indexOf(r)*137.5%360}, 70%, 50%)`,b6t=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return dt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[dt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:hx.map(t=>{const n=r[t]||0,i=n/e*100;return dt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:hke(t)},children:dt.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,": ",n.toFixed(1),"ms"]})},t)})}),dt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},S6t=({renderLog:r})=>{const[e,t]=vt.useState("chronological");if(!r)return dt.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>hx.indexOf(a[0])-hx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return dt.jsxs("div",{className:"rf-bg-white",children:[dt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[dt.jsx("div",{children:"Render Logs"}),dt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[dt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),dt.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[dt.jsx("option",{value:"chronological",children:"Phase Order"}),dt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),dt.jsx(b6t,{phaseTimings:r.phaseTimings}),dt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[dt.jsx("thead",{children:dt.jsxs("tr",{children:[dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),dt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),dt.jsx("tbody",{children:n.map(([a,o])=>dt.jsxs("tr",{children:[dt.jsx("td",{className:"rf-p-2",children:hx.indexOf(a)}),dt.jsx("td",{className:"rf-p-2",children:a}),dt.jsx("td",{className:"rf-p-2",children:dt.jsx("div",{className:"rf-w-8",children:dt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:hke(a),width:`${o/i*100}%`}})})}),dt.jsx("td",{className:"rf-p-2",children:dt.jsxs("div",{className:"rf-flex w-full",children:[dt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),dt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},Q6t="0.0.557",w6t=["assembly","bom","circuit_json","errors","render_log"],M6t=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:p=!0,className:v,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:S,autoroutingLog:w,onReportAutoroutingLog:k,isRunningCode:V,hasCodeChangedSinceLastRun:z,onEditEvent:K,editEvents:j,defaultActiveTab:$,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:ce=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1})=>{var Fe;x6t();const Ce=vt.useMemo(()=>i?i.filter(nt=>nt&&"error_type"in nt||nt.type.includes("error")):null,[i]),[Be,pe]=vt.useState($??"pcb"),[_e,Ie]=vt.useState(de),Re=vt.useCallback(nt=>{pe(nt),u==null||u(nt)},[u]),De=()=>{Ie(!_e)};vt.useEffect(()=>{t&&Re("errors")},[t]),vt.useEffect(()=>{(Be==="code"||Be==="errors")&&i&&!t&&Re($??"pcb")},[i]);const ke=vt.useCallback(nt=>{window.TSCIRCUIT_3D_OBJECT_REF=nt===null?void 0:nt},[]);return dt.jsx("div",{className:Yv("flex flex-col relative rf-overflow-x-hidden",v),children:dt.jsx("div",{className:Yv("rf-md:sticky rf-md:top-2",_e&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:dt.jsxs(ELe,{value:Be,onValueChange:Re,className:"rf-flex-grow rf-flex rf-flex-col",children:[dt.jsxs("div",{className:Yv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&dt.jsx("div",{className:"rf-flex-grow"}),!C&&V&&dt.jsx(x5e,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&dt.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&dt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&dt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Fe=d.lastRenderEvent)==null?void 0:Fe.phase)??""}),dt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:dt.jsx(x5e,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),dt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&dt.jsxs(Vse,{children:[s&&dt.jsx(jw,{value:"code",children:"Code"}),dt.jsxs(jw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Yv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),dt.jsxs(jw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&dt.jsx("span",{className:Yv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),dt.jsxs(jw,{value:"cad",children:[i&&dt.jsx("span",{className:Yv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",z?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Be)&&dt.jsx(jw,{value:Be,children:Yse(Be)}),dt.jsxs(U4e,{children:[dt.jsx(k4e,{asChild:!0,children:dt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[dt.jsx(UNt,{className:"rf-w-4 rf-h-4"}),(Ce&&Ce.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),dt.jsxs(lie,{className:"rf-*:text-xs",children:[w6t.map(nt=>dt.jsxs(vG,{onSelect:()=>Re(nt),children:[Be!==nt&&dt.jsx(B5e,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Be===nt&&dt.jsx(E5e,{className:"rf-w-3 rf-h-3"}),dt.jsx("div",{className:"rf-pr-2",children:Yse(nt)}),nt==="errors"&&(Ce&&Ce.length>0||t)&&dt.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ce==null?void 0:Ce.length})]},nt)),dt.jsx(vG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:dt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",Q6t.split(".").map((nt,rt)=>rt===2?parseInt(nt)+1:nt).join(".")]})})]})]})]}),oe&&dt.jsx(GQ,{onClick:De,variant:"ghost",children:_e?dt.jsx(PNt,{size:16}):dt.jsx(kNt,{size:16})})]}),s&&dt.jsx(Ab,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:dt.jsx("div",{className:"rf-h-full",children:l})}),dt.jsx(Ab,{value:"pcb",children:dt.jsx("div",{className:Yv("rf-overflow-hidden",_e?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(_6t,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Yv("rf-h-full rf-w-full",_e?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:nt=>{K&&nt.forEach(rt=>K(rt))}}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"assembly",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallback:dt.jsx("div",{children:"Error loading Assembly"}),children:i?dt.jsx(dFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"schematic",children:dt.jsx("div",{className:Yv("rf-overflow-auto rf-bg-white",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(cFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:nt=>{K==null||K(nt)},debugGrid:ce}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"cad",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{FallbackComponent:CNt,children:i?dt.jsx(vNt,{ref:ke,circuitJson:i,autoRotateDisabled:J}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"bom",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallbackRender:({error:nt})=>dt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:dt.jsxs("div",{className:"rf-p-4",children:[dt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),dt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(nt==null?void 0:nt.message)||"An unknown error occurred"})]})}),children:i?dt.jsx(mFt,{circuitJson:i}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"circuit_json",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:dt.jsx(PM,{fallback:dt.jsx("div",{children:"Error loading JSON viewer"}),children:i?dt.jsx(gFt,{elements:i}):dt.jsx(Mw,{onRunClicked:e})})})}),dt.jsx(Ab,{value:"errors",children:dt.jsx("div",{className:Yv("rf-overflow-auto",_e?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ce&&Ce.length>0?dt.jsx(UUt,{code:r,circuitJsonErrors:Ce,errorMessage:t,errorStack:n,autoroutingLog:w,onReportAutoroutingLog:k}):dt.jsx(Mw,{onRunClicked:e})})}),A&&dt.jsx(Ab,{value:"render_log",children:dt.jsx(S6t,{renderLog:d})})]})})})};use.createRoot(document.getElementById("root")).render(dt.jsx(M6t,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const D6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
|
package/dist/standalone.min.js
CHANGED
|
@@ -13491,7 +13491,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Xoe}oHt();function xFe(n,e,t,r=
|
|
|
13491
13491
|
&:hover {
|
|
13492
13492
|
background-color: rgba(255, 255, 255, 0.1);
|
|
13493
13493
|
}
|
|
13494
|
-
`,onClick:r=>{r.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:n})]}),NKt=({children:n,elements:e})=>{const[t,r]=k1(O=>[O.is_mouse_over_container,O.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=k1(O=>[O.selected_layer,O.selectLayer]),[d,h,m,_,C,E]=k1(O=>[O.in_move_footprint_mode,O.in_draw_trace_mode,O.is_showing_rats_nest,O.is_showing_multiple_traces_length,O.is_showing_autorouting,O.is_showing_drc_errors]),x=k1(O=>O.setEditMode),w=k1(O=>O.setIsShowingRatsNest),k=k1(O=>O.setIsShowingMultipleTracesLength),G=k1(O=>O.setIsShowingAutorouting),P=k1(O=>O.setIsShowingDrcErrors);Dw("1",()=>A("top")),Dw("2",()=>A("bottom")),Dw("3",()=>A("inner1")),Dw("4",()=>A("inner2")),Dw("5",()=>A("inner3")),Dw("6",()=>A("inner4")),Dw("7",()=>A("inner5")),Dw("8",()=>A("inner6"));const V=(e==null?void 0:e.filter(O=>O.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:O=>{r(!1),s(!1)},children:[n,Ve.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",DKt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:rx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs($3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:X3[u]},children:u})]}),o&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Nse.map(O=>O.replace(/-/g,"")).map(O=>Ve.jsx(RKt,{name:O,selected:O===u,onClick:()=>{A(O.replace(/-/,""))}},O))})]}),Ve.jsxs($3,{style:V>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[V," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(O=>O.type.includes("error")).map((O,W)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:O.error_type}),Ve.jsx("div",{children:O.message})]},W))})]}),Ve.jsx($3,{style:{},onClick:()=>{x(h?"off":"draw_trace")},children:Ve.jsxs("div",{children:[h?"✖ ":"","Edit Traces"]})}),Ve.jsx($3,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx($3,{style:{},onClick:()=>{w(!m)},children:Ve.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),Ve.jsx($3,{onClick:()=>{a(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(Lse,{label:"Show All Trace Lengths",checked:_,onClick:()=>{k(!_)}}),Ve.jsx(Lse,{label:"Show Autorouting Animation",checked:C,onClick:()=>{G(!C)}}),Ve.jsx(Lse,{label:"Show DRC Errors",checked:E,onClick:()=>{P(!E)}})]})]})})]})]})},TKt=n=>{const{transform:e,elements:t}=n,[r,i]=nt.useMemo(()=>{const c=n.elements.flatMap(A=>VVt(A,n.elements)),u=Jw(n.elements);return[c,u]},[n.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>HVt({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=nt.useCallback(c=>{var d,h;const u=[];for(const m of c)if(m._element){const _=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(h=m._element)==null?void 0:h.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(QKt,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ve.jsx(dKt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ve.jsx(pKt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ve.jsx(uKt,{transform:e,focusOnHover:n.focusOnHover,children:Ve.jsx(NKt,{elements:t,children:Ve.jsx(vKt,{transform:e,elements:t,children:Ve.jsx(MKt,{transform:e,soup:t,children:Ve.jsx(lKt,{transform:e,debugGraphics:n.debugGraphics,children:Ve.jsx(cKt,{transform:e,elements:t,children:Ve.jsx(sKt,{transform:e,primitives:s,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},kKt=Md(Gh(400,300),w1(40,-40)),UKt=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Fse(),[h,m]=nt.useState(kKt),{ref:_,setTransform:C,cancelDrag:E}=zVt({transform:h,onSetTransform:m,enabled:c});let[x,w]=nt.useState([]);x=a??x;const k=nt.useRef(!1),G=nt.useRef(null),P=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,V=()=>{const re=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ce,width:pe,height:Ae}=W.some(ye=>ye.type.startsWith("pcb_"))?RVt(W.filter(ye=>ye.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((re.width??0)/pe,(re.height??0)/Ae,100)*.75,Ce=Md(Gh((re.width??0)/2,(re.height??0)/2),w1(he,-he,0,0),Gh(-ce.x,-ce.y));C(Ce)};nt.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(k.current||(V(),k.current=!0))},[n,d]);const O=nt.useMemo(()=>(n==null?void 0:n.filter(re=>re.type.startsWith("pcb_")||re.type.startsWith("source_")))??[],[P]),W=nt.useMemo(()=>vdt({circuitJson:O,editEvents:x}),[O,x]),H=re=>{w([...x,re]),o==null||o([...x,re])},ae=re=>{const ce=x.map(pe=>pe.edit_event_id===re.edit_event_id?{...pe,...re}:pe);w(ce),o==null||o(ce)};return Ve.jsxs("div",{ref:_,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(TVt,{initialState:r,children:[Ve.jsx(TKt,{transform:h,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:H,onModifyEditEvent:ae,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ve.jsx(UVt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),V()},onTouchStart:re=>{const ce=re.touches[0];G.current={x:ce.clientX,y:ce.clientY}},onTouchEnd:re=>{const ce=re.changedTouches[0],pe=G.current;if(!pe)return;const Ae=Math.abs(ce.clientX-pe.x),he=Math.abs(ce.clientY-pe.y);Ae<10&&he<10&&(re.preventDefault(),u(!0),V()),G.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:rx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const FKt=({containerClassName:n,...e})=>{const t=nt.useRef(null),[r,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ve.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ve.jsx(UKt,{...e,height:r})})},PKt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-\\[60vw\\]{max-width:60vw!important}.\\!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-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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-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-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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',LKt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=PKt,document.head.appendChild(e)},[])},LPe=n=>`hsl(${Fx.indexOf(n)*137.5%360}, 70%, 50%)`,GKt=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Fx.map(t=>{const r=n[t]||0,i=r/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:LPe(t)},children:Ve.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,": ",r.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},OKt=({renderLog:n})=>{const[e,t]=nt.useState("chronological");if(!n)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>Fx.indexOf(a[0])-Fx.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(GKt,{phaseTimings:n.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:r.map(([a,o])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:Fx.indexOf(a)}),Ve.jsx("td",{className:"rf-p-2",children:a}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:LPe(a),width:`${o/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},zKt="0.0.556",HKt=["assembly","bom","circuit_json","errors","render_log"],YKt=({code:n,onRunClicked:e=void 0,errorMessage:t,errorStack:r,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:h=!0,className:m,headerClassName:_,leftHeaderContent:C,readOnly:E,isStreaming:x,autoroutingLog:w,onReportAutoroutingLog:k,isRunningCode:G,hasCodeChangedSinceLastRun:P,onEditEvent:V,editEvents:O,defaultActiveTab:W,autoRotate3dViewerDisabled:H,showSchematicDebugGrid:ae=!1,showToggleFullScreen:re=!0,defaultToFullScreen:ce=!1})=>{var Qe;LKt();const pe=nt.useMemo(()=>i?i.filter(ze=>ze&&"error_type"in ze||ze.type.includes("error")):null,[i]),[Ae,he]=nt.useState(W??"pcb"),[Ce,ye]=nt.useState(ce),Me=nt.useCallback(ze=>{he(ze),A==null||A(ze)},[A]),Se=()=>{ye(!Ce)};nt.useEffect(()=>{t&&Me("errors")},[t]),nt.useEffect(()=>{(Ae==="code"||Ae==="errors")&&i&&!t&&Me(W??"pcb")},[i]);const Ne=nt.useCallback(ze=>{window.TSCIRCUIT_3D_OBJECT_REF=ze===null?void 0:ze},[]);return Ve.jsx("div",{className:Mg("flex flex-col relative rf-overflow-x-hidden",m),children:Ve.jsx("div",{className:Mg("rf-md:sticky rf-md:top-2",Ce&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(Nye,{value:Ae,onValueChange:Me,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[C,C&&Ve.jsx("div",{className:"rf-flex-grow"}),!C&&G&&Ve.jsx(M3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&Ve.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Qe=d.lastRenderEvent)==null?void 0:Qe.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx(M3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(dK,{children:[s&&Ve.jsx(W2,{value:"code",children:"Code"}),Ve.jsxs(W2,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mg("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs(W2,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mg("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs(W2,{value:"cad",children:[i&&Ve.jsx("span",{className:Mg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ae)&&Ve.jsx(W2,{value:Ae,children:Rye(Ae)}),Ve.jsxs(ooe,{children:[Ve.jsx(soe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(Z6t,{className:"rf-w-4 rf-h-4"}),(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(bL,{className:"rf-*:text-xs",children:[HKt.map(ze=>Ve.jsxs(fb,{onSelect:()=>Me(ze),children:[Ae!==ze&&Ve.jsx(VTe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ae===ze&&Ve.jsx(hae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:Rye(ze)}),ze==="errors"&&(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:pe==null?void 0:pe.length})]},ze)),Ve.jsx(fb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",zKt.split(".").map((ze,$e)=>$e===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),re&&Ve.jsx(__,{onClick:Se,variant:"ghost",children:Ce?Ve.jsx(tPt,{size:16}):Ve.jsx($6t,{size:16})})]}),s&&Ve.jsx(Hb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),Ve.jsx(Hb,{value:"pcb",children:Ve.jsx("div",{className:Mg("rf-overflow-hidden",Ce?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(FKt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Mg("rf-h-full rf-w-full",Ce?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{V&&ze.forEach($e=>V($e))}}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"assembly",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:i?Ve.jsx(bzt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"schematic",children:Ve.jsx("div",{className:Mg("rf-overflow-auto rf-bg-white",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(_zt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{V==null||V(ze)},debugGrid:ae}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"cad",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{FallbackComponent:P6t,children:i?Ve.jsx(U6t,{ref:Ne,circuitJson:i,autoRotateDisabled:H}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"bom",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(Dzt,{circuitJson:i}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"circuit_json",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ve.jsx(Qzt,{elements:i}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"errors",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||pe&&pe.length>0?Ve.jsx(W7t,{code:n,circuitJsonErrors:pe,errorMessage:t,errorStack:r,autoroutingLog:w,onReportAutoroutingLog:k}):Ve.jsx(h9,{onRunClicked:e})})}),u&&Ve.jsx(Hb,{value:"render_log",children:Ve.jsx(OKt,{renderLog:d})})]})})})};var yG="Dialog",[GPe,OPe]=PS(yG),[VKt,yb]=GPe(yG),zPe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=nt.useRef(null),l=nt.useRef(null),[c,u]=uM({prop:r,defaultProp:i??!1,onChange:a,caller:yG});return Ve.jsx(VKt,{scope:e,triggerRef:s,contentRef:l,contentId:LS(),titleId:LS(),descriptionId:LS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};zPe.displayName=yG;var HPe="DialogTrigger",YPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(HPe,t),a=t1(e,i.triggerRef);return Ve.jsx(_v.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zse(i.open),...r,ref:a,onClick:Oh(n.onClick,i.onOpenToggle)})});YPe.displayName=HPe;var Gse="DialogPortal",[KKt,VPe]=GPe(Gse,{forceMount:void 0}),KPe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=yb(Gse,e);return Ve.jsx(KKt,{scope:e,forceMount:t,children:nt.Children.map(r,o=>Ve.jsx(Ob,{present:t||a.open,children:Ve.jsx(Yae,{asChild:!0,container:i,children:o})}))})};KPe.displayName=Gse;var vG="DialogOverlay",jPe=nt.forwardRef((n,e)=>{const t=VPe(vG,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=yb(vG,n.__scopeDialog);return a.modal?Ve.jsx(Ob,{present:r||a.open,children:Ve.jsx(JKt,{...i,ref:e})}):null});jPe.displayName=vG;var jKt=cM("DialogOverlay.RemoveScroll"),JKt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(vG,t);return Ve.jsx(qae,{as:jKt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(_v.div,{"data-state":zse(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),I9="DialogContent",JPe=nt.forwardRef((n,e)=>{const t=VPe(I9,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=yb(I9,n.__scopeDialog);return Ve.jsx(Ob,{present:r||a.open,children:a.modal?Ve.jsx(WKt,{...i,ref:e}):Ve.jsx(qKt,{...i,ref:e})})});JPe.displayName=I9;var WKt=nt.forwardRef((n,e)=>{const t=yb(I9,n.__scopeDialog),r=nt.useRef(null),i=t1(e,t.contentRef,r);return nt.useEffect(()=>{const a=r.current;if(a)return q8e(a)},[]),Ve.jsx(WPe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Oh(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Oh(n.onFocusOutside,a=>a.preventDefault())})}),qKt=nt.forwardRef((n,e)=>{const t=yb(I9,n.__scopeDialog),r=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(WPe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),WPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=yb(I9,t),l=nt.useRef(null),c=t1(e,l);return A8e(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(Qae,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ve.jsx(Bae,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":zse(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(XKt,{titleId:s.titleId}),Ve.jsx(ejt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ose="DialogTitle",qPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(Ose,t);return Ve.jsx(_v.h2,{id:i.titleId,...r,ref:e})});qPe.displayName=Ose;var ZPe="DialogDescription",XPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(ZPe,t);return Ve.jsx(_v.p,{id:i.descriptionId,...r,ref:e})});XPe.displayName=ZPe;var $Pe="DialogClose",eLe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb($Pe,t);return Ve.jsx(_v.button,{type:"button",...r,ref:e,onClick:Oh(n.onClick,()=>i.onOpenChange(!1))})});eLe.displayName=$Pe;function zse(n){return n?"open":"closed"}var tLe="DialogTitleWarning",[ZKt,nLe]=bft(tLe,{contentName:I9,titleName:Ose,docsSlug:"dialog"}),XKt=({titleId:n})=>{const e=nLe(tLe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13494
|
+
`,onClick:r=>{r.stopPropagation(),t()},children:[Ve.jsx("input",{type:"checkbox",checked:e}),Ve.jsx("span",{style:{color:"#eee"},children:n})]}),NKt=({children:n,elements:e})=>{const[t,r]=k1(O=>[O.is_mouse_over_container,O.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=k1(O=>[O.selected_layer,O.selectLayer]),[d,h,m,_,C,E]=k1(O=>[O.in_move_footprint_mode,O.in_draw_trace_mode,O.is_showing_rats_nest,O.is_showing_multiple_traces_length,O.is_showing_autorouting,O.is_showing_drc_errors]),x=k1(O=>O.setEditMode),w=k1(O=>O.setIsShowingRatsNest),k=k1(O=>O.setIsShowingMultipleTracesLength),G=k1(O=>O.setIsShowingAutorouting),P=k1(O=>O.setIsShowingDrcErrors);Dw("1",()=>A("top")),Dw("2",()=>A("bottom")),Dw("3",()=>A("inner1")),Dw("4",()=>A("inner2")),Dw("5",()=>A("inner3")),Dw("6",()=>A("inner4")),Dw("7",()=>A("inner5")),Dw("8",()=>A("inner6"));const V=(e==null?void 0:e.filter(O=>O.type.includes("error")).length)??0;return Ve.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{r(!0)},onMouseLeave:O=>{r(!1),s(!1)},children:[n,Ve.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",DKt.version]}),Ve.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:rx.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ve.jsxs($3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ve.jsxs("div",{children:["layer:"," ",Ve.jsx("span",{style:{marginLeft:2,fontWeight:500,color:X3[u]},children:u})]}),o&&Ve.jsx("div",{style:{marginTop:4,minWidth:120},children:Nse.map(O=>O.replace(/-/g,"")).map(O=>Ve.jsx(RKt,{name:O,selected:O===u,onClick:()=>{A(O.replace(/-/,""))}},O))})]}),Ve.jsxs($3,{style:V>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ve.jsxs("div",{children:[V," errors"]}),l&&Ve.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(O=>O.type.includes("error")).map((O,W)=>Ve.jsxs(nt.Fragment,{children:[Ve.jsx("div",{children:O.error_type}),Ve.jsx("div",{children:O.message})]},W))})]}),Ve.jsx($3,{style:{},onClick:()=>{x(h?"off":"draw_trace")},children:Ve.jsxs("div",{children:[h?"✖ ":"","Edit Traces"]})}),Ve.jsx($3,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ve.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ve.jsx($3,{style:{},onClick:()=>{w(!m)},children:Ve.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),Ve.jsx($3,{onClick:()=>{a(!i)},children:Ve.jsxs("div",{children:[Ve.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ve.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ve.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ve.jsx(Lse,{label:"Show All Trace Lengths",checked:_,onClick:()=>{k(!_)}}),Ve.jsx(Lse,{label:"Show Autorouting Animation",checked:C,onClick:()=>{G(!C)}}),Ve.jsx(Lse,{label:"Show DRC Errors",checked:E,onClick:()=>{P(!E)}})]})]})})]})]})},TKt=n=>{const{transform:e,elements:t}=n,[r,i]=nt.useMemo(()=>{const c=n.elements.flatMap(A=>VVt(A,n.elements)),u=Jw(n.elements);return[c,u]},[n.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>HVt({primitivesWithoutInteractionMetadata:r,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[r,a]),l=nt.useCallback(c=>{var d,h;const u=[];for(const m of c)if(m._element){const _=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(h=m._element)==null?void 0:h.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ve.jsx(QKt,{elements:t,transform:e,primitives:r,onMouseHoverOverPrimitives:l,children:Ve.jsx(dKt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ve.jsx(pKt,{disabled:!n.allowEditing,transform:e,soup:t,cancelPanDrag:n.cancelPanDrag,onCreateEditEvent:n.onCreateEditEvent,onModifyEditEvent:n.onModifyEditEvent,children:Ve.jsx(uKt,{transform:e,focusOnHover:n.focusOnHover,children:Ve.jsx(NKt,{elements:t,children:Ve.jsx(vKt,{transform:e,elements:t,children:Ve.jsx(MKt,{transform:e,soup:t,children:Ve.jsx(lKt,{transform:e,debugGraphics:n.debugGraphics,children:Ve.jsx(cKt,{transform:e,elements:t,children:Ve.jsx(sKt,{transform:e,primitives:s,width:n.width,height:n.height,grid:n.grid})})})})})})})})})})},kKt=Md(Gh(400,300),w1(40,-40)),UKt=({circuitJson:n,debugGraphics:e,height:t=600,initialState:r,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Fse(),[h,m]=nt.useState(kKt),{ref:_,setTransform:C,cancelDrag:E}=zVt({transform:h,onSetTransform:m,enabled:c});let[x,w]=nt.useState([]);x=a??x;const k=nt.useRef(!1),G=nt.useRef(null),P=`${(n==null?void 0:n.length)||0}_${(n==null?void 0:n.editCount)||0}`,V=()=>{const re=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:ce,width:pe,height:Ae}=W.some(ye=>ye.type.startsWith("pcb_"))?RVt(W.filter(ye=>ye.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((re.width??0)/pe,(re.height??0)/Ae,100)*.75,Ce=Md(Gh((re.width??0)/2,(re.height??0)/2),w1(he,-he,0,0),Gh(-ce.x,-ce.y));C(Ce)};nt.useEffect(()=>{d!=null&&d.width&&n&&n.length!==0&&(k.current||(V(),k.current=!0))},[n,d]);const O=nt.useMemo(()=>(n==null?void 0:n.filter(re=>re.type.startsWith("pcb_")||re.type.startsWith("source_")))??[],[P]),W=nt.useMemo(()=>vdt({circuitJson:O,editEvents:x}),[O,x]),H=re=>{w([...x,re]),o==null||o([...x,re])},ae=re=>{const ce=x.map(pe=>pe.edit_event_id===re.edit_event_id?{...pe,...re}:pe);w(ce),o==null||o(ce)};return Ve.jsxs("div",{ref:_,style:{position:"relative"},children:[Ve.jsx("div",{ref:A,children:Ve.jsxs(TVt,{initialState:r,children:[Ve.jsx(TKt,{transform:h,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:H,onModifyEditEvent:ae,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ve.jsx(UVt,{})]})}),l&&!c&&Ve.jsx("div",{onClick:()=>{u(!0),V()},onTouchStart:re=>{const ce=re.touches[0];G.current={x:ce.clientX,y:ce.clientY}},onTouchEnd:re=>{const ce=re.changedTouches[0],pe=G.current;if(!pe)return;const Ae=Math.abs(ce.clientX-pe.x),he=Math.abs(ce.clientY-pe.y);Ae<10&&he<10&&(re.preventDefault(),u(!0),V()),G.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:rx.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ve.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const FKt=({containerClassName:n,...e})=>{const t=nt.useRef(null),[r,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ve.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:Ve.jsx(UKt,{...e,height:r})})},PKt='*,: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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.\\!rf-max-h-\\[70\\%\\]{max-height:70%!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-\\[60vw\\]{max-width:60vw!important}.\\!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-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.\\!rf-overflow-x-hidden{overflow-x:hidden!important}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.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-tight{line-height:1.25}.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-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-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-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-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-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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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\\]\\: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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',LKt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=PKt,document.head.appendChild(e)},[])},LPe=n=>`hsl(${Fx.indexOf(n)*137.5%360}, 70%, 50%)`,GKt=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,r)=>t+r,0);return Ve.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ve.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Fx.map(t=>{const r=n[t]||0,i=r/e*100;return Ve.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:LPe(t)},children:Ve.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,": ",r.toFixed(1),"ms"]})},t)})}),Ve.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},OKt=({renderLog:n})=>{const[e,t]=nt.useState("chronological");if(!n)return Ve.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const r=Object.entries((n==null?void 0:n.phaseTimings)??{});e==="chronological"?r.sort((a,o)=>Fx.indexOf(a[0])-Fx.indexOf(o[0])):r.sort((a,o)=>o[1]-a[1]);const i=r.reduce((a,[o,s])=>a+s,0);return Ve.jsxs("div",{className:"rf-bg-white",children:[Ve.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ve.jsx("div",{children:"Render Logs"}),Ve.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ve.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ve.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ve.jsx("option",{value:"chronological",children:"Phase Order"}),Ve.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ve.jsx(GKt,{phaseTimings:n.phaseTimings}),Ve.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ve.jsx("thead",{children:Ve.jsxs("tr",{children:[Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ve.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ve.jsx("tbody",{children:r.map(([a,o])=>Ve.jsxs("tr",{children:[Ve.jsx("td",{className:"rf-p-2",children:Fx.indexOf(a)}),Ve.jsx("td",{className:"rf-p-2",children:a}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsx("div",{className:"rf-w-8",children:Ve.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:LPe(a),width:`${o/i*100}%`}})})}),Ve.jsx("td",{className:"rf-p-2",children:Ve.jsxs("div",{className:"rf-flex w-full",children:[Ve.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ve.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},zKt="0.0.557",HKt=["assembly","bom","circuit_json","errors","render_log"],YKt=({code:n,onRunClicked:e=void 0,errorMessage:t,errorStack:r,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:h=!0,className:m,headerClassName:_,leftHeaderContent:C,readOnly:E,isStreaming:x,autoroutingLog:w,onReportAutoroutingLog:k,isRunningCode:G,hasCodeChangedSinceLastRun:P,onEditEvent:V,editEvents:O,defaultActiveTab:W,autoRotate3dViewerDisabled:H,showSchematicDebugGrid:ae=!1,showToggleFullScreen:re=!0,defaultToFullScreen:ce=!1})=>{var Qe;LKt();const pe=nt.useMemo(()=>i?i.filter(ze=>ze&&"error_type"in ze||ze.type.includes("error")):null,[i]),[Ae,he]=nt.useState(W??"pcb"),[Ce,ye]=nt.useState(ce),Me=nt.useCallback(ze=>{he(ze),A==null||A(ze)},[A]),Se=()=>{ye(!Ce)};nt.useEffect(()=>{t&&Me("errors")},[t]),nt.useEffect(()=>{(Ae==="code"||Ae==="errors")&&i&&!t&&Me(W??"pcb")},[i]);const Ne=nt.useCallback(ze=>{window.TSCIRCUIT_3D_OBJECT_REF=ze===null?void 0:ze},[]);return Ve.jsx("div",{className:Mg("flex flex-col relative rf-overflow-x-hidden",m),children:Ve.jsx("div",{className:Mg("rf-md:sticky rf-md:top-2",Ce&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ve.jsxs(Nye,{value:Ae,onValueChange:Me,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ve.jsxs("div",{className:Mg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[C,C&&Ve.jsx("div",{className:"rf-flex-grow"}),!C&&G&&Ve.jsx(M3,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&Ve.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ve.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[d.lastRenderEvent&&Ve.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Qe=d.lastRenderEvent)==null?void 0:Qe.phase)??""}),Ve.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ve.jsx(M3,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ve.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ve.jsxs(dK,{children:[s&&Ve.jsx(W2,{value:"code",children:"Code"}),Ve.jsxs(W2,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mg("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ve.jsxs(W2,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ve.jsx("span",{className:Mg("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ve.jsxs(W2,{value:"cad",children:[i&&Ve.jsx("span",{className:Mg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",P?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ae)&&Ve.jsx(W2,{value:Ae,children:Rye(Ae)}),Ve.jsxs(ooe,{children:[Ve.jsx(soe,{asChild:!0,children:Ve.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ve.jsx(Z6t,{className:"rf-w-4 rf-h-4"}),(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ve.jsxs(bL,{className:"rf-*:text-xs",children:[HKt.map(ze=>Ve.jsxs(fb,{onSelect:()=>Me(ze),children:[Ae!==ze&&Ve.jsx(VTe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ae===ze&&Ve.jsx(hae,{className:"rf-w-3 rf-h-3"}),Ve.jsx("div",{className:"rf-pr-2",children:Rye(ze)}),ze==="errors"&&(pe&&pe.length>0||t)&&Ve.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:pe==null?void 0:pe.length})]},ze)),Ve.jsx(fb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ve.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",zKt.split(".").map((ze,$e)=>$e===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),re&&Ve.jsx(__,{onClick:Se,variant:"ghost",children:Ce?Ve.jsx(tPt,{size:16}):Ve.jsx($6t,{size:16})})]}),s&&Ve.jsx(Hb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ve.jsx("div",{className:"rf-h-full",children:l})}),Ve.jsx(Hb,{value:"pcb",children:Ve.jsx("div",{className:Mg("rf-overflow-hidden",Ce?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(FKt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Mg("rf-h-full rf-w-full",Ce?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{V&&ze.forEach($e=>V($e))}}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"assembly",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallback:Ve.jsx("div",{children:"Error loading Assembly"}),children:i?Ve.jsx(bzt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"schematic",children:Ve.jsx("div",{className:Mg("rf-overflow-auto rf-bg-white",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(_zt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>{V==null||V(ze)},debugGrid:ae}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"cad",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{FallbackComponent:P6t,children:i?Ve.jsx(U6t,{ref:Ne,circuitJson:i,autoRotateDisabled:H}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"bom",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallbackRender:({error:ze})=>Ve.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ve.jsxs("div",{className:"rf-p-4",children:[Ve.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ve.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(ze==null?void 0:ze.message)||"An unknown error occurred"})]})}),children:i?Ve.jsx(Dzt,{circuitJson:i}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"circuit_json",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ve.jsx(Q3,{fallback:Ve.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ve.jsx(Qzt,{elements:i}):Ve.jsx(h9,{onRunClicked:e})})})}),Ve.jsx(Hb,{value:"errors",children:Ve.jsx("div",{className:Mg("rf-overflow-auto",Ce?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||pe&&pe.length>0?Ve.jsx(W7t,{code:n,circuitJsonErrors:pe,errorMessage:t,errorStack:r,autoroutingLog:w,onReportAutoroutingLog:k}):Ve.jsx(h9,{onRunClicked:e})})}),u&&Ve.jsx(Hb,{value:"render_log",children:Ve.jsx(OKt,{renderLog:d})})]})})})};var yG="Dialog",[GPe,OPe]=PS(yG),[VKt,yb]=GPe(yG),zPe=n=>{const{__scopeDialog:e,children:t,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=n,s=nt.useRef(null),l=nt.useRef(null),[c,u]=uM({prop:r,defaultProp:i??!1,onChange:a,caller:yG});return Ve.jsx(VKt,{scope:e,triggerRef:s,contentRef:l,contentId:LS(),titleId:LS(),descriptionId:LS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};zPe.displayName=yG;var HPe="DialogTrigger",YPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(HPe,t),a=t1(e,i.triggerRef);return Ve.jsx(_v.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zse(i.open),...r,ref:a,onClick:Oh(n.onClick,i.onOpenToggle)})});YPe.displayName=HPe;var Gse="DialogPortal",[KKt,VPe]=GPe(Gse,{forceMount:void 0}),KPe=n=>{const{__scopeDialog:e,forceMount:t,children:r,container:i}=n,a=yb(Gse,e);return Ve.jsx(KKt,{scope:e,forceMount:t,children:nt.Children.map(r,o=>Ve.jsx(Ob,{present:t||a.open,children:Ve.jsx(Yae,{asChild:!0,container:i,children:o})}))})};KPe.displayName=Gse;var vG="DialogOverlay",jPe=nt.forwardRef((n,e)=>{const t=VPe(vG,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=yb(vG,n.__scopeDialog);return a.modal?Ve.jsx(Ob,{present:r||a.open,children:Ve.jsx(JKt,{...i,ref:e})}):null});jPe.displayName=vG;var jKt=cM("DialogOverlay.RemoveScroll"),JKt=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(vG,t);return Ve.jsx(qae,{as:jKt,allowPinchZoom:!0,shards:[i.contentRef],children:Ve.jsx(_v.div,{"data-state":zse(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),I9="DialogContent",JPe=nt.forwardRef((n,e)=>{const t=VPe(I9,n.__scopeDialog),{forceMount:r=t.forceMount,...i}=n,a=yb(I9,n.__scopeDialog);return Ve.jsx(Ob,{present:r||a.open,children:a.modal?Ve.jsx(WKt,{...i,ref:e}):Ve.jsx(qKt,{...i,ref:e})})});JPe.displayName=I9;var WKt=nt.forwardRef((n,e)=>{const t=yb(I9,n.__scopeDialog),r=nt.useRef(null),i=t1(e,t.contentRef,r);return nt.useEffect(()=>{const a=r.current;if(a)return q8e(a)},[]),Ve.jsx(WPe,{...n,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oh(n.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Oh(n.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Oh(n.onFocusOutside,a=>a.preventDefault())})}),qKt=nt.forwardRef((n,e)=>{const t=yb(I9,n.__scopeDialog),r=nt.useRef(!1),i=nt.useRef(!1);return Ve.jsx(WPe,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=n.onCloseAutoFocus)==null||o.call(n,a),a.defaultPrevented||(r.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=n.onInteractOutside)==null||l.call(n,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),WPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=n,s=yb(I9,t),l=nt.useRef(null),c=t1(e,l);return A8e(),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(Qae,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ve.jsx(Bae,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":zse(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ve.jsxs(Ve.Fragment,{children:[Ve.jsx(XKt,{titleId:s.titleId}),Ve.jsx(ejt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ose="DialogTitle",qPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(Ose,t);return Ve.jsx(_v.h2,{id:i.titleId,...r,ref:e})});qPe.displayName=Ose;var ZPe="DialogDescription",XPe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb(ZPe,t);return Ve.jsx(_v.p,{id:i.descriptionId,...r,ref:e})});XPe.displayName=ZPe;var $Pe="DialogClose",eLe=nt.forwardRef((n,e)=>{const{__scopeDialog:t,...r}=n,i=yb($Pe,t);return Ve.jsx(_v.button,{type:"button",...r,ref:e,onClick:Oh(n.onClick,()=>i.onOpenChange(!1))})});eLe.displayName=$Pe;function zse(n){return n?"open":"closed"}var tLe="DialogTitleWarning",[ZKt,nLe]=bft(tLe,{contentName:I9,titleName:Ose,docsSlug:"dialog"}),XKt=({titleId:n})=>{const e=nLe(tLe),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
13495
13495
|
|
|
13496
13496
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
13497
13497
|
|
|
@@ -13675,7 +13675,7 @@ to {
|
|
|
13675
13675
|
* @license
|
|
13676
13676
|
* Copyright 2019 Google LLC
|
|
13677
13677
|
* SPDX-License-Identifier: Apache-2.0
|
|
13678
|
-
*/const LLe=Symbol("Comlink.proxy"),tWt=Symbol("Comlink.endpoint"),GLe=Symbol("Comlink.releaseProxy"),lle=Symbol("Comlink.finalizer"),UG=Symbol("Comlink.thrown"),OLe=n=>typeof n=="object"&&n!==null||typeof n=="function",nWt={canHandle:n=>OLe(n)&&n[LLe],serialize(n){const{port1:e,port2:t}=new MessageChannel;return HLe(n,e),[t,[t]]},deserialize(n){return n.start(),VLe(n)}},rWt={canHandle:n=>OLe(n)&&UG in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},zLe=new Map([["proxy",nWt],["throw",rWt]]);function iWt(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function HLe(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!iWt(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:o,path:s}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(x9);let c;try{const u=s.slice(0,-1).reduce((d,h)=>d[h],n),A=s.reduce((d,h)=>d[h],n);switch(o){case"GET":c=A;break;case"SET":u[s.slice(-1)[0]]=x9(i.data.value),c=!0;break;case"APPLY":c=A.apply(u,l);break;case"CONSTRUCT":{const d=new A(...l);c=WLe(d)}break;case"ENDPOINT":{const{port1:d,port2:h}=new MessageChannel;HLe(n,h),c=cWt(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[UG]:0}}Promise.resolve(c).catch(u=>({value:u,[UG]:0})).then(u=>{const[A,d]=GG(u);e.postMessage(Object.assign(Object.assign({},A),{id:a}),d),o==="RELEASE"&&(e.removeEventListener("message",r),YLe(e),lle in n&&typeof n[lle]=="function"&&n[lle]())}).catch(u=>{const[A,d]=GG({value:new TypeError("Unserializable return value"),[UG]:0});e.postMessage(Object.assign(Object.assign({},A),{id:a}),d)})}),e.start&&e.start()}function aWt(n){return n.constructor.name==="MessagePort"}function YLe(n){aWt(n)&&n.close()}function VLe(n,e){const t=new Map;return n.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const o=t.get(a.id);if(o)try{o(a)}finally{t.delete(a.id)}}),cle(n,t,[],e)}function FG(n){if(n)throw new Error("Proxy has been released and is not useable")}function KLe(n){return n5(n,new Map,{type:"RELEASE"}).then(()=>{YLe(n)})}const PG=new WeakMap,LG="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(PG.get(n)||0)-1;PG.set(n,e),e===0&&KLe(n)});function oWt(n,e){const t=(PG.get(e)||0)+1;PG.set(e,t),LG&&LG.register(n,e,n)}function sWt(n){LG&&LG.unregister(n)}function cle(n,e,t=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(o,s){if(FG(i),s===GLe)return()=>{sWt(a),KLe(n),e.clear(),i=!0};if(s==="then"){if(t.length===0)return{then:()=>a};const l=n5(n,e,{type:"GET",path:t.map(c=>c.toString())}).then(x9);return l.then.bind(l)}return cle(n,e,[...t,s])},set(o,s,l){FG(i);const[c,u]=GG(l);return n5(n,e,{type:"SET",path:[...t,s].map(A=>A.toString()),value:c},u).then(x9)},apply(o,s,l){FG(i);const c=t[t.length-1];if(c===tWt)return n5(n,e,{type:"ENDPOINT"}).then(x9);if(c==="bind")return cle(n,e,t.slice(0,-1));const[u,A]=jLe(l);return n5(n,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},A).then(x9)},construct(o,s){FG(i);const[l,c]=jLe(s);return n5(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(x9)}});return oWt(a,n),a}function lWt(n){return Array.prototype.concat.apply([],n)}function jLe(n){const e=n.map(GG);return[e.map(t=>t[0]),lWt(e.map(t=>t[1]))]}const JLe=new WeakMap;function cWt(n,e){return JLe.set(n,e),n}function WLe(n){return Object.assign(n,{[LLe]:!0})}function GG(n){for(const[e,t]of zLe)if(t.canHandle(n)){const[r,i]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:n},JLe.get(n)||[]]}function x9(n){switch(n.type){case"HANDLER":return zLe.get(n.name).deserialize(n.value);case"RAW":return n.value}}function n5(n,e,t,r){return new Promise(i=>{const a=uWt();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}function uWt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var AWt=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(s){console.warn("[Worker] Error killing previous global worker instance:",s),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const s=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(s).then(c=>c.blob());t=URL.createObjectURL(l)}const r=new Worker(t,{type:"module"}),i=VLe(r);n.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl);let a=!1;const o={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...s)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...s)},executeWithFsMap:async(...s)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...s)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(s,l)=>{const c=WLe(l);i.on(s,c)},kill:async()=>{i[GLe](),r.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===o&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=o,o};const qLe=n=>{const e={};if(!n)return e;for(const r of Fx)e[r]=0;const t=new Map;for(const r of n){const[,,i,a]=r.type.split(":");if(a==="start"){t.set(`${i}:${r.renderId}`,r);continue}if(a==="end"){const o=t.get(`${i}:${r.renderId}`);if(o){const s=r.createdAt-o.createdAt;e[i]=(e[i]||0)+s}}}return e},dWt=(n,e)=>{const t={};for(const[r,i]of n.entries()){const a=e.get(r);a!==i&&(t[r]={old:i,new:a})}for(const[r,i]of e.entries())n.has(r)||(t[r]={old:void 0,new:i});return t},ZLe=qme()(Zme(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function fWt(){const n=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),r=nt.useCallback(async o=>{await n.current;const s={cancelled:!1};t.current=s;let l;const c=new Promise(u=>{l=u});try{return n.current=c,e.current=!0,await o()}catch(u){if(!s.cancelled)throw u}finally{e.current=!1,t.current=null,l()}},[]),i=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),a=nt.useCallback(()=>e.current,[]);return{runWithMutex:r,isLocked:a,cancel:i}}const hWt=26,kw=b1("run-frame:RunFrame"),gWt=n=>{const[e,t]=tb(re=>[re.circuitJson,re.setCircuitJson]),[r,i]=nt.useState(null),a=nt.useRef(null),[o,s]=nt.useState(null),[l,c]=nt.useReducer((re,ce)=>re+1,0),u=ZLe(re=>re.setLastRunEvalVersion),A=nt.useRef(0),d=fWt(),[h,m]=nt.useState(!1);nt.useEffect(()=>{const re=ce=>{(ce.ctrlKey||ce.metaKey)&&ce.key==="Enter"&&!h&&c(1)};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[h]);const[_,C]=nt.useState(null),[E,x]=nt.useState({}),[w,k]=nt.useState(n.defaultActiveTab??"pcb");nt.useEffect(()=>{n.debug&&b1.enable("run-frame*")},[n.debug]);const G=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((re,[ce,pe])=>re.set(ce,pe),new Map),P=nt.useRef(null),V=nt.useRef(null);nt.useEffect(()=>{const re=G instanceof Map?Object.fromEntries(G.entries()):G;if(!re||Object.keys(re).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const ce=n.showRunButton&&l!==A.current;if(P.current&&e){const Ae=dWt(P.current,G);if(Object.keys(Ae).length>0)kw("code changes detected");else if(V.current!==n.entrypoint)kw("render triggered by entrypoint change");else if(!ce){kw("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&l===A.current)return;P.current=G,V.current=n.entrypoint??null,A.current=l,m(!0);const pe=async()=>{var $e,lt,pt,Ut,Mt,qe;kw("running render worker"),i(null),C(null);const Ae={progress:0};let he=!1;a.current=()=>{he=!0};let Ce=n.evalVersion??"latest";if(!globalThis.runFrameWorker&&n.forceLatestEvalVersion)try{const It=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(It.ok){const Ct=await It.json();($e=Ct.tags)!=null&&$e.latest&&(Ce=Ct.tags.latest,u(Ce))}}catch{}const ye=globalThis.runFrameWorker??await AWt({evalVersion:Ce,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=ye,(lt=n.onRenderStarted)==null||lt.call(n);const Me=G instanceof Map?Object.fromEntries(G.entries()):G;let Se=Date.now();if(ye.on("autorouting:start",It=>{x({...E,[It.componentDisplayName]:{simpleRouteJson:It.simpleRouteJson}})}),ye.on("board:renderPhaseStarted",It=>{Ae.lastRenderEvent=It,Ae.eventsProcessed=(Ae.eventsProcessed??0)+1;const Ct=Fx.indexOf(It.phase)/hWt*.75+Ae.eventsProcessed/1e3*.25,Et=1-Math.exp(-Ct*3);Ae.progress=Et,he||C({...Ae})}),w==="render_log"&&ye.on("renderable:renderLifecycle:anyEvent",It=>{Ae.renderEvents=Ae.renderEvents??[],It.createdAt=Date.now(),Ae.renderEvents.push(It),Date.now()-Se>500&&(Ae.phaseTimings=qLe(Ae.renderEvents??[]),Se=Date.now()),he||C({...Ae})}),ye.on("autorouting:progress",It=>{s(It.debugGraphics)}),!(await ye.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Me,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(It=>{var Et;const Ct=It.message.replace("Error: ","");return(Et=n.onError)==null||Et.call(n,It),i({error:Ct,stack:It.stack}),C(null),console.error(It),{success:!1}})).success){m(!1);return}const Qe=ye.renderUntilSettled();kw("waiting for initial circuit json...");let ze=await ye.getCircuitJson().catch(It=>{var Ct;return kw("error getting initial circuit json",It),(Ct=n.onError)==null||Ct.call(n,It),i({error:It.message,stack:It.stack}),C(null),m(!1),null});ze&&(kw("got initial circuit json"),t(ze),(pt=n.onCircuitJsonChange)==null||pt.call(n,ze),(Ut=n.onInitialRender)==null||Ut.call(n,{circuitJson:ze}),await Qe,kw("getting final circuit json"),ze=await ye.getCircuitJson(),(Mt=n.onCircuitJsonChange)==null||Mt.call(n,ze),t(ze),(qe=n.onRenderFinished)==null||qe.call(n,{circuitJson:ze}),s({}),w==="render_log"&&(Ae.phaseTimings=qLe(Ae.renderEvents??[])),Ae.progress=1,he||C({...Ae}),m(!1),a.current=null)};d.runWithMutex(pe)},[n.fsMap,n.entrypoint,l,n.evalVersion]);const O=nt.useRef(null),W=nt.useRef(null),H=re=>{if(!re||re===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}re.in_progress?(O.current=re,W.current&&(clearTimeout(W.current),W.current=null)):(W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{var pe;const ce=re||O.current;(pe=n.onEditEvent)==null||pe.call(n,ce),O.current=null,W.current=null},100))},ae=async(re,ce)=>{await sle.post("autorouting/bug_reports/create",{json:{title:re,simple_route_json:ce.simpleRouteJson}}).json().then(({autorouting_bug_report:pe})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${pe.autorouting_bug_report_id}`,"_blank")}).catch(pe=>{console.error("Failed to report autorouting bug",pe),pe.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${pe.message}`)})};return Ve.jsx(YKt,{code:G.get(n.entrypoint??n.mainComponentPath),defaultActiveTab:n.defaultActiveTab,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:o,autoroutingLog:E,onReportAutoroutingLog:n.onReportAutoroutingLog||ae,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[n.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{c(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:h,children:["Run"," ",h?Ve.jsx(M3,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx(KTe,{className:"rf-w-3 rf-h-3"})]}),h&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(__,{onClick:re=>{re.stopPropagation(),m(!1),C(null),i(null),a.current&&(a.current(),a.current=null),d.cancel(),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(iPt,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.leftHeaderContent]}),onActiveTabChange:k,circuitJson:e,renderLog:_,isRunningCode:h,errorMessage:r==null?void 0:r.error,errorStack:r==null?void 0:r.stack,onEditEvent:H,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})};function pWt(n,e){const[t,r]=nt.useState(()=>{try{const i=window.localStorage.getItem(n);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[n,t]),[t,r]}const mWt=({snippetNames:n,onSelect:e,onCancel:t,isOpen:r})=>{const[i,a]=nt.useState(""),[o,s]=nt.useState("");if(!r)return null;const l=n.filter(A=>A.toLowerCase().includes(o.toLowerCase())),c=o&&!n.includes(o),u=A=>{A.key==="Enter"&&(l.length===1?a(l[0]):c&&a(o))};return Ve.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:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.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:o,onChange:A=>s(A.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(A=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===A?"bg-blue-50":""}`,onClick:()=>a(A),children:A},A)),c&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===o?"bg-blue-50":""}`,onClick:()=>a(o),children:['Create new "',o,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.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:()=>i&&e(i),disabled:!i,children:i===o?`Create "${i}"`:`Save to ${i}`})]})]})})},yWt=n=>{const e=nt.useRef(null),t=tb(r=>r.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const r=t[0];r.event_id!==e.current&&(n(r),e.current=r.event_id)},[t,n])};var XLe="AlertDialog",[vWt,Srn]=PS(XLe,[OPe]),v2=OPe(),$Le=n=>{const{__scopeAlertDialog:e,...t}=n,r=v2(e);return Ve.jsx(rLe,{...r,...t,modal:!0})};$Le.displayName=XLe;var IWt="AlertDialogTrigger",CWt=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(tjt,{...i,...r,ref:e})});CWt.displayName=IWt;var EWt="AlertDialogPortal",eGe=n=>{const{__scopeAlertDialog:e,...t}=n,r=v2(e);return Ve.jsx(iLe,{...r,...t})};eGe.displayName=EWt;var _Wt="AlertDialogOverlay",tGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Hse,{...i,...r,ref:e})});tGe.displayName=_Wt;var r5="AlertDialogContent",[xWt,BWt]=vWt(r5),bWt=Mft("AlertDialogContent"),nGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:r,...i}=n,a=v2(t),o=nt.useRef(null),s=t1(e,o),l=nt.useRef(null);return Ve.jsx(ZKt,{contentName:r5,titleName:rGe,docsSlug:"alert-dialog",children:Ve.jsx(xWt,{scope:t,cancelRef:l,children:Ve.jsxs(Yse,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:Oh(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ve.jsx(bWt,{children:r}),Ve.jsx(wWt,{contentRef:o})]})})})});nGe.displayName=r5;var rGe="AlertDialogTitle",iGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Vse,{...i,...r,ref:e})});iGe.displayName=rGe;var aGe="AlertDialogDescription",oGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Kse,{...i,...r,ref:e})});oGe.displayName=aGe;var SWt="AlertDialogAction",sGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(aLe,{...i,...r,ref:e})});sGe.displayName=SWt;var lGe="AlertDialogCancel",cGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,{cancelRef:i}=BWt(lGe,t),a=v2(t),o=t1(e,i);return Ve.jsx(aLe,{...a,...r,ref:o})});cGe.displayName=lGe;var wWt=({contentRef:n})=>{const e=`\`${r5}\` requires a description for the component to be accessible for screen reader users.
|
|
13678
|
+
*/const LLe=Symbol("Comlink.proxy"),tWt=Symbol("Comlink.endpoint"),GLe=Symbol("Comlink.releaseProxy"),lle=Symbol("Comlink.finalizer"),UG=Symbol("Comlink.thrown"),OLe=n=>typeof n=="object"&&n!==null||typeof n=="function",nWt={canHandle:n=>OLe(n)&&n[LLe],serialize(n){const{port1:e,port2:t}=new MessageChannel;return HLe(n,e),[t,[t]]},deserialize(n){return n.start(),VLe(n)}},rWt={canHandle:n=>OLe(n)&&UG in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},zLe=new Map([["proxy",nWt],["throw",rWt]]);function iWt(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function HLe(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!iWt(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:o,path:s}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(x9);let c;try{const u=s.slice(0,-1).reduce((d,h)=>d[h],n),A=s.reduce((d,h)=>d[h],n);switch(o){case"GET":c=A;break;case"SET":u[s.slice(-1)[0]]=x9(i.data.value),c=!0;break;case"APPLY":c=A.apply(u,l);break;case"CONSTRUCT":{const d=new A(...l);c=WLe(d)}break;case"ENDPOINT":{const{port1:d,port2:h}=new MessageChannel;HLe(n,h),c=cWt(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[UG]:0}}Promise.resolve(c).catch(u=>({value:u,[UG]:0})).then(u=>{const[A,d]=GG(u);e.postMessage(Object.assign(Object.assign({},A),{id:a}),d),o==="RELEASE"&&(e.removeEventListener("message",r),YLe(e),lle in n&&typeof n[lle]=="function"&&n[lle]())}).catch(u=>{const[A,d]=GG({value:new TypeError("Unserializable return value"),[UG]:0});e.postMessage(Object.assign(Object.assign({},A),{id:a}),d)})}),e.start&&e.start()}function aWt(n){return n.constructor.name==="MessagePort"}function YLe(n){aWt(n)&&n.close()}function VLe(n,e){const t=new Map;return n.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const o=t.get(a.id);if(o)try{o(a)}finally{t.delete(a.id)}}),cle(n,t,[],e)}function FG(n){if(n)throw new Error("Proxy has been released and is not useable")}function KLe(n){return n5(n,new Map,{type:"RELEASE"}).then(()=>{YLe(n)})}const PG=new WeakMap,LG="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(PG.get(n)||0)-1;PG.set(n,e),e===0&&KLe(n)});function oWt(n,e){const t=(PG.get(e)||0)+1;PG.set(e,t),LG&&LG.register(n,e,n)}function sWt(n){LG&&LG.unregister(n)}function cle(n,e,t=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(o,s){if(FG(i),s===GLe)return()=>{sWt(a),KLe(n),e.clear(),i=!0};if(s==="then"){if(t.length===0)return{then:()=>a};const l=n5(n,e,{type:"GET",path:t.map(c=>c.toString())}).then(x9);return l.then.bind(l)}return cle(n,e,[...t,s])},set(o,s,l){FG(i);const[c,u]=GG(l);return n5(n,e,{type:"SET",path:[...t,s].map(A=>A.toString()),value:c},u).then(x9)},apply(o,s,l){FG(i);const c=t[t.length-1];if(c===tWt)return n5(n,e,{type:"ENDPOINT"}).then(x9);if(c==="bind")return cle(n,e,t.slice(0,-1));const[u,A]=jLe(l);return n5(n,e,{type:"APPLY",path:t.map(d=>d.toString()),argumentList:u},A).then(x9)},construct(o,s){FG(i);const[l,c]=jLe(s);return n5(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:l},c).then(x9)}});return oWt(a,n),a}function lWt(n){return Array.prototype.concat.apply([],n)}function jLe(n){const e=n.map(GG);return[e.map(t=>t[0]),lWt(e.map(t=>t[1]))]}const JLe=new WeakMap;function cWt(n,e){return JLe.set(n,e),n}function WLe(n){return Object.assign(n,{[LLe]:!0})}function GG(n){for(const[e,t]of zLe)if(t.canHandle(n)){const[r,i]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:n},JLe.get(n)||[]]}function x9(n){switch(n.type){case"HANDLER":return zLe.get(n.name).deserialize(n.value);case"RAW":return n.value}}function n5(n,e,t,r){return new Promise(i=>{const a=uWt();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}function uWt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var AWt=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(s){console.warn("[Worker] Error killing previous global worker instance:",s),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const s=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,l=await fetch(s).then(c=>c.blob());t=URL.createObjectURL(l)}const r=new Worker(t,{type:"module"}),i=VLe(r);n.snippetsApiBaseUrl&&await i.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl);let a=!1;const o={clearEventListeners:i.clearEventListeners.bind(i),execute:async(...s)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't execute");return i.execute.bind(i)(...s)},executeWithFsMap:async(...s)=>{if(a)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return i.executeWithFsMap.bind(i)(...s)},renderUntilSettled:i.renderUntilSettled.bind(i),getCircuitJson:i.getCircuitJson.bind(i),on:(s,l)=>{const c=WLe(l);i.on(s,c)},kill:async()=>{i[GLe](),r.terminate(),a=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===o&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=o,o};const qLe=n=>{const e={};if(!n)return e;for(const r of Fx)e[r]=0;const t=new Map;for(const r of n){const[,,i,a]=r.type.split(":");if(a==="start"){t.set(`${i}:${r.renderId}`,r);continue}if(a==="end"){const o=t.get(`${i}:${r.renderId}`);if(o){const s=r.createdAt-o.createdAt;e[i]=(e[i]||0)+s}}}return e},dWt=(n,e)=>{const t={};for(const[r,i]of n.entries()){const a=e.get(r);a!==i&&(t[r]={old:i,new:a})}for(const[r,i]of e.entries())n.has(r)||(t[r]={old:void 0,new:i});return t},ZLe=qme()(Zme(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"}));function fWt(){const n=nt.useRef(Promise.resolve()),e=nt.useRef(!1),t=nt.useRef(null),r=nt.useCallback(async o=>{await n.current;const s={cancelled:!1};t.current=s;let l;const c=new Promise(u=>{l=u});try{return n.current=c,e.current=!0,await o()}catch(u){if(!s.cancelled)throw u}finally{e.current=!1,t.current=null,l()}},[]),i=nt.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),a=nt.useCallback(()=>e.current,[]);return{runWithMutex:r,isLocked:a,cancel:i}}const hWt=26,kw=b1("run-frame:RunFrame"),gWt=n=>{const[e,t]=tb(re=>[re.circuitJson,re.setCircuitJson]),[r,i]=nt.useState(null),a=nt.useRef(null),[o,s]=nt.useState(null),[l,c]=nt.useReducer((re,ce)=>re+1,0),u=ZLe(re=>re.setLastRunEvalVersion),A=nt.useRef(0),d=fWt(),[h,m]=nt.useState(!1);nt.useEffect(()=>{const re=ce=>{(ce.ctrlKey||ce.metaKey)&&ce.key==="Enter"&&!h&&c(1)};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[h]);const[_,C]=nt.useState(null),[E,x]=nt.useState({}),[w,k]=nt.useState(n.defaultActiveTab??"pcb");nt.useEffect(()=>{n.debug&&b1.enable("run-frame*")},[n.debug]);const G=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((re,[ce,pe])=>re.set(ce,pe),new Map),P=nt.useRef(null),V=nt.useRef(null);nt.useEffect(()=>{const re=G instanceof Map?Object.fromEntries(G.entries()):G;if(!re||Object.keys(re).length===0){i({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const ce=n.showRunButton&&l!==A.current;if(P.current&&e){const Ae=dWt(P.current,G);if(Object.keys(Ae).length>0)kw("code changes detected");else if(V.current!==n.entrypoint)kw("render triggered by entrypoint change");else if(!ce){kw("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&l===A.current)return;P.current=G,V.current=n.entrypoint??null,A.current=l,m(!0);const pe=async()=>{var $e,lt,pt,Ut,Mt,qe;kw("running render worker"),i(null),C(null);const Ae={progress:0};let he=!1;a.current=()=>{he=!0};let Ce=n.evalVersion??"latest";if(!globalThis.runFrameWorker&&n.forceLatestEvalVersion)try{const It=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(It.ok){const Ct=await It.json();($e=Ct.tags)!=null&&$e.latest&&(Ce=Ct.tags.latest,u(Ce))}}catch{}const ye=globalThis.runFrameWorker??await AWt({evalVersion:Ce,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0});globalThis.runFrameWorker=ye,(lt=n.onRenderStarted)==null||lt.call(n);const Me=G instanceof Map?Object.fromEntries(G.entries()):G;let Se=Date.now();if(ye.on("autorouting:start",It=>{x({...E,[It.componentDisplayName]:{simpleRouteJson:It.simpleRouteJson}})}),ye.on("board:renderPhaseStarted",It=>{Ae.lastRenderEvent=It,Ae.eventsProcessed=(Ae.eventsProcessed??0)+1;const Ct=Fx.indexOf(It.phase)/hWt*.75+Ae.eventsProcessed/1e3*.25,Et=1-Math.exp(-Ct*3);Ae.progress=Et,he||C({...Ae})}),w==="render_log"&&ye.on("renderable:renderLifecycle:anyEvent",It=>{Ae.renderEvents=Ae.renderEvents??[],It.createdAt=Date.now(),Ae.renderEvents.push(It),Date.now()-Se>500&&(Ae.phaseTimings=qLe(Ae.renderEvents??[]),Se=Date.now()),he||C({...Ae})}),ye.on("autorouting:progress",It=>{s(It.debugGraphics)}),!(await ye.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Me,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(It=>{var Et;const Ct=It.message.replace("Error: ","");return(Et=n.onError)==null||Et.call(n,It),i({error:Ct,stack:It.stack}),C(null),console.error(It),{success:!1}})).success){m(!1);return}const Qe=ye.renderUntilSettled();kw("waiting for initial circuit json...");let ze=await ye.getCircuitJson().catch(It=>{var Ct;return kw("error getting initial circuit json",It),(Ct=n.onError)==null||Ct.call(n,It),i({error:It.message,stack:It.stack}),C(null),m(!1),null});ze&&(kw("got initial circuit json"),t(ze),(pt=n.onCircuitJsonChange)==null||pt.call(n,ze),(Ut=n.onInitialRender)==null||Ut.call(n,{circuitJson:ze}),await Qe,kw("getting final circuit json"),ze=await ye.getCircuitJson(),(Mt=n.onCircuitJsonChange)==null||Mt.call(n,ze),t(ze),(qe=n.onRenderFinished)==null||qe.call(n,{circuitJson:ze}),s({}),w==="render_log"&&(Ae.phaseTimings=qLe(Ae.renderEvents??[])),Ae.progress=1,he||C({...Ae}),m(!1),a.current=null)};d.runWithMutex(pe)},[n.fsMap,n.entrypoint,l,n.evalVersion]);const O=nt.useRef(null),W=nt.useRef(null),H=re=>{if(!re||re===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}re.in_progress?(O.current=re,W.current&&(clearTimeout(W.current),W.current=null)):(W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{var pe;const ce=re||O.current;(pe=n.onEditEvent)==null||pe.call(n,ce),O.current=null,W.current=null},100))},ae=async(re,ce)=>{let pe="";try{pe=window.location.pathname||""}catch{}const Ae=pe?`${pe} - ${re}`:re;await sle.post("autorouting/bug_reports/create",{json:{title:Ae,simple_route_json:ce.simpleRouteJson}}).json().then(({autorouting_bug_report:he})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${he.autorouting_bug_report_id}`,"_blank")}).catch(he=>{console.error("Failed to report autorouting bug",he),he.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${he.message}`)})};return Ve.jsx(YKt,{code:G.get(n.entrypoint??n.mainComponentPath),defaultActiveTab:n.defaultActiveTab,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:o,autoroutingLog:E,onReportAutoroutingLog:n.onReportAutoroutingLog||ae,leftHeaderContent:Ve.jsxs(Ve.Fragment,{children:[n.showRunButton&&Ve.jsxs("div",{className:"rf-relative rf-inline-flex",children:[Ve.jsxs("button",{type:"button",onClick:()=>{c(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:h,children:["Run"," ",h?Ve.jsx(M3,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):Ve.jsx(KTe,{className:"rf-w-3 rf-h-3"})]}),h&&Ve.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:Ve.jsx(__,{onClick:re=>{re.stopPropagation(),m(!1),C(null),i(null),a.current&&(a.current(),a.current=null),d.cancel(),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:Ve.jsx(iPt,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.leftHeaderContent]}),onActiveTabChange:k,circuitJson:e,renderLog:_,isRunningCode:h,errorMessage:r==null?void 0:r.error,errorStack:r==null?void 0:r.stack,onEditEvent:H,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen})};function pWt(n,e){const[t,r]=nt.useState(()=>{try{const i=window.localStorage.getItem(n);return i?JSON.parse(i):e}catch(i){return console.error("Error reading from localStorage:",i),e}});return nt.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(i){console.error("Error writing to localStorage:",i)}},[n,t]),[t,r]}const mWt=({snippetNames:n,onSelect:e,onCancel:t,isOpen:r})=>{const[i,a]=nt.useState(""),[o,s]=nt.useState("");if(!r)return null;const l=n.filter(A=>A.toLowerCase().includes(o.toLowerCase())),c=o&&!n.includes(o),u=A=>{A.key==="Enter"&&(l.length===1?a(l[0]):c&&a(o))};return Ve.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:Ve.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[Ve.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),Ve.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:o,onChange:A=>s(A.target.value),onKeyDown:u}),Ve.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[l.map(A=>Ve.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${i===A?"bg-blue-50":""}`,onClick:()=>a(A),children:A},A)),c&&Ve.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${i===o?"bg-blue-50":""}`,onClick:()=>a(o),children:['Create new "',o,'"']})]}),Ve.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[Ve.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),Ve.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:()=>i&&e(i),disabled:!i,children:i===o?`Create "${i}"`:`Save to ${i}`})]})]})})},yWt=n=>{const e=nt.useRef(null),t=tb(r=>r.recentEvents);nt.useEffect(()=>{if(t.length===0)return;const r=t[0];r.event_id!==e.current&&(n(r),e.current=r.event_id)},[t,n])};var XLe="AlertDialog",[vWt,Srn]=PS(XLe,[OPe]),v2=OPe(),$Le=n=>{const{__scopeAlertDialog:e,...t}=n,r=v2(e);return Ve.jsx(rLe,{...r,...t,modal:!0})};$Le.displayName=XLe;var IWt="AlertDialogTrigger",CWt=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(tjt,{...i,...r,ref:e})});CWt.displayName=IWt;var EWt="AlertDialogPortal",eGe=n=>{const{__scopeAlertDialog:e,...t}=n,r=v2(e);return Ve.jsx(iLe,{...r,...t})};eGe.displayName=EWt;var _Wt="AlertDialogOverlay",tGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Hse,{...i,...r,ref:e})});tGe.displayName=_Wt;var r5="AlertDialogContent",[xWt,BWt]=vWt(r5),bWt=Mft("AlertDialogContent"),nGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,children:r,...i}=n,a=v2(t),o=nt.useRef(null),s=t1(e,o),l=nt.useRef(null);return Ve.jsx(ZKt,{contentName:r5,titleName:rGe,docsSlug:"alert-dialog",children:Ve.jsx(xWt,{scope:t,cancelRef:l,children:Ve.jsxs(Yse,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:Oh(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[Ve.jsx(bWt,{children:r}),Ve.jsx(wWt,{contentRef:o})]})})})});nGe.displayName=r5;var rGe="AlertDialogTitle",iGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Vse,{...i,...r,ref:e})});iGe.displayName=rGe;var aGe="AlertDialogDescription",oGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(Kse,{...i,...r,ref:e})});oGe.displayName=aGe;var SWt="AlertDialogAction",sGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,i=v2(t);return Ve.jsx(aLe,{...i,...r,ref:e})});sGe.displayName=SWt;var lGe="AlertDialogCancel",cGe=nt.forwardRef((n,e)=>{const{__scopeAlertDialog:t,...r}=n,{cancelRef:i}=BWt(lGe,t),a=v2(t),o=t1(e,i);return Ve.jsx(aLe,{...a,...r,ref:o})});cGe.displayName=lGe;var wWt=({contentRef:n})=>{const e=`\`${r5}\` requires a description for the component to be accessible for screen reader users.
|
|
13679
13679
|
|
|
13680
13680
|
You can add a description to the \`${r5}\` by passing a \`${aGe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
13681
13681
|
|