@tscircuit/runframe 0.0.244 → 0.0.245

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.
@@ -988,7 +988,7 @@ var RenderLogViewer = ({
988
988
  };
989
989
 
990
990
  // package.json
991
- var version = "0.0.243";
991
+ var version = "0.0.244";
992
992
 
993
993
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
994
994
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
package/dist/preview.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CircuitJsonPreview
3
- } from "./chunk-6SAUSVG3.js";
3
+ } from "./chunk-2CFC43UC.js";
4
4
  export {
5
5
  CircuitJsonPreview
6
6
  };
package/dist/runner.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  DropdownMenuTrigger,
12
12
  buttonVariants,
13
13
  cn
14
- } from "./chunk-6SAUSVG3.js";
14
+ } from "./chunk-2CFC43UC.js";
15
15
 
16
16
  // lib/components/RunFrame/RunFrame.tsx
17
17
  import { createCircuitWebWorker } from "@tscircuit/eval";
@@ -13341,4 +13341,4 @@ ${n.slice(0,2e3)}
13341
13341
  50% { opacity: 0.2; }
13342
13342
  100% { opacity: 0.6; }
13343
13343
  }
13344
- `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[r,t,e,n])},vDt=({circuitJson:r,containerStyle:e,editEvents:t=[],onEditEvent:n,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1})=>{s&&uDt();const[l,c]=wt.useState(i),u=wt.useRef(null),{ref:f,cancelDrag:y,transform:_}=HAe({onSetTransform($){u.current&&(u.current.style.transform=aE($))}}),{containerWidth:x,containerHeight:M}=lDt(f),w=wt.useMemo(()=>!x||!M?"":Tre(r,{width:x,height:M||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[r,x,M]),T=wt.useMemo(()=>{var Q;if(!w)return Q_();const $=(Q=w.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Q[1];try{return hk($)}catch(te){return console.error(te),Q_()}},[w]),{handleMouseDown:L,isDragging:O,activeEditEvent:B}=hDt({onEditEvent:n,cancelDrag:y,realToSvgProjection:T,svgToScreenProjection:_,circuitJson:r,editEvents:t,enabled:l});pDt({svgDivRef:u,editEvents:t,realToSvgProjection:T,svgToScreenProjection:_,activeEditEvent:B}),mDt({svgDivRef:u,circuitJson:r,activeEditEvent:B,editEvents:t});const W=wt.useMemo(()=>ft.jsx("div",{ref:u,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:w}}),[w]);return ft.jsxs("div",{ref:f,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:O?"grabbing":"grab",minHeight:"300px",...e},onMouseDown:L,children:[o&&ft.jsx(sDt,{active:l,onClick:()=>c(!l)}),W]})},yDt=r=>{const[e,t]=wt.useState(0),[n,i]=wt.useState(0);return wt.useEffect(()=>{if(!r.current)return;const a=()=>{var l;const s=(l=r.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(r.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:n}};J2("assembly-viewer");var gDt=()=>{J2.enable("assembly-viewer*")},_Dt=({circuitJson:r,containerStyle:e,debugGrid:t=!1,debug:n=!1})=>{n&&gDt();const i=wt.useRef(null),{ref:a}=HAe({onSetTransform(u){i.current&&(i.current.style.transform=aE(u))}}),{containerWidth:o,containerHeight:s}=yDt(a),l=wt.useMemo(()=>!o||!s?"":QDe(r,{width:o,height:s||720}),[r,o,s]);wt.useMemo(()=>{var f;if(!l)return Q_();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return hk(u)}catch(y){return console.error(y),Q_()}},[l]);const c=wt.useMemo(()=>ft.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return ft.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const Rw=({onRunClicked:r})=>ft.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",r&&ft.jsxs(V4,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:r,children:["Run Code",ft.jsx(a8t,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),AU=({text:r,onClick:e})=>ft.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:r}),NU=r=>{var e;return ft.jsxs("div",{className:"rf-leading-5",children:[ft.jsx("div",{className:"rf-py-2 rf-font-bold",children:r.column.name}),ft.jsx("div",{children:((e=r.field)==null?void 0:e.call(r))??ft.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var n;(n=r.onTextChange)==null||n.call(r,t.target.value)}})})]})},xDt=({open:r,children:e,title:t,onClose:n})=>r?ft.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:n,children:ft.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[ft.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),ft.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:n,children:"×"}),e]})}):null,bDt=({elements:r})=>{const[e,t]=wt.useState({open:!1}),[n,i]=wt.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(r.map(u=>u.type))],o=r.map(u=>{const f=u[`${u.type}_id`],y=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),_=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:y,..._,_og_elm:u}}),s=o.map(u=>{let f="";const y=_=>{const x=Object.keys(_.other_ids).find(T=>T.startsWith("source_"));if(!x)return`.${_.name}`;const M=x.slice(0,-3),w=o.find(T=>T.type===M&&T.primary_id===_.other_ids[x]);return w?"name"in w?`${y(w)} > .${_.name}`:`#${w.primary_id} > .${_.name}`:`??? > .${_.name}`};return"name"in u&&(f=y(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>ft.jsxs("div",{className:"rf-flex rf-items-center",children:[ft.jsx(AU,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),ft.jsx("span",{className:"rf-flex-grow"}),ft.jsx(AU,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({id_search:f}),field:n.focused_id?()=>ft.jsxs("div",{children:["Focus:"," ",ft.jsx("span",{className:"rf-underline",children:n.focused_id}),ft.jsx(AU,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>ft.jsx(NU,{column:u,field:()=>ft.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[ft.jsx("option",{value:"any",children:"any"},"any"),ft.jsx("option",{value:"source",children:"source"},"source"),ft.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),ft.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>ft.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>ft.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,y])=>ft.jsx(AU,{text:y,onClick:()=>i({focused_id:y})},y))})}],c=s.filter(u=>{var f,y;return n.name_search?(y=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:y.includes(n.name_search.toLowerCase()):!0}).filter(u=>{var f;return!n.component_type_filter||n.component_type_filter==="any"?!0:n.component_type_filter==="source"?u.type.startsWith("source_"):n.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):n.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(n.component_type_filter)}).filter(u=>n.selector_search?n.selector_search.split(" ").filter(y=>y.length>0).every(y=>{var _;return(_=u.selector_path)==null?void 0:_.includes(y)}):!0).filter(u=>{var f;return n.id_search?(f=u.primary_id)==null?void 0:f.includes(n.id_search):!0}).filter(u=>!!(!n.focused_id||u.primary_id===n.focused_id||Object.values(u.other_ids).includes(n.focused_id)));return ft.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[ft.jsx("div",{className:"rf-overflow-x-auto",children:ft.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[ft.jsx("thead",{children:ft.jsx("tr",{children:l.map(u=>ft.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),ft.jsx("tbody",{children:c.map((u,f)=>ft.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(y=>ft.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:y.renderCell?y.renderCell(u):u[y.key]},y.key))},f))})]})}),ft.jsx(xDt,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:ft.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:ft.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},SDt=(r,e)=>r==="jlcpcb"?ft.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,EDt=({circuitJson:r})=>{const e=r.filter(n=>n.type==="source_component"),t=new Set;for(const n of e)if(n.supplier_part_numbers)for(const i of Object.keys(n.supplier_part_numbers))t.add(i);return ft.jsx("div",{className:"rf-overflow-x-auto",children:ft.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[ft.jsx("thead",{children:ft.jsxs("tr",{className:"rf-border-b",children:[ft.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(n=>ft.jsx("th",{className:"rf-p-2 rf-capitalize",children:n},n))]})}),ft.jsx("tbody",{children:e.map(n=>ft.jsxs("tr",{className:"rf-border-b",children:[ft.jsx("td",{className:"rf-p-2",children:n.name}),Array.from(t).map(i=>{var a,o;return ft.jsx("td",{className:"rf-p-2",children:SDt(i,((o=(a=n.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},n.source_component_id))})]})})},wDt=({containerClassName:r,...e})=>{const t=wt.useRef(null),[n,i]=wt.useState(620);return wt.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)}},[]),ft.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:ft.jsx(jwt,{...e,height:n})})},TDt='*,: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-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.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-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.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-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-4{margin-top:1rem}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.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-2{height:.5rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-60{height:15rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-max-h-\\[500px\\]{max-height:500px}.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-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[8rem\\]{min-width:8rem}.rf-max-w-2xl{max-width:42rem}.rf-max-w-lg{max-width:32rem}.rf-max-w-xl{max-width:36rem}.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-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-place-items-center{place-items:center}.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-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-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}.rf-overflow-x-hidden{overflow-x:hidden}.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-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-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/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-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-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-blue-600\\/70{background-color:rgba(37,99,235,.7)}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/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-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-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.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-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-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-p-0{padding:0}.rf-p-0\\.5{padding:.125rem}.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-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.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-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.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-2{padding-bottom:.5rem;padding-top:.5rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.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-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.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-tracking-widest{letter-spacing:.1em}.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-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-green-500{--tw-text-opacity:1;color:rgb(34 197 94/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-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-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-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-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-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-offset-white{--tw-ring-offset-color:#fff}.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}@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}.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-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.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-bg-blue-600\\/60:disabled{background-color:rgba(37,99,235,.6)}.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-\\[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\\=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-\\[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-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-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\\=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))}@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}}.\\[\\&\\>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}',MDt=()=>{wt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=TDt,document.head.appendChild(e)},[])},rLe=r=>`hsl(${O3.indexOf(r)*137.5%360}, 70%, 50%)`,CDt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return ft.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ft.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:O3.map(t=>{const n=r[t]||0,i=n/e*100;return ft.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:rLe(t)},children:ft.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)})}),ft.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},RDt=({renderLog:r})=>{const[e,t]=wt.useState("chronological");if(!r)return ft.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)=>O3.indexOf(a[0])-O3.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return ft.jsxs("div",{className:"rf-bg-white",children:[ft.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[ft.jsx("div",{children:"Render Logs"}),ft.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[ft.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ft.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:[ft.jsx("option",{value:"chronological",children:"Phase Order"}),ft.jsx("option",{value:"longest",children:"Duration"})]})]})]}),ft.jsx(CDt,{phaseTimings:r.phaseTimings}),ft.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ft.jsx("thead",{children:ft.jsxs("tr",{children:[ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ft.jsx("tbody",{children:n.map(([a,o])=>ft.jsxs("tr",{children:[ft.jsx("td",{className:"rf-p-2",children:O3.indexOf(a)}),ft.jsx("td",{className:"rf-p-2",children:a}),ft.jsx("td",{className:"rf-p-2",children:ft.jsx("div",{className:"rf-w-8",children:ft.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:rLe(a),width:`${o/i*100}%`}})})}),ft.jsx("td",{className:"rf-p-2",children:ft.jsxs("div",{className:"rf-flex w-full",children:[ft.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),ft.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},ADt="0.0.243",NDt=["assembly","bom","circuit_json","errors","render_log"],PDt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJsonKey:n="",circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:f,renderLog:y,showImportAndFormatButtons:_=!0,className:x,headerClassName:M,leftHeaderContent:w,readOnly:T,isStreaming:L,autoroutingLog:O,onReportAutoroutingLog:B,isRunningCode:W,hasCodeChangedSinceLastRun:$,onEditEvent:Q,editEvents:te,defaultActiveTab:ae,autoRotate3dViewerDisabled:K,showSchematicDebugGrid:pe=!1,showToggleFullScreen:ve=!0})=>{var je;MDt();const[be,Pe]=wt.useState(ae??"pcb"),[Oe,we]=wt.useState(!1),Le=wt.useCallback(ze=>{Pe(ze),f==null||f(ze)},[f]),Me=()=>{we(!Oe)};return wt.useEffect(()=>{t&&Le("errors")},[t]),wt.useEffect(()=>{(be==="code"||be==="errors")&&i&&!t&&Le(ae??"pcb")},[i]),ft.jsx("div",{className:Yg("flex flex-col relative rf-overflow-x-hidden",x),children:ft.jsx("div",{className:Yg("rf-md:sticky rf-md:top-2",Oe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:ft.jsxs(aIe,{value:be,onValueChange:Le,className:"rf-flex-grow rf-flex rf-flex-col",children:[ft.jsxs("div",{className:Yg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",M),children:[w,w&&ft.jsx("div",{className:"rf-flex-grow"}),!w&&W&&ft.jsx(RCe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&ft.jsx("div",{className:"rf-flex-grow"}),y&&y.progress!==1&&ft.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[y.lastRenderEvent&&ft.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(je=y.lastRenderEvent)==null?void 0:je.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),ft.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:ft.jsx(RCe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),ft.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((y.progress??0)*100).toFixed(1),"%"]})]}),o&&ft.jsxs(Pae,{children:[s&&ft.jsx(Vw,{value:"code",children:"Code"}),ft.jsxs(Vw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&ft.jsx("span",{className:Yg("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),ft.jsxs(Vw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&ft.jsx("span",{className:Yg("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),ft.jsxs(Vw,{value:"cad",children:[i&&ft.jsx("span",{className:Yg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(be)&&ft.jsx(Vw,{value:be,children:Nae(be)}),ft.jsxs(kAe,{children:[ft.jsx(FAe,{asChild:!0,children:ft.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[ft.jsx(n8t,{className:"rf-w-4 rf-h-4"}),t&&ft.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"})]})}),ft.jsxs(lne,{className:"rf-*:text-xs",children:[NDt.map(ze=>ft.jsxs(Tz,{onSelect:()=>Le(ze),children:[be!==ze&&ft.jsx(CCe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),be===ze&&ft.jsx(MCe,{className:"rf-w-3 rf-h-3"}),ft.jsx("div",{className:"rf-pr-2",children:Nae(ze)}),ze==="errors"&&t&&ft.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:"1"})]},ze)),ft.jsx(Tz,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ft.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",ADt.split(".").map((ze,Ve)=>Ve===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),ve&&ft.jsx(V4,{onClick:Me,variant:"ghost",children:Oe?ft.jsx(i8t,{size:16}):ft.jsx(r8t,{size:16})})]}),s&&ft.jsx(Pb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:ft.jsx("div",{className:"rf-h-full",children:l})}),ft.jsx(Pb,{value:"pcb",children:ft.jsx("div",{className:Yg("rf-overflow-hidden",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),ft.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?ft.jsx(wDt,{disableAutoFocus:!0,focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Yg("rf-h-full rf-w-full",Oe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Q&&ze.forEach(Ve=>Q(Ve))}},n):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"assembly",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallback:ft.jsx("div",{children:"Error loading Assembly"}),children:i?ft.jsx(_Dt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"schematic",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),ft.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?ft.jsx(vDt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>Q==null?void 0:Q(ze),editEvents:te,debugGrid:pe}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"cad",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{FallbackComponent:Vwt,children:i?ft.jsx(Rbt,{soup:i,autoRotateDisabled:K}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"bom",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),ft.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?ft.jsx(EDt,{circuitJson:i}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"circuit_json",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallback:ft.jsx("div",{children:"Error loading JSON viewer"}),children:i?ft.jsx(bDt,{elements:i}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"errors",children:i||t?ft.jsx(e7t,{code:r,errorMessage:t,autoroutingLog:O,onReportAutoroutingLog:B}):ft.jsx(Rw,{onRunClicked:e})}),u&&ft.jsx(Pb,{value:"render_log",children:ft.jsx(RDt,{renderLog:y})})]})})})};Kie.createRoot(document.getElementById("root")).render(ft.jsx(PDt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
13344
+ `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[r,t,e,n])},vDt=({circuitJson:r,containerStyle:e,editEvents:t=[],onEditEvent:n,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1})=>{s&&uDt();const[l,c]=wt.useState(i),u=wt.useRef(null),{ref:f,cancelDrag:y,transform:_}=HAe({onSetTransform($){u.current&&(u.current.style.transform=aE($))}}),{containerWidth:x,containerHeight:M}=lDt(f),w=wt.useMemo(()=>!x||!M?"":Tre(r,{width:x,height:M||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[r,x,M]),T=wt.useMemo(()=>{var Q;if(!w)return Q_();const $=(Q=w.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Q[1];try{return hk($)}catch(te){return console.error(te),Q_()}},[w]),{handleMouseDown:L,isDragging:O,activeEditEvent:B}=hDt({onEditEvent:n,cancelDrag:y,realToSvgProjection:T,svgToScreenProjection:_,circuitJson:r,editEvents:t,enabled:l});pDt({svgDivRef:u,editEvents:t,realToSvgProjection:T,svgToScreenProjection:_,activeEditEvent:B}),mDt({svgDivRef:u,circuitJson:r,activeEditEvent:B,editEvents:t});const W=wt.useMemo(()=>ft.jsx("div",{ref:u,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:w}}),[w]);return ft.jsxs("div",{ref:f,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:O?"grabbing":"grab",minHeight:"300px",...e},onMouseDown:L,children:[o&&ft.jsx(sDt,{active:l,onClick:()=>c(!l)}),W]})},yDt=r=>{const[e,t]=wt.useState(0),[n,i]=wt.useState(0);return wt.useEffect(()=>{if(!r.current)return;const a=()=>{var l;const s=(l=r.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(r.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:n}};J2("assembly-viewer");var gDt=()=>{J2.enable("assembly-viewer*")},_Dt=({circuitJson:r,containerStyle:e,debugGrid:t=!1,debug:n=!1})=>{n&&gDt();const i=wt.useRef(null),{ref:a}=HAe({onSetTransform(u){i.current&&(i.current.style.transform=aE(u))}}),{containerWidth:o,containerHeight:s}=yDt(a),l=wt.useMemo(()=>!o||!s?"":QDe(r,{width:o,height:s||720}),[r,o,s]);wt.useMemo(()=>{var f;if(!l)return Q_();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return hk(u)}catch(y){return console.error(y),Q_()}},[l]);const c=wt.useMemo(()=>ft.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return ft.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const Rw=({onRunClicked:r})=>ft.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",r&&ft.jsxs(V4,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:r,children:["Run Code",ft.jsx(a8t,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),AU=({text:r,onClick:e})=>ft.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:r}),NU=r=>{var e;return ft.jsxs("div",{className:"rf-leading-5",children:[ft.jsx("div",{className:"rf-py-2 rf-font-bold",children:r.column.name}),ft.jsx("div",{children:((e=r.field)==null?void 0:e.call(r))??ft.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var n;(n=r.onTextChange)==null||n.call(r,t.target.value)}})})]})},xDt=({open:r,children:e,title:t,onClose:n})=>r?ft.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:n,children:ft.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[ft.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),ft.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:n,children:"×"}),e]})}):null,bDt=({elements:r})=>{const[e,t]=wt.useState({open:!1}),[n,i]=wt.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(r.map(u=>u.type))],o=r.map(u=>{const f=u[`${u.type}_id`],y=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),_=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:y,..._,_og_elm:u}}),s=o.map(u=>{let f="";const y=_=>{const x=Object.keys(_.other_ids).find(T=>T.startsWith("source_"));if(!x)return`.${_.name}`;const M=x.slice(0,-3),w=o.find(T=>T.type===M&&T.primary_id===_.other_ids[x]);return w?"name"in w?`${y(w)} > .${_.name}`:`#${w.primary_id} > .${_.name}`:`??? > .${_.name}`};return"name"in u&&(f=y(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>ft.jsxs("div",{className:"rf-flex rf-items-center",children:[ft.jsx(AU,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),ft.jsx("span",{className:"rf-flex-grow"}),ft.jsx(AU,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({id_search:f}),field:n.focused_id?()=>ft.jsxs("div",{children:["Focus:"," ",ft.jsx("span",{className:"rf-underline",children:n.focused_id}),ft.jsx(AU,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>ft.jsx(NU,{column:u,field:()=>ft.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[ft.jsx("option",{value:"any",children:"any"},"any"),ft.jsx("option",{value:"source",children:"source"},"source"),ft.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),ft.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>ft.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>ft.jsx(NU,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>ft.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,y])=>ft.jsx(AU,{text:y,onClick:()=>i({focused_id:y})},y))})}],c=s.filter(u=>{var f,y;return n.name_search?(y=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:y.includes(n.name_search.toLowerCase()):!0}).filter(u=>{var f;return!n.component_type_filter||n.component_type_filter==="any"?!0:n.component_type_filter==="source"?u.type.startsWith("source_"):n.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):n.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(n.component_type_filter)}).filter(u=>n.selector_search?n.selector_search.split(" ").filter(y=>y.length>0).every(y=>{var _;return(_=u.selector_path)==null?void 0:_.includes(y)}):!0).filter(u=>{var f;return n.id_search?(f=u.primary_id)==null?void 0:f.includes(n.id_search):!0}).filter(u=>!!(!n.focused_id||u.primary_id===n.focused_id||Object.values(u.other_ids).includes(n.focused_id)));return ft.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[ft.jsx("div",{className:"rf-overflow-x-auto",children:ft.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[ft.jsx("thead",{children:ft.jsx("tr",{children:l.map(u=>ft.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),ft.jsx("tbody",{children:c.map((u,f)=>ft.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(y=>ft.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:y.renderCell?y.renderCell(u):u[y.key]},y.key))},f))})]})}),ft.jsx(xDt,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:ft.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:ft.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},SDt=(r,e)=>r==="jlcpcb"?ft.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,EDt=({circuitJson:r})=>{const e=r.filter(n=>n.type==="source_component"),t=new Set;for(const n of e)if(n.supplier_part_numbers)for(const i of Object.keys(n.supplier_part_numbers))t.add(i);return ft.jsx("div",{className:"rf-overflow-x-auto",children:ft.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[ft.jsx("thead",{children:ft.jsxs("tr",{className:"rf-border-b",children:[ft.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(n=>ft.jsx("th",{className:"rf-p-2 rf-capitalize",children:n},n))]})}),ft.jsx("tbody",{children:e.map(n=>ft.jsxs("tr",{className:"rf-border-b",children:[ft.jsx("td",{className:"rf-p-2",children:n.name}),Array.from(t).map(i=>{var a,o;return ft.jsx("td",{className:"rf-p-2",children:SDt(i,((o=(a=n.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},n.source_component_id))})]})})},wDt=({containerClassName:r,...e})=>{const t=wt.useRef(null),[n,i]=wt.useState(620);return wt.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)}},[]),ft.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:ft.jsx(jwt,{...e,height:n})})},TDt='*,: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-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.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-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.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-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-4{margin-top:1rem}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.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-2{height:.5rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-60{height:15rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-max-h-\\[500px\\]{max-height:500px}.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-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[8rem\\]{min-width:8rem}.rf-max-w-2xl{max-width:42rem}.rf-max-w-lg{max-width:32rem}.rf-max-w-xl{max-width:36rem}.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-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-place-items-center{place-items:center}.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-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-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}.rf-overflow-x-hidden{overflow-x:hidden}.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-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-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/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-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-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-blue-600\\/70{background-color:rgba(37,99,235,.7)}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/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-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-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.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-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-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-p-0{padding:0}.rf-p-0\\.5{padding:.125rem}.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-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.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-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.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-2{padding-bottom:.5rem;padding-top:.5rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.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-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.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-tracking-widest{letter-spacing:.1em}.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-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-green-500{--tw-text-opacity:1;color:rgb(34 197 94/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-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-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-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-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-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-offset-white{--tw-ring-offset-color:#fff}.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}@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}.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-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.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-bg-blue-600\\/60:disabled{background-color:rgba(37,99,235,.6)}.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-\\[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\\=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-\\[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-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-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\\=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))}@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}}.\\[\\&\\>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}',MDt=()=>{wt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=TDt,document.head.appendChild(e)},[])},rLe=r=>`hsl(${O3.indexOf(r)*137.5%360}, 70%, 50%)`,CDt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return ft.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ft.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:O3.map(t=>{const n=r[t]||0,i=n/e*100;return ft.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:rLe(t)},children:ft.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)})}),ft.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},RDt=({renderLog:r})=>{const[e,t]=wt.useState("chronological");if(!r)return ft.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)=>O3.indexOf(a[0])-O3.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return ft.jsxs("div",{className:"rf-bg-white",children:[ft.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[ft.jsx("div",{children:"Render Logs"}),ft.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[ft.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ft.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:[ft.jsx("option",{value:"chronological",children:"Phase Order"}),ft.jsx("option",{value:"longest",children:"Duration"})]})]})]}),ft.jsx(CDt,{phaseTimings:r.phaseTimings}),ft.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ft.jsx("thead",{children:ft.jsxs("tr",{children:[ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ft.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ft.jsx("tbody",{children:n.map(([a,o])=>ft.jsxs("tr",{children:[ft.jsx("td",{className:"rf-p-2",children:O3.indexOf(a)}),ft.jsx("td",{className:"rf-p-2",children:a}),ft.jsx("td",{className:"rf-p-2",children:ft.jsx("div",{className:"rf-w-8",children:ft.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:rLe(a),width:`${o/i*100}%`}})})}),ft.jsx("td",{className:"rf-p-2",children:ft.jsxs("div",{className:"rf-flex w-full",children:[ft.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),ft.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},ADt="0.0.244",NDt=["assembly","bom","circuit_json","errors","render_log"],PDt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJsonKey:n="",circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:f,renderLog:y,showImportAndFormatButtons:_=!0,className:x,headerClassName:M,leftHeaderContent:w,readOnly:T,isStreaming:L,autoroutingLog:O,onReportAutoroutingLog:B,isRunningCode:W,hasCodeChangedSinceLastRun:$,onEditEvent:Q,editEvents:te,defaultActiveTab:ae,autoRotate3dViewerDisabled:K,showSchematicDebugGrid:pe=!1,showToggleFullScreen:ve=!0})=>{var je;MDt();const[be,Pe]=wt.useState(ae??"pcb"),[Oe,we]=wt.useState(!1),Le=wt.useCallback(ze=>{Pe(ze),f==null||f(ze)},[f]),Me=()=>{we(!Oe)};return wt.useEffect(()=>{t&&Le("errors")},[t]),wt.useEffect(()=>{(be==="code"||be==="errors")&&i&&!t&&Le(ae??"pcb")},[i]),ft.jsx("div",{className:Yg("flex flex-col relative rf-overflow-x-hidden",x),children:ft.jsx("div",{className:Yg("rf-md:sticky rf-md:top-2",Oe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:ft.jsxs(aIe,{value:be,onValueChange:Le,className:"rf-flex-grow rf-flex rf-flex-col",children:[ft.jsxs("div",{className:Yg("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",M),children:[w,w&&ft.jsx("div",{className:"rf-flex-grow"}),!w&&W&&ft.jsx(RCe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&ft.jsx("div",{className:"rf-flex-grow"}),y&&y.progress!==1&&ft.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[y.lastRenderEvent&&ft.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(je=y.lastRenderEvent)==null?void 0:je.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),ft.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:ft.jsx(RCe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),ft.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((y.progress??0)*100).toFixed(1),"%"]})]}),o&&ft.jsxs(Pae,{children:[s&&ft.jsx(Vw,{value:"code",children:"Code"}),ft.jsxs(Vw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&ft.jsx("span",{className:Yg("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),ft.jsxs(Vw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&ft.jsx("span",{className:Yg("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),ft.jsxs(Vw,{value:"cad",children:[i&&ft.jsx("span",{className:Yg("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(be)&&ft.jsx(Vw,{value:be,children:Nae(be)}),ft.jsxs(kAe,{children:[ft.jsx(FAe,{asChild:!0,children:ft.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[ft.jsx(n8t,{className:"rf-w-4 rf-h-4"}),t&&ft.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"})]})}),ft.jsxs(lne,{className:"rf-*:text-xs",children:[NDt.map(ze=>ft.jsxs(Tz,{onSelect:()=>Le(ze),children:[be!==ze&&ft.jsx(CCe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),be===ze&&ft.jsx(MCe,{className:"rf-w-3 rf-h-3"}),ft.jsx("div",{className:"rf-pr-2",children:Nae(ze)}),ze==="errors"&&t&&ft.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:"1"})]},ze)),ft.jsx(Tz,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ft.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",ADt.split(".").map((ze,Ve)=>Ve===2?parseInt(ze)+1:ze).join(".")]})})]})]})]}),ve&&ft.jsx(V4,{onClick:Me,variant:"ghost",children:Oe?ft.jsx(i8t,{size:16}):ft.jsx(r8t,{size:16})})]}),s&&ft.jsx(Pb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:ft.jsx("div",{className:"rf-h-full",children:l})}),ft.jsx(Pb,{value:"pcb",children:ft.jsx("div",{className:Yg("rf-overflow-hidden",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),ft.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?ft.jsx(wDt,{disableAutoFocus:!0,focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Yg("rf-h-full rf-w-full",Oe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:ze=>{Q&&ze.forEach(Ve=>Q(Ve))}},n):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"assembly",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallback:ft.jsx("div",{children:"Error loading Assembly"}),children:i?ft.jsx(_Dt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"schematic",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),ft.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?ft.jsx(vDt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:ze=>Q==null?void 0:Q(ze),editEvents:te,debugGrid:pe}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"cad",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{FallbackComponent:Vwt,children:i?ft.jsx(Rbt,{soup:i,autoRotateDisabled:K}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"bom",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallbackRender:({error:ze})=>ft.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ft.jsxs("div",{className:"rf-p-4",children:[ft.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),ft.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?ft.jsx(EDt,{circuitJson:i}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"circuit_json",children:ft.jsx("div",{className:Yg("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ft.jsx(PT,{fallback:ft.jsx("div",{children:"Error loading JSON viewer"}),children:i?ft.jsx(bDt,{elements:i}):ft.jsx(Rw,{onRunClicked:e})})})}),ft.jsx(Pb,{value:"errors",children:i||t?ft.jsx(e7t,{code:r,errorMessage:t,autoroutingLog:O,onReportAutoroutingLog:B}):ft.jsx(Rw,{onRunClicked:e})}),u&&ft.jsx(Pb,{value:"render_log",children:ft.jsx(RDt,{renderLog:y})})]})})})};Kie.createRoot(document.getElementById("root")).render(ft.jsx(PDt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}))});
@@ -13355,7 +13355,7 @@ ${n.slice(0,2e3)}
13355
13355
  50% { opacity: 0.2; }
13356
13356
  100% { opacity: 0.6; }
13357
13357
  }
13358
- `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[r,t,e,n])},bOt=({circuitJson:r,containerStyle:e,editEvents:t=[],onEditEvent:n,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1})=>{s&&mOt();const[l,c]=ut.useState(i),u=ut.useRef(null),{ref:f,cancelDrag:v,transform:_}=jNe({onSetTransform($){u.current&&(u.current.style.transform=pE($))}}),{containerWidth:x,containerHeight:M}=hOt(f),w=ut.useMemo(()=>!x||!M?"":Kre(r,{width:x,height:M||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[r,x,M]),T=ut.useMemo(()=>{var Q;if(!w)return K_();const $=(Q=w.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Q[1];try{return Dk($)}catch(ee){return console.error(ee),K_()}},[w]),{handleMouseDown:L,isDragging:O,activeEditEvent:B}=gOt({onEditEvent:n,cancelDrag:v,realToSvgProjection:T,svgToScreenProjection:_,circuitJson:r,editEvents:t,enabled:l});_Ot({svgDivRef:u,editEvents:t,realToSvgProjection:T,svgToScreenProjection:_,activeEditEvent:B}),xOt({svgDivRef:u,circuitJson:r,activeEditEvent:B,editEvents:t});const X=ut.useMemo(()=>tt.jsx("div",{ref:u,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:w}}),[w]);return tt.jsxs("div",{ref:f,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:O?"grabbing":"grab",minHeight:"300px",...e},onMouseDown:L,children:[o&&tt.jsx(dOt,{active:l,onClick:()=>c(!l)}),X]})},SOt=r=>{const[e,t]=ut.useState(0),[n,i]=ut.useState(0);return ut.useEffect(()=>{if(!r.current)return;const a=()=>{var l;const s=(l=r.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(r.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:n}};w9("assembly-viewer");var EOt=()=>{w9.enable("assembly-viewer*")},wOt=({circuitJson:r,containerStyle:e,debugGrid:t=!1,debug:n=!1})=>{n&&EOt();const i=ut.useRef(null),{ref:a}=jNe({onSetTransform(u){i.current&&(i.current.style.transform=pE(u))}}),{containerWidth:o,containerHeight:s}=SOt(a),l=ut.useMemo(()=>!o||!s?"":KLe(r,{width:o,height:s||720}),[r,o,s]);ut.useMemo(()=>{var f;if(!l)return K_();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return Dk(u)}catch(v){return console.error(v),K_()}},[l]);const c=ut.useMemo(()=>tt.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return tt.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const zw=({onRunClicked:r})=>tt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",r&&tt.jsxs(KS,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:r,children:["Run Code",tt.jsx(CRe,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),qz=({text:r,onClick:e})=>tt.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:r}),Wz=r=>{var e;return tt.jsxs("div",{className:"rf-leading-5",children:[tt.jsx("div",{className:"rf-py-2 rf-font-bold",children:r.column.name}),tt.jsx("div",{children:((e=r.field)==null?void 0:e.call(r))??tt.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var n;(n=r.onTextChange)==null||n.call(r,t.target.value)}})})]})},TOt=({open:r,children:e,title:t,onClose:n})=>r?tt.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:n,children:tt.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[tt.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),tt.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:n,children:"×"}),e]})}):null,MOt=({elements:r})=>{const[e,t]=ut.useState({open:!1}),[n,i]=ut.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(r.map(u=>u.type))],o=r.map(u=>{const f=u[`${u.type}_id`],v=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),_=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:v,..._,_og_elm:u}}),s=o.map(u=>{let f="";const v=_=>{const x=Object.keys(_.other_ids).find(T=>T.startsWith("source_"));if(!x)return`.${_.name}`;const M=x.slice(0,-3),w=o.find(T=>T.type===M&&T.primary_id===_.other_ids[x]);return w?"name"in w?`${v(w)} > .${_.name}`:`#${w.primary_id} > .${_.name}`:`??? > .${_.name}`};return"name"in u&&(f=v(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>tt.jsxs("div",{className:"rf-flex rf-items-center",children:[tt.jsx(qz,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),tt.jsx("span",{className:"rf-flex-grow"}),tt.jsx(qz,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({id_search:f}),field:n.focused_id?()=>tt.jsxs("div",{children:["Focus:"," ",tt.jsx("span",{className:"rf-underline",children:n.focused_id}),tt.jsx(qz,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>tt.jsx(Wz,{column:u,field:()=>tt.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[tt.jsx("option",{value:"any",children:"any"},"any"),tt.jsx("option",{value:"source",children:"source"},"source"),tt.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),tt.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>tt.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>tt.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,v])=>tt.jsx(qz,{text:v,onClick:()=>i({focused_id:v})},v))})}],c=s.filter(u=>{var f,v;return n.name_search?(v=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:v.includes(n.name_search.toLowerCase()):!0}).filter(u=>{var f;return!n.component_type_filter||n.component_type_filter==="any"?!0:n.component_type_filter==="source"?u.type.startsWith("source_"):n.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):n.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(n.component_type_filter)}).filter(u=>n.selector_search?n.selector_search.split(" ").filter(v=>v.length>0).every(v=>{var _;return(_=u.selector_path)==null?void 0:_.includes(v)}):!0).filter(u=>{var f;return n.id_search?(f=u.primary_id)==null?void 0:f.includes(n.id_search):!0}).filter(u=>!!(!n.focused_id||u.primary_id===n.focused_id||Object.values(u.other_ids).includes(n.focused_id)));return tt.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[tt.jsx("div",{className:"rf-overflow-x-auto",children:tt.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[tt.jsx("thead",{children:tt.jsx("tr",{children:l.map(u=>tt.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),tt.jsx("tbody",{children:c.map((u,f)=>tt.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(v=>tt.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:v.renderCell?v.renderCell(u):u[v.key]},v.key))},f))})]})}),tt.jsx(TOt,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:tt.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:tt.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},COt=(r,e)=>r==="jlcpcb"?tt.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,ROt=({circuitJson:r})=>{const e=r.filter(n=>n.type==="source_component"),t=new Set;for(const n of e)if(n.supplier_part_numbers)for(const i of Object.keys(n.supplier_part_numbers))t.add(i);return tt.jsx("div",{className:"rf-overflow-x-auto",children:tt.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[tt.jsx("thead",{children:tt.jsxs("tr",{className:"rf-border-b",children:[tt.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(n=>tt.jsx("th",{className:"rf-p-2 rf-capitalize",children:n},n))]})}),tt.jsx("tbody",{children:e.map(n=>tt.jsxs("tr",{className:"rf-border-b",children:[tt.jsx("td",{className:"rf-p-2",children:n.name}),Array.from(t).map(i=>{var a,o;return tt.jsx("td",{className:"rf-p-2",children:COt(i,((o=(a=n.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},n.source_component_id))})]})})},AOt=({containerClassName:r,...e})=>{const t=ut.useRef(null),[n,i]=ut.useState(620);return ut.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)}},[]),tt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:tt.jsx($8t,{...e,height:n})})},NOt='*,: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-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.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-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.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-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-4{margin-top:1rem}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.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-2{height:.5rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-60{height:15rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-max-h-\\[500px\\]{max-height:500px}.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-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[8rem\\]{min-width:8rem}.rf-max-w-2xl{max-width:42rem}.rf-max-w-lg{max-width:32rem}.rf-max-w-xl{max-width:36rem}.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-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-place-items-center{place-items:center}.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-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-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}.rf-overflow-x-hidden{overflow-x:hidden}.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-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-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/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-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-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-blue-600\\/70{background-color:rgba(37,99,235,.7)}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/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-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-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.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-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-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-p-0{padding:0}.rf-p-0\\.5{padding:.125rem}.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-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.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-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.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-2{padding-bottom:.5rem;padding-top:.5rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.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-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.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-tracking-widest{letter-spacing:.1em}.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-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-green-500{--tw-text-opacity:1;color:rgb(34 197 94/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-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-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-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-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-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-offset-white{--tw-ring-offset-color:#fff}.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}@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}.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-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.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-bg-blue-600\\/60:disabled{background-color:rgba(37,99,235,.6)}.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-\\[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\\=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-\\[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-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-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\\=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))}@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}}.\\[\\&\\>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}',POt=()=>{ut.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=NOt,document.head.appendChild(e)},[])},iOe=r=>`hsl(${h3.indexOf(r)*137.5%360}, 70%, 50%)`,DOt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return tt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[tt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:h3.map(t=>{const n=r[t]||0,i=n/e*100;return tt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:iOe(t)},children:tt.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)})}),tt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},LOt=({renderLog:r})=>{const[e,t]=ut.useState("chronological");if(!r)return tt.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)=>h3.indexOf(a[0])-h3.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return tt.jsxs("div",{className:"rf-bg-white",children:[tt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[tt.jsx("div",{children:"Render Logs"}),tt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[tt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),tt.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:[tt.jsx("option",{value:"chronological",children:"Phase Order"}),tt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),tt.jsx(DOt,{phaseTimings:r.phaseTimings}),tt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[tt.jsx("thead",{children:tt.jsxs("tr",{children:[tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),tt.jsx("tbody",{children:n.map(([a,o])=>tt.jsxs("tr",{children:[tt.jsx("td",{className:"rf-p-2",children:h3.indexOf(a)}),tt.jsx("td",{className:"rf-p-2",children:a}),tt.jsx("td",{className:"rf-p-2",children:tt.jsx("div",{className:"rf-w-8",children:tt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:iOe(a),width:`${o/i*100}%`}})})}),tt.jsx("td",{className:"rf-p-2",children:tt.jsxs("div",{className:"rf-flex w-full",children:[tt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),tt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},OOt="0.0.243",UOt=["assembly","bom","circuit_json","errors","render_log"],zOt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJsonKey:n="",circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:f,renderLog:v,showImportAndFormatButtons:_=!0,className:x,headerClassName:M,leftHeaderContent:w,readOnly:T,isStreaming:L,autoroutingLog:O,onReportAutoroutingLog:B,isRunningCode:X,hasCodeChangedSinceLastRun:$,onEditEvent:Q,editEvents:ee,defaultActiveTab:ae,autoRotate3dViewerDisabled:K,showSchematicDebugGrid:pe=!1,showToggleFullScreen:me=!0})=>{var je;POt();const[be,Ae]=ut.useState(ae??"pcb"),[Oe,we]=ut.useState(!1),Le=ut.useCallback(Ue=>{Ae(Ue),f==null||f(Ue)},[f]),Te=()=>{we(!Oe)};return ut.useEffect(()=>{t&&Le("errors")},[t]),ut.useEffect(()=>{(be==="code"||be==="errors")&&i&&!t&&Le(ae??"pcb")},[i]),tt.jsx("div",{className:Gv("flex flex-col relative rf-overflow-x-hidden",x),children:tt.jsx("div",{className:Gv("rf-md:sticky rf-md:top-2",Oe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:tt.jsxs(fFe,{value:be,onValueChange:Le,className:"rf-flex-grow rf-flex rf-flex-col",children:[tt.jsxs("div",{className:Gv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",M),children:[w,w&&tt.jsx("div",{className:"rf-flex-grow"}),!w&&X&&tt.jsx(Hte,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&tt.jsx("div",{className:"rf-flex-grow"}),v&&v.progress!==1&&tt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[v.lastRenderEvent&&tt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(je=v.lastRenderEvent)==null?void 0:je.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),tt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:tt.jsx(Hte,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),tt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((v.progress??0)*100).toFixed(1),"%"]})]}),o&&tt.jsxs(Moe,{children:[s&&tt.jsx(Qw,{value:"code",children:"Code"}),tt.jsxs(Qw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&tt.jsx("span",{className:Gv("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),tt.jsxs(Qw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&tt.jsx("span",{className:Gv("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),tt.jsxs(Qw,{value:"cad",children:[i&&tt.jsx("span",{className:Gv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(be)&&tt.jsx(Qw,{value:be,children:Toe(be)}),tt.jsxs(One,{children:[tt.jsx(Une,{asChild:!0,children:tt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[tt.jsx(u6t,{className:"rf-w-4 rf-h-4"}),t&&tt.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"})]})}),tt.jsxs(HU,{className:"rf-*:text-xs",children:[UOt.map(Ue=>tt.jsxs(X8,{onSelect:()=>Le(Ue),children:[be!==Ue&&tt.jsx(MRe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),be===Ue&&tt.jsx(TRe,{className:"rf-w-3 rf-h-3"}),tt.jsx("div",{className:"rf-pr-2",children:Toe(Ue)}),Ue==="errors"&&t&&tt.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:"1"})]},Ue)),tt.jsx(X8,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:tt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",OOt.split(".").map((Ue,Ve)=>Ve===2?parseInt(Ue)+1:Ue).join(".")]})})]})]})]}),me&&tt.jsx(KS,{onClick:Te,variant:"ghost",children:Oe?tt.jsx(d6t,{size:16}):tt.jsx(f6t,{size:16})})]}),s&&tt.jsx(Db,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:tt.jsx("div",{className:"rf-h-full",children:l})}),tt.jsx(Db,{value:"pcb",children:tt.jsx("div",{className:Gv("rf-overflow-hidden",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(AOt,{disableAutoFocus:!0,focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Gv("rf-h-full rf-w-full",Oe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ue=>{Q&&Ue.forEach(Ve=>Q(Ve))}},n):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"assembly",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallback:tt.jsx("div",{children:"Error loading Assembly"}),children:i?tt.jsx(wOt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"schematic",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(bOt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ue=>Q==null?void 0:Q(Ue),editEvents:ee,debugGrid:pe}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"cad",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{FallbackComponent:Z8t,children:i?tt.jsx(U4t,{soup:i,autoRotateDisabled:K}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"bom",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(ROt,{circuitJson:i}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"circuit_json",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallback:tt.jsx("div",{children:"Error loading JSON viewer"}),children:i?tt.jsx(MOt,{elements:i}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"errors",children:i||t?tt.jsx(aRt,{code:r,errorMessage:t,autoroutingLog:O,onReportAutoroutingLog:B}):tt.jsx(zw,{onRunClicked:e})}),u&&tt.jsx(Db,{value:"render_log",children:tt.jsx(LOt,{renderLog:v})})]})})})},Jre={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},eie=new Map,Yz=r=>{const e=eie.get(r);return e?Object.fromEntries(Object.entries(e.stores).map(([t,n])=>[t,n.getState()])):{}},IOt=(r,e,t)=>{if(r===void 0)return{type:"untracked",connection:e.connect(t)};const n=eie.get(t.name);if(n)return{type:"tracked",store:r,...n};const i={connection:e.connect(t),stores:{}};return eie.set(t.name,i),{type:"tracked",store:r,...i}},kOt=(r,e={})=>(t,n,i)=>{const{enabled:a,anonymousActionType:o,store:s,...l}=e;let c;try{c=(a??(Jre?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Jre?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),r(t,n,i);const{connection:u,...f}=IOt(s,c,l);let v=!0;i.setState=(M,w,T)=>{const L=t(M,w);if(!v)return L;const O=T===void 0?{type:o||"anonymous"}:typeof T=="string"?{type:T}:T;return s===void 0?(u==null||u.send(O,n()),L):(u==null||u.send({...O,type:`${s}/${O.type}`},{...Yz(l.name),[s]:i.getState()}),L)};const _=(...M)=>{const w=v;v=!1,t(...M),v=w},x=r(i.setState,n,i);if(f.type==="untracked"?u==null||u.init(x):(f.stores[f.store]=i,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([M,w])=>[M,M===f.store?x:w.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let M=!1;const w=i.dispatch;i.dispatch=(...T)=>{(Jre?"production":void 0)!=="production"&&T[0].type==="__setState"&&!M&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),M=!0),w(...T)}}return u.subscribe(M=>{var w;switch(M.type){case"ACTION":if(typeof M.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return tie(M.payload,T=>{if(T.type==="__setState"){if(s===void 0){_(T.state);return}Object.keys(T.state).length!==1&&console.error(`
13358
+ `,i.appendChild(O)}})}};a();const o=new MutationObserver(a);return o.observe(i,{childList:!0,subtree:!1,characterData:!1}),()=>{o.disconnect()}},[r,t,e,n])},bOt=({circuitJson:r,containerStyle:e,editEvents:t=[],onEditEvent:n,defaultEditMode:i=!1,debugGrid:a=!1,editingEnabled:o=!1,debug:s=!1})=>{s&&mOt();const[l,c]=ut.useState(i),u=ut.useRef(null),{ref:f,cancelDrag:v,transform:_}=jNe({onSetTransform($){u.current&&(u.current.style.transform=pE($))}}),{containerWidth:x,containerHeight:M}=hOt(f),w=ut.useMemo(()=>!x||!M?"":Kre(r,{width:x,height:M||720,grid:a?{cellSize:1,labelCells:!0}:void 0}),[r,x,M]),T=ut.useMemo(()=>{var Q;if(!w)return K_();const $=(Q=w.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:Q[1];try{return Dk($)}catch(ee){return console.error(ee),K_()}},[w]),{handleMouseDown:L,isDragging:O,activeEditEvent:B}=gOt({onEditEvent:n,cancelDrag:v,realToSvgProjection:T,svgToScreenProjection:_,circuitJson:r,editEvents:t,enabled:l});_Ot({svgDivRef:u,editEvents:t,realToSvgProjection:T,svgToScreenProjection:_,activeEditEvent:B}),xOt({svgDivRef:u,circuitJson:r,activeEditEvent:B,editEvents:t});const X=ut.useMemo(()=>tt.jsx("div",{ref:u,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:w}}),[w]);return tt.jsxs("div",{ref:f,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",cursor:O?"grabbing":"grab",minHeight:"300px",...e},onMouseDown:L,children:[o&&tt.jsx(dOt,{active:l,onClick:()=>c(!l)}),X]})},SOt=r=>{const[e,t]=ut.useState(0),[n,i]=ut.useState(0);return ut.useEffect(()=>{if(!r.current)return;const a=()=>{var l;const s=(l=r.current)==null?void 0:l.getBoundingClientRect();t((s==null?void 0:s.width)||0),i((s==null?void 0:s.height)||0)};a();const o=new ResizeObserver(a);return o.observe(r.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),{containerWidth:e,containerHeight:n}};w9("assembly-viewer");var EOt=()=>{w9.enable("assembly-viewer*")},wOt=({circuitJson:r,containerStyle:e,debugGrid:t=!1,debug:n=!1})=>{n&&EOt();const i=ut.useRef(null),{ref:a}=jNe({onSetTransform(u){i.current&&(i.current.style.transform=pE(u))}}),{containerWidth:o,containerHeight:s}=SOt(a),l=ut.useMemo(()=>!o||!s?"":KLe(r,{width:o,height:s||720}),[r,o,s]);ut.useMemo(()=>{var f;if(!l)return K_();const u=(f=l.match(/data-real-to-screen-transform="([^"]+)"/))==null?void 0:f[1];try{return Dk(u)}catch(v){return console.error(v),K_()}},[l]);const c=ut.useMemo(()=>tt.jsx("div",{ref:i,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:l}}),[l]);return tt.jsx("div",{ref:a,style:{position:"relative",backgroundColor:"#F5F1ED",overflow:"hidden",minHeight:"300px",...e},children:c})};const zw=({onRunClicked:r})=>tt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-3 rf-bg-gray-100 rf-text-center rf-justify-center rf-py-10",children:["No circuit json loaded",r&&tt.jsxs(KS,{className:"rf-bg-blue-600 rf-hover:bg-blue-500",onClick:r,children:["Run Code",tt.jsx(CRe,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),qz=({text:r,onClick:e})=>tt.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:r}),Wz=r=>{var e;return tt.jsxs("div",{className:"rf-leading-5",children:[tt.jsx("div",{className:"rf-py-2 rf-font-bold",children:r.column.name}),tt.jsx("div",{children:((e=r.field)==null?void 0:e.call(r))??tt.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:t=>{var n;(n=r.onTextChange)==null||n.call(r,t.target.value)}})})]})},TOt=({open:r,children:e,title:t,onClose:n})=>r?tt.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:n,children:tt.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:[tt.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),tt.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:n,children:"×"}),e]})}):null,MOt=({elements:r})=>{const[e,t]=ut.useState({open:!1}),[n,i]=ut.useReducer((u,f)=>({...u,...f}),{}),a=[...new Set(r.map(u=>u.type))],o=r.map(u=>{const f=u[`${u.type}_id`],v=Object.fromEntries(Object.entries(u).filter(([x])=>!(x===`${u.type}_id`||!x.endsWith("_id")))),_=Object.fromEntries(Object.entries(u).filter(([x])=>!x.endsWith("_id")));return{primary_id:f,other_ids:v,..._,_og_elm:u}}),s=o.map(u=>{let f="";const v=_=>{const x=Object.keys(_.other_ids).find(T=>T.startsWith("source_"));if(!x)return`.${_.name}`;const M=x.slice(0,-3),w=o.find(T=>T.type===M&&T.primary_id===_.other_ids[x]);return w?"name"in w?`${v(w)} > .${_.name}`:`#${w.primary_id} > .${_.name}`:`??? > .${_.name}`};return"name"in u&&(f=v(u)),{...u,selector_path:f}}),l=[{key:"primary_id",name:"primary_id",renderCell:u=>tt.jsxs("div",{className:"rf-flex rf-items-center",children:[tt.jsx(qz,{text:u.primary_id,onClick:()=>i({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),tt.jsx("span",{className:"rf-flex-grow"}),tt.jsx(qz,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({id_search:f}),field:n.focused_id?()=>tt.jsxs("div",{children:["Focus:"," ",tt.jsx("span",{className:"rf-underline",children:n.focused_id}),tt.jsx(qz,{text:"(unfocus)",onClick:()=>i({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>tt.jsx(Wz,{column:u,field:()=>tt.jsxs("select",{onChange:f=>i({component_type_filter:f.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[tt.jsx("option",{value:"any",children:"any"},"any"),tt.jsx("option",{value:"source",children:"source"},"source"),tt.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),tt.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),a.map(f=>tt.jsx("option",{value:f,children:f},f))]})})},{key:"name",name:"name",renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({name_search:f})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>tt.jsx(Wz,{column:u,onTextChange:f=>i({selector_search:f})})},{key:"other_ids",name:"other_ids",renderCell:u=>tt.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([f,v])=>tt.jsx(qz,{text:v,onClick:()=>i({focused_id:v})},v))})}],c=s.filter(u=>{var f,v;return n.name_search?(v=(f=u.name)==null?void 0:f.toLowerCase())==null?void 0:v.includes(n.name_search.toLowerCase()):!0}).filter(u=>{var f;return!n.component_type_filter||n.component_type_filter==="any"?!0:n.component_type_filter==="source"?u.type.startsWith("source_"):n.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):n.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):(f=u.type)==null?void 0:f.includes(n.component_type_filter)}).filter(u=>n.selector_search?n.selector_search.split(" ").filter(v=>v.length>0).every(v=>{var _;return(_=u.selector_path)==null?void 0:_.includes(v)}):!0).filter(u=>{var f;return n.id_search?(f=u.primary_id)==null?void 0:f.includes(n.id_search):!0}).filter(u=>!!(!n.focused_id||u.primary_id===n.focused_id||Object.values(u.other_ids).includes(n.focused_id)));return tt.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[tt.jsx("div",{className:"rf-overflow-x-auto",children:tt.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[tt.jsx("thead",{children:tt.jsx("tr",{children:l.map(u=>tt.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),tt.jsx("tbody",{children:c.map((u,f)=>tt.jsx("tr",{className:"rf-hover:bg-gray-100",children:l.map(v=>tt.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:v.renderCell?v.renderCell(u):u[v.key]},v.key))},f))})]})}),tt.jsx(TOt,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:tt.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:tt.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},COt=(r,e)=>r==="jlcpcb"?tt.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,ROt=({circuitJson:r})=>{const e=r.filter(n=>n.type==="source_component"),t=new Set;for(const n of e)if(n.supplier_part_numbers)for(const i of Object.keys(n.supplier_part_numbers))t.add(i);return tt.jsx("div",{className:"rf-overflow-x-auto",children:tt.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[tt.jsx("thead",{children:tt.jsxs("tr",{className:"rf-border-b",children:[tt.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(n=>tt.jsx("th",{className:"rf-p-2 rf-capitalize",children:n},n))]})}),tt.jsx("tbody",{children:e.map(n=>tt.jsxs("tr",{className:"rf-border-b",children:[tt.jsx("td",{className:"rf-p-2",children:n.name}),Array.from(t).map(i=>{var a,o;return tt.jsx("td",{className:"rf-p-2",children:COt(i,((o=(a=n.supplier_part_numbers)==null?void 0:a[i])==null?void 0:o[0])||"")},i)})]},n.source_component_id))})]})})},AOt=({containerClassName:r,...e})=>{const t=ut.useRef(null),[n,i]=ut.useState(620);return ut.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)}},[]),tt.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:tt.jsx($8t,{...e,height:n})})},NOt='*,: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-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.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-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.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-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-4{margin-top:1rem}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.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-2{height:.5rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-60{height:15rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-max-h-\\[500px\\]{max-height:500px}.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-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-\\[8rem\\]{min-width:8rem}.rf-max-w-2xl{max-width:42rem}.rf-max-w-lg{max-width:32rem}.rf-max-w-xl{max-width:36rem}.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-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-place-items-center{place-items:center}.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-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-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}.rf-overflow-x-hidden{overflow-x:hidden}.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-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-border{border-width:1px}.rf-border-b{border-bottom-width:1px}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/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-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-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-blue-600\\/70{background-color:rgba(37,99,235,.7)}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/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-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-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.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-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-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-p-0{padding:0}.rf-p-0\\.5{padding:.125rem}.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-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.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-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.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-2{padding-bottom:.5rem;padding-top:.5rem}.rf-pb-0{padding-bottom:0}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.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-\\[8px\\]{font-size:8px}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.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-tracking-widest{letter-spacing:.1em}.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-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-green-500{--tw-text-opacity:1;color:rgb(34 197 94/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-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-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-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-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-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-offset-white{--tw-ring-offset-color:#fff}.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}@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}.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-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.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-bg-blue-600\\/60:disabled{background-color:rgba(37,99,235,.6)}.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-\\[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\\=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-\\[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-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-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\\=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))}@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}}.\\[\\&\\>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}',POt=()=>{ut.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=NOt,document.head.appendChild(e)},[])},iOe=r=>`hsl(${h3.indexOf(r)*137.5%360}, 70%, 50%)`,DOt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return tt.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[tt.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:h3.map(t=>{const n=r[t]||0,i=n/e*100;return tt.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:iOe(t)},children:tt.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)})}),tt.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},LOt=({renderLog:r})=>{const[e,t]=ut.useState("chronological");if(!r)return tt.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)=>h3.indexOf(a[0])-h3.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return tt.jsxs("div",{className:"rf-bg-white",children:[tt.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[tt.jsx("div",{children:"Render Logs"}),tt.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[tt.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),tt.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:[tt.jsx("option",{value:"chronological",children:"Phase Order"}),tt.jsx("option",{value:"longest",children:"Duration"})]})]})]}),tt.jsx(DOt,{phaseTimings:r.phaseTimings}),tt.jsxs("table",{className:"rf-w-full rf-text-xs",children:[tt.jsx("thead",{children:tt.jsxs("tr",{children:[tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),tt.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),tt.jsx("tbody",{children:n.map(([a,o])=>tt.jsxs("tr",{children:[tt.jsx("td",{className:"rf-p-2",children:h3.indexOf(a)}),tt.jsx("td",{className:"rf-p-2",children:a}),tt.jsx("td",{className:"rf-p-2",children:tt.jsx("div",{className:"rf-w-8",children:tt.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:iOe(a),width:`${o/i*100}%`}})})}),tt.jsx("td",{className:"rf-p-2",children:tt.jsxs("div",{className:"rf-flex w-full",children:[tt.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),tt.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},OOt="0.0.244",UOt=["assembly","bom","circuit_json","errors","render_log"],zOt=({code:r,onRunClicked:e=void 0,errorMessage:t,circuitJsonKey:n="",circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:f,renderLog:v,showImportAndFormatButtons:_=!0,className:x,headerClassName:M,leftHeaderContent:w,readOnly:T,isStreaming:L,autoroutingLog:O,onReportAutoroutingLog:B,isRunningCode:X,hasCodeChangedSinceLastRun:$,onEditEvent:Q,editEvents:ee,defaultActiveTab:ae,autoRotate3dViewerDisabled:K,showSchematicDebugGrid:pe=!1,showToggleFullScreen:me=!0})=>{var je;POt();const[be,Ae]=ut.useState(ae??"pcb"),[Oe,we]=ut.useState(!1),Le=ut.useCallback(Ue=>{Ae(Ue),f==null||f(Ue)},[f]),Te=()=>{we(!Oe)};return ut.useEffect(()=>{t&&Le("errors")},[t]),ut.useEffect(()=>{(be==="code"||be==="errors")&&i&&!t&&Le(ae??"pcb")},[i]),tt.jsx("div",{className:Gv("flex flex-col relative rf-overflow-x-hidden",x),children:tt.jsx("div",{className:Gv("rf-md:sticky rf-md:top-2",Oe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:tt.jsxs(fFe,{value:be,onValueChange:Le,className:"rf-flex-grow rf-flex rf-flex-col",children:[tt.jsxs("div",{className:Gv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",M),children:[w,w&&tt.jsx("div",{className:"rf-flex-grow"}),!w&&X&&tt.jsx(Hte,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!w&&tt.jsx("div",{className:"rf-flex-grow"}),v&&v.progress!==1&&tt.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[v.lastRenderEvent&&tt.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:(je=v.lastRenderEvent)==null?void 0:je.type.split("renderable:renderLifecycle:")[1].split(":")[0]}),tt.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:tt.jsx(Hte,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),tt.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((v.progress??0)*100).toFixed(1),"%"]})]}),o&&tt.jsxs(Moe,{children:[s&&tt.jsx(Qw,{value:"code",children:"Code"}),tt.jsxs(Qw,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&tt.jsx("span",{className:Gv("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),tt.jsxs(Qw,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&tt.jsx("span",{className:Gv("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",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),tt.jsxs(Qw,{value:"cad",children:[i&&tt.jsx("span",{className:Gv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",$?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(be)&&tt.jsx(Qw,{value:be,children:Toe(be)}),tt.jsxs(One,{children:[tt.jsx(Une,{asChild:!0,children:tt.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[tt.jsx(u6t,{className:"rf-w-4 rf-h-4"}),t&&tt.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"})]})}),tt.jsxs(HU,{className:"rf-*:text-xs",children:[UOt.map(Ue=>tt.jsxs(X8,{onSelect:()=>Le(Ue),children:[be!==Ue&&tt.jsx(MRe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),be===Ue&&tt.jsx(TRe,{className:"rf-w-3 rf-h-3"}),tt.jsx("div",{className:"rf-pr-2",children:Toe(Ue)}),Ue==="errors"&&t&&tt.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:"1"})]},Ue)),tt.jsx(X8,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:tt.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",OOt.split(".").map((Ue,Ve)=>Ve===2?parseInt(Ue)+1:Ue).join(".")]})})]})]})]}),me&&tt.jsx(KS,{onClick:Te,variant:"ghost",children:Oe?tt.jsx(d6t,{size:16}):tt.jsx(f6t,{size:16})})]}),s&&tt.jsx(Db,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:tt.jsx("div",{className:"rf-h-full",children:l})}),tt.jsx(Db,{value:"pcb",children:tt.jsx("div",{className:Gv("rf-overflow-hidden",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(AOt,{disableAutoFocus:!0,focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Gv("rf-h-full rf-w-full",Oe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Ue=>{Q&&Ue.forEach(Ve=>Q(Ve))}},n):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"assembly",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallback:tt.jsx("div",{children:"Error loading Assembly"}),children:i?tt.jsx(wOt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"schematic",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(bOt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Ue=>Q==null?void 0:Q(Ue),editEvents:ee,debugGrid:pe}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"cad",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{FallbackComponent:Z8t,children:i?tt.jsx(U4t,{soup:i,autoRotateDisabled:K}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"bom",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallbackRender:({error:Ue})=>tt.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:tt.jsxs("div",{className:"rf-p-4",children:[tt.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),tt.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(Ue==null?void 0:Ue.message)||"An unknown error occurred"})]})}),children:i?tt.jsx(ROt,{circuitJson:i}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"circuit_json",children:tt.jsx("div",{className:Gv("rf-overflow-auto",Oe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:tt.jsx(F8,{fallback:tt.jsx("div",{children:"Error loading JSON viewer"}),children:i?tt.jsx(MOt,{elements:i}):tt.jsx(zw,{onRunClicked:e})})})}),tt.jsx(Db,{value:"errors",children:i||t?tt.jsx(aRt,{code:r,errorMessage:t,autoroutingLog:O,onReportAutoroutingLog:B}):tt.jsx(zw,{onRunClicked:e})}),u&&tt.jsx(Db,{value:"render_log",children:tt.jsx(LOt,{renderLog:v})})]})})})},Jre={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},eie=new Map,Yz=r=>{const e=eie.get(r);return e?Object.fromEntries(Object.entries(e.stores).map(([t,n])=>[t,n.getState()])):{}},IOt=(r,e,t)=>{if(r===void 0)return{type:"untracked",connection:e.connect(t)};const n=eie.get(t.name);if(n)return{type:"tracked",store:r,...n};const i={connection:e.connect(t),stores:{}};return eie.set(t.name,i),{type:"tracked",store:r,...i}},kOt=(r,e={})=>(t,n,i)=>{const{enabled:a,anonymousActionType:o,store:s,...l}=e;let c;try{c=(a??(Jre?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Jre?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),r(t,n,i);const{connection:u,...f}=IOt(s,c,l);let v=!0;i.setState=(M,w,T)=>{const L=t(M,w);if(!v)return L;const O=T===void 0?{type:o||"anonymous"}:typeof T=="string"?{type:T}:T;return s===void 0?(u==null||u.send(O,n()),L):(u==null||u.send({...O,type:`${s}/${O.type}`},{...Yz(l.name),[s]:i.getState()}),L)};const _=(...M)=>{const w=v;v=!1,t(...M),v=w},x=r(i.setState,n,i);if(f.type==="untracked"?u==null||u.init(x):(f.stores[f.store]=i,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([M,w])=>[M,M===f.store?x:w.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let M=!1;const w=i.dispatch;i.dispatch=(...T)=>{(Jre?"production":void 0)!=="production"&&T[0].type==="__setState"&&!M&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),M=!0),w(...T)}}return u.subscribe(M=>{var w;switch(M.type){case"ACTION":if(typeof M.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return tie(M.payload,T=>{if(T.type==="__setState"){if(s===void 0){_(T.state);return}Object.keys(T.state).length!==1&&console.error(`
13359
13359
  [zustand devtools middleware] Unsupported __setState action format.
13360
13360
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
13361
13361
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/runframe",
3
3
  "main": "dist/preview.js",
4
4
  "type": "module",
5
- "version": "0.0.244",
5
+ "version": "0.0.245",
6
6
  "exports": {
7
7
  ".": "./dist/preview.js",
8
8
  "./preview": "./dist/preview.js",
@@ -69,7 +69,7 @@
69
69
  "@tscircuit/assembly-viewer": "^0.0.1",
70
70
  "@tscircuit/core": "^0.0.349",
71
71
  "@tscircuit/create-snippet-url": "^0.0.8",
72
- "@tscircuit/eval": "^0.0.122",
72
+ "@tscircuit/eval": "^0.0.124",
73
73
  "@tscircuit/file-server": "^0.0.13",
74
74
  "@tscircuit/pcb-viewer": "^1.11.67",
75
75
  "@tscircuit/props": "^0.0.161",