@tscircuit/runframe 0.0.1308 → 0.0.1310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/standalone.min.js
CHANGED
|
@@ -5704,7 +5704,7 @@ ${k.type}: ${T}
|
|
|
5704
5704
|
`,n.appendChild(p)}})}};o();const s=new MutationObserver(o);return s.observe(n,{childList:!0,subtree:!1,characterData:!1}),()=>{s.disconnect()}},[e,t,A,i])},aCt=["#8B0000","#2F4F4F","#191970","#006400","#FF4500","#800080","#2E8B57","#B8860B","#C71585","#008B8B"],gVe=e=>{const{svgDivRef:A,circuitJson:t,circuitJsonKey:i,showGroups:n}=e;cA.useEffect(()=>{if(A.current&&A.current.querySelectorAll(".schematic-group-overlay").forEach(r=>r.remove()),!A.current||!n||!t||t.length===0)return;const o=setTimeout(()=>{if(!A.current)return;const s=A.current.querySelector("svg");if(!s)return;s.querySelectorAll(".schematic-group-overlay").forEach(a=>a.remove());try{const a=vd(t).source_group?.list().filter(p=>!p.is_subcircuit)||[],g=vd(t).schematic_component?.list()||[],c=new Map;a.forEach(p=>{const f=p;if(f.parent_source_group_id){const m=c.get(f.parent_source_group_id)||[];m.push(p.source_group_id),c.set(f.parent_source_group_id,m)}});const I=p=>{const f=[],m=c.get(p)||[];for(const S of m)f.push(S),f.push(...I(S));return f},l=p=>{const f=a.find(m=>m.source_group_id===p);return f?.parent_source_group_id?1+l(f.parent_source_group_id):0},B=a.length>0&&a.some(p=>p.name&&p.name.trim()!=="");let C=[];if(B){const p=new Map;for(const f of g){const m=vd(t).source_component.get(f.source_component_id);m?.source_group_id&&(p.has(m.source_group_id)||p.set(m.source_group_id,[]),p.get(m.source_group_id).push(f))}a.forEach((f,m)=>{let S=p.get(f.source_group_id)||[];const _=I(f.source_group_id);for(const v of _){const D=p.get(v)||[];S=[...S,...D]}if(S.length>0){const v=l(f.source_group_id),D=I(f.source_group_id).length>0;if(f.name?.startsWith("unnamed_board"))return;C.push({id:f.source_group_id,name:f.name||`Group ${m+1}`,components:S,color:aCt[m%aCt.length],depthLevel:v,hasChildren:D,sourceGroupId:f.source_group_id})}})}const Q=s.viewBox.baseVal,u=s.getBoundingClientRect(),E=Math.min(u.width/Q.width,u.height/Q.height)||1;C.sort((p,f)=>p.depthLevel-f.depthLevel),C.forEach(p=>{if(p.components.length===0)return;const f=cVe(p.components,s);if(!f)return;const m=Math.max(8,Math.min(25,15/Math.max(E,.3))),S=p.hasChildren?m*.6:0,_=m+S,v=Math.max(1,2/Math.max(E,.5)),D=p.depthLevel===0?v:v*.7,k=Math.max(4,8/Math.max(E,.5)),x=p.hasChildren?1.3:1,M=k*x,N=M*.5,T=document.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("class","schematic-group-overlay"),T.setAttribute("x",(f.minX-_).toString()),T.setAttribute("y",(f.minY-_).toString()),T.setAttribute("width",(f.maxX-f.minX+_*2).toString()),T.setAttribute("height",(f.maxY-f.minY+_*2).toString()),T.setAttribute("fill","none"),T.setAttribute("stroke",p.color),T.setAttribute("stroke-width",D.toString()),T.setAttribute("stroke-dasharray",`${M},${N}`),T.setAttribute("opacity","0.8"),T.setAttribute("rx","0"),T.setAttribute("ry","0");const q=Math.max(6,Math.min(20,14/Math.max(E,.2))),P=p.depthLevel===0||p.depthLevel===1?0:p.depthLevel*.2,V=q*(1-P),z=Math.max(1,V*.2),oA=p.name,gA=document.createElementNS("http://www.w3.org/2000/svg","text");gA.setAttribute("font-size",V.toString()),gA.setAttribute("font-family","Arial, sans-serif"),gA.textContent=oA,s.appendChild(gA);const QA=gA.getBBox();s.removeChild(gA);const tA=QA.width+z*2,rA=V+z*2,IA=f.minX-_,DA=f.minY-_-rA,bA=document.createElementNS("http://www.w3.org/2000/svg","rect");bA.setAttribute("class","schematic-group-overlay"),bA.setAttribute("x",IA.toString()),bA.setAttribute("y",(DA-rA).toString()),bA.setAttribute("width",tA.toString()),bA.setAttribute("height",rA.toString()),bA.setAttribute("fill","transparent"),bA.setAttribute("rx","0"),bA.setAttribute("ry","0");const HA=document.createElementNS("http://www.w3.org/2000/svg","text");HA.setAttribute("class","schematic-group-overlay"),HA.setAttribute("x",(IA+z).toString()),HA.setAttribute("y",(DA+rA-z).toString()),HA.setAttribute("fill",p.color),HA.setAttribute("font-size",V.toString()),HA.setAttribute("font-family","Arial, sans-serif"),HA.setAttribute("font-weight",p.depthLevel===0?"600":"500"),HA.setAttribute("stroke",p.color),HA.setAttribute("stroke-width",Math.max(.2,V*.02).toString()),HA.textContent=oA,s.appendChild(T),s.appendChild(bA),s.appendChild(HA)})}catch(a){console.error("Error creating group overlays:",a)}},10);return()=>clearTimeout(o)},[A,i,n])};function cVe(e,A){let t=1/0,i=1/0,n=-1/0,o=-1/0;for(const r of e){let a=A.querySelector(`g[data-schematic-component-id="${r.schematic_component_id}"]`);if(a||(a=A.querySelector(`[data-schematic-component-id="${r.schematic_component_id}"]`)),a){const g=a.getBBox();t=Math.min(t,g.x),i=Math.min(i,g.y),n=Math.max(n,g.x+g.width),o=Math.max(o,g.y+g.height)}}return t===1/0?null:{minX:t,minY:i,maxX:n,maxY:o}}var IVe=sB("schematic-viewer"),lVe=()=>{sB.enable("schematic-viewer*")},BVe=IVe,CVe=e=>{const[A,t]=cA.useState(0),[i,n]=cA.useState(0);return cA.useEffect(()=>{if(!e.current)return;const o=()=>{const r=e.current?.getBoundingClientRect();t(r?.width||0),n(r?.height||0)};o();const s=new ResizeObserver(o);return s.observe(e.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:A,containerHeight:i}},hVe=BVe.extend("useComponentDragging"),QVe=({onEditEvent:e,editEvents:A=[],circuitJson:t,cancelDrag:i,svgToScreenProjection:n,realToSvgProjection:o,enabled:s=!1,snapToGrid:r=!1})=>{const[a,g]=cA.useState(null),c=ko(o,n),I=cA.useRef(null),l=cA.useRef(null),B=cA.useRef(new Map);cA.useEffect(()=>{A.forEach(v=>{"edit_event_type"in v&&v.edit_event_type==="edit_schematic_component_location"&&!v.in_progress&&B.current.set(v.schematic_component_id,{...v.new_center})})},[A]);const C=cA.useCallback((v,D,k)=>{if(!s)return!1;const x=k.closest('[data-circuit-json-type="schematic_component"]');if(!x)return!1;const M=x.getAttribute("data-schematic-component-id");if(!M)return!1;i&&i();const N=vd(t).schematic_component.get(M);if(!N)return!1;I.current={x:v,y:D};let T;const q=B.current.get(M);if(q)T={...q};else{const V=rCt({editEvents:A,schematic_component_id:M});T={x:N.center.x+V.x,y:N.center.y+V.y},B.current.set(M,{...T})}const P={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:M,original_center:T,new_center:{...T},in_progress:!0,created_at:Date.now(),_element:x};return l.current=P,g(P),!0},[i,s,t,A]),Q=cA.useCallback(v=>{C(v.clientX,v.clientY,v.target)},[C]),u=cA.useCallback(v=>{if(v.touches.length!==1)return;const D=v.touches[0];C(D.clientX,D.clientY,v.target)&&v.preventDefault()},[C]),E=cA.useCallback((v,D)=>{if(!l.current||!I.current)return;const k={x:v-I.current.x,y:D-I.current.y},x={x:k.x/c.a,y:k.y/c.d};let M={x:l.current.original_center.x+x.x,y:l.current.original_center.y+x.y};if(r){const T=q=>Math.round(q*10)/10;M={x:T(M.x),y:T(M.y)}}const N={...l.current,new_center:M};l.current=N,g(N)},[c,r]),p=cA.useCallback(v=>E(v.clientX,v.clientY),[E]),f=cA.useCallback(v=>{if(v.touches.length!==1||!l.current)return;v.preventDefault();const D=v.touches[0];E(D.clientX,D.clientY)},[E]),m=cA.useCallback(()=>{if(!l.current)return;const v={...l.current,in_progress:!1};B.current.set(v.schematic_component_id,{...v.new_center}),hVe("endDrag calling onEditEvent with new edit event",{newEditEvent:v}),e&&e(v),l.current=null,I.current=null,g(null)},[e]),S=cA.useCallback(()=>m(),[m]),_=cA.useCallback(()=>m(),[m]);return cA.useEffect(()=>(window.addEventListener("mousemove",p),window.addEventListener("mouseup",S),window.addEventListener("touchmove",f,{passive:!1}),window.addEventListener("touchend",_),()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",S),window.removeEventListener("touchmove",f),window.removeEventListener("touchend",_)}),[p,S,f,_]),{handleMouseDown:Q,handleTouchStart:u,isDragging:!!l.current,activeEditEvent:a}},mk={schematicEditIcon:50,schematicGridIcon:49,spiceSimulationIcon:50,viewMenuIcon:48,viewMenu:55,viewMenuBackdrop:54,clickToInteractOverlay:100,schematicComponentHoverOutline:47},uVe=({onClick:e,active:A})=>{const t=i=>{i.preventDefault(),e()};return iA.jsx("div",{onClick:t,onTouchEnd:t,title:A?"Disable edit mode":"Enable edit mode",style:{position:"absolute",top:"16px",right:"64px",backgroundColor:A?"#4CAF50":"#fff",color:A?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mk.schematicEditIcon},children:iA.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[iA.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),iA.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})},EVe=({onClick:e,active:A})=>{const t=i=>{i.preventDefault(),e()};return iA.jsx("div",{onClick:t,onTouchEnd:t,title:A?"Hide grid":"Show grid",style:{position:"absolute",top:"56px",right:"64px",backgroundColor:A?"#4CAF50":"#fff",color:A?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mk.schematicGridIcon},children:iA.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:iA.jsx("path",{d:"M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z"})})})},dVe=({onClick:e,active:A})=>{const t=i=>{i.preventDefault(),e()};return iA.jsx("div",{onClick:t,onTouchEnd:t,title:A?"Hide view menu":"Show view menu",style:{position:"absolute",top:"16px",right:"16px",backgroundColor:A?"#4CAF50":"#fff",color:A?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mk.viewMenuIcon},children:iA.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[iA.jsx("circle",{cx:"12",cy:"12",r:"1"}),iA.jsx("circle",{cx:"12",cy:"5",r:"1"}),iA.jsx("circle",{cx:"12",cy:"19",r:"1"})]})})},pVe={version:"2.0.48"},fVe=({circuitJson:e,circuitJsonKey:A,isVisible:t,onClose:i,showGroups:n,onToggleGroups:o})=>{const s=cA.useMemo(()=>{if(!e||e.length===0)return!1;try{if((vd(e).source_group?.list()||[]).length>0)return!0;const a=vd(e).schematic_component?.list()||[];if(a.length>1){const g=new Set;for(const c of a){const I=vd(e).source_component.get(c.source_component_id);I?.ftype&&g.add(I.ftype)}return g.size>1}return!1}catch(r){return console.error("Error checking for groups:",r),!1}},[A]);return t?iA.jsxs(iA.Fragment,{children:[iA.jsx("div",{onClick:i,onTouchEnd:r=>{r.preventDefault(),i()},style:{position:"absolute",inset:0,backgroundColor:"transparent",zIndex:mk.viewMenuBackdrop}}),iA.jsxs("div",{style:{position:"absolute",top:"56px",right:"16px",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ccc",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",minWidth:"200px",zIndex:mk.viewMenu},children:[iA.jsxs("div",{onClick:()=>{s&&o(!n)},onTouchEnd:r=>{r.preventDefault(),s&&o(!n)},style:{padding:"8px 12px",cursor:s?"pointer":"not-allowed",opacity:s?1:.5,fontSize:"13px",color:"#000000",fontFamily:"sans-serif",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:r=>{s&&(r.currentTarget.style.backgroundColor="#f0f0f0")},onMouseLeave:r=>{s&&(r.currentTarget.style.backgroundColor="transparent")},children:[iA.jsx("div",{style:{width:"16px",height:"16px",border:"2px solid #000",borderRadius:"2px",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"bold"},children:n&&"✓"}),"View Schematic Groups"]}),!s&&iA.jsx("div",{style:{padding:"8px 12px",fontSize:"11px",color:"#666",fontStyle:"italic"},children:"No groups found in this schematic"}),iA.jsxs("div",{style:{padding:"4px 8px",fontSize:"12px",color:"#999",borderTop:"1px solid #eee",textAlign:"center"},children:["v",String(pVe?.version)]})]})]}):null},yVe=()=>iA.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:iA.jsx("path",{d:"M3 12h2.5l2.5-9 4 18 4-9h5.5"})}),mVe=({onClick:e})=>iA.jsx("div",{onClick:e,title:"Run SPICE simulation",style:{position:"absolute",top:"16px",right:"112px",backgroundColor:"#fff",color:"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mk.spiceSimulationIcon},children:iA.jsx(yVe,{})});Uj.register(LZe,YZe,uZe,QZe,DZe,FZe,mZe);var Tj=["#8884d8","#82ca9d","#ffc658","#ff7300","#387908"],gCt=e=>{if(e===0)return"0s";const A=Math.abs(e);let t="s",i=1;return A<1e-12?(t="fs",i=1e15):A<1e-9?(t="ps",i=1e12):A<1e-6?(t="ns",i=1e9):A<.001?(t="us",i=1e6):A<1&&(t="ms",i=1e3),`${parseFloat((e*i).toPrecision(3))}${t}`},wVe=({plotData:e,nodes:A,isLoading:t,error:i,hasRun:n})=>{const o=cA.useMemo(()=>{const a=A.some(c=>c.toLowerCase().startsWith("v(")),g=A.some(c=>c.toLowerCase().startsWith("i("));return a&&g?"Value":a?"Voltage (V)":g?"Current (A)":"Value"},[A]);if(t)return iA.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"Running simulation..."});if(!n)return iA.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:'Click "Run" to start the simulation.'});if(i)return iA.jsxs("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"red"},children:["Error: ",i]});if(e.length===0)return iA.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"No data to plot. Check simulation output or SPICE netlist."});const s={datasets:A.map((a,g)=>({label:a,data:e.map(c=>({x:Number(c.name),y:c[a]})),borderColor:Tj[g%Tj.length],backgroundColor:Tj[g%Tj.length],fill:!1,tension:.1}))},r={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{font:{family:"sans-serif"}}},title:{display:!1},tooltip:{callbacks:{title:a=>{if(a.length>0){const g=a[0];return gCt(g.parsed.x)}return""}}}},scales:{x:{type:"linear",title:{display:!0,text:"Time",font:{family:"sans-serif"}},ticks:{callback:a=>gCt(a),font:{family:"sans-serif"}}},y:{title:{display:!0,text:o,font:{family:"sans-serif"}},ticks:{font:{family:"sans-serif"}}}}};return iA.jsx("div",{style:{position:"relative",height:"300px",width:"100%"},children:iA.jsx(VZe,{options:r,data:s})})},DVe=({spiceString:e,onClose:A,plotData:t,nodes:i,isLoading:n,error:o,simOptions:s,onSimOptionsChange:r,hasRun:a})=>{const[g,c]=cA.useState(String(s.startTime)),[I,l]=cA.useState(String(s.duration));cA.useEffect(()=>{c(String(s.startTime)),l(String(s.duration))},[s.startTime,s.duration]);const B=()=>{r({...s,startTime:Number(g),duration:Number(I)})},C=i.filter(Q=>{const u=Q.toLowerCase().startsWith("v("),E=Q.toLowerCase().startsWith("i(");return!!(s.showVoltage&&u||s.showCurrent&&E)});return iA.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1002,fontFamily:"sans-serif"},children:iA.jsxs("div",{style:{backgroundColor:"white",padding:"24px",borderRadius:"12px",width:"90%",maxWidth:"900px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)"},children:[iA.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",borderBottom:"1px solid #eee",paddingBottom:"16px"},children:[iA.jsx("h2",{style:{margin:0,fontSize:"22px",fontWeight:600,color:"#333"},children:"SPICE Simulation"}),iA.jsx("button",{onClick:A,style:{background:"none",border:"none",fontSize:"28px",cursor:"pointer",color:"#888",padding:0,lineHeight:1},children:"×"})]}),iA.jsx("div",{children:iA.jsx(wVe,{plotData:t,nodes:C,isLoading:n,error:o,hasRun:a})}),iA.jsxs("div",{style:{marginTop:"16px",padding:"12px",backgroundColor:"#f7f7f7",borderRadius:"6px",display:"flex",flexWrap:"wrap",gap:"24px",alignItems:"center",fontSize:"14px"},children:[iA.jsxs("div",{style:{display:"flex",gap:"16px"},children:[iA.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[iA.jsx("input",{type:"checkbox",checked:s.showVoltage,onChange:Q=>r({...s,showVoltage:Q.target.checked})}),"Voltage"]}),iA.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[iA.jsx("input",{type:"checkbox",checked:s.showCurrent,onChange:Q=>r({...s,showCurrent:Q.target.checked})}),"Current"]})]}),iA.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center"},children:[iA.jsx("label",{htmlFor:"startTime",children:"Start Time (ms):"}),iA.jsx("input",{id:"startTime",type:"number",value:g,onChange:Q=>c(Q.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),iA.jsx("label",{htmlFor:"duration",children:"Duration (ms):"}),iA.jsx("input",{id:"duration",type:"number",value:I,onChange:Q=>l(Q.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),iA.jsx("button",{onClick:B,style:{padding:"4px 12px",borderRadius:"4px",border:"1px solid #ccc",backgroundColor:"#f0f0f0",cursor:"pointer"},children:a?"Rerun":"Run"})]})]}),iA.jsxs("div",{style:{marginTop:"24px"},children:[iA.jsx("h3",{style:{marginTop:0,marginBottom:"12px",fontSize:"18px",fontWeight:600,color:"#333"},children:"SPICE Netlist"}),iA.jsx("pre",{style:{backgroundColor:"#fafafa",padding:"16px",borderRadius:"6px",maxHeight:"150px",overflowY:"auto",border:"1px solid #eee",color:"#333",fontSize:"13px",fontFamily:"monospace"},children:e})]})]})})},_Ve="dmFyIGU9bnVsbCxzPWFzeW5jKCk9Pihhd2FpdCBpbXBvcnQoImh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vZWVjaXJjdWl0LWVuZ2luZUAxLjUuMi8rZXNtIikpLlNpbXVsYXRpb24sYz1hc3luYygpPT57aWYoZSYmZS5pc0luaXRpYWxpemVkKCkpcmV0dXJuO2xldCBpPWF3YWl0IHMoKTtlPW5ldyBpLGF3YWl0IGUuc3RhcnQoKX07c2VsZi5vbm1lc3NhZ2U9YXN5bmMgaT0+e3RyeXtpZihhd2FpdCBjKCksIWUpdGhyb3cgbmV3IEVycm9yKCJTaW11bGF0aW9uIG5vdCBpbml0aWFsaXplZCIpO2xldCB0PWkuZGF0YS5zcGljZVN0cmluZyxhPXQubWF0Y2goL3dyZGF0YVxzKyhcUyspXHMrKC4qKS9pKTtpZihhKXtsZXQgbz1gLnByb2JlICR7YVsyXS50cmltKCkuc3BsaXQoL1xzKy8pLmpvaW4oIiAiKX1gO3Q9dC5yZXBsYWNlKC93cmRhdGEuKi9pLG8pfWVsc2UgaWYoIXQubWF0Y2goL1wucHJvYmUvaSkpdGhyb3cgdC5tYXRjaCgvcGxvdFxzKyguKikvaSk/bmV3IEVycm9yKCJUaGUgJ3Bsb3QnIGNvbW1hbmQgaXMgbm90IHN1cHBvcnRlZCBmb3IgZGF0YSBleHRyYWN0aW9uLiBQbGVhc2UgdXNlICd3cmRhdGEgPGZpbGVuYW1lPiA8dmFyMT4gLi4uJyBvciAnLnByb2JlIDx2YXIxPiAuLi4nIGluc3RlYWQuIik6bmV3IEVycm9yKCJObyAnLnByb2JlJyBvciAnd3JkYXRhJyBjb21tYW5kIGZvdW5kIGluIFNQSUNFIGZpbGUuIFVzZSAnd3JkYXRhIDxmaWxlbmFtZT4gPHZhcjE+IC4uLicgdG8gc3BlY2lmeSBvdXRwdXQuIik7ZS5zZXROZXRMaXN0KHQpO2xldCBuPWF3YWl0IGUucnVuU2ltKCk7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToicmVzdWx0IixyZXN1bHQ6bn0pfWNhdGNoKHQpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIixlcnJvcjp0Lm1lc3NhZ2V9KX19Owo=",Kj=null,xVe=()=>{if(typeof window>"u")return null;if(Kj)return Kj;try{const e=new Blob([atob(_Ve)],{type:"application/javascript"});return Kj=URL.createObjectURL(e),Kj}catch(e){return console.error("Failed to create blob URL for worker",e),null}},bVe=e=>{const A={};if(e.dataType==="real")e.data.forEach(r=>{A[r.name]=r.values});else if(e.dataType==="complex")e.data.forEach(r=>{A[r.name]=r.values.map(a=>a.real)});else throw new Error("Unsupported data type in simulation result");const t=Object.keys(A).find(r=>r.toLowerCase()==="time"||r.toLowerCase()==="frequency");if(!t)throw new Error("No time or frequency data in simulation result");const i=A[t],n=Object.keys(A).filter(r=>r!==t),o=n;return{plotData:i.map((r,a)=>{const g={name:r.toExponential(2)};return n.forEach(c=>{g[c]=A[c][a]}),g}),nodes:o}},SVe=e=>{const[A,t]=cA.useState([]),[i,n]=cA.useState([]),[o,s]=cA.useState(!0),[r,a]=cA.useState(null);return cA.useEffect(()=>{if(!e){s(!1),t([]),n([]),a(null);return}s(!0),a(null),t([]),n([]);const g=xVe();if(!g){a("Could not create SPICE simulation worker."),s(!1);return}const c=new Worker(g,{type:"module"});return c.onmessage=I=>{if(I.data.type==="result")try{const{plotData:l,nodes:B}=bVe(I.data.result);t(l),n(B)}catch(l){a(l.message||"Failed to parse simulation result"),console.error(l)}else I.data.type==="error"&&a(I.data.error);s(!1)},c.onerror=I=>{a(I.message),s(!1)},c.postMessage({spiceString:e}),()=>{c.terminate()}},[e]),{plotData:A,nodes:i,isLoading:o,error:r}},cwA=e=>{if(e===0)return"0";const A=Math.abs(e),t=i=>i.toPrecision(4);return A>=1?t(e):A>=.001?`${t(e*1e3)}m`:A>=1e-6?`${t(e*1e6)}u`:A>=1e-9?`${t(e*1e9)}n`:A>=1e-12?`${t(e*1e12)}p`:A>=1e-15?`${t(e*1e15)}f`:e.toExponential(3)},vVe=(e,A)=>{const i=iVe(e).toSpiceString(),o=i.split(`
|
|
5705
5705
|
`).filter(x=>x.trim()!=="").filter(x=>!x.startsWith("*")&&!x.startsWith(".")&&x.trim()!==""),s=new Set,r=new Set,a=new Set;for(const x of o){const M=x.trim().split(/\s+/);if(M.length<3)continue;const N=M[0],T=N[0].toUpperCase();let q=[];if(["R","C","L","V","I","D"].includes(T))q=M.slice(1,3),T==="V"&&a.add(N);else if(T==="Q"&&M.length>=4)q=M.slice(1,4);else if(T==="M"&&M.length>=5)q=M.slice(1,5);else if(T==="X")q=M.slice(1,-1);else continue;q.forEach(P=>s.add(P)),T==="C"&&q.forEach(P=>r.add(P))}s.delete("0"),r.delete("0");const g=Array.from(r).map(x=>`.ic V(${x})=0`),c=[],I=Array.from(s).map(x=>`V(${x})`);c.push(...I);const l=Array.from(a).map(x=>`I(${x})`);c.push(...l);const B=c.length>0?`.probe ${c.join(" ")}`:"",C=A?.startTime??0,Q=A?.duration??20,u=C*.001,E=Q*.001,p=u+E,f=E/50,m=`.tran ${cwA(f)} ${cwA(p)} ${cwA(u)} UIC`,S=".end",_=i.split(`
|
|
5706
5706
|
`);let v=-1;for(let x=_.length-1;x>=0;x--)if(_[x].trim().toLowerCase().startsWith(S)){v=x;break}const D=[...g,B,m].filter(Boolean);let k;if(v!==-1){const x=_.slice(0,v),M=_.slice(v);k=[...x,...D,...M]}else k=[..._,...D,S];return k.join(`
|
|
5707
|
-
`)},kVe=(e,A)=>{if(typeof window>"u")return A;try{const t=localStorage.getItem(e);return t!==null?JSON.parse(t):A}catch{return A}},RVe=(e,A)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(A))}catch{}},IwA=cA.createContext(null),FVe=5,NVe=(e,A)=>!e&&!A?!0:!e||!A?!1:e.minX===A.minX&&e.maxX===A.maxX&&e.minY===A.minY&&e.maxY===A.maxY,GVe=({children:e})=>{if(cA.useContext(IwA))return iA.jsx(iA.Fragment,{children:e});const t=cA.useRef({pointer:null,boundingBoxes:new Map,hoveringIds:new Set,subscribers:new Set,mouseDownPosition:null}),i=cA.useCallback(()=>{for(const I of t.current.subscribers)I()},[]),n=cA.useCallback(()=>{const I=t.current.pointer,l=new Set;if(I)for(const[C,Q]of t.current.boundingBoxes){const u=Q.bounds;u&&I.x>=u.minX&&I.x<=u.maxX&&I.y>=u.minY&&I.y<=u.maxY&&l.add(C)}const B=t.current.hoveringIds;l.size===B.size&&[...l].every(C=>B.has(C))||(t.current.hoveringIds=l,i())},[i]),o=cA.useCallback((I,l)=>{t.current.boundingBoxes.set(I,l),n()},[n]),s=cA.useCallback((I,l)=>{const B=t.current.boundingBoxes.get(I);B&&NVe(B.bounds,l.bounds)&&B.onClick===l.onClick||(t.current.boundingBoxes.set(I,l),n())},[n]),r=cA.useCallback(I=>{t.current.boundingBoxes.delete(I)&&n()},[n]),a=cA.useCallback(I=>(t.current.subscribers.add(I),()=>{t.current.subscribers.delete(I)}),[]),g=cA.useCallback(I=>t.current.hoveringIds.has(I),[]);cA.useEffect(()=>{const I=Q=>{const{clientX:u,clientY:E}=Q,p=t.current.pointer;p&&p.x===u&&p.y===E||(t.current.pointer={x:u,y:E},n())},l=()=>{t.current.pointer!==null&&(t.current.pointer=null,t.current.mouseDownPosition=null,n())},B=Q=>{t.current.mouseDownPosition={x:Q.clientX,y:Q.clientY}},C=Q=>{const{clientX:u,clientY:E}=Q,p=t.current.mouseDownPosition;if(p&&Math.sqrt(Math.pow(u-p.x,2)+Math.pow(E-p.y,2))>FVe){t.current.mouseDownPosition=null;return}t.current.mouseDownPosition=null;for(const f of t.current.boundingBoxes.values()){const m=f.bounds;m&&u>=m.minX&&u<=m.maxX&&E>=m.minY&&E<=m.maxY&&f.onClick?.(Q)}};return window.addEventListener("pointermove",I,{passive:!0}),window.addEventListener("pointerdown",I,{passive:!0}),window.addEventListener("pointerup",I,{passive:!0}),window.addEventListener("pointerleave",l),window.addEventListener("pointercancel",l),window.addEventListener("blur",l),window.addEventListener("mousedown",B,{passive:!0}),window.addEventListener("click",C,{passive:!0}),()=>{window.removeEventListener("pointermove",I),window.removeEventListener("pointerdown",I),window.removeEventListener("pointerup",I),window.removeEventListener("pointerleave",l),window.removeEventListener("pointercancel",l),window.removeEventListener("blur",l),window.removeEventListener("mousedown",B),window.removeEventListener("click",C)}},[n]);const c=cA.useMemo(()=>({registerBoundingBox:o,updateBoundingBox:s,unregisterBoundingBox:r,subscribe:a,isHovering:g}),[o,s,r,a,g]);return iA.jsx(IwA.Provider,{value:c,children:e})},MVe=e=>{const A=cA.useContext(IwA);if(!A)throw new Error("useMouseEventsOverBoundingBox must be used within a MouseTracker");const t=cA.useId(),i=cA.useRef(e);i.current=e;const n=cA.useMemo(()=>s=>{i.current.onClick?.(s)},[]);return cA.useEffect(()=>(A.registerBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?n:void 0}),()=>{A.unregisterBoundingBox(t)}),[A,n,t]),cA.useEffect(()=>{A.updateBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?n:void 0})},[A,n,t,e.bounds?.minX,e.bounds?.maxX,e.bounds?.minY,e.bounds?.maxY,e.onClick]),{hovering:cA.useSyncExternalStore(A.subscribe,()=>A.isHovering(t),()=>!1)}},LVe=(e,A)=>!e&&!A?!0:!e||!A?!1:Math.abs(e.bounds.minX-A.bounds.minX)<.5&&Math.abs(e.bounds.maxX-A.bounds.maxX)<.5&&Math.abs(e.bounds.minY-A.bounds.minY)<.5&&Math.abs(e.bounds.maxY-A.bounds.maxY)<.5&&Math.abs(e.rect.left-A.rect.left)<.5&&Math.abs(e.rect.top-A.rect.top)<.5&&Math.abs(e.rect.width-A.rect.width)<.5&&Math.abs(e.rect.height-A.rect.height)<.5,UVe=({componentId:e,svgDivRef:A,containerRef:t,onComponentClick:i,onHoverChange:n,showOutline:o,circuitJsonKey:s})=>{const[r,a]=cA.useState(null),g=cA.useRef(null),c=cA.useCallback(()=>{g.current=null;const u=A.current,E=t.current;if(!u||!E){a(_=>_&&null);return}const p=u.querySelector(`[data-schematic-component-id="${e}"]`);if(!p){a(_=>_&&null);return}const f=p.getBoundingClientRect(),m=E.getBoundingClientRect(),S={bounds:{minX:f.left,maxX:f.right,minY:f.top,maxY:f.bottom},rect:{left:f.left-m.left,top:f.top-m.top,width:f.width,height:f.height}};a(_=>LVe(_,S)?_:S)},[e,t,A]),I=cA.useCallback(()=>{g.current===null&&(g.current=window.requestAnimationFrame(c))},[c]);cA.useEffect(()=>{I()},[I,s]),cA.useEffect(()=>{I();const u=A.current,E=t.current;if(!u||!E)return;const p=typeof ResizeObserver<"u"?new ResizeObserver(()=>{I()}):null;p?.observe(E),p?.observe(u);const f=typeof MutationObserver<"u"?new MutationObserver(()=>{I()}):null;return f?.observe(u,{attributes:!0,attributeFilter:["style","transform"],subtree:!0,childList:!0}),window.addEventListener("scroll",I,!0),window.addEventListener("resize",I),()=>{p?.disconnect(),f?.disconnect(),window.removeEventListener("scroll",I,!0),window.removeEventListener("resize",I),g.current!==null&&(cancelAnimationFrame(g.current),g.current=null)}},[I,A,t]);const l=cA.useCallback(u=>{i&&i(e,u)},[e,i]),B=r?.bounds??null,{hovering:C}=MVe({bounds:B,onClick:i?l:void 0});if(cA.useEffect(()=>{n&&n(e,C)},[C,e,n]),!r||!C||!o)return null;const Q=r.rect;return iA.jsx("div",{style:{position:"absolute",left:Q.left,top:Q.top,width:Q.width,height:Q.height,border:"1.5px solid rgba(51, 153, 255, 0.9)",pointerEvents:"none",zIndex:mk.schematicComponentHoverOutline}})},HVe=({circuitJson:e,containerStyle:A,editEvents:t=[],onEditEvent:i,defaultEditMode:n=!1,debugGrid:o=!1,editingEnabled:s=!1,debug:r=!1,clickToInteractEnabled:a=!1,colorOverrides:g,spiceSimulationEnabled:c=!1,disableGroups:I=!1,onSchematicComponentClicked:l})=>{r&&lVe();const[B,C]=cA.useState(!1),[Q,u]=cA.useState({showVoltage:!0,showCurrent:!1,startTime:0,duration:20}),E=Et=>`${Et?.length||0}_${Et?.editCount||0}`,p=cA.useMemo(()=>E(e),[e]),f=cA.useMemo(()=>{if(!c)return null;try{return vVe(e,Q)}catch(Et){return console.error("Failed to generate SPICE string",Et),null}},[p,c,Q.startTime,Q.duration]),[m,S]=cA.useState(!1);cA.useEffect(()=>{S(!1)},[p]);const{plotData:_,nodes:v,isLoading:D,error:k}=SVe(m?f:null),[x,M]=cA.useState(n),[N,T]=cA.useState(!0),[q,P]=cA.useState(!a),[V,z]=cA.useState(!1),[oA,gA]=cA.useState(()=>I?!1:kVe("schematic_viewer_show_groups",!1)),[QA,tA]=cA.useState(!1),rA=cA.useRef(new Set),IA=cA.useCallback((Et,bt)=>{bt?rA.current.add(Et):rA.current.delete(Et),tA(rA.current.size>0)},[]),DA=cA.useRef(null),bA=cA.useRef(null),HA=cA.useMemo(()=>{try{return vd(e).schematic_component?.list()?.map(Et=>Et.schematic_component_id)??[]}catch(Et){return console.error("Failed to derive schematic component ids",Et),[]}},[p,e]),JA=Et=>{const bt=Et.touches[0];bA.current={x:bt.clientX,y:bt.clientY}},GA=Et=>{const bt=Et.changedTouches[0],yt=bA.current;if(!yt)return;const Kt=Math.abs(bt.clientX-yt.x),Xt=Math.abs(bt.clientY-yt.y);Kt<10&&Xt<10&&(Et.preventDefault(),P(!0)),bA.current=null},[aA,mA]=cA.useState([]),fA=cA.useRef(e);cA.useEffect(()=>{const Et=E(e),bt=E(fA.current);Et!==bt&&(mA([]),fA.current=e)},[e]);const{ref:ZA,cancelDrag:tt,transform:at}=kmA({onSetTransform(Et){DA.current&&(DA.current.style.transform=Tm(Et))},enabled:q&&!B}),{containerWidth:vA,containerHeight:FA}=CVe(ZA),dA=cA.useMemo(()=>!vA||!FA?"":bmA(e,{width:vA,height:FA||720,grid:o?{cellSize:1,labelCells:!0}:void 0,colorOverrides:g}),[p,vA,FA]),uA=cA.useMemo(()=>dA.match(/<svg[^>]*style="[^"]*background-color:\s*([^;\"]+)/i)?.[1]??"transparent",[dA]),UA=cA.useMemo(()=>{if(!dA)return RB();const Et=dA.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(Et)}catch(bt){return console.error(bt),RB()}},[dA]),RA=Et=>{mA(bt=>[...bt,Et]),i&&i(Et)},kA=cA.useMemo(()=>[...t,...aA],[t,aA]),{handleMouseDown:KA,handleTouchStart:YA,isDragging:XA,activeEditEvent:et}=QVe({onEditEvent:RA,cancelDrag:tt,realToSvgProjection:UA,svgToScreenProjection:at,circuitJson:e,editEvents:kA,enabled:x&&q&&!B,snapToGrid:N});rVe({svgDivRef:DA,editEvents:kA,realToSvgProjection:UA,svgToScreenProjection:at,activeEditEvent:et}),aVe({svgDivRef:DA,circuitJson:e,activeEditEvent:et,editEvents:kA}),gVe({svgDivRef:DA,circuitJson:e,circuitJsonKey:p,showGroups:oA&&!I});const It=cA.useRef(YA);cA.useEffect(()=>{It.current=YA},[YA]);const ut=cA.useMemo(()=>iA.jsx("div",{ref:DA,style:{pointerEvents:a?q?"auto":"none":"auto",transformOrigin:"0 0"},className:l?"schematic-component-clickable":void 0,onTouchStart:Et=>{x&&q&&!B&&It.current(Et)},dangerouslySetInnerHTML:{__html:dA}}),[dA,q,a,x,B]);return iA.jsxs(GVe,{children:[l&&iA.jsx("style",{children:".schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }"}),iA.jsxs("div",{ref:ZA,style:{position:"relative",backgroundColor:uA,overflow:"hidden",cursor:B?"auto":XA?"grabbing":a&&!q||QA&&l?"pointer":"grab",minHeight:"300px",...A},onWheelCapture:Et=>{B&&Et.stopPropagation()},onMouseDown:Et=>{if(a&&!q){Et.preventDefault(),Et.stopPropagation();return}KA(Et)},onMouseDownCapture:Et=>{if(a&&!q){Et.preventDefault(),Et.stopPropagation();return}},onTouchStart:Et=>{B||JA(Et)},onTouchEnd:Et=>{B||GA(Et)},children:[!q&&a&&iA.jsx("div",{onClick:Et=>{Et.preventDefault(),Et.stopPropagation(),P(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:mk.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all",touchAction:"pan-x pan-y pinch-zoom"},children:iA.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})}),iA.jsx(dVe,{active:V,onClick:()=>z(!V)}),s&&iA.jsx(uVe,{active:x,onClick:()=>M(!x)}),s&&x&&iA.jsx(EVe,{active:N,onClick:()=>T(!N)}),iA.jsx(fVe,{circuitJson:e,circuitJsonKey:p,isVisible:V,onClose:()=>z(!1),showGroups:oA,onToggleGroups:Et=>{I||(gA(Et),RVe("schematic_viewer_show_groups",Et))}}),c&&iA.jsx(mVe,{onClick:()=>C(!0)}),B&&iA.jsx(DVe,{spiceString:f,onClose:()=>C(!1),plotData:_,nodes:v,isLoading:D,error:k,simOptions:Q,onSimOptionsChange:Et=>{S(!0),u(Et)},hasRun:m}),l&&HA.map(Et=>iA.jsx(UVe,{componentId:Et,svgDivRef:DA,containerRef:ZA,showOutline:!0,circuitJsonKey:p,onHoverChange:IA,onComponentClick:(bt,yt)=>{l?.({schematicComponentId:bt,event:yt})}},Et)),ut]})]})},cCt=e=>{const[A,t]=cA.useState(0),[i,n]=cA.useState(0);return cA.useEffect(()=>{if(!e.current)return;const o=()=>{const r=e.current?.getBoundingClientRect();t(r?.width||0),n(r?.height||0)};o();const s=new ResizeObserver(o);return s.observe(e.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:A,containerHeight:i}};sB("assembly-viewer");var ICt=()=>{sB.enable("assembly-viewer*")},YVe=({circuitJson:e,containerStyle:A,debugGrid:t=!1,debug:i=!1})=>{i&&ICt();const n=cA.useRef(null),{ref:o}=kmA({onSetTransform(c){n.current&&(n.current.style.transform=Tm(c))}}),{containerWidth:s,containerHeight:r}=cCt(o),a=cA.useMemo(()=>!s||!r?"":YIt(e,{width:s,height:r||720}),[e,s,r]);cA.useMemo(()=>{if(!a)return RB();const c=a.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(c)}catch(I){return console.error(I),RB()}},[a]);const g=cA.useMemo(()=>iA.jsx("div",{ref:n,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:a}}),[a]);return iA.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...A},children:g})},JVe=({circuitJson:e,containerStyle:A,debugGrid:t=!1,debug:i=!1})=>{i&&ICt();const n=cA.useRef(null),{ref:o}=kmA({onSetTransform(c){n.current&&(n.current.style.transform=Tm(c))}}),{containerWidth:s,containerHeight:r}=cCt(o),a=cA.useMemo(()=>!s||!r?"":_mA(e,{width:s,height:r||720}),[e,s,r]);cA.useMemo(()=>{if(!a)return RB();const c=a.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(c)}catch(I){return console.error(I),RB()}},[a]);const g=cA.useMemo(()=>iA.jsx("div",{ref:n,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:a}}),[a]);return iA.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...A},children:g})};const lCt=["Initialize a tscircuit project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export",'Use units like mm or mils consistently across your designs (e.g. pcbX="10mm")',"Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/guides/running-tscircuit/displaying-circuit-json-on-a-webpage#react-display-all-available-previews-with-circuitjsonpreview-) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Check out the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to upvote features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],TVe=(()=>{let e=lCt[Math.floor(Math.random()*lCt.length)];return e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(A,t)=>`<a class="rf-text-blue-500 rf-underline" href="${A}" target="_blank">${A}</a>`),e=e.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),e})(),wk=({onRunClicked:e})=>iA.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[iA.jsx(I3e,{className:"rf-size-14 rf-mb-4"}),iA.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",iA.jsx("span",{dangerouslySetInnerHTML:{__html:TVe}})]}),e&&iA.jsxs(uC,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:e,children:["Run Code",iA.jsx(vgt,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),qj=({text:e,onClick:A})=>iA.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:A,children:e}),Pj=e=>iA.jsxs("div",{className:"rf-leading-5",children:[iA.jsx("div",{className:"rf-py-2 rf-font-bold",children:e.column.name}),iA.jsx("div",{children:e.field?.()??iA.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:A=>{e.onTextChange?.(A.target.value)}})})]}),KVe=({open:e,children:A,title:t,onClose:i})=>e?iA.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:i,children:iA.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:n=>{n.preventDefault(),n.stopPropagation()},children:[iA.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),iA.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:i,children:"×"}),A]})}):null,qVe=({elements:e})=>{const[A,t]=cA.useState({open:!1}),[i,n]=cA.useReducer((c,I)=>({...c,...I}),{}),o=[...new Set(e.map(c=>c.type))],s=e.map(c=>{const I=c[`${c.type}_id`],l=Object.fromEntries(Object.entries(c).filter(([C])=>!(C===`${c.type}_id`||!C.endsWith("_id")))),B=Object.fromEntries(Object.entries(c).filter(([C])=>!C.endsWith("_id")));return{primary_id:I,other_ids:l,...B,_og_elm:c}}),r=s.map(c=>{let I="";const l=B=>{const C=Object.keys(B.other_ids).find(E=>E.startsWith("source_"));if(!C)return`.${B.name}`;const Q=C.slice(0,-3),u=s.find(E=>E.type===Q&&E.primary_id===B.other_ids[C]);return u?"name"in u?`${l(u)} > .${B.name}`:`#${u.primary_id} > .${B.name}`:`??? > .${B.name}`};return"name"in c&&(I=l(c)),{...c,selector_path:I}}),a=[{key:"primary_id",name:"primary_id",renderCell:c=>iA.jsxs("div",{className:"rf-flex rf-items-center",children:[iA.jsx(qj,{text:c.primary_id,onClick:()=>n({focused_id:c.primary_id,id_search:void 0,selector_search:void 0})}),iA.jsx("span",{className:"rf-flex-grow"}),iA.jsx(qj,{text:"(JSON)",onClick:()=>t({open:!0,element:c._og_elm,title:c.primary_id})})]}),renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({id_search:I}),field:i.focused_id?()=>iA.jsxs("div",{children:["Focus:"," ",iA.jsx("span",{className:"rf-underline",children:i.focused_id}),iA.jsx(qj,{text:"(unfocus)",onClick:()=>n({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:c=>iA.jsx(Pj,{column:c,field:()=>iA.jsxs("select",{onChange:I=>n({component_type_filter:I.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[iA.jsx("option",{value:"any",children:"any"},"any"),iA.jsx("option",{value:"source",children:"source"},"source"),iA.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),iA.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),o.map(I=>iA.jsx("option",{value:I,children:I},I))]})})},{key:"name",name:"name",renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({name_search:I})})},{key:"selector_path",name:"selector_path",renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({selector_search:I})})},{key:"other_ids",name:"other_ids",renderCell:c=>iA.jsx("div",{className:"rf-space-x-2",children:Object.entries(c.other_ids).map(([I,l])=>iA.jsx(qj,{text:l,onClick:()=>n({focused_id:l})},l))})}],g=r.filter(c=>i.name_search?c.name?.toLowerCase()?.includes(i.name_search.toLowerCase()):!0).filter(c=>!i.component_type_filter||i.component_type_filter==="any"?!0:i.component_type_filter==="source"?c.type.startsWith("source_"):i.component_type_filter==="source/pcb"?c.type.startsWith("source_")||c.type.startsWith("pcb_"):i.component_type_filter==="source/schematic"?c.type.startsWith("source_")||c.type.startsWith("schematic_"):c.type?.includes(i.component_type_filter)).filter(c=>i.selector_search?i.selector_search.split(" ").filter(l=>l.length>0).every(l=>c.selector_path?.includes(l)):!0).filter(c=>i.id_search?c.primary_id?.includes(i.id_search):!0).filter(c=>!!(!i.focused_id||c.primary_id===i.focused_id||Object.values(c.other_ids).includes(i.focused_id)));return iA.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[iA.jsx("div",{className:"rf-overflow-x-auto",children:iA.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[iA.jsx("thead",{children:iA.jsx("tr",{children:a.map(c=>iA.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:c.renderHeaderCell?c.renderHeaderCell(c):c.name},c.key))})}),iA.jsx("tbody",{children:g.map((c,I)=>iA.jsx("tr",{className:"rf-hover:bg-gray-100",children:a.map(l=>iA.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:l.renderCell?l.renderCell(c):c[l.key]},l.key))},I))})]})}),iA.jsx(KVe,{open:A.open,onClose:()=>t({open:!1}),title:A.open?A.title:"",children:iA.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:iA.jsx("pre",{className:"rf-whitespace-pre-wrap",children:A.open?JSON.stringify(A.element,null,2):""})})})]})},PVe=(e,A)=>e==="jlcpcb"?iA.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${A}`,children:A}):A,OVe=({circuitJson:e})=>{const A=e.filter(i=>i.type==="source_component"),t=new Set;for(const i of A)if(i.supplier_part_numbers)for(const n of Object.keys(i.supplier_part_numbers))t.add(n);return iA.jsx("div",{className:"rf-overflow-x-auto",children:iA.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[iA.jsx("thead",{children:iA.jsxs("tr",{className:"rf-border-b",children:[iA.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(i=>iA.jsx("th",{className:"rf-p-2 rf-capitalize",children:i},i))]})}),iA.jsx("tbody",{children:A.map(i=>iA.jsxs("tr",{className:"rf-border-b",children:[iA.jsx("td",{className:"rf-p-2",children:i.name}),Array.from(t).map(n=>iA.jsx("td",{className:"rf-p-2",children:PVe(n,i.supplier_part_numbers?.[n]?.[0]||"")},n))]},i.source_component_id))})]})})},lwA=cA.forwardRef(({className:e,type:A,...t},i)=>iA.jsx("input",{type:A,className:Bo("rf-flex rf-h-9 rf-w-full rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-px-3 rf-py-1 rf-text-sm rf-shadow-sm rf-transition-colors file:rf-border-0 file:rf-bg-transparent file:rf-text-sm file:rf-font-medium placeholder:rf-text-zinc-500 focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-placeholder-zinc-400 dark:focus-visible:rf-ring-zinc-300",e),ref:i,...t}));lwA.displayName="Input";var BCt={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},BwA=new Set;for(const[e,A]of Object.entries(BCt)){BwA.add(e);for(const t of Object.keys(A.variants))BwA.add(t)}function WVe(e){for(const[A,t]of Object.entries(BCt))if(e in t.variants)return{baseUnit:t.baseUnit,conversionFactor:t.variants[e]};return{baseUnit:e,conversionFactor:1}}var CCt={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12};function ix(e){if(e==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof e=="string"&&e.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(e),parsedUnit:null,unitOfValue:null};if(typeof e=="number")return{value:e,parsedUnit:null,unitOfValue:null};if(typeof e=="object"&&"x"in e&&"y"in e){const{parsedUnit:r,unitOfValue:a}=ix(e.x),g=ix(e.x),c=ix(e.y);return g.value===null||c.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:r,unitOfValue:a,value:{x:g.value,y:c.value}}}const t=e.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!t)throw new Error(`Could not determine unit: "${e}"`);const i=t.split("").reverse().join(""),n=e.slice(0,-i.length);if(i in CCt&&!BwA.has(i)){const r=CCt[i];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(n)*r}}const{baseUnit:o,conversionFactor:s}=WVe(i);return{parsedUnit:i,unitOfValue:o,value:s*Number.parseFloat(n)}}var Oj=F().or(SA()).transform(e=>ix(e).value),CwA=F().or(SA()).transform(e=>ix(e).value).transform(e=>Number.parseFloat(e.toPrecision(12))),hCt=F().or(SA()).transform(e=>ix(e).value),VF=F().or(SA()).transform(e=>ix(e).value),mo=F().or(SA()).transform(e=>ix(e).value),Wj=F().or(SA()).transform(e=>ix(e).value),Xe=mo,ZVe=F().or(SA()).transform(e=>ix(e).value),p4=F().or(SA()).transform(e=>ix(e).value),VVe=p4,jF=p4,QCt=F().datetime(),rw=F().or(SA()).transform(e=>typeof e=="number"?e:e.endsWith("deg")?Number.parseFloat(e.split("deg")[0]):e.endsWith("rad")?Number.parseFloat(e.split("rad")[0])*180/Math.PI:Number.parseFloat(e)),uCt=SA().or(F().endsWith("mAh")).transform(e=>{if(typeof e=="string"){const A=e.replace("mAh",""),t=Number.parseFloat(A);if(Number.isNaN(t))throw new Error("Invalid capacity");return t}return e}).describe("Battery capacity in mAh"),ds=xA({x:Xe,y:Xe}),jVe=ds,f4=xA({x:Xe,y:Xe,z:Xe}),zVe=f4,hwA=xA({width:SA(),height:SA()}),XVe=e=>{const A="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:e},()=>A[Math.floor(Math.random()*A.length)]).join("")},Ti=e=>F().optional().default(()=>`${e}_${XVe(10)}`),y4=Ot(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),ECt=Ot(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Nd=xA({type:CA("source_component"),ftype:F().optional(),source_component_id:F(),name:F(),manufacturer_part_number:F().optional(),supplier_part_numbers:hs(ECt,gt(F())).optional(),display_value:F().optional(),are_pins_interchangeable:$A().optional(),internally_connected_source_port_ids:gt(gt(F())).optional(),source_group_id:F().optional(),subcircuit_id:F().optional()}),QwA=Nd.extend({ftype:CA("simple_capacitor"),capacitance:CwA,max_voltage_rating:VF.optional(),display_capacitance:F().optional(),max_decoupling_trace_length:Xe.optional()}),uwA=Nd.extend({ftype:CA("simple_resistor"),resistance:Oj,display_resistance:F().optional()}),Zj=Nd.extend({ftype:CA("simple_diode")}),EwA=Zj.extend({ftype:CA("simple_led"),color:F().optional(),wavelength:F().optional()}),dCt=Nd.extend({ftype:CA("simple_ground")}),dwA=Nd.extend({ftype:CA("simple_chip")}),pwA=Nd.extend({ftype:CA("simple_power_source"),voltage:VF}),$Ve=Nd.extend({ftype:CA("simple_fuse"),current_rating_amps:SA().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:SA().describe("Voltage rating in volts, e.g. ±5V would be 5")}),fwA=Nd.extend({ftype:CA("simple_battery"),capacity:uCt}),ywA=Nd.extend({ftype:CA("simple_inductor"),inductance:hCt,max_current_rating:SA().optional()}),mwA=Nd.extend({ftype:CA("simple_push_button")}),wwA=Nd.extend({ftype:CA("simple_potentiometer"),max_resistance:Oj}),pCt=Nd.extend({ftype:CA("simple_crystal"),frequency:SA().describe("Frequency in Hz"),load_capacitance:SA().optional().describe("Load capacitance in pF")}),DwA=Nd.extend({ftype:CA("simple_pin_header"),pin_count:SA(),gender:Ot(["male","female"]).optional().default("male")}),_wA=Nd.extend({ftype:CA("simple_pinout")}),xwA=Nd.extend({ftype:CA("simple_resonator"),load_capacitance:CwA,equivalent_series_resistance:Oj.optional(),frequency:Wj}),bwA=Nd.extend({ftype:CA("simple_transistor"),transistor_type:Ot(["npn","pnp"])}),SwA=Nd.extend({ftype:CA("simple_test_point"),footprint_variant:Ot(["pad","through_hole"]).optional(),pad_shape:Ot(["rect","circle"]).optional(),pad_diameter:Ye([SA(),F()]).optional(),hole_diameter:Ye([SA(),F()]).optional(),width:Ye([SA(),F()]).optional(),height:Ye([SA(),F()]).optional()}),vwA=Nd.extend({ftype:CA("simple_mosfet"),channel_type:Ot(["n","p"]),mosfet_mode:Ot(["enhancement","depletion"])}),kwA=Nd.extend({ftype:CA("simple_switch")}),RwA=xA({type:CA("source_project_metadata"),name:F().optional(),software_used_string:F().optional(),project_url:F().optional(),created_at:QCt.optional()}),fCt=xA({type:CA("source_missing_property_error"),source_missing_property_error_id:Ti("source_missing_property_error"),source_component_id:F(),property_name:F(),subcircuit_id:F().optional(),error_type:CA("source_missing_property_error").default("source_missing_property_error"),message:F()}).describe("The source code is missing a property"),yCt=xA({type:CA("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:Ti("source_failed_to_create_component_error"),error_type:CA("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:F().optional(),subcircuit_id:F().optional(),parent_source_component_id:F().optional(),message:F(),pcb_center:xA({x:SA().optional(),y:SA().optional()}).optional(),schematic_center:xA({x:SA().optional(),y:SA().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),FwA=xA({type:CA("source_trace_not_connected_error"),source_trace_not_connected_error_id:Ti("source_trace_not_connected_error"),error_type:CA("source_trace_not_connected_error").default("source_trace_not_connected_error"),message:F(),subcircuit_id:F().optional(),source_group_id:F().optional(),source_trace_id:F().optional(),connected_source_port_ids:gt(F()).optional(),selectors_not_found:gt(F()).optional()}).describe("Occurs when a source trace selector does not match any ports"),mCt=xA({type:CA("source_property_ignored_warning"),source_property_ignored_warning_id:Ti("source_property_ignored_warning"),source_component_id:F(),property_name:F(),subcircuit_id:F().optional(),error_type:CA("source_property_ignored_warning").default("source_property_ignored_warning"),message:F()}).describe("The source property was ignored"),NwA=xA({type:CA("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:Ti("source_pin_missing_trace_warning"),warning_type:CA("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:F(),source_component_id:F(),source_port_id:F(),subcircuit_id:F().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),wCt=Nd.extend({ftype:CA("simple_voltage_probe")}),DCt=Ye([uwA,QwA,Zj,EwA,dCt,dwA,pwA,fwA,ywA,mwA,wwA,pCt,DwA,_wA,xwA,kwA,bwA,SwA,vwA,$Ve,wCt,RwA,fCt,yCt,FwA,mCt,NwA]),_Ct=xA({type:CA("source_port"),pin_number:SA().optional(),port_hints:gt(F()).optional(),name:F(),source_port_id:F(),source_component_id:F().optional(),source_group_id:F().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),must_be_connected:$A().optional()}),xCt=xA({type:CA("source_trace"),source_trace_id:F(),connected_source_port_ids:gt(F()),connected_source_net_ids:gt(F()),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),max_length:SA().optional(),min_trace_thickness:SA().optional(),display_name:F().optional()}),bCt=xA({type:CA("source_group"),source_group_id:F(),subcircuit_id:F().optional(),parent_subcircuit_id:F().optional(),parent_source_group_id:F().optional(),is_subcircuit:$A().optional(),show_as_schematic_box:$A().optional(),name:F().optional(),was_automatically_named:$A().optional()}),SCt=xA({type:CA("source_net"),source_net_id:F(),name:F(),member_source_group_ids:gt(F()),is_power:$A().optional(),is_ground:$A().optional(),is_digital_signal:$A().optional(),is_analog_signal:$A().optional(),is_positive_voltage_source:$A().optional(),trace_width:SA().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional()}),vCt=xA({type:CA("source_board"),source_board_id:F(),source_group_id:F(),title:F().optional()}).describe("Defines a board in the source domain"),kCt=xA({type:CA("source_pcb_ground_plane"),source_pcb_ground_plane_id:F(),source_group_id:F(),source_net_id:F(),subcircuit_id:F().optional()}).describe("Defines a ground plane in the source domain"),RCt=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],GwA=Ot(RCt),pI=GwA.or(xA({name:GwA})).transform(e=>typeof e=="string"?e:e.name),nx=Ot(["top","bottom"]),FCt=xA({type:CA("source_manually_placed_via"),source_manually_placed_via_id:F(),source_group_id:F(),source_net_id:F(),subcircuit_id:F().optional(),source_trace_id:F().optional()}).describe("Defines a via that is manually placed in the source domain"),NCt=xA({type:CA("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:Ti("source_pin_must_be_connected_error"),error_type:CA("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),message:F(),source_component_id:F(),source_port_id:F(),subcircuit_id:F().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace"),GCt=xA({type:CA("unknown_error_finding_part"),unknown_error_finding_part_id:Ti("unknown_error_finding_part"),error_type:CA("unknown_error_finding_part").default("unknown_error_finding_part"),message:F(),source_component_id:F().optional(),subcircuit_id:F().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),MCt=xA({type:CA("schematic_box"),schematic_component_id:F().optional(),width:Xe,height:Xe,is_dashed:$A().default(!1),x:Xe,y:Xe,subcircuit_id:F().optional()}).describe("Draws a box on the schematic"),LCt=xA({type:CA("schematic_path"),schematic_component_id:F(),fill_color:Ot(["red","blue"]).optional(),is_filled:$A().optional(),points:gt(ds),subcircuit_id:F().optional()}),UCt=hs(xA({left_margin:mo.optional(),right_margin:mo.optional(),top_margin:mo.optional(),bottom_margin:mo.optional()})),HCt=xA({left_size:SA(),right_size:SA(),top_size:SA().optional(),bottom_size:SA().optional()}),YCt=xA({left_side:xA({pins:gt(SA()),direction:Ot(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:xA({pins:gt(SA()),direction:Ot(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:xA({pins:gt(SA()),direction:Ot(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:xA({pins:gt(SA()),direction:Ot(["left-to-right","right-to-left"]).optional()}).optional()}),JCt=Ye([HCt,YCt]),TCt=xA({type:CA("schematic_component"),size:hwA,center:ds,source_component_id:F().optional(),schematic_component_id:F(),pin_spacing:mo.optional(),pin_styles:UCt.optional(),box_width:mo.optional(),symbol_name:F().optional(),port_arrangement:JCt.optional(),port_labels:hs(F()).optional(),symbol_display_value:F().optional(),subcircuit_id:F().optional(),schematic_group_id:F().optional(),is_schematic_group:$A().optional(),source_group_id:F().optional(),is_box_with_pins:$A().optional().default(!0)}),KCt=xA({type:CA("schematic_line"),schematic_line_id:Ti("schematic_line"),schematic_component_id:F(),x1:Xe,y1:Xe,x2:Xe,y2:Xe,stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled line on the schematic"),qCt=xA({type:CA("schematic_rect"),schematic_rect_id:Ti("schematic_rect"),schematic_component_id:F(),center:ds,width:Xe,height:Xe,rotation:rw.default(0),stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_filled:$A().default(!1),fill_color:F().optional(),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled rectangle on the schematic"),PCt=xA({type:CA("schematic_circle"),schematic_circle_id:Ti("schematic_circle"),schematic_component_id:F(),center:ds,radius:Xe,stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_filled:$A().default(!1),fill_color:F().optional(),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled circle on the schematic"),OCt=xA({type:CA("schematic_arc"),schematic_arc_id:Ti("schematic_arc"),schematic_component_id:F(),center:ds,radius:Xe,start_angle_degrees:rw,end_angle_degrees:rw,direction:Ot(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled arc on the schematic"),WCt=xA({type:CA("schematic_trace"),schematic_trace_id:F(),source_trace_id:F().optional(),junctions:gt(xA({x:SA(),y:SA()})),edges:gt(xA({from:xA({x:SA(),y:SA()}),to:xA({x:SA(),y:SA()}),is_crossing:$A().optional(),from_schematic_port_id:F().optional(),to_schematic_port_id:F().optional()})),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional()}),Aje=Ot(["center","left","right","top","bottom"]),ZCt=xA({type:CA("schematic_text"),schematic_component_id:F().optional(),schematic_text_id:F(),text:F(),font_size:SA().default(.18),position:xA({x:Xe,y:Xe}),rotation:SA().default(0),anchor:Ye([Aje.describe("legacy"),y4]).default("center"),color:F().default("#000000"),subcircuit_id:F().optional()}),VCt=xA({type:CA("schematic_port"),schematic_port_id:F(),source_port_id:F(),schematic_component_id:F().optional(),center:ds,facing_direction:Ot(["up","down","left","right"]).optional(),distance_from_component_edge:SA().optional(),side_of_component:Ot(["top","bottom","left","right"]).optional(),true_ccw_index:SA().optional(),pin_number:SA().optional(),display_pin_label:F().optional(),subcircuit_id:F().optional(),is_connected:$A().optional(),has_input_arrow:$A().optional(),has_output_arrow:$A().optional()}).describe("Defines a port on a schematic component"),jCt=xA({type:CA("schematic_net_label"),schematic_net_label_id:Ti("schematic_net_label"),schematic_trace_id:F().optional(),source_trace_id:F().optional(),source_net_id:F(),center:ds,anchor_position:ds.optional(),anchor_side:Ot(["top","bottom","left","right"]),text:F(),symbol_name:F().optional(),is_movable:$A().optional(),subcircuit_id:F().optional()}),zCt=xA({type:CA("schematic_error"),schematic_error_id:F(),error_type:CA("schematic_port_not_found").default("schematic_port_not_found"),message:F(),subcircuit_id:F().optional()}).describe("Defines a schematic error on the schematic"),XCt=xA({type:CA("schematic_layout_error"),schematic_layout_error_id:Ti("schematic_layout_error"),error_type:CA("schematic_layout_error").default("schematic_layout_error"),message:F(),source_group_id:F(),schematic_group_id:F(),subcircuit_id:F().optional()}).describe("Error emitted when schematic layout fails for a group"),Vj=xA({type:CA("schematic_debug_object"),label:F().optional(),subcircuit_id:F().optional()}),$Ct=Vj.extend({shape:CA("rect"),center:ds,size:hwA}),Aht=Vj.extend({shape:CA("line"),start:ds,end:ds}),tht=Vj.extend({shape:CA("point"),center:ds}),eht=Th("shape",[$Ct,Aht,tht]),iht=xA({type:CA("schematic_voltage_probe"),schematic_voltage_probe_id:F(),source_component_id:F().optional(),name:F().optional(),position:ds,schematic_trace_id:F(),voltage:VF.optional(),subcircuit_id:F().optional(),color:F().optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),nht=xA({type:CA("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:Ti("schematic_manual_edit_conflict_warning"),warning_type:CA("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:F(),schematic_component_id:F(),schematic_group_id:F().optional(),subcircuit_id:F().optional(),source_component_id:F()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),oht=xA({type:CA("schematic_group"),schematic_group_id:Ti("schematic_group"),source_group_id:F(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo,height:mo,center:ds,schematic_component_ids:gt(F()),show_as_schematic_box:$A().optional(),name:F().optional(),description:F().optional()}).describe("Defines a group of components on the schematic"),sht=xA({type:CA("schematic_table"),schematic_table_id:Ti("schematic_table"),anchor_position:ds,column_widths:gt(Xe),row_heights:gt(Xe),cell_padding:Xe.optional(),border_width:Xe.optional(),subcircuit_id:F().optional(),schematic_component_id:F().optional(),anchor:y4.optional()}).describe("Defines a table on the schematic"),rht=xA({type:CA("schematic_table_cell"),schematic_table_cell_id:Ti("schematic_table_cell"),schematic_table_id:F(),start_row_index:SA(),end_row_index:SA(),start_column_index:SA(),end_column_index:SA(),text:F().optional(),center:ds,width:Xe,height:Xe,horizontal_align:Ot(["left","center","right"]).optional(),vertical_align:Ot(["top","middle","bottom"]).optional(),font_size:Xe.optional(),subcircuit_id:F().optional()}).describe("Defines a cell within a schematic_table"),aht=xA({type:CA("schematic_sheet"),schematic_sheet_id:Ti("schematic_sheet"),name:F().optional(),subcircuit_id:F().optional()}).describe("Defines a schematic sheet or page that components can be placed on"),ght=xA({x:Xe,y:Xe,bulge:SA().optional()}),MwA=xA({vertices:gt(ght)}),cht=xA({outer_ring:MwA,inner_rings:gt(MwA).default([])}),Iht=xA({x:Xe,y:Xe,via:$A().optional(),via_to_layer:pI.optional()}),tje=gt(Iht),lht=xA({x:Xe,y:Xe,via:$A().optional(),to_layer:pI.optional(),trace_width:Xe.optional()}),Bht=xA({type:CA("pcb_component"),pcb_component_id:Ti("pcb_component"),source_component_id:F(),center:ds,layer:pI,rotation:rw,width:mo,height:mo,do_not_place:$A().optional(),subcircuit_id:F().optional(),pcb_group_id:F().optional(),position_mode:Ot(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:F().optional(),obstructs_within_bounds:$A().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),Cht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("circle"),hole_diameter:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),eje=Cht.describe("Defines a circular hole on the PCB"),hht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rect"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),ije=hht.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."),Qht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:Ot(["circle","square"]),hole_diameter:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),nje=Qht.describe("Defines a circular or square hole on the PCB"),uht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("oval"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),oje=uht.describe("Defines an oval hole on the PCB"),Eht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("pill"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),sje=Eht.describe("Defines a pill-shaped hole on the PCB"),dht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rotated_pill"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,ccw_rotation:rw,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),rje=dht.describe("Defines a rotated pill-shaped hole on the PCB"),pht=Qht.or(uht).or(Eht).or(dht).or(Cht).or(hht),aje=xA({type:CA("pcb_plated_hole"),shape:CA("circle"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),outer_diameter:SA(),hole_diameter:SA(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional(),is_covered_with_solder_mask:$A().optional()}),gje=xA({type:CA("pcb_plated_hole"),shape:Ot(["oval","pill"]),pcb_group_id:F().optional(),subcircuit_id:F().optional(),outer_width:SA(),outer_height:SA(),hole_width:SA(),hole_height:SA(),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,ccw_rotation:rw,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),cje=xA({type:CA("pcb_plated_hole"),shape:CA("circular_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("circle"),pad_shape:CA("rect"),hole_diameter:SA(),rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),Ije=xA({type:CA("pcb_plated_hole"),shape:CA("pill_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("pill"),pad_shape:CA("rect"),hole_width:SA(),hole_height:SA(),rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),lje=xA({type:CA("pcb_plated_hole"),shape:CA("rotated_pill_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rotated_pill"),pad_shape:CA("rect"),hole_width:SA(),hole_height:SA(),hole_ccw_rotation:rw,rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),rect_ccw_rotation:rw,hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),Bje=xA({type:CA("pcb_plated_hole"),shape:CA("hole_with_polygon_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:Ot(["circle","oval","pill","rotated_pill"]),hole_diameter:SA().optional(),hole_width:SA().optional(),hole_height:SA().optional(),pad_outline:gt(xA({x:Xe,y:Xe})).min(3),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),fht=Ye([aje,gje,cje,Ije,lje,Bje]),yht=xA({type:CA("pcb_port"),pcb_port_id:Ti("pcb_port"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),source_port_id:F(),pcb_component_id:F().optional(),x:Xe,y:Xe,layers:gt(pI),is_board_pinout:$A().optional()}).describe("Defines a port on the PCB"),Cje=xA({type:CA("pcb_smtpad"),shape:CA("circle"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,radius:SA(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),hje=xA({type:CA("pcb_smtpad"),shape:CA("rect"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),rect_border_radius:SA().optional(),corner_radius:SA().optional(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),Qje=xA({type:CA("pcb_smtpad"),shape:CA("rotated_rect"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),rect_border_radius:SA().optional(),corner_radius:SA().optional(),ccw_rotation:rw,layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),mht=xA({type:CA("pcb_smtpad"),shape:CA("pill"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),uje=xA({type:CA("pcb_smtpad"),shape:CA("rotated_pill"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),ccw_rotation:rw,layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),Eje=xA({type:CA("pcb_smtpad"),shape:CA("polygon"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),points:gt(ds),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),wht=Th("shape",[Cje,hje,Qje,uje,mht,Eje]).describe("Defines an SMT pad on the PCB"),dje=xA({type:CA("pcb_solder_paste"),shape:CA("circle"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,radius:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),pje=xA({type:CA("pcb_solder_paste"),shape:CA("rect"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),fje=xA({type:CA("pcb_solder_paste"),shape:CA("pill"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),yje=xA({type:CA("pcb_solder_paste"),shape:CA("rotated_rect"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),ccw_rotation:Xe,layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),mje=xA({type:CA("pcb_solder_paste"),shape:CA("oval"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),Dht=Ye([dje,pje,fje,yje,mje]).describe("Defines solderpaste on the PCB"),_ht=xA({type:CA("pcb_text"),pcb_text_id:Ti("pcb_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),text:F(),center:ds,layer:pI,width:mo,height:mo,lines:SA(),align:Ot(["bottom-left"])}).describe("Defines text on the PCB"),xht=xA({route_type:CA("wire"),x:Xe,y:Xe,width:Xe,start_pcb_port_id:F().optional(),end_pcb_port_id:F().optional(),layer:pI}),bht=xA({route_type:CA("via"),x:Xe,y:Xe,hole_diameter:Xe.optional(),outer_diameter:Xe.optional(),from_layer:F(),to_layer:F()}),Sht=Ye([xht,bht]),vht=xA({type:CA("pcb_trace"),source_trace_id:F().optional(),pcb_component_id:F().optional(),pcb_trace_id:Ti("pcb_trace"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),route_thickness_mode:Ot(["constant","interpolated"]).default("constant").optional(),route_order_index:SA().optional(),should_round_corners:$A().optional(),trace_length:SA().optional(),highlight_color:F().optional(),route:gt(Sht)}).describe("Defines a trace on the PCB"),kht=xA({type:CA("pcb_trace_error"),pcb_trace_error_id:Ti("pcb_trace_error"),error_type:CA("pcb_trace_error").default("pcb_trace_error"),message:F(),center:ds.optional(),pcb_trace_id:F(),source_trace_id:F(),pcb_component_ids:gt(F()),pcb_port_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines a trace error on the PCB"),Rht=xA({type:CA("pcb_trace_missing_error"),pcb_trace_missing_error_id:Ti("pcb_trace_missing_error"),error_type:CA("pcb_trace_missing_error").default("pcb_trace_missing_error"),message:F(),center:ds.optional(),source_trace_id:F(),pcb_component_ids:gt(F()),pcb_port_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),Fht=xA({type:CA("pcb_port_not_matched_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),message:F(),pcb_component_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),Nht=xA({type:CA("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:Ti("pcb_port_not_connected_error"),error_type:CA("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),message:F(),pcb_port_ids:gt(F()),pcb_component_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),Ght=xA({type:CA("pcb_net"),pcb_net_id:Ti("pcb_net"),source_net_id:F().optional(),highlight_color:F().optional()}).describe("Defines a net on the PCB"),Mht=xA({type:CA("pcb_via"),pcb_via_id:Ti("pcb_via"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),x:Xe,y:Xe,outer_diameter:Xe.default("0.6mm"),hole_diameter:Xe.default("0.25mm"),from_layer:pI.optional(),to_layer:pI.optional(),layers:gt(pI),pcb_trace_id:F().optional(),net_is_assignable:$A().optional(),net_assigned:$A().optional()}).describe("Defines a via on the PCB"),Lht=xA({type:CA("pcb_board"),pcb_board_id:Ti("pcb_board"),pcb_panel_id:F().optional(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo.optional(),height:mo.optional(),center:ds,thickness:mo.optional().default(1.4),num_layers:SA().optional().default(4),outline:gt(ds).optional(),shape:Ot(["rect","polygon"]).optional(),material:Ot(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),Uht=xA({type:CA("pcb_panel"),pcb_panel_id:Ti("pcb_panel"),width:mo,height:mo,center:ds,covered_with_solder_mask:$A().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),Hht=xA({type:CA("pcb_placement_error"),pcb_placement_error_id:Ti("pcb_placement_error"),error_type:CA("pcb_placement_error").default("pcb_placement_error"),message:F(),subcircuit_id:F().optional()}).describe("Defines a placement error on the PCB"),Yht=xA({type:CA("pcb_trace_hint"),pcb_trace_hint_id:Ti("pcb_trace_hint"),pcb_port_id:F(),pcb_component_id:F(),route:gt(lht),subcircuit_id:F().optional()}).describe("A hint that can be used during generation of a PCB trace"),Jht=xA({type:CA("pcb_silkscreen_line"),pcb_silkscreen_line_id:Ti("pcb_silkscreen_line"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),stroke_width:Xe.default("0.1mm"),x1:Xe,y1:Xe,x2:Xe,y2:Xe,layer:nx}).describe("Defines a silkscreen line on the PCB"),Tht=xA({type:CA("pcb_silkscreen_path"),pcb_silkscreen_path_id:Ti("pcb_silkscreen_path"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,route:gt(ds),stroke_width:mo}).describe("Defines a silkscreen path on the PCB"),Kht=xA({type:CA("pcb_silkscreen_text"),pcb_silkscreen_text_id:Ti("pcb_silkscreen_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("0.2mm"),pcb_component_id:F(),text:F(),is_knockout:$A().default(!1).optional(),knockout_padding:xA({left:mo,top:mo,bottom:mo,right:mo}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:SA().optional(),layer:pI,is_mirrored:$A().default(!1).optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:y4.default("center")}).describe("Defines silkscreen text on the PCB"),qht=xA({type:CA("pcb_copper_text"),pcb_copper_text_id:Ti("pcb_copper_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("0.2mm"),pcb_component_id:F(),text:F(),is_knockout:$A().default(!1).optional(),knockout_padding:xA({left:mo,top:mo,bottom:mo,right:mo}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:SA().optional(),layer:pI,is_mirrored:$A().default(!1).optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:y4.default("center")}).describe("Defines copper text on the PCB"),Pht=xA({type:CA("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:Ti("pcb_silkscreen_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:pI,stroke_width:mo.default("1mm"),corner_radius:mo.optional(),is_filled:$A().default(!0).optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional()}).describe("Defines a silkscreen rect on the PCB"),Oht=xA({type:CA("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:Ti("pcb_silkscreen_circle"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius:mo,layer:nx,stroke_width:mo.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),Wht=xA({type:CA("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:Ti("pcb_silkscreen_oval"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius_x:Xe,radius_y:Xe,layer:nx}).describe("Defines a silkscreen oval on the PCB"),Zht=xA({type:CA("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:Ti("pcb_fabrication_note_text"),subcircuit_id:F().optional(),pcb_group_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("1mm"),pcb_component_id:F(),text:F(),layer:nx,anchor_position:ds.default({x:0,y:0}),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:F().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),Vht=xA({type:CA("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:Ti("pcb_fabrication_note_path"),pcb_component_id:F(),subcircuit_id:F().optional(),layer:pI,route:gt(ds),stroke_width:mo,color:F().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),jht=xA({type:CA("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:Ti("pcb_fabrication_note_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:nx,stroke_width:mo.default("0.1mm"),corner_radius:mo.optional(),is_filled:$A().optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a fabrication note rectangle on the PCB"),zht=xA({type:CA("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:Ti("pcb_fabrication_note_dimension"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,from:ds,to:ds,text:F().optional(),text_ccw_rotation:SA().optional(),offset:mo.optional(),offset_distance:mo.optional(),offset_direction:xA({x:SA(),y:SA()}).optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:mo.default("1mm"),color:F().optional(),arrow_size:mo.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),Xht=xA({type:CA("pcb_note_text"),pcb_note_text_id:Ti("pcb_note_text"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("1mm"),text:F().optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:F().optional()}).describe("Defines a documentation note in text on the PCB"),$ht=xA({type:CA("pcb_note_rect"),pcb_note_rect_id:Ti("pcb_note_rect"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),center:ds,width:mo,height:mo,stroke_width:mo.default("0.1mm"),corner_radius:mo.optional(),is_filled:$A().optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a rectangular documentation note on the PCB"),AQt=xA({type:CA("pcb_note_path"),pcb_note_path_id:Ti("pcb_note_path"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),route:gt(ds),stroke_width:mo.default("0.1mm"),color:F().optional()}).describe("Defines a polyline documentation note on the PCB"),tQt=xA({type:CA("pcb_note_line"),pcb_note_line_id:Ti("pcb_note_line"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),x1:Xe,y1:Xe,x2:Xe,y2:Xe,stroke_width:Xe.default("0.1mm"),color:F().optional(),is_dashed:$A().optional()}).describe("Defines a straight documentation note line on the PCB"),eQt=xA({type:CA("pcb_note_dimension"),pcb_note_dimension_id:Ti("pcb_note_dimension"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),from:ds,to:ds,text:F().optional(),text_ccw_rotation:SA().optional(),offset_distance:mo.optional(),offset_direction:xA({x:SA(),y:SA()}).optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:mo.default("1mm"),color:F().optional(),arrow_size:mo.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),iQt=xA({type:CA("pcb_footprint_overlap_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),message:F(),pcb_smtpad_ids:gt(F()).optional(),pcb_plated_hole_ids:gt(F()).optional(),pcb_hole_ids:gt(F()).optional(),pcb_keepout_ids:gt(F()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),nQt=xA({type:CA("pcb_keepout"),shape:CA("rect"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:Xe,height:Xe,pcb_keepout_id:F(),layers:gt(F()),description:F().optional()}).or(xA({type:CA("pcb_keepout"),shape:CA("circle"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius:Xe,pcb_keepout_id:F(),layers:gt(F()),description:F().optional()})),jj=xA({type:CA("pcb_cutout"),pcb_cutout_id:Ti("pcb_cutout"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),pcb_board_id:F().optional(),pcb_panel_id:F().optional()}),oQt=jj.extend({shape:CA("rect"),center:ds,width:mo,height:mo,rotation:rw.optional(),corner_radius:mo.optional()}),sQt=jj.extend({shape:CA("circle"),center:ds,radius:mo}),rQt=jj.extend({shape:CA("polygon"),points:gt(ds)}),aQt=jj.extend({shape:CA("path"),route:gt(ds),slot_width:mo,slot_length:mo.optional(),space_between_slots:mo.optional(),slot_corner_radius:mo.optional()}),gQt=Th("shape",[oQt,sQt,rQt,aQt]).describe("Defines a cutout on the PCB, removing board material."),cQt=xA({type:CA("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:Ti("pcb_missing_footprint_error"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),error_type:CA("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:F(),message:F()}).describe("Defines a missing footprint error on the PCB"),IQt=xA({type:CA("external_footprint_load_error"),external_footprint_load_error_id:Ti("external_footprint_load_error"),pcb_component_id:F(),source_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),footprinter_string:F().optional(),error_type:CA("external_footprint_load_error").default("external_footprint_load_error"),message:F()}).describe("Defines an error when an external footprint fails to load"),lQt=xA({type:CA("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:Ti("circuit_json_footprint_load_error"),pcb_component_id:F(),source_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),error_type:CA("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),message:F(),circuit_json:gt(ig()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),BQt=xA({type:CA("pcb_group"),pcb_group_id:Ti("pcb_group"),source_group_id:F(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo.optional(),height:mo.optional(),center:ds,outline:gt(ds).optional(),anchor_position:ds.optional(),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).optional(),pcb_component_ids:gt(F()),child_layout_mode:Ot(["packed","none"]).optional(),name:F().optional(),description:F().optional(),layout_mode:F().optional(),autorouter_configuration:xA({trace_clearance:mo}).optional(),autorouter_used_string:F().optional()}).describe("Defines a group of components on the PCB"),CQt=xA({type:CA("pcb_autorouting_error"),pcb_error_id:Ti("pcb_autorouting_error"),error_type:CA("pcb_autorouting_error").default("pcb_autorouting_error"),message:F(),subcircuit_id:F().optional()}).describe("The autorouting has failed to route a portion of the board"),hQt=xA({type:CA("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:Ti("pcb_manual_edit_conflict_warning"),warning_type:CA("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:F(),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),source_component_id:F()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),QQt=xA({type:CA("pcb_breakout_point"),pcb_breakout_point_id:Ti("pcb_breakout_point"),pcb_group_id:F(),subcircuit_id:F().optional(),source_trace_id:F().optional(),source_port_id:F().optional(),source_net_id:F().optional(),x:Xe,y:Xe}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),uQt=xA({type:CA("pcb_ground_plane"),pcb_ground_plane_id:Ti("pcb_ground_plane"),source_pcb_ground_plane_id:F(),source_net_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional()}).describe("Defines a ground plane on the PCB"),EQt=xA({type:CA("pcb_ground_plane_region"),pcb_ground_plane_region_id:Ti("pcb_ground_plane_region"),pcb_ground_plane_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:pI,points:gt(ds)}).describe("Defines a polygon region of a ground plane"),dQt=xA({type:CA("pcb_thermal_spoke"),pcb_thermal_spoke_id:Ti("pcb_thermal_spoke"),pcb_ground_plane_id:F(),shape:F(),spoke_count:SA(),spoke_thickness:Xe,spoke_inner_diameter:Xe,spoke_outer_diameter:Xe,pcb_plated_hole_id:F().optional(),subcircuit_id:F().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),LwA=xA({type:CA("pcb_copper_pour"),pcb_copper_pour_id:Ti("pcb_copper_pour"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:pI,source_net_id:F().optional(),covered_with_solder_mask:$A().optional().default(!0)}),pQt=LwA.extend({shape:CA("rect"),center:ds,width:mo,height:mo,rotation:rw.optional()}),fQt=LwA.extend({shape:CA("brep"),brep_shape:cht}),yQt=LwA.extend({shape:CA("polygon"),points:gt(ds)}),mQt=Th("shape",[pQt,fQt,yQt]).describe("Defines a copper pour on the PCB."),wQt=xA({type:CA("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:Ti("pcb_component_outside_board_error"),error_type:CA("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),message:F(),pcb_component_id:F(),pcb_board_id:F(),component_center:ds,component_bounds:xA({min_x:SA(),max_x:SA(),min_y:SA(),max_y:SA()}),subcircuit_id:F().optional(),source_component_id:F().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),DQt=xA({type:CA("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:Ti("pcb_component_invalid_layer_error"),error_type:CA("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),message:F(),pcb_component_id:F().optional(),source_component_id:F(),layer:pI,subcircuit_id:F().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),_Qt=xA({type:CA("pcb_via_clearance_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_via_clearance_error").default("pcb_via_clearance_error"),message:F(),pcb_via_ids:gt(F()).min(2),minimum_clearance:Xe.optional(),actual_clearance:Xe.optional(),pcb_center:xA({x:SA().optional(),y:SA().optional()}).optional(),subcircuit_id:F().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),xQt=xA({type:CA("pcb_courtyard_rect"),pcb_courtyard_rect_id:Ti("pcb_courtyard_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:nx,color:F().optional()}).describe("Defines a courtyard rectangle on the PCB"),bQt=xA({type:CA("pcb_courtyard_outline"),pcb_courtyard_outline_id:Ti("pcb_courtyard_outline"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,outline:gt(ds).min(2),stroke_width:mo.default("0.1mm"),is_closed:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a courtyard outline on the PCB"),SQt=xA({type:CA("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:Ti("pcb_courtyard_polygon"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,points:gt(ds).min(3),color:F().optional()}).describe("Defines a courtyard polygon on the PCB"),vQt=xA({type:CA("cad_component"),cad_component_id:F(),pcb_component_id:F(),source_component_id:F(),position:f4,rotation:f4.optional(),size:f4.optional(),layer:pI.optional(),subcircuit_id:F().optional(),footprinter_string:F().optional(),model_obj_url:F().optional(),model_stl_url:F().optional(),model_3mf_url:F().optional(),model_gltf_url:F().optional(),model_glb_url:F().optional(),model_step_url:F().optional(),model_wrl_url:F().optional(),model_unit_to_mm_scale_factor:SA().optional(),model_jscad:ig().optional()}).describe("Defines a component on the PCB"),kQt=Ot(["sinewave","square","triangle","sawtooth"]),wje=Ye([F(),SA()]).transform(e=>typeof e=="string"?e.endsWith("%")?parseFloat(e.slice(0,-1))/100:parseFloat(e):e).pipe(SA().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),RQt=xA({type:CA("simulation_voltage_source"),simulation_voltage_source_id:Ti("simulation_voltage_source"),is_dc_source:CA(!0).optional().default(!0),positive_source_port_id:F().optional(),negative_source_port_id:F().optional(),positive_source_net_id:F().optional(),negative_source_net_id:F().optional(),voltage:VF}).describe("Defines a DC voltage source for simulation"),FQt=xA({type:CA("simulation_voltage_source"),simulation_voltage_source_id:Ti("simulation_voltage_source"),is_dc_source:CA(!1),terminal1_source_port_id:F().optional(),terminal2_source_port_id:F().optional(),terminal1_source_net_id:F().optional(),terminal2_source_net_id:F().optional(),voltage:VF.optional(),frequency:Wj.optional(),peak_to_peak_voltage:VF.optional(),wave_shape:kQt.optional(),phase:rw.optional(),duty_cycle:wje.optional()}).describe("Defines an AC voltage source for simulation"),NQt=Ye([RQt,FQt]).describe("Defines a voltage source for simulation"),GQt=Ye([CA("spice_dc_sweep"),CA("spice_dc_operating_point"),CA("spice_transient_analysis"),CA("spice_ac_analysis")]),MQt=xA({type:CA("simulation_experiment"),simulation_experiment_id:Ti("simulation_experiment"),name:F(),experiment_type:GQt,time_per_step:p4.optional(),start_time_ms:jF.optional(),end_time_ms:jF.optional()}).describe("Defines a simulation experiment configuration"),LQt=xA({type:CA("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:Ti("simulation_transient_voltage_graph"),simulation_experiment_id:F(),timestamps_ms:gt(SA()).optional(),voltage_levels:gt(SA()),source_component_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),time_per_step:p4,start_time_ms:jF,end_time_ms:jF,name:F().optional(),color:F().optional()}).describe("Stores voltage measurements over time for a simulation"),UQt=xA({type:CA("simulation_switch"),simulation_switch_id:Ti("simulation_switch"),source_component_id:F().optional(),closes_at:jF.optional(),opens_at:jF.optional(),starts_closed:$A().optional(),switching_frequency:Wj.optional()}).describe("Defines a switch for simulation timing control"),HQt=xA({type:CA("simulation_voltage_probe"),simulation_voltage_probe_id:Ti("simulation_voltage_probe"),source_component_id:F().optional(),name:F().optional(),source_port_id:F().optional(),source_net_id:F().optional(),subcircuit_id:F().optional(),color:F().optional()}).describe("Defines a voltage probe for simulation, connected to a port or a net").refine(e=>!!e.source_port_id!=!!e.source_net_id,{message:"Exactly one of source_port_id or source_net_id must be provided to simulation_voltage_probe"}),YQt=xA({type:CA("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:Ti("simulation_unknown_experiment_error"),error_type:CA("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),message:F(),simulation_experiment_id:F().optional(),subcircuit_id:F().optional()}).describe("An unknown error occurred during the simulation experiment."),JQt=Ye([xCt,_Ct,DCt,SCt,bCt,dwA,QwA,Zj,EwA,uwA,pwA,fwA,ywA,DwA,_wA,xwA,kwA,bwA,SwA,vwA,wwA,mwA,kCt,FCt,vCt,RwA,FwA,NwA,NCt,GCt,Bht,pht,cQt,IQt,lQt,hQt,fht,nQt,yht,Ght,_ht,vht,Mht,wht,Dht,Lht,Uht,BQt,Yht,Jht,Tht,Kht,qht,Pht,Oht,Wht,kht,Rht,Hht,Fht,Nht,_Qt,Vht,Zht,jht,zht,Xht,$ht,AQt,tQt,eQt,CQt,iQt,QQt,gQt,uQt,EQt,dQt,mQt,wQt,DQt,xQt,bQt,SQt,MCt,ZCt,KCt,qCt,PCt,OCt,TCt,VCt,WCt,LCt,zCt,XCt,jCt,eht,iht,nht,oht,aht,sht,rht,vQt,NQt,MQt,LQt,UQt,HQt,YQt]),UwA=JQt;const TQt=Object.freeze(Object.defineProperty({__proto__:null,all_layers:RCt,any_circuit_element:JQt,any_soup_element:UwA,any_source_component:DCt,battery_capacity:uCt,brep_shape:cht,cad_component:vQt,capacitance:CwA,circuit_json_footprint_load_error:lQt,current:ZVe,distance:Xe,duration_ms:p4,experiment_type:GQt,external_footprint_load_error:IQt,frequency:Wj,getZodPrefixedIdWithDefault:Ti,inductance:hCt,layer_ref:pI,layer_string:GwA,length:mo,ms:jF,ninePointAnchor:y4,pcb_autorouting_error:CQt,pcb_board:Lht,pcb_breakout_point:QQt,pcb_component:Bht,pcb_component_invalid_layer_error:DQt,pcb_component_outside_board_error:wQt,pcb_copper_pour:mQt,pcb_copper_pour_brep:fQt,pcb_copper_pour_polygon:yQt,pcb_copper_pour_rect:pQt,pcb_copper_text:qht,pcb_courtyard_outline:bQt,pcb_courtyard_polygon:SQt,pcb_courtyard_rect:xQt,pcb_cutout:gQt,pcb_cutout_circle:sQt,pcb_cutout_path:aQt,pcb_cutout_polygon:rQt,pcb_cutout_rect:oQt,pcb_fabrication_note_dimension:zht,pcb_fabrication_note_path:Vht,pcb_fabrication_note_rect:jht,pcb_fabrication_note_text:Zht,pcb_footprint_overlap_error:iQt,pcb_ground_plane:uQt,pcb_ground_plane_region:EQt,pcb_group:BQt,pcb_hole:pht,pcb_hole_circle_or_square_shape:nje,pcb_hole_circle_shape:eje,pcb_hole_oval_shape:oje,pcb_hole_pill_shape:sje,pcb_hole_rect_shape:ije,pcb_hole_rotated_pill_shape:rje,pcb_keepout:nQt,pcb_manual_edit_conflict_warning:hQt,pcb_missing_footprint_error:cQt,pcb_net:Ght,pcb_note_dimension:eQt,pcb_note_line:tQt,pcb_note_path:AQt,pcb_note_rect:$ht,pcb_note_text:Xht,pcb_panel:Uht,pcb_placement_error:Hht,pcb_plated_hole:fht,pcb_port:yht,pcb_port_not_connected_error:Nht,pcb_port_not_matched_error:Fht,pcb_route_hint:Iht,pcb_route_hints:tje,pcb_silkscreen_circle:Oht,pcb_silkscreen_line:Jht,pcb_silkscreen_oval:Wht,pcb_silkscreen_path:Tht,pcb_silkscreen_rect:Pht,pcb_silkscreen_text:Kht,pcb_smtpad:wht,pcb_smtpad_pill:mht,pcb_solder_paste:Dht,pcb_text:_ht,pcb_thermal_spoke:dQt,pcb_trace:vht,pcb_trace_error:kht,pcb_trace_hint:Yht,pcb_trace_missing_error:Rht,pcb_trace_route_point:Sht,pcb_trace_route_point_via:bht,pcb_trace_route_point_wire:xht,pcb_via:Mht,pcb_via_clearance_error:_Qt,point:ds,point3:f4,point_with_bulge:ght,port_arrangement:JCt,position:jVe,position3:zVe,resistance:Oj,ring:MwA,rotation:rw,route_hint_point:lht,schematic_arc:OCt,schematic_box:MCt,schematic_circle:PCt,schematic_component:TCt,schematic_component_port_arrangement_by_sides:YCt,schematic_component_port_arrangement_by_size:HCt,schematic_debug_line:Aht,schematic_debug_object:eht,schematic_debug_object_base:Vj,schematic_debug_point:tht,schematic_debug_rect:$Ct,schematic_error:zCt,schematic_group:oht,schematic_layout_error:XCt,schematic_line:KCt,schematic_manual_edit_conflict_warning:nht,schematic_net_label:jCt,schematic_path:LCt,schematic_pin_styles:UCt,schematic_port:VCt,schematic_rect:qCt,schematic_sheet:aht,schematic_table:sht,schematic_table_cell:rht,schematic_text:ZCt,schematic_trace:WCt,schematic_voltage_probe:iht,simulation_ac_voltage_source:FQt,simulation_dc_voltage_source:RQt,simulation_experiment:MQt,simulation_switch:UQt,simulation_transient_voltage_graph:LQt,simulation_unknown_experiment_error:YQt,simulation_voltage_probe:HQt,simulation_voltage_source:NQt,size:hwA,source_board:vCt,source_component_base:Nd,source_failed_to_create_component_error:yCt,source_group:bCt,source_manually_placed_via:FCt,source_missing_property_error:fCt,source_net:SCt,source_pcb_ground_plane:kCt,source_pin_missing_trace_warning:NwA,source_pin_must_be_connected_error:NCt,source_port:_Ct,source_project_metadata:RwA,source_property_ignored_warning:mCt,source_simple_battery:fwA,source_simple_capacitor:QwA,source_simple_chip:dwA,source_simple_crystal:pCt,source_simple_diode:Zj,source_simple_ground:dCt,source_simple_inductor:ywA,source_simple_led:EwA,source_simple_mosfet:vwA,source_simple_pin_header:DwA,source_simple_pinout:_wA,source_simple_potentiometer:wwA,source_simple_power_source:pwA,source_simple_push_button:mwA,source_simple_resistor:uwA,source_simple_resonator:xwA,source_simple_switch:kwA,source_simple_test_point:SwA,source_simple_transistor:bwA,source_simple_voltage_probe:wCt,source_trace:xCt,source_trace_not_connected_error:FwA,supplier_name:ECt,time:VVe,timestamp:QCt,unknown_error_finding_part:GCt,visible_layer:nx,voltage:VF,wave_shape:kQt},Symbol.toStringTag,{value:"Module"})),m4=e=>typeof e=="number"&&!isNaN(e),zF=e=>typeof e=="string",oD=e=>typeof e=="function",zj=e=>zF(e)||oD(e)?e:null,HwA=e=>cA.isValidElement(e)||zF(e)||oD(e)||m4(e);function Dje(e,A,t){t===void 0&&(t=300);const{scrollHeight:i,style:n}=e;requestAnimationFrame(()=>{n.minHeight="initial",n.height=i+"px",n.transition=`all ${t}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(A,t)})})}function Xj(e){let{enter:A,exit:t,appendPosition:i=!1,collapse:n=!0,collapseDuration:o=300}=e;return function(s){let{children:r,position:a,preventExitTransition:g,done:c,nodeRef:I,isIn:l,playToast:B}=s;const C=i?`${A}--${a}`:A,Q=i?`${t}--${a}`:t,u=cA.useRef(0);return cA.useLayoutEffect(()=>{const E=I.current,p=C.split(" "),f=m=>{m.target===I.current&&(B(),E.removeEventListener("animationend",f),E.removeEventListener("animationcancel",f),u.current===0&&m.type!=="animationcancel"&&E.classList.remove(...p))};E.classList.add(...p),E.addEventListener("animationend",f),E.addEventListener("animationcancel",f)},[]),cA.useEffect(()=>{const E=I.current,p=()=>{E.removeEventListener("animationend",p),n?Dje(E,c,o):c()};l||(g?p():(u.current=1,E.className+=` ${Q}`,E.addEventListener("animationend",p)))},[l]),vo.createElement(vo.Fragment,null,r)}}function KQt(e,A){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:A}:{}}const Cm=new Map;let w4=[];const YwA=new Set,_je=e=>YwA.forEach(A=>A(e)),qQt=()=>Cm.size>0;function PQt(e,A){var t;if(A)return!((t=Cm.get(A))==null||!t.isToastActive(e));let i=!1;return Cm.forEach(n=>{n.isToastActive(e)&&(i=!0)}),i}function OQt(e,A){HwA(e)&&(qQt()||w4.push({content:e,options:A}),Cm.forEach(t=>{t.buildToast(e,A)}))}function WQt(e,A){Cm.forEach(t=>{A!=null&&A!=null&&A.containerId?A?.containerId===t.id&&t.toggle(e,A?.id):t.toggle(e,A?.id)})}function xje(e){const{subscribe:A,getSnapshot:t,setProps:i}=cA.useRef((function(o){const s=o.containerId||1;return{subscribe(r){const a=(function(c,I,l){let B=1,C=0,Q=[],u=[],E=[],p=I;const f=new Map,m=new Set,S=()=>{E=Array.from(f.values()),m.forEach(D=>D())},_=D=>{u=D==null?[]:u.filter(k=>k!==D),S()},v=D=>{const{toastId:k,onOpen:x,updateId:M,children:N}=D.props,T=M==null;D.staleId&&f.delete(D.staleId),f.set(k,D),u=[...u,D.props.toastId].filter(q=>q!==D.staleId),S(),l(KQt(D,T?"added":"updated")),T&&oD(x)&&x(cA.isValidElement(N)&&N.props)};return{id:c,props:p,observe:D=>(m.add(D),()=>m.delete(D)),toggle:(D,k)=>{f.forEach(x=>{k!=null&&k!==x.props.toastId||oD(x.toggle)&&x.toggle(D)})},removeToast:_,toasts:f,clearQueue:()=>{C-=Q.length,Q=[]},buildToast:(D,k)=>{if((rA=>{let{containerId:IA,toastId:DA,updateId:bA}=rA;const HA=IA?IA!==c:c!==1,JA=f.has(DA)&&bA==null;return HA||JA})(k))return;const{toastId:x,updateId:M,data:N,staleId:T,delay:q}=k,P=()=>{_(x)},V=M==null;V&&C++;const z={...p,style:p.toastStyle,key:B++,...Object.fromEntries(Object.entries(k).filter(rA=>{let[IA,DA]=rA;return DA!=null})),toastId:x,updateId:M,data:N,closeToast:P,isIn:!1,className:zj(k.className||p.toastClassName),bodyClassName:zj(k.bodyClassName||p.bodyClassName),progressClassName:zj(k.progressClassName||p.progressClassName),autoClose:!k.isLoading&&(oA=k.autoClose,gA=p.autoClose,oA===!1||m4(oA)&&oA>0?oA:gA),deleteToast(){const rA=f.get(x),{onClose:IA,children:DA}=rA.props;oD(IA)&&IA(cA.isValidElement(DA)&&DA.props),l(KQt(rA,"removed")),f.delete(x),C--,C<0&&(C=0),Q.length>0?v(Q.shift()):S()}};var oA,gA;z.closeButton=p.closeButton,k.closeButton===!1||HwA(k.closeButton)?z.closeButton=k.closeButton:k.closeButton===!0&&(z.closeButton=!HwA(p.closeButton)||p.closeButton);let QA=D;cA.isValidElement(D)&&!zF(D.type)?QA=cA.cloneElement(D,{closeToast:P,toastProps:z,data:N}):oD(D)&&(QA=D({closeToast:P,toastProps:z,data:N}));const tA={content:QA,props:z,staleId:T};p.limit&&p.limit>0&&C>p.limit&&V?Q.push(tA):m4(q)?setTimeout(()=>{v(tA)},q):v(tA)},setProps(D){p=D},setToggle:(D,k)=>{f.get(D).toggle=k},isToastActive:D=>u.some(k=>k===D),getSnapshot:()=>E}})(s,o,_je);Cm.set(s,a);const g=a.observe(r);return w4.forEach(c=>OQt(c.content,c.options)),w4=[],()=>{g(),Cm.delete(s)}},setProps(r){var a;(a=Cm.get(s))==null||a.setProps(r)},getSnapshot(){var r;return(r=Cm.get(s))==null?void 0:r.getSnapshot()}}})(e)).current;i(e);const n=cA.useSyncExternalStore(A,t,t);return{getToastToRender:function(o){if(!n)return[];const s=new Map;return e.newestOnTop&&n.reverse(),n.forEach(r=>{const{position:a}=r.props;s.has(a)||s.set(a,[]),s.get(a).push(r)}),Array.from(s,r=>o(r[0],r[1]))},isToastActive:PQt,count:n?.length}}function bje(e){const[A,t]=cA.useState(!1),[i,n]=cA.useState(!1),o=cA.useRef(null),s=cA.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:r,pauseOnHover:a,closeToast:g,onClick:c,closeOnClick:I}=e;var l,B;function C(){t(!0)}function Q(){t(!1)}function u(f){const m=o.current;s.canDrag&&m&&(s.didMove=!0,A&&Q(),s.delta=e.draggableDirection==="x"?f.clientX-s.start:f.clientY-s.start,s.start!==f.clientX&&(s.canCloseOnClick=!1),m.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,m.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function E(){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",E);const f=o.current;if(s.canDrag&&s.didMove&&f){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return n(!0),e.closeToast(),void e.collapseAll();f.style.transition="transform 0.2s, opacity 0.2s",f.style.removeProperty("transform"),f.style.removeProperty("opacity")}}(B=Cm.get((l={id:e.toastId,containerId:e.containerId,fn:t}).containerId||1))==null||B.setToggle(l.id,l.fn),cA.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||Q(),window.addEventListener("focus",C),window.addEventListener("blur",Q),()=>{window.removeEventListener("focus",C),window.removeEventListener("blur",Q)}},[e.pauseOnFocusLoss]);const p={onPointerDown:function(f){if(e.draggable===!0||e.draggable===f.pointerType){s.didMove=!1,document.addEventListener("pointermove",u),document.addEventListener("pointerup",E);const m=o.current;s.canCloseOnClick=!0,s.canDrag=!0,m.style.transition="none",e.draggableDirection==="x"?(s.start=f.clientX,s.removalDistance=m.offsetWidth*(e.draggablePercent/100)):(s.start=f.clientY,s.removalDistance=m.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(f){const{top:m,bottom:S,left:_,right:v}=o.current.getBoundingClientRect();f.nativeEvent.type!=="touchend"&&e.pauseOnHover&&f.clientX>=_&&f.clientX<=v&&f.clientY>=m&&f.clientY<=S?Q():C()}};return r&&a&&(p.onMouseEnter=Q,e.stacked||(p.onMouseLeave=C)),I&&(p.onClick=f=>{c&&c(f),s.canCloseOnClick&&g()}),{playToast:C,pauseToast:Q,isRunning:A,preventExitTransition:i,toastRef:o,eventHandlers:p}}function Sje(e){let{delay:A,isRunning:t,closeToast:i,type:n="default",hide:o,className:s,style:r,controlledProgress:a,progress:g,rtl:c,isIn:I,theme:l}=e;const B=o||a&&g===0,C={...r,animationDuration:`${A}ms`,animationPlayState:t?"running":"paused"};a&&(C.transform=`scaleX(${g})`);const Q=R_("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":c}),u=oD(s)?s({rtl:c,type:n,defaultClassName:Q}):R_(Q,s),E={[a&&g>=1?"onTransitionEnd":"onAnimationEnd"]:a&&g<1?null:()=>{I&&i()}};return vo.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":B},vo.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${n}`}),vo.createElement("div",{role:"progressbar","aria-hidden":B?"true":"false","aria-label":"notification timer",className:u,style:C,...E}))}let vje=1;const ZQt=()=>""+vje++;function kje(e){return e&&(zF(e.toastId)||m4(e.toastId))?e.toastId:ZQt()}function D4(e,A){return OQt(e,A),A.toastId}function $j(e,A){return{...A,type:A&&A.type||e,toastId:kje(A)}}function Az(e){return(A,t)=>D4(A,$j(e,t))}function nh(e,A){return D4(e,$j("default",A))}nh.loading=(e,A)=>D4(e,$j("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...A})),nh.promise=function(e,A,t){let i,{pending:n,error:o,success:s}=A;n&&(i=zF(n)?nh.loading(n,t):nh.loading(n.render,{...t,...n}));const r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(c,I,l)=>{if(I==null)return void nh.dismiss(i);const B={type:c,...r,...t,data:l},C=zF(I)?{render:I}:I;return i?nh.update(i,{...B,...C}):nh(C.render,{...B,...C}),l},g=oD(e)?e():e;return g.then(c=>a("success",s,c)).catch(c=>a("error",o,c)),g},nh.success=Az("success"),nh.info=Az("info"),nh.error=Az("error"),nh.warning=Az("warning"),nh.warn=nh.warning,nh.dark=(e,A)=>D4(e,$j("default",{theme:"dark",...A})),nh.dismiss=function(e){(function(A){var t;if(qQt()){if(A==null||zF(t=A)||m4(t))Cm.forEach(i=>{i.removeToast(A)});else if(A&&("containerId"in A||"id"in A)){const i=Cm.get(A.containerId);i?i.removeToast(A.id):Cm.forEach(n=>{n.removeToast(A.id)})}}else w4=w4.filter(i=>A!=null&&i.options.toastId!==A)})(e)},nh.clearWaitingQueue=function(e){e===void 0&&(e={}),Cm.forEach(A=>{!A.props.limit||e.containerId&&A.id!==e.containerId||A.clearQueue()})},nh.isActive=PQt,nh.update=function(e,A){A===void 0&&(A={});const t=((i,n)=>{var o;let{containerId:s}=n;return(o=Cm.get(s||1))==null?void 0:o.toasts.get(i)})(e,A);if(t){const{props:i,content:n}=t,o={delay:100,...i,...A,toastId:A.toastId||e,updateId:ZQt()};o.toastId!==e&&(o.staleId=e);const s=o.render||n;delete o.render,D4(s,o)}},nh.done=e=>{nh.update(e,{progress:1})},nh.onChange=function(e){return YwA.add(e),()=>{YwA.delete(e)}},nh.play=e=>WQt(!0,e),nh.pause=e=>WQt(!1,e);const Rje=typeof window<"u"?cA.useLayoutEffect:cA.useEffect,tz=e=>{let{theme:A,type:t,isLoading:i,...n}=e;return vo.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:A==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n})},JwA={info:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return vo.createElement("div",{className:"Toastify__spinner"})}},Fje=e=>{const{isRunning:A,preventExitTransition:t,toastRef:i,eventHandlers:n,playToast:o}=bje(e),{closeButton:s,children:r,autoClose:a,onClick:g,type:c,hideProgressBar:I,closeToast:l,transition:B,position:C,className:Q,style:u,bodyClassName:E,bodyStyle:p,progressClassName:f,progressStyle:m,updateId:S,role:_,progress:v,rtl:D,toastId:k,deleteToast:x,isIn:M,isLoading:N,closeOnClick:T,theme:q}=e,P=R_("Toastify__toast",`Toastify__toast-theme--${q}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":D},{"Toastify__toast--close-on-click":T}),V=oD(Q)?Q({rtl:D,position:C,type:c,defaultClassName:P}):R_(P,Q),z=(function(tA){let{theme:rA,type:IA,isLoading:DA,icon:bA}=tA,HA=null;const JA={theme:rA,type:IA};return bA===!1||(oD(bA)?HA=bA({...JA,isLoading:DA}):cA.isValidElement(bA)?HA=cA.cloneElement(bA,JA):DA?HA=JwA.spinner():(GA=>GA in JwA)(IA)&&(HA=JwA[IA](JA))),HA})(e),oA=!!v||!a,gA={closeToast:l,type:c,theme:q};let QA=null;return s===!1||(QA=oD(s)?s(gA):cA.isValidElement(s)?cA.cloneElement(s,gA):(function(tA){let{closeToast:rA,theme:IA,ariaLabel:DA="close"}=tA;return vo.createElement("button",{className:`Toastify__close-button Toastify__close-button--${IA}`,type:"button",onClick:bA=>{bA.stopPropagation(),rA(bA)},"aria-label":DA},vo.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},vo.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))})(gA)),vo.createElement(B,{isIn:M,done:x,position:C,preventExitTransition:t,nodeRef:i,playToast:o},vo.createElement("div",{id:k,onClick:g,"data-in":M,className:V,...n,style:u,ref:i},vo.createElement("div",{...M&&{role:_},className:oD(E)?E({type:c}):R_("Toastify__toast-body",E),style:p},z!=null&&vo.createElement("div",{className:R_("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},z),vo.createElement("div",null,r)),QA,vo.createElement(Sje,{...S&&!oA?{key:`pb-${S}`}:{},rtl:D,theme:q,delay:a,isRunning:A,isIn:M,closeToast:l,hide:I,type:c,style:m,className:f,controlledProgress:oA,progress:v||0})))},ez=function(e,A){return A===void 0&&(A=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:A}},Nje=Xj(ez("bounce",!0));Xj(ez("slide",!0)),Xj(ez("zoom")),Xj(ez("flip"));const Gje={position:"top-right",transition:Nje,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Mje(e){let A={...Gje,...e};const t=e.stacked,[i,n]=cA.useState(!0),o=cA.useRef(null),{getToastToRender:s,isToastActive:r,count:a}=xje(A),{className:g,style:c,rtl:I,containerId:l}=A;function B(Q){const u=R_("Toastify__toast-container",`Toastify__toast-container--${Q}`,{"Toastify__toast-container--rtl":I});return oD(g)?g({position:Q,rtl:I,defaultClassName:u}):R_(u,zj(g))}function C(){t&&(n(!0),nh.play())}return Rje(()=>{if(t){var Q;const u=o.current.querySelectorAll('[data-in="true"]'),E=12,p=(Q=A.position)==null?void 0:Q.includes("top");let f=0,m=0;Array.from(u).reverse().forEach((S,_)=>{const v=S;v.classList.add("Toastify__toast--stacked"),_>0&&(v.dataset.collapsed=`${i}`),v.dataset.pos||(v.dataset.pos=p?"top":"bot");const D=f*(i?.2:1)+(i?0:E*_);v.style.setProperty("--y",`${p?D:-1*D}px`),v.style.setProperty("--g",`${E}`),v.style.setProperty("--s",""+(1-(i?m:0))),f+=v.offsetHeight,m+=.025})}},[i,a,t]),vo.createElement("div",{ref:o,className:"Toastify",id:l,onMouseEnter:()=>{t&&(n(!1),nh.pause())},onMouseLeave:C},s((Q,u)=>{const E=u.length?{...c}:{...c,pointerEvents:"none"};return vo.createElement("div",{className:B(Q),style:E,key:`container-${Q}`},u.map(p=>{let{content:f,props:m}=p;return vo.createElement(Fje,{...m,stacked:t,collapseAll:C,isIn:r(m.toastId,m.containerId),style:m.style,key:`toast-${m.key}`},f)}))}))}function Lje(){var e=':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}',A=document.createElement("style");A.innerText=e,document.head.appendChild(A)}function Uje(e,A,t){const i=(t.x-A.x)**2+(t.y-A.y)**2;if(i===0)return VQt(e,A);let n=((e.x-A.x)*(t.x-A.x)+(e.y-A.y)*(t.y-A.y))/i;n=Math.max(0,Math.min(1,n));const o={x:A.x+n*(t.x-A.x),y:A.y+n*(t.y-A.y)};return VQt(e,o)}function VQt(e,A){const t=e.x-A.x,i=e.y-A.y;return Math.sqrt(t*t+i*i)}const Hje=XUt(z3t);var TwA,jQt;function Yje(){if(jQt)return TwA;jQt=1;var e=Object.defineProperty,A=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,n=(u,E)=>{for(var p in E)e(u,p,{get:E[p],enumerable:!0})},o=(u,E,p,f)=>{if(E&&typeof E=="object"||typeof E=="function")for(let m of t(E))!i.call(u,m)&&m!==p&&e(u,m,{get:()=>E[m],enumerable:!(f=A(E,m))||f.enumerable});return u},s=u=>o(e({},"__esModule",{value:!0}),u),r={};n(r,{SuperGrid:()=>Q,toMMSI:()=>C,toMeterSI:()=>B}),TwA=s(r);var a=Uw(),g=Hje,c=JMA(),I=(u,E,p)=>{const f=[];if(E<u)for(let m=u;m>=E;m-=Math.abs(p))f.push(m);else for(let m=u;m<=E;m+=Math.abs(p))f.push(m);return f};function l(u,E){return{x:Math.round(E.x/u)*u,y:Math.round(E.y/u)*u}}function B(u,E=1){return u<0?"-"+B(-u):u<1e-6?"0m":u>1e3?Math.floor(u/1e3)+"km":u>1&&E>1?Math.round(u)+"m":u>1&&E<=1?u.toFixed(Math.ceil(-Math.log10(E)))+"m":u<1&&E>=1/1e3?Math.round(u*1e3)+"mm":u<1&&E<1/1e3?(u*1e3).toFixed(Math.ceil(-Math.log10(E*1e3)))+"mm":""}function C(u,E=1){return B(u/1e3,E/1e3)}var Q=u=>{var E;const p=(0,a.useRef)(null),[f,m]=(0,a.useState)({x:0,y:0}),{majorColor:S="rgba(0,0,0,0.2)",minorColor:_="rgba(0,0,0,0.1)",textColor:v=(E=u.majorColor)!=null?E:"rgba(0,0,0,0.5)",width:D,height:k,screenSpaceCellSize:x=200,stringifyCoord:M=(P,V,z)=>`${B(P,z)}, ${B(V,z)}`}=u,N=Math.ceil(D/x)+2,T=Math.ceil(k/x)+2;(0,a.useEffect)(()=>{if(!p.current)return;const P=p.current.getContext("2d");if(!P)return;const V=x/10**Math.floor(Math.log10(u.transform.a)),z=u.transform.d<0?-1:1,gA=x/10**Math.log10(u.transform.a)/V;function QA(mA,fA,ZA){const tt=mA;let at,vA,FA;for(at=fA.x;at<=ZA.x;at+=tt)vA=(0,g.applyToPoint)(u.transform,{x:at,y:fA.y}),FA=(0,g.applyToPoint)(u.transform,{x:at,y:ZA.y}),P.beginPath(),P.moveTo(vA.x,vA.y),P.lineTo(FA.x,FA.y),P.stroke();const dA=I(fA.y,ZA.y,tt*z);for(const uA of dA)vA=(0,g.applyToPoint)(u.transform,{x:fA.x,y:uA}),FA=(0,g.applyToPoint)(u.transform,{x:ZA.x,y:uA}),P.beginPath(),P.moveTo(vA.x,vA.y),P.lineTo(FA.x,FA.y),P.stroke()}function tA(mA,fA,ZA){const tt=mA;let at;for(at=fA.x;at<=ZA.x;at+=tt)for(const vA of I(fA.y,ZA.y,tt*z)){const FA=(0,g.applyToPoint)(u.transform,{x:at,y:vA});P.fillStyle=v,P.font="12px sans-serif",P.fillText(M(at,vA,mA),FA.x+2,FA.y-2)}}P.clearRect(0,0,D,k);const rA=(0,g.applyToPoint)((0,g.inverse)(u.transform),{x:0,y:0}),IA={x:Math.floor((rA.x-V)/V)*V,y:Math.floor((rA.y-V)/V+(z==-1?2:0))*V},DA={x:IA.x+V*N,y:IA.y+V*T*z},HA=V*5,JA={x:Math.floor((rA.x-HA)/HA)*HA,y:Math.floor((rA.y-HA)/HA+(z==-1?2:0))*HA},GA={x:JA.x+HA*N,y:JA.y+HA*T*z};P.globalAlpha=1,P.strokeStyle=S,QA(V,IA,DA),tA(HA,JA,GA),P.globalAlpha=1-gA,QA(HA/10,JA,GA),P.globalAlpha=1-gA,P.strokeStyle=_,QA(V/10,IA,DA),P.globalAlpha=Math.max(((1-gA)*10-5)/5,0),tA(HA/10,JA,GA),P.globalAlpha=1;const aA=(0,g.applyToPoint)(u.transform,f);P.font="12px sans-serif",P.fillStyle=v,P.fillText(M(f.x,f.y,V),aA.x+2,aA.y-2),P.strokeStyle=S,P.strokeRect(aA.x-5,aA.y-5,10,10)},[p,u.transform,f,D,k]);const q=P=>{if(!p.current)return;const V=x/10/10**Math.floor(Math.log10(u.transform.a)),z=p.current.getBoundingClientRect(),oA=(0,g.applyToPoint)((0,g.inverse)(u.transform),{x:P.clientX-z.left,y:P.clientY-z.top}),gA=l(V,oA);m(gA)};return(0,c.jsx)("canvas",{onMouseUp:P=>{P.button===1&&q(P)},onDoubleClick:q,ref:p,width:u.width,height:u.height})};return TwA}var KwA=Yje(),qwA={exports:{}},PwA,zQt;function XQt(){return zQt||(zQt=1,PwA={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),PwA}var OwA={exports:{}},WwA,$Qt;function Jje(){return $Qt||($Qt=1,WwA=function(A){return!A||typeof A=="string"?!1:A instanceof Array||Array.isArray(A)||A.length>=0&&(A.splice instanceof Function||Object.getOwnPropertyDescriptor(A,A.length-1)&&A.constructor.name!=="String")}),WwA}var Aut;function Tje(){if(Aut)return OwA.exports;Aut=1;var e=Jje(),A=Array.prototype.concat,t=Array.prototype.slice,i=OwA.exports=function(o){for(var s=[],r=0,a=o.length;r<a;r++){var g=o[r];e(g)?s=A.call(s,t.call(g)):s.push(g)}return s};return i.wrap=function(n){return function(){return n(i(arguments))}},OwA.exports}var tut;function Kje(){if(tut)return qwA.exports;tut=1;var e=XQt(),A=Tje(),t=Object.hasOwnProperty,i=Object.create(null);for(var n in e)t.call(e,n)&&(i[e[n]]=n);var o=qwA.exports={to:{},get:{}};o.get=function(a){var g=a.substring(0,3).toLowerCase(),c,I;switch(g){case"hsl":c=o.get.hsl(a),I="hsl";break;case"hwb":c=o.get.hwb(a),I="hwb";break;default:c=o.get.rgb(a),I="rgb";break}return c?{model:I,value:c}:null},o.get.rgb=function(a){if(!a)return null;var g=/^#([a-f0-9]{3,4})$/i,c=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,I=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,l=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,B=/^(\w+)$/,C=[0,0,0,1],Q,u,E;if(Q=a.match(c)){for(E=Q[2],Q=Q[1],u=0;u<3;u++){var p=u*2;C[u]=parseInt(Q.slice(p,p+2),16)}E&&(C[3]=parseInt(E,16)/255)}else if(Q=a.match(g)){for(Q=Q[1],E=Q[3],u=0;u<3;u++)C[u]=parseInt(Q[u]+Q[u],16);E&&(C[3]=parseInt(E+E,16)/255)}else if(Q=a.match(I)){for(u=0;u<3;u++)C[u]=parseInt(Q[u+1],0);Q[4]&&(Q[5]?C[3]=parseFloat(Q[4])*.01:C[3]=parseFloat(Q[4]))}else if(Q=a.match(l)){for(u=0;u<3;u++)C[u]=Math.round(parseFloat(Q[u+1])*2.55);Q[4]&&(Q[5]?C[3]=parseFloat(Q[4])*.01:C[3]=parseFloat(Q[4]))}else return(Q=a.match(B))?Q[1]==="transparent"?[0,0,0,0]:t.call(e,Q[1])?(C=e[Q[1]],C[3]=1,C):null:null;for(u=0;u<3;u++)C[u]=s(C[u],0,255);return C[3]=s(C[3],0,1),C},o.get.hsl=function(a){if(!a)return null;var g=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,c=a.match(g);if(c){var I=parseFloat(c[4]),l=(parseFloat(c[1])%360+360)%360,B=s(parseFloat(c[2]),0,100),C=s(parseFloat(c[3]),0,100),Q=s(isNaN(I)?1:I,0,1);return[l,B,C,Q]}return null},o.get.hwb=function(a){if(!a)return null;var g=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,c=a.match(g);if(c){var I=parseFloat(c[4]),l=(parseFloat(c[1])%360+360)%360,B=s(parseFloat(c[2]),0,100),C=s(parseFloat(c[3]),0,100),Q=s(isNaN(I)?1:I,0,1);return[l,B,C,Q]}return null},o.to.hex=function(){var a=A(arguments);return"#"+r(a[0])+r(a[1])+r(a[2])+(a[3]<1?r(Math.round(a[3]*255)):"")},o.to.rgb=function(){var a=A(arguments);return a.length<4||a[3]===1?"rgb("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+")":"rgba("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+", "+a[3]+")"},o.to.rgb.percent=function(){var a=A(arguments),g=Math.round(a[0]/255*100),c=Math.round(a[1]/255*100),I=Math.round(a[2]/255*100);return a.length<4||a[3]===1?"rgb("+g+"%, "+c+"%, "+I+"%)":"rgba("+g+"%, "+c+"%, "+I+"%, "+a[3]+")"},o.to.hsl=function(){var a=A(arguments);return a.length<4||a[3]===1?"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)":"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+a[3]+")"},o.to.hwb=function(){var a=A(arguments),g="";return a.length>=4&&a[3]!==1&&(g=", "+a[3]),"hwb("+a[0]+", "+a[1]+"%, "+a[2]+"%"+g+")"},o.to.keyword=function(a){return i[a.slice(0,3)]};function s(a,g,c){return Math.min(Math.max(g,a),c)}function r(a){var g=Math.round(a).toString(16).toUpperCase();return g.length<2?"0"+g:g}return qwA.exports}var ZwA,eut;function iut(){if(eut)return ZwA;eut=1;const e=XQt(),A={};for(const n of Object.keys(e))A[e[n]]=n;const t={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};ZwA=t;for(const n of Object.keys(t)){if(!("channels"in t[n]))throw new Error("missing channels property: "+n);if(!("labels"in t[n]))throw new Error("missing channel labels property: "+n);if(t[n].labels.length!==t[n].channels)throw new Error("channel and label counts mismatch: "+n);const{channels:o,labels:s}=t[n];delete t[n].channels,delete t[n].labels,Object.defineProperty(t[n],"channels",{value:o}),Object.defineProperty(t[n],"labels",{value:s})}t.rgb.hsl=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.min(o,s,r),g=Math.max(o,s,r),c=g-a;let I,l;g===a?I=0:o===g?I=(s-r)/c:s===g?I=2+(r-o)/c:r===g&&(I=4+(o-s)/c),I=Math.min(I*60,360),I<0&&(I+=360);const B=(a+g)/2;return g===a?l=0:B<=.5?l=c/(g+a):l=c/(2-g-a),[I,l*100,B*100]},t.rgb.hsv=function(n){let o,s,r,a,g;const c=n[0]/255,I=n[1]/255,l=n[2]/255,B=Math.max(c,I,l),C=B-Math.min(c,I,l),Q=function(u){return(B-u)/6/C+1/2};return C===0?(a=0,g=0):(g=C/B,o=Q(c),s=Q(I),r=Q(l),c===B?a=r-s:I===B?a=1/3+o-r:l===B&&(a=2/3+s-o),a<0?a+=1:a>1&&(a-=1)),[a*360,g*100,B*100]},t.rgb.hwb=function(n){const o=n[0],s=n[1];let r=n[2];const a=t.rgb.hsl(n)[0],g=1/255*Math.min(o,Math.min(s,r));return r=1-1/255*Math.max(o,Math.max(s,r)),[a,g*100,r*100]},t.rgb.cmyk=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.min(1-o,1-s,1-r),g=(1-o-a)/(1-a)||0,c=(1-s-a)/(1-a)||0,I=(1-r-a)/(1-a)||0;return[g*100,c*100,I*100,a*100]};function i(n,o){return(n[0]-o[0])**2+(n[1]-o[1])**2+(n[2]-o[2])**2}return t.rgb.keyword=function(n){const o=A[n];if(o)return o;let s=1/0,r;for(const a of Object.keys(e)){const g=e[a],c=i(n,g);c<s&&(s=c,r=a)}return r},t.keyword.rgb=function(n){return e[n]},t.rgb.xyz=function(n){let o=n[0]/255,s=n[1]/255,r=n[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const a=o*.4124+s*.3576+r*.1805,g=o*.2126+s*.7152+r*.0722,c=o*.0193+s*.1192+r*.9505;return[a*100,g*100,c*100]},t.rgb.lab=function(n){const o=t.rgb.xyz(n);let s=o[0],r=o[1],a=o[2];s/=95.047,r/=100,a/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const g=116*r-16,c=500*(s-r),I=200*(r-a);return[g,c,I]},t.hsl.rgb=function(n){const o=n[0]/360,s=n[1]/100,r=n[2]/100;let a,g,c;if(s===0)return c=r*255,[c,c,c];r<.5?a=r*(1+s):a=r+s-r*s;const I=2*r-a,l=[0,0,0];for(let B=0;B<3;B++)g=o+1/3*-(B-1),g<0&&g++,g>1&&g--,6*g<1?c=I+(a-I)*6*g:2*g<1?c=a:3*g<2?c=I+(a-I)*(2/3-g)*6:c=I,l[B]=c*255;return l},t.hsl.hsv=function(n){const o=n[0];let s=n[1]/100,r=n[2]/100,a=s;const g=Math.max(r,.01);r*=2,s*=r<=1?r:2-r,a*=g<=1?g:2-g;const c=(r+s)/2,I=r===0?2*a/(g+a):2*s/(r+s);return[o,I*100,c*100]},t.hsv.rgb=function(n){const o=n[0]/60,s=n[1]/100;let r=n[2]/100;const a=Math.floor(o)%6,g=o-Math.floor(o),c=255*r*(1-s),I=255*r*(1-s*g),l=255*r*(1-s*(1-g));switch(r*=255,a){case 0:return[r,l,c];case 1:return[I,r,c];case 2:return[c,r,l];case 3:return[c,I,r];case 4:return[l,c,r];case 5:return[r,c,I]}},t.hsv.hsl=function(n){const o=n[0],s=n[1]/100,r=n[2]/100,a=Math.max(r,.01);let g,c;c=(2-s)*r;const I=(2-s)*a;return g=s*a,g/=I<=1?I:2-I,g=g||0,c/=2,[o,g*100,c*100]},t.hwb.rgb=function(n){const o=n[0]/360;let s=n[1]/100,r=n[2]/100;const a=s+r;let g;a>1&&(s/=a,r/=a);const c=Math.floor(6*o),I=1-r;g=6*o-c,(c&1)!==0&&(g=1-g);const l=s+g*(I-s);let B,C,Q;switch(c){default:case 6:case 0:B=I,C=l,Q=s;break;case 1:B=l,C=I,Q=s;break;case 2:B=s,C=I,Q=l;break;case 3:B=s,C=l,Q=I;break;case 4:B=l,C=s,Q=I;break;case 5:B=I,C=s,Q=l;break}return[B*255,C*255,Q*255]},t.cmyk.rgb=function(n){const o=n[0]/100,s=n[1]/100,r=n[2]/100,a=n[3]/100,g=1-Math.min(1,o*(1-a)+a),c=1-Math.min(1,s*(1-a)+a),I=1-Math.min(1,r*(1-a)+a);return[g*255,c*255,I*255]},t.xyz.rgb=function(n){const o=n[0]/100,s=n[1]/100,r=n[2]/100;let a,g,c;return a=o*3.2406+s*-1.5372+r*-.4986,g=o*-.9689+s*1.8758+r*.0415,c=o*.0557+s*-.204+r*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),g=Math.min(Math.max(0,g),1),c=Math.min(Math.max(0,c),1),[a*255,g*255,c*255]},t.xyz.lab=function(n){let o=n[0],s=n[1],r=n[2];o/=95.047,s/=100,r/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const a=116*s-16,g=500*(o-s),c=200*(s-r);return[a,g,c]},t.lab.xyz=function(n){const o=n[0],s=n[1],r=n[2];let a,g,c;g=(o+16)/116,a=s/500+g,c=g-r/200;const I=g**3,l=a**3,B=c**3;return g=I>.008856?I:(g-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,c=B>.008856?B:(c-16/116)/7.787,a*=95.047,g*=100,c*=108.883,[a,g,c]},t.lab.lch=function(n){const o=n[0],s=n[1],r=n[2];let a;a=Math.atan2(r,s)*360/2/Math.PI,a<0&&(a+=360);const c=Math.sqrt(s*s+r*r);return[o,c,a]},t.lch.lab=function(n){const o=n[0],s=n[1],a=n[2]/360*2*Math.PI,g=s*Math.cos(a),c=s*Math.sin(a);return[o,g,c]},t.rgb.ansi16=function(n,o=null){const[s,r,a]=n;let g=o===null?t.rgb.hsv(n)[2]:o;if(g=Math.round(g/50),g===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(s/255));return g===2&&(c+=60),c},t.hsv.ansi16=function(n){return t.rgb.ansi16(t.hsv.rgb(n),n[2])},t.rgb.ansi256=function(n){const o=n[0],s=n[1],r=n[2];return o===s&&s===r?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5)},t.ansi16.rgb=function(n){let o=n%10;if(o===0||o===7)return n>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const s=(~~(n>50)+1)*.5,r=(o&1)*s*255,a=(o>>1&1)*s*255,g=(o>>2&1)*s*255;return[r,a,g]},t.ansi256.rgb=function(n){if(n>=232){const g=(n-232)*10+8;return[g,g,g]}n-=16;let o;const s=Math.floor(n/36)/5*255,r=Math.floor((o=n%36)/6)/5*255,a=o%6/5*255;return[s,r,a]},t.rgb.hex=function(n){const s=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},t.hex.rgb=function(n){const o=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let s=o[0];o[0].length===3&&(s=s.split("").map(I=>I+I).join(""));const r=parseInt(s,16),a=r>>16&255,g=r>>8&255,c=r&255;return[a,g,c]},t.rgb.hcg=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.max(Math.max(o,s),r),g=Math.min(Math.min(o,s),r),c=a-g;let I,l;return c<1?I=g/(1-c):I=0,c<=0?l=0:a===o?l=(s-r)/c%6:a===s?l=2+(r-o)/c:l=4+(o-s)/c,l/=6,l%=1,[l*360,c*100,I*100]},t.hsl.hcg=function(n){const o=n[1]/100,s=n[2]/100,r=s<.5?2*o*s:2*o*(1-s);let a=0;return r<1&&(a=(s-.5*r)/(1-r)),[n[0],r*100,a*100]},t.hsv.hcg=function(n){const o=n[1]/100,s=n[2]/100,r=o*s;let a=0;return r<1&&(a=(s-r)/(1-r)),[n[0],r*100,a*100]},t.hcg.rgb=function(n){const o=n[0]/360,s=n[1]/100,r=n[2]/100;if(s===0)return[r*255,r*255,r*255];const a=[0,0,0],g=o%1*6,c=g%1,I=1-c;let l=0;switch(Math.floor(g)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=I,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=I,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=I}return l=(1-s)*r,[(s*a[0]+l)*255,(s*a[1]+l)*255,(s*a[2]+l)*255]},t.hcg.hsv=function(n){const o=n[1]/100,s=n[2]/100,r=o+s*(1-o);let a=0;return r>0&&(a=o/r),[n[0],a*100,r*100]},t.hcg.hsl=function(n){const o=n[1]/100,r=n[2]/100*(1-o)+.5*o;let a=0;return r>0&&r<.5?a=o/(2*r):r>=.5&&r<1&&(a=o/(2*(1-r))),[n[0],a*100,r*100]},t.hcg.hwb=function(n){const o=n[1]/100,s=n[2]/100,r=o+s*(1-o);return[n[0],(r-o)*100,(1-r)*100]},t.hwb.hcg=function(n){const o=n[1]/100,r=1-n[2]/100,a=r-o;let g=0;return a<1&&(g=(r-a)/(1-a)),[n[0],a*100,g*100]},t.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},t.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},t.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},t.gray.hsl=function(n){return[0,0,n[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(n){return[0,100,n[0]]},t.gray.cmyk=function(n){return[0,0,0,n[0]]},t.gray.lab=function(n){return[n[0],0,0]},t.gray.hex=function(n){const o=Math.round(n[0]/100*255)&255,r=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(r.length)+r},t.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]},ZwA}var VwA,nut;function qje(){if(nut)return VwA;nut=1;const e=iut();function A(){const o={},s=Object.keys(e);for(let r=s.length,a=0;a<r;a++)o[s[a]]={distance:-1,parent:null};return o}function t(o){const s=A(),r=[o];for(s[o].distance=0;r.length;){const a=r.pop(),g=Object.keys(e[a]);for(let c=g.length,I=0;I<c;I++){const l=g[I],B=s[l];B.distance===-1&&(B.distance=s[a].distance+1,B.parent=a,r.unshift(l))}}return s}function i(o,s){return function(r){return s(o(r))}}function n(o,s){const r=[s[o].parent,o];let a=e[s[o].parent][o],g=s[o].parent;for(;s[g].parent;)r.unshift(s[g].parent),a=i(e[s[g].parent][g],a),g=s[g].parent;return a.conversion=r,a}return VwA=function(o){const s=t(o),r={},a=Object.keys(s);for(let g=a.length,c=0;c<g;c++){const I=a[c];s[I].parent!==null&&(r[I]=n(I,s))}return r},VwA}var jwA,out;function Pje(){if(out)return jwA;out=1;const e=iut(),A=qje(),t={},i=Object.keys(e);function n(s){const r=function(...a){const g=a[0];return g==null?g:(g.length>1&&(a=g),s(a))};return"conversion"in s&&(r.conversion=s.conversion),r}function o(s){const r=function(...a){const g=a[0];if(g==null)return g;g.length>1&&(a=g);const c=s(a);if(typeof c=="object")for(let I=c.length,l=0;l<I;l++)c[l]=Math.round(c[l]);return c};return"conversion"in s&&(r.conversion=s.conversion),r}return i.forEach(s=>{t[s]={},Object.defineProperty(t[s],"channels",{value:e[s].channels}),Object.defineProperty(t[s],"labels",{value:e[s].labels});const r=A(s);Object.keys(r).forEach(g=>{const c=r[g];t[s][g]=o(c),t[s][g].raw=n(c)})}),jwA=t,jwA}var zwA,sut;function Oje(){if(sut)return zwA;sut=1;const e=Kje(),A=Pje(),t=["keyword","gray","hex"],i={};for(const l of Object.keys(A))i[[...A[l].labels].sort().join("")]=l;const n={};function o(l,B){if(!(this instanceof o))return new o(l,B);if(B&&B in t&&(B=null),B&&!(B in A))throw new Error("Unknown model: "+B);let C,Q;if(l==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(l instanceof o)this.model=l.model,this.color=[...l.color],this.valpha=l.valpha;else if(typeof l=="string"){const u=e.get(l);if(u===null)throw new Error("Unable to parse color from string: "+l);this.model=u.model,Q=A[this.model].channels,this.color=u.value.slice(0,Q),this.valpha=typeof u.value[Q]=="number"?u.value[Q]:1}else if(l.length>0){this.model=B||"rgb",Q=A[this.model].channels;const u=Array.prototype.slice.call(l,0,Q);this.color=I(u,Q),this.valpha=typeof l[Q]=="number"?l[Q]:1}else if(typeof l=="number")this.model="rgb",this.color=[l>>16&255,l>>8&255,l&255],this.valpha=1;else{this.valpha=1;const u=Object.keys(l);"alpha"in l&&(u.splice(u.indexOf("alpha"),1),this.valpha=typeof l.alpha=="number"?l.alpha:0);const E=u.sort().join("");if(!(E in i))throw new Error("Unable to parse color from object: "+JSON.stringify(l));this.model=i[E];const{labels:p}=A[this.model],f=[];for(C=0;C<p.length;C++)f.push(l[p[C]]);this.color=I(f)}if(n[this.model])for(Q=A[this.model].channels,C=0;C<Q;C++){const u=n[this.model][C];u&&(this.color[C]=u(this.color[C]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(l){let B=this.model in e.to?this:this.rgb();B=B.round(typeof l=="number"?l:1);const C=B.valpha===1?B.color:[...B.color,this.valpha];return e.to[B.model](C)},percentString(l){const B=this.rgb().round(typeof l=="number"?l:1),C=B.valpha===1?B.color:[...B.color,this.valpha];return e.to.rgb.percent(C)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const l={},{channels:B}=A[this.model],{labels:C}=A[this.model];for(let Q=0;Q<B;Q++)l[C[Q]]=this.color[Q];return this.valpha!==1&&(l.alpha=this.valpha),l},unitArray(){const l=this.rgb().color;return l[0]/=255,l[1]/=255,l[2]/=255,this.valpha!==1&&l.push(this.valpha),l},unitObject(){const l=this.rgb().object();return l.r/=255,l.g/=255,l.b/=255,this.valpha!==1&&(l.alpha=this.valpha),l},round(l){return l=Math.max(l||0,0),new o([...this.color.map(r(l)),this.valpha],this.model)},alpha(l){return l!==void 0?new o([...this.color,Math.max(0,Math.min(1,l))],this.model):this.valpha},red:a("rgb",0,g(255)),green:a("rgb",1,g(255)),blue:a("rgb",2,g(255)),hue:a(["hsl","hsv","hsl","hwb","hcg"],0,l=>(l%360+360)%360),saturationl:a("hsl",1,g(100)),lightness:a("hsl",2,g(100)),saturationv:a("hsv",1,g(100)),value:a("hsv",2,g(100)),chroma:a("hcg",1,g(100)),gray:a("hcg",2,g(100)),white:a("hwb",1,g(100)),wblack:a("hwb",2,g(100)),cyan:a("cmyk",0,g(100)),magenta:a("cmyk",1,g(100)),yellow:a("cmyk",2,g(100)),black:a("cmyk",3,g(100)),x:a("xyz",0,g(95.047)),y:a("xyz",1,g(100)),z:a("xyz",2,g(108.833)),l:a("lab",0,g(100)),a:a("lab",1),b:a("lab",2),keyword(l){return l!==void 0?new o(l):A[this.model].keyword(this.color)},hex(l){return l!==void 0?new o(l):e.to.hex(this.rgb().round().color)},hexa(l){if(l!==void 0)return new o(l);const B=this.rgb().round().color;let C=Math.round(this.valpha*255).toString(16).toUpperCase();return C.length===1&&(C="0"+C),e.to.hex(B)+C},rgbNumber(){const l=this.rgb().color;return(l[0]&255)<<16|(l[1]&255)<<8|l[2]&255},luminosity(){const l=this.rgb().color,B=[];for(const[C,Q]of l.entries()){const u=Q/255;B[C]=u<=.04045?u/12.92:((u+.055)/1.055)**2.4}return .2126*B[0]+.7152*B[1]+.0722*B[2]},contrast(l){const B=this.luminosity(),C=l.luminosity();return B>C?(B+.05)/(C+.05):(C+.05)/(B+.05)},level(l){const B=this.contrast(l);return B>=7?"AAA":B>=4.5?"AA":""},isDark(){const l=this.rgb().color;return(l[0]*2126+l[1]*7152+l[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const l=this.rgb();for(let B=0;B<3;B++)l.color[B]=255-l.color[B];return l},lighten(l){const B=this.hsl();return B.color[2]+=B.color[2]*l,B},darken(l){const B=this.hsl();return B.color[2]-=B.color[2]*l,B},saturate(l){const B=this.hsl();return B.color[1]+=B.color[1]*l,B},desaturate(l){const B=this.hsl();return B.color[1]-=B.color[1]*l,B},whiten(l){const B=this.hwb();return B.color[1]+=B.color[1]*l,B},blacken(l){const B=this.hwb();return B.color[2]+=B.color[2]*l,B},grayscale(){const l=this.rgb().color,B=l[0]*.3+l[1]*.59+l[2]*.11;return o.rgb(B,B,B)},fade(l){return this.alpha(this.valpha-this.valpha*l)},opaquer(l){return this.alpha(this.valpha+this.valpha*l)},rotate(l){const B=this.hsl();let C=B.color[0];return C=(C+l)%360,C=C<0?360+C:C,B.color[0]=C,B},mix(l,B){if(!l||!l.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof l);const C=l.rgb(),Q=this.rgb(),u=B===void 0?.5:B,E=2*u-1,p=C.alpha()-Q.alpha(),f=((E*p===-1?E:(E+p)/(1+E*p))+1)/2,m=1-f;return o.rgb(f*C.red()+m*Q.red(),f*C.green()+m*Q.green(),f*C.blue()+m*Q.blue(),C.alpha()*u+Q.alpha()*(1-u))}};for(const l of Object.keys(A)){if(t.includes(l))continue;const{channels:B}=A[l];o.prototype[l]=function(...C){return this.model===l?new o(this):C.length>0?new o(C,l):new o([...c(A[this.model][l].raw(this.color)),this.valpha],l)},o[l]=function(...C){let Q=C[0];return typeof Q=="number"&&(Q=I(C,B)),new o(Q,l)}}function s(l,B){return Number(l.toFixed(B))}function r(l){return function(B){return s(B,l)}}function a(l,B,C){l=Array.isArray(l)?l:[l];for(const Q of l)(n[Q]||(n[Q]=[]))[B]=C;return l=l[0],function(Q){let u;return Q!==void 0?(C&&(Q=C(Q)),u=this[l](),u.color[B]=Q,u):(u=this[l]().color[B],C&&(u=C(u)),u)}}function g(l){return function(B){return Math.max(0,Math.min(l,B))}}function c(l){return Array.isArray(l)?l:[l]}function I(l,B){for(let C=0;C<B;C++)typeof l[C]!="number"&&(l[C]=0);return l}return zwA=o,zwA}var Wje=Oje();const rut=Lw(Wje);var aut={0:"M0.4544564813877358 0L0.2723441540828736 0.03592830447352719L0.1086847233315459 0.14528754990019965L0.020630545837255005 0.3040632652221331L0 0.5395277421960205L0.049259221760993496 0.7369487828466779L0.18080513776237842 0.9005494166306564L0.37036887043974215 0.9872116270037247L0.5864663759301132 1L0.8148695622827444 0.9332890276148733L0.9326583645506394 0.8113052246023419L1 0.4031281830668562L0.833288960385582 0.09886798567812842L0.6801767918233781 0.02483708485091681L0.4544564813877358 0",1:"M 0.198 0.272 L 0.537 0 L 0.54 1",2:"M0.069593147751606 0.19461498231706575L0.1039380353319058 0.1224291500164194L0.20543361884368308 0.05510832064153169L0.3717712794432549 0.009452970962689482L0.4785344452623127 0L0.663238590738758 0.008714098643339864L0.8017933618843684 0.04769189395915288L0.8775637379550322 0.10746757678258442L0.9047778372591005 0.17693069668193287L0.9029710920770878 0.2231347105796246L0.8704496788008566 0.30047744598157516L0.7292906538577354 0.4508486051631194L0.3737955032119913 0.7369006417749693L0 1L1 1",3:"M0.03917438899874637 0.19855364635107545L0.15510940508963084 0.06745632622133718L0.37598645522339846 0L0.8486391893813088 0.0652271323161611L0.9782182415054349 0.21747394183735683L0.9213133780517754 0.3547560290117714L0.6504271515903481 0.4543436297681271L0.22975249764129613 0.48476611625264143L0.7659038682744629 0.5411919558122493L0.9258712987734741 0.6203185665660985L1 0.7458360609169667L0.8938813281118737 0.9059190913045964L0.6166890258875837 1L0.261528440153542 0.9874861530507921L0 0.8837289530851273",4:"M0.7328897338403042 0L0 0.6684672518568535L1 0.6684672518568535M0.7243346007604563 0.4530722484807562L0.7243346007604563 1",5:"M 0 0 L 0 0.4973 L 0.4262 0.4319 L 0.7305 0.4565 L 0.8516 0.5009 L 0.9357 0.5639 L 1 0.7356 L 0.9696 0.8248 L 0.8898 0.895 L 0.733 0.9602 L 0.5518 0.9945 L 0.3814 1 L 0.2379 0.9821 L 0.1219 0.947 L 0 0.8748 M 0 0 L 1 0",6:"M0.6964601700926856 0L0.3639239026215478 0.0743562375769351L0.1415931962925719 0.21735490179786915L0.009977939399608712 0.46336322325406004L0.00029622007592593224 0.7083131475173043L0.09408885043224748 0.8746809149767036L0.3379247445101846 0.9876686500961888L0.7109203869569624 1L0.9260852957913362 0.9103558029693921L1 0.7716571969091733L0.9824294723385016 0.6390635485705886L0.7446504992867332 0.4733643097729175L0.31028858071607296 0.47578021640899115L0.1208702146816024 0.5481452483973847L0 0.6616669755788906",7:"M0 0L1 0L0.9246479649697582 0.030539772727272752L0.8850302419354837 0.05075757575757579L0.7922946068548385 0.11079545454545457L0.7419268208165322 0.15213068181818185L0.6907258064516127 0.20202020202020204L0.6400666267641127 0.26122159090909086L0.5913243447580644 0.33049242424242414L0.5458740234374998 0.4105902777777778L0.5050907258064514 0.5022727272727272L0.4703495148689514 0.6062973484848484L0.43257456133442534 0.787133049242424L0.41612903225806447 1",8:"M0.5143001078924863 0L0.16007477667923162 0.10731570786949331L0.14924628550868277 0.3146018498698755L0.2939585848842112 0.41617921794558677L0.8648302624811545 0.5385163833653317L1 0.7775820770511038L0.8180842915260376 0.9505845566922285L0.41968938540525413 1L0.08062381919779889 0.882831681184498L0 0.6936376947135333L0.17150171673893433 0.5188652309607817L0.6529263782780712 0.4242818653203618L0.8650205888491803 0.29644027376796367L0.8702067371119496 0.09910067291661573L0.5143001078924863 0",9:"M1 0.25379591792994305L0.9514789771111742 0.11679361536614272L0.8702482473521467 0.05711741614054847L0.7327445265851579 0.015213872471965633L0.525248180711544 0L0.3292056884418538 0.012928195113745608L0.15997632037247655 0.058762870026191856L0.05266940041228321 0.12882439350476L0 0.2562067822770946L0.11316462894512366 0.4121335905917837L0.2403060136479954 0.4603365890068938L0.4097241967586011 0.4745978388276783L0.8642414300184816 0.420815170259988L0.9732054796346318 0.34537434075898393L1 0.25379591792994305M0.9647426784191072 0.35488595400360495L0.4756895081034974 1",A:"M0 1L0.4808333333333333 0L1 1M0.24250000000000002 0.6099439775910365L0.7341666666666666 0.6099439775910365",B:"M0 1L0 0.0117369978777208L0.30665717153513444 0L0.5874522807082946 0.03451403469442413L0.7766202217193218 0.15033936404895643L0.7471969743588041 0.31967962568332936L0.5246013359741988 0.4102978954282461L0.04378745314885416 0.44918617613783574L0.5112949594180156 0.469692928091109L0.8540266515643348 0.5552749498651879L1 0.6868463175009967L0.9880091196159324 0.8570018204672155L0.922301719975498 0.9321708046604659L0.7584266951758925 0.9932594737131338L0 1",C:"M1 0.23038928858890784L0.9328355511865092 0.12426412616785204L0.8096380839483327 0.04912601676267708L0.5763225801788256 0L0.4039037709527492 0.015028068281399815L0.2519579390951737 0.06533979308999706L0.10359458463139784 0.18146243506591617L0 0.4862728453971315L0.08129580872733055 0.792689266886982L0.20257034847159672 0.9160822255736587L0.3286572892798542 0.9738230826074175L0.5742878414421707 1L0.7883510303801312 0.9665431511195721L0.946851033994232 0.8689071500976585L1 0.7311049027121912",D:"M0 1L0.015604366822624637 0.020770988281483303L0.22564758265176144 0L0.3865476147957666 0.0024153386496795644L0.6479126635475078 0.051745644338731314L0.841191887805517 0.15827717679529366L0.9517008345536152 0.30172260586872185L0.9957536578687336 0.4504541551987709L1 0.5624359222498485L0.9798483279164735 0.6584121775234548L0.9386273319285215 0.7395945263504481L0.806292129480815 0.8624239259880274L0.6296239151398265 0.9406169638094516L0.3397492767598845 0.9954164354263132L0 1",E:"M0 0L0 1M0 0L1 0M0 0.5L0.7 0.5M0 1L1 1",F:"M0 0L0 1M0.011363636363636364 0.006802721088435374L1 0.006802721088435374M0.011363636363636364 0.4965986394557823L0.8409090909090909 0.4965986394557823",G:"M0.902666857540557 0.03860785012651126L0.6504261864675637 0L0.3838947267237336 0.015442305268228053L0.21293332876776194 0.07706794377239819L0.07799659974941617 0.1994951236187481L0 0.46380381528937314L0.04159964421546915 0.7502491408002389L0.13176692977834842 0.8535497868383203L0.2709176262273927 0.936767572377719L0.4386472596876406 0.9891638569283179L0.6145513562841309 1L0.7782254421419019 0.9585373611026471L0.9092650433859927 0.8540372997461425L1 0.5556012645283437L0.5583959277303046 0.55491741080559",H:"M0 0L0 1M0 0.4788732394366197L0.989010989010989 0.4788732394366197M1 0L1 1",I:"M0.5 0L0.5 1",J:"M0.9976457238788704 0L1 0.7396412315872798L0.9773931362096968 0.8322033314977973L0.9345115952458736 0.882296255506608L0.8743862896259549 0.9221331222466961L0.8024024079884948 0.9526431718061675L0.6443996712151668 0.9893997797356828L0.5035848940343224 1L0.3127211130319937 0.9877004749449337L0.17201910858386513 0.9539509911894274L0.10357419806379677 0.9212555066079295L0.053656568662899015 0.8816079295154184L0.020759483663648916 0.8360407488986785L0.003376206348523566 0.7855864537444934L0 0.7312775330396476",K:"M0 0L0 1M0.8787878787878788 0.06666666666666667L0 0.6148148148148148M0.3333333333333333 0.45925925925925926L1 0.9777777777777777",L:"M0 0L0 1L1 1",M:"M0 1L0 0L0.5 0.6512L1 0L1 1",N:"M0 1L0 0L1 1L0.9803729146221786 0",O:"M0.4718499217948183 1L0.2896765846490613 0.9606979309189402L0.12315162147934663 0.8411184486080473L0 0.4352399966492615L0.11730398524516283 0.13145645436014852L0.2612197451988078 0.04493357858878059L0.5104071592772554 0L0.7450113425917159 0.05393013710105273L0.882367950645524 0.15242300282020502L1 0.5224527406249126L0.9414597290654386 0.7560662329321755L0.8371289514446183 0.8910800547287298L0.6518259868433511 0.9830452628933628L0.4718499217948183 1",P:"M0 1L0 0.018871774228013626L0.29609603495819875 0L0.5609840637427541 0.011794858892508529L0.7332142696692472 0.04353904702296349L0.8102258645858864 0.0691965055027166L0.9330504315465442 0.14445061754775845L0.9876391714147118 0.22527816445836535L1 0.3434414070631638L0.9510549958116356 0.41772808046663146L0.8746646891596713 0.45879131862541683L0.7528523813396283 0.49171525113425024L0.5766919939969619 0.5153253033973054L0.33725744877712827 0.5284469008187558L0.025622667325582785 0.529905468802775",Q:"M0.4618887943546369 0.9755918167206952L0.28356128136544534 0.9372490397450218L0.12055179272160406 0.8205882753548176L0 0.4246165790405623L0.1148276047430244 0.12824784112887844L0.25570518844754375 0.043836831567190586L0.49963205786237674 0L0.7292835601228574 0.0526138004304122L0.8637404608452104 0.14870263423138746L0.9788892040030622 0.5097006183769648L0.9215847647858059 0.7376120297474734L0.8194564929275405 0.869330409436378L0.6380654214095985 0.9590509139448092L0.4618887943546369 0.9755918167206952M0.5824181120212351 0.6861805006946525L1 1",R:"M0 0.9928375167236815L0 0.02590227442068435L0.3611517274211098 0L0.6146286724700761 0.008660554424468435L0.7675462459194776 0.035269459580494614L0.831839975516866 0.056961676692569484L0.8847592491838954 0.08519560521497332L0.9238557535364527 0.120683646438422L0.9583303225312839 0.21691797435320384L0.955092470586235 0.3022616904894429L0.9198097669001631 0.3640573439322699L0.8564862239866702 0.40639258627024005L0.7691258543593579 0.43335506909190874L0.601775027203482 0.4539166070813109L0.023939064200217658 0.46997623755243123M0.5038084874863982 0.5108023922274467L1 1",S:"M0.8886929689221953 0.15146982162688968L0.7276173683050475 0.013780286031594946L0.34582323121005076 0L0.1318235250900008 0.09920162734298861L0.0444543935052531 0.2811287071349243L0.08064065829108809 0.3709571405906485L0.21603115127470426 0.4485505768228281L0.7525409135992945 0.5111160926769565L0.9330263665417677 0.5850732219351329L1 0.7129938124702524L0.9117772389978691 0.9130572743138187L0.6423187128058188 1L0.29586019579751677 0.9935291584506244L0.10638454191462794 0.9229845198431584L0 0.7570771288048773",T:"M0 0L1 0M0.5148514851485149 0L0.5148514851485149 1",U:"M0 0L0.0023103778751369115 0.5467447428390111L0.01823032542100219 0.6954785891481812L0.05895528135268338 0.8056480226151669L0.13703402031421133 0.8894445726483398L0.23918400876232196 0.9448524533417946L0.3917887458926616 0.9848674531975652L0.584341627875137 1L0.7194816196604602 0.9848501456716763L0.8303268115073934 0.9449411544119768L0.8966613970084885 0.898186315516197L0.9251437568455642 0.867453197565408L0.9687114937020809 0.7890904895145239L0.9890470974808324 0.6852857184065537L1 0.0014769088758762145",V:"M0 0L0.5348837209302325 1L1 0",W:"M0 0L0.23300090661831369 0.9873417721518988L0.49954669084315495 0.30081906180193585L0.7851314596554849 1L1 0.0215934475055845",X:"M0 0L0.9893617021276596 1M1 0L0.010638297872340425 1",Y:"M0 0L0.4860515021459227 0.44712562100780695M1 0.0014194464158977947L0.48927038626609437 0.44996451383960256L0.5075107296137339 1",Z:"M0 0L1 0L0 1L1 1",a:"M0.900 0.276L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",b:"M0.100 0.034L0.100 0.759M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",c:"M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",d:"M0.900 0.034L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",e:"M0.100 0.483L0.900 0.483M0.900 0.414L0.834 0.345L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",f:"M0.900 0.034L0.700 0.034L0.500 0.069L0.400 0.172L0.400 0.759M0.100 0.276L0.800 0.276",g:"M0.900 0.276L0.900 0.828L0.834 0.931L0.766 0.966L0.634 1.000L0.434 1.000L0.300 0.966L0.166 0.897L0.100 0.793M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",h:"M0.100 0.034L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",i:"M0.466 0.034L0.534 0.034M0.500 0.276L0.500 0.759",j:"M0.634 0.034L0.766 0.034M0.700 0.276L0.700 0.862L0.634 0.966L0.366 1.000L0.166 0.966",k:"M0.100 0.034L0.100 0.759M0.827 0.276L0.100 0.621M0.391 0.483L0.900 0.759",l:"M0.100 0.034L0.100 0.759",m:"M0.100 0.276L0.100 0.759M0.100 0.414L0.209 0.310L0.282 0.276L0.418 0.276L0.491 0.310L0.564 0.414L0.564 0.759M0.564 0.414L0.673 0.310L0.745 0.276L0.882 0.276L0.955 0.310L0.955 0.759",n:"M0.100 0.276L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",o:"M0.408 0.276L0.285 0.310L0.162 0.379L0.100 0.483L0.100 0.552L0.162 0.655L0.285 0.724L0.408 0.759L0.592 0.759L0.715 0.724L0.838 0.655L0.900 0.552L0.900 0.483L0.838 0.379L0.715 0.310L0.592 0.276L0.408 0.276",p:"M0.100 0.276L0.100 1.000M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",q:"M0.900 0.276L0.900 1.000M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",r:"M0.100 0.276L0.100 0.759M0.100 0.483L0.200 0.379L0.400 0.310L0.600 0.276L0.900 0.276",s:"M0.900 0.379L0.827 0.310L0.609 0.276L0.391 0.276L0.173 0.310L0.100 0.379L0.173 0.448L0.391 0.483L0.609 0.517L0.827 0.552L0.900 0.621L0.827 0.724L0.609 0.759L0.391 0.759L0.173 0.724L0.100 0.655",t:"M0.400 0.034L0.400 0.621L0.500 0.724L0.700 0.759L0.900 0.759M0.100 0.276L0.800 0.276",u:"M0.100 0.276L0.100 0.621L0.173 0.724L0.318 0.759L0.536 0.759L0.682 0.724L0.900 0.621M0.900 0.276L0.900 0.759",v:"M0.100 0.276L0.500 0.759M0.900 0.276L0.500 0.759",w:"M0.100 0.276L0.300 0.759M0.500 0.276L0.300 0.759M0.500 0.276L0.700 0.759M0.900 0.276L0.700 0.759",x:"M0.100 0.276L0.900 0.759M0.900 0.276L0.100 0.759",y:"M0.162 0.276L0.530 0.759M0.900 0.276L0.530 0.759L0.408 0.897L0.285 0.966L0.162 1.000L0.100 1.000",z:"M0.900 0.276L0.100 0.759M0.100 0.276L0.900 0.276M0.100 0.759L0.900 0.759",".":"M 0.49 1 L 0.41 1",",":"M0.55 0.85L0.45 0.95L0.5 1","*":"M 0.5 0.25 L 0.8 0.25 M 0.5 0.25 L 0.5927 0.4402 M 0.5 0.25 L 0.2573 0.3676 M 0.5 0.25 L 0.2573 0.1324 M 0.5 0.25 L 0.599 0.055","(":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",")":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","-":"M0 0.5L1 0.5","+":"M 0 0.5 L 1 0.5 M 0.5 0.125 L 0.5 0.875","=":"M0 0.25L1 0.25M0 0.75L1 0.75",_:"M0 1 L1 1","[":"M0.75 0L0.25 0L0.25 1L0.75 1","]":"M0.25 0L0.75 0L0.75 1L0.25 1","<":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",">":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","'":"M 0.5 0 L 0.5 0.5",'"':"M 0.25 0 L 0.25 0.5 M 0.75 0 L 0.75 0.5","/":"M0 1L1 0","\\":"M0 0L1 1"},iz={};for(const e in aut){iz[e]=[];const A=aut[e].split("M").slice(1).map(t=>t.split("L").map(i=>i.trim().split(" ").map(parseFloat)));for(const t of A)for(let i=0;i<t.length-1;i++)iz[e].push({x1:t[i][0],y1:1-t[i][1],x2:t[i+1][0],y2:1-t[i+1][1]})}function Zje(e){if(e.sheet)return e.sheet;for(var A=0;A<document.styleSheets.length;A++)if(document.styleSheets[A].ownerNode===e)return document.styleSheets[A]}function Vje(e){var A=document.createElement("style");return A.setAttribute("data-emotion",e.key),e.nonce!==void 0&&A.setAttribute("nonce",e.nonce),A.appendChild(document.createTextNode("")),A.setAttribute("data-s",""),A}var jje=(function(){function e(t){var i=this;this._insertTag=function(n){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(n,o),i.tags.push(n)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var A=e.prototype;return A.hydrate=function(i){i.forEach(this._insertTag)},A.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vje(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Zje(n);try{o.insertRule(i,o.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(i));this.ctr++},A.flush=function(){this.tags.forEach(function(i){var n;return(n=i.parentNode)==null?void 0:n.removeChild(i)}),this.tags=[],this.ctr=0},e})(),Ny="-ms-",nz="-moz-",cB="-webkit-",gut="comm",XwA="rule",$wA="decl",zje="@import",cut="@keyframes",Xje="@layer",$je=Math.abs,oz=String.fromCharCode,Aze=Object.assign;function tze(e,A){return z0(e,0)^45?(((A<<2^z0(e,0))<<2^z0(e,1))<<2^z0(e,2))<<2^z0(e,3):0}function Iut(e){return e.trim()}function eze(e,A){return(e=A.exec(e))?e[0]:e}function IB(e,A,t){return e.replace(A,t)}function ADA(e,A){return e.indexOf(A)}function z0(e,A){return e.charCodeAt(A)|0}function _4(e,A,t){return e.slice(A,t)}function vb(e){return e.length}function tDA(e){return e.length}function sz(e,A){return A.push(e),e}function ize(e,A){return e.map(A).join("")}var rz=1,EL=1,lut=0,aw=0,wp=0,dL="";function az(e,A,t,i,n,o,s){return{value:e,root:A,parent:t,type:i,props:n,children:o,line:rz,column:EL,length:s,return:""}}function x4(e,A){return Aze(az("",null,null,"",null,null,0),e,{length:-e.length},A)}function nze(){return wp}function oze(){return wp=aw>0?z0(dL,--aw):0,EL--,wp===10&&(EL=1,rz--),wp}function sD(){return wp=aw<lut?z0(dL,aw++):0,EL++,wp===10&&(EL=1,rz++),wp}function kb(){return z0(dL,aw)}function gz(){return aw}function b4(e,A){return _4(dL,e,A)}function S4(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function But(e){return rz=EL=1,lut=vb(dL=e),aw=0,[]}function Cut(e){return dL="",e}function cz(e){return Iut(b4(aw-1,eDA(e===91?e+2:e===40?e+1:e)))}function sze(e){for(;(wp=kb())&&wp<33;)sD();return S4(e)>2||S4(wp)>3?"":" "}function rze(e,A){for(;--A&&sD()&&!(wp<48||wp>102||wp>57&&wp<65||wp>70&&wp<97););return b4(e,gz()+(A<6&&kb()==32&&sD()==32))}function eDA(e){for(;sD();)switch(wp){case e:return aw;case 34:case 39:e!==34&&e!==39&&eDA(wp);break;case 40:e===41&&eDA(e);break;case 92:sD();break}return aw}function aze(e,A){for(;sD()&&e+wp!==57;)if(e+wp===84&&kb()===47)break;return"/*"+b4(A,aw-1)+"*"+oz(e===47?e:sD())}function gze(e){for(;!S4(kb());)sD();return b4(e,aw)}function cze(e){return Cut(Iz("",null,null,null,[""],e=But(e),0,[0],e))}function Iz(e,A,t,i,n,o,s,r,a){for(var g=0,c=0,I=s,l=0,B=0,C=0,Q=1,u=1,E=1,p=0,f="",m=n,S=o,_=i,v=f;u;)switch(C=p,p=sD()){case 40:if(C!=108&&z0(v,I-1)==58){ADA(v+=IB(cz(p),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:v+=cz(p);break;case 9:case 10:case 13:case 32:v+=sze(C);break;case 92:v+=rze(gz()-1,7);continue;case 47:switch(kb()){case 42:case 47:sz(Ize(aze(sD(),gz()),A,t),a);break;default:v+="/"}break;case 123*Q:r[g++]=vb(v)*E;case 125*Q:case 59:case 0:switch(p){case 0:case 125:u=0;case 59+c:E==-1&&(v=IB(v,/\f/g,"")),B>0&&vb(v)-I&&sz(B>32?Qut(v+";",i,t,I-1):Qut(IB(v," ","")+";",i,t,I-2),a);break;case 59:v+=";";default:if(sz(_=hut(v,A,t,g,c,n,r,f,m=[],S=[],I),o),p===123)if(c===0)Iz(v,A,_,_,m,o,I,r,S);else switch(l===99&&z0(v,3)===110?100:l){case 100:case 108:case 109:case 115:Iz(e,_,_,i&&sz(hut(e,_,_,0,0,n,r,f,n,m=[],I),S),n,S,I,r,i?m:S);break;default:Iz(v,_,_,_,[""],S,0,r,S)}}g=c=B=0,Q=E=1,f=v="",I=s;break;case 58:I=1+vb(v),B=C;default:if(Q<1){if(p==123)--Q;else if(p==125&&Q++==0&&oze()==125)continue}switch(v+=oz(p),p*Q){case 38:E=c>0?1:(v+="\f",-1);break;case 44:r[g++]=(vb(v)-1)*E,E=1;break;case 64:kb()===45&&(v+=cz(sD())),l=kb(),c=I=vb(f=v+=gze(gz())),p++;break;case 45:C===45&&vb(v)==2&&(Q=0)}}return o}function hut(e,A,t,i,n,o,s,r,a,g,c){for(var I=n-1,l=n===0?o:[""],B=tDA(l),C=0,Q=0,u=0;C<i;++C)for(var E=0,p=_4(e,I+1,I=$je(Q=s[C])),f=e;E<B;++E)(f=Iut(Q>0?l[E]+" "+p:IB(p,/&\f/g,l[E])))&&(a[u++]=f);return az(e,A,t,n===0?XwA:r,a,g,c)}function Ize(e,A,t){return az(e,A,t,gut,oz(nze()),_4(e,2,-2),0)}function Qut(e,A,t,i){return az(e,A,t,$wA,_4(e,0,i),_4(e,i+1,-1),i)}function pL(e,A){for(var t="",i=tDA(e),n=0;n<i;n++)t+=A(e[n],n,e,A)||"";return t}function lze(e,A,t,i){switch(e.type){case Xje:if(e.children.length)break;case zje:case $wA:return e.return=e.return||e.value;case gut:return"";case cut:return e.return=e.value+"{"+pL(e.children,i)+"}";case XwA:e.value=e.props.join(",")}return vb(t=pL(e.children,i))?e.return=e.value+"{"+t+"}":""}function Bze(e){var A=tDA(e);return function(t,i,n,o){for(var s="",r=0;r<A;r++)s+=e[r](t,i,n,o)||"";return s}}function Cze(e){return function(A){A.root||(A=A.return)&&e(A)}}function hze(e){var A=Object.create(null);return function(t){return A[t]===void 0&&(A[t]=e(t)),A[t]}}var Qze=function(A,t,i){for(var n=0,o=0;n=o,o=kb(),n===38&&o===12&&(t[i]=1),!S4(o);)sD();return b4(A,aw)},uze=function(A,t){var i=-1,n=44;do switch(S4(n)){case 0:n===38&&kb()===12&&(t[i]=1),A[i]+=Qze(aw-1,t,i);break;case 2:A[i]+=cz(n);break;case 4:if(n===44){A[++i]=kb()===58?"&\f":"",t[i]=A[i].length;break}default:A[i]+=oz(n)}while(n=sD());return A},Eze=function(A,t){return Cut(uze(But(A),t))},uut=new WeakMap,dze=function(A){if(!(A.type!=="rule"||!A.parent||A.length<1)){for(var t=A.value,i=A.parent,n=A.column===i.column&&A.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(A.props.length===1&&t.charCodeAt(0)!==58&&!uut.get(i))&&!n){uut.set(A,!0);for(var o=[],s=Eze(t,o),r=i.props,a=0,g=0;a<s.length;a++)for(var c=0;c<r.length;c++,g++)A.props[g]=o[a]?s[a].replace(/&\f/g,r[c]):r[c]+" "+s[a]}}},pze=function(A){if(A.type==="decl"){var t=A.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(A.return="",A.value="")}};function Eut(e,A){switch(tze(e,A)){case 5103:return cB+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return cB+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return cB+e+nz+e+Ny+e+e;case 6828:case 4268:return cB+e+Ny+e+e;case 6165:return cB+e+Ny+"flex-"+e+e;case 5187:return cB+e+IB(e,/(\w+).+(:[^]+)/,cB+"box-$1$2"+Ny+"flex-$1$2")+e;case 5443:return cB+e+Ny+"flex-item-"+IB(e,/flex-|-self/,"")+e;case 4675:return cB+e+Ny+"flex-line-pack"+IB(e,/align-content|flex-|-self/,"")+e;case 5548:return cB+e+Ny+IB(e,"shrink","negative")+e;case 5292:return cB+e+Ny+IB(e,"basis","preferred-size")+e;case 6060:return cB+"box-"+IB(e,"-grow","")+cB+e+Ny+IB(e,"grow","positive")+e;case 4554:return cB+IB(e,/([^-])(transform)/g,"$1"+cB+"$2")+e;case 6187:return IB(IB(IB(e,/(zoom-|grab)/,cB+"$1"),/(image-set)/,cB+"$1"),e,"")+e;case 5495:case 3959:return IB(e,/(image-set\([^]*)/,cB+"$1$`$1");case 4968:return IB(IB(e,/(.+:)(flex-)?(.*)/,cB+"box-pack:$3"+Ny+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+cB+e+e;case 4095:case 3583:case 4068:case 2532:return IB(e,/(.+)-inline(.+)/,cB+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(vb(e)-1-A>6)switch(z0(e,A+1)){case 109:if(z0(e,A+4)!==45)break;case 102:return IB(e,/(.+:)(.+)-([^]+)/,"$1"+cB+"$2-$3$1"+nz+(z0(e,A+3)==108?"$3":"$2-$3"))+e;case 115:return~ADA(e,"stretch")?Eut(IB(e,"stretch","fill-available"),A)+e:e}break;case 4949:if(z0(e,A+1)!==115)break;case 6444:switch(z0(e,vb(e)-3-(~ADA(e,"!important")&&10))){case 107:return IB(e,":",":"+cB)+e;case 101:return IB(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cB+(z0(e,14)===45?"inline-":"")+"box$3$1"+cB+"$2$3$1"+Ny+"$2box$3")+e}break;case 5936:switch(z0(e,A+11)){case 114:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return cB+e+Ny+e+e}return e}var fze=function(A,t,i,n){if(A.length>-1&&!A.return)switch(A.type){case $wA:A.return=Eut(A.value,A.length);break;case cut:return pL([x4(A,{value:IB(A.value,"@","@"+cB)})],n);case XwA:if(A.length)return ize(A.props,function(o){switch(eze(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pL([x4(A,{props:[IB(o,/:(read-\w+)/,":"+nz+"$1")]})],n);case"::placeholder":return pL([x4(A,{props:[IB(o,/:(plac\w+)/,":"+cB+"input-$1")]}),x4(A,{props:[IB(o,/:(plac\w+)/,":"+nz+"$1")]}),x4(A,{props:[IB(o,/:(plac\w+)/,Ny+"input-$1")]})],n)}return""})}},yze=[fze],mze=function(A){var t=A.key;if(t==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(Q){var u=Q.getAttribute("data-emotion");u.indexOf(" ")!==-1&&(document.head.appendChild(Q),Q.setAttribute("data-s",""))})}var n=A.stylisPlugins||yze,o={},s,r=[];s=A.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(Q){for(var u=Q.getAttribute("data-emotion").split(" "),E=1;E<u.length;E++)o[u[E]]=!0;r.push(Q)});var a,g=[dze,pze];{var c,I=[lze,Cze(function(Q){c.insert(Q)})],l=Bze(g.concat(n,I)),B=function(u){return pL(cze(u),l)};a=function(u,E,p,f){c=p,B(u?u+"{"+E.styles+"}":E.styles),f&&(C.inserted[E.name]=!0)}}var C={key:t,sheet:new jje({key:t,container:s,nonce:A.nonce,speedy:A.speedy,prepend:A.prepend,insertionPoint:A.insertionPoint}),nonce:A.nonce,inserted:o,registered:{},insert:a};return C.sheet.hydrate(r),C};function wze(e){for(var A=0,t,i=0,n=e.length;n>=4;++i,n-=4)t=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,A=(t&65535)*1540483477+((t>>>16)*59797<<16)^(A&65535)*1540483477+((A>>>16)*59797<<16);switch(n){case 3:A^=(e.charCodeAt(i+2)&255)<<16;case 2:A^=(e.charCodeAt(i+1)&255)<<8;case 1:A^=e.charCodeAt(i)&255,A=(A&65535)*1540483477+((A>>>16)*59797<<16)}return A^=A>>>13,A=(A&65535)*1540483477+((A>>>16)*59797<<16),((A^A>>>15)>>>0).toString(36)}var Dze={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_ze=/[A-Z]|^ms/g,xze=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dut=function(A){return A.charCodeAt(1)===45},put=function(A){return A!=null&&typeof A!="boolean"},iDA=hze(function(e){return dut(e)?e:e.replace(_ze,"-$&").toLowerCase()}),fut=function(A,t){switch(A){case"animation":case"animationName":if(typeof t=="string")return t.replace(xze,function(i,n,o){return Dk={name:n,styles:o,next:Dk},n})}return Dze[A]!==1&&!dut(A)&&typeof t=="number"&&t!==0?t+"px":t};function lz(e,A,t){if(t==null)return"";var i=t;if(i.__emotion_styles!==void 0)return i;switch(typeof t){case"boolean":return"";case"object":{var n=t;if(n.anim===1)return Dk={name:n.name,styles:n.styles,next:Dk},n.name;var o=t;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Dk={name:s.name,styles:s.styles,next:Dk},s=s.next;var r=o.styles+";";return r}return bze(e,A,t)}}var a=t;if(A==null)return a;var g=A[a];return g!==void 0?g:a}function bze(e,A,t){var i="";if(Array.isArray(t))for(var n=0;n<t.length;n++)i+=lz(e,A,t[n])+";";else for(var o in t){var s=t[o];if(typeof s!="object"){var r=s;A!=null&&A[r]!==void 0?i+=o+"{"+A[r]+"}":put(r)&&(i+=iDA(o)+":"+fut(o,r)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(A==null||A[s[0]]===void 0))for(var a=0;a<s.length;a++)put(s[a])&&(i+=iDA(o)+":"+fut(o,s[a])+";");else{var g=lz(e,A,s);switch(o){case"animation":case"animationName":{i+=iDA(o)+":"+g+";";break}default:i+=o+"{"+g+"}"}}}return i}var yut=/label:\s*([^\s;{]+)\s*(;|$)/g,Dk;function nDA(e,A,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,n="";Dk=void 0;var o=e[0];if(o==null||o.raw===void 0)i=!1,n+=lz(t,A,o);else{var s=o;n+=s[0]}for(var r=1;r<e.length;r++)if(n+=lz(t,A,e[r]),i){var a=o;n+=a[r]}yut.lastIndex=0;for(var g="",c;(c=yut.exec(n))!==null;)g+="-"+c[1];var I=wze(n)+g;return{name:I,styles:n,next:Dk}}function mut(e,A,t){var i="";return t.split(" ").forEach(function(n){e[n]!==void 0?A.push(e[n]+";"):n&&(i+=n+" ")}),i}var Sze=function(A,t,i){var n=A.key+"-"+t.name;A.registered[n]===void 0&&(A.registered[n]=t.styles)},vze=function(A,t,i){Sze(A,t);var n=A.key+"-"+t.name;if(A.inserted[t.name]===void 0){var o=t;do A.insert(t===o?"."+n:"",o,A.sheet,!0),o=o.next;while(o!==void 0)}};function wut(e,A){if(e.inserted[A.name]===void 0)return e.insert("",A,e.sheet,!0)}function Dut(e,A,t){var i=[],n=mut(e,i,t);return i.length<2?t:n+A(i)}var kze=function(A){var t=mze(A);t.sheet.speedy=function(r){this.isSpeedy=r},t.compat=!0;var i=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered,void 0);return vze(t,I),t.key+"-"+I.name},n=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered),l="animation-"+I.name;return wut(t,{name:I.name,styles:"@keyframes "+l+"{"+I.styles+"}"}),l},o=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered);wut(t,I)},s=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];return Dut(t.registered,i,Rze(g))};return{css:i,cx:s,injectGlobal:o,keyframes:n,hydrate:function(a){a.forEach(function(g){t.inserted[g]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:mut.bind(null,t.registered),merge:Dut.bind(null,t.registered,i)}},Rze=function e(A){for(var t="",i=0;i<A.length;i++){var n=A[i];if(n!=null){var o=void 0;switch(typeof n){case"boolean":break;case"object":{if(Array.isArray(n))o=e(n);else{o="";for(var s in n)n[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},Fze=kze({key:"css"}),fL=Fze.css,Nze=Object.create,_ut=Object.defineProperty,Gze=Object.getOwnPropertyDescriptor,xut=Object.getOwnPropertyNames,Mze=Object.getPrototypeOf,Lze=Object.prototype.hasOwnProperty,Ul=(e,A)=>function(){return A||(0,e[xut(e)[0]])((A={exports:{}}).exports,A),A.exports},Uze=(e,A,t,i)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of xut(A))!Lze.call(e,n)&&n!==t&&_ut(e,n,{get:()=>A[n],enumerable:!(i=Gze(A,n))||i.enumerable});return e},but=(e,A,t)=>(t=e!=null?Nze(Mze(e)):{},Uze(_ut(t,"default",{value:e,enumerable:!0}),e)),Hze=Ul({"node_modules/svgson/dist/svgson.umd.js"(e,A){(function(t,i){typeof e=="object"&&typeof A<"u"?A.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.svgson=i())})(e,function(){var t=function(tA){return tA!=null&&(i(tA)||n(tA)||!!tA._isBuffer)};function i(tA){return!!tA.constructor&&typeof tA.constructor.isBuffer=="function"&&tA.constructor.isBuffer(tA)}function n(tA){return typeof tA.readFloatLE=="function"&&typeof tA.slice=="function"&&i(tA.slice(0,0))}var o=Object.prototype.toString,s=function(rA){if(typeof rA>"u")return"undefined";if(rA===null)return"null";if(rA===!0||rA===!1||rA instanceof Boolean)return"boolean";if(typeof rA=="string"||rA instanceof String)return"string";if(typeof rA=="number"||rA instanceof Number)return"number";if(typeof rA=="function"||rA instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(rA))return"array";if(rA instanceof RegExp)return"regexp";if(rA instanceof Date)return"date";var IA=o.call(rA);return IA==="[object RegExp]"?"regexp":IA==="[object Date]"?"date":IA==="[object Arguments]"?"arguments":IA==="[object Error]"?"error":t(rA)?"buffer":IA==="[object Set]"?"set":IA==="[object WeakSet]"?"weakset":IA==="[object Map]"?"map":IA==="[object WeakMap]"?"weakmap":IA==="[object Symbol]"?"symbol":IA==="[object Int8Array]"?"int8array":IA==="[object Uint8Array]"?"uint8array":IA==="[object Uint8ClampedArray]"?"uint8clampedarray":IA==="[object Int16Array]"?"int16array":IA==="[object Uint16Array]"?"uint16array":IA==="[object Int32Array]"?"int32array":IA==="[object Uint32Array]"?"uint32array":IA==="[object Float32Array]"?"float32array":IA==="[object Float64Array]"?"float64array":"object"};function r(tA,rA){return rA={exports:{}},tA(rA,rA.exports),rA.exports}var a=r(function(tA){(function(){function rA(IA,DA){if(typeof DA!="function")return IA;var bA={};for(var HA in IA)Object.prototype.hasOwnProperty.call(IA,HA)&&(bA[DA(HA,IA[HA])||HA]=IA[HA]);return bA}tA.exports?tA.exports=rA:window.rename=rA})()}),g=function tA(rA,IA){var DA=s(rA);if(DA!=="object"&&DA!=="array")throw new Error("expected an object");var bA=[];DA==="object"&&(rA=a(rA,IA),bA={});for(var HA in rA)if(rA.hasOwnProperty(HA)){var JA=rA[HA];s(JA)==="object"||s(JA)==="array"?bA[HA]=tA(JA,IA):bA[HA]=JA}return bA},c=r(function(tA){var rA=Object.prototype.hasOwnProperty,IA="~";function DA(){}Object.create&&(DA.prototype=Object.create(null),new DA().__proto__||(IA=!1));function bA(JA,GA,aA){this.fn=JA,this.context=GA,this.once=aA||!1}function HA(){this._events=new DA,this._eventsCount=0}HA.prototype.eventNames=function(){var GA=[],aA,mA;if(this._eventsCount===0)return GA;for(mA in aA=this._events)rA.call(aA,mA)&&GA.push(IA?mA.slice(1):mA);return Object.getOwnPropertySymbols?GA.concat(Object.getOwnPropertySymbols(aA)):GA},HA.prototype.listeners=function(GA,aA){var mA=IA?IA+GA:GA,fA=this._events[mA];if(aA)return!!fA;if(!fA)return[];if(fA.fn)return[fA.fn];for(var ZA=0,tt=fA.length,at=new Array(tt);ZA<tt;ZA++)at[ZA]=fA[ZA].fn;return at},HA.prototype.emit=function(GA,aA,mA,fA,ZA,tt){var at=IA?IA+GA:GA;if(!this._events[at])return!1;var vA=this._events[at],FA=arguments.length,dA,uA;if(vA.fn){switch(vA.once&&this.removeListener(GA,vA.fn,void 0,!0),FA){case 1:return vA.fn.call(vA.context),!0;case 2:return vA.fn.call(vA.context,aA),!0;case 3:return vA.fn.call(vA.context,aA,mA),!0;case 4:return vA.fn.call(vA.context,aA,mA,fA),!0;case 5:return vA.fn.call(vA.context,aA,mA,fA,ZA),!0;case 6:return vA.fn.call(vA.context,aA,mA,fA,ZA,tt),!0}for(uA=1,dA=new Array(FA-1);uA<FA;uA++)dA[uA-1]=arguments[uA];vA.fn.apply(vA.context,dA)}else{var UA=vA.length,RA;for(uA=0;uA<UA;uA++)switch(vA[uA].once&&this.removeListener(GA,vA[uA].fn,void 0,!0),FA){case 1:vA[uA].fn.call(vA[uA].context);break;case 2:vA[uA].fn.call(vA[uA].context,aA);break;case 3:vA[uA].fn.call(vA[uA].context,aA,mA);break;case 4:vA[uA].fn.call(vA[uA].context,aA,mA,fA);break;default:if(!dA)for(RA=1,dA=new Array(FA-1);RA<FA;RA++)dA[RA-1]=arguments[RA];vA[uA].fn.apply(vA[uA].context,dA)}}return!0},HA.prototype.on=function(GA,aA,mA){var fA=new bA(aA,mA||this),ZA=IA?IA+GA:GA;return this._events[ZA]?this._events[ZA].fn?this._events[ZA]=[this._events[ZA],fA]:this._events[ZA].push(fA):(this._events[ZA]=fA,this._eventsCount++),this},HA.prototype.once=function(GA,aA,mA){var fA=new bA(aA,mA||this,!0),ZA=IA?IA+GA:GA;return this._events[ZA]?this._events[ZA].fn?this._events[ZA]=[this._events[ZA],fA]:this._events[ZA].push(fA):(this._events[ZA]=fA,this._eventsCount++),this},HA.prototype.removeListener=function(GA,aA,mA,fA){var ZA=IA?IA+GA:GA;if(!this._events[ZA])return this;if(!aA)return--this._eventsCount===0?this._events=new DA:delete this._events[ZA],this;var tt=this._events[ZA];if(tt.fn)tt.fn===aA&&(!fA||tt.once)&&(!mA||tt.context===mA)&&(--this._eventsCount===0?this._events=new DA:delete this._events[ZA]);else{for(var at=0,vA=[],FA=tt.length;at<FA;at++)(tt[at].fn!==aA||fA&&!tt[at].once||mA&&tt[at].context!==mA)&&vA.push(tt[at]);vA.length?this._events[ZA]=vA.length===1?vA[0]:vA:--this._eventsCount===0?this._events=new DA:delete this._events[ZA]}return this},HA.prototype.removeAllListeners=function(GA){var aA;return GA?(aA=IA?IA+GA:GA,this._events[aA]&&(--this._eventsCount===0?this._events=new DA:delete this._events[aA])):(this._events=new DA,this._eventsCount=0),this},HA.prototype.off=HA.prototype.removeListener,HA.prototype.addListener=HA.prototype.on,HA.prototype.setMaxListeners=function(){return this},HA.prefixed=IA,HA.EventEmitter=HA,tA.exports=HA});function I(tA,rA,IA){return rA in tA?Object.defineProperty(tA,rA,{value:IA,enumerable:!0,configurable:!0,writable:!0}):tA[rA]=IA,tA}var l=function(){},B={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},C={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},Q={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},u={" ":C.space," ":C.space,"\n":C.space,"\r":C.space,"<":C.lt,">":C.gt,'"':C.quote,"'":C.quote,"=":C.equal,"/":C.slash},E=function(rA){return u[rA]||C.char},p=function(rA){var IA,DA,bA,HA,JA,GA,aA,mA,fA,ZA;rA=Object.assign({debug:!1},rA);var tt=new c,at=B.data,vA="",FA="",dA="",uA="",UA="",RA="",kA=function(XA,et){if(!(FA[0]==="?"||FA[0]==="!")){var It={type:XA,value:et};rA.debug&&console.log("emit:",It),tt.emit("data",It)}};tt.stateMachine=(ZA={},I(ZA,B.data,(IA={},I(IA,C.lt,function(){vA.trim()&&kA(Q.text,vA),FA="",UA=!1,at=B.tagBegin}),I(IA,C.char,function(YA){vA+=YA}),IA)),I(ZA,B.cdata,I({},C.char,function(YA){vA+=YA,vA.substr(-3)==="]]>"&&(kA(Q.text,vA.slice(0,-3)),vA="",at=B.data)})),I(ZA,B.tagBegin,(DA={},I(DA,C.space,l),I(DA,C.char,function(YA){FA=YA,at=B.tagName}),I(DA,C.slash,function(){FA="",UA=!0}),DA)),I(ZA,B.tagName,(bA={},I(bA,C.space,function(){UA?at=B.tagEnd:(at=B.attributeNameStart,kA(Q.openTag,FA))}),I(bA,C.gt,function(){kA(UA?Q.closeTag:Q.openTag,FA),vA="",at=B.data}),I(bA,C.slash,function(){at=B.tagEnd,kA(Q.openTag,FA)}),I(bA,C.char,function(YA){FA+=YA,FA==="![CDATA["&&(at=B.cdata,vA="",FA="")}),bA)),I(ZA,B.tagEnd,(HA={},I(HA,C.gt,function(){kA(Q.closeTag,FA),vA="",at=B.data}),I(HA,C.char,l),HA)),I(ZA,B.attributeNameStart,(JA={},I(JA,C.char,function(YA){dA=YA,at=B.attributeName}),I(JA,C.gt,function(){vA="",at=B.data}),I(JA,C.space,l),I(JA,C.slash,function(){UA=!0,at=B.tagEnd}),JA)),I(ZA,B.attributeName,(GA={},I(GA,C.space,function(){at=B.attributeNameEnd}),I(GA,C.equal,function(){kA(Q.attributeName,dA),at=B.attributeValueBegin}),I(GA,C.gt,function(){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),vA="",at=B.data}),I(GA,C.slash,function(){UA=!0,uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),at=B.tagEnd}),I(GA,C.char,function(YA){dA+=YA}),GA)),I(ZA,B.attributeNameEnd,(aA={},I(aA,C.space,l),I(aA,C.equal,function(){kA(Q.attributeName,dA),at=B.attributeValueBegin}),I(aA,C.gt,function(){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),vA="",at=B.data}),I(aA,C.char,function(YA){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),dA=YA,at=B.attributeName}),aA)),I(ZA,B.attributeValueBegin,(mA={},I(mA,C.space,l),I(mA,C.quote,function(YA){RA=YA,uA="",at=B.attributeValue}),I(mA,C.gt,function(){uA="",kA(Q.attributeValue,uA),vA="",at=B.data}),I(mA,C.char,function(YA){RA="",uA=YA,at=B.attributeValue}),mA)),I(ZA,B.attributeValue,(fA={},I(fA,C.space,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),at=B.attributeNameStart)}),I(fA,C.quote,function(YA){RA===YA?(kA(Q.attributeValue,uA),at=B.attributeNameStart):uA+=YA}),I(fA,C.gt,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),vA="",at=B.data)}),I(fA,C.slash,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),UA=!0,at=B.tagEnd)}),I(fA,C.char,function(YA){uA+=YA}),fA)),ZA);var KA=function(XA){rA.debug&&console.log(at,XA);var et=tt.stateMachine[at],It=et[E(XA)]||et[C.error]||et[C.char];It(XA)};return tt.write=function(YA){for(var XA=YA.length,et=0;et<XA;et++)KA(YA[et])},tt},f={State:B,Action:C,Type:Q,create:p},m=f.Type,S={element:"element",text:"text"},_=function(rA){return Object.assign({name:"",type:S.element,value:"",parent:null,attributes:{},children:[]},rA)},v=function(rA){rA=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},rA);var IA=void 0,DA=void 0,bA=void 0,HA=void 0,JA=new c,GA=function(mA){switch(mA.type){case m.openTag:if(bA===null)bA=DA,bA.name=mA.value;else{var fA=_({name:mA.value,parent:bA});bA.children.push(fA),bA=fA}break;case m.closeTag:var ZA=bA.parent;if(rA.parentNodes||(bA.parent=null),bA.name!==mA.value)break;rA.stream&&ZA===DA&&(DA.children=[],bA.parent=null),(!rA.emitTopLevelOnly||ZA===DA)&&(JA.emit(rA.tagPrefix+bA.name,bA),JA.emit("tag",bA.name,bA)),bA===DA&&(IA.removeAllListeners("data"),JA.emit(rA.doneEvent,bA),DA=null),bA=ZA;break;case m.text:bA&&bA.children.push(_({type:S.text,value:mA.value,parent:rA.parentNodes?bA:null}));break;case m.attributeName:HA=mA.value,bA.attributes[HA]="";break;case m.attributeValue:bA.attributes[HA]=mA.value;break}};return JA.reset=function(){IA=f.create({debug:rA.debug}),IA.on("data",GA),DA=_(),bA=null,HA="",JA.parse=IA.write},JA.reset(),JA},D=function(rA,IA){IA=Object.assign({},IA,{stream:!1,tagPrefix:":"});var DA=v(IA),bA=void 0;return DA.on("done",function(HA){bA=HA}),DA.parse(rA),bA},k={parseSync:D},x=k.parseSync,M=function(rA){var IA=x("<root>".concat(rA,"</root>"),{parentNodes:!1}),DA=IA.children&&IA.children.length>0&&IA.children.every(function(bA){return bA.name==="svg"});if(DA)return IA.children.length===1?IA.children[0]:IA.children;throw Error("nothing to parse")},N=function(rA){return g(rA,function(IA){return q(IA)?IA:T(IA)})},T=function(rA){return rA.replace(/[-|:]([a-z])/gi,function(IA,DA){return DA.toUpperCase()})},q=function(rA){return/^(data|aria)(-\w+)/.test(rA)},P=function(rA){if(rA){var IA=String(rA);return/[&<>]/.test(IA)?"<![CDATA[".concat(IA.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):IA}return""},V=function(rA){return String(rA).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},z=function(rA){var IA=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},DA=IA.transformNode,bA=DA===void 0?function(aA){return aA}:DA,HA=IA.camelcase,JA=HA===void 0?!1:HA,GA=function(mA){var fA;return fA=bA(mA),JA&&(fA=N(fA)),fA};return GA(M(rA))};function oA(){for(var tA=arguments.length,rA=new Array(tA),IA=0;IA<tA;IA++)rA[IA]=arguments[IA];return new Promise(function(DA,bA){try{var HA=z.apply(void 0,rA);DA(HA)}catch(JA){bA(JA)}})}var gA=function tA(rA){var IA=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},DA=IA.transformAttr,bA=DA===void 0?function(at,vA,FA){return"".concat(at,'="').concat(FA(vA),'"')}:DA,HA=IA.transformNode,JA=HA===void 0?function(at){return at}:HA,GA=IA.selfClose,aA=GA===void 0?!0:GA;if(Array.isArray(rA))return rA.map(function(at){return tA(at,{transformAttr:bA,selfClose:aA,transformNode:JA})}).join("");var mA=JA(rA);if(mA.type==="text")return P(mA.value);var fA="";for(var ZA in mA.attributes){var tt=bA(ZA,mA.attributes[ZA],V,mA.name);fA+=tt?" ".concat(tt):""}return mA.children&&mA.children.length>0||!aA?"<".concat(mA.name).concat(fA,">").concat(tA(mA.children,{transformAttr:bA,transformNode:JA,selfClose:aA}),"</").concat(mA.name,">"):"<".concat(mA.name).concat(fA,"/>")},QA=Object.assign({},{parse:oA,parseSync:z,stringify:gA});return QA})}}),oDA=Ul({"node_modules/js-beautify/js/src/core/output.js"(e,A){function t(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}t.prototype.clone_empty=function(){var o=new t(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},t.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},t.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},t.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(`
|
|
5707
|
+
`)},kVe=(e,A)=>{if(typeof window>"u")return A;try{const t=localStorage.getItem(e);return t!==null?JSON.parse(t):A}catch{return A}},RVe=(e,A)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(A))}catch{}},IwA=cA.createContext(null),FVe=5,NVe=(e,A)=>!e&&!A?!0:!e||!A?!1:e.minX===A.minX&&e.maxX===A.maxX&&e.minY===A.minY&&e.maxY===A.maxY,GVe=({children:e})=>{if(cA.useContext(IwA))return iA.jsx(iA.Fragment,{children:e});const t=cA.useRef({pointer:null,boundingBoxes:new Map,hoveringIds:new Set,subscribers:new Set,mouseDownPosition:null}),i=cA.useCallback(()=>{for(const I of t.current.subscribers)I()},[]),n=cA.useCallback(()=>{const I=t.current.pointer,l=new Set;if(I)for(const[C,Q]of t.current.boundingBoxes){const u=Q.bounds;u&&I.x>=u.minX&&I.x<=u.maxX&&I.y>=u.minY&&I.y<=u.maxY&&l.add(C)}const B=t.current.hoveringIds;l.size===B.size&&[...l].every(C=>B.has(C))||(t.current.hoveringIds=l,i())},[i]),o=cA.useCallback((I,l)=>{t.current.boundingBoxes.set(I,l),n()},[n]),s=cA.useCallback((I,l)=>{const B=t.current.boundingBoxes.get(I);B&&NVe(B.bounds,l.bounds)&&B.onClick===l.onClick||(t.current.boundingBoxes.set(I,l),n())},[n]),r=cA.useCallback(I=>{t.current.boundingBoxes.delete(I)&&n()},[n]),a=cA.useCallback(I=>(t.current.subscribers.add(I),()=>{t.current.subscribers.delete(I)}),[]),g=cA.useCallback(I=>t.current.hoveringIds.has(I),[]);cA.useEffect(()=>{const I=Q=>{const{clientX:u,clientY:E}=Q,p=t.current.pointer;p&&p.x===u&&p.y===E||(t.current.pointer={x:u,y:E},n())},l=()=>{t.current.pointer!==null&&(t.current.pointer=null,t.current.mouseDownPosition=null,n())},B=Q=>{t.current.mouseDownPosition={x:Q.clientX,y:Q.clientY}},C=Q=>{const{clientX:u,clientY:E}=Q,p=t.current.mouseDownPosition;if(p&&Math.sqrt(Math.pow(u-p.x,2)+Math.pow(E-p.y,2))>FVe){t.current.mouseDownPosition=null;return}t.current.mouseDownPosition=null;for(const f of t.current.boundingBoxes.values()){const m=f.bounds;m&&u>=m.minX&&u<=m.maxX&&E>=m.minY&&E<=m.maxY&&f.onClick?.(Q)}};return window.addEventListener("pointermove",I,{passive:!0}),window.addEventListener("pointerdown",I,{passive:!0}),window.addEventListener("pointerup",I,{passive:!0}),window.addEventListener("pointerleave",l),window.addEventListener("pointercancel",l),window.addEventListener("blur",l),window.addEventListener("mousedown",B,{passive:!0}),window.addEventListener("click",C,{passive:!0}),()=>{window.removeEventListener("pointermove",I),window.removeEventListener("pointerdown",I),window.removeEventListener("pointerup",I),window.removeEventListener("pointerleave",l),window.removeEventListener("pointercancel",l),window.removeEventListener("blur",l),window.removeEventListener("mousedown",B),window.removeEventListener("click",C)}},[n]);const c=cA.useMemo(()=>({registerBoundingBox:o,updateBoundingBox:s,unregisterBoundingBox:r,subscribe:a,isHovering:g}),[o,s,r,a,g]);return iA.jsx(IwA.Provider,{value:c,children:e})},MVe=e=>{const A=cA.useContext(IwA);if(!A)throw new Error("useMouseEventsOverBoundingBox must be used within a MouseTracker");const t=cA.useId(),i=cA.useRef(e);i.current=e;const n=cA.useMemo(()=>s=>{i.current.onClick?.(s)},[]);return cA.useEffect(()=>(A.registerBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?n:void 0}),()=>{A.unregisterBoundingBox(t)}),[A,n,t]),cA.useEffect(()=>{A.updateBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?n:void 0})},[A,n,t,e.bounds?.minX,e.bounds?.maxX,e.bounds?.minY,e.bounds?.maxY,e.onClick]),{hovering:cA.useSyncExternalStore(A.subscribe,()=>A.isHovering(t),()=>!1)}},LVe=(e,A)=>!e&&!A?!0:!e||!A?!1:Math.abs(e.bounds.minX-A.bounds.minX)<.5&&Math.abs(e.bounds.maxX-A.bounds.maxX)<.5&&Math.abs(e.bounds.minY-A.bounds.minY)<.5&&Math.abs(e.bounds.maxY-A.bounds.maxY)<.5&&Math.abs(e.rect.left-A.rect.left)<.5&&Math.abs(e.rect.top-A.rect.top)<.5&&Math.abs(e.rect.width-A.rect.width)<.5&&Math.abs(e.rect.height-A.rect.height)<.5,UVe=({componentId:e,svgDivRef:A,containerRef:t,onComponentClick:i,onHoverChange:n,showOutline:o,circuitJsonKey:s})=>{const[r,a]=cA.useState(null),g=cA.useRef(null),c=cA.useCallback(()=>{g.current=null;const u=A.current,E=t.current;if(!u||!E){a(_=>_&&null);return}const p=u.querySelector(`[data-schematic-component-id="${e}"]`);if(!p){a(_=>_&&null);return}const f=p.getBoundingClientRect(),m=E.getBoundingClientRect(),S={bounds:{minX:f.left,maxX:f.right,minY:f.top,maxY:f.bottom},rect:{left:f.left-m.left,top:f.top-m.top,width:f.width,height:f.height}};a(_=>LVe(_,S)?_:S)},[e,t,A]),I=cA.useCallback(()=>{g.current===null&&(g.current=window.requestAnimationFrame(c))},[c]);cA.useEffect(()=>{I()},[I,s]),cA.useEffect(()=>{I();const u=A.current,E=t.current;if(!u||!E)return;const p=typeof ResizeObserver<"u"?new ResizeObserver(()=>{I()}):null;p?.observe(E),p?.observe(u);const f=typeof MutationObserver<"u"?new MutationObserver(()=>{I()}):null;return f?.observe(u,{attributes:!0,attributeFilter:["style","transform"],subtree:!0,childList:!0}),window.addEventListener("scroll",I,!0),window.addEventListener("resize",I),()=>{p?.disconnect(),f?.disconnect(),window.removeEventListener("scroll",I,!0),window.removeEventListener("resize",I),g.current!==null&&(cancelAnimationFrame(g.current),g.current=null)}},[I,A,t]);const l=cA.useCallback(u=>{i&&i(e,u)},[e,i]),B=r?.bounds??null,{hovering:C}=MVe({bounds:B,onClick:i?l:void 0});if(cA.useEffect(()=>{n&&n(e,C)},[C,e,n]),!r||!C||!o)return null;const Q=r.rect;return iA.jsx("div",{style:{position:"absolute",left:Q.left,top:Q.top,width:Q.width,height:Q.height,border:"1.5px solid rgba(51, 153, 255, 0.9)",pointerEvents:"none",zIndex:mk.schematicComponentHoverOutline}})},HVe=({circuitJson:e,containerStyle:A,editEvents:t=[],onEditEvent:i,defaultEditMode:n=!1,debugGrid:o=!1,editingEnabled:s=!1,debug:r=!1,clickToInteractEnabled:a=!1,colorOverrides:g,spiceSimulationEnabled:c=!1,disableGroups:I=!1,onSchematicComponentClicked:l})=>{r&&lVe();const[B,C]=cA.useState(!1),[Q,u]=cA.useState({showVoltage:!0,showCurrent:!1,startTime:0,duration:20}),E=Et=>`${Et?.length||0}_${Et?.editCount||0}`,p=cA.useMemo(()=>E(e),[e]),f=cA.useMemo(()=>{if(!c)return null;try{return vVe(e,Q)}catch(Et){return console.error("Failed to generate SPICE string",Et),null}},[p,c,Q.startTime,Q.duration]),[m,S]=cA.useState(!1);cA.useEffect(()=>{S(!1)},[p]);const{plotData:_,nodes:v,isLoading:D,error:k}=SVe(m?f:null),[x,M]=cA.useState(n),[N,T]=cA.useState(!0),[q,P]=cA.useState(!a),[V,z]=cA.useState(!1),[oA,gA]=cA.useState(()=>I?!1:kVe("schematic_viewer_show_groups",!1)),[QA,tA]=cA.useState(!1),rA=cA.useRef(new Set),IA=cA.useCallback((Et,bt)=>{bt?rA.current.add(Et):rA.current.delete(Et),tA(rA.current.size>0)},[]),DA=cA.useRef(null),bA=cA.useRef(null),HA=cA.useMemo(()=>{try{return vd(e).schematic_component?.list()?.map(Et=>Et.schematic_component_id)??[]}catch(Et){return console.error("Failed to derive schematic component ids",Et),[]}},[p,e]),JA=Et=>{const bt=Et.touches[0];bA.current={x:bt.clientX,y:bt.clientY}},GA=Et=>{const bt=Et.changedTouches[0],yt=bA.current;if(!yt)return;const Kt=Math.abs(bt.clientX-yt.x),Xt=Math.abs(bt.clientY-yt.y);Kt<10&&Xt<10&&(Et.preventDefault(),P(!0)),bA.current=null},[aA,mA]=cA.useState([]),fA=cA.useRef(e);cA.useEffect(()=>{const Et=E(e),bt=E(fA.current);Et!==bt&&(mA([]),fA.current=e)},[e]);const{ref:ZA,cancelDrag:tt,transform:at}=kmA({onSetTransform(Et){DA.current&&(DA.current.style.transform=Tm(Et))},enabled:q&&!B}),{containerWidth:vA,containerHeight:FA}=CVe(ZA),dA=cA.useMemo(()=>!vA||!FA?"":bmA(e,{width:vA,height:FA||720,grid:o?{cellSize:1,labelCells:!0}:void 0,colorOverrides:g}),[p,vA,FA]),uA=cA.useMemo(()=>dA.match(/<svg[^>]*style="[^"]*background-color:\s*([^;\"]+)/i)?.[1]??"transparent",[dA]),UA=cA.useMemo(()=>{if(!dA)return RB();const Et=dA.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(Et)}catch(bt){return console.error(bt),RB()}},[dA]),RA=Et=>{mA(bt=>[...bt,Et]),i&&i(Et)},kA=cA.useMemo(()=>[...t,...aA],[t,aA]),{handleMouseDown:KA,handleTouchStart:YA,isDragging:XA,activeEditEvent:et}=QVe({onEditEvent:RA,cancelDrag:tt,realToSvgProjection:UA,svgToScreenProjection:at,circuitJson:e,editEvents:kA,enabled:x&&q&&!B,snapToGrid:N});rVe({svgDivRef:DA,editEvents:kA,realToSvgProjection:UA,svgToScreenProjection:at,activeEditEvent:et}),aVe({svgDivRef:DA,circuitJson:e,activeEditEvent:et,editEvents:kA}),gVe({svgDivRef:DA,circuitJson:e,circuitJsonKey:p,showGroups:oA&&!I});const It=cA.useRef(YA);cA.useEffect(()=>{It.current=YA},[YA]);const ut=cA.useMemo(()=>iA.jsx("div",{ref:DA,style:{pointerEvents:a?q?"auto":"none":"auto",transformOrigin:"0 0"},className:l?"schematic-component-clickable":void 0,onTouchStart:Et=>{x&&q&&!B&&It.current(Et)},dangerouslySetInnerHTML:{__html:dA}}),[dA,q,a,x,B]);return iA.jsxs(GVe,{children:[l&&iA.jsx("style",{children:".schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }"}),iA.jsxs("div",{ref:ZA,style:{position:"relative",backgroundColor:uA,overflow:"hidden",cursor:B?"auto":XA?"grabbing":a&&!q||QA&&l?"pointer":"grab",minHeight:"300px",...A},onWheelCapture:Et=>{B&&Et.stopPropagation()},onMouseDown:Et=>{if(a&&!q){Et.preventDefault(),Et.stopPropagation();return}KA(Et)},onMouseDownCapture:Et=>{if(a&&!q){Et.preventDefault(),Et.stopPropagation();return}},onTouchStart:Et=>{B||JA(Et)},onTouchEnd:Et=>{B||GA(Et)},children:[!q&&a&&iA.jsx("div",{onClick:Et=>{Et.preventDefault(),Et.stopPropagation(),P(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:mk.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all",touchAction:"pan-x pan-y pinch-zoom"},children:iA.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})}),iA.jsx(dVe,{active:V,onClick:()=>z(!V)}),s&&iA.jsx(uVe,{active:x,onClick:()=>M(!x)}),s&&x&&iA.jsx(EVe,{active:N,onClick:()=>T(!N)}),iA.jsx(fVe,{circuitJson:e,circuitJsonKey:p,isVisible:V,onClose:()=>z(!1),showGroups:oA,onToggleGroups:Et=>{I||(gA(Et),RVe("schematic_viewer_show_groups",Et))}}),c&&iA.jsx(mVe,{onClick:()=>C(!0)}),B&&iA.jsx(DVe,{spiceString:f,onClose:()=>C(!1),plotData:_,nodes:v,isLoading:D,error:k,simOptions:Q,onSimOptionsChange:Et=>{S(!0),u(Et)},hasRun:m}),l&&HA.map(Et=>iA.jsx(UVe,{componentId:Et,svgDivRef:DA,containerRef:ZA,showOutline:!0,circuitJsonKey:p,onHoverChange:IA,onComponentClick:(bt,yt)=>{l?.({schematicComponentId:bt,event:yt})}},Et)),ut]})]})},cCt=e=>{const[A,t]=cA.useState(0),[i,n]=cA.useState(0);return cA.useEffect(()=>{if(!e.current)return;const o=()=>{const r=e.current?.getBoundingClientRect();t(r?.width||0),n(r?.height||0)};o();const s=new ResizeObserver(o);return s.observe(e.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:A,containerHeight:i}};sB("assembly-viewer");var ICt=()=>{sB.enable("assembly-viewer*")},YVe=({circuitJson:e,containerStyle:A,debugGrid:t=!1,debug:i=!1})=>{i&&ICt();const n=cA.useRef(null),{ref:o}=kmA({onSetTransform(c){n.current&&(n.current.style.transform=Tm(c))}}),{containerWidth:s,containerHeight:r}=cCt(o),a=cA.useMemo(()=>!s||!r?"":YIt(e,{width:s,height:r||720}),[e,s,r]);cA.useMemo(()=>{if(!a)return RB();const c=a.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(c)}catch(I){return console.error(I),RB()}},[a]);const g=cA.useMemo(()=>iA.jsx("div",{ref:n,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:a}}),[a]);return iA.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...A},children:g})},JVe=({circuitJson:e,containerStyle:A,debugGrid:t=!1,debug:i=!1})=>{i&&ICt();const n=cA.useRef(null),{ref:o}=kmA({onSetTransform(c){n.current&&(n.current.style.transform=Tm(c))}}),{containerWidth:s,containerHeight:r}=cCt(o),a=cA.useMemo(()=>!s||!r?"":_mA(e,{width:s,height:r||720}),[e,s,r]);cA.useMemo(()=>{if(!a)return RB();const c=a.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return gP(c)}catch(I){return console.error(I),RB()}},[a]);const g=cA.useMemo(()=>iA.jsx("div",{ref:n,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:a}}),[a]);return iA.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...A},children:g})};const lCt=["Initialize a tscircuit project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export",'Use units like mm or mils consistently across your designs (e.g. pcbX="10mm")',"Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/guides/running-tscircuit/displaying-circuit-json-on-a-webpage#react-display-all-available-previews-with-circuitjsonpreview-) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Check out the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to upvote features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],TVe=(()=>{let e=lCt[Math.floor(Math.random()*lCt.length)];return e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(A,t)=>`<a class="rf-text-blue-500 rf-underline" href="${A}" target="_blank">${A}</a>`),e=e.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),e})(),wk=({onRunClicked:e})=>iA.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[iA.jsx(I3e,{className:"rf-size-14 rf-mb-4"}),iA.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",iA.jsx("span",{dangerouslySetInnerHTML:{__html:TVe}})]}),e&&iA.jsxs(uC,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:e,children:["Run Code",iA.jsx(vgt,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),qj=({text:e,onClick:A})=>iA.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:A,children:e}),Pj=e=>iA.jsxs("div",{className:"rf-leading-5",children:[iA.jsx("div",{className:"rf-py-2 rf-font-bold",children:e.column.name}),iA.jsx("div",{children:e.field?.()??iA.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:A=>{e.onTextChange?.(A.target.value)}})})]}),KVe=({open:e,children:A,title:t,onClose:i})=>e?iA.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:i,children:iA.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:n=>{n.preventDefault(),n.stopPropagation()},children:[iA.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),iA.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:i,children:"×"}),A]})}):null,qVe=({elements:e})=>{const[A,t]=cA.useState({open:!1}),[i,n]=cA.useReducer((c,I)=>({...c,...I}),{}),o=[...new Set(e.map(c=>c.type))],s=e.map(c=>{const I=c[`${c.type}_id`],l=Object.fromEntries(Object.entries(c).filter(([C])=>!(C===`${c.type}_id`||!C.endsWith("_id")))),B=Object.fromEntries(Object.entries(c).filter(([C])=>!C.endsWith("_id")));return{primary_id:I,other_ids:l,...B,_og_elm:c}}),r=s.map(c=>{let I="";const l=B=>{const C=Object.keys(B.other_ids).find(E=>E.startsWith("source_"));if(!C)return`.${B.name}`;const Q=C.slice(0,-3),u=s.find(E=>E.type===Q&&E.primary_id===B.other_ids[C]);return u?"name"in u?`${l(u)} > .${B.name}`:`#${u.primary_id} > .${B.name}`:`??? > .${B.name}`};return"name"in c&&(I=l(c)),{...c,selector_path:I}}),a=[{key:"primary_id",name:"primary_id",renderCell:c=>iA.jsxs("div",{className:"rf-flex rf-items-center",children:[iA.jsx(qj,{text:c.primary_id,onClick:()=>n({focused_id:c.primary_id,id_search:void 0,selector_search:void 0})}),iA.jsx("span",{className:"rf-flex-grow"}),iA.jsx(qj,{text:"(JSON)",onClick:()=>t({open:!0,element:c._og_elm,title:c.primary_id})})]}),renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({id_search:I}),field:i.focused_id?()=>iA.jsxs("div",{children:["Focus:"," ",iA.jsx("span",{className:"rf-underline",children:i.focused_id}),iA.jsx(qj,{text:"(unfocus)",onClick:()=>n({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:c=>iA.jsx(Pj,{column:c,field:()=>iA.jsxs("select",{onChange:I=>n({component_type_filter:I.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[iA.jsx("option",{value:"any",children:"any"},"any"),iA.jsx("option",{value:"source",children:"source"},"source"),iA.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),iA.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),o.map(I=>iA.jsx("option",{value:I,children:I},I))]})})},{key:"name",name:"name",renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({name_search:I})})},{key:"selector_path",name:"selector_path",renderHeaderCell:c=>iA.jsx(Pj,{column:c,onTextChange:I=>n({selector_search:I})})},{key:"other_ids",name:"other_ids",renderCell:c=>iA.jsx("div",{className:"rf-space-x-2",children:Object.entries(c.other_ids).map(([I,l])=>iA.jsx(qj,{text:l,onClick:()=>n({focused_id:l})},l))})}],g=r.filter(c=>i.name_search?c.name?.toLowerCase()?.includes(i.name_search.toLowerCase()):!0).filter(c=>!i.component_type_filter||i.component_type_filter==="any"?!0:i.component_type_filter==="source"?c.type.startsWith("source_"):i.component_type_filter==="source/pcb"?c.type.startsWith("source_")||c.type.startsWith("pcb_"):i.component_type_filter==="source/schematic"?c.type.startsWith("source_")||c.type.startsWith("schematic_"):c.type?.includes(i.component_type_filter)).filter(c=>i.selector_search?i.selector_search.split(" ").filter(l=>l.length>0).every(l=>c.selector_path?.includes(l)):!0).filter(c=>i.id_search?c.primary_id?.includes(i.id_search):!0).filter(c=>!!(!i.focused_id||c.primary_id===i.focused_id||Object.values(c.other_ids).includes(i.focused_id)));return iA.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[iA.jsx("div",{className:"rf-overflow-x-auto",children:iA.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[iA.jsx("thead",{children:iA.jsx("tr",{children:a.map(c=>iA.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:c.renderHeaderCell?c.renderHeaderCell(c):c.name},c.key))})}),iA.jsx("tbody",{children:g.map((c,I)=>iA.jsx("tr",{className:"rf-hover:bg-gray-100",children:a.map(l=>iA.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:l.renderCell?l.renderCell(c):c[l.key]},l.key))},I))})]})}),iA.jsx(KVe,{open:A.open,onClose:()=>t({open:!1}),title:A.open?A.title:"",children:iA.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:iA.jsx("pre",{className:"rf-whitespace-pre-wrap",children:A.open?JSON.stringify(A.element,null,2):""})})})]})},PVe=(e,A)=>e==="jlcpcb"?iA.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${A}`,children:A}):A,OVe=({circuitJson:e})=>{const A=e.filter(i=>i.type==="source_component"),t=new Set;for(const i of A)if(i.supplier_part_numbers)for(const n of Object.keys(i.supplier_part_numbers))t.add(n);return iA.jsx("div",{className:"rf-overflow-x-auto",children:iA.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[iA.jsx("thead",{children:iA.jsxs("tr",{className:"rf-border-b",children:[iA.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(i=>iA.jsx("th",{className:"rf-p-2 rf-capitalize",children:i},i))]})}),iA.jsx("tbody",{children:A.map(i=>iA.jsxs("tr",{className:"rf-border-b",children:[iA.jsx("td",{className:"rf-p-2",children:i.name}),Array.from(t).map(n=>iA.jsx("td",{className:"rf-p-2",children:PVe(n,i.supplier_part_numbers?.[n]?.[0]||"")},n))]},i.source_component_id))})]})})},lwA=cA.forwardRef(({className:e,type:A,...t},i)=>iA.jsx("input",{type:A,className:Bo("rf-flex rf-h-9 rf-w-full rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-px-3 rf-py-1 rf-text-sm rf-shadow-sm rf-transition-colors file:rf-border-0 file:rf-bg-transparent file:rf-text-sm file:rf-font-medium placeholder:rf-text-zinc-500 focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-placeholder-zinc-400 dark:focus-visible:rf-ring-zinc-300",e),ref:i,...t}));lwA.displayName="Input";var BCt={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},BwA=new Set;for(const[e,A]of Object.entries(BCt)){BwA.add(e);for(const t of Object.keys(A.variants))BwA.add(t)}function WVe(e){for(const[A,t]of Object.entries(BCt))if(e in t.variants)return{baseUnit:t.baseUnit,conversionFactor:t.variants[e]};return{baseUnit:e,conversionFactor:1}}var CCt={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12};function ix(e){if(e==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof e=="string"&&e.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(e),parsedUnit:null,unitOfValue:null};if(typeof e=="number")return{value:e,parsedUnit:null,unitOfValue:null};if(typeof e=="object"&&"x"in e&&"y"in e){const{parsedUnit:r,unitOfValue:a}=ix(e.x),g=ix(e.x),c=ix(e.y);return g.value===null||c.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:r,unitOfValue:a,value:{x:g.value,y:c.value}}}const t=e.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!t)throw new Error(`Could not determine unit: "${e}"`);const i=t.split("").reverse().join(""),n=e.slice(0,-i.length);if(i in CCt&&!BwA.has(i)){const r=CCt[i];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(n)*r}}const{baseUnit:o,conversionFactor:s}=WVe(i);return{parsedUnit:i,unitOfValue:o,value:s*Number.parseFloat(n)}}var Oj=F().or(SA()).transform(e=>ix(e).value),CwA=F().or(SA()).transform(e=>ix(e).value).transform(e=>Number.parseFloat(e.toPrecision(12))),hCt=F().or(SA()).transform(e=>ix(e).value),VF=F().or(SA()).transform(e=>ix(e).value),mo=F().or(SA()).transform(e=>ix(e).value),Wj=F().or(SA()).transform(e=>ix(e).value),Xe=mo,ZVe=F().or(SA()).transform(e=>ix(e).value),p4=F().or(SA()).transform(e=>ix(e).value),VVe=p4,jF=p4,QCt=F().datetime(),rw=F().or(SA()).transform(e=>typeof e=="number"?e:e.endsWith("deg")?Number.parseFloat(e.split("deg")[0]):e.endsWith("rad")?Number.parseFloat(e.split("rad")[0])*180/Math.PI:Number.parseFloat(e)),uCt=SA().or(F().endsWith("mAh")).transform(e=>{if(typeof e=="string"){const A=e.replace("mAh",""),t=Number.parseFloat(A);if(Number.isNaN(t))throw new Error("Invalid capacity");return t}return e}).describe("Battery capacity in mAh"),ds=xA({x:Xe,y:Xe}),jVe=ds,f4=xA({x:Xe,y:Xe,z:Xe}),zVe=f4,hwA=xA({width:SA(),height:SA()}),XVe=e=>{const A="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:e},()=>A[Math.floor(Math.random()*A.length)]).join("")},Ti=e=>F().optional().default(()=>`${e}_${XVe(10)}`),y4=Ot(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),ECt=Ot(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Nd=xA({type:CA("source_component"),ftype:F().optional(),source_component_id:F(),name:F(),manufacturer_part_number:F().optional(),supplier_part_numbers:hs(ECt,gt(F())).optional(),display_value:F().optional(),are_pins_interchangeable:$A().optional(),internally_connected_source_port_ids:gt(gt(F())).optional(),source_group_id:F().optional(),subcircuit_id:F().optional()}),QwA=Nd.extend({ftype:CA("simple_capacitor"),capacitance:CwA,max_voltage_rating:VF.optional(),display_capacitance:F().optional(),max_decoupling_trace_length:Xe.optional()}),uwA=Nd.extend({ftype:CA("simple_resistor"),resistance:Oj,display_resistance:F().optional()}),Zj=Nd.extend({ftype:CA("simple_diode")}),EwA=Zj.extend({ftype:CA("simple_led"),color:F().optional(),wavelength:F().optional()}),dCt=Nd.extend({ftype:CA("simple_ground")}),dwA=Nd.extend({ftype:CA("simple_chip")}),pwA=Nd.extend({ftype:CA("simple_power_source"),voltage:VF}),$Ve=Nd.extend({ftype:CA("simple_fuse"),current_rating_amps:SA().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:SA().describe("Voltage rating in volts, e.g. ±5V would be 5")}),fwA=Nd.extend({ftype:CA("simple_battery"),capacity:uCt}),ywA=Nd.extend({ftype:CA("simple_inductor"),inductance:hCt,max_current_rating:SA().optional()}),mwA=Nd.extend({ftype:CA("simple_push_button")}),wwA=Nd.extend({ftype:CA("simple_potentiometer"),max_resistance:Oj}),pCt=Nd.extend({ftype:CA("simple_crystal"),frequency:SA().describe("Frequency in Hz"),load_capacitance:SA().optional().describe("Load capacitance in pF")}),DwA=Nd.extend({ftype:CA("simple_pin_header"),pin_count:SA(),gender:Ot(["male","female"]).optional().default("male")}),_wA=Nd.extend({ftype:CA("simple_pinout")}),xwA=Nd.extend({ftype:CA("simple_resonator"),load_capacitance:CwA,equivalent_series_resistance:Oj.optional(),frequency:Wj}),bwA=Nd.extend({ftype:CA("simple_transistor"),transistor_type:Ot(["npn","pnp"])}),SwA=Nd.extend({ftype:CA("simple_test_point"),footprint_variant:Ot(["pad","through_hole"]).optional(),pad_shape:Ot(["rect","circle"]).optional(),pad_diameter:Ye([SA(),F()]).optional(),hole_diameter:Ye([SA(),F()]).optional(),width:Ye([SA(),F()]).optional(),height:Ye([SA(),F()]).optional()}),vwA=Nd.extend({ftype:CA("simple_mosfet"),channel_type:Ot(["n","p"]),mosfet_mode:Ot(["enhancement","depletion"])}),kwA=Nd.extend({ftype:CA("simple_switch")}),RwA=xA({type:CA("source_project_metadata"),name:F().optional(),software_used_string:F().optional(),project_url:F().optional(),created_at:QCt.optional()}),fCt=xA({type:CA("source_missing_property_error"),source_missing_property_error_id:Ti("source_missing_property_error"),source_component_id:F(),property_name:F(),subcircuit_id:F().optional(),error_type:CA("source_missing_property_error").default("source_missing_property_error"),message:F()}).describe("The source code is missing a property"),yCt=xA({type:CA("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:Ti("source_failed_to_create_component_error"),error_type:CA("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:F().optional(),subcircuit_id:F().optional(),parent_source_component_id:F().optional(),message:F(),pcb_center:xA({x:SA().optional(),y:SA().optional()}).optional(),schematic_center:xA({x:SA().optional(),y:SA().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),FwA=xA({type:CA("source_trace_not_connected_error"),source_trace_not_connected_error_id:Ti("source_trace_not_connected_error"),error_type:CA("source_trace_not_connected_error").default("source_trace_not_connected_error"),message:F(),subcircuit_id:F().optional(),source_group_id:F().optional(),source_trace_id:F().optional(),connected_source_port_ids:gt(F()).optional(),selectors_not_found:gt(F()).optional()}).describe("Occurs when a source trace selector does not match any ports"),mCt=xA({type:CA("source_property_ignored_warning"),source_property_ignored_warning_id:Ti("source_property_ignored_warning"),source_component_id:F(),property_name:F(),subcircuit_id:F().optional(),error_type:CA("source_property_ignored_warning").default("source_property_ignored_warning"),message:F()}).describe("The source property was ignored"),NwA=xA({type:CA("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:Ti("source_pin_missing_trace_warning"),warning_type:CA("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:F(),source_component_id:F(),source_port_id:F(),subcircuit_id:F().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),wCt=Nd.extend({ftype:CA("simple_voltage_probe")}),DCt=Ye([uwA,QwA,Zj,EwA,dCt,dwA,pwA,fwA,ywA,mwA,wwA,pCt,DwA,_wA,xwA,kwA,bwA,SwA,vwA,$Ve,wCt,RwA,fCt,yCt,FwA,mCt,NwA]),_Ct=xA({type:CA("source_port"),pin_number:SA().optional(),port_hints:gt(F()).optional(),name:F(),source_port_id:F(),source_component_id:F().optional(),source_group_id:F().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),must_be_connected:$A().optional()}),xCt=xA({type:CA("source_trace"),source_trace_id:F(),connected_source_port_ids:gt(F()),connected_source_net_ids:gt(F()),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),max_length:SA().optional(),min_trace_thickness:SA().optional(),display_name:F().optional()}),bCt=xA({type:CA("source_group"),source_group_id:F(),subcircuit_id:F().optional(),parent_subcircuit_id:F().optional(),parent_source_group_id:F().optional(),is_subcircuit:$A().optional(),show_as_schematic_box:$A().optional(),name:F().optional(),was_automatically_named:$A().optional()}),SCt=xA({type:CA("source_net"),source_net_id:F(),name:F(),member_source_group_ids:gt(F()),is_power:$A().optional(),is_ground:$A().optional(),is_digital_signal:$A().optional(),is_analog_signal:$A().optional(),is_positive_voltage_source:$A().optional(),trace_width:SA().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional()}),vCt=xA({type:CA("source_board"),source_board_id:F(),source_group_id:F(),title:F().optional()}).describe("Defines a board in the source domain"),kCt=xA({type:CA("source_pcb_ground_plane"),source_pcb_ground_plane_id:F(),source_group_id:F(),source_net_id:F(),subcircuit_id:F().optional()}).describe("Defines a ground plane in the source domain"),RCt=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],GwA=Ot(RCt),pI=GwA.or(xA({name:GwA})).transform(e=>typeof e=="string"?e:e.name),nx=Ot(["top","bottom"]),FCt=xA({type:CA("source_manually_placed_via"),source_manually_placed_via_id:F(),source_group_id:F(),source_net_id:F(),subcircuit_id:F().optional(),source_trace_id:F().optional()}).describe("Defines a via that is manually placed in the source domain"),NCt=xA({type:CA("source_pin_must_be_connected_error"),source_pin_must_be_connected_error_id:Ti("source_pin_must_be_connected_error"),error_type:CA("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),message:F(),source_component_id:F(),source_port_id:F(),subcircuit_id:F().optional()}).describe("Error emitted when a pin with mustBeConnected attribute is not connected to any trace"),GCt=xA({type:CA("unknown_error_finding_part"),unknown_error_finding_part_id:Ti("unknown_error_finding_part"),error_type:CA("unknown_error_finding_part").default("unknown_error_finding_part"),message:F(),source_component_id:F().optional(),subcircuit_id:F().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),MCt=xA({type:CA("schematic_box"),schematic_component_id:F().optional(),width:Xe,height:Xe,is_dashed:$A().default(!1),x:Xe,y:Xe,subcircuit_id:F().optional()}).describe("Draws a box on the schematic"),LCt=xA({type:CA("schematic_path"),schematic_component_id:F(),fill_color:Ot(["red","blue"]).optional(),is_filled:$A().optional(),points:gt(ds),subcircuit_id:F().optional()}),UCt=hs(xA({left_margin:mo.optional(),right_margin:mo.optional(),top_margin:mo.optional(),bottom_margin:mo.optional()})),HCt=xA({left_size:SA(),right_size:SA(),top_size:SA().optional(),bottom_size:SA().optional()}),YCt=xA({left_side:xA({pins:gt(SA()),direction:Ot(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:xA({pins:gt(SA()),direction:Ot(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:xA({pins:gt(SA()),direction:Ot(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:xA({pins:gt(SA()),direction:Ot(["left-to-right","right-to-left"]).optional()}).optional()}),JCt=Ye([HCt,YCt]),TCt=xA({type:CA("schematic_component"),size:hwA,center:ds,source_component_id:F().optional(),schematic_component_id:F(),pin_spacing:mo.optional(),pin_styles:UCt.optional(),box_width:mo.optional(),symbol_name:F().optional(),port_arrangement:JCt.optional(),port_labels:hs(F()).optional(),symbol_display_value:F().optional(),subcircuit_id:F().optional(),schematic_group_id:F().optional(),is_schematic_group:$A().optional(),source_group_id:F().optional(),is_box_with_pins:$A().optional().default(!0)}),KCt=xA({type:CA("schematic_line"),schematic_line_id:Ti("schematic_line"),schematic_component_id:F(),x1:Xe,y1:Xe,x2:Xe,y2:Xe,stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled line on the schematic"),qCt=xA({type:CA("schematic_rect"),schematic_rect_id:Ti("schematic_rect"),schematic_component_id:F(),center:ds,width:Xe,height:Xe,rotation:rw.default(0),stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_filled:$A().default(!1),fill_color:F().optional(),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled rectangle on the schematic"),PCt=xA({type:CA("schematic_circle"),schematic_circle_id:Ti("schematic_circle"),schematic_component_id:F(),center:ds,radius:Xe,stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_filled:$A().default(!1),fill_color:F().optional(),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled circle on the schematic"),OCt=xA({type:CA("schematic_arc"),schematic_arc_id:Ti("schematic_arc"),schematic_component_id:F(),center:ds,radius:Xe,start_angle_degrees:rw,end_angle_degrees:rw,direction:Ot(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:Xe.nullable().optional(),color:F().default("#000000"),is_dashed:$A().default(!1),subcircuit_id:F().optional()}).describe("Draws a styled arc on the schematic"),WCt=xA({type:CA("schematic_trace"),schematic_trace_id:F(),source_trace_id:F().optional(),junctions:gt(xA({x:SA(),y:SA()})),edges:gt(xA({from:xA({x:SA(),y:SA()}),to:xA({x:SA(),y:SA()}),is_crossing:$A().optional(),from_schematic_port_id:F().optional(),to_schematic_port_id:F().optional()})),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional()}),Aje=Ot(["center","left","right","top","bottom"]),ZCt=xA({type:CA("schematic_text"),schematic_component_id:F().optional(),schematic_text_id:F(),text:F(),font_size:SA().default(.18),position:xA({x:Xe,y:Xe}),rotation:SA().default(0),anchor:Ye([Aje.describe("legacy"),y4]).default("center"),color:F().default("#000000"),subcircuit_id:F().optional()}),VCt=xA({type:CA("schematic_port"),schematic_port_id:F(),source_port_id:F(),schematic_component_id:F().optional(),center:ds,facing_direction:Ot(["up","down","left","right"]).optional(),distance_from_component_edge:SA().optional(),side_of_component:Ot(["top","bottom","left","right"]).optional(),true_ccw_index:SA().optional(),pin_number:SA().optional(),display_pin_label:F().optional(),subcircuit_id:F().optional(),is_connected:$A().optional(),has_input_arrow:$A().optional(),has_output_arrow:$A().optional()}).describe("Defines a port on a schematic component"),jCt=xA({type:CA("schematic_net_label"),schematic_net_label_id:Ti("schematic_net_label"),schematic_trace_id:F().optional(),source_trace_id:F().optional(),source_net_id:F(),center:ds,anchor_position:ds.optional(),anchor_side:Ot(["top","bottom","left","right"]),text:F(),symbol_name:F().optional(),is_movable:$A().optional(),subcircuit_id:F().optional()}),zCt=xA({type:CA("schematic_error"),schematic_error_id:F(),error_type:CA("schematic_port_not_found").default("schematic_port_not_found"),message:F(),subcircuit_id:F().optional()}).describe("Defines a schematic error on the schematic"),XCt=xA({type:CA("schematic_layout_error"),schematic_layout_error_id:Ti("schematic_layout_error"),error_type:CA("schematic_layout_error").default("schematic_layout_error"),message:F(),source_group_id:F(),schematic_group_id:F(),subcircuit_id:F().optional()}).describe("Error emitted when schematic layout fails for a group"),Vj=xA({type:CA("schematic_debug_object"),label:F().optional(),subcircuit_id:F().optional()}),$Ct=Vj.extend({shape:CA("rect"),center:ds,size:hwA}),Aht=Vj.extend({shape:CA("line"),start:ds,end:ds}),tht=Vj.extend({shape:CA("point"),center:ds}),eht=Th("shape",[$Ct,Aht,tht]),iht=xA({type:CA("schematic_voltage_probe"),schematic_voltage_probe_id:F(),source_component_id:F().optional(),name:F().optional(),position:ds,schematic_trace_id:F(),voltage:VF.optional(),subcircuit_id:F().optional(),color:F().optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),nht=xA({type:CA("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:Ti("schematic_manual_edit_conflict_warning"),warning_type:CA("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:F(),schematic_component_id:F(),schematic_group_id:F().optional(),subcircuit_id:F().optional(),source_component_id:F()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),oht=xA({type:CA("schematic_group"),schematic_group_id:Ti("schematic_group"),source_group_id:F(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo,height:mo,center:ds,schematic_component_ids:gt(F()),show_as_schematic_box:$A().optional(),name:F().optional(),description:F().optional()}).describe("Defines a group of components on the schematic"),sht=xA({type:CA("schematic_table"),schematic_table_id:Ti("schematic_table"),anchor_position:ds,column_widths:gt(Xe),row_heights:gt(Xe),cell_padding:Xe.optional(),border_width:Xe.optional(),subcircuit_id:F().optional(),schematic_component_id:F().optional(),anchor:y4.optional()}).describe("Defines a table on the schematic"),rht=xA({type:CA("schematic_table_cell"),schematic_table_cell_id:Ti("schematic_table_cell"),schematic_table_id:F(),start_row_index:SA(),end_row_index:SA(),start_column_index:SA(),end_column_index:SA(),text:F().optional(),center:ds,width:Xe,height:Xe,horizontal_align:Ot(["left","center","right"]).optional(),vertical_align:Ot(["top","middle","bottom"]).optional(),font_size:Xe.optional(),subcircuit_id:F().optional()}).describe("Defines a cell within a schematic_table"),aht=xA({type:CA("schematic_sheet"),schematic_sheet_id:Ti("schematic_sheet"),name:F().optional(),subcircuit_id:F().optional()}).describe("Defines a schematic sheet or page that components can be placed on"),ght=xA({x:Xe,y:Xe,bulge:SA().optional()}),MwA=xA({vertices:gt(ght)}),cht=xA({outer_ring:MwA,inner_rings:gt(MwA).default([])}),Iht=xA({x:Xe,y:Xe,via:$A().optional(),via_to_layer:pI.optional()}),tje=gt(Iht),lht=xA({x:Xe,y:Xe,via:$A().optional(),to_layer:pI.optional(),trace_width:Xe.optional()}),Bht=xA({type:CA("pcb_component"),pcb_component_id:Ti("pcb_component"),source_component_id:F(),center:ds,layer:pI,rotation:rw,width:mo,height:mo,do_not_place:$A().optional(),subcircuit_id:F().optional(),pcb_group_id:F().optional(),position_mode:Ot(["packed","relative_to_group_anchor","none"]).optional(),positioned_relative_to_pcb_group_id:F().optional(),obstructs_within_bounds:$A().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),Cht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("circle"),hole_diameter:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),eje=Cht.describe("Defines a circular hole on the PCB"),hht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rect"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),ije=hht.describe("Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."),Qht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:Ot(["circle","square"]),hole_diameter:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),nje=Qht.describe("Defines a circular or square hole on the PCB"),uht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("oval"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),oje=uht.describe("Defines an oval hole on the PCB"),Eht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("pill"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),sje=Eht.describe("Defines a pill-shaped hole on the PCB"),dht=xA({type:CA("pcb_hole"),pcb_hole_id:Ti("pcb_hole"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rotated_pill"),hole_width:SA(),hole_height:SA(),x:Xe,y:Xe,ccw_rotation:rw,is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),rje=dht.describe("Defines a rotated pill-shaped hole on the PCB"),pht=Qht.or(uht).or(Eht).or(dht).or(Cht).or(hht),aje=xA({type:CA("pcb_plated_hole"),shape:CA("circle"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),outer_diameter:SA(),hole_diameter:SA(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional(),is_covered_with_solder_mask:$A().optional()}),gje=xA({type:CA("pcb_plated_hole"),shape:Ot(["oval","pill"]),pcb_group_id:F().optional(),subcircuit_id:F().optional(),outer_width:SA(),outer_height:SA(),hole_width:SA(),hole_height:SA(),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,ccw_rotation:rw,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),cje=xA({type:CA("pcb_plated_hole"),shape:CA("circular_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("circle"),pad_shape:CA("rect"),hole_diameter:SA(),rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),Ije=xA({type:CA("pcb_plated_hole"),shape:CA("pill_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("pill"),pad_shape:CA("rect"),hole_width:SA(),hole_height:SA(),rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),lje=xA({type:CA("pcb_plated_hole"),shape:CA("rotated_pill_hole_with_rect_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:CA("rotated_pill"),pad_shape:CA("rect"),hole_width:SA(),hole_height:SA(),hole_ccw_rotation:rw,rect_pad_width:SA(),rect_pad_height:SA(),rect_border_radius:SA().optional(),rect_ccw_rotation:rw,hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),Bje=xA({type:CA("pcb_plated_hole"),shape:CA("hole_with_polygon_pad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),hole_shape:Ot(["circle","oval","pill","rotated_pill"]),hole_diameter:SA().optional(),hole_width:SA().optional(),hole_height:SA().optional(),pad_outline:gt(xA({x:Xe,y:Xe})).min(3),hole_offset_x:Xe.default(0),hole_offset_y:Xe.default(0),is_covered_with_solder_mask:$A().optional(),x:Xe,y:Xe,layers:gt(pI),port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),pcb_plated_hole_id:Ti("pcb_plated_hole"),soldermask_margin:SA().optional()}),fht=Ye([aje,gje,cje,Ije,lje,Bje]),yht=xA({type:CA("pcb_port"),pcb_port_id:Ti("pcb_port"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),source_port_id:F(),pcb_component_id:F().optional(),x:Xe,y:Xe,layers:gt(pI),is_board_pinout:$A().optional()}).describe("Defines a port on the PCB"),Cje=xA({type:CA("pcb_smtpad"),shape:CA("circle"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,radius:SA(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),hje=xA({type:CA("pcb_smtpad"),shape:CA("rect"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),rect_border_radius:SA().optional(),corner_radius:SA().optional(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),Qje=xA({type:CA("pcb_smtpad"),shape:CA("rotated_rect"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),rect_border_radius:SA().optional(),corner_radius:SA().optional(),ccw_rotation:rw,layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),mht=xA({type:CA("pcb_smtpad"),shape:CA("pill"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),uje=xA({type:CA("pcb_smtpad"),shape:CA("rotated_pill"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),ccw_rotation:rw,layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),Eje=xA({type:CA("pcb_smtpad"),shape:CA("polygon"),pcb_smtpad_id:Ti("pcb_smtpad"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),points:gt(ds),layer:pI,port_hints:gt(F()).optional(),pcb_component_id:F().optional(),pcb_port_id:F().optional(),is_covered_with_solder_mask:$A().optional(),soldermask_margin:SA().optional()}),wht=Th("shape",[Cje,hje,Qje,uje,mht,Eje]).describe("Defines an SMT pad on the PCB"),dje=xA({type:CA("pcb_solder_paste"),shape:CA("circle"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,radius:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),pje=xA({type:CA("pcb_solder_paste"),shape:CA("rect"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),fje=xA({type:CA("pcb_solder_paste"),shape:CA("pill"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),radius:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),yje=xA({type:CA("pcb_solder_paste"),shape:CA("rotated_rect"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),ccw_rotation:Xe,layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),mje=xA({type:CA("pcb_solder_paste"),shape:CA("oval"),pcb_solder_paste_id:Ti("pcb_solder_paste"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),x:Xe,y:Xe,width:SA(),height:SA(),layer:pI,pcb_component_id:F().optional(),pcb_smtpad_id:F().optional()}),Dht=Ye([dje,pje,fje,yje,mje]).describe("Defines solderpaste on the PCB"),_ht=xA({type:CA("pcb_text"),pcb_text_id:Ti("pcb_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),text:F(),center:ds,layer:pI,width:mo,height:mo,lines:SA(),align:Ot(["bottom-left"])}).describe("Defines text on the PCB"),xht=xA({route_type:CA("wire"),x:Xe,y:Xe,width:Xe,start_pcb_port_id:F().optional(),end_pcb_port_id:F().optional(),layer:pI}),bht=xA({route_type:CA("via"),x:Xe,y:Xe,hole_diameter:Xe.optional(),outer_diameter:Xe.optional(),from_layer:F(),to_layer:F()}),Sht=Ye([xht,bht]),vht=xA({type:CA("pcb_trace"),source_trace_id:F().optional(),pcb_component_id:F().optional(),pcb_trace_id:Ti("pcb_trace"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),route_thickness_mode:Ot(["constant","interpolated"]).default("constant").optional(),route_order_index:SA().optional(),should_round_corners:$A().optional(),trace_length:SA().optional(),highlight_color:F().optional(),route:gt(Sht)}).describe("Defines a trace on the PCB"),kht=xA({type:CA("pcb_trace_error"),pcb_trace_error_id:Ti("pcb_trace_error"),error_type:CA("pcb_trace_error").default("pcb_trace_error"),message:F(),center:ds.optional(),pcb_trace_id:F(),source_trace_id:F(),pcb_component_ids:gt(F()),pcb_port_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines a trace error on the PCB"),Rht=xA({type:CA("pcb_trace_missing_error"),pcb_trace_missing_error_id:Ti("pcb_trace_missing_error"),error_type:CA("pcb_trace_missing_error").default("pcb_trace_missing_error"),message:F(),center:ds.optional(),source_trace_id:F(),pcb_component_ids:gt(F()),pcb_port_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),Fht=xA({type:CA("pcb_port_not_matched_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),message:F(),pcb_component_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),Nht=xA({type:CA("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:Ti("pcb_port_not_connected_error"),error_type:CA("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),message:F(),pcb_port_ids:gt(F()),pcb_component_ids:gt(F()),subcircuit_id:F().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),Ght=xA({type:CA("pcb_net"),pcb_net_id:Ti("pcb_net"),source_net_id:F().optional(),highlight_color:F().optional()}).describe("Defines a net on the PCB"),Mht=xA({type:CA("pcb_via"),pcb_via_id:Ti("pcb_via"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),x:Xe,y:Xe,outer_diameter:Xe.default("0.6mm"),hole_diameter:Xe.default("0.25mm"),from_layer:pI.optional(),to_layer:pI.optional(),layers:gt(pI),pcb_trace_id:F().optional(),net_is_assignable:$A().optional(),net_assigned:$A().optional()}).describe("Defines a via on the PCB"),Lht=xA({type:CA("pcb_board"),pcb_board_id:Ti("pcb_board"),pcb_panel_id:F().optional(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo.optional(),height:mo.optional(),center:ds,thickness:mo.optional().default(1.4),num_layers:SA().optional().default(4),outline:gt(ds).optional(),shape:Ot(["rect","polygon"]).optional(),material:Ot(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),Uht=xA({type:CA("pcb_panel"),pcb_panel_id:Ti("pcb_panel"),width:mo,height:mo,center:ds,covered_with_solder_mask:$A().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),Hht=xA({type:CA("pcb_placement_error"),pcb_placement_error_id:Ti("pcb_placement_error"),error_type:CA("pcb_placement_error").default("pcb_placement_error"),message:F(),subcircuit_id:F().optional()}).describe("Defines a placement error on the PCB"),Yht=xA({type:CA("pcb_trace_hint"),pcb_trace_hint_id:Ti("pcb_trace_hint"),pcb_port_id:F(),pcb_component_id:F(),route:gt(lht),subcircuit_id:F().optional()}).describe("A hint that can be used during generation of a PCB trace"),Jht=xA({type:CA("pcb_silkscreen_line"),pcb_silkscreen_line_id:Ti("pcb_silkscreen_line"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),stroke_width:Xe.default("0.1mm"),x1:Xe,y1:Xe,x2:Xe,y2:Xe,layer:nx}).describe("Defines a silkscreen line on the PCB"),Tht=xA({type:CA("pcb_silkscreen_path"),pcb_silkscreen_path_id:Ti("pcb_silkscreen_path"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,route:gt(ds),stroke_width:mo}).describe("Defines a silkscreen path on the PCB"),Kht=xA({type:CA("pcb_silkscreen_text"),pcb_silkscreen_text_id:Ti("pcb_silkscreen_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("0.2mm"),pcb_component_id:F(),text:F(),is_knockout:$A().default(!1).optional(),knockout_padding:xA({left:mo,top:mo,bottom:mo,right:mo}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:SA().optional(),layer:pI,is_mirrored:$A().default(!1).optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:y4.default("center")}).describe("Defines silkscreen text on the PCB"),qht=xA({type:CA("pcb_copper_text"),pcb_copper_text_id:Ti("pcb_copper_text"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("0.2mm"),pcb_component_id:F(),text:F(),is_knockout:$A().default(!1).optional(),knockout_padding:xA({left:mo,top:mo,bottom:mo,right:mo}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:SA().optional(),layer:pI,is_mirrored:$A().default(!1).optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:y4.default("center")}).describe("Defines copper text on the PCB"),Pht=xA({type:CA("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:Ti("pcb_silkscreen_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:pI,stroke_width:mo.default("1mm"),corner_radius:mo.optional(),is_filled:$A().default(!0).optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional()}).describe("Defines a silkscreen rect on the PCB"),Oht=xA({type:CA("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:Ti("pcb_silkscreen_circle"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius:mo,layer:nx,stroke_width:mo.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),Wht=xA({type:CA("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:Ti("pcb_silkscreen_oval"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius_x:Xe,radius_y:Xe,layer:nx}).describe("Defines a silkscreen oval on the PCB"),Zht=xA({type:CA("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:Ti("pcb_fabrication_note_text"),subcircuit_id:F().optional(),pcb_group_id:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("1mm"),pcb_component_id:F(),text:F(),layer:nx,anchor_position:ds.default({x:0,y:0}),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:F().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),Vht=xA({type:CA("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:Ti("pcb_fabrication_note_path"),pcb_component_id:F(),subcircuit_id:F().optional(),layer:pI,route:gt(ds),stroke_width:mo,color:F().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),jht=xA({type:CA("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:Ti("pcb_fabrication_note_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:nx,stroke_width:mo.default("0.1mm"),corner_radius:mo.optional(),is_filled:$A().optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a fabrication note rectangle on the PCB"),zht=xA({type:CA("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:Ti("pcb_fabrication_note_dimension"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,from:ds,to:ds,text:F().optional(),text_ccw_rotation:SA().optional(),offset:mo.optional(),offset_distance:mo.optional(),offset_direction:xA({x:SA(),y:SA()}).optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:mo.default("1mm"),color:F().optional(),arrow_size:mo.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),Xht=xA({type:CA("pcb_note_text"),pcb_note_text_id:Ti("pcb_note_text"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:Xe.default("1mm"),text:F().optional(),anchor_position:ds.default({x:0,y:0}),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:F().optional()}).describe("Defines a documentation note in text on the PCB"),$ht=xA({type:CA("pcb_note_rect"),pcb_note_rect_id:Ti("pcb_note_rect"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),center:ds,width:mo,height:mo,stroke_width:mo.default("0.1mm"),corner_radius:mo.optional(),is_filled:$A().optional(),has_stroke:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a rectangular documentation note on the PCB"),AQt=xA({type:CA("pcb_note_path"),pcb_note_path_id:Ti("pcb_note_path"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),route:gt(ds),stroke_width:mo.default("0.1mm"),color:F().optional()}).describe("Defines a polyline documentation note on the PCB"),tQt=xA({type:CA("pcb_note_line"),pcb_note_line_id:Ti("pcb_note_line"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),text:F().optional(),x1:Xe,y1:Xe,x2:Xe,y2:Xe,stroke_width:Xe.default("0.1mm"),color:F().optional(),is_dashed:$A().optional()}).describe("Defines a straight documentation note line on the PCB"),eQt=xA({type:CA("pcb_note_dimension"),pcb_note_dimension_id:Ti("pcb_note_dimension"),pcb_component_id:F().optional(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),name:F().optional(),from:ds,to:ds,text:F().optional(),text_ccw_rotation:SA().optional(),offset_distance:mo.optional(),offset_direction:xA({x:SA(),y:SA()}).optional(),font:CA("tscircuit2024").default("tscircuit2024"),font_size:mo.default("1mm"),color:F().optional(),arrow_size:mo.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),iQt=xA({type:CA("pcb_footprint_overlap_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),message:F(),pcb_smtpad_ids:gt(F()).optional(),pcb_plated_hole_ids:gt(F()).optional(),pcb_hole_ids:gt(F()).optional(),pcb_keepout_ids:gt(F()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),nQt=xA({type:CA("pcb_keepout"),shape:CA("rect"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:Xe,height:Xe,pcb_keepout_id:F(),layers:gt(F()),description:F().optional()}).or(xA({type:CA("pcb_keepout"),shape:CA("circle"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,radius:Xe,pcb_keepout_id:F(),layers:gt(F()),description:F().optional()})),jj=xA({type:CA("pcb_cutout"),pcb_cutout_id:Ti("pcb_cutout"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),pcb_board_id:F().optional(),pcb_panel_id:F().optional()}),oQt=jj.extend({shape:CA("rect"),center:ds,width:mo,height:mo,rotation:rw.optional(),corner_radius:mo.optional()}),sQt=jj.extend({shape:CA("circle"),center:ds,radius:mo}),rQt=jj.extend({shape:CA("polygon"),points:gt(ds)}),aQt=jj.extend({shape:CA("path"),route:gt(ds),slot_width:mo,slot_length:mo.optional(),space_between_slots:mo.optional(),slot_corner_radius:mo.optional()}),gQt=Th("shape",[oQt,sQt,rQt,aQt]).describe("Defines a cutout on the PCB, removing board material."),cQt=xA({type:CA("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:Ti("pcb_missing_footprint_error"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),error_type:CA("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:F(),message:F()}).describe("Defines a missing footprint error on the PCB"),IQt=xA({type:CA("external_footprint_load_error"),external_footprint_load_error_id:Ti("external_footprint_load_error"),pcb_component_id:F(),source_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),footprinter_string:F().optional(),error_type:CA("external_footprint_load_error").default("external_footprint_load_error"),message:F()}).describe("Defines an error when an external footprint fails to load"),lQt=xA({type:CA("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:Ti("circuit_json_footprint_load_error"),pcb_component_id:F(),source_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),error_type:CA("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),message:F(),circuit_json:gt(ig()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),BQt=xA({type:CA("pcb_group"),pcb_group_id:Ti("pcb_group"),source_group_id:F(),is_subcircuit:$A().optional(),subcircuit_id:F().optional(),width:mo.optional(),height:mo.optional(),center:ds,outline:gt(ds).optional(),anchor_position:ds.optional(),anchor_alignment:Ot(["center","top_left","top_right","bottom_left","bottom_right"]).optional(),pcb_component_ids:gt(F()),child_layout_mode:Ot(["packed","none"]).optional(),name:F().optional(),description:F().optional(),layout_mode:F().optional(),autorouter_configuration:xA({trace_clearance:mo}).optional(),autorouter_used_string:F().optional()}).describe("Defines a group of components on the PCB"),CQt=xA({type:CA("pcb_autorouting_error"),pcb_error_id:Ti("pcb_autorouting_error"),error_type:CA("pcb_autorouting_error").default("pcb_autorouting_error"),message:F(),subcircuit_id:F().optional()}).describe("The autorouting has failed to route a portion of the board"),hQt=xA({type:CA("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:Ti("pcb_manual_edit_conflict_warning"),warning_type:CA("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:F(),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),source_component_id:F()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),QQt=xA({type:CA("pcb_breakout_point"),pcb_breakout_point_id:Ti("pcb_breakout_point"),pcb_group_id:F(),subcircuit_id:F().optional(),source_trace_id:F().optional(),source_port_id:F().optional(),source_net_id:F().optional(),x:Xe,y:Xe}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),uQt=xA({type:CA("pcb_ground_plane"),pcb_ground_plane_id:Ti("pcb_ground_plane"),source_pcb_ground_plane_id:F(),source_net_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional()}).describe("Defines a ground plane on the PCB"),EQt=xA({type:CA("pcb_ground_plane_region"),pcb_ground_plane_region_id:Ti("pcb_ground_plane_region"),pcb_ground_plane_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:pI,points:gt(ds)}).describe("Defines a polygon region of a ground plane"),dQt=xA({type:CA("pcb_thermal_spoke"),pcb_thermal_spoke_id:Ti("pcb_thermal_spoke"),pcb_ground_plane_id:F(),shape:F(),spoke_count:SA(),spoke_thickness:Xe,spoke_inner_diameter:Xe,spoke_outer_diameter:Xe,pcb_plated_hole_id:F().optional(),subcircuit_id:F().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),LwA=xA({type:CA("pcb_copper_pour"),pcb_copper_pour_id:Ti("pcb_copper_pour"),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:pI,source_net_id:F().optional(),covered_with_solder_mask:$A().optional().default(!0)}),pQt=LwA.extend({shape:CA("rect"),center:ds,width:mo,height:mo,rotation:rw.optional()}),fQt=LwA.extend({shape:CA("brep"),brep_shape:cht}),yQt=LwA.extend({shape:CA("polygon"),points:gt(ds)}),mQt=Th("shape",[pQt,fQt,yQt]).describe("Defines a copper pour on the PCB."),wQt=xA({type:CA("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:Ti("pcb_component_outside_board_error"),error_type:CA("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),message:F(),pcb_component_id:F(),pcb_board_id:F(),component_center:ds,component_bounds:xA({min_x:SA(),max_x:SA(),min_y:SA(),max_y:SA()}),subcircuit_id:F().optional(),source_component_id:F().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),DQt=xA({type:CA("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:Ti("pcb_component_invalid_layer_error"),error_type:CA("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),message:F(),pcb_component_id:F().optional(),source_component_id:F(),layer:pI,subcircuit_id:F().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),_Qt=xA({type:CA("pcb_via_clearance_error"),pcb_error_id:Ti("pcb_error"),error_type:CA("pcb_via_clearance_error").default("pcb_via_clearance_error"),message:F(),pcb_via_ids:gt(F()).min(2),minimum_clearance:Xe.optional(),actual_clearance:Xe.optional(),pcb_center:xA({x:SA().optional(),y:SA().optional()}).optional(),subcircuit_id:F().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),xQt=xA({type:CA("pcb_courtyard_rect"),pcb_courtyard_rect_id:Ti("pcb_courtyard_rect"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),center:ds,width:mo,height:mo,layer:nx,color:F().optional()}).describe("Defines a courtyard rectangle on the PCB"),bQt=xA({type:CA("pcb_courtyard_outline"),pcb_courtyard_outline_id:Ti("pcb_courtyard_outline"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,outline:gt(ds).min(2),stroke_width:mo.default("0.1mm"),is_closed:$A().optional(),is_stroke_dashed:$A().optional(),color:F().optional()}).describe("Defines a courtyard outline on the PCB"),SQt=xA({type:CA("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:Ti("pcb_courtyard_polygon"),pcb_component_id:F(),pcb_group_id:F().optional(),subcircuit_id:F().optional(),layer:nx,points:gt(ds).min(3),color:F().optional()}).describe("Defines a courtyard polygon on the PCB"),vQt=xA({type:CA("cad_component"),cad_component_id:F(),pcb_component_id:F(),source_component_id:F(),position:f4,rotation:f4.optional(),size:f4.optional(),layer:pI.optional(),subcircuit_id:F().optional(),footprinter_string:F().optional(),model_obj_url:F().optional(),model_stl_url:F().optional(),model_3mf_url:F().optional(),model_gltf_url:F().optional(),model_glb_url:F().optional(),model_step_url:F().optional(),model_wrl_url:F().optional(),model_unit_to_mm_scale_factor:SA().optional(),model_jscad:ig().optional()}).describe("Defines a component on the PCB"),kQt=Ot(["sinewave","square","triangle","sawtooth"]),wje=Ye([F(),SA()]).transform(e=>typeof e=="string"?e.endsWith("%")?parseFloat(e.slice(0,-1))/100:parseFloat(e):e).pipe(SA().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),RQt=xA({type:CA("simulation_voltage_source"),simulation_voltage_source_id:Ti("simulation_voltage_source"),is_dc_source:CA(!0).optional().default(!0),positive_source_port_id:F().optional(),negative_source_port_id:F().optional(),positive_source_net_id:F().optional(),negative_source_net_id:F().optional(),voltage:VF}).describe("Defines a DC voltage source for simulation"),FQt=xA({type:CA("simulation_voltage_source"),simulation_voltage_source_id:Ti("simulation_voltage_source"),is_dc_source:CA(!1),terminal1_source_port_id:F().optional(),terminal2_source_port_id:F().optional(),terminal1_source_net_id:F().optional(),terminal2_source_net_id:F().optional(),voltage:VF.optional(),frequency:Wj.optional(),peak_to_peak_voltage:VF.optional(),wave_shape:kQt.optional(),phase:rw.optional(),duty_cycle:wje.optional()}).describe("Defines an AC voltage source for simulation"),NQt=Ye([RQt,FQt]).describe("Defines a voltage source for simulation"),GQt=Ye([CA("spice_dc_sweep"),CA("spice_dc_operating_point"),CA("spice_transient_analysis"),CA("spice_ac_analysis")]),MQt=xA({type:CA("simulation_experiment"),simulation_experiment_id:Ti("simulation_experiment"),name:F(),experiment_type:GQt,time_per_step:p4.optional(),start_time_ms:jF.optional(),end_time_ms:jF.optional()}).describe("Defines a simulation experiment configuration"),LQt=xA({type:CA("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:Ti("simulation_transient_voltage_graph"),simulation_experiment_id:F(),timestamps_ms:gt(SA()).optional(),voltage_levels:gt(SA()),source_component_id:F().optional(),subcircuit_connectivity_map_key:F().optional(),time_per_step:p4,start_time_ms:jF,end_time_ms:jF,name:F().optional(),color:F().optional()}).describe("Stores voltage measurements over time for a simulation"),UQt=xA({type:CA("simulation_switch"),simulation_switch_id:Ti("simulation_switch"),source_component_id:F().optional(),closes_at:jF.optional(),opens_at:jF.optional(),starts_closed:$A().optional(),switching_frequency:Wj.optional()}).describe("Defines a switch for simulation timing control"),HQt=xA({type:CA("simulation_voltage_probe"),simulation_voltage_probe_id:Ti("simulation_voltage_probe"),source_component_id:F().optional(),name:F().optional(),source_port_id:F().optional(),source_net_id:F().optional(),subcircuit_id:F().optional(),color:F().optional()}).describe("Defines a voltage probe for simulation, connected to a port or a net").refine(e=>!!e.source_port_id!=!!e.source_net_id,{message:"Exactly one of source_port_id or source_net_id must be provided to simulation_voltage_probe"}),YQt=xA({type:CA("simulation_unknown_experiment_error"),simulation_unknown_experiment_error_id:Ti("simulation_unknown_experiment_error"),error_type:CA("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),message:F(),simulation_experiment_id:F().optional(),subcircuit_id:F().optional()}).describe("An unknown error occurred during the simulation experiment."),JQt=Ye([xCt,_Ct,DCt,SCt,bCt,dwA,QwA,Zj,EwA,uwA,pwA,fwA,ywA,DwA,_wA,xwA,kwA,bwA,SwA,vwA,wwA,mwA,kCt,FCt,vCt,RwA,FwA,NwA,NCt,GCt,Bht,pht,cQt,IQt,lQt,hQt,fht,nQt,yht,Ght,_ht,vht,Mht,wht,Dht,Lht,Uht,BQt,Yht,Jht,Tht,Kht,qht,Pht,Oht,Wht,kht,Rht,Hht,Fht,Nht,_Qt,Vht,Zht,jht,zht,Xht,$ht,AQt,tQt,eQt,CQt,iQt,QQt,gQt,uQt,EQt,dQt,mQt,wQt,DQt,xQt,bQt,SQt,MCt,ZCt,KCt,qCt,PCt,OCt,TCt,VCt,WCt,LCt,zCt,XCt,jCt,eht,iht,nht,oht,aht,sht,rht,vQt,NQt,MQt,LQt,UQt,HQt,YQt]),UwA=JQt;const TQt=Object.freeze(Object.defineProperty({__proto__:null,all_layers:RCt,any_circuit_element:JQt,any_soup_element:UwA,any_source_component:DCt,battery_capacity:uCt,brep_shape:cht,cad_component:vQt,capacitance:CwA,circuit_json_footprint_load_error:lQt,current:ZVe,distance:Xe,duration_ms:p4,experiment_type:GQt,external_footprint_load_error:IQt,frequency:Wj,getZodPrefixedIdWithDefault:Ti,inductance:hCt,layer_ref:pI,layer_string:GwA,length:mo,ms:jF,ninePointAnchor:y4,pcb_autorouting_error:CQt,pcb_board:Lht,pcb_breakout_point:QQt,pcb_component:Bht,pcb_component_invalid_layer_error:DQt,pcb_component_outside_board_error:wQt,pcb_copper_pour:mQt,pcb_copper_pour_brep:fQt,pcb_copper_pour_polygon:yQt,pcb_copper_pour_rect:pQt,pcb_copper_text:qht,pcb_courtyard_outline:bQt,pcb_courtyard_polygon:SQt,pcb_courtyard_rect:xQt,pcb_cutout:gQt,pcb_cutout_circle:sQt,pcb_cutout_path:aQt,pcb_cutout_polygon:rQt,pcb_cutout_rect:oQt,pcb_fabrication_note_dimension:zht,pcb_fabrication_note_path:Vht,pcb_fabrication_note_rect:jht,pcb_fabrication_note_text:Zht,pcb_footprint_overlap_error:iQt,pcb_ground_plane:uQt,pcb_ground_plane_region:EQt,pcb_group:BQt,pcb_hole:pht,pcb_hole_circle_or_square_shape:nje,pcb_hole_circle_shape:eje,pcb_hole_oval_shape:oje,pcb_hole_pill_shape:sje,pcb_hole_rect_shape:ije,pcb_hole_rotated_pill_shape:rje,pcb_keepout:nQt,pcb_manual_edit_conflict_warning:hQt,pcb_missing_footprint_error:cQt,pcb_net:Ght,pcb_note_dimension:eQt,pcb_note_line:tQt,pcb_note_path:AQt,pcb_note_rect:$ht,pcb_note_text:Xht,pcb_panel:Uht,pcb_placement_error:Hht,pcb_plated_hole:fht,pcb_port:yht,pcb_port_not_connected_error:Nht,pcb_port_not_matched_error:Fht,pcb_route_hint:Iht,pcb_route_hints:tje,pcb_silkscreen_circle:Oht,pcb_silkscreen_line:Jht,pcb_silkscreen_oval:Wht,pcb_silkscreen_path:Tht,pcb_silkscreen_rect:Pht,pcb_silkscreen_text:Kht,pcb_smtpad:wht,pcb_smtpad_pill:mht,pcb_solder_paste:Dht,pcb_text:_ht,pcb_thermal_spoke:dQt,pcb_trace:vht,pcb_trace_error:kht,pcb_trace_hint:Yht,pcb_trace_missing_error:Rht,pcb_trace_route_point:Sht,pcb_trace_route_point_via:bht,pcb_trace_route_point_wire:xht,pcb_via:Mht,pcb_via_clearance_error:_Qt,point:ds,point3:f4,point_with_bulge:ght,port_arrangement:JCt,position:jVe,position3:zVe,resistance:Oj,ring:MwA,rotation:rw,route_hint_point:lht,schematic_arc:OCt,schematic_box:MCt,schematic_circle:PCt,schematic_component:TCt,schematic_component_port_arrangement_by_sides:YCt,schematic_component_port_arrangement_by_size:HCt,schematic_debug_line:Aht,schematic_debug_object:eht,schematic_debug_object_base:Vj,schematic_debug_point:tht,schematic_debug_rect:$Ct,schematic_error:zCt,schematic_group:oht,schematic_layout_error:XCt,schematic_line:KCt,schematic_manual_edit_conflict_warning:nht,schematic_net_label:jCt,schematic_path:LCt,schematic_pin_styles:UCt,schematic_port:VCt,schematic_rect:qCt,schematic_sheet:aht,schematic_table:sht,schematic_table_cell:rht,schematic_text:ZCt,schematic_trace:WCt,schematic_voltage_probe:iht,simulation_ac_voltage_source:FQt,simulation_dc_voltage_source:RQt,simulation_experiment:MQt,simulation_switch:UQt,simulation_transient_voltage_graph:LQt,simulation_unknown_experiment_error:YQt,simulation_voltage_probe:HQt,simulation_voltage_source:NQt,size:hwA,source_board:vCt,source_component_base:Nd,source_failed_to_create_component_error:yCt,source_group:bCt,source_manually_placed_via:FCt,source_missing_property_error:fCt,source_net:SCt,source_pcb_ground_plane:kCt,source_pin_missing_trace_warning:NwA,source_pin_must_be_connected_error:NCt,source_port:_Ct,source_project_metadata:RwA,source_property_ignored_warning:mCt,source_simple_battery:fwA,source_simple_capacitor:QwA,source_simple_chip:dwA,source_simple_crystal:pCt,source_simple_diode:Zj,source_simple_ground:dCt,source_simple_inductor:ywA,source_simple_led:EwA,source_simple_mosfet:vwA,source_simple_pin_header:DwA,source_simple_pinout:_wA,source_simple_potentiometer:wwA,source_simple_power_source:pwA,source_simple_push_button:mwA,source_simple_resistor:uwA,source_simple_resonator:xwA,source_simple_switch:kwA,source_simple_test_point:SwA,source_simple_transistor:bwA,source_simple_voltage_probe:wCt,source_trace:xCt,source_trace_not_connected_error:FwA,supplier_name:ECt,time:VVe,timestamp:QCt,unknown_error_finding_part:GCt,visible_layer:nx,voltage:VF,wave_shape:kQt},Symbol.toStringTag,{value:"Module"})),m4=e=>typeof e=="number"&&!isNaN(e),zF=e=>typeof e=="string",oD=e=>typeof e=="function",zj=e=>zF(e)||oD(e)?e:null,HwA=e=>cA.isValidElement(e)||zF(e)||oD(e)||m4(e);function Dje(e,A,t){t===void 0&&(t=300);const{scrollHeight:i,style:n}=e;requestAnimationFrame(()=>{n.minHeight="initial",n.height=i+"px",n.transition=`all ${t}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(A,t)})})}function Xj(e){let{enter:A,exit:t,appendPosition:i=!1,collapse:n=!0,collapseDuration:o=300}=e;return function(s){let{children:r,position:a,preventExitTransition:g,done:c,nodeRef:I,isIn:l,playToast:B}=s;const C=i?`${A}--${a}`:A,Q=i?`${t}--${a}`:t,u=cA.useRef(0);return cA.useLayoutEffect(()=>{const E=I.current,p=C.split(" "),f=m=>{m.target===I.current&&(B(),E.removeEventListener("animationend",f),E.removeEventListener("animationcancel",f),u.current===0&&m.type!=="animationcancel"&&E.classList.remove(...p))};E.classList.add(...p),E.addEventListener("animationend",f),E.addEventListener("animationcancel",f)},[]),cA.useEffect(()=>{const E=I.current,p=()=>{E.removeEventListener("animationend",p),n?Dje(E,c,o):c()};l||(g?p():(u.current=1,E.className+=` ${Q}`,E.addEventListener("animationend",p)))},[l]),vo.createElement(vo.Fragment,null,r)}}function KQt(e,A){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:A}:{}}const Cm=new Map;let w4=[];const YwA=new Set,_je=e=>YwA.forEach(A=>A(e)),qQt=()=>Cm.size>0;function PQt(e,A){var t;if(A)return!((t=Cm.get(A))==null||!t.isToastActive(e));let i=!1;return Cm.forEach(n=>{n.isToastActive(e)&&(i=!0)}),i}function OQt(e,A){HwA(e)&&(qQt()||w4.push({content:e,options:A}),Cm.forEach(t=>{t.buildToast(e,A)}))}function WQt(e,A){Cm.forEach(t=>{A!=null&&A!=null&&A.containerId?A?.containerId===t.id&&t.toggle(e,A?.id):t.toggle(e,A?.id)})}function xje(e){const{subscribe:A,getSnapshot:t,setProps:i}=cA.useRef((function(o){const s=o.containerId||1;return{subscribe(r){const a=(function(c,I,l){let B=1,C=0,Q=[],u=[],E=[],p=I;const f=new Map,m=new Set,S=()=>{E=Array.from(f.values()),m.forEach(D=>D())},_=D=>{u=D==null?[]:u.filter(k=>k!==D),S()},v=D=>{const{toastId:k,onOpen:x,updateId:M,children:N}=D.props,T=M==null;D.staleId&&f.delete(D.staleId),f.set(k,D),u=[...u,D.props.toastId].filter(q=>q!==D.staleId),S(),l(KQt(D,T?"added":"updated")),T&&oD(x)&&x(cA.isValidElement(N)&&N.props)};return{id:c,props:p,observe:D=>(m.add(D),()=>m.delete(D)),toggle:(D,k)=>{f.forEach(x=>{k!=null&&k!==x.props.toastId||oD(x.toggle)&&x.toggle(D)})},removeToast:_,toasts:f,clearQueue:()=>{C-=Q.length,Q=[]},buildToast:(D,k)=>{if((rA=>{let{containerId:IA,toastId:DA,updateId:bA}=rA;const HA=IA?IA!==c:c!==1,JA=f.has(DA)&&bA==null;return HA||JA})(k))return;const{toastId:x,updateId:M,data:N,staleId:T,delay:q}=k,P=()=>{_(x)},V=M==null;V&&C++;const z={...p,style:p.toastStyle,key:B++,...Object.fromEntries(Object.entries(k).filter(rA=>{let[IA,DA]=rA;return DA!=null})),toastId:x,updateId:M,data:N,closeToast:P,isIn:!1,className:zj(k.className||p.toastClassName),bodyClassName:zj(k.bodyClassName||p.bodyClassName),progressClassName:zj(k.progressClassName||p.progressClassName),autoClose:!k.isLoading&&(oA=k.autoClose,gA=p.autoClose,oA===!1||m4(oA)&&oA>0?oA:gA),deleteToast(){const rA=f.get(x),{onClose:IA,children:DA}=rA.props;oD(IA)&&IA(cA.isValidElement(DA)&&DA.props),l(KQt(rA,"removed")),f.delete(x),C--,C<0&&(C=0),Q.length>0?v(Q.shift()):S()}};var oA,gA;z.closeButton=p.closeButton,k.closeButton===!1||HwA(k.closeButton)?z.closeButton=k.closeButton:k.closeButton===!0&&(z.closeButton=!HwA(p.closeButton)||p.closeButton);let QA=D;cA.isValidElement(D)&&!zF(D.type)?QA=cA.cloneElement(D,{closeToast:P,toastProps:z,data:N}):oD(D)&&(QA=D({closeToast:P,toastProps:z,data:N}));const tA={content:QA,props:z,staleId:T};p.limit&&p.limit>0&&C>p.limit&&V?Q.push(tA):m4(q)?setTimeout(()=>{v(tA)},q):v(tA)},setProps(D){p=D},setToggle:(D,k)=>{f.get(D).toggle=k},isToastActive:D=>u.some(k=>k===D),getSnapshot:()=>E}})(s,o,_je);Cm.set(s,a);const g=a.observe(r);return w4.forEach(c=>OQt(c.content,c.options)),w4=[],()=>{g(),Cm.delete(s)}},setProps(r){var a;(a=Cm.get(s))==null||a.setProps(r)},getSnapshot(){var r;return(r=Cm.get(s))==null?void 0:r.getSnapshot()}}})(e)).current;i(e);const n=cA.useSyncExternalStore(A,t,t);return{getToastToRender:function(o){if(!n)return[];const s=new Map;return e.newestOnTop&&n.reverse(),n.forEach(r=>{const{position:a}=r.props;s.has(a)||s.set(a,[]),s.get(a).push(r)}),Array.from(s,r=>o(r[0],r[1]))},isToastActive:PQt,count:n?.length}}function bje(e){const[A,t]=cA.useState(!1),[i,n]=cA.useState(!1),o=cA.useRef(null),s=cA.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:r,pauseOnHover:a,closeToast:g,onClick:c,closeOnClick:I}=e;var l,B;function C(){t(!0)}function Q(){t(!1)}function u(f){const m=o.current;s.canDrag&&m&&(s.didMove=!0,A&&Q(),s.delta=e.draggableDirection==="x"?f.clientX-s.start:f.clientY-s.start,s.start!==f.clientX&&(s.canCloseOnClick=!1),m.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,m.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function E(){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",E);const f=o.current;if(s.canDrag&&s.didMove&&f){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return n(!0),e.closeToast(),void e.collapseAll();f.style.transition="transform 0.2s, opacity 0.2s",f.style.removeProperty("transform"),f.style.removeProperty("opacity")}}(B=Cm.get((l={id:e.toastId,containerId:e.containerId,fn:t}).containerId||1))==null||B.setToggle(l.id,l.fn),cA.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||Q(),window.addEventListener("focus",C),window.addEventListener("blur",Q),()=>{window.removeEventListener("focus",C),window.removeEventListener("blur",Q)}},[e.pauseOnFocusLoss]);const p={onPointerDown:function(f){if(e.draggable===!0||e.draggable===f.pointerType){s.didMove=!1,document.addEventListener("pointermove",u),document.addEventListener("pointerup",E);const m=o.current;s.canCloseOnClick=!0,s.canDrag=!0,m.style.transition="none",e.draggableDirection==="x"?(s.start=f.clientX,s.removalDistance=m.offsetWidth*(e.draggablePercent/100)):(s.start=f.clientY,s.removalDistance=m.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(f){const{top:m,bottom:S,left:_,right:v}=o.current.getBoundingClientRect();f.nativeEvent.type!=="touchend"&&e.pauseOnHover&&f.clientX>=_&&f.clientX<=v&&f.clientY>=m&&f.clientY<=S?Q():C()}};return r&&a&&(p.onMouseEnter=Q,e.stacked||(p.onMouseLeave=C)),I&&(p.onClick=f=>{c&&c(f),s.canCloseOnClick&&g()}),{playToast:C,pauseToast:Q,isRunning:A,preventExitTransition:i,toastRef:o,eventHandlers:p}}function Sje(e){let{delay:A,isRunning:t,closeToast:i,type:n="default",hide:o,className:s,style:r,controlledProgress:a,progress:g,rtl:c,isIn:I,theme:l}=e;const B=o||a&&g===0,C={...r,animationDuration:`${A}ms`,animationPlayState:t?"running":"paused"};a&&(C.transform=`scaleX(${g})`);const Q=R_("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${n}`,{"Toastify__progress-bar--rtl":c}),u=oD(s)?s({rtl:c,type:n,defaultClassName:Q}):R_(Q,s),E={[a&&g>=1?"onTransitionEnd":"onAnimationEnd"]:a&&g<1?null:()=>{I&&i()}};return vo.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":B},vo.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${n}`}),vo.createElement("div",{role:"progressbar","aria-hidden":B?"true":"false","aria-label":"notification timer",className:u,style:C,...E}))}let vje=1;const ZQt=()=>""+vje++;function kje(e){return e&&(zF(e.toastId)||m4(e.toastId))?e.toastId:ZQt()}function D4(e,A){return OQt(e,A),A.toastId}function $j(e,A){return{...A,type:A&&A.type||e,toastId:kje(A)}}function Az(e){return(A,t)=>D4(A,$j(e,t))}function nh(e,A){return D4(e,$j("default",A))}nh.loading=(e,A)=>D4(e,$j("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...A})),nh.promise=function(e,A,t){let i,{pending:n,error:o,success:s}=A;n&&(i=zF(n)?nh.loading(n,t):nh.loading(n.render,{...t,...n}));const r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(c,I,l)=>{if(I==null)return void nh.dismiss(i);const B={type:c,...r,...t,data:l},C=zF(I)?{render:I}:I;return i?nh.update(i,{...B,...C}):nh(C.render,{...B,...C}),l},g=oD(e)?e():e;return g.then(c=>a("success",s,c)).catch(c=>a("error",o,c)),g},nh.success=Az("success"),nh.info=Az("info"),nh.error=Az("error"),nh.warning=Az("warning"),nh.warn=nh.warning,nh.dark=(e,A)=>D4(e,$j("default",{theme:"dark",...A})),nh.dismiss=function(e){(function(A){var t;if(qQt()){if(A==null||zF(t=A)||m4(t))Cm.forEach(i=>{i.removeToast(A)});else if(A&&("containerId"in A||"id"in A)){const i=Cm.get(A.containerId);i?i.removeToast(A.id):Cm.forEach(n=>{n.removeToast(A.id)})}}else w4=w4.filter(i=>A!=null&&i.options.toastId!==A)})(e)},nh.clearWaitingQueue=function(e){e===void 0&&(e={}),Cm.forEach(A=>{!A.props.limit||e.containerId&&A.id!==e.containerId||A.clearQueue()})},nh.isActive=PQt,nh.update=function(e,A){A===void 0&&(A={});const t=((i,n)=>{var o;let{containerId:s}=n;return(o=Cm.get(s||1))==null?void 0:o.toasts.get(i)})(e,A);if(t){const{props:i,content:n}=t,o={delay:100,...i,...A,toastId:A.toastId||e,updateId:ZQt()};o.toastId!==e&&(o.staleId=e);const s=o.render||n;delete o.render,D4(s,o)}},nh.done=e=>{nh.update(e,{progress:1})},nh.onChange=function(e){return YwA.add(e),()=>{YwA.delete(e)}},nh.play=e=>WQt(!0,e),nh.pause=e=>WQt(!1,e);const Rje=typeof window<"u"?cA.useLayoutEffect:cA.useEffect,tz=e=>{let{theme:A,type:t,isLoading:i,...n}=e;return vo.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:A==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...n})},JwA={info:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return vo.createElement(tz,{...e},vo.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return vo.createElement("div",{className:"Toastify__spinner"})}},Fje=e=>{const{isRunning:A,preventExitTransition:t,toastRef:i,eventHandlers:n,playToast:o}=bje(e),{closeButton:s,children:r,autoClose:a,onClick:g,type:c,hideProgressBar:I,closeToast:l,transition:B,position:C,className:Q,style:u,bodyClassName:E,bodyStyle:p,progressClassName:f,progressStyle:m,updateId:S,role:_,progress:v,rtl:D,toastId:k,deleteToast:x,isIn:M,isLoading:N,closeOnClick:T,theme:q}=e,P=R_("Toastify__toast",`Toastify__toast-theme--${q}`,`Toastify__toast--${c}`,{"Toastify__toast--rtl":D},{"Toastify__toast--close-on-click":T}),V=oD(Q)?Q({rtl:D,position:C,type:c,defaultClassName:P}):R_(P,Q),z=(function(tA){let{theme:rA,type:IA,isLoading:DA,icon:bA}=tA,HA=null;const JA={theme:rA,type:IA};return bA===!1||(oD(bA)?HA=bA({...JA,isLoading:DA}):cA.isValidElement(bA)?HA=cA.cloneElement(bA,JA):DA?HA=JwA.spinner():(GA=>GA in JwA)(IA)&&(HA=JwA[IA](JA))),HA})(e),oA=!!v||!a,gA={closeToast:l,type:c,theme:q};let QA=null;return s===!1||(QA=oD(s)?s(gA):cA.isValidElement(s)?cA.cloneElement(s,gA):(function(tA){let{closeToast:rA,theme:IA,ariaLabel:DA="close"}=tA;return vo.createElement("button",{className:`Toastify__close-button Toastify__close-button--${IA}`,type:"button",onClick:bA=>{bA.stopPropagation(),rA(bA)},"aria-label":DA},vo.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},vo.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))})(gA)),vo.createElement(B,{isIn:M,done:x,position:C,preventExitTransition:t,nodeRef:i,playToast:o},vo.createElement("div",{id:k,onClick:g,"data-in":M,className:V,...n,style:u,ref:i},vo.createElement("div",{...M&&{role:_},className:oD(E)?E({type:c}):R_("Toastify__toast-body",E),style:p},z!=null&&vo.createElement("div",{className:R_("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},z),vo.createElement("div",null,r)),QA,vo.createElement(Sje,{...S&&!oA?{key:`pb-${S}`}:{},rtl:D,theme:q,delay:a,isRunning:A,isIn:M,closeToast:l,hide:I,type:c,style:m,className:f,controlledProgress:oA,progress:v||0})))},ez=function(e,A){return A===void 0&&(A=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:A}},Nje=Xj(ez("bounce",!0));Xj(ez("slide",!0)),Xj(ez("zoom")),Xj(ez("flip"));const Gje={position:"top-right",transition:Nje,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Mje(e){let A={...Gje,...e};const t=e.stacked,[i,n]=cA.useState(!0),o=cA.useRef(null),{getToastToRender:s,isToastActive:r,count:a}=xje(A),{className:g,style:c,rtl:I,containerId:l}=A;function B(Q){const u=R_("Toastify__toast-container",`Toastify__toast-container--${Q}`,{"Toastify__toast-container--rtl":I});return oD(g)?g({position:Q,rtl:I,defaultClassName:u}):R_(u,zj(g))}function C(){t&&(n(!0),nh.play())}return Rje(()=>{if(t){var Q;const u=o.current.querySelectorAll('[data-in="true"]'),E=12,p=(Q=A.position)==null?void 0:Q.includes("top");let f=0,m=0;Array.from(u).reverse().forEach((S,_)=>{const v=S;v.classList.add("Toastify__toast--stacked"),_>0&&(v.dataset.collapsed=`${i}`),v.dataset.pos||(v.dataset.pos=p?"top":"bot");const D=f*(i?.2:1)+(i?0:E*_);v.style.setProperty("--y",`${p?D:-1*D}px`),v.style.setProperty("--g",`${E}`),v.style.setProperty("--s",""+(1-(i?m:0))),f+=v.offsetHeight,m+=.025})}},[i,a,t]),vo.createElement("div",{ref:o,className:"Toastify",id:l,onMouseEnter:()=>{t&&(n(!1),nh.pause())},onMouseLeave:C},s((Q,u)=>{const E=u.length?{...c}:{...c,pointerEvents:"none"};return vo.createElement("div",{className:B(Q),style:E,key:`container-${Q}`},u.map(p=>{let{content:f,props:m}=p;return vo.createElement(Fje,{...m,stacked:t,collapseAll:C,isIn:r(m.toastId,m.containerId),style:m.style,key:`toast-${m.key}`},f)}))}))}function Lje(){var e=':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}',A=document.createElement("style");A.innerText=e,document.head.appendChild(A)}function Uje(e,A,t){const i=(t.x-A.x)**2+(t.y-A.y)**2;if(i===0)return VQt(e,A);let n=((e.x-A.x)*(t.x-A.x)+(e.y-A.y)*(t.y-A.y))/i;n=Math.max(0,Math.min(1,n));const o={x:A.x+n*(t.x-A.x),y:A.y+n*(t.y-A.y)};return VQt(e,o)}function VQt(e,A){const t=e.x-A.x,i=e.y-A.y;return Math.sqrt(t*t+i*i)}const Hje=XUt(z3t);var TwA,jQt;function Yje(){if(jQt)return TwA;jQt=1;var e=Object.defineProperty,A=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,n=(u,E)=>{for(var p in E)e(u,p,{get:E[p],enumerable:!0})},o=(u,E,p,f)=>{if(E&&typeof E=="object"||typeof E=="function")for(let m of t(E))!i.call(u,m)&&m!==p&&e(u,m,{get:()=>E[m],enumerable:!(f=A(E,m))||f.enumerable});return u},s=u=>o(e({},"__esModule",{value:!0}),u),r={};n(r,{SuperGrid:()=>Q,toMMSI:()=>C,toMeterSI:()=>B}),TwA=s(r);var a=Uw(),g=Hje,c=JMA(),I=(u,E,p)=>{const f=[];if(E<u)for(let m=u;m>=E;m-=Math.abs(p))f.push(m);else for(let m=u;m<=E;m+=Math.abs(p))f.push(m);return f};function l(u,E){return{x:Math.round(E.x/u)*u,y:Math.round(E.y/u)*u}}function B(u,E=1){return u<0?"-"+B(-u):u<1e-6?"0m":u>1e3?Math.floor(u/1e3)+"km":u>1&&E>1?Math.round(u)+"m":u>1&&E<=1?u.toFixed(Math.ceil(-Math.log10(E)))+"m":u<1&&E>=1/1e3?Math.round(u*1e3)+"mm":u<1&&E<1/1e3?(u*1e3).toFixed(Math.ceil(-Math.log10(E*1e3)))+"mm":""}function C(u,E=1){return B(u/1e3,E/1e3)}var Q=u=>{var E;const p=(0,a.useRef)(null),[f,m]=(0,a.useState)({x:0,y:0}),{majorColor:S="rgba(0,0,0,0.2)",minorColor:_="rgba(0,0,0,0.1)",textColor:v=(E=u.majorColor)!=null?E:"rgba(0,0,0,0.5)",width:D,height:k,screenSpaceCellSize:x=200,stringifyCoord:M=(P,V,z)=>`${B(P,z)}, ${B(V,z)}`}=u,N=Math.ceil(D/x)+2,T=Math.ceil(k/x)+2;(0,a.useEffect)(()=>{if(!p.current)return;const P=p.current.getContext("2d");if(!P)return;const V=x/10**Math.floor(Math.log10(u.transform.a)),z=u.transform.d<0?-1:1,gA=x/10**Math.log10(u.transform.a)/V;function QA(mA,fA,ZA){const tt=mA;let at,vA,FA;for(at=fA.x;at<=ZA.x;at+=tt)vA=(0,g.applyToPoint)(u.transform,{x:at,y:fA.y}),FA=(0,g.applyToPoint)(u.transform,{x:at,y:ZA.y}),P.beginPath(),P.moveTo(vA.x,vA.y),P.lineTo(FA.x,FA.y),P.stroke();const dA=I(fA.y,ZA.y,tt*z);for(const uA of dA)vA=(0,g.applyToPoint)(u.transform,{x:fA.x,y:uA}),FA=(0,g.applyToPoint)(u.transform,{x:ZA.x,y:uA}),P.beginPath(),P.moveTo(vA.x,vA.y),P.lineTo(FA.x,FA.y),P.stroke()}function tA(mA,fA,ZA){const tt=mA;let at;for(at=fA.x;at<=ZA.x;at+=tt)for(const vA of I(fA.y,ZA.y,tt*z)){const FA=(0,g.applyToPoint)(u.transform,{x:at,y:vA});P.fillStyle=v,P.font="12px sans-serif",P.fillText(M(at,vA,mA),FA.x+2,FA.y-2)}}P.clearRect(0,0,D,k);const rA=(0,g.applyToPoint)((0,g.inverse)(u.transform),{x:0,y:0}),IA={x:Math.floor((rA.x-V)/V)*V,y:Math.floor((rA.y-V)/V+(z==-1?2:0))*V},DA={x:IA.x+V*N,y:IA.y+V*T*z},HA=V*5,JA={x:Math.floor((rA.x-HA)/HA)*HA,y:Math.floor((rA.y-HA)/HA+(z==-1?2:0))*HA},GA={x:JA.x+HA*N,y:JA.y+HA*T*z};P.globalAlpha=1,P.strokeStyle=S,QA(V,IA,DA),tA(HA,JA,GA),P.globalAlpha=1-gA,QA(HA/10,JA,GA),P.globalAlpha=1-gA,P.strokeStyle=_,QA(V/10,IA,DA),P.globalAlpha=Math.max(((1-gA)*10-5)/5,0),tA(HA/10,JA,GA),P.globalAlpha=1;const aA=(0,g.applyToPoint)(u.transform,f);P.font="12px sans-serif",P.fillStyle=v,P.fillText(M(f.x,f.y,V),aA.x+2,aA.y-2),P.strokeStyle=S,P.strokeRect(aA.x-5,aA.y-5,10,10)},[p,u.transform,f,D,k]);const q=P=>{if(!p.current)return;const V=x/10/10**Math.floor(Math.log10(u.transform.a)),z=p.current.getBoundingClientRect(),oA=(0,g.applyToPoint)((0,g.inverse)(u.transform),{x:P.clientX-z.left,y:P.clientY-z.top}),gA=l(V,oA);m(gA)};return(0,c.jsx)("canvas",{onMouseUp:P=>{P.button===1&&q(P)},onDoubleClick:q,ref:p,width:u.width,height:u.height})};return TwA}var KwA=Yje(),qwA={exports:{}},PwA,zQt;function XQt(){return zQt||(zQt=1,PwA={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),PwA}var OwA={exports:{}},WwA,$Qt;function Jje(){return $Qt||($Qt=1,WwA=function(A){return!A||typeof A=="string"?!1:A instanceof Array||Array.isArray(A)||A.length>=0&&(A.splice instanceof Function||Object.getOwnPropertyDescriptor(A,A.length-1)&&A.constructor.name!=="String")}),WwA}var Aut;function Tje(){if(Aut)return OwA.exports;Aut=1;var e=Jje(),A=Array.prototype.concat,t=Array.prototype.slice,i=OwA.exports=function(o){for(var s=[],r=0,a=o.length;r<a;r++){var g=o[r];e(g)?s=A.call(s,t.call(g)):s.push(g)}return s};return i.wrap=function(n){return function(){return n(i(arguments))}},OwA.exports}var tut;function Kje(){if(tut)return qwA.exports;tut=1;var e=XQt(),A=Tje(),t=Object.hasOwnProperty,i=Object.create(null);for(var n in e)t.call(e,n)&&(i[e[n]]=n);var o=qwA.exports={to:{},get:{}};o.get=function(a){var g=a.substring(0,3).toLowerCase(),c,I;switch(g){case"hsl":c=o.get.hsl(a),I="hsl";break;case"hwb":c=o.get.hwb(a),I="hwb";break;default:c=o.get.rgb(a),I="rgb";break}return c?{model:I,value:c}:null},o.get.rgb=function(a){if(!a)return null;var g=/^#([a-f0-9]{3,4})$/i,c=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,I=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,l=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,B=/^(\w+)$/,C=[0,0,0,1],Q,u,E;if(Q=a.match(c)){for(E=Q[2],Q=Q[1],u=0;u<3;u++){var p=u*2;C[u]=parseInt(Q.slice(p,p+2),16)}E&&(C[3]=parseInt(E,16)/255)}else if(Q=a.match(g)){for(Q=Q[1],E=Q[3],u=0;u<3;u++)C[u]=parseInt(Q[u]+Q[u],16);E&&(C[3]=parseInt(E+E,16)/255)}else if(Q=a.match(I)){for(u=0;u<3;u++)C[u]=parseInt(Q[u+1],0);Q[4]&&(Q[5]?C[3]=parseFloat(Q[4])*.01:C[3]=parseFloat(Q[4]))}else if(Q=a.match(l)){for(u=0;u<3;u++)C[u]=Math.round(parseFloat(Q[u+1])*2.55);Q[4]&&(Q[5]?C[3]=parseFloat(Q[4])*.01:C[3]=parseFloat(Q[4]))}else return(Q=a.match(B))?Q[1]==="transparent"?[0,0,0,0]:t.call(e,Q[1])?(C=e[Q[1]],C[3]=1,C):null:null;for(u=0;u<3;u++)C[u]=s(C[u],0,255);return C[3]=s(C[3],0,1),C},o.get.hsl=function(a){if(!a)return null;var g=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,c=a.match(g);if(c){var I=parseFloat(c[4]),l=(parseFloat(c[1])%360+360)%360,B=s(parseFloat(c[2]),0,100),C=s(parseFloat(c[3]),0,100),Q=s(isNaN(I)?1:I,0,1);return[l,B,C,Q]}return null},o.get.hwb=function(a){if(!a)return null;var g=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,c=a.match(g);if(c){var I=parseFloat(c[4]),l=(parseFloat(c[1])%360+360)%360,B=s(parseFloat(c[2]),0,100),C=s(parseFloat(c[3]),0,100),Q=s(isNaN(I)?1:I,0,1);return[l,B,C,Q]}return null},o.to.hex=function(){var a=A(arguments);return"#"+r(a[0])+r(a[1])+r(a[2])+(a[3]<1?r(Math.round(a[3]*255)):"")},o.to.rgb=function(){var a=A(arguments);return a.length<4||a[3]===1?"rgb("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+")":"rgba("+Math.round(a[0])+", "+Math.round(a[1])+", "+Math.round(a[2])+", "+a[3]+")"},o.to.rgb.percent=function(){var a=A(arguments),g=Math.round(a[0]/255*100),c=Math.round(a[1]/255*100),I=Math.round(a[2]/255*100);return a.length<4||a[3]===1?"rgb("+g+"%, "+c+"%, "+I+"%)":"rgba("+g+"%, "+c+"%, "+I+"%, "+a[3]+")"},o.to.hsl=function(){var a=A(arguments);return a.length<4||a[3]===1?"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)":"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+a[3]+")"},o.to.hwb=function(){var a=A(arguments),g="";return a.length>=4&&a[3]!==1&&(g=", "+a[3]),"hwb("+a[0]+", "+a[1]+"%, "+a[2]+"%"+g+")"},o.to.keyword=function(a){return i[a.slice(0,3)]};function s(a,g,c){return Math.min(Math.max(g,a),c)}function r(a){var g=Math.round(a).toString(16).toUpperCase();return g.length<2?"0"+g:g}return qwA.exports}var ZwA,eut;function iut(){if(eut)return ZwA;eut=1;const e=XQt(),A={};for(const n of Object.keys(e))A[e[n]]=n;const t={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};ZwA=t;for(const n of Object.keys(t)){if(!("channels"in t[n]))throw new Error("missing channels property: "+n);if(!("labels"in t[n]))throw new Error("missing channel labels property: "+n);if(t[n].labels.length!==t[n].channels)throw new Error("channel and label counts mismatch: "+n);const{channels:o,labels:s}=t[n];delete t[n].channels,delete t[n].labels,Object.defineProperty(t[n],"channels",{value:o}),Object.defineProperty(t[n],"labels",{value:s})}t.rgb.hsl=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.min(o,s,r),g=Math.max(o,s,r),c=g-a;let I,l;g===a?I=0:o===g?I=(s-r)/c:s===g?I=2+(r-o)/c:r===g&&(I=4+(o-s)/c),I=Math.min(I*60,360),I<0&&(I+=360);const B=(a+g)/2;return g===a?l=0:B<=.5?l=c/(g+a):l=c/(2-g-a),[I,l*100,B*100]},t.rgb.hsv=function(n){let o,s,r,a,g;const c=n[0]/255,I=n[1]/255,l=n[2]/255,B=Math.max(c,I,l),C=B-Math.min(c,I,l),Q=function(u){return(B-u)/6/C+1/2};return C===0?(a=0,g=0):(g=C/B,o=Q(c),s=Q(I),r=Q(l),c===B?a=r-s:I===B?a=1/3+o-r:l===B&&(a=2/3+s-o),a<0?a+=1:a>1&&(a-=1)),[a*360,g*100,B*100]},t.rgb.hwb=function(n){const o=n[0],s=n[1];let r=n[2];const a=t.rgb.hsl(n)[0],g=1/255*Math.min(o,Math.min(s,r));return r=1-1/255*Math.max(o,Math.max(s,r)),[a,g*100,r*100]},t.rgb.cmyk=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.min(1-o,1-s,1-r),g=(1-o-a)/(1-a)||0,c=(1-s-a)/(1-a)||0,I=(1-r-a)/(1-a)||0;return[g*100,c*100,I*100,a*100]};function i(n,o){return(n[0]-o[0])**2+(n[1]-o[1])**2+(n[2]-o[2])**2}return t.rgb.keyword=function(n){const o=A[n];if(o)return o;let s=1/0,r;for(const a of Object.keys(e)){const g=e[a],c=i(n,g);c<s&&(s=c,r=a)}return r},t.keyword.rgb=function(n){return e[n]},t.rgb.xyz=function(n){let o=n[0]/255,s=n[1]/255,r=n[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const a=o*.4124+s*.3576+r*.1805,g=o*.2126+s*.7152+r*.0722,c=o*.0193+s*.1192+r*.9505;return[a*100,g*100,c*100]},t.rgb.lab=function(n){const o=t.rgb.xyz(n);let s=o[0],r=o[1],a=o[2];s/=95.047,r/=100,a/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const g=116*r-16,c=500*(s-r),I=200*(r-a);return[g,c,I]},t.hsl.rgb=function(n){const o=n[0]/360,s=n[1]/100,r=n[2]/100;let a,g,c;if(s===0)return c=r*255,[c,c,c];r<.5?a=r*(1+s):a=r+s-r*s;const I=2*r-a,l=[0,0,0];for(let B=0;B<3;B++)g=o+1/3*-(B-1),g<0&&g++,g>1&&g--,6*g<1?c=I+(a-I)*6*g:2*g<1?c=a:3*g<2?c=I+(a-I)*(2/3-g)*6:c=I,l[B]=c*255;return l},t.hsl.hsv=function(n){const o=n[0];let s=n[1]/100,r=n[2]/100,a=s;const g=Math.max(r,.01);r*=2,s*=r<=1?r:2-r,a*=g<=1?g:2-g;const c=(r+s)/2,I=r===0?2*a/(g+a):2*s/(r+s);return[o,I*100,c*100]},t.hsv.rgb=function(n){const o=n[0]/60,s=n[1]/100;let r=n[2]/100;const a=Math.floor(o)%6,g=o-Math.floor(o),c=255*r*(1-s),I=255*r*(1-s*g),l=255*r*(1-s*(1-g));switch(r*=255,a){case 0:return[r,l,c];case 1:return[I,r,c];case 2:return[c,r,l];case 3:return[c,I,r];case 4:return[l,c,r];case 5:return[r,c,I]}},t.hsv.hsl=function(n){const o=n[0],s=n[1]/100,r=n[2]/100,a=Math.max(r,.01);let g,c;c=(2-s)*r;const I=(2-s)*a;return g=s*a,g/=I<=1?I:2-I,g=g||0,c/=2,[o,g*100,c*100]},t.hwb.rgb=function(n){const o=n[0]/360;let s=n[1]/100,r=n[2]/100;const a=s+r;let g;a>1&&(s/=a,r/=a);const c=Math.floor(6*o),I=1-r;g=6*o-c,(c&1)!==0&&(g=1-g);const l=s+g*(I-s);let B,C,Q;switch(c){default:case 6:case 0:B=I,C=l,Q=s;break;case 1:B=l,C=I,Q=s;break;case 2:B=s,C=I,Q=l;break;case 3:B=s,C=l,Q=I;break;case 4:B=l,C=s,Q=I;break;case 5:B=I,C=s,Q=l;break}return[B*255,C*255,Q*255]},t.cmyk.rgb=function(n){const o=n[0]/100,s=n[1]/100,r=n[2]/100,a=n[3]/100,g=1-Math.min(1,o*(1-a)+a),c=1-Math.min(1,s*(1-a)+a),I=1-Math.min(1,r*(1-a)+a);return[g*255,c*255,I*255]},t.xyz.rgb=function(n){const o=n[0]/100,s=n[1]/100,r=n[2]/100;let a,g,c;return a=o*3.2406+s*-1.5372+r*-.4986,g=o*-.9689+s*1.8758+r*.0415,c=o*.0557+s*-.204+r*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,a=Math.min(Math.max(0,a),1),g=Math.min(Math.max(0,g),1),c=Math.min(Math.max(0,c),1),[a*255,g*255,c*255]},t.xyz.lab=function(n){let o=n[0],s=n[1],r=n[2];o/=95.047,s/=100,r/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const a=116*s-16,g=500*(o-s),c=200*(s-r);return[a,g,c]},t.lab.xyz=function(n){const o=n[0],s=n[1],r=n[2];let a,g,c;g=(o+16)/116,a=s/500+g,c=g-r/200;const I=g**3,l=a**3,B=c**3;return g=I>.008856?I:(g-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,c=B>.008856?B:(c-16/116)/7.787,a*=95.047,g*=100,c*=108.883,[a,g,c]},t.lab.lch=function(n){const o=n[0],s=n[1],r=n[2];let a;a=Math.atan2(r,s)*360/2/Math.PI,a<0&&(a+=360);const c=Math.sqrt(s*s+r*r);return[o,c,a]},t.lch.lab=function(n){const o=n[0],s=n[1],a=n[2]/360*2*Math.PI,g=s*Math.cos(a),c=s*Math.sin(a);return[o,g,c]},t.rgb.ansi16=function(n,o=null){const[s,r,a]=n;let g=o===null?t.rgb.hsv(n)[2]:o;if(g=Math.round(g/50),g===0)return 30;let c=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(s/255));return g===2&&(c+=60),c},t.hsv.ansi16=function(n){return t.rgb.ansi16(t.hsv.rgb(n),n[2])},t.rgb.ansi256=function(n){const o=n[0],s=n[1],r=n[2];return o===s&&s===r?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5)},t.ansi16.rgb=function(n){let o=n%10;if(o===0||o===7)return n>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const s=(~~(n>50)+1)*.5,r=(o&1)*s*255,a=(o>>1&1)*s*255,g=(o>>2&1)*s*255;return[r,a,g]},t.ansi256.rgb=function(n){if(n>=232){const g=(n-232)*10+8;return[g,g,g]}n-=16;let o;const s=Math.floor(n/36)/5*255,r=Math.floor((o=n%36)/6)/5*255,a=o%6/5*255;return[s,r,a]},t.rgb.hex=function(n){const s=(((Math.round(n[0])&255)<<16)+((Math.round(n[1])&255)<<8)+(Math.round(n[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},t.hex.rgb=function(n){const o=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let s=o[0];o[0].length===3&&(s=s.split("").map(I=>I+I).join(""));const r=parseInt(s,16),a=r>>16&255,g=r>>8&255,c=r&255;return[a,g,c]},t.rgb.hcg=function(n){const o=n[0]/255,s=n[1]/255,r=n[2]/255,a=Math.max(Math.max(o,s),r),g=Math.min(Math.min(o,s),r),c=a-g;let I,l;return c<1?I=g/(1-c):I=0,c<=0?l=0:a===o?l=(s-r)/c%6:a===s?l=2+(r-o)/c:l=4+(o-s)/c,l/=6,l%=1,[l*360,c*100,I*100]},t.hsl.hcg=function(n){const o=n[1]/100,s=n[2]/100,r=s<.5?2*o*s:2*o*(1-s);let a=0;return r<1&&(a=(s-.5*r)/(1-r)),[n[0],r*100,a*100]},t.hsv.hcg=function(n){const o=n[1]/100,s=n[2]/100,r=o*s;let a=0;return r<1&&(a=(s-r)/(1-r)),[n[0],r*100,a*100]},t.hcg.rgb=function(n){const o=n[0]/360,s=n[1]/100,r=n[2]/100;if(s===0)return[r*255,r*255,r*255];const a=[0,0,0],g=o%1*6,c=g%1,I=1-c;let l=0;switch(Math.floor(g)){case 0:a[0]=1,a[1]=c,a[2]=0;break;case 1:a[0]=I,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=c;break;case 3:a[0]=0,a[1]=I,a[2]=1;break;case 4:a[0]=c,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=I}return l=(1-s)*r,[(s*a[0]+l)*255,(s*a[1]+l)*255,(s*a[2]+l)*255]},t.hcg.hsv=function(n){const o=n[1]/100,s=n[2]/100,r=o+s*(1-o);let a=0;return r>0&&(a=o/r),[n[0],a*100,r*100]},t.hcg.hsl=function(n){const o=n[1]/100,r=n[2]/100*(1-o)+.5*o;let a=0;return r>0&&r<.5?a=o/(2*r):r>=.5&&r<1&&(a=o/(2*(1-r))),[n[0],a*100,r*100]},t.hcg.hwb=function(n){const o=n[1]/100,s=n[2]/100,r=o+s*(1-o);return[n[0],(r-o)*100,(1-r)*100]},t.hwb.hcg=function(n){const o=n[1]/100,r=1-n[2]/100,a=r-o;let g=0;return a<1&&(g=(r-a)/(1-a)),[n[0],a*100,g*100]},t.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},t.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},t.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},t.gray.hsl=function(n){return[0,0,n[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(n){return[0,100,n[0]]},t.gray.cmyk=function(n){return[0,0,0,n[0]]},t.gray.lab=function(n){return[n[0],0,0]},t.gray.hex=function(n){const o=Math.round(n[0]/100*255)&255,r=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(r.length)+r},t.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]},ZwA}var VwA,nut;function qje(){if(nut)return VwA;nut=1;const e=iut();function A(){const o={},s=Object.keys(e);for(let r=s.length,a=0;a<r;a++)o[s[a]]={distance:-1,parent:null};return o}function t(o){const s=A(),r=[o];for(s[o].distance=0;r.length;){const a=r.pop(),g=Object.keys(e[a]);for(let c=g.length,I=0;I<c;I++){const l=g[I],B=s[l];B.distance===-1&&(B.distance=s[a].distance+1,B.parent=a,r.unshift(l))}}return s}function i(o,s){return function(r){return s(o(r))}}function n(o,s){const r=[s[o].parent,o];let a=e[s[o].parent][o],g=s[o].parent;for(;s[g].parent;)r.unshift(s[g].parent),a=i(e[s[g].parent][g],a),g=s[g].parent;return a.conversion=r,a}return VwA=function(o){const s=t(o),r={},a=Object.keys(s);for(let g=a.length,c=0;c<g;c++){const I=a[c];s[I].parent!==null&&(r[I]=n(I,s))}return r},VwA}var jwA,out;function Pje(){if(out)return jwA;out=1;const e=iut(),A=qje(),t={},i=Object.keys(e);function n(s){const r=function(...a){const g=a[0];return g==null?g:(g.length>1&&(a=g),s(a))};return"conversion"in s&&(r.conversion=s.conversion),r}function o(s){const r=function(...a){const g=a[0];if(g==null)return g;g.length>1&&(a=g);const c=s(a);if(typeof c=="object")for(let I=c.length,l=0;l<I;l++)c[l]=Math.round(c[l]);return c};return"conversion"in s&&(r.conversion=s.conversion),r}return i.forEach(s=>{t[s]={},Object.defineProperty(t[s],"channels",{value:e[s].channels}),Object.defineProperty(t[s],"labels",{value:e[s].labels});const r=A(s);Object.keys(r).forEach(g=>{const c=r[g];t[s][g]=o(c),t[s][g].raw=n(c)})}),jwA=t,jwA}var zwA,sut;function Oje(){if(sut)return zwA;sut=1;const e=Kje(),A=Pje(),t=["keyword","gray","hex"],i={};for(const l of Object.keys(A))i[[...A[l].labels].sort().join("")]=l;const n={};function o(l,B){if(!(this instanceof o))return new o(l,B);if(B&&B in t&&(B=null),B&&!(B in A))throw new Error("Unknown model: "+B);let C,Q;if(l==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(l instanceof o)this.model=l.model,this.color=[...l.color],this.valpha=l.valpha;else if(typeof l=="string"){const u=e.get(l);if(u===null)throw new Error("Unable to parse color from string: "+l);this.model=u.model,Q=A[this.model].channels,this.color=u.value.slice(0,Q),this.valpha=typeof u.value[Q]=="number"?u.value[Q]:1}else if(l.length>0){this.model=B||"rgb",Q=A[this.model].channels;const u=Array.prototype.slice.call(l,0,Q);this.color=I(u,Q),this.valpha=typeof l[Q]=="number"?l[Q]:1}else if(typeof l=="number")this.model="rgb",this.color=[l>>16&255,l>>8&255,l&255],this.valpha=1;else{this.valpha=1;const u=Object.keys(l);"alpha"in l&&(u.splice(u.indexOf("alpha"),1),this.valpha=typeof l.alpha=="number"?l.alpha:0);const E=u.sort().join("");if(!(E in i))throw new Error("Unable to parse color from object: "+JSON.stringify(l));this.model=i[E];const{labels:p}=A[this.model],f=[];for(C=0;C<p.length;C++)f.push(l[p[C]]);this.color=I(f)}if(n[this.model])for(Q=A[this.model].channels,C=0;C<Q;C++){const u=n[this.model][C];u&&(this.color[C]=u(this.color[C]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(l){let B=this.model in e.to?this:this.rgb();B=B.round(typeof l=="number"?l:1);const C=B.valpha===1?B.color:[...B.color,this.valpha];return e.to[B.model](C)},percentString(l){const B=this.rgb().round(typeof l=="number"?l:1),C=B.valpha===1?B.color:[...B.color,this.valpha];return e.to.rgb.percent(C)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const l={},{channels:B}=A[this.model],{labels:C}=A[this.model];for(let Q=0;Q<B;Q++)l[C[Q]]=this.color[Q];return this.valpha!==1&&(l.alpha=this.valpha),l},unitArray(){const l=this.rgb().color;return l[0]/=255,l[1]/=255,l[2]/=255,this.valpha!==1&&l.push(this.valpha),l},unitObject(){const l=this.rgb().object();return l.r/=255,l.g/=255,l.b/=255,this.valpha!==1&&(l.alpha=this.valpha),l},round(l){return l=Math.max(l||0,0),new o([...this.color.map(r(l)),this.valpha],this.model)},alpha(l){return l!==void 0?new o([...this.color,Math.max(0,Math.min(1,l))],this.model):this.valpha},red:a("rgb",0,g(255)),green:a("rgb",1,g(255)),blue:a("rgb",2,g(255)),hue:a(["hsl","hsv","hsl","hwb","hcg"],0,l=>(l%360+360)%360),saturationl:a("hsl",1,g(100)),lightness:a("hsl",2,g(100)),saturationv:a("hsv",1,g(100)),value:a("hsv",2,g(100)),chroma:a("hcg",1,g(100)),gray:a("hcg",2,g(100)),white:a("hwb",1,g(100)),wblack:a("hwb",2,g(100)),cyan:a("cmyk",0,g(100)),magenta:a("cmyk",1,g(100)),yellow:a("cmyk",2,g(100)),black:a("cmyk",3,g(100)),x:a("xyz",0,g(95.047)),y:a("xyz",1,g(100)),z:a("xyz",2,g(108.833)),l:a("lab",0,g(100)),a:a("lab",1),b:a("lab",2),keyword(l){return l!==void 0?new o(l):A[this.model].keyword(this.color)},hex(l){return l!==void 0?new o(l):e.to.hex(this.rgb().round().color)},hexa(l){if(l!==void 0)return new o(l);const B=this.rgb().round().color;let C=Math.round(this.valpha*255).toString(16).toUpperCase();return C.length===1&&(C="0"+C),e.to.hex(B)+C},rgbNumber(){const l=this.rgb().color;return(l[0]&255)<<16|(l[1]&255)<<8|l[2]&255},luminosity(){const l=this.rgb().color,B=[];for(const[C,Q]of l.entries()){const u=Q/255;B[C]=u<=.04045?u/12.92:((u+.055)/1.055)**2.4}return .2126*B[0]+.7152*B[1]+.0722*B[2]},contrast(l){const B=this.luminosity(),C=l.luminosity();return B>C?(B+.05)/(C+.05):(C+.05)/(B+.05)},level(l){const B=this.contrast(l);return B>=7?"AAA":B>=4.5?"AA":""},isDark(){const l=this.rgb().color;return(l[0]*2126+l[1]*7152+l[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const l=this.rgb();for(let B=0;B<3;B++)l.color[B]=255-l.color[B];return l},lighten(l){const B=this.hsl();return B.color[2]+=B.color[2]*l,B},darken(l){const B=this.hsl();return B.color[2]-=B.color[2]*l,B},saturate(l){const B=this.hsl();return B.color[1]+=B.color[1]*l,B},desaturate(l){const B=this.hsl();return B.color[1]-=B.color[1]*l,B},whiten(l){const B=this.hwb();return B.color[1]+=B.color[1]*l,B},blacken(l){const B=this.hwb();return B.color[2]+=B.color[2]*l,B},grayscale(){const l=this.rgb().color,B=l[0]*.3+l[1]*.59+l[2]*.11;return o.rgb(B,B,B)},fade(l){return this.alpha(this.valpha-this.valpha*l)},opaquer(l){return this.alpha(this.valpha+this.valpha*l)},rotate(l){const B=this.hsl();let C=B.color[0];return C=(C+l)%360,C=C<0?360+C:C,B.color[0]=C,B},mix(l,B){if(!l||!l.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof l);const C=l.rgb(),Q=this.rgb(),u=B===void 0?.5:B,E=2*u-1,p=C.alpha()-Q.alpha(),f=((E*p===-1?E:(E+p)/(1+E*p))+1)/2,m=1-f;return o.rgb(f*C.red()+m*Q.red(),f*C.green()+m*Q.green(),f*C.blue()+m*Q.blue(),C.alpha()*u+Q.alpha()*(1-u))}};for(const l of Object.keys(A)){if(t.includes(l))continue;const{channels:B}=A[l];o.prototype[l]=function(...C){return this.model===l?new o(this):C.length>0?new o(C,l):new o([...c(A[this.model][l].raw(this.color)),this.valpha],l)},o[l]=function(...C){let Q=C[0];return typeof Q=="number"&&(Q=I(C,B)),new o(Q,l)}}function s(l,B){return Number(l.toFixed(B))}function r(l){return function(B){return s(B,l)}}function a(l,B,C){l=Array.isArray(l)?l:[l];for(const Q of l)(n[Q]||(n[Q]=[]))[B]=C;return l=l[0],function(Q){let u;return Q!==void 0?(C&&(Q=C(Q)),u=this[l](),u.color[B]=Q,u):(u=this[l]().color[B],C&&(u=C(u)),u)}}function g(l){return function(B){return Math.max(0,Math.min(l,B))}}function c(l){return Array.isArray(l)?l:[l]}function I(l,B){for(let C=0;C<B;C++)typeof l[C]!="number"&&(l[C]=0);return l}return zwA=o,zwA}var Wje=Oje();const rut=Lw(Wje);var aut={0:"M0.4544564813877358 0L0.2723441540828736 0.03592830447352719L0.1086847233315459 0.14528754990019965L0.020630545837255005 0.3040632652221331L0 0.5395277421960205L0.049259221760993496 0.7369487828466779L0.18080513776237842 0.9005494166306564L0.37036887043974215 0.9872116270037247L0.5864663759301132 1L0.8148695622827444 0.9332890276148733L0.9326583645506394 0.8113052246023419L1 0.4031281830668562L0.833288960385582 0.09886798567812842L0.6801767918233781 0.02483708485091681L0.4544564813877358 0",1:"M 0.16 0.27 L 0.5 0 L 0.5 1",2:"M0.069593147751606 0.19461498231706575L0.1039380353319058 0.1224291500164194L0.20543361884368308 0.05510832064153169L0.3717712794432549 0.009452970962689482L0.4785344452623127 0L0.663238590738758 0.008714098643339864L0.8017933618843684 0.04769189395915288L0.8775637379550322 0.10746757678258442L0.9047778372591005 0.17693069668193287L0.9029710920770878 0.2231347105796246L0.8704496788008566 0.30047744598157516L0.7292906538577354 0.4508486051631194L0.3737955032119913 0.7369006417749693L0 1L1 1",3:"M0.03917438899874637 0.19855364635107545L0.15510940508963084 0.06745632622133718L0.37598645522339846 0L0.8486391893813088 0.0652271323161611L0.9782182415054349 0.21747394183735683L0.9213133780517754 0.3547560290117714L0.6504271515903481 0.4543436297681271L0.22975249764129613 0.48476611625264143L0.7659038682744629 0.5411919558122493L0.9258712987734741 0.6203185665660985L1 0.7458360609169667L0.8938813281118737 0.9059190913045964L0.6166890258875837 1L0.261528440153542 0.9874861530507921L0 0.8837289530851273",4:"M0.7328897338403042 0L0 0.6684672518568535L1 0.6684672518568535M0.7243346007604563 0.4530722484807562L0.7243346007604563 1",5:"M 0 0 L 0 0.4973 L 0.4262 0.4319 L 0.7305 0.4565 L 0.8516 0.5009 L 0.9357 0.5639 L 1 0.7356 L 0.9696 0.8248 L 0.8898 0.895 L 0.733 0.9602 L 0.5518 0.9945 L 0.3814 1 L 0.2379 0.9821 L 0.1219 0.947 L 0 0.8748 M 0 0 L 1 0",6:"M0.6964601700926856 0L0.3639239026215478 0.0743562375769351L0.1415931962925719 0.21735490179786915L0.009977939399608712 0.46336322325406004L0.00029622007592593224 0.7083131475173043L0.09408885043224748 0.8746809149767036L0.3379247445101846 0.9876686500961888L0.7109203869569624 1L0.9260852957913362 0.9103558029693921L1 0.7716571969091733L0.9824294723385016 0.6390635485705886L0.7446504992867332 0.4733643097729175L0.31028858071607296 0.47578021640899115L0.1208702146816024 0.5481452483973847L0 0.6616669755788906",7:"M0 0L1 0L0.9246479649697582 0.030539772727272752L0.8850302419354837 0.05075757575757579L0.7922946068548385 0.11079545454545457L0.7419268208165322 0.15213068181818185L0.6907258064516127 0.20202020202020204L0.6400666267641127 0.26122159090909086L0.5913243447580644 0.33049242424242414L0.5458740234374998 0.4105902777777778L0.5050907258064514 0.5022727272727272L0.4703495148689514 0.6062973484848484L0.43257456133442534 0.787133049242424L0.41612903225806447 1",8:"M0.5143001078924863 0L0.16007477667923162 0.10731570786949331L0.14924628550868277 0.3146018498698755L0.2939585848842112 0.41617921794558677L0.8648302624811545 0.5385163833653317L1 0.7775820770511038L0.8180842915260376 0.9505845566922285L0.41968938540525413 1L0.08062381919779889 0.882831681184498L0 0.6936376947135333L0.17150171673893433 0.5188652309607817L0.6529263782780712 0.4242818653203618L0.8650205888491803 0.29644027376796367L0.8702067371119496 0.09910067291661573L0.5143001078924863 0",9:"M1 0.25379591792994305L0.9514789771111742 0.11679361536614272L0.8702482473521467 0.05711741614054847L0.7327445265851579 0.015213872471965633L0.525248180711544 0L0.3292056884418538 0.012928195113745608L0.15997632037247655 0.058762870026191856L0.05266940041228321 0.12882439350476L0 0.2562067822770946L0.11316462894512366 0.4121335905917837L0.2403060136479954 0.4603365890068938L0.4097241967586011 0.4745978388276783L0.8642414300184816 0.420815170259988L0.9732054796346318 0.34537434075898393L1 0.25379591792994305M0.9647426784191072 0.35488595400360495L0.4756895081034974 1",A:"M0 1L0.4808333333333333 0L1 1M0.24250000000000002 0.6099439775910365L0.7341666666666666 0.6099439775910365",B:"M0 1L0 0.0117369978777208L0.30665717153513444 0L0.5874522807082946 0.03451403469442413L0.7766202217193218 0.15033936404895643L0.7471969743588041 0.31967962568332936L0.5246013359741988 0.4102978954282461L0.04378745314885416 0.44918617613783574L0.5112949594180156 0.469692928091109L0.8540266515643348 0.5552749498651879L1 0.6868463175009967L0.9880091196159324 0.8570018204672155L0.922301719975498 0.9321708046604659L0.7584266951758925 0.9932594737131338L0 1",C:"M1 0.23038928858890784L0.9328355511865092 0.12426412616785204L0.8096380839483327 0.04912601676267708L0.5763225801788256 0L0.4039037709527492 0.015028068281399815L0.2519579390951737 0.06533979308999706L0.10359458463139784 0.18146243506591617L0 0.4862728453971315L0.08129580872733055 0.792689266886982L0.20257034847159672 0.9160822255736587L0.3286572892798542 0.9738230826074175L0.5742878414421707 1L0.7883510303801312 0.9665431511195721L0.946851033994232 0.8689071500976585L1 0.7311049027121912",D:"M0 1L0.015604366822624637 0.020770988281483303L0.22564758265176144 0L0.3865476147957666 0.0024153386496795644L0.6479126635475078 0.051745644338731314L0.841191887805517 0.15827717679529366L0.9517008345536152 0.30172260586872185L0.9957536578687336 0.4504541551987709L1 0.5624359222498485L0.9798483279164735 0.6584121775234548L0.9386273319285215 0.7395945263504481L0.806292129480815 0.8624239259880274L0.6296239151398265 0.9406169638094516L0.3397492767598845 0.9954164354263132L0 1",E:"M0 0L0 1M0 0L1 0M0 0.5L0.7 0.5M0 1L1 1",F:"M0 0L0 1M0.011363636363636364 0.006802721088435374L1 0.006802721088435374M0.011363636363636364 0.4965986394557823L0.8409090909090909 0.4965986394557823",G:"M0.902666857540557 0.03860785012651126L0.6504261864675637 0L0.3838947267237336 0.015442305268228053L0.21293332876776194 0.07706794377239819L0.07799659974941617 0.1994951236187481L0 0.46380381528937314L0.04159964421546915 0.7502491408002389L0.13176692977834842 0.8535497868383203L0.2709176262273927 0.936767572377719L0.4386472596876406 0.9891638569283179L0.6145513562841309 1L0.7782254421419019 0.9585373611026471L0.9092650433859927 0.8540372997461425L1 0.5556012645283437L0.5583959277303046 0.55491741080559",H:"M0 0L0 1M0 0.4788732394366197L0.989010989010989 0.4788732394366197M1 0L1 1",I:"M0.5 0L0.5 1",J:"M0.9976457238788704 0L1 0.7396412315872798L0.9773931362096968 0.8322033314977973L0.9345115952458736 0.882296255506608L0.8743862896259549 0.9221331222466961L0.8024024079884948 0.9526431718061675L0.6443996712151668 0.9893997797356828L0.5035848940343224 1L0.3127211130319937 0.9877004749449337L0.17201910858386513 0.9539509911894274L0.10357419806379677 0.9212555066079295L0.053656568662899015 0.8816079295154184L0.020759483663648916 0.8360407488986785L0.003376206348523566 0.7855864537444934L0 0.7312775330396476",K:"M0 0L0 1M0.8787878787878788 0.06666666666666667L0 0.6148148148148148M0.3333333333333333 0.45925925925925926L1 0.9777777777777777",L:"M0 0L0 1L1 1",M:"M0 1L0 0L0.5 0.6512L1 0L1 1",N:"M0 1L0 0L1 1L0.9803729146221786 0",O:"M0.4718499217948183 1L0.2896765846490613 0.9606979309189402L0.12315162147934663 0.8411184486080473L0 0.4352399966492615L0.11730398524516283 0.13145645436014852L0.2612197451988078 0.04493357858878059L0.5104071592772554 0L0.7450113425917159 0.05393013710105273L0.882367950645524 0.15242300282020502L1 0.5224527406249126L0.9414597290654386 0.7560662329321755L0.8371289514446183 0.8910800547287298L0.6518259868433511 0.9830452628933628L0.4718499217948183 1",P:"M0 1L0 0.018871774228013626L0.29609603495819875 0L0.5609840637427541 0.011794858892508529L0.7332142696692472 0.04353904702296349L0.8102258645858864 0.0691965055027166L0.9330504315465442 0.14445061754775845L0.9876391714147118 0.22527816445836535L1 0.3434414070631638L0.9510549958116356 0.41772808046663146L0.8746646891596713 0.45879131862541683L0.7528523813396283 0.49171525113425024L0.5766919939969619 0.5153253033973054L0.33725744877712827 0.5284469008187558L0.025622667325582785 0.529905468802775",Q:"M0.4618887943546369 0.9755918167206952L0.28356128136544534 0.9372490397450218L0.12055179272160406 0.8205882753548176L0 0.4246165790405623L0.1148276047430244 0.12824784112887844L0.25570518844754375 0.043836831567190586L0.49963205786237674 0L0.7292835601228574 0.0526138004304122L0.8637404608452104 0.14870263423138746L0.9788892040030622 0.5097006183769648L0.9215847647858059 0.7376120297474734L0.8194564929275405 0.869330409436378L0.6380654214095985 0.9590509139448092L0.4618887943546369 0.9755918167206952M0.5824181120212351 0.6861805006946525L1 1",R:"M0 0.9928375167236815L0 0.02590227442068435L0.3611517274211098 0L0.6146286724700761 0.008660554424468435L0.7675462459194776 0.035269459580494614L0.831839975516866 0.056961676692569484L0.8847592491838954 0.08519560521497332L0.9238557535364527 0.120683646438422L0.9583303225312839 0.21691797435320384L0.955092470586235 0.3022616904894429L0.9198097669001631 0.3640573439322699L0.8564862239866702 0.40639258627024005L0.7691258543593579 0.43335506909190874L0.601775027203482 0.4539166070813109L0.023939064200217658 0.46997623755243123M0.5038084874863982 0.5108023922274467L1 1",S:"M0.8886929689221953 0.15146982162688968L0.7276173683050475 0.013780286031594946L0.34582323121005076 0L0.1318235250900008 0.09920162734298861L0.0444543935052531 0.2811287071349243L0.08064065829108809 0.3709571405906485L0.21603115127470426 0.4485505768228281L0.7525409135992945 0.5111160926769565L0.9330263665417677 0.5850732219351329L1 0.7129938124702524L0.9117772389978691 0.9130572743138187L0.6423187128058188 1L0.29586019579751677 0.9935291584506244L0.10638454191462794 0.9229845198431584L0 0.7570771288048773",T:"M0 0L1 0M0.5148514851485149 0L0.5148514851485149 1",U:"M0 0L0.0023103778751369115 0.5467447428390111L0.01823032542100219 0.6954785891481812L0.05895528135268338 0.8056480226151669L0.13703402031421133 0.8894445726483398L0.23918400876232196 0.9448524533417946L0.3917887458926616 0.9848674531975652L0.584341627875137 1L0.7194816196604602 0.9848501456716763L0.8303268115073934 0.9449411544119768L0.8966613970084885 0.898186315516197L0.9251437568455642 0.867453197565408L0.9687114937020809 0.7890904895145239L0.9890470974808324 0.6852857184065537L1 0.0014769088758762145",V:"M0 0L0.5348837209302325 1L1 0",W:"M0 0L0.23300090661831369 0.9873417721518988L0.49954669084315495 0.30081906180193585L0.7851314596554849 1L1 0.0215934475055845",X:"M0 0L0.9893617021276596 1M1 0L0.010638297872340425 1",Y:"M0 0L0.4860515021459227 0.44712562100780695M1 0.0014194464158977947L0.48927038626609437 0.44996451383960256L0.5075107296137339 1",Z:"M0 0L1 0L0 1L1 1",a:"M0.900 0.276L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",b:"M0.100 0.034L0.100 0.759M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",c:"M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",d:"M0.900 0.034L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",e:"M0.100 0.483L0.900 0.483M0.900 0.414L0.834 0.345L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",f:"M0.900 0.034L0.700 0.034L0.500 0.069L0.400 0.172L0.400 0.759M0.100 0.276L0.800 0.276",g:"M0.900 0.276L0.900 0.828L0.834 0.931L0.766 0.966L0.634 1.000L0.434 1.000L0.300 0.966L0.166 0.897L0.100 0.793M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",h:"M0.100 0.034L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",i:"M0.466 0.034L0.534 0.034M0.500 0.276L0.500 0.759",j:"M0.634 0.034L0.766 0.034M0.700 0.276L0.700 0.862L0.634 0.966L0.366 1.000L0.166 0.966",k:"M0.100 0.034L0.100 0.759M0.827 0.276L0.100 0.621M0.391 0.483L0.900 0.759",l:"M0.5 0.034L0.5 0.759",m:"M0.100 0.276L0.100 0.759M0.100 0.414L0.209 0.310L0.282 0.276L0.418 0.276L0.491 0.310L0.564 0.414L0.564 0.759M0.564 0.414L0.673 0.310L0.745 0.276L0.882 0.276L0.955 0.310L0.955 0.759",n:"M0.100 0.276L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",o:"M0.408 0.276L0.285 0.310L0.162 0.379L0.100 0.483L0.100 0.552L0.162 0.655L0.285 0.724L0.408 0.759L0.592 0.759L0.715 0.724L0.838 0.655L0.900 0.552L0.900 0.483L0.838 0.379L0.715 0.310L0.592 0.276L0.408 0.276",p:"M0.100 0.276L0.100 1.000M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",q:"M0.900 0.276L0.900 1.000M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",r:"M0.100 0.276L0.100 0.759M0.100 0.483L0.200 0.379L0.400 0.310L0.600 0.276L0.900 0.276",s:"M0.900 0.310L0.827 0.310L0.609 0.276L0.391 0.276L0.173 0.310L0.100 0.379L0.173 0.448L0.391 0.483L0.609 0.517L0.827 0.552L0.900 0.621L0.827 0.724L0.609 0.759L0.391 0.759L0.173 0.724L0.100 0.655",t:"M0.400 0.034L0.400 0.621L0.500 0.724L0.700 0.759L0.900 0.759M0.100 0.276L0.800 0.276",u:"M0.100 0.276L0.100 0.621L0.173 0.724L0.318 0.759L0.536 0.759L0.682 0.724L0.900 0.621M0.900 0.276L0.900 0.759",v:"M0.100 0.276L0.500 0.759M0.900 0.276L0.500 0.759",w:"M0.100 0.276L0.300 0.759M0.500 0.276L0.300 0.759M0.500 0.276L0.700 0.759M0.900 0.276L0.700 0.759",x:"M0.100 0.276L0.900 0.759M0.900 0.276L0.100 0.759",y:"M0.162 0.276L0.530 0.759M0.900 0.276L0.530 0.759L0.408 0.897L0.285 0.966L0.162 1.000L0.100 1.000",z:"M0.900 0.276L0.100 0.759M0.100 0.276L0.900 0.276M0.100 0.759L0.900 0.759",".":"M 0.49 1 L 0.41 1",",":"M0.55 0.85L0.45 0.95L0.5 1","*":"M 0.5 0.25 L 0.8 0.25 M 0.5 0.25 L 0.5927 0.4402 M 0.5 0.25 L 0.2573 0.3676 M 0.5 0.25 L 0.2573 0.1324 M 0.5 0.25 L 0.599 0.055","(":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",")":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","-":"M0 0.5L1 0.5","+":"M 0 0.5 L 1 0.5 M 0.5 0.125 L 0.5 0.875","=":"M0 0.25L1 0.25M0 0.75L1 0.75",_:"M0 1 L1 1","[":"M0.75 0L0.25 0L0.25 1L0.75 1","]":"M0.25 0L0.75 0L0.75 1L0.25 1","<":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",">":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","'":"M 0.5 0 L 0.5 0.5",'"':"M 0.25 0 L 0.25 0.5 M 0.75 0 L 0.75 0.5","/":"M0 1L1 0","\\":"M0 0L1 1"},iz={};for(const e in aut){iz[e]=[];const A=aut[e].split("M").slice(1).map(t=>t.split("L").map(i=>i.trim().split(" ").map(parseFloat)));for(const t of A)for(let i=0;i<t.length-1;i++)iz[e].push({x1:t[i][0],y1:1-t[i][1],x2:t[i+1][0],y2:1-t[i+1][1]})}function Zje(e){if(e.sheet)return e.sheet;for(var A=0;A<document.styleSheets.length;A++)if(document.styleSheets[A].ownerNode===e)return document.styleSheets[A]}function Vje(e){var A=document.createElement("style");return A.setAttribute("data-emotion",e.key),e.nonce!==void 0&&A.setAttribute("nonce",e.nonce),A.appendChild(document.createTextNode("")),A.setAttribute("data-s",""),A}var jje=(function(){function e(t){var i=this;this._insertTag=function(n){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(n,o),i.tags.push(n)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var A=e.prototype;return A.hydrate=function(i){i.forEach(this._insertTag)},A.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vje(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Zje(n);try{o.insertRule(i,o.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(i));this.ctr++},A.flush=function(){this.tags.forEach(function(i){var n;return(n=i.parentNode)==null?void 0:n.removeChild(i)}),this.tags=[],this.ctr=0},e})(),Ny="-ms-",nz="-moz-",cB="-webkit-",gut="comm",XwA="rule",$wA="decl",zje="@import",cut="@keyframes",Xje="@layer",$je=Math.abs,oz=String.fromCharCode,Aze=Object.assign;function tze(e,A){return z0(e,0)^45?(((A<<2^z0(e,0))<<2^z0(e,1))<<2^z0(e,2))<<2^z0(e,3):0}function Iut(e){return e.trim()}function eze(e,A){return(e=A.exec(e))?e[0]:e}function IB(e,A,t){return e.replace(A,t)}function ADA(e,A){return e.indexOf(A)}function z0(e,A){return e.charCodeAt(A)|0}function _4(e,A,t){return e.slice(A,t)}function vb(e){return e.length}function tDA(e){return e.length}function sz(e,A){return A.push(e),e}function ize(e,A){return e.map(A).join("")}var rz=1,EL=1,lut=0,aw=0,wp=0,dL="";function az(e,A,t,i,n,o,s){return{value:e,root:A,parent:t,type:i,props:n,children:o,line:rz,column:EL,length:s,return:""}}function x4(e,A){return Aze(az("",null,null,"",null,null,0),e,{length:-e.length},A)}function nze(){return wp}function oze(){return wp=aw>0?z0(dL,--aw):0,EL--,wp===10&&(EL=1,rz--),wp}function sD(){return wp=aw<lut?z0(dL,aw++):0,EL++,wp===10&&(EL=1,rz++),wp}function kb(){return z0(dL,aw)}function gz(){return aw}function b4(e,A){return _4(dL,e,A)}function S4(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function But(e){return rz=EL=1,lut=vb(dL=e),aw=0,[]}function Cut(e){return dL="",e}function cz(e){return Iut(b4(aw-1,eDA(e===91?e+2:e===40?e+1:e)))}function sze(e){for(;(wp=kb())&&wp<33;)sD();return S4(e)>2||S4(wp)>3?"":" "}function rze(e,A){for(;--A&&sD()&&!(wp<48||wp>102||wp>57&&wp<65||wp>70&&wp<97););return b4(e,gz()+(A<6&&kb()==32&&sD()==32))}function eDA(e){for(;sD();)switch(wp){case e:return aw;case 34:case 39:e!==34&&e!==39&&eDA(wp);break;case 40:e===41&&eDA(e);break;case 92:sD();break}return aw}function aze(e,A){for(;sD()&&e+wp!==57;)if(e+wp===84&&kb()===47)break;return"/*"+b4(A,aw-1)+"*"+oz(e===47?e:sD())}function gze(e){for(;!S4(kb());)sD();return b4(e,aw)}function cze(e){return Cut(Iz("",null,null,null,[""],e=But(e),0,[0],e))}function Iz(e,A,t,i,n,o,s,r,a){for(var g=0,c=0,I=s,l=0,B=0,C=0,Q=1,u=1,E=1,p=0,f="",m=n,S=o,_=i,v=f;u;)switch(C=p,p=sD()){case 40:if(C!=108&&z0(v,I-1)==58){ADA(v+=IB(cz(p),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:v+=cz(p);break;case 9:case 10:case 13:case 32:v+=sze(C);break;case 92:v+=rze(gz()-1,7);continue;case 47:switch(kb()){case 42:case 47:sz(Ize(aze(sD(),gz()),A,t),a);break;default:v+="/"}break;case 123*Q:r[g++]=vb(v)*E;case 125*Q:case 59:case 0:switch(p){case 0:case 125:u=0;case 59+c:E==-1&&(v=IB(v,/\f/g,"")),B>0&&vb(v)-I&&sz(B>32?Qut(v+";",i,t,I-1):Qut(IB(v," ","")+";",i,t,I-2),a);break;case 59:v+=";";default:if(sz(_=hut(v,A,t,g,c,n,r,f,m=[],S=[],I),o),p===123)if(c===0)Iz(v,A,_,_,m,o,I,r,S);else switch(l===99&&z0(v,3)===110?100:l){case 100:case 108:case 109:case 115:Iz(e,_,_,i&&sz(hut(e,_,_,0,0,n,r,f,n,m=[],I),S),n,S,I,r,i?m:S);break;default:Iz(v,_,_,_,[""],S,0,r,S)}}g=c=B=0,Q=E=1,f=v="",I=s;break;case 58:I=1+vb(v),B=C;default:if(Q<1){if(p==123)--Q;else if(p==125&&Q++==0&&oze()==125)continue}switch(v+=oz(p),p*Q){case 38:E=c>0?1:(v+="\f",-1);break;case 44:r[g++]=(vb(v)-1)*E,E=1;break;case 64:kb()===45&&(v+=cz(sD())),l=kb(),c=I=vb(f=v+=gze(gz())),p++;break;case 45:C===45&&vb(v)==2&&(Q=0)}}return o}function hut(e,A,t,i,n,o,s,r,a,g,c){for(var I=n-1,l=n===0?o:[""],B=tDA(l),C=0,Q=0,u=0;C<i;++C)for(var E=0,p=_4(e,I+1,I=$je(Q=s[C])),f=e;E<B;++E)(f=Iut(Q>0?l[E]+" "+p:IB(p,/&\f/g,l[E])))&&(a[u++]=f);return az(e,A,t,n===0?XwA:r,a,g,c)}function Ize(e,A,t){return az(e,A,t,gut,oz(nze()),_4(e,2,-2),0)}function Qut(e,A,t,i){return az(e,A,t,$wA,_4(e,0,i),_4(e,i+1,-1),i)}function pL(e,A){for(var t="",i=tDA(e),n=0;n<i;n++)t+=A(e[n],n,e,A)||"";return t}function lze(e,A,t,i){switch(e.type){case Xje:if(e.children.length)break;case zje:case $wA:return e.return=e.return||e.value;case gut:return"";case cut:return e.return=e.value+"{"+pL(e.children,i)+"}";case XwA:e.value=e.props.join(",")}return vb(t=pL(e.children,i))?e.return=e.value+"{"+t+"}":""}function Bze(e){var A=tDA(e);return function(t,i,n,o){for(var s="",r=0;r<A;r++)s+=e[r](t,i,n,o)||"";return s}}function Cze(e){return function(A){A.root||(A=A.return)&&e(A)}}function hze(e){var A=Object.create(null);return function(t){return A[t]===void 0&&(A[t]=e(t)),A[t]}}var Qze=function(A,t,i){for(var n=0,o=0;n=o,o=kb(),n===38&&o===12&&(t[i]=1),!S4(o);)sD();return b4(A,aw)},uze=function(A,t){var i=-1,n=44;do switch(S4(n)){case 0:n===38&&kb()===12&&(t[i]=1),A[i]+=Qze(aw-1,t,i);break;case 2:A[i]+=cz(n);break;case 4:if(n===44){A[++i]=kb()===58?"&\f":"",t[i]=A[i].length;break}default:A[i]+=oz(n)}while(n=sD());return A},Eze=function(A,t){return Cut(uze(But(A),t))},uut=new WeakMap,dze=function(A){if(!(A.type!=="rule"||!A.parent||A.length<1)){for(var t=A.value,i=A.parent,n=A.column===i.column&&A.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(A.props.length===1&&t.charCodeAt(0)!==58&&!uut.get(i))&&!n){uut.set(A,!0);for(var o=[],s=Eze(t,o),r=i.props,a=0,g=0;a<s.length;a++)for(var c=0;c<r.length;c++,g++)A.props[g]=o[a]?s[a].replace(/&\f/g,r[c]):r[c]+" "+s[a]}}},pze=function(A){if(A.type==="decl"){var t=A.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(A.return="",A.value="")}};function Eut(e,A){switch(tze(e,A)){case 5103:return cB+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return cB+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return cB+e+nz+e+Ny+e+e;case 6828:case 4268:return cB+e+Ny+e+e;case 6165:return cB+e+Ny+"flex-"+e+e;case 5187:return cB+e+IB(e,/(\w+).+(:[^]+)/,cB+"box-$1$2"+Ny+"flex-$1$2")+e;case 5443:return cB+e+Ny+"flex-item-"+IB(e,/flex-|-self/,"")+e;case 4675:return cB+e+Ny+"flex-line-pack"+IB(e,/align-content|flex-|-self/,"")+e;case 5548:return cB+e+Ny+IB(e,"shrink","negative")+e;case 5292:return cB+e+Ny+IB(e,"basis","preferred-size")+e;case 6060:return cB+"box-"+IB(e,"-grow","")+cB+e+Ny+IB(e,"grow","positive")+e;case 4554:return cB+IB(e,/([^-])(transform)/g,"$1"+cB+"$2")+e;case 6187:return IB(IB(IB(e,/(zoom-|grab)/,cB+"$1"),/(image-set)/,cB+"$1"),e,"")+e;case 5495:case 3959:return IB(e,/(image-set\([^]*)/,cB+"$1$`$1");case 4968:return IB(IB(e,/(.+:)(flex-)?(.*)/,cB+"box-pack:$3"+Ny+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+cB+e+e;case 4095:case 3583:case 4068:case 2532:return IB(e,/(.+)-inline(.+)/,cB+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(vb(e)-1-A>6)switch(z0(e,A+1)){case 109:if(z0(e,A+4)!==45)break;case 102:return IB(e,/(.+:)(.+)-([^]+)/,"$1"+cB+"$2-$3$1"+nz+(z0(e,A+3)==108?"$3":"$2-$3"))+e;case 115:return~ADA(e,"stretch")?Eut(IB(e,"stretch","fill-available"),A)+e:e}break;case 4949:if(z0(e,A+1)!==115)break;case 6444:switch(z0(e,vb(e)-3-(~ADA(e,"!important")&&10))){case 107:return IB(e,":",":"+cB)+e;case 101:return IB(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+cB+(z0(e,14)===45?"inline-":"")+"box$3$1"+cB+"$2$3$1"+Ny+"$2box$3")+e}break;case 5936:switch(z0(e,A+11)){case 114:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return cB+e+Ny+IB(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return cB+e+Ny+e+e}return e}var fze=function(A,t,i,n){if(A.length>-1&&!A.return)switch(A.type){case $wA:A.return=Eut(A.value,A.length);break;case cut:return pL([x4(A,{value:IB(A.value,"@","@"+cB)})],n);case XwA:if(A.length)return ize(A.props,function(o){switch(eze(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pL([x4(A,{props:[IB(o,/:(read-\w+)/,":"+nz+"$1")]})],n);case"::placeholder":return pL([x4(A,{props:[IB(o,/:(plac\w+)/,":"+cB+"input-$1")]}),x4(A,{props:[IB(o,/:(plac\w+)/,":"+nz+"$1")]}),x4(A,{props:[IB(o,/:(plac\w+)/,Ny+"input-$1")]})],n)}return""})}},yze=[fze],mze=function(A){var t=A.key;if(t==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(Q){var u=Q.getAttribute("data-emotion");u.indexOf(" ")!==-1&&(document.head.appendChild(Q),Q.setAttribute("data-s",""))})}var n=A.stylisPlugins||yze,o={},s,r=[];s=A.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(Q){for(var u=Q.getAttribute("data-emotion").split(" "),E=1;E<u.length;E++)o[u[E]]=!0;r.push(Q)});var a,g=[dze,pze];{var c,I=[lze,Cze(function(Q){c.insert(Q)})],l=Bze(g.concat(n,I)),B=function(u){return pL(cze(u),l)};a=function(u,E,p,f){c=p,B(u?u+"{"+E.styles+"}":E.styles),f&&(C.inserted[E.name]=!0)}}var C={key:t,sheet:new jje({key:t,container:s,nonce:A.nonce,speedy:A.speedy,prepend:A.prepend,insertionPoint:A.insertionPoint}),nonce:A.nonce,inserted:o,registered:{},insert:a};return C.sheet.hydrate(r),C};function wze(e){for(var A=0,t,i=0,n=e.length;n>=4;++i,n-=4)t=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,A=(t&65535)*1540483477+((t>>>16)*59797<<16)^(A&65535)*1540483477+((A>>>16)*59797<<16);switch(n){case 3:A^=(e.charCodeAt(i+2)&255)<<16;case 2:A^=(e.charCodeAt(i+1)&255)<<8;case 1:A^=e.charCodeAt(i)&255,A=(A&65535)*1540483477+((A>>>16)*59797<<16)}return A^=A>>>13,A=(A&65535)*1540483477+((A>>>16)*59797<<16),((A^A>>>15)>>>0).toString(36)}var Dze={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_ze=/[A-Z]|^ms/g,xze=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dut=function(A){return A.charCodeAt(1)===45},put=function(A){return A!=null&&typeof A!="boolean"},iDA=hze(function(e){return dut(e)?e:e.replace(_ze,"-$&").toLowerCase()}),fut=function(A,t){switch(A){case"animation":case"animationName":if(typeof t=="string")return t.replace(xze,function(i,n,o){return Dk={name:n,styles:o,next:Dk},n})}return Dze[A]!==1&&!dut(A)&&typeof t=="number"&&t!==0?t+"px":t};function lz(e,A,t){if(t==null)return"";var i=t;if(i.__emotion_styles!==void 0)return i;switch(typeof t){case"boolean":return"";case"object":{var n=t;if(n.anim===1)return Dk={name:n.name,styles:n.styles,next:Dk},n.name;var o=t;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Dk={name:s.name,styles:s.styles,next:Dk},s=s.next;var r=o.styles+";";return r}return bze(e,A,t)}}var a=t;if(A==null)return a;var g=A[a];return g!==void 0?g:a}function bze(e,A,t){var i="";if(Array.isArray(t))for(var n=0;n<t.length;n++)i+=lz(e,A,t[n])+";";else for(var o in t){var s=t[o];if(typeof s!="object"){var r=s;A!=null&&A[r]!==void 0?i+=o+"{"+A[r]+"}":put(r)&&(i+=iDA(o)+":"+fut(o,r)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(A==null||A[s[0]]===void 0))for(var a=0;a<s.length;a++)put(s[a])&&(i+=iDA(o)+":"+fut(o,s[a])+";");else{var g=lz(e,A,s);switch(o){case"animation":case"animationName":{i+=iDA(o)+":"+g+";";break}default:i+=o+"{"+g+"}"}}}return i}var yut=/label:\s*([^\s;{]+)\s*(;|$)/g,Dk;function nDA(e,A,t){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,n="";Dk=void 0;var o=e[0];if(o==null||o.raw===void 0)i=!1,n+=lz(t,A,o);else{var s=o;n+=s[0]}for(var r=1;r<e.length;r++)if(n+=lz(t,A,e[r]),i){var a=o;n+=a[r]}yut.lastIndex=0;for(var g="",c;(c=yut.exec(n))!==null;)g+="-"+c[1];var I=wze(n)+g;return{name:I,styles:n,next:Dk}}function mut(e,A,t){var i="";return t.split(" ").forEach(function(n){e[n]!==void 0?A.push(e[n]+";"):n&&(i+=n+" ")}),i}var Sze=function(A,t,i){var n=A.key+"-"+t.name;A.registered[n]===void 0&&(A.registered[n]=t.styles)},vze=function(A,t,i){Sze(A,t);var n=A.key+"-"+t.name;if(A.inserted[t.name]===void 0){var o=t;do A.insert(t===o?"."+n:"",o,A.sheet,!0),o=o.next;while(o!==void 0)}};function wut(e,A){if(e.inserted[A.name]===void 0)return e.insert("",A,e.sheet,!0)}function Dut(e,A,t){var i=[],n=mut(e,i,t);return i.length<2?t:n+A(i)}var kze=function(A){var t=mze(A);t.sheet.speedy=function(r){this.isSpeedy=r},t.compat=!0;var i=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered,void 0);return vze(t,I),t.key+"-"+I.name},n=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered),l="animation-"+I.name;return wut(t,{name:I.name,styles:"@keyframes "+l+"{"+I.styles+"}"}),l},o=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];var I=nDA(g,t.registered);wut(t,I)},s=function(){for(var a=arguments.length,g=new Array(a),c=0;c<a;c++)g[c]=arguments[c];return Dut(t.registered,i,Rze(g))};return{css:i,cx:s,injectGlobal:o,keyframes:n,hydrate:function(a){a.forEach(function(g){t.inserted[g]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:mut.bind(null,t.registered),merge:Dut.bind(null,t.registered,i)}},Rze=function e(A){for(var t="",i=0;i<A.length;i++){var n=A[i];if(n!=null){var o=void 0;switch(typeof n){case"boolean":break;case"object":{if(Array.isArray(n))o=e(n);else{o="";for(var s in n)n[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=n}o&&(t&&(t+=" "),t+=o)}}return t},Fze=kze({key:"css"}),fL=Fze.css,Nze=Object.create,_ut=Object.defineProperty,Gze=Object.getOwnPropertyDescriptor,xut=Object.getOwnPropertyNames,Mze=Object.getPrototypeOf,Lze=Object.prototype.hasOwnProperty,Ul=(e,A)=>function(){return A||(0,e[xut(e)[0]])((A={exports:{}}).exports,A),A.exports},Uze=(e,A,t,i)=>{if(A&&typeof A=="object"||typeof A=="function")for(let n of xut(A))!Lze.call(e,n)&&n!==t&&_ut(e,n,{get:()=>A[n],enumerable:!(i=Gze(A,n))||i.enumerable});return e},but=(e,A,t)=>(t=e!=null?Nze(Mze(e)):{},Uze(_ut(t,"default",{value:e,enumerable:!0}),e)),Hze=Ul({"node_modules/svgson/dist/svgson.umd.js"(e,A){(function(t,i){typeof e=="object"&&typeof A<"u"?A.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.svgson=i())})(e,function(){var t=function(tA){return tA!=null&&(i(tA)||n(tA)||!!tA._isBuffer)};function i(tA){return!!tA.constructor&&typeof tA.constructor.isBuffer=="function"&&tA.constructor.isBuffer(tA)}function n(tA){return typeof tA.readFloatLE=="function"&&typeof tA.slice=="function"&&i(tA.slice(0,0))}var o=Object.prototype.toString,s=function(rA){if(typeof rA>"u")return"undefined";if(rA===null)return"null";if(rA===!0||rA===!1||rA instanceof Boolean)return"boolean";if(typeof rA=="string"||rA instanceof String)return"string";if(typeof rA=="number"||rA instanceof Number)return"number";if(typeof rA=="function"||rA instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(rA))return"array";if(rA instanceof RegExp)return"regexp";if(rA instanceof Date)return"date";var IA=o.call(rA);return IA==="[object RegExp]"?"regexp":IA==="[object Date]"?"date":IA==="[object Arguments]"?"arguments":IA==="[object Error]"?"error":t(rA)?"buffer":IA==="[object Set]"?"set":IA==="[object WeakSet]"?"weakset":IA==="[object Map]"?"map":IA==="[object WeakMap]"?"weakmap":IA==="[object Symbol]"?"symbol":IA==="[object Int8Array]"?"int8array":IA==="[object Uint8Array]"?"uint8array":IA==="[object Uint8ClampedArray]"?"uint8clampedarray":IA==="[object Int16Array]"?"int16array":IA==="[object Uint16Array]"?"uint16array":IA==="[object Int32Array]"?"int32array":IA==="[object Uint32Array]"?"uint32array":IA==="[object Float32Array]"?"float32array":IA==="[object Float64Array]"?"float64array":"object"};function r(tA,rA){return rA={exports:{}},tA(rA,rA.exports),rA.exports}var a=r(function(tA){(function(){function rA(IA,DA){if(typeof DA!="function")return IA;var bA={};for(var HA in IA)Object.prototype.hasOwnProperty.call(IA,HA)&&(bA[DA(HA,IA[HA])||HA]=IA[HA]);return bA}tA.exports?tA.exports=rA:window.rename=rA})()}),g=function tA(rA,IA){var DA=s(rA);if(DA!=="object"&&DA!=="array")throw new Error("expected an object");var bA=[];DA==="object"&&(rA=a(rA,IA),bA={});for(var HA in rA)if(rA.hasOwnProperty(HA)){var JA=rA[HA];s(JA)==="object"||s(JA)==="array"?bA[HA]=tA(JA,IA):bA[HA]=JA}return bA},c=r(function(tA){var rA=Object.prototype.hasOwnProperty,IA="~";function DA(){}Object.create&&(DA.prototype=Object.create(null),new DA().__proto__||(IA=!1));function bA(JA,GA,aA){this.fn=JA,this.context=GA,this.once=aA||!1}function HA(){this._events=new DA,this._eventsCount=0}HA.prototype.eventNames=function(){var GA=[],aA,mA;if(this._eventsCount===0)return GA;for(mA in aA=this._events)rA.call(aA,mA)&&GA.push(IA?mA.slice(1):mA);return Object.getOwnPropertySymbols?GA.concat(Object.getOwnPropertySymbols(aA)):GA},HA.prototype.listeners=function(GA,aA){var mA=IA?IA+GA:GA,fA=this._events[mA];if(aA)return!!fA;if(!fA)return[];if(fA.fn)return[fA.fn];for(var ZA=0,tt=fA.length,at=new Array(tt);ZA<tt;ZA++)at[ZA]=fA[ZA].fn;return at},HA.prototype.emit=function(GA,aA,mA,fA,ZA,tt){var at=IA?IA+GA:GA;if(!this._events[at])return!1;var vA=this._events[at],FA=arguments.length,dA,uA;if(vA.fn){switch(vA.once&&this.removeListener(GA,vA.fn,void 0,!0),FA){case 1:return vA.fn.call(vA.context),!0;case 2:return vA.fn.call(vA.context,aA),!0;case 3:return vA.fn.call(vA.context,aA,mA),!0;case 4:return vA.fn.call(vA.context,aA,mA,fA),!0;case 5:return vA.fn.call(vA.context,aA,mA,fA,ZA),!0;case 6:return vA.fn.call(vA.context,aA,mA,fA,ZA,tt),!0}for(uA=1,dA=new Array(FA-1);uA<FA;uA++)dA[uA-1]=arguments[uA];vA.fn.apply(vA.context,dA)}else{var UA=vA.length,RA;for(uA=0;uA<UA;uA++)switch(vA[uA].once&&this.removeListener(GA,vA[uA].fn,void 0,!0),FA){case 1:vA[uA].fn.call(vA[uA].context);break;case 2:vA[uA].fn.call(vA[uA].context,aA);break;case 3:vA[uA].fn.call(vA[uA].context,aA,mA);break;case 4:vA[uA].fn.call(vA[uA].context,aA,mA,fA);break;default:if(!dA)for(RA=1,dA=new Array(FA-1);RA<FA;RA++)dA[RA-1]=arguments[RA];vA[uA].fn.apply(vA[uA].context,dA)}}return!0},HA.prototype.on=function(GA,aA,mA){var fA=new bA(aA,mA||this),ZA=IA?IA+GA:GA;return this._events[ZA]?this._events[ZA].fn?this._events[ZA]=[this._events[ZA],fA]:this._events[ZA].push(fA):(this._events[ZA]=fA,this._eventsCount++),this},HA.prototype.once=function(GA,aA,mA){var fA=new bA(aA,mA||this,!0),ZA=IA?IA+GA:GA;return this._events[ZA]?this._events[ZA].fn?this._events[ZA]=[this._events[ZA],fA]:this._events[ZA].push(fA):(this._events[ZA]=fA,this._eventsCount++),this},HA.prototype.removeListener=function(GA,aA,mA,fA){var ZA=IA?IA+GA:GA;if(!this._events[ZA])return this;if(!aA)return--this._eventsCount===0?this._events=new DA:delete this._events[ZA],this;var tt=this._events[ZA];if(tt.fn)tt.fn===aA&&(!fA||tt.once)&&(!mA||tt.context===mA)&&(--this._eventsCount===0?this._events=new DA:delete this._events[ZA]);else{for(var at=0,vA=[],FA=tt.length;at<FA;at++)(tt[at].fn!==aA||fA&&!tt[at].once||mA&&tt[at].context!==mA)&&vA.push(tt[at]);vA.length?this._events[ZA]=vA.length===1?vA[0]:vA:--this._eventsCount===0?this._events=new DA:delete this._events[ZA]}return this},HA.prototype.removeAllListeners=function(GA){var aA;return GA?(aA=IA?IA+GA:GA,this._events[aA]&&(--this._eventsCount===0?this._events=new DA:delete this._events[aA])):(this._events=new DA,this._eventsCount=0),this},HA.prototype.off=HA.prototype.removeListener,HA.prototype.addListener=HA.prototype.on,HA.prototype.setMaxListeners=function(){return this},HA.prefixed=IA,HA.EventEmitter=HA,tA.exports=HA});function I(tA,rA,IA){return rA in tA?Object.defineProperty(tA,rA,{value:IA,enumerable:!0,configurable:!0,writable:!0}):tA[rA]=IA,tA}var l=function(){},B={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},C={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},Q={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},u={" ":C.space," ":C.space,"\n":C.space,"\r":C.space,"<":C.lt,">":C.gt,'"':C.quote,"'":C.quote,"=":C.equal,"/":C.slash},E=function(rA){return u[rA]||C.char},p=function(rA){var IA,DA,bA,HA,JA,GA,aA,mA,fA,ZA;rA=Object.assign({debug:!1},rA);var tt=new c,at=B.data,vA="",FA="",dA="",uA="",UA="",RA="",kA=function(XA,et){if(!(FA[0]==="?"||FA[0]==="!")){var It={type:XA,value:et};rA.debug&&console.log("emit:",It),tt.emit("data",It)}};tt.stateMachine=(ZA={},I(ZA,B.data,(IA={},I(IA,C.lt,function(){vA.trim()&&kA(Q.text,vA),FA="",UA=!1,at=B.tagBegin}),I(IA,C.char,function(YA){vA+=YA}),IA)),I(ZA,B.cdata,I({},C.char,function(YA){vA+=YA,vA.substr(-3)==="]]>"&&(kA(Q.text,vA.slice(0,-3)),vA="",at=B.data)})),I(ZA,B.tagBegin,(DA={},I(DA,C.space,l),I(DA,C.char,function(YA){FA=YA,at=B.tagName}),I(DA,C.slash,function(){FA="",UA=!0}),DA)),I(ZA,B.tagName,(bA={},I(bA,C.space,function(){UA?at=B.tagEnd:(at=B.attributeNameStart,kA(Q.openTag,FA))}),I(bA,C.gt,function(){kA(UA?Q.closeTag:Q.openTag,FA),vA="",at=B.data}),I(bA,C.slash,function(){at=B.tagEnd,kA(Q.openTag,FA)}),I(bA,C.char,function(YA){FA+=YA,FA==="![CDATA["&&(at=B.cdata,vA="",FA="")}),bA)),I(ZA,B.tagEnd,(HA={},I(HA,C.gt,function(){kA(Q.closeTag,FA),vA="",at=B.data}),I(HA,C.char,l),HA)),I(ZA,B.attributeNameStart,(JA={},I(JA,C.char,function(YA){dA=YA,at=B.attributeName}),I(JA,C.gt,function(){vA="",at=B.data}),I(JA,C.space,l),I(JA,C.slash,function(){UA=!0,at=B.tagEnd}),JA)),I(ZA,B.attributeName,(GA={},I(GA,C.space,function(){at=B.attributeNameEnd}),I(GA,C.equal,function(){kA(Q.attributeName,dA),at=B.attributeValueBegin}),I(GA,C.gt,function(){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),vA="",at=B.data}),I(GA,C.slash,function(){UA=!0,uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),at=B.tagEnd}),I(GA,C.char,function(YA){dA+=YA}),GA)),I(ZA,B.attributeNameEnd,(aA={},I(aA,C.space,l),I(aA,C.equal,function(){kA(Q.attributeName,dA),at=B.attributeValueBegin}),I(aA,C.gt,function(){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),vA="",at=B.data}),I(aA,C.char,function(YA){uA="",kA(Q.attributeName,dA),kA(Q.attributeValue,uA),dA=YA,at=B.attributeName}),aA)),I(ZA,B.attributeValueBegin,(mA={},I(mA,C.space,l),I(mA,C.quote,function(YA){RA=YA,uA="",at=B.attributeValue}),I(mA,C.gt,function(){uA="",kA(Q.attributeValue,uA),vA="",at=B.data}),I(mA,C.char,function(YA){RA="",uA=YA,at=B.attributeValue}),mA)),I(ZA,B.attributeValue,(fA={},I(fA,C.space,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),at=B.attributeNameStart)}),I(fA,C.quote,function(YA){RA===YA?(kA(Q.attributeValue,uA),at=B.attributeNameStart):uA+=YA}),I(fA,C.gt,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),vA="",at=B.data)}),I(fA,C.slash,function(YA){RA?uA+=YA:(kA(Q.attributeValue,uA),UA=!0,at=B.tagEnd)}),I(fA,C.char,function(YA){uA+=YA}),fA)),ZA);var KA=function(XA){rA.debug&&console.log(at,XA);var et=tt.stateMachine[at],It=et[E(XA)]||et[C.error]||et[C.char];It(XA)};return tt.write=function(YA){for(var XA=YA.length,et=0;et<XA;et++)KA(YA[et])},tt},f={State:B,Action:C,Type:Q,create:p},m=f.Type,S={element:"element",text:"text"},_=function(rA){return Object.assign({name:"",type:S.element,value:"",parent:null,attributes:{},children:[]},rA)},v=function(rA){rA=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},rA);var IA=void 0,DA=void 0,bA=void 0,HA=void 0,JA=new c,GA=function(mA){switch(mA.type){case m.openTag:if(bA===null)bA=DA,bA.name=mA.value;else{var fA=_({name:mA.value,parent:bA});bA.children.push(fA),bA=fA}break;case m.closeTag:var ZA=bA.parent;if(rA.parentNodes||(bA.parent=null),bA.name!==mA.value)break;rA.stream&&ZA===DA&&(DA.children=[],bA.parent=null),(!rA.emitTopLevelOnly||ZA===DA)&&(JA.emit(rA.tagPrefix+bA.name,bA),JA.emit("tag",bA.name,bA)),bA===DA&&(IA.removeAllListeners("data"),JA.emit(rA.doneEvent,bA),DA=null),bA=ZA;break;case m.text:bA&&bA.children.push(_({type:S.text,value:mA.value,parent:rA.parentNodes?bA:null}));break;case m.attributeName:HA=mA.value,bA.attributes[HA]="";break;case m.attributeValue:bA.attributes[HA]=mA.value;break}};return JA.reset=function(){IA=f.create({debug:rA.debug}),IA.on("data",GA),DA=_(),bA=null,HA="",JA.parse=IA.write},JA.reset(),JA},D=function(rA,IA){IA=Object.assign({},IA,{stream:!1,tagPrefix:":"});var DA=v(IA),bA=void 0;return DA.on("done",function(HA){bA=HA}),DA.parse(rA),bA},k={parseSync:D},x=k.parseSync,M=function(rA){var IA=x("<root>".concat(rA,"</root>"),{parentNodes:!1}),DA=IA.children&&IA.children.length>0&&IA.children.every(function(bA){return bA.name==="svg"});if(DA)return IA.children.length===1?IA.children[0]:IA.children;throw Error("nothing to parse")},N=function(rA){return g(rA,function(IA){return q(IA)?IA:T(IA)})},T=function(rA){return rA.replace(/[-|:]([a-z])/gi,function(IA,DA){return DA.toUpperCase()})},q=function(rA){return/^(data|aria)(-\w+)/.test(rA)},P=function(rA){if(rA){var IA=String(rA);return/[&<>]/.test(IA)?"<![CDATA[".concat(IA.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):IA}return""},V=function(rA){return String(rA).replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},z=function(rA){var IA=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},DA=IA.transformNode,bA=DA===void 0?function(aA){return aA}:DA,HA=IA.camelcase,JA=HA===void 0?!1:HA,GA=function(mA){var fA;return fA=bA(mA),JA&&(fA=N(fA)),fA};return GA(M(rA))};function oA(){for(var tA=arguments.length,rA=new Array(tA),IA=0;IA<tA;IA++)rA[IA]=arguments[IA];return new Promise(function(DA,bA){try{var HA=z.apply(void 0,rA);DA(HA)}catch(JA){bA(JA)}})}var gA=function tA(rA){var IA=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},DA=IA.transformAttr,bA=DA===void 0?function(at,vA,FA){return"".concat(at,'="').concat(FA(vA),'"')}:DA,HA=IA.transformNode,JA=HA===void 0?function(at){return at}:HA,GA=IA.selfClose,aA=GA===void 0?!0:GA;if(Array.isArray(rA))return rA.map(function(at){return tA(at,{transformAttr:bA,selfClose:aA,transformNode:JA})}).join("");var mA=JA(rA);if(mA.type==="text")return P(mA.value);var fA="";for(var ZA in mA.attributes){var tt=bA(ZA,mA.attributes[ZA],V,mA.name);fA+=tt?" ".concat(tt):""}return mA.children&&mA.children.length>0||!aA?"<".concat(mA.name).concat(fA,">").concat(tA(mA.children,{transformAttr:bA,transformNode:JA,selfClose:aA}),"</").concat(mA.name,">"):"<".concat(mA.name).concat(fA,"/>")},QA=Object.assign({},{parse:oA,parseSync:z,stringify:gA});return QA})}}),oDA=Ul({"node_modules/js-beautify/js/src/core/output.js"(e,A){function t(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}t.prototype.clone_empty=function(){var o=new t(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},t.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},t.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},t.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(`
|
|
5708
5708
|
`);s!==-1?this.__character_count=o.length-s:this.__character_count+=o.length},t.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},t.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},t.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},t.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},t.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function i(o,s){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),s=s||"",o.indent_level>0&&(s=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}i.prototype.get_indent_size=function(o,s){var r=this.__base_string_length;return s=s||0,o<0&&(r=0),r+=o*this.__indent_size,r+=s,r},i.prototype.get_indent_string=function(o,s){var r=this.__base_string;return s=s||0,o<0&&(o=0,r=""),s+=o*this.__indent_size,this.__ensure_cache(s),r+=this.__cache[s],r},i.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var o=this.__cache.length,s=0,r="";this.__indent_size&&o>=this.__indent_size&&(s=Math.floor(o/this.__indent_size),o-=s*this.__indent_size,r=new Array(s+1).join(this.__indent_string)),o&&(r+=new Array(o+1).join(" ")),this.__cache.push(r)};function n(o,s){this.__indent_cache=new i(o,s),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new t(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(o,s){return this.__indent_cache.get_indent_string(o,s)},n.prototype.get_indent_size=function(o,s){return this.__indent_cache.get_indent_size(o,s)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(o){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
5709
5709
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
|
|
5710
5710
|
`);return o!==`
|
|
@@ -5789,7 +5789,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function Lut(e,A,t){if(!A||!t)retu
|
|
|
5789
5789
|
transition: opacity 0.2s;
|
|
5790
5790
|
margin-bottom: 10px;
|
|
5791
5791
|
color: red;
|
|
5792
|
-
`,hXe=({children:e,transform:A=RB(),elements:t})=>{const i=cA.useRef(null),{isShowingDRCErrors:n,hoveredErrorId:o}=n0(g=>({isShowingDRCErrors:g.is_showing_drc_errors,hoveredErrorId:g.hovered_error_id}));if(!t)return iA.jsx("div",{style:{position:"relative"},ref:i,children:e});const s=t.filter(g=>g.type==="pcb_trace_error"),r=t.filter(g=>g.type==="pcb_trace_error"&&g.message?.includes("Multiple components found with name")),a=new Map;return t.forEach(g=>{g.type==="pcb_port"&&a.set(g.pcb_port_id,g)}),iA.jsxs("div",{style:{position:"relative"},ref:i,children:[e,s.map((g,c)=>{const{pcb_port_ids:I,pcb_trace_id:l}=g,B=I?.[0]?a.get(I[0]):void 0,C=I?.[1]?a.get(I[1]):void 0,Q=t?_k(t).pcb_trace.get(l):void 0,u=g.pcb_trace_error_id||`error_${c}_${g.error_type}_${g.message?.slice(0,20)}`,E=o===u;if(B&&C){const p=Ut(A,{x:B.x,y:B.y}),f=Ut(A,{x:C.x,y:C.y}),m=!(isNaN(p.x)||isNaN(p.y)||isNaN(f.x)||isNaN(f.y)),S={x:(p.x+f.x)/2,y:(p.y+f.y)/2};if(isNaN(S.x)||isNaN(S.y))return null;const _=cDA(S,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx(BXe,{screenPort1:p,screenPort2:f,errorCenter:S,canLineBeDrawn:m,isHighlighted:E}),iA.jsx("div",{style:{position:"absolute",left:S.x-15,top:S.y-15,width:30,height:30,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:v=>{const D=v.currentTarget.nextElementSibling;if(D){const k=D.querySelector(".error-message");k&&(k.style.opacity="1")}},onMouseLeave:v=>{if(!E){const D=v.currentTarget.nextElementSibling;if(D){const k=D.querySelector(".error-message");k&&(k.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:E?200:100,left:_.left,top:_.top,color:E?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:n||E?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:_.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:E?1:0,border:`1px solid ${E?"#ff4444":"red"}`},children:g.message})})]},u)}if(Q?.route&&(n||E)){const p=Q.route.map(_=>Ut(A,{x:_.x,y:_.y}));if(p.some(_=>isNaN(_.x)||isNaN(_.y)))return null;const f=Math.floor(p.length/2),m=p[f],S=cDA(m,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx(CXe,{points:p,errorCenter:m,isHighlighted:E}),iA.jsx("div",{style:{position:"absolute",left:m.x-15,top:m.y-15,width:30,height:30,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:_=>{const v=_.currentTarget.nextElementSibling;if(v){const D=v.querySelector(".error-message");D&&(D.style.opacity="1")}},onMouseLeave:_=>{if(!E){const v=_.currentTarget.nextElementSibling;if(v){const D=v.querySelector(".error-message");D&&(D.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:E?EQ.errorOverlay+10:EQ.errorOverlay+1,left:S.left,top:S.top,color:E?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:S.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:E?1:0,border:`1px solid ${E?"#ff4444":"red"}`},children:g.message})})]},u)}return null}),r.map((g,c)=>{const I=g.component_name||g.message?.match(/name "([^"]+)"/)?.[1];if(!I)return null;const l=t?.filter(Q=>Q.type==="source_component"&&Q.name===I||Q.type==="pcb_component"&&t?.find(u=>u.type==="source_component"&&u.source_component_id===Q.source_component_id&&u.name===I))||[],B=g.pcb_trace_error_id||`error_${c}_${g.error_type}_${g.message?.slice(0,20)}`,C=o===B;return!C&&!n?null:l.map((Q,u)=>{let E={x:0,y:0};if(Q.type==="pcb_component")E=Q.center||{x:0,y:0};else if(Q.type==="source_component"){const k=t?.find(x=>x.type==="pcb_component"&&x.source_component_id===Q.source_component_id);k&&k.type==="pcb_component"&&(E=k.center||{x:0,y:0})}const p=Ut(A,E);if(isNaN(p.x)||isNaN(p.y))return null;const f=Math.abs(A.a),v=Math.max(8,Math.min(30,.5*f)),D=cDA(p,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:EQ.errorOverlay},width:"100%",height:"100%",children:C?iA.jsx("polygon",{points:`${p.x},${p.y-v*1.25} ${p.x+v},${p.y} ${p.x},${p.y+v*1.25} ${p.x-v},${p.y}`,fill:"#ff4444"}):iA.jsx("circle",{cx:p.x,cy:p.y,r:v,fill:"none",stroke:C?"#ff4444":"red",strokeWidth:C?Math.max(2,v*.15):Math.max(1,v*.1),opacity:1})}),iA.jsx("div",{style:{position:"absolute",left:p.x-(v+10),top:p.y-(v+10),width:(v+10)*2,height:(v+10)*2,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:k=>{const x=k.currentTarget.nextElementSibling;if(x){const M=x.querySelector(".error-message");M&&(M.style.opacity="1")}},onMouseLeave:k=>{if(!C){const x=k.currentTarget.nextElementSibling;if(x){const M=x.querySelector(".error-message");M&&(M.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:C?EQ.errorOverlay+20:EQ.errorOverlay+10,left:D.left,top:D.top,color:C?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:n||C?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:D.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:C?1:0,border:`1px solid ${C?"#ff4444":"red"}`},children:g.message})})]},`${B}_${u}`)})})]})};function QXe(e,A){return e.size!==A.size?!1:Array.from(e).every(t=>A.has(t))}function uXe({primitiveElement:e,elements:A}){let t=e.trace_length?`${e.trace_length.toFixed(3)}`:"";const i=_k(A).source_trace.get(e?.source_trace_id);if(i?.display_name&&(i?.max_length?t+=` / ${i.max_length}mm `:t+=" mm ",t+=`(${i.display_name})`),!t)return null;const n=e.trace_length&&i?.max_length&&e.trace_length>i.max_length;return{text:t,isOverLength:n}}function EXe(e){const{primitives:A,is_showing_multiple_traces_length:t,elements:i}=e,n=A.filter(a=>a._element.type==="pcb_trace"),o=i.filter(a=>a.type==="source_trace"),s=A.filter(a=>a._element.type!=="pcb_trace"),r=n.filter(a=>o.some(g=>a._element.type==="pcb_trace"&&a._element.source_trace_id===g.source_trace_id&&g.max_length!==void 0));if(!t)return[...s,...r];if(n.length>1){const a=n.reduce((g,c)=>{const I=g._element.trace_length;return c._element.trace_length<I?c:g},n[0]);return[...s,a]}return A}var dXe={position:"absolute",left:0,top:0,pointerEvents:"none",color:"red",fontFamily:"sans-serif",fontSize:12,textShadow:"0 0 2px black"},pXe=e=>{const{_element:A,_parent_pcb_component:t,_parent_source_component:i,_source_port:n}=e;switch(A.type){case"pcb_trace":return A.trace_length?`${A.trace_length.toFixed(3)}`:"";case"pcb_smtpad":case"pcb_plated_hole":{const o=[],s=Array.from(new Set((A.port_hints??[]).concat(n?.port_hints??[]))).filter(a=>!/^[0-9]+$/.test(a)).filter(a=>!a.includes("unnamed_")).sort((a,g)=>g.localeCompare(a)),r=i&&"name"in i&&i.name&&!i.name.includes("unnamed_")?i.name:null;return s.length>0?r?o.push(...s.map(a=>`${r}.${a}`)):o.push(...s):r&&o.push(r),o.join(", ")}default:return""}},fXe={top:"red",bottom:"aqua"},yXe=({primitive:e,mousePos:A,elements:t})=>{const[i,n]=cA.useState(!1),o=e._element;cA.useEffect(()=>{setTimeout(()=>{n(!0)},100)},[]);const[s,r,a,g]=[e.screen_x,e.screen_y,e.screen_w,e.screen_h],c=e.same_space_index??0,I=26,l=fXe[e?._element?.layer]??"red";let B=0;if(o.type==="pcb_smtpad"&&o?.shape==="rotated_rect"?B=o?.ccw_rotation??0:(o.type==="pcb_smtpad"&&(o?.shape==="pill"||o?.shape==="rotated_pill")&&"ccw_rotation"in e||o.type==="pcb_plated_hole"&&(o?.shape==="pill"||o?.shape==="oval")&&"ccw_rotation"in e)&&(B=o.ccw_rotation??0),o.type==="pcb_trace"){const u=uXe({primitiveElement:o,elements:t});if(!u)return null;const E=A.y-35;return iA.jsx("div",{style:{zIndex:EQ.elementOverlay,position:"absolute",left:A.x,top:E,color:l,pointerEvents:"none",transform:"translateX(-50%)"},children:iA.jsx("div",{style:{backgroundColor:"#f2efcc",color:u.isOverLength?"red":"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"6px 6px",borderRadius:"6px",fontSize:"14px",minWidth:"45px",textAlign:"center",whiteSpace:"nowrap"},children:u.text})})}const C=pXe(e);return C.trim().length===0?null:iA.jsx("div",{style:{zIndex:EQ.elementOverlay,position:"absolute",left:s-a/2-8,top:r-g/2-8,width:a+16,height:g+16,color:l,transform:`rotate(${-B}deg)`,transformOrigin:"center center"},children:iA.jsx("div",{style:{width:i?`calc(100% + ${I*2*c}px)`:"100%",height:i?`calc(100% + ${I*2*c}px)`:"100%",marginLeft:i?`${-I*c}px`:0,marginTop:i?`${-I*c}px`:0,border:`1px solid ${l}`,opacity:i||c===0?1:0,transition:"width 0.2s, height 0.2s, margin-left 0.2s, margin-top 0.2s, opacity 0.2s"},children:iA.jsx("div",{style:{position:"absolute",bottom:g+20+I*c,marginRight:i?`${-I*c}px`:0,marginBottom:i?0:-I*c,transition:"margin-right 0.2s, margin-bottom 0.2s",backgroundColor:"#f2efcc",color:"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"6px 6px",borderRadius:"6px",fontSize:"14px",transform:`rotate(${B}deg)`,minWidth:"45px",textAlign:"center"},children:C})})})},mXe=({highlightedPrimitives:e,mousePos:A,elements:t})=>{const[i,n]=n0(r=>[r.is_moving_component,r.is_showing_multiple_traces_length]),o=e.some(r=>r._element.type==="pcb_smtpad")&&e.some(r=>r._element.type==="pcb_trace");let s=e;return o&&(s=s.filter(r=>r._element.type==="pcb_smtpad")),s=EXe({primitives:s,is_showing_multiple_traces_length:n,elements:t}),iA.jsx("div",{style:dXe,children:!i&&s.map((r,a)=>iA.jsx(yXe,{primitive:r,mousePos:A,elements:t},a))})},wXe=e=>{const A=[];for(const t of e){if(!t.center||typeof t.width!="number"||typeof t.height!="number")continue;const i=t.width/2,n=t.height/2;A.push({x:t.center.x-i,y:t.center.y-n}),A.push({x:t.center.x+i,y:t.center.y+n})}return z6e(A)},Gy={GROUP_PADDING:1,MIN_LINE_LENGTH_FOR_LABEL:40,LABEL_OFFSET_ABOVE:2,LABEL_OFFSET_BELOW:-18,LABEL_OFFSET_RIGHT:8,LABEL_OFFSET_LEFT:-80,LINE_STROKE_WIDTH:1.5,LINE_DASH_PATTERN:"4,4",COMPONENT_MARKER_RADIUS:3,LABEL_FONT_SIZE:11},k4={OFFSET_LINE:"white",COMPONENT_MARKER_FILL:"#66ccff",COMPONENT_MARKER_STROKE:"white",LABEL_TEXT:"white"},DXe=(e,A)=>{const{minX:t,maxX:i,minY:n,maxY:o}=A,s=Math.abs(e.x-t),r=Math.abs(e.x-i),a=Math.abs(e.y-o),g=Math.abs(e.y-n),c=Math.min(s,r,a,g);return c===s?{x:t,y:e.y}:c===r?{x:i,y:e.y}:c===a?{x:e.x,y:o}:{x:e.x,y:n}},_Xe=({elements:e,highlightedPrimitives:A,transform:t,containerWidth:i,containerHeight:n,children:o})=>{if(!n0(N=>N.is_showing_group_anchor_offsets)||A.length===0)return null;const r=A.find(N=>N._parent_pcb_component?.type==="pcb_component"||N._element?.type==="pcb_component");if(!r)return null;const a=r._parent_pcb_component||r._element;if(!a?.pcb_group_id)return null;const g=e.filter(N=>N.type==="pcb_group").find(N=>N.pcb_group_id===a.pcb_group_id);if(!g?.anchor_position)return null;const c=r._element?.type==="pcb_smtpad"?{x:r.x,y:r.y}:a.center||{x:r.x,y:r.y},I=e.filter(N=>N.type==="pcb_component").filter(N=>N.pcb_group_id===g.pcb_group_id),l=wXe(I);if(!l)return null;const B={minX:l.minX-Gy.GROUP_PADDING,maxX:l.maxX+Gy.GROUP_PADDING,minY:l.minY-Gy.GROUP_PADDING,maxY:l.maxY+Gy.GROUP_PADDING},C=DXe(g.anchor_position,B),Q=c.x-C.x,u=c.y-C.y,E=Ut(t,C),p=Ut(t,c),f=Math.abs(p.x-E.x),m=Math.abs(p.y-E.y),S=p.y<E.y,_=p.x>E.x,v=S?Gy.LABEL_OFFSET_ABOVE:Gy.LABEL_OFFSET_BELOW,D=_?Gy.LABEL_OFFSET_RIGHT:Gy.LABEL_OFFSET_LEFT,k=f>Gy.MIN_LINE_LENGTH_FOR_LABEL,x=m>Gy.MIN_LINE_LENGTH_FOR_LABEL,M={color:k4.LABEL_TEXT,mixBlendMode:"difference",pointerEvents:"none",fontSize:Gy.LABEL_FONT_SIZE,fontFamily:"monospace",fontWeight:"bold"};return iA.jsxs("div",{style:{position:"absolute",left:0,top:0,width:i,height:n,overflow:"hidden",pointerEvents:"none",zIndex:EQ.dimensionOverlay},children:[iA.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none"},width:i,height:n,children:[iA.jsx("line",{x1:E.x,y1:E.y,x2:p.x,y2:E.y,stroke:k4.OFFSET_LINE,strokeWidth:Gy.LINE_STROKE_WIDTH,strokeDasharray:Gy.LINE_DASH_PATTERN}),iA.jsx("line",{x1:p.x,y1:E.y,x2:p.x,y2:p.y,stroke:k4.OFFSET_LINE,strokeWidth:Gy.LINE_STROKE_WIDTH,strokeDasharray:Gy.LINE_DASH_PATTERN}),iA.jsx("circle",{cx:p.x,cy:p.y,r:Gy.COMPONENT_MARKER_RADIUS,fill:k4.COMPONENT_MARKER_FILL,stroke:k4.COMPONENT_MARKER_STROKE,strokeWidth:1})]}),k&&iA.jsxs("div",{style:{...M,position:"absolute",left:Math.min(E.x,p.x),top:E.y+v,width:Math.abs(p.x-E.x),textAlign:"center"},children:["Δx: ",Q.toFixed(2),"mm"]}),x&&iA.jsxs("div",{style:{...M,position:"absolute",left:p.x+D,top:Math.min(E.y,p.y),height:Math.abs(p.y-E.y),display:"flex",flexDirection:"column",justifyContent:"center"},children:["Δy: ",u.toFixed(2),"mm"]})]})},yz=e=>{if(e.length===0)return null;let A=e[0].x,t=e[0].y,i=e[0].x,n=e[0].y;for(const o of e)o.x<A&&(A=o.x),o.y<t&&(t=o.y),o.x>i&&(i=o.x),o.y>n&&(n=o.y);return{center:{x:(A+i)/2,y:(t+n)/2},width:i-A,height:n-t}},Xut=(e,A)=>{if(A.length<3)return!1;let t=!1;for(let i=0,n=A.length-1;i<A.length;n=i++){const o=A[i].x,s=A[i].y,r=A[n].x,a=A[n].y;s>e.y!=a>e.y&&e.x<(r-o)*(e.y-s)/(a-s||Number.EPSILON)+o&&(t=!t)}return t},xXe=(e,A,t)=>{const i=[];for(const n of e){if(!n._element)continue;if("x1"in n&&n._element?.type==="pcb_trace"){const r=Uje({x:A.x,y:A.y},{x:n.x1,y:n.y1},{x:n.x2,y:n.y2}),a=n.width||.5,g=Math.max(a*25,2)/t.a;r<g&&i.push(n);continue}if(n.pcb_drawing_type==="polygon"){const r=n.points.map(g=>({x:Xe.parse(g.x),y:Xe.parse(g.y)})),a=yz(r);if(!a||A.x<a.center.x-a.width/2||A.x>a.center.x+a.width/2||A.y<a.center.y-a.height/2||A.y>a.center.y+a.height/2)continue;Xut(A,r)&&i.push(n);continue}if(n.pcb_drawing_type==="polygon_with_arcs"){const r=n.brep_shape.outer_ring.vertices.map(g=>({x:Xe.parse(g.x),y:Xe.parse(g.y)})),a=yz(r);if(!a||A.x<a.center.x-a.width/2||A.x>a.center.x+a.width/2||A.y<a.center.y-a.height/2||A.y>a.center.y+a.height/2)continue;Xut(A,r)&&i.push(n);continue}if(!("x"in n&&"y"in n))continue;let o=0,s=0;if("w"in n&&"h"in n)o=n.w,s=n.h;else if("r"in n)o=n.r*2,s=n.r*2;else if("rX"in n&&"rY"in n)o=n.rX*2,s=n.rY*2;else continue;Math.abs(n.x-A.x)<o/2&&Math.abs(n.y-A.y)<s/2&&i.push(n)}return i},bXe=({elements:e,children:A,transform:t,primitives:i,onMouseHoverOverPrimitives:n})=>{const[o,s]=cA.useState([]),[r,a]=cA.useState({x:0,y:0}),[g,{width:c,height:I}]=v4(),l=cA.useMemo(()=>{const C=[];for(const Q of o){if(Q._element?.type==="pcb_via"||Q._element?.type==="pcb_component"||Q?.layer==="drill")continue;let u=null,E=0,p=0;if(Q.pcb_drawing_type==="polygon"){const _=yz(Q.points);if(!_)continue;u=_.center,E=_.width,p=_.height}else if(Q.pcb_drawing_type==="polygon_with_arcs"){const _=Q.brep_shape.outer_ring.vertices.map(D=>({x:D.x,y:D.y})),v=yz(_);if(!v)continue;u=v.center,E=v.width,p=v.height}else"x"in Q&&"y"in Q&&(u={x:Q.x,y:Q.y},E="w"in Q?Q.w:"r"in Q?Q.r*2:"rX"in Q&&"rY"in Q?Q.rX*2:0,p="h"in Q?Q.h:"r"in Q?Q.r*2:"rX"in Q&&"rY"in Q?Q.rY*2:0);if(!u)continue;const f=Ut(t,u),m={w:E*t.a,h:p*t.a},S=C.filter(_=>f.x===_.screen_x&&f.y===_.screen_y&&m.w===_.screen_w&&m.h===_.screen_h).length;C.push({...Q,x:u.x,y:u.y,w:E,h:p,screen_x:f.x,screen_y:f.y,screen_w:m.w,screen_h:m.h,same_space_index:S})}return C},[o,t]),B=(C,Q,u,E)=>{a({x:C,y:Q});const p=Ut(v_(u),{x:C,y:Q}),f=xXe(E,p,u);QXe(new Set(f.map(m=>m._pcb_drawing_object_id)),new Set(o.map(m=>m._pcb_drawing_object_id)))||(s(f),n(f))};return iA.jsxs("div",{ref:g,style:{position:"relative",width:"100%",height:"100%"},onMouseMove:C=>{if(t){const Q=C.currentTarget.getBoundingClientRect(),u=C.clientX-Q.left,E=C.clientY-Q.top;B(u,E,t,i)}},onTouchStart:C=>{if(t){const Q=C.touches[0],u=C.currentTarget.getBoundingClientRect(),E=Q.clientX-u.left,p=Q.clientY-u.top;B(E,p,t,i)}},children:[A,iA.jsx(mXe,{elements:e,mousePos:r,highlightedPrimitives:l}),t&&iA.jsx(_Xe,{elements:e,highlightedPrimitives:l,transform:t,containerWidth:c,containerHeight:I})]})},$ut=["rgb(255, 100, 100)","rgb(100, 255, 100)","rgb(100, 100, 255)","rgb(255, 255, 100)","rgb(255, 100, 255)","rgb(100, 255, 255)","rgb(255, 150, 100)","rgb(150, 100, 255)","rgb(100, 255, 150)","rgb(255, 100, 150)"],SXe=({children:e,transform:A=RB(),elements:t=[]})=>{const[i,{width:n,height:o}]=v4(),s=cA.useRef(null),{is_showing_pcb_groups:r,pcb_group_view_mode:a}=n0(g=>({is_showing_pcb_groups:g.is_showing_pcb_groups,pcb_group_view_mode:g.pcb_group_view_mode}));return cA.useEffect(()=>{const g=s.current;if(!g||!n||!o)return;g.width=n,g.height=o;const c=g.getContext("2d");if(!c||(c.clearRect(0,0,n,o),!r))return;const I=t.filter(f=>f.type==="pcb_group"),l=t.filter(f=>f.type==="pcb_component"),B=t.filter(f=>f.type==="source_group"),C=new Map(B.map(f=>[f.source_group_id,f])),Q=I.filter(f=>{if(a==="all")return!0;if(!f.source_group_id)return!1;const m=C.get(f.source_group_id);return m?m.was_automatically_named!==!0:!1}),u=new Map;B.forEach(f=>{const m=f;if(m.parent_source_group_id){const S=u.get(m.parent_source_group_id)||[];S.push(f.source_group_id),u.set(m.parent_source_group_id,S)}});const E=f=>{const m=[],S=u.get(f)||[];for(const _ of S)m.push(_),m.push(...E(_));return m},p=f=>{const m=B.find(S=>S.source_group_id===f);return m?.parent_source_group_id?1+p(m.parent_source_group_id):0};Q.forEach((f,m)=>{let S=l.filter(FA=>FA.pcb_group_id===f.pcb_group_id);if(f.source_group_id){const FA=E(f.source_group_id),dA=I.filter(uA=>uA.source_group_id&&FA.includes(uA.source_group_id));for(const uA of dA){const UA=l.filter(RA=>RA.pcb_group_id===uA.pcb_group_id);S=[...S,...UA]}}if(S.length===0)return;let _=1/0,v=1/0,D=-1/0,k=-1/0;if(S.forEach(FA=>{if(FA.center&&typeof FA.width=="number"&&typeof FA.height=="number"){const dA=FA.center.x-FA.width/2,uA=FA.center.x+FA.width/2,UA=FA.center.y+FA.height/2,RA=FA.center.y-FA.height/2;_=Math.min(_,dA),D=Math.max(D,uA),v=Math.min(v,RA),k=Math.max(k,UA)}}),_===1/0||D===-1/0)return;const x=f.source_group_id?p(f.source_group_id):0,M=f.source_group_id?E(f.source_group_id).length>0:!1,q=1+(M?.5:0);_-=q,D+=q,v-=q,k+=q;const P=Ut(A,{x:_,y:k}),V=Ut(A,{x:D,y:k}),z=Ut(A,{x:_,y:v}),oA=Ut(A,{x:D,y:v}),gA=$ut[m%$ut.length];c.strokeStyle=gA,c.lineWidth=2;const QA=Math.max(4,Math.min(12,8*Math.abs(A.a))),tA=Math.max(2,Math.min(6,4*Math.abs(A.a))),IA=QA*(M?1.3:1),DA=tA;c.setLineDash([IA,DA]),c.beginPath(),c.moveTo(P.x,P.y),c.lineTo(V.x,V.y),c.lineTo(oA.x,oA.y),c.lineTo(z.x,z.y),c.closePath(),c.stroke();const bA=Math.max(8,Math.min(12,10*Math.abs(A.a))),HA=x==0||x==1?0:x*.11,JA=bA*(1-HA),GA=4,aA=f.name||`Group ${m+1}`;c.font=`${JA}px sans-serif`,c.setLineDash([]);const fA=c.measureText(aA).width+GA*2,ZA=JA+GA*2,tt=P.x-5,at=P.y-5,vA=3;if(c.fillStyle="rgba(0, 0, 0, 0.8)",c.beginPath(),c.roundRect(tt,at-ZA,fA,ZA,vA),c.fill(),c.fillStyle=gA,c.textAlign="left",c.textBaseline="middle",c.fillText(aA,tt+GA,at-ZA/2),f.anchor_position){const FA=f.anchor_position,dA=_,uA=D,UA=k,RA=v;let kA={x:FA.x,y:FA.y};const KA=Math.abs(FA.x-dA),YA=Math.abs(FA.x-uA),XA=Math.abs(FA.y-UA),et=Math.abs(FA.y-RA),It=Math.min(KA,YA,XA,et);It===KA?kA={x:dA,y:FA.y}:It===YA?kA={x:uA,y:FA.y}:It===XA?kA={x:FA.x,y:UA}:kA={x:FA.x,y:RA};const ut=Ut(A,kA);c.strokeStyle="white",c.lineWidth=1.5,c.setLineDash([]);const Et=Math.max(4,Math.min(8,6*Math.abs(A.a)));c.beginPath(),c.moveTo(ut.x-Et,ut.y),c.lineTo(ut.x+Et,ut.y),c.stroke(),c.beginPath(),c.moveTo(ut.x,ut.y-Et),c.lineTo(ut.x,ut.y+Et),c.stroke()}})},[t,A,n,o,r,a]),iA.jsxs("div",{ref:i,style:{position:"relative",width:"100%",height:"100%"},children:[e,iA.jsx("canvas",{ref:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:EQ.pcbGroupOverlay,display:r?"block":"none"}})]})},vXe=({transform:e,soup:A,children:t})=>{const i=n0(r=>r.is_showing_rats_nest),{netMap:n,idToNetMap:o}=cA.useMemo(()=>qut(A||[]),[A]),s=cA.useMemo(()=>{if(!A||!i)return[];const r=l=>{const B=_k(A)[l.replace(/_\d+$/,"")].get(l);return B&&"x"in B&&"y"in B?{x:B.x,y:B.y}:null},a=(l,B)=>{const C=n[B]||[];let Q=null,u=1/0;return C.forEach(E=>{const p=r(E);if(p){const f=Math.sqrt((l.x-p.x)**2+(l.y-p.y)**2);f<u&&f>0&&(u=f,Q=p)}}),Q},g=_k(A).pcb_port.list(),c=_k(A).source_trace.list(),I=[];return g.forEach((l,B)=>{const C=o[l.pcb_port_id];let Q=!1;for(const p of c)p.connected_source_port_ids.includes(l.source_port_id)&&p.connected_source_net_ids.length>0&&(Q=!0);if(!C)return;const u={x:l.x,y:l.y},E=a(u,C);E&&I.push({key:`${l.pcb_port_id}-${B}`,startPoint:u,endPoint:E,isInNet:Q})}),I},[A,n,o,i]);return!A||!i?t:(e||(e=RB()),iA.jsxs("div",{style:{position:"relative"},children:[t,iA.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",opacity:.5,zIndex:EQ.ratsNestOverlay},children:s.map(({key:r,startPoint:a,endPoint:g,isInNet:c})=>{const I=Ut(e,a),l=Ut(e,g);return iA.jsx("line",{x1:I.x,y1:I.y,x2:l.x,y2:l.y,stroke:"white",strokeWidth:"1",strokeDasharray:c?"6,6":void 0},r)})})]}))},kXe={version:"1.11.268"},xk=(e,A)=>{const t=n0(i=>i.is_mouse_over_container);cA.useEffect(()=>{if(!e||typeof A!="function")return;const i=n=>{const o=e.split("+"),s=o.includes("ctrl"),r=o.includes("shift"),a=o.includes("alt"),g=o.includes("meta"),c=o[o.length-1];t&&(!s||n.ctrlKey)&&(!r||n.shiftKey)&&(!a||n.altKey)&&(!g||n.metaKey)&&n.key.toLowerCase()===c.toLowerCase()&&(n.preventDefault(),A())};return window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},[e,A])},RXe=()=>{const[e,A]=cA.useState(!1);return cA.useEffect(()=>{const t=()=>{A(window.innerWidth<=768)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),e},FXe=({name:e,selected:A,onClick:t})=>iA.jsxs("div",{className:fL`
|
|
5792
|
+
`,hXe=({children:e,transform:A=RB(),elements:t})=>{const i=cA.useRef(null),{isShowingDRCErrors:n,hoveredErrorId:o}=n0(g=>({isShowingDRCErrors:g.is_showing_drc_errors,hoveredErrorId:g.hovered_error_id}));if(!t)return iA.jsx("div",{style:{position:"relative"},ref:i,children:e});const s=t.filter(g=>g.type==="pcb_trace_error"),r=t.filter(g=>g.type==="pcb_trace_error"&&g.message?.includes("Multiple components found with name")),a=new Map;return t.forEach(g=>{g.type==="pcb_port"&&a.set(g.pcb_port_id,g)}),iA.jsxs("div",{style:{position:"relative"},ref:i,children:[e,s.map((g,c)=>{const{pcb_port_ids:I,pcb_trace_id:l}=g,B=I?.[0]?a.get(I[0]):void 0,C=I?.[1]?a.get(I[1]):void 0,Q=t?_k(t).pcb_trace.get(l):void 0,u=g.pcb_trace_error_id||`error_${c}_${g.error_type}_${g.message?.slice(0,20)}`,E=o===u;if(B&&C){const p=Ut(A,{x:B.x,y:B.y}),f=Ut(A,{x:C.x,y:C.y}),m=!(isNaN(p.x)||isNaN(p.y)||isNaN(f.x)||isNaN(f.y)),S={x:(p.x+f.x)/2,y:(p.y+f.y)/2};if(isNaN(S.x)||isNaN(S.y))return null;const _=cDA(S,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx(BXe,{screenPort1:p,screenPort2:f,errorCenter:S,canLineBeDrawn:m,isHighlighted:E}),iA.jsx("div",{style:{position:"absolute",left:S.x-15,top:S.y-15,width:30,height:30,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:v=>{const D=v.currentTarget.nextElementSibling;if(D){const k=D.querySelector(".error-message");k&&(k.style.opacity="1")}},onMouseLeave:v=>{if(!E){const D=v.currentTarget.nextElementSibling;if(D){const k=D.querySelector(".error-message");k&&(k.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:E?200:100,left:_.left,top:_.top,color:E?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:n||E?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:_.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:E?1:0,border:`1px solid ${E?"#ff4444":"red"}`},children:g.message})})]},u)}if(Q?.route&&(n||E)){const p=Q.route.map(_=>Ut(A,{x:_.x,y:_.y}));if(p.some(_=>isNaN(_.x)||isNaN(_.y)))return null;const f=Math.floor(p.length/2),m=p[f],S=cDA(m,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx(CXe,{points:p,errorCenter:m,isHighlighted:E}),iA.jsx("div",{style:{position:"absolute",left:m.x-15,top:m.y-15,width:30,height:30,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:_=>{const v=_.currentTarget.nextElementSibling;if(v){const D=v.querySelector(".error-message");D&&(D.style.opacity="1")}},onMouseLeave:_=>{if(!E){const v=_.currentTarget.nextElementSibling;if(v){const D=v.querySelector(".error-message");D&&(D.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:E?EQ.errorOverlay+10:EQ.errorOverlay+1,left:S.left,top:S.top,color:E?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:S.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:E?1:0,border:`1px solid ${E?"#ff4444":"red"}`},children:g.message})})]},u)}return null}),r.map((g,c)=>{const I=g.component_name||g.message?.match(/name "([^"]+)"/)?.[1];if(!I)return null;const l=t?.filter(Q=>Q.type==="source_component"&&Q.name===I||Q.type==="pcb_component"&&t?.find(u=>u.type==="source_component"&&u.source_component_id===Q.source_component_id&&u.name===I))||[],B=g.pcb_trace_error_id||`error_${c}_${g.error_type}_${g.message?.slice(0,20)}`,C=o===B;return!C&&!n?null:l.map((Q,u)=>{let E={x:0,y:0};if(Q.type==="pcb_component")E=Q.center||{x:0,y:0};else if(Q.type==="source_component"){const k=t?.find(x=>x.type==="pcb_component"&&x.source_component_id===Q.source_component_id);k&&k.type==="pcb_component"&&(E=k.center||{x:0,y:0})}const p=Ut(A,E);if(isNaN(p.x)||isNaN(p.y))return null;const f=Math.abs(A.a),v=Math.max(8,Math.min(30,.5*f)),D=cDA(p,i);return iA.jsxs(cA.Fragment,{children:[iA.jsx("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none",mixBlendMode:"difference",zIndex:EQ.errorOverlay},width:"100%",height:"100%",children:C?iA.jsx("polygon",{points:`${p.x},${p.y-v*1.25} ${p.x+v},${p.y} ${p.x},${p.y+v*1.25} ${p.x-v},${p.y}`,fill:"#ff4444"}):iA.jsx("circle",{cx:p.x,cy:p.y,r:v,fill:"none",stroke:C?"#ff4444":"red",strokeWidth:C?Math.max(2,v*.15):Math.max(1,v*.1),opacity:1})}),iA.jsx("div",{style:{position:"absolute",left:p.x-(v+10),top:p.y-(v+10),width:(v+10)*2,height:(v+10)*2,zIndex:EQ.errorOverlay+5,cursor:"pointer",borderRadius:"50%"},onMouseEnter:k=>{const x=k.currentTarget.nextElementSibling;if(x){const M=x.querySelector(".error-message");M&&(M.style.opacity="1")}},onMouseLeave:k=>{if(!C){const x=k.currentTarget.nextElementSibling;if(x){const M=x.querySelector(".error-message");M&&(M.style.opacity="0")}}}}),iA.jsx("div",{style:{position:"absolute",zIndex:C?EQ.errorOverlay+20:EQ.errorOverlay+10,left:D.left,top:D.top,color:C?"#ff4444":"red",textAlign:"center",fontFamily:"sans-serif",fontSize:12,display:n||C?"flex":"none",flexDirection:"column",alignItems:"center",pointerEvents:"none",transform:D.transform},children:iA.jsx("div",{className:`error-message ${IDA}`,style:{opacity:C?1:0,border:`1px solid ${C?"#ff4444":"red"}`},children:g.message})})]},`${B}_${u}`)})})]})};function QXe(e,A){return e.size!==A.size?!1:Array.from(e).every(t=>A.has(t))}function uXe({primitiveElement:e,elements:A}){let t=e.trace_length?`${e.trace_length.toFixed(3)}`:"";const i=_k(A).source_trace.get(e?.source_trace_id);if(i?.display_name&&(i?.max_length?t+=` / ${i.max_length}mm `:t+=" mm ",t+=`(${i.display_name})`),!t)return null;const n=e.trace_length&&i?.max_length&&e.trace_length>i.max_length;return{text:t,isOverLength:n}}function EXe(e){const{primitives:A,is_showing_multiple_traces_length:t,elements:i}=e,n=A.filter(a=>a._element.type==="pcb_trace"),o=i.filter(a=>a.type==="source_trace"),s=A.filter(a=>a._element.type!=="pcb_trace"),r=n.filter(a=>o.some(g=>a._element.type==="pcb_trace"&&a._element.source_trace_id===g.source_trace_id&&g.max_length!==void 0));if(!t)return[...s,...r];if(n.length>1){const a=n.reduce((g,c)=>{const I=g._element.trace_length;return c._element.trace_length<I?c:g},n[0]);return[...s,a]}return A}var dXe={position:"absolute",left:0,top:0,pointerEvents:"none",color:"red",fontFamily:"sans-serif",fontSize:12,textShadow:"0 0 2px black"},pXe=e=>{const{_element:A,_parent_pcb_component:t,_parent_source_component:i,_source_port:n}=e;switch(A.type){case"pcb_trace":return A.trace_length?`${A.trace_length.toFixed(3)}`:"";case"pcb_smtpad":case"pcb_plated_hole":{const o=[],s=Array.from(new Set((A.port_hints??[]).concat(n?.port_hints??[]))).filter(a=>!/^[0-9]+$/.test(a)).filter(a=>!a.includes("unnamed_")).sort((a,g)=>g.localeCompare(a)),r=i&&"name"in i&&i.name&&!i.name.includes("unnamed_")?i.name:null;return s.length>0?r?o.push(...s.map(a=>`${r}.${a}`)):o.push(...s):r&&o.push(r),o.join(", ")}default:return""}},fXe={top:"red",bottom:"aqua"},yXe=({primitive:e,mousePos:A,elements:t})=>{const[i,n]=cA.useState(!1),o=e._element;cA.useEffect(()=>{setTimeout(()=>{n(!0)},100)},[]);const[s,r,a,g]=[e.screen_x,e.screen_y,e.screen_w,e.screen_h],c=e.same_space_index??0,I=26,l=fXe[e?._element?.layer]??"red";let B=0;if(o.type==="pcb_smtpad"&&o?.shape==="rotated_rect"?B=o?.ccw_rotation??0:(o.type==="pcb_smtpad"&&(o?.shape==="pill"||o?.shape==="rotated_pill")&&"ccw_rotation"in e||o.type==="pcb_plated_hole"&&(o?.shape==="pill"||o?.shape==="oval")&&"ccw_rotation"in e)&&(B=o.ccw_rotation??0),o.type==="pcb_trace"){const u=uXe({primitiveElement:o,elements:t});if(!u)return null;const E=A.y-35;return iA.jsx("div",{style:{zIndex:EQ.elementOverlay,position:"absolute",left:A.x,top:E,color:l,pointerEvents:"none",transform:"translateX(-50%)"},children:iA.jsx("div",{style:{backgroundColor:"#f2efcc",color:u.isOverLength?"red":"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"6px 6px",borderRadius:"6px",fontSize:"14px",minWidth:"45px",textAlign:"center",whiteSpace:"nowrap"},children:u.text})})}const C=pXe(e);return C.trim().length===0?null:iA.jsx("div",{style:{zIndex:EQ.elementOverlay,position:"absolute",left:s-a/2-8,top:r-g/2-8,width:a+16,height:g+16,color:l,transform:`rotate(${-B}deg)`,transformOrigin:"center center"},children:iA.jsx("div",{style:{width:i?`calc(100% + ${I*2*c}px)`:"100%",height:i?`calc(100% + ${I*2*c}px)`:"100%",marginLeft:i?`${-I*c}px`:0,marginTop:i?`${-I*c}px`:0,border:`1px solid ${l}`,opacity:i||c===0?1:0,transition:"width 0.2s, height 0.2s, margin-left 0.2s, margin-top 0.2s, opacity 0.2s"},children:iA.jsx("div",{style:{position:"absolute",bottom:g+20+I*c,marginRight:i?`${-I*c}px`:0,marginBottom:i?0:-I*c,transition:"margin-right 0.2s, margin-bottom 0.2s",backgroundColor:"#f2efcc",color:"black",textShadow:"none",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:"6px 6px",borderRadius:"6px",fontSize:"14px",transform:`rotate(${B}deg)`,minWidth:"45px",textAlign:"center"},children:C})})})},mXe=({highlightedPrimitives:e,mousePos:A,elements:t})=>{const[i,n]=n0(r=>[r.is_moving_component,r.is_showing_multiple_traces_length]),o=e.some(r=>r._element.type==="pcb_smtpad")&&e.some(r=>r._element.type==="pcb_trace");let s=e;return o&&(s=s.filter(r=>r._element.type==="pcb_smtpad")),s=EXe({primitives:s,is_showing_multiple_traces_length:n,elements:t}),iA.jsx("div",{style:dXe,children:!i&&s.map((r,a)=>iA.jsx(yXe,{primitive:r,mousePos:A,elements:t},a))})},wXe=e=>{const A=[];for(const t of e){if(!t.center||typeof t.width!="number"||typeof t.height!="number")continue;const i=t.width/2,n=t.height/2;A.push({x:t.center.x-i,y:t.center.y-n}),A.push({x:t.center.x+i,y:t.center.y+n})}return z6e(A)},Gy={GROUP_PADDING:1,MIN_LINE_LENGTH_FOR_LABEL:40,LABEL_OFFSET_ABOVE:2,LABEL_OFFSET_BELOW:-18,LABEL_OFFSET_RIGHT:8,LABEL_OFFSET_LEFT:-80,LINE_STROKE_WIDTH:1.5,LINE_DASH_PATTERN:"4,4",COMPONENT_MARKER_RADIUS:3,LABEL_FONT_SIZE:11},k4={OFFSET_LINE:"white",COMPONENT_MARKER_FILL:"#66ccff",COMPONENT_MARKER_STROKE:"white",LABEL_TEXT:"white"},DXe=(e,A)=>{const{minX:t,maxX:i,minY:n,maxY:o}=A,s=Math.abs(e.x-t),r=Math.abs(e.x-i),a=Math.abs(e.y-o),g=Math.abs(e.y-n),c=Math.min(s,r,a,g);return c===s?{x:t,y:e.y}:c===r?{x:i,y:e.y}:c===a?{x:e.x,y:o}:{x:e.x,y:n}},_Xe=({elements:e,highlightedPrimitives:A,transform:t,containerWidth:i,containerHeight:n,children:o})=>{if(!n0(N=>N.is_showing_group_anchor_offsets)||A.length===0)return null;const r=A.find(N=>N._parent_pcb_component?.type==="pcb_component"||N._element?.type==="pcb_component");if(!r)return null;const a=r._parent_pcb_component||r._element;if(!a?.pcb_group_id)return null;const g=e.filter(N=>N.type==="pcb_group").find(N=>N.pcb_group_id===a.pcb_group_id);if(!g?.anchor_position)return null;const c=r._element?.type==="pcb_smtpad"?{x:r.x,y:r.y}:a.center||{x:r.x,y:r.y},I=e.filter(N=>N.type==="pcb_component").filter(N=>N.pcb_group_id===g.pcb_group_id),l=wXe(I);if(!l)return null;const B={minX:l.minX-Gy.GROUP_PADDING,maxX:l.maxX+Gy.GROUP_PADDING,minY:l.minY-Gy.GROUP_PADDING,maxY:l.maxY+Gy.GROUP_PADDING},C=DXe(g.anchor_position,B),Q=c.x-C.x,u=c.y-C.y,E=Ut(t,C),p=Ut(t,c),f=Math.abs(p.x-E.x),m=Math.abs(p.y-E.y),S=p.y<E.y,_=p.x>E.x,v=S?Gy.LABEL_OFFSET_ABOVE:Gy.LABEL_OFFSET_BELOW,D=_?Gy.LABEL_OFFSET_RIGHT:Gy.LABEL_OFFSET_LEFT,k=f>Gy.MIN_LINE_LENGTH_FOR_LABEL,x=m>Gy.MIN_LINE_LENGTH_FOR_LABEL,M={color:k4.LABEL_TEXT,mixBlendMode:"difference",pointerEvents:"none",fontSize:Gy.LABEL_FONT_SIZE,fontFamily:"monospace",fontWeight:"bold"};return iA.jsxs("div",{style:{position:"absolute",left:0,top:0,width:i,height:n,overflow:"hidden",pointerEvents:"none",zIndex:EQ.dimensionOverlay},children:[iA.jsxs("svg",{style:{position:"absolute",left:0,top:0,pointerEvents:"none"},width:i,height:n,children:[iA.jsx("line",{x1:E.x,y1:E.y,x2:p.x,y2:E.y,stroke:k4.OFFSET_LINE,strokeWidth:Gy.LINE_STROKE_WIDTH,strokeDasharray:Gy.LINE_DASH_PATTERN}),iA.jsx("line",{x1:p.x,y1:E.y,x2:p.x,y2:p.y,stroke:k4.OFFSET_LINE,strokeWidth:Gy.LINE_STROKE_WIDTH,strokeDasharray:Gy.LINE_DASH_PATTERN}),iA.jsx("circle",{cx:p.x,cy:p.y,r:Gy.COMPONENT_MARKER_RADIUS,fill:k4.COMPONENT_MARKER_FILL,stroke:k4.COMPONENT_MARKER_STROKE,strokeWidth:1})]}),k&&iA.jsxs("div",{style:{...M,position:"absolute",left:Math.min(E.x,p.x),top:E.y+v,width:Math.abs(p.x-E.x),textAlign:"center"},children:["Δx: ",Q.toFixed(2),"mm"]}),x&&iA.jsxs("div",{style:{...M,position:"absolute",left:p.x+D,top:Math.min(E.y,p.y),height:Math.abs(p.y-E.y),display:"flex",flexDirection:"column",justifyContent:"center"},children:["Δy: ",u.toFixed(2),"mm"]})]})},yz=e=>{if(e.length===0)return null;let A=e[0].x,t=e[0].y,i=e[0].x,n=e[0].y;for(const o of e)o.x<A&&(A=o.x),o.y<t&&(t=o.y),o.x>i&&(i=o.x),o.y>n&&(n=o.y);return{center:{x:(A+i)/2,y:(t+n)/2},width:i-A,height:n-t}},Xut=(e,A)=>{if(A.length<3)return!1;let t=!1;for(let i=0,n=A.length-1;i<A.length;n=i++){const o=A[i].x,s=A[i].y,r=A[n].x,a=A[n].y;s>e.y!=a>e.y&&e.x<(r-o)*(e.y-s)/(a-s||Number.EPSILON)+o&&(t=!t)}return t},xXe=(e,A,t)=>{const i=[];for(const n of e){if(!n._element)continue;if("x1"in n&&n._element?.type==="pcb_trace"){const r=Uje({x:A.x,y:A.y},{x:n.x1,y:n.y1},{x:n.x2,y:n.y2}),a=n.width||.5,g=Math.max(a*25,2)/t.a;r<g&&i.push(n);continue}if(n.pcb_drawing_type==="polygon"){const r=n.points.map(g=>({x:Xe.parse(g.x),y:Xe.parse(g.y)})),a=yz(r);if(!a||A.x<a.center.x-a.width/2||A.x>a.center.x+a.width/2||A.y<a.center.y-a.height/2||A.y>a.center.y+a.height/2)continue;Xut(A,r)&&i.push(n);continue}if(n.pcb_drawing_type==="polygon_with_arcs"){const r=n.brep_shape.outer_ring.vertices.map(g=>({x:Xe.parse(g.x),y:Xe.parse(g.y)})),a=yz(r);if(!a||A.x<a.center.x-a.width/2||A.x>a.center.x+a.width/2||A.y<a.center.y-a.height/2||A.y>a.center.y+a.height/2)continue;Xut(A,r)&&i.push(n);continue}if(!("x"in n&&"y"in n))continue;let o=0,s=0;if("w"in n&&"h"in n)o=n.w,s=n.h;else if("r"in n)o=n.r*2,s=n.r*2;else if("rX"in n&&"rY"in n)o=n.rX*2,s=n.rY*2;else continue;Math.abs(n.x-A.x)<o/2&&Math.abs(n.y-A.y)<s/2&&i.push(n)}return i},bXe=({elements:e,children:A,transform:t,primitives:i,onMouseHoverOverPrimitives:n})=>{const[o,s]=cA.useState([]),[r,a]=cA.useState({x:0,y:0}),[g,{width:c,height:I}]=v4(),l=cA.useMemo(()=>{const C=[];for(const Q of o){if(Q._element?.type==="pcb_via"||Q._element?.type==="pcb_component"||Q?.layer==="drill")continue;let u=null,E=0,p=0;if(Q.pcb_drawing_type==="polygon"){const _=yz(Q.points);if(!_)continue;u=_.center,E=_.width,p=_.height}else if(Q.pcb_drawing_type==="polygon_with_arcs"){const _=Q.brep_shape.outer_ring.vertices.map(D=>({x:D.x,y:D.y})),v=yz(_);if(!v)continue;u=v.center,E=v.width,p=v.height}else"x"in Q&&"y"in Q&&(u={x:Q.x,y:Q.y},E="w"in Q?Q.w:"r"in Q?Q.r*2:"rX"in Q&&"rY"in Q?Q.rX*2:0,p="h"in Q?Q.h:"r"in Q?Q.r*2:"rX"in Q&&"rY"in Q?Q.rY*2:0);if(!u)continue;const f=Ut(t,u),m={w:E*t.a,h:p*t.a},S=C.filter(_=>f.x===_.screen_x&&f.y===_.screen_y&&m.w===_.screen_w&&m.h===_.screen_h).length;C.push({...Q,x:u.x,y:u.y,w:E,h:p,screen_x:f.x,screen_y:f.y,screen_w:m.w,screen_h:m.h,same_space_index:S})}return C},[o,t]),B=(C,Q,u,E)=>{a({x:C,y:Q});const p=Ut(v_(u),{x:C,y:Q}),f=xXe(E,p,u);QXe(new Set(f.map(m=>m._pcb_drawing_object_id)),new Set(o.map(m=>m._pcb_drawing_object_id)))||(s(f),n(f))};return iA.jsxs("div",{ref:g,style:{position:"relative",width:"100%",height:"100%"},onMouseMove:C=>{if(t){const Q=C.currentTarget.getBoundingClientRect(),u=C.clientX-Q.left,E=C.clientY-Q.top;B(u,E,t,i)}},onTouchStart:C=>{if(t){const Q=C.touches[0],u=C.currentTarget.getBoundingClientRect(),E=Q.clientX-u.left,p=Q.clientY-u.top;B(E,p,t,i)}},children:[A,iA.jsx(mXe,{elements:e,mousePos:r,highlightedPrimitives:l}),t&&iA.jsx(_Xe,{elements:e,highlightedPrimitives:l,transform:t,containerWidth:c,containerHeight:I})]})},$ut=["rgb(255, 100, 100)","rgb(100, 255, 100)","rgb(100, 100, 255)","rgb(255, 255, 100)","rgb(255, 100, 255)","rgb(100, 255, 255)","rgb(255, 150, 100)","rgb(150, 100, 255)","rgb(100, 255, 150)","rgb(255, 100, 150)"],SXe=({children:e,transform:A=RB(),elements:t=[]})=>{const[i,{width:n,height:o}]=v4(),s=cA.useRef(null),{is_showing_pcb_groups:r,pcb_group_view_mode:a}=n0(g=>({is_showing_pcb_groups:g.is_showing_pcb_groups,pcb_group_view_mode:g.pcb_group_view_mode}));return cA.useEffect(()=>{const g=s.current;if(!g||!n||!o)return;g.width=n,g.height=o;const c=g.getContext("2d");if(!c||(c.clearRect(0,0,n,o),!r))return;const I=t.filter(f=>f.type==="pcb_group"),l=t.filter(f=>f.type==="pcb_component"),B=t.filter(f=>f.type==="source_group"),C=new Map(B.map(f=>[f.source_group_id,f])),Q=I.filter(f=>{if(a==="all")return!0;if(!f.source_group_id)return!1;const m=C.get(f.source_group_id);return m?m.was_automatically_named!==!0:!1}),u=new Map;B.forEach(f=>{const m=f;if(m.parent_source_group_id){const S=u.get(m.parent_source_group_id)||[];S.push(f.source_group_id),u.set(m.parent_source_group_id,S)}});const E=f=>{const m=[],S=u.get(f)||[];for(const _ of S)m.push(_),m.push(...E(_));return m},p=f=>{const m=B.find(S=>S.source_group_id===f);return m?.parent_source_group_id?1+p(m.parent_source_group_id):0};Q.forEach((f,m)=>{let S=l.filter(FA=>FA.pcb_group_id===f.pcb_group_id);if(f.source_group_id){const FA=E(f.source_group_id),dA=I.filter(uA=>uA.source_group_id&&FA.includes(uA.source_group_id));for(const uA of dA){const UA=l.filter(RA=>RA.pcb_group_id===uA.pcb_group_id);S=[...S,...UA]}}if(S.length===0)return;let _=1/0,v=1/0,D=-1/0,k=-1/0;if(S.forEach(FA=>{if(FA.center&&typeof FA.width=="number"&&typeof FA.height=="number"){const dA=FA.center.x-FA.width/2,uA=FA.center.x+FA.width/2,UA=FA.center.y+FA.height/2,RA=FA.center.y-FA.height/2;_=Math.min(_,dA),D=Math.max(D,uA),v=Math.min(v,RA),k=Math.max(k,UA)}}),_===1/0||D===-1/0)return;const x=f.source_group_id?p(f.source_group_id):0,M=f.source_group_id?E(f.source_group_id).length>0:!1,q=1+(M?.5:0);_-=q,D+=q,v-=q,k+=q;const P=Ut(A,{x:_,y:k}),V=Ut(A,{x:D,y:k}),z=Ut(A,{x:_,y:v}),oA=Ut(A,{x:D,y:v}),gA=$ut[m%$ut.length];c.strokeStyle=gA,c.lineWidth=2;const QA=Math.max(4,Math.min(12,8*Math.abs(A.a))),tA=Math.max(2,Math.min(6,4*Math.abs(A.a))),IA=QA*(M?1.3:1),DA=tA;c.setLineDash([IA,DA]),c.beginPath(),c.moveTo(P.x,P.y),c.lineTo(V.x,V.y),c.lineTo(oA.x,oA.y),c.lineTo(z.x,z.y),c.closePath(),c.stroke();const bA=Math.max(8,Math.min(12,10*Math.abs(A.a))),HA=x==0||x==1?0:x*.11,JA=bA*(1-HA),GA=4,aA=f.name||`Group ${m+1}`;c.font=`${JA}px sans-serif`,c.setLineDash([]);const fA=c.measureText(aA).width+GA*2,ZA=JA+GA*2,tt=P.x-5,at=P.y-5,vA=3;if(c.fillStyle="rgba(0, 0, 0, 0.8)",c.beginPath(),c.roundRect(tt,at-ZA,fA,ZA,vA),c.fill(),c.fillStyle=gA,c.textAlign="left",c.textBaseline="middle",c.fillText(aA,tt+GA,at-ZA/2),f.anchor_position){const FA=f.anchor_position,dA=_,uA=D,UA=k,RA=v;let kA={x:FA.x,y:FA.y};const KA=Math.abs(FA.x-dA),YA=Math.abs(FA.x-uA),XA=Math.abs(FA.y-UA),et=Math.abs(FA.y-RA),It=Math.min(KA,YA,XA,et);It===KA?kA={x:dA,y:FA.y}:It===YA?kA={x:uA,y:FA.y}:It===XA?kA={x:FA.x,y:UA}:kA={x:FA.x,y:RA};const ut=Ut(A,kA);c.strokeStyle="white",c.lineWidth=1.5,c.setLineDash([]);const Et=Math.max(4,Math.min(8,6*Math.abs(A.a)));c.beginPath(),c.moveTo(ut.x-Et,ut.y),c.lineTo(ut.x+Et,ut.y),c.stroke(),c.beginPath(),c.moveTo(ut.x,ut.y-Et),c.lineTo(ut.x,ut.y+Et),c.stroke()}})},[t,A,n,o,r,a]),iA.jsxs("div",{ref:i,style:{position:"relative",width:"100%",height:"100%"},children:[e,iA.jsx("canvas",{ref:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none",zIndex:EQ.pcbGroupOverlay,display:r?"block":"none"}})]})},vXe=({transform:e,soup:A,children:t})=>{const i=n0(r=>r.is_showing_rats_nest),{netMap:n,idToNetMap:o}=cA.useMemo(()=>qut(A||[]),[A]),s=cA.useMemo(()=>{if(!A||!i)return[];const r=l=>{const B=_k(A)[l.replace(/_\d+$/,"")].get(l);return B&&"x"in B&&"y"in B?{x:B.x,y:B.y}:null},a=(l,B)=>{const C=n[B]||[];let Q=null,u=1/0;return C.forEach(E=>{const p=r(E);if(p){const f=Math.sqrt((l.x-p.x)**2+(l.y-p.y)**2);f<u&&f>0&&(u=f,Q=p)}}),Q},g=_k(A).pcb_port.list(),c=_k(A).source_trace.list(),I=[];return g.forEach((l,B)=>{const C=o[l.pcb_port_id];let Q=!1;for(const p of c)p.connected_source_port_ids.includes(l.source_port_id)&&p.connected_source_net_ids.length>0&&(Q=!0);if(!C)return;const u={x:l.x,y:l.y},E=a(u,C);E&&I.push({key:`${l.pcb_port_id}-${B}`,startPoint:u,endPoint:E,isInNet:Q})}),I},[A,n,o,i]);return!A||!i?t:(e||(e=RB()),iA.jsxs("div",{style:{position:"relative"},children:[t,iA.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",opacity:.5,zIndex:EQ.ratsNestOverlay},children:s.map(({key:r,startPoint:a,endPoint:g,isInNet:c})=>{const I=Ut(e,a),l=Ut(e,g);return iA.jsx("line",{x1:I.x,y1:I.y,x2:l.x,y2:l.y,stroke:"white",strokeWidth:"1",strokeDasharray:c?"6,6":void 0},r)})})]}))},kXe={version:"1.11.271"},xk=(e,A)=>{const t=n0(i=>i.is_mouse_over_container);cA.useEffect(()=>{if(!e||typeof A!="function")return;const i=n=>{const o=e.split("+"),s=o.includes("ctrl"),r=o.includes("shift"),a=o.includes("alt"),g=o.includes("meta"),c=o[o.length-1];t&&(!s||n.ctrlKey)&&(!r||n.shiftKey)&&(!a||n.altKey)&&(!g||n.metaKey)&&n.key.toLowerCase()===c.toLowerCase()&&(n.preventDefault(),A())};return window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},[e,A])},RXe=()=>{const[e,A]=cA.useState(!1);return cA.useEffect(()=>{const t=()=>{A(window.innerWidth<=768)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),e},FXe=({name:e,selected:A,onClick:t})=>iA.jsxs("div",{className:fL`
|
|
5793
5793
|
margin-top: 2px;
|
|
5794
5794
|
padding: 4px;
|
|
5795
5795
|
padding-left: 8px;
|
|
@@ -5874,7 +5874,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function Lut(e,A,t){if(!A||!t)retu
|
|
|
5874
5874
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5875
5875
|
* Released under the MIT License.
|
|
5876
5876
|
*)
|
|
5877
|
-
*/const YXe=({containerClassName:e,...A})=>{const t=cA.useRef(null),[i,n]=cA.useState(620);return cA.useLayoutEffect(()=>{const o=()=>{if(t.current){const r=t.current.clientHeight,a=window.innerHeight;n(Math.min(Math.max(r,620),a))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),iA.jsx("div",{ref:t,className:e||"rf-w-full rf-h-full",children:iA.jsx(HXe,{...A,height:i})})},JXe='*,: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.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-60px\\)\\]{height:calc(100vh - 60px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.\\!rf-w-\\[95vw\\]{width:95vw!important}.rf-w-1{width:.25rem}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[95vw\\]{max-width:95vw!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/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-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-border-t-blue-600{--tw-border-opacity:1;border-top-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.rf-peer:disabled~.peer-disabled\\:rf-cursor-not-allowed{cursor:not-allowed}.rf-peer:disabled~.peer-disabled\\:rf-opacity-70{opacity:.7}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-mt-4{margin-top:1rem}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-h-5{height:1.25rem}.sm\\:rf-w-1\\/2{width:50%}.sm\\:rf-w-5{width:1.25rem}.sm\\:rf-w-\\[90vw\\]{width:90vw}.sm\\:rf-w-auto{width:auto}.sm\\:rf-max-w-\\[500px\\]{max-width:500px}.sm\\:rf-max-w-md{max-width:28rem}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-gap-4{gap:1rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-p-3{padding:.75rem}.sm\\:rf-p-6{padding:1.5rem}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:rf-text-base{font-size:1rem;line-height:1.5rem}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-w-auto{width:auto}.md\\:rf-max-w-\\[660px\\]{max-width:660px}.md\\:rf-max-w-lg{max-width:32rem}.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:rf-p-8{padding:2rem}.md\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\:rf-max-w-\\[720px\\]{max-width:720px}.lg\\:rf-max-w-xl{max-width:36rem}}@media (min-width:1280px){.xl\\:rf-max-w-\\[800px\\]{max-width:800px}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',wz=()=>{cA.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const A=document.createElement("style");A.setAttribute("data-styles","tscircuit-runframe"),A.textContent=JXe,document.head.appendChild(A)},[])},TXe=e=>{cA.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])};function mL(e,A){const[t,i]=cA.useState(()=>{try{const n=window.localStorage.getItem(e);return n?JSON.parse(n):A}catch(n){return console.error("Error reading from localStorage:",n),A}});return cA.useEffect(()=>{try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error("Error writing to localStorage:",n)}},[e,t]),[t,i]}const tEt=e=>`hsl(${Om.indexOf(e)*137.5%360}, 70%, 50%)`,KXe=({phaseTimings:e})=>{if(!e)return null;const A=Object.values(e).reduce((t,i)=>t+i,0);return iA.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[iA.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Om.map(t=>{const i=e[t]||0,n=i/A*100;return iA.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${n}%`,backgroundColor:tEt(t)},children:iA.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),iA.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",A.toFixed(2),"ms"]})]})},qXe=e=>{if(e instanceof Blob)return e;if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="object")try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)},PXe=({renderLog:e,onRerunWithDebug:A})=>{const[t,i]=cA.useState("chronological"),[n,o]=cA.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!e)return iA.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[iA.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),A&&iA.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[iA.jsx("select",{value:n,onChange:g=>o(g.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(g=>iA.jsx("option",{value:g.value,children:g.label},g.value))}),iA.jsx(uC,{onClick:()=>A(n),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const r=Object.entries(e?.phaseTimings??{});t==="chronological"?r.sort((g,c)=>Om.indexOf(g[0])-Om.indexOf(c[0])):r.sort((g,c)=>c[1]-g[1]);const a=r.reduce((g,[c,I])=>g+I,0);return iA.jsxs("div",{className:"rf-bg-white",children:[iA.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[iA.jsx("div",{children:"Render Logs"}),iA.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[A&&iA.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[iA.jsx("select",{value:n,onChange:g=>o(g.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(g=>iA.jsx("option",{value:g.value,children:g.label},g.value))}),iA.jsx(uC,{onClick:()=>A(n),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),iA.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:iA.jsxs("select",{onChange:g=>{if(g.target.value){const c=e?.debugOutputs?.find(I=>I.name===g.target.value);if(c){const I=qXe(c.content),l=I instanceof Blob?I:new Blob([I],{type:"text/plain"}),B=URL.createObjectURL(l),C=document.createElement("a");C.href=B,C.download=`debug-${c.name}.txt`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(B)}g.target.value=""}},disabled:!e?.debugOutputs||e.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[iA.jsx("option",{value:"",children:"Download Debug Output"}),e?.debugOutputs?.map(g=>iA.jsx("option",{value:g.name,children:g.name},g.name))]})}),iA.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[iA.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),iA.jsxs("select",{value:t,onChange:g=>i(g.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[iA.jsx("option",{value:"chronological",children:"Phase Order"}),iA.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),iA.jsx(KXe,{phaseTimings:e.phaseTimings}),iA.jsxs("table",{className:"rf-w-full rf-text-xs",children:[iA.jsx("thead",{children:iA.jsxs("tr",{children:[iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),iA.jsx("tbody",{children:r.map(([g,c])=>iA.jsxs("tr",{children:[iA.jsx("td",{className:"rf-p-2",children:Om.indexOf(g)}),iA.jsx("td",{className:"rf-p-2",children:g}),iA.jsx("td",{className:"rf-p-2",children:iA.jsx("div",{className:"rf-w-8",children:iA.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:tEt(g),width:`${c/a*100}%`}})})}),iA.jsx("td",{className:"rf-p-2",children:iA.jsxs("div",{className:"rf-flex w-full",children:[iA.jsxs("span",{className:"rf-flex-grow",children:[c,"ms"]}),iA.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(c/a*100).toFixed(1),"%"]})]})})]},g))})]})]})},eEt=({errorMessage:e,errorStack:A,circuitJsonErrors:t})=>{cA.useEffect(()=>{if(e){const i=new Error(e);A&&(i.stack=A);try{j9.captureException(i)}catch{}}},[e,A]),cA.useEffect(()=>{if(t&&t.length>0)for(const i of t){const n=new Error(i.message||"Circuit JSON Error");i.stack&&(n.stack=i.stack);try{j9.captureException(n,{error_type:i.type})}catch{}}},[t])},iEt="0.0.1306",OXe={version:iEt},Dz=X5A()($5A(e=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:A=>{e({lastRunEvalVersion:A})}}),{name:"runframe-runner-store"})),WXe=e=>{const[A,t]=cA.useState([]),[i,n]=cA.useState(null),[o,s]=cA.useState(""),[r,a]=mL("eval-version-selection",null),g=Dz(B=>B.setLastRunEvalVersion),c=Dz(B=>B.lastRunEvalVersion);return cA.useEffect(()=>{e&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(B=>B.json()).then(B=>{if(Array.isArray(B?.versions)){let C=[...B.versions];B.tags?.latest&&(n(B.tags.latest),C=C.filter(Q=>Q!==B.tags.latest)),t(C)}}).catch(()=>{})},[e]),cA.useEffect(()=>{e&&(r?(window.TSCIRCUIT_LATEST_EVAL_VERSION=r,g(r)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,g(i)))},[e,r,i]),{versions:cA.useMemo(()=>A.filter(B=>B.includes(o)).slice(0,50),[A,o]),latestVersion:i,lastRunEvalVersion:c,search:o,setSearch:s,selectVersion:B=>{a(B),s("")}}},ZXe=({snippetNames:e,onSelect:A,onCancel:t,isOpen:i})=>{const[n,o]=cA.useState(""),[s,r]=cA.useState("");if(!i)return null;const a=e.filter(I=>I.toLowerCase().includes(s.toLowerCase())),g=s&&!e.includes(s),c=I=>{I.key==="Enter"&&(a.length===1?o(a[0]):g&&o(s))};return iA.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:iA.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[iA.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),iA.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:I=>r(I.target.value),onKeyDown:c}),iA.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[a.map(I=>iA.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${n===I?"bg-blue-50":""}`,onClick:()=>o(I),children:I},I)),g&&iA.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${n===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),iA.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[iA.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),iA.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>n&&A(n),disabled:!n,children:n===s?`Create "${n}"`:`Save to ${n}`})]})]})})},VXe=e=>{const A=cA.useRef(null),t=Vf(i=>i.recentEvents);cA.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==A.current&&(e(i),A.current=i.event_id)},[t,e])};var _z="Dialog",[nEt,oEt]=Zx(_z),[jXe,ox]=nEt(_z),sEt=e=>{const{__scopeDialog:A,children:t,open:i,defaultOpen:n,onOpenChange:o,modal:s=!0}=e,r=cA.useRef(null),a=cA.useRef(null),[g,c]=ZR({prop:i,defaultProp:n??!1,onChange:o,caller:_z});return iA.jsx(jXe,{scope:A,triggerRef:r,contentRef:a,contentId:wy(),titleId:wy(),descriptionId:wy(),open:g,onOpenChange:c,onOpenToggle:cA.useCallback(()=>c(I=>!I),[c]),modal:s,children:t})};sEt.displayName=_z;var rEt="DialogTrigger",aEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(rEt,t),o=IE(A,n.triggerRef);return iA.jsx(Dc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":CDA(n.open),...i,ref:o,onClick:Qr(e.onClick,n.onOpenToggle)})});aEt.displayName=rEt;var lDA="DialogPortal",[zXe,gEt]=nEt(lDA,{forceMount:void 0}),cEt=e=>{const{__scopeDialog:A,forceMount:t,children:i,container:n}=e,o=ox(lDA,A);return iA.jsx(zXe,{scope:A,forceMount:t,children:cA.Children.map(i,s=>iA.jsx(UD,{present:t||o.open,children:iA.jsx(VV,{asChild:!0,container:n,children:s})}))})};cEt.displayName=lDA;var xz="DialogOverlay",IEt=cA.forwardRef((e,A)=>{const t=gEt(xz,e.__scopeDialog),{forceMount:i=t.forceMount,...n}=e,o=ox(xz,e.__scopeDialog);return o.modal?iA.jsx(UD,{present:i||o.open,children:iA.jsx($Xe,{...n,ref:A})}):null});IEt.displayName=xz;var XXe=WR("DialogOverlay.RemoveScroll"),$Xe=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(xz,t);return iA.jsx(ij,{as:XXe,allowPinchZoom:!0,shards:[n.contentRef],children:iA.jsx(Dc.div,{"data-state":CDA(n.open),...i,ref:A,style:{pointerEvents:"auto",...i.style}})})}),eN="DialogContent",lEt=cA.forwardRef((e,A)=>{const t=gEt(eN,e.__scopeDialog),{forceMount:i=t.forceMount,...n}=e,o=ox(eN,e.__scopeDialog);return iA.jsx(UD,{present:i||o.open,children:o.modal?iA.jsx(A7e,{...n,ref:A}):iA.jsx(t7e,{...n,ref:A})})});lEt.displayName=eN;var A7e=cA.forwardRef((e,A)=>{const t=ox(eN,e.__scopeDialog),i=cA.useRef(null),n=IE(A,t.contentRef,i);return cA.useEffect(()=>{const o=i.current;if(o)return nmA(o)},[]),iA.jsx(BEt,{...e,ref:n,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qr(e.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:Qr(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,r=s.button===0&&s.ctrlKey===!0;(s.button===2||r)&&o.preventDefault()}),onFocusOutside:Qr(e.onFocusOutside,o=>o.preventDefault())})}),t7e=cA.forwardRef((e,A)=>{const t=ox(eN,e.__scopeDialog),i=cA.useRef(!1),n=cA.useRef(!1);return iA.jsx(BEt,{...e,ref:A,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,n.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),BEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,...s}=e,r=ox(eN,t),a=cA.useRef(null),g=IE(A,a);return HyA(),iA.jsxs(iA.Fragment,{children:[iA.jsx(LV,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:iA.jsx(MV,{role:"dialog",id:r.contentId,"aria-describedby":r.descriptionId,"aria-labelledby":r.titleId,"data-state":CDA(r.open),...s,ref:g,onDismiss:()=>r.onOpenChange(!1)})}),iA.jsxs(iA.Fragment,{children:[iA.jsx(i7e,{titleId:r.titleId}),iA.jsx(o7e,{contentRef:a,descriptionId:r.descriptionId})]})]})}),BDA="DialogTitle",CEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(BDA,t);return iA.jsx(Dc.h2,{id:n.titleId,...i,ref:A})});CEt.displayName=BDA;var hEt="DialogDescription",QEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(hEt,t);return iA.jsx(Dc.p,{id:n.descriptionId,...i,ref:A})});QEt.displayName=hEt;var uEt="DialogClose",EEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(uEt,t);return iA.jsx(Dc.button,{type:"button",...i,ref:A,onClick:Qr(e.onClick,()=>n.onOpenChange(!1))})});EEt.displayName=uEt;function CDA(e){return e?"open":"closed"}var dEt="DialogTitleWarning",[e7e,pEt]=uae(dEt,{contentName:eN,titleName:BDA,docsSlug:"dialog"}),i7e=({titleId:e})=>{const A=pEt(dEt),t=`\`${A.contentName}\` requires a \`${A.titleName}\` for the component to be accessible for screen reader users.
|
|
5877
|
+
*/const YXe=({containerClassName:e,...A})=>{const t=cA.useRef(null),[i,n]=cA.useState(620);return cA.useLayoutEffect(()=>{const o=()=>{if(t.current){const r=t.current.clientHeight,a=window.innerHeight;n(Math.min(Math.max(r,620),a))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),iA.jsx("div",{ref:t,className:e||"rf-w-full rf-h-full",children:iA.jsx(HXe,{...A,height:i})})},JXe='*,: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.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-60px\\)\\]{height:calc(100vh - 60px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.\\!rf-w-\\[95vw\\]{width:95vw!important}.rf-w-1{width:.25rem}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[95vw\\]{max-width:95vw!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/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-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-border-t-blue-600{--tw-border-opacity:1;border-top-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.rf-peer:disabled~.peer-disabled\\:rf-cursor-not-allowed{cursor:not-allowed}.rf-peer:disabled~.peer-disabled\\:rf-opacity-70{opacity:.7}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-mt-4{margin-top:1rem}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-h-5{height:1.25rem}.sm\\:rf-w-1\\/2{width:50%}.sm\\:rf-w-5{width:1.25rem}.sm\\:rf-w-\\[90vw\\]{width:90vw}.sm\\:rf-w-auto{width:auto}.sm\\:rf-max-w-\\[500px\\]{max-width:500px}.sm\\:rf-max-w-md{max-width:28rem}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-gap-4{gap:1rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-p-3{padding:.75rem}.sm\\:rf-p-6{padding:1.5rem}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:rf-text-base{font-size:1rem;line-height:1.5rem}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-w-auto{width:auto}.md\\:rf-max-w-\\[660px\\]{max-width:660px}.md\\:rf-max-w-lg{max-width:32rem}.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:rf-p-8{padding:2rem}.md\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\:rf-max-w-\\[720px\\]{max-width:720px}.lg\\:rf-max-w-xl{max-width:36rem}}@media (min-width:1280px){.xl\\:rf-max-w-\\[800px\\]{max-width:800px}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',wz=()=>{cA.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const A=document.createElement("style");A.setAttribute("data-styles","tscircuit-runframe"),A.textContent=JXe,document.head.appendChild(A)},[])},TXe=e=>{cA.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])};function mL(e,A){const[t,i]=cA.useState(()=>{try{const n=window.localStorage.getItem(e);return n?JSON.parse(n):A}catch(n){return console.error("Error reading from localStorage:",n),A}});return cA.useEffect(()=>{try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error("Error writing to localStorage:",n)}},[e,t]),[t,i]}const tEt=e=>`hsl(${Om.indexOf(e)*137.5%360}, 70%, 50%)`,KXe=({phaseTimings:e})=>{if(!e)return null;const A=Object.values(e).reduce((t,i)=>t+i,0);return iA.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[iA.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Om.map(t=>{const i=e[t]||0,n=i/A*100;return iA.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${n}%`,backgroundColor:tEt(t)},children:iA.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),iA.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",A.toFixed(2),"ms"]})]})},qXe=e=>{if(e instanceof Blob)return e;if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="object")try{return JSON.stringify(e,null,2)}catch{return String(e)}return String(e)},PXe=({renderLog:e,onRerunWithDebug:A})=>{const[t,i]=cA.useState("chronological"),[n,o]=cA.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!e)return iA.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[iA.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),A&&iA.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[iA.jsx("select",{value:n,onChange:g=>o(g.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(g=>iA.jsx("option",{value:g.value,children:g.label},g.value))}),iA.jsx(uC,{onClick:()=>A(n),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const r=Object.entries(e?.phaseTimings??{});t==="chronological"?r.sort((g,c)=>Om.indexOf(g[0])-Om.indexOf(c[0])):r.sort((g,c)=>c[1]-g[1]);const a=r.reduce((g,[c,I])=>g+I,0);return iA.jsxs("div",{className:"rf-bg-white",children:[iA.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[iA.jsx("div",{children:"Render Logs"}),iA.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[A&&iA.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[iA.jsx("select",{value:n,onChange:g=>o(g.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(g=>iA.jsx("option",{value:g.value,children:g.label},g.value))}),iA.jsx(uC,{onClick:()=>A(n),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),iA.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:iA.jsxs("select",{onChange:g=>{if(g.target.value){const c=e?.debugOutputs?.find(I=>I.name===g.target.value);if(c){const I=qXe(c.content),l=I instanceof Blob?I:new Blob([I],{type:"text/plain"}),B=URL.createObjectURL(l),C=document.createElement("a");C.href=B,C.download=`debug-${c.name}.txt`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(B)}g.target.value=""}},disabled:!e?.debugOutputs||e.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[iA.jsx("option",{value:"",children:"Download Debug Output"}),e?.debugOutputs?.map(g=>iA.jsx("option",{value:g.name,children:g.name},g.name))]})}),iA.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[iA.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),iA.jsxs("select",{value:t,onChange:g=>i(g.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[iA.jsx("option",{value:"chronological",children:"Phase Order"}),iA.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),iA.jsx(KXe,{phaseTimings:e.phaseTimings}),iA.jsxs("table",{className:"rf-w-full rf-text-xs",children:[iA.jsx("thead",{children:iA.jsxs("tr",{children:[iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),iA.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),iA.jsx("tbody",{children:r.map(([g,c])=>iA.jsxs("tr",{children:[iA.jsx("td",{className:"rf-p-2",children:Om.indexOf(g)}),iA.jsx("td",{className:"rf-p-2",children:g}),iA.jsx("td",{className:"rf-p-2",children:iA.jsx("div",{className:"rf-w-8",children:iA.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:tEt(g),width:`${c/a*100}%`}})})}),iA.jsx("td",{className:"rf-p-2",children:iA.jsxs("div",{className:"rf-flex w-full",children:[iA.jsxs("span",{className:"rf-flex-grow",children:[c,"ms"]}),iA.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(c/a*100).toFixed(1),"%"]})]})})]},g))})]})]})},eEt=({errorMessage:e,errorStack:A,circuitJsonErrors:t})=>{cA.useEffect(()=>{if(e){const i=new Error(e);A&&(i.stack=A);try{j9.captureException(i)}catch{}}},[e,A]),cA.useEffect(()=>{if(t&&t.length>0)for(const i of t){const n=new Error(i.message||"Circuit JSON Error");i.stack&&(n.stack=i.stack);try{j9.captureException(n,{error_type:i.type})}catch{}}},[t])},iEt="0.0.1309",OXe={version:iEt},Dz=X5A()($5A(e=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:A=>{e({lastRunEvalVersion:A})}}),{name:"runframe-runner-store"})),WXe=e=>{const[A,t]=cA.useState([]),[i,n]=cA.useState(null),[o,s]=cA.useState(""),[r,a]=mL("eval-version-selection",null),g=Dz(B=>B.setLastRunEvalVersion),c=Dz(B=>B.lastRunEvalVersion);return cA.useEffect(()=>{e&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(B=>B.json()).then(B=>{if(Array.isArray(B?.versions)){let C=[...B.versions];B.tags?.latest&&(n(B.tags.latest),C=C.filter(Q=>Q!==B.tags.latest)),t(C)}}).catch(()=>{})},[e]),cA.useEffect(()=>{e&&(r?(window.TSCIRCUIT_LATEST_EVAL_VERSION=r,g(r)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,g(i)))},[e,r,i]),{versions:cA.useMemo(()=>A.filter(B=>B.includes(o)).slice(0,50),[A,o]),latestVersion:i,lastRunEvalVersion:c,search:o,setSearch:s,selectVersion:B=>{a(B),s("")}}},ZXe=({snippetNames:e,onSelect:A,onCancel:t,isOpen:i})=>{const[n,o]=cA.useState(""),[s,r]=cA.useState("");if(!i)return null;const a=e.filter(I=>I.toLowerCase().includes(s.toLowerCase())),g=s&&!e.includes(s),c=I=>{I.key==="Enter"&&(a.length===1?o(a[0]):g&&o(s))};return iA.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:iA.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[iA.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),iA.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:I=>r(I.target.value),onKeyDown:c}),iA.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[a.map(I=>iA.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${n===I?"bg-blue-50":""}`,onClick:()=>o(I),children:I},I)),g&&iA.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${n===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),iA.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[iA.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),iA.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>n&&A(n),disabled:!n,children:n===s?`Create "${n}"`:`Save to ${n}`})]})]})})},VXe=e=>{const A=cA.useRef(null),t=Vf(i=>i.recentEvents);cA.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==A.current&&(e(i),A.current=i.event_id)},[t,e])};var _z="Dialog",[nEt,oEt]=Zx(_z),[jXe,ox]=nEt(_z),sEt=e=>{const{__scopeDialog:A,children:t,open:i,defaultOpen:n,onOpenChange:o,modal:s=!0}=e,r=cA.useRef(null),a=cA.useRef(null),[g,c]=ZR({prop:i,defaultProp:n??!1,onChange:o,caller:_z});return iA.jsx(jXe,{scope:A,triggerRef:r,contentRef:a,contentId:wy(),titleId:wy(),descriptionId:wy(),open:g,onOpenChange:c,onOpenToggle:cA.useCallback(()=>c(I=>!I),[c]),modal:s,children:t})};sEt.displayName=_z;var rEt="DialogTrigger",aEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(rEt,t),o=IE(A,n.triggerRef);return iA.jsx(Dc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":CDA(n.open),...i,ref:o,onClick:Qr(e.onClick,n.onOpenToggle)})});aEt.displayName=rEt;var lDA="DialogPortal",[zXe,gEt]=nEt(lDA,{forceMount:void 0}),cEt=e=>{const{__scopeDialog:A,forceMount:t,children:i,container:n}=e,o=ox(lDA,A);return iA.jsx(zXe,{scope:A,forceMount:t,children:cA.Children.map(i,s=>iA.jsx(UD,{present:t||o.open,children:iA.jsx(VV,{asChild:!0,container:n,children:s})}))})};cEt.displayName=lDA;var xz="DialogOverlay",IEt=cA.forwardRef((e,A)=>{const t=gEt(xz,e.__scopeDialog),{forceMount:i=t.forceMount,...n}=e,o=ox(xz,e.__scopeDialog);return o.modal?iA.jsx(UD,{present:i||o.open,children:iA.jsx($Xe,{...n,ref:A})}):null});IEt.displayName=xz;var XXe=WR("DialogOverlay.RemoveScroll"),$Xe=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(xz,t);return iA.jsx(ij,{as:XXe,allowPinchZoom:!0,shards:[n.contentRef],children:iA.jsx(Dc.div,{"data-state":CDA(n.open),...i,ref:A,style:{pointerEvents:"auto",...i.style}})})}),eN="DialogContent",lEt=cA.forwardRef((e,A)=>{const t=gEt(eN,e.__scopeDialog),{forceMount:i=t.forceMount,...n}=e,o=ox(eN,e.__scopeDialog);return iA.jsx(UD,{present:i||o.open,children:o.modal?iA.jsx(A7e,{...n,ref:A}):iA.jsx(t7e,{...n,ref:A})})});lEt.displayName=eN;var A7e=cA.forwardRef((e,A)=>{const t=ox(eN,e.__scopeDialog),i=cA.useRef(null),n=IE(A,t.contentRef,i);return cA.useEffect(()=>{const o=i.current;if(o)return nmA(o)},[]),iA.jsx(BEt,{...e,ref:n,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qr(e.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:Qr(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,r=s.button===0&&s.ctrlKey===!0;(s.button===2||r)&&o.preventDefault()}),onFocusOutside:Qr(e.onFocusOutside,o=>o.preventDefault())})}),t7e=cA.forwardRef((e,A)=>{const t=ox(eN,e.__scopeDialog),i=cA.useRef(!1),n=cA.useRef(!1);return iA.jsx(BEt,{...e,ref:A,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,n.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),BEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,...s}=e,r=ox(eN,t),a=cA.useRef(null),g=IE(A,a);return HyA(),iA.jsxs(iA.Fragment,{children:[iA.jsx(LV,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:iA.jsx(MV,{role:"dialog",id:r.contentId,"aria-describedby":r.descriptionId,"aria-labelledby":r.titleId,"data-state":CDA(r.open),...s,ref:g,onDismiss:()=>r.onOpenChange(!1)})}),iA.jsxs(iA.Fragment,{children:[iA.jsx(i7e,{titleId:r.titleId}),iA.jsx(o7e,{contentRef:a,descriptionId:r.descriptionId})]})]})}),BDA="DialogTitle",CEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(BDA,t);return iA.jsx(Dc.h2,{id:n.titleId,...i,ref:A})});CEt.displayName=BDA;var hEt="DialogDescription",QEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(hEt,t);return iA.jsx(Dc.p,{id:n.descriptionId,...i,ref:A})});QEt.displayName=hEt;var uEt="DialogClose",EEt=cA.forwardRef((e,A)=>{const{__scopeDialog:t,...i}=e,n=ox(uEt,t);return iA.jsx(Dc.button,{type:"button",...i,ref:A,onClick:Qr(e.onClick,()=>n.onOpenChange(!1))})});EEt.displayName=uEt;function CDA(e){return e?"open":"closed"}var dEt="DialogTitleWarning",[e7e,pEt]=uae(dEt,{contentName:eN,titleName:BDA,docsSlug:"dialog"}),i7e=({titleId:e})=>{const A=pEt(dEt),t=`\`${A.contentName}\` requires a \`${A.titleName}\` for the component to be accessible for screen reader users.
|
|
5878
5878
|
|
|
5879
5879
|
If you want to hide the \`${A.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5880
5880
|
|