tscircuit 0.0.811 → 0.0.812
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/browser.min.js +2 -2
- package/package.json +3 -3
package/dist/browser.min.js
CHANGED
|
@@ -5673,7 +5673,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function Rht(n,e,t){if(!e||!t)retu
|
|
|
5673
5673
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5674
5674
|
* Released under the MIT License.
|
|
5675
5675
|
*)
|
|
5676
|
-
*/const QUn=({containerClassName:n,...e})=>{const t=le.useRef(null),[i,r]=le.useState(620);return le.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),oe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:oe.jsx(ZUn,{...e,height:i})})},JUn='*,: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-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[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-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[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-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[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-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!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-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-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-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-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-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-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-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-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-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-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-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-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}.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-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',qY=()=>{le.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=JUn,document.head.appendChild(e)},[])},eBn=n=>{le.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Yht=n=>`hsl(${sw.indexOf(n)*137.5%360}, 70%, 50%)`,tBn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return oe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[oe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:sw.map(t=>{const i=n[t]||0,r=i/e*100;return oe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Yht(t)},children:oe.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)})}),oe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},nBn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},iBn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=le.useState("chronological"),[r,o]=le.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return oe.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[oe.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>sw.indexOf(l[0])-sw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return oe.jsxs("div",{className:"rf-bg-white",children:[oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[oe.jsx("div",{children:"Render Logs"}),oe.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),oe.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:oe.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=nBn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[oe.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>oe.jsx("option",{value:l.name,children:l.name},l.name))]})}),oe.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[oe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),oe.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[oe.jsx("option",{value:"chronological",children:"Phase Order"}),oe.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),oe.jsx(tBn,{phaseTimings:n.phaseTimings}),oe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[oe.jsx("thead",{children:oe.jsxs("tr",{children:[oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),oe.jsx("tbody",{children:a.map(([l,u])=>oe.jsxs("tr",{children:[oe.jsx("td",{className:"rf-p-2",children:sw.indexOf(l)}),oe.jsx("td",{className:"rf-p-2",children:l}),oe.jsx("td",{className:"rf-p-2",children:oe.jsx("div",{className:"rf-w-8",children:oe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Yht(l),width:`${u/c*100}%`}})})}),oe.jsx("td",{className:"rf-p-2",children:oe.jsxs("div",{className:"rf-flex w-full",children:[oe.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),oe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},qht=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{le.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Mj.captureException(i)}catch{}}},[n,e]),le.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Mj.captureException(r,{error_type:i.type})}catch{}}},[t])},Xht="0.0.1149",rBn={version:Xht};function Jbe(n,e){const[t,i]=le.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return le.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const XY=w$e()(S$e(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),oBn=n=>{const[e,t]=le.useState([]),[i,r]=le.useState(null),[o,s]=le.useState(""),[a,c]=Jbe("eval-version-selection",null),l=XY(p=>p.setLastRunEvalVersion),u=XY(p=>p.lastRunEvalVersion);return le.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),le.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:le.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},sBn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=le.useState(""),[s,a]=le.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return oe.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:oe.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[oe.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),oe.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),oe.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>oe.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&oe.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),oe.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},aBn=n=>{const e=le.useRef(null),t=Hb(i=>i.recentEvents);le.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var WY="Dialog",[Wht,Kht]=WE(WY),[cBn,aE]=Wht(WY),Zht=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=le.useRef(null),c=le.useRef(null),[l,u]=kA({prop:i,defaultProp:r??!1,onChange:o,caller:WY});return oe.jsx(cBn,{scope:e,triggerRef:a,contentRef:c,contentId:Vb(),titleId:Vb(),descriptionId:Vb(),open:l,onOpenChange:u,onOpenToggle:le.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Zht.displayName=WY;var Qht="DialogTrigger",Jht=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(Qht,t),o=H_(e,r.triggerRef);return oe.jsx(cu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":nve(r.open),...i,ref:o,onClick:aa(n.onClick,r.onOpenToggle)})});Jht.displayName=Qht;var eve="DialogPortal",[lBn,ept]=Wht(eve,{forceMount:void 0}),tpt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=aE(eve,e);return oe.jsx(lBn,{scope:e,forceMount:t,children:le.Children.map(i,s=>oe.jsx(qS,{present:t||o.open,children:oe.jsx(gG,{asChild:!0,container:r,children:s})}))})};tpt.displayName=eve;var KY="DialogOverlay",npt=le.forwardRef((n,e)=>{const t=ept(KY,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=aE(KY,n.__scopeDialog);return o.modal?oe.jsx(qS,{present:i||o.open,children:oe.jsx(dBn,{...r,ref:e})}):null});npt.displayName=KY;var uBn=NA("DialogOverlay.RemoveScroll"),dBn=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(KY,t);return oe.jsx(MG,{as:uBn,allowPinchZoom:!0,shards:[r.contentRef],children:oe.jsx(cu.div,{"data-state":nve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),B4="DialogContent",ipt=le.forwardRef((n,e)=>{const t=ept(B4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=aE(B4,n.__scopeDialog);return oe.jsx(qS,{present:i||o.open,children:o.modal?oe.jsx(hBn,{...r,ref:e}):oe.jsx(pBn,{...r,ref:e})})});ipt.displayName=B4;var hBn=le.forwardRef((n,e)=>{const t=aE(B4,n.__scopeDialog),i=le.useRef(null),r=H_(e,t.contentRef,i);return le.useEffect(()=>{const o=i.current;if(o)return Hxe(o)},[]),oe.jsx(rpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aa(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:aa(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:aa(n.onFocusOutside,o=>o.preventDefault())})}),pBn=le.forwardRef((n,e)=>{const t=aE(B4,n.__scopeDialog),i=le.useRef(!1),r=le.useRef(!1);return oe.jsx(rpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),rpt=le.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=aE(B4,t),c=le.useRef(null),l=H_(e,c);return Exe(),oe.jsxs(oe.Fragment,{children:[oe.jsx(sG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(oG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),oe.jsxs(oe.Fragment,{children:[oe.jsx(mBn,{titleId:a.titleId}),oe.jsx(yBn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),tve="DialogTitle",opt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(tve,t);return oe.jsx(cu.h2,{id:r.titleId,...i,ref:e})});opt.displayName=tve;var spt="DialogDescription",apt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(spt,t);return oe.jsx(cu.p,{id:r.descriptionId,...i,ref:e})});apt.displayName=spt;var cpt="DialogClose",lpt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(cpt,t);return oe.jsx(cu.button,{type:"button",...i,ref:e,onClick:aa(n.onClick,()=>r.onOpenChange(!1))})});lpt.displayName=cpt;function nve(n){return n?"open":"closed"}var upt="DialogTitleWarning",[fBn,dpt]=ien(upt,{contentName:B4,titleName:tve,docsSlug:"dialog"}),mBn=({titleId:n})=>{const e=dpt(upt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5676
|
+
*/const QUn=({containerClassName:n,...e})=>{const t=le.useRef(null),[i,r]=le.useState(620);return le.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),oe.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:oe.jsx(ZUn,{...e,height:i})})},JUn='*,: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-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[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-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[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-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[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-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!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-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-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-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-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-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-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-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-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-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-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-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-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}.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-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',qY=()=>{le.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=JUn,document.head.appendChild(e)},[])},eBn=n=>{le.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Yht=n=>`hsl(${sw.indexOf(n)*137.5%360}, 70%, 50%)`,tBn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return oe.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[oe.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:sw.map(t=>{const i=n[t]||0,r=i/e*100;return oe.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Yht(t)},children:oe.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)})}),oe.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},nBn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},iBn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=le.useState("chronological"),[r,o]=le.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return oe.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[oe.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>sw.indexOf(l[0])-sw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return oe.jsxs("div",{className:"rf-bg-white",children:[oe.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[oe.jsx("div",{children:"Render Logs"}),oe.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&oe.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[oe.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>oe.jsx("option",{value:l.value,children:l.label},l.value))}),oe.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),oe.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:oe.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=nBn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[oe.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>oe.jsx("option",{value:l.name,children:l.name},l.name))]})}),oe.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[oe.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),oe.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[oe.jsx("option",{value:"chronological",children:"Phase Order"}),oe.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),oe.jsx(tBn,{phaseTimings:n.phaseTimings}),oe.jsxs("table",{className:"rf-w-full rf-text-xs",children:[oe.jsx("thead",{children:oe.jsxs("tr",{children:[oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),oe.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),oe.jsx("tbody",{children:a.map(([l,u])=>oe.jsxs("tr",{children:[oe.jsx("td",{className:"rf-p-2",children:sw.indexOf(l)}),oe.jsx("td",{className:"rf-p-2",children:l}),oe.jsx("td",{className:"rf-p-2",children:oe.jsx("div",{className:"rf-w-8",children:oe.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Yht(l),width:`${u/c*100}%`}})})}),oe.jsx("td",{className:"rf-p-2",children:oe.jsxs("div",{className:"rf-flex w-full",children:[oe.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),oe.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},qht=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{le.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Mj.captureException(i)}catch{}}},[n,e]),le.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Mj.captureException(r,{error_type:i.type})}catch{}}},[t])},Xht="0.0.1150",rBn={version:Xht};function Jbe(n,e){const[t,i]=le.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return le.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const XY=w$e()(S$e(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),oBn=n=>{const[e,t]=le.useState([]),[i,r]=le.useState(null),[o,s]=le.useState(""),[a,c]=Jbe("eval-version-selection",null),l=XY(p=>p.setLastRunEvalVersion),u=XY(p=>p.lastRunEvalVersion);return le.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),le.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:le.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},sBn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=le.useState(""),[s,a]=le.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return oe.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:oe.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[oe.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),oe.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),oe.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>oe.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&oe.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),oe.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),oe.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},aBn=n=>{const e=le.useRef(null),t=Hb(i=>i.recentEvents);le.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var WY="Dialog",[Wht,Kht]=WE(WY),[cBn,aE]=Wht(WY),Zht=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=le.useRef(null),c=le.useRef(null),[l,u]=kA({prop:i,defaultProp:r??!1,onChange:o,caller:WY});return oe.jsx(cBn,{scope:e,triggerRef:a,contentRef:c,contentId:Vb(),titleId:Vb(),descriptionId:Vb(),open:l,onOpenChange:u,onOpenToggle:le.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Zht.displayName=WY;var Qht="DialogTrigger",Jht=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(Qht,t),o=H_(e,r.triggerRef);return oe.jsx(cu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":nve(r.open),...i,ref:o,onClick:aa(n.onClick,r.onOpenToggle)})});Jht.displayName=Qht;var eve="DialogPortal",[lBn,ept]=Wht(eve,{forceMount:void 0}),tpt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=aE(eve,e);return oe.jsx(lBn,{scope:e,forceMount:t,children:le.Children.map(i,s=>oe.jsx(qS,{present:t||o.open,children:oe.jsx(gG,{asChild:!0,container:r,children:s})}))})};tpt.displayName=eve;var KY="DialogOverlay",npt=le.forwardRef((n,e)=>{const t=ept(KY,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=aE(KY,n.__scopeDialog);return o.modal?oe.jsx(qS,{present:i||o.open,children:oe.jsx(dBn,{...r,ref:e})}):null});npt.displayName=KY;var uBn=NA("DialogOverlay.RemoveScroll"),dBn=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(KY,t);return oe.jsx(MG,{as:uBn,allowPinchZoom:!0,shards:[r.contentRef],children:oe.jsx(cu.div,{"data-state":nve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),B4="DialogContent",ipt=le.forwardRef((n,e)=>{const t=ept(B4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=aE(B4,n.__scopeDialog);return oe.jsx(qS,{present:i||o.open,children:o.modal?oe.jsx(hBn,{...r,ref:e}):oe.jsx(pBn,{...r,ref:e})})});ipt.displayName=B4;var hBn=le.forwardRef((n,e)=>{const t=aE(B4,n.__scopeDialog),i=le.useRef(null),r=H_(e,t.contentRef,i);return le.useEffect(()=>{const o=i.current;if(o)return Hxe(o)},[]),oe.jsx(rpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aa(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:aa(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:aa(n.onFocusOutside,o=>o.preventDefault())})}),pBn=le.forwardRef((n,e)=>{const t=aE(B4,n.__scopeDialog),i=le.useRef(!1),r=le.useRef(!1);return oe.jsx(rpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),rpt=le.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=aE(B4,t),c=le.useRef(null),l=H_(e,c);return Exe(),oe.jsxs(oe.Fragment,{children:[oe.jsx(sG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(oG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),oe.jsxs(oe.Fragment,{children:[oe.jsx(mBn,{titleId:a.titleId}),oe.jsx(yBn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),tve="DialogTitle",opt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(tve,t);return oe.jsx(cu.h2,{id:r.titleId,...i,ref:e})});opt.displayName=tve;var spt="DialogDescription",apt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(spt,t);return oe.jsx(cu.p,{id:r.descriptionId,...i,ref:e})});apt.displayName=spt;var cpt="DialogClose",lpt=le.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=aE(cpt,t);return oe.jsx(cu.button,{type:"button",...i,ref:e,onClick:aa(n.onClick,()=>r.onOpenChange(!1))})});lpt.displayName=cpt;function nve(n){return n?"open":"closed"}var upt="DialogTitleWarning",[fBn,dpt]=ien(upt,{contentName:B4,titleName:tve,docsSlug:"dialog"}),mBn=({titleId:n})=>{const e=dpt(upt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5677
5677
|
|
|
5678
5678
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5679
5679
|
|
|
@@ -6830,7 +6830,7 @@ ${x}`)}},[n,c]),le.useEffect(()=>{n&&!c&&e5t().then(x=>{d(x.size)}).catch(x=>{co
|
|
|
6830
6830
|
* @license
|
|
6831
6831
|
* Copyright 2019 Google LLC
|
|
6832
6832
|
* SPDX-License-Identifier: Apache-2.0
|
|
6833
|
-
*/const n5t=Symbol("Comlink.proxy"),ASi=Symbol("Comlink.endpoint"),i5t=Symbol("Comlink.releaseProxy"),cAe=Symbol("Comlink.finalizer"),TQ=Symbol("Comlink.thrown"),r5t=n=>typeof n=="object"&&n!==null||typeof n=="function",PSi={canHandle:n=>r5t(n)&&n[n5t],serialize(n){const{port1:e,port2:t}=new MessageChannel;return s5t(n,e),[t,[t]]},deserialize(n){return n.start(),c5t(n)}},RSi={canHandle:n=>r5t(n)&&TQ in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},o5t=new Map([["proxy",PSi],["throw",RSi]]);function ISi(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function s5t(n,e=globalThis,t=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!ISi(t,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(mP);let l;try{const u=a.slice(0,-1).reduce((h,p)=>h[p],n),d=a.reduce((h,p)=>h[p],n);switch(s){case"GET":l=d;break;case"SET":u[a.slice(-1)[0]]=mP(r.data.value),l=!0;break;case"APPLY":l=d.apply(u,c);break;case"CONSTRUCT":{const h=new d(...c);l=h5t(h)}break;case"ENDPOINT":{const{port1:h,port2:p}=new MessageChannel;s5t(n,p),l=DSi(h,[h])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[TQ]:0}}Promise.resolve(l).catch(u=>({value:u,[TQ]:0})).then(u=>{const[d,h]=PQ(u);e.postMessage(Object.assign(Object.assign({},d),{id:o}),h),s==="RELEASE"&&(e.removeEventListener("message",i),a5t(e),cAe in n&&typeof n[cAe]=="function"&&n[cAe]())}).catch(u=>{const[d,h]=PQ({value:new TypeError("Unserializable return value"),[TQ]:0});e.postMessage(Object.assign(Object.assign({},d),{id:o}),h)})}),e.start&&e.start()}function NSi(n){return n.constructor.name==="MessagePort"}function a5t(n){NSi(n)&&n.close()}function c5t(n,e){const t=new Map;return n.addEventListener("message",function(r){const{data:o}=r;if(!o||!o.id)return;const s=t.get(o.id);if(s)try{s(o)}finally{t.delete(o.id)}}),lAe(n,t,[],e)}function MQ(n){if(n)throw new Error("Proxy has been released and is not useable")}function l5t(n){return WN(n,new Map,{type:"RELEASE"}).then(()=>{a5t(n)})}const CQ=new WeakMap,AQ="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(CQ.get(n)||0)-1;CQ.set(n,e),e===0&&l5t(n)});function kSi(n,e){const t=(CQ.get(e)||0)+1;CQ.set(e,t),AQ&&AQ.register(n,e,n)}function OSi(n){AQ&&AQ.unregister(n)}function lAe(n,e,t=[],i=function(){}){let r=!1;const o=new Proxy(i,{get(s,a){if(MQ(r),a===i5t)return()=>{OSi(o),l5t(n),e.clear(),r=!0};if(a==="then"){if(t.length===0)return{then:()=>o};const c=WN(n,e,{type:"GET",path:t.map(l=>l.toString())}).then(mP);return c.then.bind(c)}return lAe(n,e,[...t,a])},set(s,a,c){MQ(r);const[l,u]=PQ(c);return WN(n,e,{type:"SET",path:[...t,a].map(d=>d.toString()),value:l},u).then(mP)},apply(s,a,c){MQ(r);const l=t[t.length-1];if(l===ASi)return WN(n,e,{type:"ENDPOINT"}).then(mP);if(l==="bind")return lAe(n,e,t.slice(0,-1));const[u,d]=u5t(c);return WN(n,e,{type:"APPLY",path:t.map(h=>h.toString()),argumentList:u},d).then(mP)},construct(s,a){MQ(r);const[c,l]=u5t(a);return WN(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:c},l).then(mP)}});return kSi(o,n),o}function LSi(n){return Array.prototype.concat.apply([],n)}function u5t(n){const e=n.map(PQ);return[e.map(t=>t[0]),LSi(e.map(t=>t[1]))]}const d5t=new WeakMap;function DSi(n,e){return d5t.set(n,e),n}function h5t(n){return Object.assign(n,{[n5t]:!0})}function PQ(n){for(const[e,t]of o5t)if(t.canHandle(n)){const[i,r]=t.serialize(n);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:n},d5t.get(n)||[]]}function mP(n){switch(n.type){case"HANDLER":return o5t.get(n.name).deserialize(n.value);case"RAW":return n.value}}function WN(n,e,t,i){return new Promise(r=>{const o=$Si();e.set(o,r),n.start&&n.start(),n.postMessage(Object.assign({id:o},t),i)})}function $Si(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var p5t=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){n.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(d){n.verbose&&console.warn("[Worker] Error killing previous global worker instance:",d),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}n.verbose&&console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const d=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,h=await globalThis.fetch(d).then(p=>p.blob());t=URL.createObjectURL(h)}const i=new Worker(t,{type:"module"});let r;i.addEventListener("error",d=>{console.error("[Worker] Error in worker",d),r=d}),i.addEventListener("unhandledrejection",d=>{console.error("[Worker] Unhandled rejection in worker",d)}),i.addEventListener("messageerror",d=>{console.error("[Worker] Message error in worker",d)});const o=d=>{console.log("[Worker] Message in worker",d)};if(i.addEventListener("message",o),i.addEventListener("message",async d=>{const h=d.data;if(h?.type==="worker_fetch")try{const p=await globalThis.fetch(h.input,h.init),m=await p.text();i.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!0,response:{body:m,status:p.status,statusText:p.statusText,headers:(()=>{const _={};return p.headers.forEach((g,x)=>{_[x]=g}),_})()}})}catch(p){i.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!1,error:{name:p.name,message:p.message,stack:p.stack}})}}),r)throw r;const s=c5t(i);i.removeEventListener("message",o);function a(d){return!d||typeof d!="object"?d:d.type&&d.props!==void 0?{__isSerializedReactElement:!0,type:d.type,props:c(d.props),key:d.key}:d}function c(d){if(!d||typeof d!="object")return d;const h={};for(const[p,m]of Object.entries(d))p==="children"?Array.isArray(m)?h.children=m.map(a):h.children=a(m):h[p]=m;return h}n.enableFetchProxy&&i.postMessage({type:"override_global_fetch"}),n.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl),n.platform&&await s.setPlatformConfig(n.platform),n.projectConfig&&await s.setProjectConfig(n.projectConfig);let l=!1;const u={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't enableDebug");return s.enableDebug.bind(s)(...d)},version:s.version.bind(s),execute:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...d)},executeComponent:async d=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeComponent");if(typeof d=="function")return s.executeComponent.bind(s)(d);if(d&&typeof d=="object"&&d.type){const h=a(d);return s.executeComponent.bind(s)(h)}return s.executeComponent.bind(s)(d)},executeWithFsMap:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...d)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(d,h)=>{const p=h5t(h);s.on(d,p)},kill:async()=>{s[i5t](),i.terminate(),l=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===u&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return u.__rawWorker=i,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=u,u};const f5t=n=>{const e={};if(!n)return e;for(const i of sw)e[i]=0;const t=new Map;for(const i of n){const[,,r,o]=i.type.split(":");if(o==="start"){t.set(`${r}:${i.renderId}`,i);continue}if(o==="end"){const s=t.get(`${r}:${i.renderId}`);if(s){const a=i.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},zSi=(n,e)=>{const t={};for(const[i,r]of n.entries()){const o=e.get(i);o!==r&&(t[i]={old:r,new:o})}for(const[i,r]of e.entries())n.has(i)||(t[i]={old:void 0,new:r});return t};function FSi(){const n=le.useRef(Promise.resolve()),e=le.useRef(!1),t=le.useRef(null),i=le.useCallback(async s=>{await n.current;const a={cancelled:!1};t.current=a;let c;const l=new Promise(u=>{c=u});try{return n.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,t.current=null,c()}},[]),r=le.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),o=le.useCallback(()=>e.current,[]);return{runWithMutex:i,isLocked:o,cancel:r}}const USi=({message:n="Loading files..."})=>oe.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[oe.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),oe.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((e,t)=>oe.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},t))})]}),oe.jsx("div",{className:"rf-flex-1 rf-p-4",children:oe.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:oe.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:oe.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:n})})})})]}),BSi=26,SS=Uh("run-frame:RunFrame"),jSi=async()=>{try{const n=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(n.ok)return(await n.json()).tags?.latest}catch(n){console.error("Failed to fetch latest eval version",n)}},m5t=async(n,e)=>{if(n)return n;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const t=await jSi();if(t)return window.TSCIRCUIT_LATEST_EVAL_VERSION=t,t}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},_5t=n=>{qY();const[e,t]=Hb(de=>[de.circuitJson,de.setCircuitJson]),[i,r]=le.useState(null),o=le.useRef(null),[s,a]=le.useState(null),[c,l]=le.useReducer((de,xe)=>de+1,0),u=XY(de=>de.setLastRunEvalVersion),d=le.useRef(0),h=FSi(),[p,m]=le.useState(!1),[_,g]=le.useState(!1),[x,b]=le.useState({}),[v,S]=le.useState(""),I=Object.values(x).sort((de,xe)=>de.startTime-xe.startTime)[0]?.effectName;le.useEffect(()=>{const de=xe=>{(xe.ctrlKey||xe.metaKey)&&xe.key==="Enter"&&!p&&l(1)};return window.addEventListener("keydown",de),()=>window.removeEventListener("keydown",de)},[p]),le.useEffect(()=>{let de=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const te=await m5t(n.evalVersion,n.forceLatestEvalVersion),ae=await p5t({evalVersion:te,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,projectConfig:{projectBaseUrl:`${Xw}/files/static`},verbose:!0,...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});if(de)return;globalThis.runFrameWorker=ae,u(te)}de||g(!0)}catch(te){console.error("Failed to preload eval worker",te)}})(),()=>{de=!0}},[n.evalVersion,n.evalWebWorkerBlobUrl,n.forceLatestEvalVersion]);const[A,P]=le.useState(null),[M,N]=le.useState({}),[C,U]=le.useState(n.defaultActiveTab??n.defaultTab??"pcb");le.useEffect(()=>{n.debug&&Uh.enable("run-frame*")},[n.debug]);const O=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((de,[xe,te])=>de.set(xe,te),new Map),H=le.useRef(null),Y=le.useRef(null);le.useEffect(()=>{if(n.isLoadingFiles)return;const de=O instanceof Map?Object.fromEntries(O.entries()):O;if(!de||Object.keys(de).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const xe=c!==d.current;if(H.current&&e){const ae=zSi(H.current,O);if(Object.keys(ae).length>0)SS("code changes detected");else if(Y.current!==n.entrypoint)SS("render triggered by entrypoint change");else if(!xe){SS("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&c===d.current)return;H.current=O,Y.current=n.entrypoint??null,d.current=c,m(!0);const te=async()=>{SS("running render worker"),r(null),P(null),b({});const ae={progress:0,debugOutputs:[]};let fe=!1;o.current=()=>{fe=!0};const Me=await m5t(n.evalVersion,!globalThis.runFrameWorker&&n.forceLatestEvalVersion);SS("resolvedEvalVersion",Me);const Ee=globalThis.runFrameWorker??await p5t({evalVersion:Me,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0,projectConfig:{projectBaseUrl:`${Xw}/files/static`},...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});globalThis.runFrameWorker=Ee,u(Me),v?.trim()&&Ee.enableDebug(v.replace("DEBUG=","")),SS("Starting render..."),n.onRenderStarted?.();const Ie=O instanceof Map?Object.fromEntries(O.entries()):O;let Le=Date.now();Ee.on("asyncEffect:start",be=>{const je=`${be.phase}|${be.componentDisplayName??""}|${be.effectName}`;b(nt=>({...nt,[je]:{...be,startTime:Date.now()}}))}),Ee.on("asyncEffect:end",be=>{const je=`${be.phase}|${be.componentDisplayName??""}|${be.effectName}`;b(nt=>{const{[je]:ct,...Ae}=nt;return Ae})}),Ee.on("autorouting:start",be=>{N({...M,[be.componentDisplayName]:{simpleRouteJson:be.simpleRouteJson}})}),Ee.on("board:renderPhaseStarted",be=>{ae.lastRenderEvent=be,ae.eventsProcessed=(ae.eventsProcessed??0)+1;const je=sw.indexOf(be.phase)/BSi*.75+ae.eventsProcessed/1e3*.25,nt=1-Math.exp(-je*3);ae.progress=nt,fe||P({...ae})}),C==="render_log"&&Ee.on("renderable:renderLifecycle:anyEvent",be=>{ae.renderEvents=ae.renderEvents??[],be.createdAt=Date.now(),ae.renderEvents.push(be),Date.now()-Le>500&&(ae.phaseTimings=f5t(ae.renderEvents??[]),Le=Date.now()),fe||P({...ae})}),Ee.on("autorouting:progress",be=>{a(be.debugGraphics)}),Ee.on("debug:logOutput",be=>{ae.debugOutputs=ae.debugOutputs??[],ae.debugOutputs.push({type:"debug",name:be.name,content:be.content}),fe||P({...ae})}),SS("Executing fsMap...");const Ne=await Ee.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Ie,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(be=>{const je=be.message.replace("Error: ","");return SS(`eval error: ${je}`),n.onError?.(be),r({error:je,stack:be.stack}),P(null),console.error(be),{success:!1}});if(SS("worker call started"),!Ne.success){m(!1),b({});return}const se=Ee.renderUntilSettled();SS("waiting for initial circuit json...");let Se=await Ee.getCircuitJson().catch(be=>(SS("error getting initial circuit json",be),n.onError?.(be),r({error:be.message,stack:be.stack}),P(null),m(!1),b({}),null));Se&&(SS("got initial circuit json"),t(Se),n.onCircuitJsonChange?.(Se),n.onInitialRender?.({circuitJson:Se}),await se,SS("getting final circuit json"),Se=await Ee.getCircuitJson(),n.onCircuitJsonChange?.(Se),t(Se),n.onRenderFinished?.({circuitJson:Se}),a({}),C==="render_log"&&(ae.phaseTimings=f5t(ae.renderEvents??[])),ae.progress=1,fe||P({...ae}),m(!1),b({}),S(""),o.current=null)};h.runWithMutex(te)},[n.fsMap,n.entrypoint,c,n.evalVersion,n.mainComponentPath,n.isLoadingFiles,v]);const X=le.useRef(null),K=le.useRef(null),Q=de=>{if(!de||de===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}de.in_progress?(X.current=de,K.current&&(clearTimeout(K.current),K.current=null)):(K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{const xe=de||X.current;n.onEditEvent?.(xe),X.current=null,K.current=null},100))},ce=async(de,xe)=>{let te="";const ae=Array.isArray(e)&&e.find(Ee=>Ee.type==="software_project_metadata"),fe=n.projectUrl??ae?.project_url;if(fe)try{te=new URL(fe).pathname}catch{te=fe}const Me=te?`${te} - ${de}`:de;await i7.post("autorouting/bug_reports/create",{json:{title:Me,simple_route_json:xe.simpleRouteJson}}).json().then(({autorouting_bug_report:Ee})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Ee.autorouting_bug_report_id}`,"_blank")}).catch(Ee=>{console.error("Failed to report autorouting bug",Ee),Ee.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${Ee.message}`)})};return n.isLoadingFiles?oe.jsx(USi,{}):oe.jsx(t5t,{code:O.get(n.entrypoint??n.mainComponentPath),fsMap:O,defaultActiveTab:n.defaultActiveTab??n.defaultTab,defaultTab:n.defaultTab,availableTabs:n.availableTabs,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:M,onReportAutoroutingLog:n.onReportAutoroutingLog||ce,leftHeaderContent:oe.jsxs(oe.Fragment,{children:[n.showRunButton&&oe.jsxs("div",{className:"rf-relative rf-inline-flex",children:[oe.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:p||!_,children:["Run"," ",p||!_?oe.jsx(K5,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):oe.jsx(Drt,{className:"rf-w-3 rf-h-3"})]}),p&&oe.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:oe.jsx(R0,{onClick:de=>{de.stopPropagation(),m(!1),P(null),r(null),o.current&&(o.current(),o.current=null),h.cancel(),b({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:oe.jsx(URn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.showFileMenu!==!1&&oe.jsx(u7,{isWebEmbedded:n.isWebEmbedded}),n.leftHeaderContent]}),onActiveTabChange:U,circuitJson:e,renderLog:A,activeEffectName:I,isRunningCode:p,errorMessage:i?.error,errorStack:i?.stack,onEditEvent:Q,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen,onRerunWithDebug:de=>{S(de||""),l(1)}})},HSi=n=>{const[e,t]=Jbe("load-latest-eval",!0),[i]=le.useState(()=>typeof window>"u"?void 0:new URLSearchParams(window.location.hash.slice(1)).get("main_component")??void 0),r=le.useCallback(o=>{if(typeof window>"u")return;const s=new URLSearchParams(window.location.hash.slice(1));if(s.get("main_component")===o)return;s.set("main_component",o);const a=s.toString(),c=`${window.location.pathname}${window.location.search}`+(a.length>0?`#${a}`:"");window.history.replaceState(null,"",c)},[]);return oe.jsx(p3t,{debug:n.debug,forceLatestEvalVersion:!n.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:n.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,enableFetchProxy:n.enableFetchProxy,initialMainComponentPath:i,onMainComponentPathChange:r,leftHeaderContent:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[oe.jsx(u7,{isWebEmbedded:!1,shouldLoadLatestEval:!n.workerBlobUrl&&e,onChangeShouldLoadLatestEval:o=>{t(o),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})};Uh("run-frame:ImportComponentDialog");function uAe(n){const e=n.lastIndexOf("/");return e===-1?"/":n.substring(0,e)}function VSi({currentFile:n,files:e}){const[t,i]=le.useState(!1),[r,o]=le.useState(()=>{if(typeof window<"u"){const c=new URLSearchParams(window.location.search),l=new URLSearchParams(window.location.hash.slice(1)),u=c.get("file")??l.get("file");if(u&&e.includes(u)){const d=uAe(u);return d==="/"?null:d}}if(n&&e.includes(n)){const c=uAe(n);return c==="/"?null:c}return null});return le.useEffect(()=>{if(n&&!t&&e.includes(n)){const c=uAe(n);o(c==="/"?null:c)}},[n,t,e]),{currentFolder:r,navigateToFolder:c=>{o(c),i(!0)},resetManualNavigation:()=>{i(!1)}}}var y5t=1,GSi=.9,YSi=.8,qSi=.17,dAe=.1,hAe=.999,XSi=.9999,WSi=.99,KSi=/[\\\/_+.#"@\[\(\{&]/,ZSi=/[\\\/_+.#"@\[\(\{&]/g,QSi=/[\s-]/,g5t=/[\s-]/g;function pAe(n,e,t,i,r,o,s){if(o===e.length)return r===n.length?y5t:WSi;var a=`${r},${o}`;if(s[a]!==void 0)return s[a];for(var c=i.charAt(o),l=t.indexOf(c,r),u=0,d,h,p,m;l>=0;)d=pAe(n,e,t,i,l+1,o+1,s),d>u&&(l===r?d*=y5t:KSi.test(n.charAt(l-1))?(d*=YSi,p=n.slice(r,l-1).match(ZSi),p&&r>0&&(d*=Math.pow(hAe,p.length))):QSi.test(n.charAt(l-1))?(d*=GSi,m=n.slice(r,l-1).match(g5t),m&&r>0&&(d*=Math.pow(hAe,m.length))):(d*=qSi,r>0&&(d*=Math.pow(hAe,l-r))),n.charAt(l)!==e.charAt(o)&&(d*=XSi)),(d<dAe&&t.charAt(l-1)===i.charAt(o+1)||i.charAt(o+1)===i.charAt(o)&&t.charAt(l-1)!==i.charAt(o))&&(h=pAe(n,e,t,i,l+1,o+2,s),h*dAe>d&&(d=h*dAe)),d>u&&(u=d),l=t.indexOf(c,l+1);return s[a]=u,u}function x5t(n){return n.toLowerCase().replace(g5t," ")}function JSi(n,e,t){return n=t&&t.length>0?`${n+" "+t.join(" ")}`:n,pAe(n,e,x5t(n),x5t(e),0,0,{})}var d7='[cmdk-group=""]',fAe='[cmdk-group-items=""]',e2i='[cmdk-group-heading=""]',b5t='[cmdk-item=""]',v5t=`${b5t}:not([aria-disabled="true"])`,mAe="cmdk-item-select",KN="data-value",t2i=(n,e,t)=>JSi(n,e,t),w5t=le.createContext(void 0),h7=()=>le.useContext(w5t),S5t=le.createContext(void 0),_Ae=()=>le.useContext(S5t),E5t=le.createContext(void 0),T5t=le.forwardRef((n,e)=>{let t=ZN(()=>{var ae,fe;return{search:"",value:(fe=(ae=n.value)!=null?ae:n.defaultValue)!=null?fe:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ZN(()=>new Set),r=ZN(()=>new Map),o=ZN(()=>new Map),s=ZN(()=>new Set),a=M5t(n),{label:c,children:l,value:u,onValueChange:d,filter:h,shouldFilter:p,loop:m,disablePointerSelection:_=!1,vimBindings:g=!0,...x}=n,b=Vb(),v=Vb(),S=Vb(),I=le.useRef(null),A=h2i();_P(()=>{if(u!==void 0){let ae=u.trim();t.current.value=ae,P.emit()}},[u]),_P(()=>{A(6,H)},[]);let P=le.useMemo(()=>({subscribe:ae=>(s.current.add(ae),()=>s.current.delete(ae)),snapshot:()=>t.current,setState:(ae,fe,Me)=>{var Ee,Ie,Le,Ne;if(!Object.is(t.current[ae],fe)){if(t.current[ae]=fe,ae==="search")O(),C(),A(1,U);else if(ae==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(S);se?se.focus():(Ee=document.getElementById(b))==null||Ee.focus()}if(A(7,()=>{var se;t.current.selectedItemId=(se=Y())==null?void 0:se.id,P.emit()}),Me||A(5,H),((Ie=a.current)==null?void 0:Ie.value)!==void 0){let se=fe??"";(Ne=(Le=a.current).onValueChange)==null||Ne.call(Le,se);return}}P.emit()}},emit:()=>{s.current.forEach(ae=>ae())}}),[]),M=le.useMemo(()=>({value:(ae,fe,Me)=>{var Ee;fe!==((Ee=o.current.get(ae))==null?void 0:Ee.value)&&(o.current.set(ae,{value:fe,keywords:Me}),t.current.filtered.items.set(ae,N(fe,Me)),A(2,()=>{C(),P.emit()}))},item:(ae,fe)=>(i.current.add(ae),fe&&(r.current.has(fe)?r.current.get(fe).add(ae):r.current.set(fe,new Set([ae]))),A(3,()=>{O(),C(),t.current.value||U(),P.emit()}),()=>{o.current.delete(ae),i.current.delete(ae),t.current.filtered.items.delete(ae);let Me=Y();A(4,()=>{O(),Me?.getAttribute("id")===ae&&U(),P.emit()})}),group:ae=>(r.current.has(ae)||r.current.set(ae,new Set),()=>{o.current.delete(ae),r.current.delete(ae)}),filter:()=>a.current.shouldFilter,label:c||n["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:b,inputId:S,labelId:v,listInnerRef:I}),[]);function N(ae,fe){var Me,Ee;let Ie=(Ee=(Me=a.current)==null?void 0:Me.filter)!=null?Ee:t2i;return ae?Ie(ae,t.current.search,fe):0}function C(){if(!t.current.search||a.current.shouldFilter===!1)return;let ae=t.current.filtered.items,fe=[];t.current.filtered.groups.forEach(Ee=>{let Ie=r.current.get(Ee),Le=0;Ie.forEach(Ne=>{let se=ae.get(Ne);Le=Math.max(se,Le)}),fe.push([Ee,Le])});let Me=I.current;X().sort((Ee,Ie)=>{var Le,Ne;let se=Ee.getAttribute("id"),Se=Ie.getAttribute("id");return((Le=ae.get(Se))!=null?Le:0)-((Ne=ae.get(se))!=null?Ne:0)}).forEach(Ee=>{let Ie=Ee.closest(fAe);Ie?Ie.appendChild(Ee.parentElement===Ie?Ee:Ee.closest(`${fAe} > *`)):Me.appendChild(Ee.parentElement===Me?Ee:Ee.closest(`${fAe} > *`))}),fe.sort((Ee,Ie)=>Ie[1]-Ee[1]).forEach(Ee=>{var Ie;let Le=(Ie=I.current)==null?void 0:Ie.querySelector(`${d7}[${KN}="${encodeURIComponent(Ee[0])}"]`);Le?.parentElement.appendChild(Le)})}function U(){let ae=X().find(Me=>Me.getAttribute("aria-disabled")!=="true"),fe=ae?.getAttribute(KN);P.setState("value",fe||void 0)}function O(){var ae,fe,Me,Ee;if(!t.current.search||a.current.shouldFilter===!1){t.current.filtered.count=i.current.size;return}t.current.filtered.groups=new Set;let Ie=0;for(let Le of i.current){let Ne=(fe=(ae=o.current.get(Le))==null?void 0:ae.value)!=null?fe:"",se=(Ee=(Me=o.current.get(Le))==null?void 0:Me.keywords)!=null?Ee:[],Se=N(Ne,se);t.current.filtered.items.set(Le,Se),Se>0&&Ie++}for(let[Le,Ne]of r.current)for(let se of Ne)if(t.current.filtered.items.get(se)>0){t.current.filtered.groups.add(Le);break}t.current.filtered.count=Ie}function H(){var ae,fe,Me;let Ee=Y();Ee&&(((ae=Ee.parentElement)==null?void 0:ae.firstChild)===Ee&&((Me=(fe=Ee.closest(d7))==null?void 0:fe.querySelector(e2i))==null||Me.scrollIntoView({block:"nearest"})),Ee.scrollIntoView({block:"nearest"}))}function Y(){var ae;return(ae=I.current)==null?void 0:ae.querySelector(`${b5t}[aria-selected="true"]`)}function X(){var ae;return Array.from(((ae=I.current)==null?void 0:ae.querySelectorAll(v5t))||[])}function K(ae){let fe=X()[ae];fe&&P.setState("value",fe.getAttribute(KN))}function Q(ae){var fe;let Me=Y(),Ee=X(),Ie=Ee.findIndex(Ne=>Ne===Me),Le=Ee[Ie+ae];(fe=a.current)!=null&&fe.loop&&(Le=Ie+ae<0?Ee[Ee.length-1]:Ie+ae===Ee.length?Ee[0]:Ee[Ie+ae]),Le&&P.setState("value",Le.getAttribute(KN))}function ce(ae){let fe=Y(),Me=fe?.closest(d7),Ee;for(;Me&&!Ee;)Me=ae>0?u2i(Me,d7):d2i(Me,d7),Ee=Me?.querySelector(v5t);Ee?P.setState("value",Ee.getAttribute(KN)):Q(ae)}let de=()=>K(X().length-1),xe=ae=>{ae.preventDefault(),ae.metaKey?de():ae.altKey?ce(1):Q(1)},te=ae=>{ae.preventDefault(),ae.metaKey?K(0):ae.altKey?ce(-1):Q(-1)};return le.createElement(cu.div,{ref:e,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:ae=>{var fe;(fe=x.onKeyDown)==null||fe.call(x,ae);let Me=ae.nativeEvent.isComposing||ae.keyCode===229;if(!(ae.defaultPrevented||Me))switch(ae.key){case"n":case"j":{g&&ae.ctrlKey&&xe(ae);break}case"ArrowDown":{xe(ae);break}case"p":case"k":{g&&ae.ctrlKey&&te(ae);break}case"ArrowUp":{te(ae);break}case"Home":{ae.preventDefault(),K(0);break}case"End":{ae.preventDefault(),de();break}case"Enter":{ae.preventDefault();let Ee=Y();if(Ee){let Ie=new Event(mAe);Ee.dispatchEvent(Ie)}}}}},le.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:f2i},c),RQ(n,ae=>le.createElement(S5t.Provider,{value:P},le.createElement(w5t.Provider,{value:M},ae))))}),n2i=le.forwardRef((n,e)=>{var t,i;let r=Vb(),o=le.useRef(null),s=le.useContext(E5t),a=h7(),c=M5t(n),l=(i=(t=c.current)==null?void 0:t.forceMount)!=null?i:s?.forceMount;_P(()=>{if(!l)return a.item(r,s?.id)},[l]);let u=C5t(r,o,[n.value,n.children,o],n.keywords),d=_Ae(),h=zC(A=>A.value&&A.value===u.current),p=zC(A=>l||a.filter()===!1?!0:A.search?A.filtered.items.get(r)>0:!0);le.useEffect(()=>{let A=o.current;if(!(!A||n.disabled))return A.addEventListener(mAe,m),()=>A.removeEventListener(mAe,m)},[p,n.onSelect,n.disabled]);function m(){var A,P;_(),(P=(A=c.current).onSelect)==null||P.call(A,u.current)}function _(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:g,value:x,onSelect:b,forceMount:v,keywords:S,...I}=n;return le.createElement(cu.div,{ref:w5(o,e),...I,id:r,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!h,"data-disabled":!!g,"data-selected":!!h,onPointerMove:g||a.getDisablePointerSelection()?void 0:_,onClick:g?void 0:m},n.children)}),i2i=le.forwardRef((n,e)=>{let{heading:t,children:i,forceMount:r,...o}=n,s=Vb(),a=le.useRef(null),c=le.useRef(null),l=Vb(),u=h7(),d=zC(p=>r||u.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);_P(()=>u.group(s),[]),C5t(s,a,[n.value,n.heading,c]);let h=le.useMemo(()=>({id:s,forceMount:r}),[r]);return le.createElement(cu.div,{ref:w5(a,e),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},t&&le.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},t),RQ(n,p=>le.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?l:void 0},le.createElement(E5t.Provider,{value:h},p))))}),r2i=le.forwardRef((n,e)=>{let{alwaysRender:t,...i}=n,r=le.useRef(null),o=zC(s=>!s.search);return!t&&!o?null:le.createElement(cu.div,{ref:w5(r,e),...i,"cmdk-separator":"",role:"separator"})}),o2i=le.forwardRef((n,e)=>{let{onValueChange:t,...i}=n,r=n.value!=null,o=_Ae(),s=zC(l=>l.search),a=zC(l=>l.selectedItemId),c=h7();return le.useEffect(()=>{n.value!=null&&o.setState("search",n.value)},[n.value]),le.createElement(cu.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?n.value:s,onChange:l=>{r||o.setState("search",l.target.value),t?.(l.target.value)}})}),s2i=le.forwardRef((n,e)=>{let{children:t,label:i="Suggestions",...r}=n,o=le.useRef(null),s=le.useRef(null),a=zC(l=>l.selectedItemId),c=h7();return le.useEffect(()=>{if(s.current&&o.current){let l=s.current,u=o.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(d),h.unobserve(l)}}},[]),le.createElement(cu.div,{ref:w5(o,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:c.listId},RQ(n,l=>le.createElement("div",{ref:w5(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),a2i=le.forwardRef((n,e)=>{let{open:t,onOpenChange:i,overlayClassName:r,contentClassName:o,container:s,...a}=n;return le.createElement(ive,{open:t,onOpenChange:i},le.createElement(rve,{container:s},le.createElement(ZY,{"cmdk-overlay":"",className:r}),le.createElement(QY,{"aria-label":n.label,"cmdk-dialog":"",className:o},le.createElement(T5t,{ref:e,...a}))))}),c2i=le.forwardRef((n,e)=>zC(t=>t.filtered.count===0)?le.createElement(cu.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),l2i=le.forwardRef((n,e)=>{let{progress:t,children:i,label:r="Loading...",...o}=n;return le.createElement(cu.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},RQ(n,s=>le.createElement("div",{"aria-hidden":!0},s)))}),Cw=Object.assign(T5t,{List:s2i,Item:n2i,Input:o2i,Group:i2i,Separator:r2i,Dialog:a2i,Empty:c2i,Loading:l2i});function u2i(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return t;t=t.nextElementSibling}}function d2i(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}}function M5t(n){let e=le.useRef(n);return _P(()=>{e.current=n}),e}var _P=typeof window>"u"?le.useEffect:le.useLayoutEffect;function ZN(n){let e=le.useRef();return e.current===void 0&&(e.current=n()),e}function zC(n){let e=_Ae(),t=()=>n(e.snapshot());return le.useSyncExternalStore(e.subscribe,t,t)}function C5t(n,e,t,i=[]){let r=le.useRef(),o=h7();return _P(()=>{var s;let a=(()=>{var l;for(let u of t){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=i.map(l=>l.trim());o.value(n,a,c),(s=e.current)==null||s.setAttribute(KN,a),r.current=a}),r}var h2i=()=>{let[n,e]=le.useState(),t=ZN(()=>new Map);return _P(()=>{t.current.forEach(i=>i()),t.current=new Map},[n]),(i,r)=>{t.current.set(i,r),e({})}};function p2i(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function RQ({asChild:n,children:e},t){return n&&le.isValidElement(e)?le.cloneElement(p2i(e),{ref:e.ref},t(e.props.children)):t(e)}var f2i={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const A5t=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw,{ref:t,className:So("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));A5t.displayName=Cw.displayName;const P5t=le.forwardRef(({className:n,...e},t)=>oe.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[oe.jsx(vxe,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),oe.jsx(Cw.Input,{ref:t,className:So("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",n),...e})]}));P5t.displayName=Cw.Input.displayName;const R5t=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.List,{ref:t,className:So("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden",n),...e}));R5t.displayName=Cw.List.displayName;const yAe=le.forwardRef((n,e)=>oe.jsx(Cw.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...n}));yAe.displayName=Cw.Empty.displayName;const QN=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Group,{ref:t,className:So("rf-overflow-hidden rf-p-1 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",n),...e}));QN.displayName=Cw.Group.displayName;const m2i=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Separator,{ref:t,className:So("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",n),...e}));m2i.displayName=Cw.Separator.displayName;const JN=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Item,{ref:t,className:So("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",n),...e}));JN.displayName=Cw.Item.displayName;var IQ="Popover",[I5t]=WE(IQ,[yG]),p7=yG(),[_2i,FC]=I5t(IQ),N5t=n=>{const{__scopePopover:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=n,a=p7(e),c=le.useRef(null),[l,u]=le.useState(!1),[d,h]=kA({prop:i,defaultProp:r??!1,onChange:o,caller:IQ});return oe.jsx(Uxe,{...a,children:oe.jsx(_2i,{scope:e,contentId:Vb(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:le.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:le.useCallback(()=>u(!0),[]),onCustomAnchorRemove:le.useCallback(()=>u(!1),[]),modal:s,children:t})})};N5t.displayName=IQ;var k5t="PopoverAnchor",y2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(k5t,t),o=p7(t),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return le.useEffect(()=>(s(),()=>a()),[s,a]),oe.jsx(Bxe,{...o,...i,ref:e})});y2i.displayName=k5t;var O5t="PopoverTrigger",L5t=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(O5t,t),o=p7(t),s=H_(e,r.triggerRef),a=oe.jsx(cu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":U5t(r.open),...i,ref:s,onClick:aa(n.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:oe.jsx(Bxe,{asChild:!0,...o,children:a})});L5t.displayName=O5t;var gAe="PopoverPortal",[g2i,x2i]=I5t(gAe,{forceMount:void 0}),D5t=n=>{const{__scopePopover:e,forceMount:t,children:i,container:r}=n,o=FC(gAe,e);return oe.jsx(g2i,{scope:e,forceMount:t,children:oe.jsx(qS,{present:t||o.open,children:oe.jsx(gG,{asChild:!0,container:r,children:i})})})};D5t.displayName=gAe;var ek="PopoverContent",$5t=le.forwardRef((n,e)=>{const t=x2i(ek,n.__scopePopover),{forceMount:i=t.forceMount,...r}=n,o=FC(ek,n.__scopePopover);return oe.jsx(qS,{present:i||o.open,children:o.modal?oe.jsx(v2i,{...r,ref:e}):oe.jsx(w2i,{...r,ref:e})})});$5t.displayName=ek;var b2i=NA("PopoverContent.RemoveScroll"),v2i=le.forwardRef((n,e)=>{const t=FC(ek,n.__scopePopover),i=le.useRef(null),r=H_(e,i),o=le.useRef(!1);return le.useEffect(()=>{const s=i.current;if(s)return Hxe(s)},[]),oe.jsx(MG,{as:b2i,allowPinchZoom:!0,children:oe.jsx(z5t,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aa(n.onCloseAutoFocus,s=>{s.preventDefault(),o.current||t.triggerRef.current?.focus()}),onPointerDownOutside:aa(n.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:aa(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),w2i=le.forwardRef((n,e)=>{const t=FC(ek,n.__scopePopover),i=le.useRef(!1),r=le.useRef(!1);return oe.jsx(z5t,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),z5t=le.forwardRef((n,e)=>{const{__scopePopover:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=n,h=FC(ek,t),p=p7(t);return Exe(),oe.jsx(sG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(oG,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:oe.jsx(Aot,{"data-state":U5t(h.open),role:"dialog",id:h.contentId,...p,...d,ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),F5t="PopoverClose",S2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(F5t,t);return oe.jsx(cu.button,{type:"button",...i,ref:e,onClick:aa(n.onClick,()=>r.onOpenChange(!1))})});S2i.displayName=F5t;var E2i="PopoverArrow",T2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=p7(t);return oe.jsx(Pot,{...r,...i,ref:e})});T2i.displayName=E2i;function U5t(n){return n?"open":"closed"}var M2i=N5t,C2i=L5t,A2i=D5t,B5t=$5t;const P2i=M2i,R2i=C2i,j5t=le.forwardRef(({className:n,align:e="center",sideOffset:t=4,...i},r)=>oe.jsx(A2i,{children:oe.jsx(B5t,{ref:r,align:e,sideOffset:t,className:So("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...i})}));j5t.displayName=B5t.displayName;function I2i(n){const e=[],t=new Map;t.set("",{name:"",path:"",type:"folder",children:e});for(const i of n){const r=i.split("/");let o="";for(let s=0;s<r.length;s++){const a=r[s],c=o;if(o=o?`${o}/${a}`:a,!t.has(o)){const l=s===r.length-1,u={name:a,path:o,type:l?"file":"folder",children:l?void 0:[]};t.set(o,u);const d=t.get(c);d&&d.children&&d.children.push(u)}}}return e}function H5t(n,e){for(const t of n){if(t.path===e)return t;if(t.children){const i=H5t(t.children,e);if(i)return i}}return null}function N2i(n,e){let t;if(e?t=H5t(n,e):t={name:"",path:"",type:"folder",children:n},!t||!t.children)return{files:[],folders:[]};const i=t.children.filter(s=>s.type==="file"),r=t.children.filter(s=>s.type==="folder"),o=(s,a)=>s.localeCompare(a,void 0,{numeric:!0,sensitivity:"base"});return i.sort((s,a)=>o(s.name,a.name)),r.sort((s,a)=>o(s.name,a.name)),{files:i,folders:r}}const xAe=n=>n.endsWith(".tsx")||n.endsWith(".jsx")?oe.jsx(PRn,{className:"rf-h-4 rf-w-4 rf-text-blue-500"}):n.endsWith(".md")||n.endsWith(".txt")?oe.jsx(kRn,{className:"rf-h-4 rf-w-4 rf-text-gray-600"}):oe.jsx(ORn,{className:"rf-h-4 rf-w-4 rf-text-gray-500"}),k2i=n=>n.endsWith(".tsx")||n.endsWith(".circuit.json")||n.endsWith(".jsx"),O2i=n=>n.split("/").pop()||"",V5t=n=>n.substring(0,n.lastIndexOf("/"))||"/",G5t=({files:n,onFileChange:e,currentFile:t,fileFilter:i=k2i,getDisplayName:r=O2i,placeholder:o="Select file",searchPlaceholder:s="Search for file",emptyMessage:a="No files found in this directory.",pinnedFiles:c=[],onToggleFavorite:l})=>{const[u,d]=le.useState(!1),[h,p]=le.useState(t),{currentFolder:m,navigateToFolder:_,resetManualNavigation:g}=VSi({currentFile:h,files:n}),[x,b]=le.useState(0),[v,S]=le.useState("");le.useEffect(()=>{p(t)},[t]);const I=n.filter(i),A=I2i(I),{files:P,folders:M}=N2i(A,m||""),C=(()=>{if(!v.trim())return{currentDirResults:[],globalResults:[]};const Q=v.toLowerCase(),de=I.map(ae=>{const fe=ae.split("/").pop()||"";return{path:ae,fileName:fe}}).filter(ae=>ae.fileName.toLowerCase().includes(Q)||ae.path.toLowerCase().includes(Q)),xe=de.filter(ae=>m?ae.path.substring(0,ae.path.lastIndexOf("/"))===m:!ae.path.includes("/")),te=de.filter(ae=>m?ae.path.substring(0,ae.path.lastIndexOf("/"))!==m:ae.path.includes("/"));return{currentDirResults:xe,globalResults:te}})(),U=v.trim().length>0,O=Q=>{_(Q),b(0)},H=()=>{if(!m)return;const Q=m.lastIndexOf("/"),ce=Q===-1?null:m.substring(0,Q);O(ce)},Y=(Q,ce,de=!1)=>{if(p(Q),b(ce),d(!1),e(Q),de){const xe=Q.lastIndexOf("/"),te=xe===-1?null:Q.substring(0,xe);O(te)}};le.useEffect(()=>{if(P.length>0){const Q=P.findIndex(ce=>ce.path===t);Q>=0&&b(Q)}},[P,t]);const X=m??"/";X.length>25&&""+X.slice(-22);const K=()=>`rf-w-full rf-min-w-[600px] ${U?"rf-max-w-[600px]":"rf-max-w-[1000px]"}`;return oe.jsx("div",{className:"rf-flex rf-items-center rf-gap-1",children:oe.jsxs(P2i,{open:u,onOpenChange:Q=>{d(Q),Q||(S(""),g())},children:[oe.jsx(R2i,{asChild:!0,children:oe.jsxs(R0,{variant:"outline",role:"combobox","aria-expanded":u,className:"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",children:[oe.jsx("span",{className:"rf-truncate rf-text-left",children:h?r(h):o}),oe.jsx(MRn,{className:"rf-opacity-50 rf-flex-shrink-0"})]})}),oe.jsx(j5t,{className:So("!rf-p-0 !rf-overflow-hidden !rf-z-[200]",K()),children:oe.jsxs(A5t,{shouldFilter:!1,children:[oe.jsx(P5t,{placeholder:s,className:"rf-h-9 rf-w-full",value:v,onValueChange:S}),oe.jsx("div",{className:"rf-px-3 rf-py-2 rf-border-t rf-border-b rf-border-gray-200 rf-bg-slate-50",children:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 rf-min-w-0 rf-overflow-hidden",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-min-w-0 rf-flex-1",children:[oe.jsx("button",{onClick:()=>O(null),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0",children:"root"}),m?.split("/").filter(Boolean).map((Q,ce,de)=>{const xe=de.slice(0,ce+1).join("/");return oe.jsxs("span",{className:"rf-flex rf-items-center rf-min-w-0",children:[oe.jsx("span",{className:"rf-mx-1 rf-flex-shrink-0",children:"/"}),ce===de.length-1?oe.jsx("span",{className:"rf-text-slate-800 rf-truncate rf-max-w-[200px]",title:Q,children:Q}):oe.jsx("button",{onClick:()=>O(xe),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]",title:Q,children:Q})]},xe)})]}),m&&oe.jsxs("button",{onClick:H,className:"rf-ml-2 rf-flex rf-items-center rf-gap-1 rf-text-blue-600 hover:rf-text-blue-800 rf-bg-transparent rf-border rf-border-blue-300 hover:rf-border-blue-500 rf-rounded rf-px-2 rf-py-1 rf-flex-shrink-0",title:"Go up one level",children:[oe.jsx(TRn,{className:"rf-h-3 rf-w-3"}),oe.jsx("span",{children:"Up"})]})]})}),oe.jsx(R5t,{className:"rf-max-h-[70vh] rf-overflow-y-auto",children:U?oe.jsx(oe.Fragment,{children:C.currentDirResults.length===0&&C.globalResults.length===0?oe.jsxs(yAe,{children:['No files found matching "',v,'".']}):oe.jsxs(oe.Fragment,{children:[C.currentDirResults.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:C.currentDirResults.map((Q,ce)=>oe.jsxs(JN,{value:Q.path,onSelect:()=>{p(Q.path),d(!1),e(Q.path)},className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.fileName)}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[oe.jsx("span",{className:"rf-truncate rf-flex-1",children:r(Q.fileName)}),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:m||"/"}),l&&oe.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity rf-ml-2",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),"aria-label":c.includes(Q.path)?"Remove from favorites":"Add to favorites",title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),Q.path===t&&oe.jsx(b4,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},Q.path))}),C.globalResults.length>0&&oe.jsx(QN,{className:"rf-pb-1",children:C.globalResults.map(Q=>oe.jsxs(JN,{value:Q.path,onSelect:()=>{p(Q.path),d(!1),e(Q.path)},className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.fileName)}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[oe.jsx("span",{className:"rf-truncate rf-flex-1",children:r(Q.fileName)}),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:V5t(Q.path)}),l&&oe.jsx("button",{onClick:ce=>{ce.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity rf-ml-2",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),Q.path===t&&oe.jsx(b4,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},Q.path))})]})}):oe.jsxs(oe.Fragment,{children:[oe.jsx(yAe,{children:a}),c.length>0&&oe.jsx(QN,{heading:"Favorites",className:"rf-border-b rf-border-gray-200 rf-pb-1 rf-bg-amber-50/30",children:c.filter(Q=>I.includes(Q)).map((Q,ce)=>oe.jsxs(JN,{value:Q,onSelect:()=>Y(Q,ce,!0),className:So(Q===t&&"rf-font-medium"),children:[oe.jsx(rG,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-amber-500 rf-fill-amber-500"}),r(Q.split("/").pop()||""),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:V5t(Q)}),oe.jsx(b4,{className:So("rf-ml-auto rf-h-4 rf-w-4",Q===t?"rf-opacity-100":"rf-opacity-0")})]},Q))}),P.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:P.map((Q,ce)=>oe.jsxs(JN,{value:Q.path,onSelect:()=>Y(Q.path,ce),className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.name)}),r(Q.name),oe.jsxs("div",{className:"rf-ml-auto rf-flex rf-items-center rf-gap-1",children:[l&&oe.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),"aria-label":c.includes(Q.path)?"Remove from favorites":"Add to favorites",title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),oe.jsx(b4,{className:So("rf-h-4 rf-w-4",Q.path===t?"rf-opacity-100":"rf-opacity-0")})]})]},Q.path))}),M.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:M.map(Q=>oe.jsxs(JN,{value:`folder-${Q.path}`,onSelect:()=>O(Q.path),className:"rf-text-slate-600 hover:rf-text-slate-900",children:[oe.jsx(LRn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600"}),Q.name,oe.jsx(iG,{className:"rf-ml-auto rf-h-4 rf-w-4"})]},Q.path))}),P.length===0&&M.length===0&&oe.jsx("div",{className:"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm",children:"No files or folders in this directory"})]})})]})})]})})},Y5t=({files:n,onFileChange:e,currentFile:t})=>oe.jsx(G5t,{files:n,onFileChange:e,currentFile:t,fileFilter:()=>!0,placeholder:"Select circuit",searchPlaceholder:"Search for circuit file",emptyMessage:"No circuit files found in this directory."}),L2i=n=>{qY();const[e,t]=le.useState(()=>n.initialCircuitPath??""),[i,r]=le.useState(null),[o,s]=le.useState(!1),[a,c]=le.useState({}),[l,u]=le.useState(new Set),[d,h]=le.useState(new Set),p=n.files,m=p.map(S=>S.filePath),_=le.useCallback(async S=>{if(!S.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${S.filePath}`);const I=await fetch(S.fileStaticAssetUrl);if(!I.ok)throw new Error(`Failed to fetch ${S.filePath}: ${I.statusText}`);return await I.json()},[]),g=le.useCallback(async S=>{if(a[S]){r(a[S]),n.onCircuitJsonPathChange?.(S);return}if(d.has(S)){console.warn(`Skipping failed file: ${S}`),r(null);return}if(!l.has(S)){u(I=>new Set(I).add(S)),s(!0),r(null);try{const I=p.find(M=>M.filePath===S);if(!I)throw new Error(`File reference not found for ${S}`);const P=await(n.onFetchFile||_)(I);c(M=>({...M,[S]:P})),r(P),n.onCircuitJsonPathChange?.(S),h(M=>{const N=new Set(M);return N.delete(S),N})}catch(I){console.error(`Failed to load circuit JSON file ${S}:`,I),h(A=>new Set(A).add(S)),r(null)}finally{u(I=>{const A=new Set(I);return A.delete(S),A}),s(!1)}}},[p,a,l,d,n.onFetchFile,n.onCircuitJsonPathChange,_]);le.useEffect(()=>{if(m.length===0)return;let S=e;(!S||!m.includes(S))&&(S=h3t(m)??m[0],t(S)),S&&m.includes(S)&&g(S)},[e]);const x=le.useCallback(S=>{t(S)},[]),b=le.useCallback(S=>{h(I=>{const A=new Set(I);return A.delete(S),A}),g(S)},[g]);if(m.length===0)return oe.jsx("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center",children:oe.jsxs("div",{className:"rf-text-center rf-p-8",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2",children:"No Circuit JSON Files Found"}),oe.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Please provide circuit JSON files to view."})]})});const v=d.has(e);return oe.jsx(WM,{fallbackRender:({error:S})=>oe.jsx("div",{className:"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Circuit JSON Preview"}),oe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:S.message})]})}),children:v?oe.jsxs("div",{className:"rf-w-full rf-h-full rf-flex rf-flex-col",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200",children:[(n.showFileMenu??!0)&&oe.jsx(u7,{isWebEmbedded:!0,circuitJson:null,projectName:n.projectName}),m.length>1&&oe.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2",children:oe.jsx(Y5t,{currentFile:e,files:m,onFileChange:x})})]}),oe.jsx("div",{className:"rf-flex-1 rf-flex rf-items-center rf-justify-center",children:oe.jsxs("div",{className:"rf-text-center rf-p-8",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2",children:"Failed to Load Circuit File"}),oe.jsxs("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-4",children:["Could not load: ",e]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2",children:[oe.jsx("button",{onClick:()=>b(e),className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600",children:"Retry"}),m.length>1&&oe.jsx("p",{className:"rf-text-xs rf-text-gray-500",children:"Or select a different file from the dropdown above"})]})]})})]}):oe.jsx(t5t,{circuitJson:i,defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:n.projectName,leftHeaderContent:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[(n.showFileMenu??!0)&&oe.jsx(u7,{isWebEmbedded:!0,circuitJson:i,projectName:n.projectName}),m.length>1&&oe.jsx("div",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${o?"rf-opacity-50":""}`,children:oe.jsx(Y5t,{currentFile:e,files:m,onFileChange:x})})]})})})},D2i=()=>{const n=Hb(e=>e.fsMap);le.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=h3t(e),i=n.get("package.json");try{if(i){const r=JSON.parse(i);if(r?.name){document.title=r.name;return}}}catch{}t&&(document.title=t)},[n])},f7=c4e(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var bAe={},q5t;function vAe(){return q5t||(q5t=1,(function(n){n.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,n.find=(e,t)=>e.nodes.find(i=>i.type===t),n.exceedsLimit=(e,t,i=1,r)=>r===!1||!n.isInteger(e)||!n.isInteger(t)?!1:(Number(t)-Number(e))/Number(i)>=r,n.escapeNode=(e,t=0,i)=>{const r=e.nodes[t];r&&(i&&r.type===i||r.type==="open"||r.type==="close")&&r.escaped!==!0&&(r.value="\\"+r.value,r.escaped=!0)},n.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,n.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,n.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,n.reduce=e=>e.reduce((t,i)=>(i.type==="text"&&t.push(i.value),i.type==="range"&&(i.type="text"),t),[]),n.flatten=(...e)=>{const t=[],i=r=>{for(let o=0;o<r.length;o++){const s=r[o];if(Array.isArray(s)){i(s);continue}s!==void 0&&t.push(s)}return t};return i(e),t}})(bAe)),bAe}var wAe,X5t;function SAe(){if(X5t)return wAe;X5t=1;const n=vAe();return wAe=(e,t={})=>{const i=(r,o={})=>{const s=t.escapeInvalid&&n.isInvalidBrace(o),a=r.invalid===!0&&t.escapeInvalid===!0;let c="";if(r.value)return(s||a)&&n.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(const l of r.nodes)c+=i(l);return c};return i(e)},wAe}/*!
|
|
6833
|
+
*/const n5t=Symbol("Comlink.proxy"),ASi=Symbol("Comlink.endpoint"),i5t=Symbol("Comlink.releaseProxy"),cAe=Symbol("Comlink.finalizer"),TQ=Symbol("Comlink.thrown"),r5t=n=>typeof n=="object"&&n!==null||typeof n=="function",PSi={canHandle:n=>r5t(n)&&n[n5t],serialize(n){const{port1:e,port2:t}=new MessageChannel;return s5t(n,e),[t,[t]]},deserialize(n){return n.start(),c5t(n)}},RSi={canHandle:n=>r5t(n)&&TQ in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},o5t=new Map([["proxy",PSi],["throw",RSi]]);function ISi(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function s5t(n,e=globalThis,t=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!ISi(t,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),c=(r.data.argumentList||[]).map(mP);let l;try{const u=a.slice(0,-1).reduce((h,p)=>h[p],n),d=a.reduce((h,p)=>h[p],n);switch(s){case"GET":l=d;break;case"SET":u[a.slice(-1)[0]]=mP(r.data.value),l=!0;break;case"APPLY":l=d.apply(u,c);break;case"CONSTRUCT":{const h=new d(...c);l=h5t(h)}break;case"ENDPOINT":{const{port1:h,port2:p}=new MessageChannel;s5t(n,p),l=DSi(h,[h])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[TQ]:0}}Promise.resolve(l).catch(u=>({value:u,[TQ]:0})).then(u=>{const[d,h]=PQ(u);e.postMessage(Object.assign(Object.assign({},d),{id:o}),h),s==="RELEASE"&&(e.removeEventListener("message",i),a5t(e),cAe in n&&typeof n[cAe]=="function"&&n[cAe]())}).catch(u=>{const[d,h]=PQ({value:new TypeError("Unserializable return value"),[TQ]:0});e.postMessage(Object.assign(Object.assign({},d),{id:o}),h)})}),e.start&&e.start()}function NSi(n){return n.constructor.name==="MessagePort"}function a5t(n){NSi(n)&&n.close()}function c5t(n,e){const t=new Map;return n.addEventListener("message",function(r){const{data:o}=r;if(!o||!o.id)return;const s=t.get(o.id);if(s)try{s(o)}finally{t.delete(o.id)}}),lAe(n,t,[],e)}function MQ(n){if(n)throw new Error("Proxy has been released and is not useable")}function l5t(n){return WN(n,new Map,{type:"RELEASE"}).then(()=>{a5t(n)})}const CQ=new WeakMap,AQ="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(CQ.get(n)||0)-1;CQ.set(n,e),e===0&&l5t(n)});function kSi(n,e){const t=(CQ.get(e)||0)+1;CQ.set(e,t),AQ&&AQ.register(n,e,n)}function OSi(n){AQ&&AQ.unregister(n)}function lAe(n,e,t=[],i=function(){}){let r=!1;const o=new Proxy(i,{get(s,a){if(MQ(r),a===i5t)return()=>{OSi(o),l5t(n),e.clear(),r=!0};if(a==="then"){if(t.length===0)return{then:()=>o};const c=WN(n,e,{type:"GET",path:t.map(l=>l.toString())}).then(mP);return c.then.bind(c)}return lAe(n,e,[...t,a])},set(s,a,c){MQ(r);const[l,u]=PQ(c);return WN(n,e,{type:"SET",path:[...t,a].map(d=>d.toString()),value:l},u).then(mP)},apply(s,a,c){MQ(r);const l=t[t.length-1];if(l===ASi)return WN(n,e,{type:"ENDPOINT"}).then(mP);if(l==="bind")return lAe(n,e,t.slice(0,-1));const[u,d]=u5t(c);return WN(n,e,{type:"APPLY",path:t.map(h=>h.toString()),argumentList:u},d).then(mP)},construct(s,a){MQ(r);const[c,l]=u5t(a);return WN(n,e,{type:"CONSTRUCT",path:t.map(u=>u.toString()),argumentList:c},l).then(mP)}});return kSi(o,n),o}function LSi(n){return Array.prototype.concat.apply([],n)}function u5t(n){const e=n.map(PQ);return[e.map(t=>t[0]),LSi(e.map(t=>t[1]))]}const d5t=new WeakMap;function DSi(n,e){return d5t.set(n,e),n}function h5t(n){return Object.assign(n,{[n5t]:!0})}function PQ(n){for(const[e,t]of o5t)if(t.canHandle(n)){const[i,r]=t.serialize(n);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:n},d5t.get(n)||[]]}function mP(n){switch(n.type){case"HANDLER":return o5t.get(n.name).deserialize(n.value);case"RAW":return n.value}}function WN(n,e,t,i){return new Promise(r=>{const o=$Si();e.set(o,r),n.start&&n.start(),n.postMessage(Object.assign({id:o},t),i)})}function $Si(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var p5t=async n=>{const e=globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER;if(e&&typeof e.kill=="function"){n.verbose&&console.log("[Worker] Killing previous global worker instance...");try{await e.kill()}catch(d){n.verbose&&console.warn("[Worker] Error killing previous global worker instance:",d),globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===e&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}}n.verbose&&console.log("[Worker] Creating circuit web worker with config:",n);let t=n.webWorkerBlobUrl??n.webWorkerUrl;if(!t){const d=`https://cdn.jsdelivr.net/npm/@tscircuit/eval@${n.evalVersion??"latest"}/dist/webworker/entrypoint.js`,h=await globalThis.fetch(d).then(p=>p.blob());t=URL.createObjectURL(h)}const i=new Worker(t,{type:"module"});let r;i.addEventListener("error",d=>{console.error("[Worker] Error in worker",d),r=d}),i.addEventListener("unhandledrejection",d=>{console.error("[Worker] Unhandled rejection in worker",d)}),i.addEventListener("messageerror",d=>{console.error("[Worker] Message error in worker",d)});const o=d=>{console.log("[Worker] Message in worker",d)};if(i.addEventListener("message",o),i.addEventListener("message",async d=>{const h=d.data;if(h?.type==="worker_fetch")try{const p=await globalThis.fetch(h.input,h.init),m=await p.text();i.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!0,response:{body:m,status:p.status,statusText:p.statusText,headers:(()=>{const _={};return p.headers.forEach((g,x)=>{_[x]=g}),_})()}})}catch(p){i.postMessage({type:"worker_fetch_result",requestId:h.requestId,success:!1,error:{name:p.name,message:p.message,stack:p.stack}})}}),r)throw r;const s=c5t(i);i.removeEventListener("message",o);function a(d){return!d||typeof d!="object"?d:d.type&&d.props!==void 0?{__isSerializedReactElement:!0,type:d.type,props:c(d.props),key:d.key}:d}function c(d){if(!d||typeof d!="object")return d;const h={};for(const[p,m]of Object.entries(d))p==="children"?Array.isArray(m)?h.children=m.map(a):h.children=a(m):h[p]=m;return h}n.enableFetchProxy&&i.postMessage({type:"override_global_fetch"}),n.snippetsApiBaseUrl&&await s.setSnippetsApiBaseUrl(n.snippetsApiBaseUrl),n.platform&&await s.setPlatformConfig(n.platform),n.projectConfig&&await s.setProjectConfig(n.projectConfig);let l=!1;const u={clearEventListeners:s.clearEventListeners.bind(s),enableDebug:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't enableDebug");return s.enableDebug.bind(s)(...d)},version:s.version.bind(s),execute:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't execute");return s.execute.bind(s)(...d)},executeComponent:async d=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeComponent");if(typeof d=="function")return s.executeComponent.bind(s)(d);if(d&&typeof d=="object"&&d.type){const h=a(d);return s.executeComponent.bind(s)(h)}return s.executeComponent.bind(s)(d)},executeWithFsMap:async(...d)=>{if(l)throw new Error("CircuitWebWorker was terminated, can't executeWithFsMap");return s.executeWithFsMap.bind(s)(...d)},renderUntilSettled:s.renderUntilSettled.bind(s),getCircuitJson:s.getCircuitJson.bind(s),on:(d,h)=>{const p=h5t(h);s.on(d,p)},kill:async()=>{s[i5t](),i.terminate(),l=!0,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER===u&&(globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=void 0)}};return u.__rawWorker=i,globalThis.TSCIRCUIT_GLOBAL_CIRCUIT_WORKER=u,u};const f5t=n=>{const e={};if(!n)return e;for(const i of sw)e[i]=0;const t=new Map;for(const i of n){const[,,r,o]=i.type.split(":");if(o==="start"){t.set(`${r}:${i.renderId}`,i);continue}if(o==="end"){const s=t.get(`${r}:${i.renderId}`);if(s){const a=i.createdAt-s.createdAt;e[r]=(e[r]||0)+a}}}return e},zSi=(n,e)=>{const t={};for(const[i,r]of n.entries()){const o=e.get(i);o!==r&&(t[i]={old:r,new:o})}for(const[i,r]of e.entries())n.has(i)||(t[i]={old:void 0,new:r});return t};function FSi(){const n=le.useRef(Promise.resolve()),e=le.useRef(!1),t=le.useRef(null),i=le.useCallback(async s=>{await n.current;const a={cancelled:!1};t.current=a;let c;const l=new Promise(u=>{c=u});try{return n.current=l,e.current=!0,await s()}catch(u){if(!a.cancelled)throw u}finally{e.current=!1,t.current=null,c()}},[]),r=le.useCallback(()=>{t.current&&(t.current.cancelled=!0),n.current=Promise.resolve(),e.current=!1},[]),o=le.useCallback(()=>e.current,[]);return{runWithMutex:i,isLocked:o,cancel:r}}const USi=({message:n="Loading files..."})=>oe.jsxs("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-gap-4 rf-p-2 rf-border-b",children:[oe.jsx("div",{className:"rf-w-20 rf-h-9 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded-md rf-animate-pulse"}),oe.jsx("div",{className:"rf-flex rf-gap-6 rf-ml-auto",children:["PCB","Schematic","3D"].map((e,t)=>oe.jsx("div",{className:"rf-h-6 rf-w-20 rf-bg-gray-200 dark:rf-bg-gray-700 rf-rounded rf-animate-pulse"},t))})]}),oe.jsx("div",{className:"rf-flex-1 rf-p-4",children:oe.jsx("div",{className:"rf-w-full rf-h-full rf-rounded-lg rf-bg-gray-100 dark:rf-bg-gray-800 rf-animate-pulse rf-flex rf-items-center rf-justify-center",children:oe.jsx("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4",children:oe.jsx("div",{className:"rf-text-sm rf-text-gray-400 dark:rf-text-gray-500",children:n})})})})]}),BSi=26,SS=Uh("run-frame:RunFrame"),jSi=async()=>{try{const n=await fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval");if(n.ok)return(await n.json()).tags?.latest}catch(n){console.error("Failed to fetch latest eval version",n)}},m5t=async(n,e)=>{if(n)return n;if(e||!window.TSCIRCUIT_LATEST_EVAL_VERSION){const t=await jSi();if(t)return window.TSCIRCUIT_LATEST_EVAL_VERSION=t,t}return window.TSCIRCUIT_LATEST_EVAL_VERSION?window.TSCIRCUIT_LATEST_EVAL_VERSION:"latest"},_5t=n=>{qY();const[e,t]=Hb(de=>[de.circuitJson,de.setCircuitJson]),[i,r]=le.useState(null),o=le.useRef(null),[s,a]=le.useState(null),[c,l]=le.useReducer((de,xe)=>de+1,0),u=XY(de=>de.setLastRunEvalVersion),d=le.useRef(0),h=FSi(),[p,m]=le.useState(!1),[_,g]=le.useState(!1),[x,b]=le.useState({}),[v,S]=le.useState(""),I=Object.values(x).sort((de,xe)=>de.startTime-xe.startTime)[0]?.effectName;le.useEffect(()=>{const de=xe=>{(xe.ctrlKey||xe.metaKey)&&xe.key==="Enter"&&!p&&l(1)};return window.addEventListener("keydown",de),()=>window.removeEventListener("keydown",de)},[p]),le.useEffect(()=>{let de=!1;return(async()=>{try{if(!globalThis.runFrameWorker){const te=await m5t(n.evalVersion,n.forceLatestEvalVersion),ae=await p5t({evalVersion:te,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,projectConfig:{projectBaseUrl:n.projectBaseUrl||`${Xw}/files/static`},...n.platformConfig&&{platformConfig:n.platformConfig},verbose:!0,...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});if(de)return;globalThis.runFrameWorker=ae,u(te)}de||g(!0)}catch(te){console.error("Failed to preload eval worker",te)}})(),()=>{de=!0}},[n.evalVersion,n.evalWebWorkerBlobUrl,n.forceLatestEvalVersion]);const[A,P]=le.useState(null),[M,N]=le.useState({}),[C,U]=le.useState(n.defaultActiveTab??n.defaultTab??"pcb");le.useEffect(()=>{n.debug&&Uh.enable("run-frame*")},[n.debug]);const O=n.fsMap instanceof Map?n.fsMap:Object.entries(n.fsMap??{}).reduce((de,[xe,te])=>de.set(xe,te),new Map),H=le.useRef(null),Y=le.useRef(null);le.useEffect(()=>{if(n.isLoadingFiles)return;const de=O instanceof Map?Object.fromEntries(O.entries()):O;if(!de||Object.keys(de).length===0){r({error:"No files provided. Please provide at least one file with code to execute.",stack:""}),m(!1);return}const xe=c!==d.current;if(H.current&&e){const ae=zSi(H.current,O);if(Object.keys(ae).length>0)SS("code changes detected");else if(Y.current!==n.entrypoint)SS("render triggered by entrypoint change");else if(!xe){SS("render triggered without changes to fsMap, skipping");return}}if(n.showRunButton&&c===d.current)return;H.current=O,Y.current=n.entrypoint??null,d.current=c,m(!0);const te=async()=>{SS("running render worker"),r(null),P(null),b({});const ae={progress:0,debugOutputs:[]};let fe=!1;o.current=()=>{fe=!0};const Me=await m5t(n.evalVersion,!globalThis.runFrameWorker&&n.forceLatestEvalVersion);SS("resolvedEvalVersion",Me);const Ee=globalThis.runFrameWorker??await p5t({evalVersion:Me,webWorkerBlobUrl:n.evalWebWorkerBlobUrl,verbose:!0,projectConfig:{projectBaseUrl:n.projectBaseUrl||`${Xw}/files/static`},...n.platformConfig&&{platformConfig:n.platformConfig},...n.enableFetchProxy&&{enableFetchProxy:n.enableFetchProxy}});globalThis.runFrameWorker=Ee,u(Me),v?.trim()&&Ee.enableDebug(v.replace("DEBUG=","")),SS("Starting render..."),n.onRenderStarted?.();const Ie=O instanceof Map?Object.fromEntries(O.entries()):O;let Le=Date.now();Ee.on("asyncEffect:start",be=>{const je=`${be.phase}|${be.componentDisplayName??""}|${be.effectName}`;b(nt=>({...nt,[je]:{...be,startTime:Date.now()}}))}),Ee.on("asyncEffect:end",be=>{const je=`${be.phase}|${be.componentDisplayName??""}|${be.effectName}`;b(nt=>{const{[je]:ct,...Ae}=nt;return Ae})}),Ee.on("autorouting:start",be=>{N({...M,[be.componentDisplayName]:{simpleRouteJson:be.simpleRouteJson}})}),Ee.on("board:renderPhaseStarted",be=>{ae.lastRenderEvent=be,ae.eventsProcessed=(ae.eventsProcessed??0)+1;const je=sw.indexOf(be.phase)/BSi*.75+ae.eventsProcessed/1e3*.25,nt=1-Math.exp(-je*3);ae.progress=nt,fe||P({...ae})}),C==="render_log"&&Ee.on("renderable:renderLifecycle:anyEvent",be=>{ae.renderEvents=ae.renderEvents??[],be.createdAt=Date.now(),ae.renderEvents.push(be),Date.now()-Le>500&&(ae.phaseTimings=f5t(ae.renderEvents??[]),Le=Date.now()),fe||P({...ae})}),Ee.on("autorouting:progress",be=>{a(be.debugGraphics)}),Ee.on("debug:logOutput",be=>{ae.debugOutputs=ae.debugOutputs??[],ae.debugOutputs.push({type:"debug",name:be.name,content:be.content}),fe||P({...ae})}),SS("Executing fsMap...");const Ne=await Ee.executeWithFsMap({entrypoint:n.entrypoint,fsMap:Ie,...n.mainComponentPath?{mainComponentPath:n.mainComponentPath}:{}}).then(()=>({success:!0})).catch(be=>{const je=be.message.replace("Error: ","");return SS(`eval error: ${je}`),n.onError?.(be),r({error:je,stack:be.stack}),P(null),console.error(be),{success:!1}});if(SS("worker call started"),!Ne.success){m(!1),b({});return}const se=Ee.renderUntilSettled();SS("waiting for initial circuit json...");let Se=await Ee.getCircuitJson().catch(be=>(SS("error getting initial circuit json",be),n.onError?.(be),r({error:be.message,stack:be.stack}),P(null),m(!1),b({}),null));Se&&(SS("got initial circuit json"),t(Se),n.onCircuitJsonChange?.(Se),n.onInitialRender?.({circuitJson:Se}),await se,SS("getting final circuit json"),Se=await Ee.getCircuitJson(),n.onCircuitJsonChange?.(Se),t(Se),n.onRenderFinished?.({circuitJson:Se}),a({}),C==="render_log"&&(ae.phaseTimings=f5t(ae.renderEvents??[])),ae.progress=1,fe||P({...ae}),m(!1),b({}),S(""),o.current=null)};h.runWithMutex(te)},[n.fsMap,n.entrypoint,c,n.evalVersion,n.mainComponentPath,n.isLoadingFiles,v]);const X=le.useRef(null),K=le.useRef(null),Q=de=>{if(!de||de===null){console.warn("[RunFrame] handleEditEvent received null or undefined event.");return}de.in_progress?(X.current=de,K.current&&(clearTimeout(K.current),K.current=null)):(K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{const xe=de||X.current;n.onEditEvent?.(xe),X.current=null,K.current=null},100))},ce=async(de,xe)=>{let te="";const ae=Array.isArray(e)&&e.find(Ee=>Ee.type==="software_project_metadata"),fe=n.projectUrl??ae?.project_url;if(fe)try{te=new URL(fe).pathname}catch{te=fe}const Me=te?`${te} - ${de}`:de;await i7.post("autorouting/bug_reports/create",{json:{title:Me,simple_route_json:xe.simpleRouteJson}}).json().then(({autorouting_bug_report:Ee})=>{window.open(`https://api.tscircuit.com/autorouting/bug_reports/view?autorouting_bug_report_id=${Ee.autorouting_bug_report_id}`,"_blank")}).catch(Ee=>{console.error("Failed to report autorouting bug",Ee),Ee.message.includes("401")?alert("You must be logged in to report autorouting bugs"):alert(`Failed to report autorouting bug: ${Ee.message}`)})};return n.isLoadingFiles?oe.jsx(USi,{}):oe.jsx(t5t,{code:O.get(n.entrypoint??n.mainComponentPath),fsMap:O,defaultActiveTab:n.defaultActiveTab??n.defaultTab,defaultTab:n.defaultTab,availableTabs:n.availableTabs,showToggleFullScreen:n.showToggleFullScreen,autoroutingGraphics:s,autoroutingLog:M,onReportAutoroutingLog:n.onReportAutoroutingLog||ce,leftHeaderContent:oe.jsxs(oe.Fragment,{children:[n.showRunButton&&oe.jsxs("div",{className:"rf-relative rf-inline-flex",children:[oe.jsxs("button",{type:"button",onClick:()=>{l(1)},className:"rf-flex rf-items-center rf-gap-2 rf-px-4 rf-py-2 rf-bg-blue-600 hover:rf-bg-blue-700 rf-text-white rf-rounded-md disabled:rf-opacity-50 transition-colors duration-200",disabled:p||!_,children:["Run"," ",p||!_?oe.jsx(K5,{className:"rf-w-3 rf-h-3 rf-animate-spin"}):oe.jsx(Drt,{className:"rf-w-3 rf-h-3"})]}),p&&oe.jsx("div",{className:"rf-flex rf-items-center rf-ml-1",children:oe.jsx(R0,{onClick:de=>{de.stopPropagation(),m(!1),P(null),r(null),o.current&&(o.current(),o.current=null),h.cancel(),b({}),globalThis.runFrameWorker&&(globalThis.runFrameWorker.kill(),globalThis.runFrameWorker=null)},variant:"ghost",size:"icon",className:"rf-text-red-300 hover:rf-text-red-400 hover:!rf-bg-transparent [&>svg]:rf-text-red-300 [&>svg]:hover:rf-text-red-400 rf-flex rf-items-center rf-justify-center",children:oe.jsx(URn,{className:"!rf-h-2.5 !rf-w-2.5",fill:"currentColor",stroke:"currentColor"})})})]}),n.showFileMenu!==!1&&oe.jsx(u7,{isWebEmbedded:n.isWebEmbedded}),n.leftHeaderContent]}),onActiveTabChange:U,circuitJson:e,renderLog:A,activeEffectName:I,isRunningCode:p,errorMessage:i?.error,errorStack:i?.stack,onEditEvent:Q,editEvents:n.editEvents,defaultToFullScreen:n.defaultToFullScreen,onRerunWithDebug:de=>{S(de||""),l(1)}})},HSi=n=>{const[e,t]=Jbe("load-latest-eval",!0),[i]=le.useState(()=>typeof window>"u"?void 0:new URLSearchParams(window.location.hash.slice(1)).get("main_component")??void 0),r=le.useCallback(o=>{if(typeof window>"u")return;const s=new URLSearchParams(window.location.hash.slice(1));if(s.get("main_component")===o)return;s.set("main_component",o);const a=s.toString(),c=`${window.location.pathname}${window.location.search}`+(a.length>0?`#${a}`:"");window.history.replaceState(null,"",c)},[]);return oe.jsx(p3t,{debug:n.debug,forceLatestEvalVersion:!n.workerBlobUrl&&e,defaultToFullScreen:!0,showToggleFullScreen:!1,workerBlobUrl:n.workerBlobUrl,showFilesSwitch:!0,showFileMenu:!1,enableFetchProxy:n.enableFetchProxy,initialMainComponentPath:i,onMainComponentPathChange:r,leftHeaderContent:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between",children:[oe.jsx(u7,{isWebEmbedded:!1,shouldLoadLatestEval:!n.workerBlobUrl&&e,onChangeShouldLoadLatestEval:o=>{t(o),globalThis.runFrameWorker=null}}),n.scenarioSelectorContent]})})};Uh("run-frame:ImportComponentDialog");function uAe(n){const e=n.lastIndexOf("/");return e===-1?"/":n.substring(0,e)}function VSi({currentFile:n,files:e}){const[t,i]=le.useState(!1),[r,o]=le.useState(()=>{if(typeof window<"u"){const c=new URLSearchParams(window.location.search),l=new URLSearchParams(window.location.hash.slice(1)),u=c.get("file")??l.get("file");if(u&&e.includes(u)){const d=uAe(u);return d==="/"?null:d}}if(n&&e.includes(n)){const c=uAe(n);return c==="/"?null:c}return null});return le.useEffect(()=>{if(n&&!t&&e.includes(n)){const c=uAe(n);o(c==="/"?null:c)}},[n,t,e]),{currentFolder:r,navigateToFolder:c=>{o(c),i(!0)},resetManualNavigation:()=>{i(!1)}}}var y5t=1,GSi=.9,YSi=.8,qSi=.17,dAe=.1,hAe=.999,XSi=.9999,WSi=.99,KSi=/[\\\/_+.#"@\[\(\{&]/,ZSi=/[\\\/_+.#"@\[\(\{&]/g,QSi=/[\s-]/,g5t=/[\s-]/g;function pAe(n,e,t,i,r,o,s){if(o===e.length)return r===n.length?y5t:WSi;var a=`${r},${o}`;if(s[a]!==void 0)return s[a];for(var c=i.charAt(o),l=t.indexOf(c,r),u=0,d,h,p,m;l>=0;)d=pAe(n,e,t,i,l+1,o+1,s),d>u&&(l===r?d*=y5t:KSi.test(n.charAt(l-1))?(d*=YSi,p=n.slice(r,l-1).match(ZSi),p&&r>0&&(d*=Math.pow(hAe,p.length))):QSi.test(n.charAt(l-1))?(d*=GSi,m=n.slice(r,l-1).match(g5t),m&&r>0&&(d*=Math.pow(hAe,m.length))):(d*=qSi,r>0&&(d*=Math.pow(hAe,l-r))),n.charAt(l)!==e.charAt(o)&&(d*=XSi)),(d<dAe&&t.charAt(l-1)===i.charAt(o+1)||i.charAt(o+1)===i.charAt(o)&&t.charAt(l-1)!==i.charAt(o))&&(h=pAe(n,e,t,i,l+1,o+2,s),h*dAe>d&&(d=h*dAe)),d>u&&(u=d),l=t.indexOf(c,l+1);return s[a]=u,u}function x5t(n){return n.toLowerCase().replace(g5t," ")}function JSi(n,e,t){return n=t&&t.length>0?`${n+" "+t.join(" ")}`:n,pAe(n,e,x5t(n),x5t(e),0,0,{})}var d7='[cmdk-group=""]',fAe='[cmdk-group-items=""]',e2i='[cmdk-group-heading=""]',b5t='[cmdk-item=""]',v5t=`${b5t}:not([aria-disabled="true"])`,mAe="cmdk-item-select",KN="data-value",t2i=(n,e,t)=>JSi(n,e,t),w5t=le.createContext(void 0),h7=()=>le.useContext(w5t),S5t=le.createContext(void 0),_Ae=()=>le.useContext(S5t),E5t=le.createContext(void 0),T5t=le.forwardRef((n,e)=>{let t=ZN(()=>{var ae,fe;return{search:"",value:(fe=(ae=n.value)!=null?ae:n.defaultValue)!=null?fe:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=ZN(()=>new Set),r=ZN(()=>new Map),o=ZN(()=>new Map),s=ZN(()=>new Set),a=M5t(n),{label:c,children:l,value:u,onValueChange:d,filter:h,shouldFilter:p,loop:m,disablePointerSelection:_=!1,vimBindings:g=!0,...x}=n,b=Vb(),v=Vb(),S=Vb(),I=le.useRef(null),A=h2i();_P(()=>{if(u!==void 0){let ae=u.trim();t.current.value=ae,P.emit()}},[u]),_P(()=>{A(6,H)},[]);let P=le.useMemo(()=>({subscribe:ae=>(s.current.add(ae),()=>s.current.delete(ae)),snapshot:()=>t.current,setState:(ae,fe,Me)=>{var Ee,Ie,Le,Ne;if(!Object.is(t.current[ae],fe)){if(t.current[ae]=fe,ae==="search")O(),C(),A(1,U);else if(ae==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(S);se?se.focus():(Ee=document.getElementById(b))==null||Ee.focus()}if(A(7,()=>{var se;t.current.selectedItemId=(se=Y())==null?void 0:se.id,P.emit()}),Me||A(5,H),((Ie=a.current)==null?void 0:Ie.value)!==void 0){let se=fe??"";(Ne=(Le=a.current).onValueChange)==null||Ne.call(Le,se);return}}P.emit()}},emit:()=>{s.current.forEach(ae=>ae())}}),[]),M=le.useMemo(()=>({value:(ae,fe,Me)=>{var Ee;fe!==((Ee=o.current.get(ae))==null?void 0:Ee.value)&&(o.current.set(ae,{value:fe,keywords:Me}),t.current.filtered.items.set(ae,N(fe,Me)),A(2,()=>{C(),P.emit()}))},item:(ae,fe)=>(i.current.add(ae),fe&&(r.current.has(fe)?r.current.get(fe).add(ae):r.current.set(fe,new Set([ae]))),A(3,()=>{O(),C(),t.current.value||U(),P.emit()}),()=>{o.current.delete(ae),i.current.delete(ae),t.current.filtered.items.delete(ae);let Me=Y();A(4,()=>{O(),Me?.getAttribute("id")===ae&&U(),P.emit()})}),group:ae=>(r.current.has(ae)||r.current.set(ae,new Set),()=>{o.current.delete(ae),r.current.delete(ae)}),filter:()=>a.current.shouldFilter,label:c||n["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:b,inputId:S,labelId:v,listInnerRef:I}),[]);function N(ae,fe){var Me,Ee;let Ie=(Ee=(Me=a.current)==null?void 0:Me.filter)!=null?Ee:t2i;return ae?Ie(ae,t.current.search,fe):0}function C(){if(!t.current.search||a.current.shouldFilter===!1)return;let ae=t.current.filtered.items,fe=[];t.current.filtered.groups.forEach(Ee=>{let Ie=r.current.get(Ee),Le=0;Ie.forEach(Ne=>{let se=ae.get(Ne);Le=Math.max(se,Le)}),fe.push([Ee,Le])});let Me=I.current;X().sort((Ee,Ie)=>{var Le,Ne;let se=Ee.getAttribute("id"),Se=Ie.getAttribute("id");return((Le=ae.get(Se))!=null?Le:0)-((Ne=ae.get(se))!=null?Ne:0)}).forEach(Ee=>{let Ie=Ee.closest(fAe);Ie?Ie.appendChild(Ee.parentElement===Ie?Ee:Ee.closest(`${fAe} > *`)):Me.appendChild(Ee.parentElement===Me?Ee:Ee.closest(`${fAe} > *`))}),fe.sort((Ee,Ie)=>Ie[1]-Ee[1]).forEach(Ee=>{var Ie;let Le=(Ie=I.current)==null?void 0:Ie.querySelector(`${d7}[${KN}="${encodeURIComponent(Ee[0])}"]`);Le?.parentElement.appendChild(Le)})}function U(){let ae=X().find(Me=>Me.getAttribute("aria-disabled")!=="true"),fe=ae?.getAttribute(KN);P.setState("value",fe||void 0)}function O(){var ae,fe,Me,Ee;if(!t.current.search||a.current.shouldFilter===!1){t.current.filtered.count=i.current.size;return}t.current.filtered.groups=new Set;let Ie=0;for(let Le of i.current){let Ne=(fe=(ae=o.current.get(Le))==null?void 0:ae.value)!=null?fe:"",se=(Ee=(Me=o.current.get(Le))==null?void 0:Me.keywords)!=null?Ee:[],Se=N(Ne,se);t.current.filtered.items.set(Le,Se),Se>0&&Ie++}for(let[Le,Ne]of r.current)for(let se of Ne)if(t.current.filtered.items.get(se)>0){t.current.filtered.groups.add(Le);break}t.current.filtered.count=Ie}function H(){var ae,fe,Me;let Ee=Y();Ee&&(((ae=Ee.parentElement)==null?void 0:ae.firstChild)===Ee&&((Me=(fe=Ee.closest(d7))==null?void 0:fe.querySelector(e2i))==null||Me.scrollIntoView({block:"nearest"})),Ee.scrollIntoView({block:"nearest"}))}function Y(){var ae;return(ae=I.current)==null?void 0:ae.querySelector(`${b5t}[aria-selected="true"]`)}function X(){var ae;return Array.from(((ae=I.current)==null?void 0:ae.querySelectorAll(v5t))||[])}function K(ae){let fe=X()[ae];fe&&P.setState("value",fe.getAttribute(KN))}function Q(ae){var fe;let Me=Y(),Ee=X(),Ie=Ee.findIndex(Ne=>Ne===Me),Le=Ee[Ie+ae];(fe=a.current)!=null&&fe.loop&&(Le=Ie+ae<0?Ee[Ee.length-1]:Ie+ae===Ee.length?Ee[0]:Ee[Ie+ae]),Le&&P.setState("value",Le.getAttribute(KN))}function ce(ae){let fe=Y(),Me=fe?.closest(d7),Ee;for(;Me&&!Ee;)Me=ae>0?u2i(Me,d7):d2i(Me,d7),Ee=Me?.querySelector(v5t);Ee?P.setState("value",Ee.getAttribute(KN)):Q(ae)}let de=()=>K(X().length-1),xe=ae=>{ae.preventDefault(),ae.metaKey?de():ae.altKey?ce(1):Q(1)},te=ae=>{ae.preventDefault(),ae.metaKey?K(0):ae.altKey?ce(-1):Q(-1)};return le.createElement(cu.div,{ref:e,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:ae=>{var fe;(fe=x.onKeyDown)==null||fe.call(x,ae);let Me=ae.nativeEvent.isComposing||ae.keyCode===229;if(!(ae.defaultPrevented||Me))switch(ae.key){case"n":case"j":{g&&ae.ctrlKey&&xe(ae);break}case"ArrowDown":{xe(ae);break}case"p":case"k":{g&&ae.ctrlKey&&te(ae);break}case"ArrowUp":{te(ae);break}case"Home":{ae.preventDefault(),K(0);break}case"End":{ae.preventDefault(),de();break}case"Enter":{ae.preventDefault();let Ee=Y();if(Ee){let Ie=new Event(mAe);Ee.dispatchEvent(Ie)}}}}},le.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:f2i},c),RQ(n,ae=>le.createElement(S5t.Provider,{value:P},le.createElement(w5t.Provider,{value:M},ae))))}),n2i=le.forwardRef((n,e)=>{var t,i;let r=Vb(),o=le.useRef(null),s=le.useContext(E5t),a=h7(),c=M5t(n),l=(i=(t=c.current)==null?void 0:t.forceMount)!=null?i:s?.forceMount;_P(()=>{if(!l)return a.item(r,s?.id)},[l]);let u=C5t(r,o,[n.value,n.children,o],n.keywords),d=_Ae(),h=zC(A=>A.value&&A.value===u.current),p=zC(A=>l||a.filter()===!1?!0:A.search?A.filtered.items.get(r)>0:!0);le.useEffect(()=>{let A=o.current;if(!(!A||n.disabled))return A.addEventListener(mAe,m),()=>A.removeEventListener(mAe,m)},[p,n.onSelect,n.disabled]);function m(){var A,P;_(),(P=(A=c.current).onSelect)==null||P.call(A,u.current)}function _(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:g,value:x,onSelect:b,forceMount:v,keywords:S,...I}=n;return le.createElement(cu.div,{ref:w5(o,e),...I,id:r,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!h,"data-disabled":!!g,"data-selected":!!h,onPointerMove:g||a.getDisablePointerSelection()?void 0:_,onClick:g?void 0:m},n.children)}),i2i=le.forwardRef((n,e)=>{let{heading:t,children:i,forceMount:r,...o}=n,s=Vb(),a=le.useRef(null),c=le.useRef(null),l=Vb(),u=h7(),d=zC(p=>r||u.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);_P(()=>u.group(s),[]),C5t(s,a,[n.value,n.heading,c]);let h=le.useMemo(()=>({id:s,forceMount:r}),[r]);return le.createElement(cu.div,{ref:w5(a,e),...o,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},t&&le.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},t),RQ(n,p=>le.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?l:void 0},le.createElement(E5t.Provider,{value:h},p))))}),r2i=le.forwardRef((n,e)=>{let{alwaysRender:t,...i}=n,r=le.useRef(null),o=zC(s=>!s.search);return!t&&!o?null:le.createElement(cu.div,{ref:w5(r,e),...i,"cmdk-separator":"",role:"separator"})}),o2i=le.forwardRef((n,e)=>{let{onValueChange:t,...i}=n,r=n.value!=null,o=_Ae(),s=zC(l=>l.search),a=zC(l=>l.selectedItemId),c=h7();return le.useEffect(()=>{n.value!=null&&o.setState("search",n.value)},[n.value]),le.createElement(cu.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":a,id:c.inputId,type:"text",value:r?n.value:s,onChange:l=>{r||o.setState("search",l.target.value),t?.(l.target.value)}})}),s2i=le.forwardRef((n,e)=>{let{children:t,label:i="Suggestions",...r}=n,o=le.useRef(null),s=le.useRef(null),a=zC(l=>l.selectedItemId),c=h7();return le.useEffect(()=>{if(s.current&&o.current){let l=s.current,u=o.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=l.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return h.observe(l),()=>{cancelAnimationFrame(d),h.unobserve(l)}}},[]),le.createElement(cu.div,{ref:w5(o,e),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:c.listId},RQ(n,l=>le.createElement("div",{ref:w5(s,c.listInnerRef),"cmdk-list-sizer":""},l)))}),a2i=le.forwardRef((n,e)=>{let{open:t,onOpenChange:i,overlayClassName:r,contentClassName:o,container:s,...a}=n;return le.createElement(ive,{open:t,onOpenChange:i},le.createElement(rve,{container:s},le.createElement(ZY,{"cmdk-overlay":"",className:r}),le.createElement(QY,{"aria-label":n.label,"cmdk-dialog":"",className:o},le.createElement(T5t,{ref:e,...a}))))}),c2i=le.forwardRef((n,e)=>zC(t=>t.filtered.count===0)?le.createElement(cu.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),l2i=le.forwardRef((n,e)=>{let{progress:t,children:i,label:r="Loading...",...o}=n;return le.createElement(cu.div,{ref:e,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},RQ(n,s=>le.createElement("div",{"aria-hidden":!0},s)))}),Cw=Object.assign(T5t,{List:s2i,Item:n2i,Input:o2i,Group:i2i,Separator:r2i,Dialog:a2i,Empty:c2i,Loading:l2i});function u2i(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return t;t=t.nextElementSibling}}function d2i(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}}function M5t(n){let e=le.useRef(n);return _P(()=>{e.current=n}),e}var _P=typeof window>"u"?le.useEffect:le.useLayoutEffect;function ZN(n){let e=le.useRef();return e.current===void 0&&(e.current=n()),e}function zC(n){let e=_Ae(),t=()=>n(e.snapshot());return le.useSyncExternalStore(e.subscribe,t,t)}function C5t(n,e,t,i=[]){let r=le.useRef(),o=h7();return _P(()=>{var s;let a=(()=>{var l;for(let u of t){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(l=u.current.textContent)==null?void 0:l.trim():r.current}})(),c=i.map(l=>l.trim());o.value(n,a,c),(s=e.current)==null||s.setAttribute(KN,a),r.current=a}),r}var h2i=()=>{let[n,e]=le.useState(),t=ZN(()=>new Map);return _P(()=>{t.current.forEach(i=>i()),t.current=new Map},[n]),(i,r)=>{t.current.set(i,r),e({})}};function p2i(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function RQ({asChild:n,children:e},t){return n&&le.isValidElement(e)?le.cloneElement(p2i(e),{ref:e.ref},t(e.props.children)):t(e)}var f2i={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const A5t=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw,{ref:t,className:So("rf-flex rf-h-full rf-w-full rf-flex-col rf-overflow-hidden rf-rounded-md rf-bg-white rf-text-zinc-950 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...e}));A5t.displayName=Cw.displayName;const P5t=le.forwardRef(({className:n,...e},t)=>oe.jsxs("div",{className:"rf-flex rf-items-center rf-border-b rf-px-3","cmdk-input-wrapper":"",children:[oe.jsx(vxe,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-shrink-0 rf-opacity-50"}),oe.jsx(Cw.Input,{ref:t,className:So("rf-flex rf-h-10 rf-w-full rf-rounded-md rf-bg-transparent rf-py-3 rf-text-sm rf-outline-none placeholder:rf-text-zinc-500 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:placeholder:rf-text-zinc-400",n),...e})]}));P5t.displayName=Cw.Input.displayName;const R5t=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.List,{ref:t,className:So("rf-max-h-[300px] rf-overflow-y-auto rf-overflow-x-hidden",n),...e}));R5t.displayName=Cw.List.displayName;const yAe=le.forwardRef((n,e)=>oe.jsx(Cw.Empty,{ref:e,className:"rf-py-6 rf-text-center rf-text-sm",...n}));yAe.displayName=Cw.Empty.displayName;const QN=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Group,{ref:t,className:So("rf-overflow-hidden rf-p-1 rf-text-zinc-950 [&_[cmdk-group-heading]]:rf-px-2 [&_[cmdk-group-heading]]:rf-py-1.5 [&_[cmdk-group-heading]]:rf-text-xs [&_[cmdk-group-heading]]:rf-font-medium [&_[cmdk-group-heading]]:rf-text-zinc-500 dark:rf-text-zinc-50 dark:[&_[cmdk-group-heading]]:rf-text-zinc-400",n),...e}));QN.displayName=Cw.Group.displayName;const m2i=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Separator,{ref:t,className:So("rf--mx-1 rf-h-px rf-bg-zinc-200 dark:rf-bg-zinc-800",n),...e}));m2i.displayName=Cw.Separator.displayName;const JN=le.forwardRef(({className:n,...e},t)=>oe.jsx(Cw.Item,{ref:t,className:So("rf-relative rf-flex rf-cursor-default rf-gap-2 rf-select-none rf-items-center rf-rounded-sm rf-px-2 rf-py-1.5 rf-text-sm rf-outline-none data-[disabled=true]:rf-pointer-events-none data-[selected=true]:rf-bg-zinc-100 data-[selected=true]:rf-text-zinc-900 data-[disabled=true]:rf-opacity-50 [&_svg]:rf-pointer-events-none [&_svg]:rf-size-4 [&_svg]:rf-shrink-0 dark:data-[selected=true]:rf-bg-zinc-800 dark:data-[selected=true]:rf-text-zinc-50",n),...e}));JN.displayName=Cw.Item.displayName;var IQ="Popover",[I5t]=WE(IQ,[yG]),p7=yG(),[_2i,FC]=I5t(IQ),N5t=n=>{const{__scopePopover:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=n,a=p7(e),c=le.useRef(null),[l,u]=le.useState(!1),[d,h]=kA({prop:i,defaultProp:r??!1,onChange:o,caller:IQ});return oe.jsx(Uxe,{...a,children:oe.jsx(_2i,{scope:e,contentId:Vb(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:le.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:le.useCallback(()=>u(!0),[]),onCustomAnchorRemove:le.useCallback(()=>u(!1),[]),modal:s,children:t})})};N5t.displayName=IQ;var k5t="PopoverAnchor",y2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(k5t,t),o=p7(t),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=r;return le.useEffect(()=>(s(),()=>a()),[s,a]),oe.jsx(Bxe,{...o,...i,ref:e})});y2i.displayName=k5t;var O5t="PopoverTrigger",L5t=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(O5t,t),o=p7(t),s=H_(e,r.triggerRef),a=oe.jsx(cu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":U5t(r.open),...i,ref:s,onClick:aa(n.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:oe.jsx(Bxe,{asChild:!0,...o,children:a})});L5t.displayName=O5t;var gAe="PopoverPortal",[g2i,x2i]=I5t(gAe,{forceMount:void 0}),D5t=n=>{const{__scopePopover:e,forceMount:t,children:i,container:r}=n,o=FC(gAe,e);return oe.jsx(g2i,{scope:e,forceMount:t,children:oe.jsx(qS,{present:t||o.open,children:oe.jsx(gG,{asChild:!0,container:r,children:i})})})};D5t.displayName=gAe;var ek="PopoverContent",$5t=le.forwardRef((n,e)=>{const t=x2i(ek,n.__scopePopover),{forceMount:i=t.forceMount,...r}=n,o=FC(ek,n.__scopePopover);return oe.jsx(qS,{present:i||o.open,children:o.modal?oe.jsx(v2i,{...r,ref:e}):oe.jsx(w2i,{...r,ref:e})})});$5t.displayName=ek;var b2i=NA("PopoverContent.RemoveScroll"),v2i=le.forwardRef((n,e)=>{const t=FC(ek,n.__scopePopover),i=le.useRef(null),r=H_(e,i),o=le.useRef(!1);return le.useEffect(()=>{const s=i.current;if(s)return Hxe(s)},[]),oe.jsx(MG,{as:b2i,allowPinchZoom:!0,children:oe.jsx(z5t,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aa(n.onCloseAutoFocus,s=>{s.preventDefault(),o.current||t.triggerRef.current?.focus()}),onPointerDownOutside:aa(n.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:aa(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),w2i=le.forwardRef((n,e)=>{const t=FC(ek,n.__scopePopover),i=le.useRef(!1),r=le.useRef(!1);return oe.jsx(z5t,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),z5t=le.forwardRef((n,e)=>{const{__scopePopover:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=n,h=FC(ek,t),p=p7(t);return Exe(),oe.jsx(sG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:oe.jsx(oG,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:oe.jsx(Aot,{"data-state":U5t(h.open),role:"dialog",id:h.contentId,...p,...d,ref:e,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),F5t="PopoverClose",S2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=FC(F5t,t);return oe.jsx(cu.button,{type:"button",...i,ref:e,onClick:aa(n.onClick,()=>r.onOpenChange(!1))})});S2i.displayName=F5t;var E2i="PopoverArrow",T2i=le.forwardRef((n,e)=>{const{__scopePopover:t,...i}=n,r=p7(t);return oe.jsx(Pot,{...r,...i,ref:e})});T2i.displayName=E2i;function U5t(n){return n?"open":"closed"}var M2i=N5t,C2i=L5t,A2i=D5t,B5t=$5t;const P2i=M2i,R2i=C2i,j5t=le.forwardRef(({className:n,align:e="center",sideOffset:t=4,...i},r)=>oe.jsx(A2i,{children:oe.jsx(B5t,{ref:r,align:e,sideOffset:t,className:So("rf-z-50 rf-w-72 rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-p-4 rf-text-zinc-950 rf-shadow-md rf-outline-none data-[state=open]:rf-animate-in data-[state=closed]:rf-animate-out data-[state=closed]:rf-fade-out-0 data-[state=open]:rf-fade-in-0 data-[state=closed]:rf-zoom-out-95 data-[state=open]:rf-zoom-in-95 data-[side=bottom]:rf-slide-in-from-top-2 data-[side=left]:rf-slide-in-from-right-2 data-[side=right]:rf-slide-in-from-left-2 data-[side=top]:rf-slide-in-from-bottom-2 rf-origin-[--radix-popover-content-transform-origin] dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-text-zinc-50",n),...i})}));j5t.displayName=B5t.displayName;function I2i(n){const e=[],t=new Map;t.set("",{name:"",path:"",type:"folder",children:e});for(const i of n){const r=i.split("/");let o="";for(let s=0;s<r.length;s++){const a=r[s],c=o;if(o=o?`${o}/${a}`:a,!t.has(o)){const l=s===r.length-1,u={name:a,path:o,type:l?"file":"folder",children:l?void 0:[]};t.set(o,u);const d=t.get(c);d&&d.children&&d.children.push(u)}}}return e}function H5t(n,e){for(const t of n){if(t.path===e)return t;if(t.children){const i=H5t(t.children,e);if(i)return i}}return null}function N2i(n,e){let t;if(e?t=H5t(n,e):t={name:"",path:"",type:"folder",children:n},!t||!t.children)return{files:[],folders:[]};const i=t.children.filter(s=>s.type==="file"),r=t.children.filter(s=>s.type==="folder"),o=(s,a)=>s.localeCompare(a,void 0,{numeric:!0,sensitivity:"base"});return i.sort((s,a)=>o(s.name,a.name)),r.sort((s,a)=>o(s.name,a.name)),{files:i,folders:r}}const xAe=n=>n.endsWith(".tsx")||n.endsWith(".jsx")?oe.jsx(PRn,{className:"rf-h-4 rf-w-4 rf-text-blue-500"}):n.endsWith(".md")||n.endsWith(".txt")?oe.jsx(kRn,{className:"rf-h-4 rf-w-4 rf-text-gray-600"}):oe.jsx(ORn,{className:"rf-h-4 rf-w-4 rf-text-gray-500"}),k2i=n=>n.endsWith(".tsx")||n.endsWith(".circuit.json")||n.endsWith(".jsx"),O2i=n=>n.split("/").pop()||"",V5t=n=>n.substring(0,n.lastIndexOf("/"))||"/",G5t=({files:n,onFileChange:e,currentFile:t,fileFilter:i=k2i,getDisplayName:r=O2i,placeholder:o="Select file",searchPlaceholder:s="Search for file",emptyMessage:a="No files found in this directory.",pinnedFiles:c=[],onToggleFavorite:l})=>{const[u,d]=le.useState(!1),[h,p]=le.useState(t),{currentFolder:m,navigateToFolder:_,resetManualNavigation:g}=VSi({currentFile:h,files:n}),[x,b]=le.useState(0),[v,S]=le.useState("");le.useEffect(()=>{p(t)},[t]);const I=n.filter(i),A=I2i(I),{files:P,folders:M}=N2i(A,m||""),C=(()=>{if(!v.trim())return{currentDirResults:[],globalResults:[]};const Q=v.toLowerCase(),de=I.map(ae=>{const fe=ae.split("/").pop()||"";return{path:ae,fileName:fe}}).filter(ae=>ae.fileName.toLowerCase().includes(Q)||ae.path.toLowerCase().includes(Q)),xe=de.filter(ae=>m?ae.path.substring(0,ae.path.lastIndexOf("/"))===m:!ae.path.includes("/")),te=de.filter(ae=>m?ae.path.substring(0,ae.path.lastIndexOf("/"))!==m:ae.path.includes("/"));return{currentDirResults:xe,globalResults:te}})(),U=v.trim().length>0,O=Q=>{_(Q),b(0)},H=()=>{if(!m)return;const Q=m.lastIndexOf("/"),ce=Q===-1?null:m.substring(0,Q);O(ce)},Y=(Q,ce,de=!1)=>{if(p(Q),b(ce),d(!1),e(Q),de){const xe=Q.lastIndexOf("/"),te=xe===-1?null:Q.substring(0,xe);O(te)}};le.useEffect(()=>{if(P.length>0){const Q=P.findIndex(ce=>ce.path===t);Q>=0&&b(Q)}},[P,t]);const X=m??"/";X.length>25&&""+X.slice(-22);const K=()=>`rf-w-full rf-min-w-[600px] ${U?"rf-max-w-[600px]":"rf-max-w-[1000px]"}`;return oe.jsx("div",{className:"rf-flex rf-items-center rf-gap-1",children:oe.jsxs(P2i,{open:u,onOpenChange:Q=>{d(Q),Q||(S(""),g())},children:[oe.jsx(R2i,{asChild:!0,children:oe.jsxs(R0,{variant:"outline",role:"combobox","aria-expanded":u,className:"rf-w-fit rf-min-w-32 rf-max-w-100 rf-justify-center rf-items-center rf-gap-1 !rf-font-normal",children:[oe.jsx("span",{className:"rf-truncate rf-text-left",children:h?r(h):o}),oe.jsx(MRn,{className:"rf-opacity-50 rf-flex-shrink-0"})]})}),oe.jsx(j5t,{className:So("!rf-p-0 !rf-overflow-hidden !rf-z-[200]",K()),children:oe.jsxs(A5t,{shouldFilter:!1,children:[oe.jsx(P5t,{placeholder:s,className:"rf-h-9 rf-w-full",value:v,onValueChange:S}),oe.jsx("div",{className:"rf-px-3 rf-py-2 rf-border-t rf-border-b rf-border-gray-200 rf-bg-slate-50",children:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-text-xs rf-text-slate-600 rf-min-w-0 rf-overflow-hidden",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-min-w-0 rf-flex-1",children:[oe.jsx("button",{onClick:()=>O(null),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-flex-shrink-0",children:"root"}),m?.split("/").filter(Boolean).map((Q,ce,de)=>{const xe=de.slice(0,ce+1).join("/");return oe.jsxs("span",{className:"rf-flex rf-items-center rf-min-w-0",children:[oe.jsx("span",{className:"rf-mx-1 rf-flex-shrink-0",children:"/"}),ce===de.length-1?oe.jsx("span",{className:"rf-text-slate-800 rf-truncate rf-max-w-[200px]",title:Q,children:Q}):oe.jsx("button",{onClick:()=>O(xe),className:"rf-text-blue-600 hover:rf-text-blue-800 rf-underline rf-cursor-pointer rf-bg-transparent rf-border-none rf-p-0 rf-truncate rf-max-w-[150px]",title:Q,children:Q})]},xe)})]}),m&&oe.jsxs("button",{onClick:H,className:"rf-ml-2 rf-flex rf-items-center rf-gap-1 rf-text-blue-600 hover:rf-text-blue-800 rf-bg-transparent rf-border rf-border-blue-300 hover:rf-border-blue-500 rf-rounded rf-px-2 rf-py-1 rf-flex-shrink-0",title:"Go up one level",children:[oe.jsx(TRn,{className:"rf-h-3 rf-w-3"}),oe.jsx("span",{children:"Up"})]})]})}),oe.jsx(R5t,{className:"rf-max-h-[70vh] rf-overflow-y-auto",children:U?oe.jsx(oe.Fragment,{children:C.currentDirResults.length===0&&C.globalResults.length===0?oe.jsxs(yAe,{children:['No files found matching "',v,'".']}):oe.jsxs(oe.Fragment,{children:[C.currentDirResults.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:C.currentDirResults.map((Q,ce)=>oe.jsxs(JN,{value:Q.path,onSelect:()=>{p(Q.path),d(!1),e(Q.path)},className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.fileName)}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[oe.jsx("span",{className:"rf-truncate rf-flex-1",children:r(Q.fileName)}),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:m||"/"}),l&&oe.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity rf-ml-2",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),"aria-label":c.includes(Q.path)?"Remove from favorites":"Add to favorites",title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),Q.path===t&&oe.jsx(b4,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},Q.path))}),C.globalResults.length>0&&oe.jsx(QN,{className:"rf-pb-1",children:C.globalResults.map(Q=>oe.jsxs(JN,{value:Q.path,onSelect:()=>{p(Q.path),d(!1),e(Q.path)},className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.fileName)}),oe.jsxs("div",{className:"rf-flex rf-items-center rf-w-full rf-min-w-0",children:[oe.jsx("span",{className:"rf-truncate rf-flex-1",children:r(Q.fileName)}),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:V5t(Q.path)}),l&&oe.jsx("button",{onClick:ce=>{ce.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity rf-ml-2",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),Q.path===t&&oe.jsx(b4,{className:"rf-ml-2 rf-h-4 rf-w-4 rf-flex-shrink-0"})]})]},Q.path))})]})}):oe.jsxs(oe.Fragment,{children:[oe.jsx(yAe,{children:a}),c.length>0&&oe.jsx(QN,{heading:"Favorites",className:"rf-border-b rf-border-gray-200 rf-pb-1 rf-bg-amber-50/30",children:c.filter(Q=>I.includes(Q)).map((Q,ce)=>oe.jsxs(JN,{value:Q,onSelect:()=>Y(Q,ce,!0),className:So(Q===t&&"rf-font-medium"),children:[oe.jsx(rG,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-amber-500 rf-fill-amber-500"}),r(Q.split("/").pop()||""),oe.jsx("span",{className:"rf-text-xs rf-text-muted-foreground rf-ml-2 rf-truncate rf-max-w-[40%]",children:V5t(Q)}),oe.jsx(b4,{className:So("rf-ml-auto rf-h-4 rf-w-4",Q===t?"rf-opacity-100":"rf-opacity-0")})]},Q))}),P.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:P.map((Q,ce)=>oe.jsxs(JN,{value:Q.path,onSelect:()=>Y(Q.path,ce),className:So(Q.path===t&&"rf-font-medium","rf-group"),children:[oe.jsx("span",{className:"rf-mr-2",children:xAe(Q.name)}),r(Q.name),oe.jsxs("div",{className:"rf-ml-auto rf-flex rf-items-center rf-gap-1",children:[l&&oe.jsx("button",{type:"button",onClick:de=>{de.stopPropagation(),l(Q.path)},className:So("rf-p-1 rf-rounded hover:rf-bg-slate-200 rf-transition-opacity",c.includes(Q.path)?"rf-opacity-100":"rf-opacity-0 group-hover:rf-opacity-100"),"aria-label":c.includes(Q.path)?"Remove from favorites":"Add to favorites",title:c.includes(Q.path)?"Remove from favorites":"Add to favorites",children:oe.jsx(rG,{className:So("rf-h-3 rf-w-3",c.includes(Q.path)?"rf-text-amber-500 rf-fill-amber-500":"rf-text-slate-400")})}),oe.jsx(b4,{className:So("rf-h-4 rf-w-4",Q.path===t?"rf-opacity-100":"rf-opacity-0")})]})]},Q.path))}),M.length>0&&oe.jsx(QN,{className:"rf-border-b rf-border-gray-200 rf-pb-1",children:M.map(Q=>oe.jsxs(JN,{value:`folder-${Q.path}`,onSelect:()=>O(Q.path),className:"rf-text-slate-600 hover:rf-text-slate-900",children:[oe.jsx(LRn,{className:"rf-mr-2 rf-h-4 rf-w-4 rf-text-blue-600"}),Q.name,oe.jsx(iG,{className:"rf-ml-auto rf-h-4 rf-w-4"})]},Q.path))}),P.length===0&&M.length===0&&oe.jsx("div",{className:"rf-p-4 rf-text-center rf-text-slate-500 rf-text-sm",children:"No files or folders in this directory"})]})})]})})]})})},Y5t=({files:n,onFileChange:e,currentFile:t})=>oe.jsx(G5t,{files:n,onFileChange:e,currentFile:t,fileFilter:()=>!0,placeholder:"Select circuit",searchPlaceholder:"Search for circuit file",emptyMessage:"No circuit files found in this directory."}),L2i=n=>{qY();const[e,t]=le.useState(()=>n.initialCircuitPath??""),[i,r]=le.useState(null),[o,s]=le.useState(!1),[a,c]=le.useState({}),[l,u]=le.useState(new Set),[d,h]=le.useState(new Set),p=n.files,m=p.map(S=>S.filePath),_=le.useCallback(async S=>{if(!S.fileStaticAssetUrl)throw new Error(`No fileStaticAssetUrl provided for ${S.filePath}`);const I=await fetch(S.fileStaticAssetUrl);if(!I.ok)throw new Error(`Failed to fetch ${S.filePath}: ${I.statusText}`);return await I.json()},[]),g=le.useCallback(async S=>{if(a[S]){r(a[S]),n.onCircuitJsonPathChange?.(S);return}if(d.has(S)){console.warn(`Skipping failed file: ${S}`),r(null);return}if(!l.has(S)){u(I=>new Set(I).add(S)),s(!0),r(null);try{const I=p.find(M=>M.filePath===S);if(!I)throw new Error(`File reference not found for ${S}`);const P=await(n.onFetchFile||_)(I);c(M=>({...M,[S]:P})),r(P),n.onCircuitJsonPathChange?.(S),h(M=>{const N=new Set(M);return N.delete(S),N})}catch(I){console.error(`Failed to load circuit JSON file ${S}:`,I),h(A=>new Set(A).add(S)),r(null)}finally{u(I=>{const A=new Set(I);return A.delete(S),A}),s(!1)}}},[p,a,l,d,n.onFetchFile,n.onCircuitJsonPathChange,_]);le.useEffect(()=>{if(m.length===0)return;let S=e;(!S||!m.includes(S))&&(S=h3t(m)??m[0],t(S)),S&&m.includes(S)&&g(S)},[e]);const x=le.useCallback(S=>{t(S)},[]),b=le.useCallback(S=>{h(I=>{const A=new Set(I);return A.delete(S),A}),g(S)},[g]);if(m.length===0)return oe.jsx("div",{className:"rf-flex rf-flex-col rf-w-full rf-h-full rf-items-center rf-justify-center",children:oe.jsxs("div",{className:"rf-text-center rf-p-8",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-gray-800 rf-mb-2",children:"No Circuit JSON Files Found"}),oe.jsx("p",{className:"rf-text-sm rf-text-gray-600",children:"Please provide circuit JSON files to view."})]})});const v=d.has(e);return oe.jsx(WM,{fallbackRender:({error:S})=>oe.jsx("div",{className:"rf-mt-4 rf-mx-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:oe.jsxs("div",{className:"rf-p-4",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Circuit JSON Preview"}),oe.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:S.message})]})}),children:v?oe.jsxs("div",{className:"rf-w-full rf-h-full rf-flex rf-flex-col",children:[oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full rf-p-4 rf-border-b rf-border-gray-200",children:[(n.showFileMenu??!0)&&oe.jsx(u7,{isWebEmbedded:!0,circuitJson:null,projectName:n.projectName}),m.length>1&&oe.jsx("div",{className:"rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2",children:oe.jsx(Y5t,{currentFile:e,files:m,onFileChange:x})})]}),oe.jsx("div",{className:"rf-flex-1 rf-flex rf-items-center rf-justify-center",children:oe.jsxs("div",{className:"rf-text-center rf-p-8",children:[oe.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-600 rf-mb-2",children:"Failed to Load Circuit File"}),oe.jsxs("p",{className:"rf-text-sm rf-text-gray-600 rf-mb-4",children:["Could not load: ",e]}),oe.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2",children:[oe.jsx("button",{onClick:()=>b(e),className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600",children:"Retry"}),m.length>1&&oe.jsx("p",{className:"rf-text-xs rf-text-gray-500",children:"Or select a different file from the dropdown above"})]})]})})]}):oe.jsx(t5t,{circuitJson:i,defaultToFullScreen:n.defaultToFullScreen,showToggleFullScreen:n.showToggleFullScreen,showFileMenu:!1,isWebEmbedded:!1,projectName:n.projectName,leftHeaderContent:oe.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-w-full",children:[(n.showFileMenu??!0)&&oe.jsx(u7,{isWebEmbedded:!0,circuitJson:i,projectName:n.projectName}),m.length>1&&oe.jsx("div",{className:`rf-absolute rf-left-1/2 rf-transform rf--translate-x-1/2 rf-flex rf-items-center rf-gap-2 ${o?"rf-opacity-50":""}`,children:oe.jsx(Y5t,{currentFile:e,files:m,onFileChange:x})})]})})})},D2i=()=>{const n=Hb(e=>e.fsMap);le.useEffect(()=>{if(!document||!n)return;const e=Array.from(n.keys()),t=h3t(e),i=n.get("package.json");try{if(i){const r=JSON.parse(i);if(r?.name){document.title=r.name;return}}}catch{}t&&(document.title=t)},[n])},f7=c4e(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var bAe={},q5t;function vAe(){return q5t||(q5t=1,(function(n){n.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,n.find=(e,t)=>e.nodes.find(i=>i.type===t),n.exceedsLimit=(e,t,i=1,r)=>r===!1||!n.isInteger(e)||!n.isInteger(t)?!1:(Number(t)-Number(e))/Number(i)>=r,n.escapeNode=(e,t=0,i)=>{const r=e.nodes[t];r&&(i&&r.type===i||r.type==="open"||r.type==="close")&&r.escaped!==!0&&(r.value="\\"+r.value,r.escaped=!0)},n.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,n.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,n.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,n.reduce=e=>e.reduce((t,i)=>(i.type==="text"&&t.push(i.value),i.type==="range"&&(i.type="text"),t),[]),n.flatten=(...e)=>{const t=[],i=r=>{for(let o=0;o<r.length;o++){const s=r[o];if(Array.isArray(s)){i(s);continue}s!==void 0&&t.push(s)}return t};return i(e),t}})(bAe)),bAe}var wAe,X5t;function SAe(){if(X5t)return wAe;X5t=1;const n=vAe();return wAe=(e,t={})=>{const i=(r,o={})=>{const s=t.escapeInvalid&&n.isInvalidBrace(o),a=r.invalid===!0&&t.escapeInvalid===!0;let c="";if(r.value)return(s||a)&&n.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(const l of r.nodes)c+=i(l);return c};return i(e)},wAe}/*!
|
|
6834
6834
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
6835
6835
|
*
|
|
6836
6836
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"main": "dist/index.js",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.812",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/tscircuit/tscircuit"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@tscircuit/checks": "^0.0.85",
|
|
51
51
|
"@tscircuit/circuit-json-flex": "^0.0.3",
|
|
52
52
|
"@tscircuit/circuit-json-util": "^0.0.72",
|
|
53
|
-
"@tscircuit/cli": "^0.1.
|
|
53
|
+
"@tscircuit/cli": "^0.1.387",
|
|
54
54
|
"@tscircuit/core": "^0.0.821",
|
|
55
55
|
"@tscircuit/eval": "^0.0.424",
|
|
56
56
|
"@tscircuit/footprinter": "^0.0.236",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@tscircuit/math-utils": "^0.0.29",
|
|
60
60
|
"@tscircuit/miniflex": "^0.0.4",
|
|
61
61
|
"@tscircuit/props": "0.0.378",
|
|
62
|
-
"@tscircuit/runframe": "^0.0.
|
|
62
|
+
"@tscircuit/runframe": "^0.0.1151",
|
|
63
63
|
"@tscircuit/schematic-match-adapt": "^0.0.16",
|
|
64
64
|
"@tscircuit/schematic-trace-solver": "^0.0.41",
|
|
65
65
|
"@tscircuit/simple-3d-svg": "^0.0.41",
|