import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{i as n,r,t as i}from"./emotion-styled.browser.esm.BYv_Qzcq.js";import{t as a}from"./react-dom.BzV73oHg.js";import{t as o}from"./range.DL19EGGd.js";import{i as s}from"./UriUtil.FYzIdBsL.js";import{t as c}from"./PortalContext.DiHTlKpY.js";var l=e(t(),1),u=e(a(),1),d=({children:e})=>{let t=(0,l.useContext)(c)?.();return t?(0,u.createPortal)(e,t):n(r,{children:e})},f=i(`div`,{target:`e1smm6vf0`})({"@media print":{display:`none`}}),p=(0,l.memo)(({className:e,scriptRunId:t,numParticles:r,numParticleTypes:i,ParticleComponent:a})=>{let{resourceCrossOriginMode:c}=(0,l.useContext)(s),u=(0,l.useMemo)(()=>o(r).map(()=>Math.floor(Math.random()*i)),[r,i]);return n(f,{className:e,"data-testid":e,children:u.map((e,r)=>n(a,{particleType:e,resourceCrossOriginMode:c},t+r))})});export{d as n,p as t};