{"version":3,"file":"ConfettiEffect.YUtChbXz.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/Jp8ciUieVlMH46TK3Pg4/XtbG7Zi2Y65hxE190PtO/SBaeE_BW1.js","https:/framerusercontent.com/modules/d421nAKVK6XkQSsuaDZc/Srxl4leN26FQ4FhFEHnY/ConfettiEffect.js"],"sourcesContent":["// Generated by Framer (b135809)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"FS;Manrope-regular\",\"FS;Manrope-bold\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Manrope\",source:\"fontshare\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/2TYFCBHUANEXS6QGR5EQDUNAFH6LSWM3/AYNOU3VEA4LRTDNKJQUFNVNUTYSGOUOP/UXO4O7K2G3HI3D2VKD7UXVJVJD26P4BQ.woff2\",weight:\"400\"},{cssFamilyName:\"Manrope\",source:\"fontshare\",style:\"normal\",uiFamilyName:\"Manrope\",url:\"https://framerusercontent.com/third-party-assets/fontshare/wf/NGBUP45ES3F7RD5XGKPEDJ6QEPO4TMOK/EXDVWJ2EDDVVV65UENMX33EDDYBX6OF7/6P4FPMFQH7CCC7RZ4UU4NKSGJ2RLF7V5.woff2\",weight:\"700\"}]}];export const css=['.framer-AerrV .framer-styles-preset-1jc4o8u:not(.rich-text-wrapper), .framer-AerrV .framer-styles-preset-1jc4o8u.rich-text-wrapper p { --framer-font-family: \"Manrope\", \"Manrope Placeholder\", sans-serif; --framer-font-family-bold: \"Manrope\", \"Manrope Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 1.5em; --framer-paragraph-spacing: 20px; --framer-text-alignment: left; --framer-text-color: var(--token-c54fdb6f-7a5c-4209-871c-21d677d89e32, #ffffff); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-AerrV\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/**\n * ConfettiEffect — runs nonstop while mounted.\n *\n * @framerIntrinsicWidth 20\n * @framerIntrinsicHeight 20\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useRef,useEffect}from\"react\";/* ───────── Hex → HSL → Hex shade generator ───────── */function hexToHsl(hex){const r=parseInt(hex.slice(1,3),16)/255;const g=parseInt(hex.slice(3,5),16)/255;const b=parseInt(hex.slice(5,7),16)/255;const max=Math.max(r,g,b),min=Math.min(r,g,b);let h=0,s=0;const l=(max+min)/2;if(max!==min){const d=max-min;s=l>.5?d/(2-max-min):d/(max+min);switch(max){case r:h=((g-b)/d+(g<b?6:0))/6;break;case g:h=((b-r)/d+2)/6;break;case b:h=((r-g)/d+4)/6;break;}}return[h*360,s*100,l*100];}function hslToHex(h,s,l){s/=100;l/=100;const k=n=>(n+h/30)%12;const a=s*Math.min(l,1-l);const f=n=>l-a*Math.max(-1,Math.min(k(n)-3,Math.min(9-k(n),1)));const toHex=x=>Math.round(x*255).toString(16).padStart(2,\"0\");return`#${toHex(f(0))}${toHex(f(8))}${toHex(f(4))}`;}function generateShades(hex){const[h,s,l]=hexToHsl(hex);return[{color:hslToHex(h,s,Math.min(l+20,92)),weight:25},{color:hex,weight:35},{color:hslToHex(h,s,Math.max(l-15,8)),weight:25},{color:hslToHex(h,s,Math.max(l-30,5)),weight:15}];}/* ───────── Color picker (weighted) ───────── */function pickColor(colors){const total=colors.reduce((sum,c)=>sum+c.weight,0);const roll=Math.random()*total;let acc=0;for(const c of colors){acc+=c.weight;if(roll<acc)return c.color;}return colors[0]?.color||\"#C9A84C\";}/* ───────── Single particle spawner ───────── */function spawnParticle(rect,colors,spreadInner,spreadMid,spreadOuter,durationBase,durationRand,delayMax){const w=Math.random()>.4?3:5;const h=Math.random()>.4?8:5;const cx=rect.left+window.scrollX+rect.width/2-w/2;const cy=rect.top+window.scrollY+rect.height/2-h/2;const angle=Math.random()*Math.PI*2;const dir=Math.random()>.5?1:-1;const arc=(.5+Math.random()*.6)*dir;const r1={rx:rect.width/2+spreadInner,ry:rect.height/2+spreadInner};const r2={rx:rect.width/2+spreadMid,ry:rect.height/2+spreadMid};const r3={rx:rect.width/2+spreadOuter,ry:rect.height/2+spreadOuter};const pt=(r,a)=>({x:cx+r.rx*Math.cos(a),y:cy+r.ry*Math.sin(a)});const s=pt(r1,angle);const m=pt(r2,angle+arc*.5);const e=pt(r3,angle+arc);const rot0=Math.random()*360;const rot2=Math.random()*360+dir*80;const rot1=rot0+(rot2-rot0)*.5;const color=pickColor(colors);const duration=durationBase+Math.random()*durationRand;const delay=Math.random()*delayMax;const el=document.createElement(\"div\");Object.assign(el.style,{position:\"absolute\",top:\"0\",left:\"0\",width:w+\"px\",height:h+\"px\",backgroundColor:color,borderRadius:\"1px\",pointerEvents:\"none\",zIndex:\"99999\",willChange:\"transform, opacity\",opacity:\"0\",transform:`translate(${s.x}px,${s.y}px) rotate(${rot0}deg) scale(0.4)`});document.body.appendChild(el);const anim=el.animate([{transform:`translate(${s.x}px,${s.y}px) rotate(${rot0}deg) scale(0.4)`,opacity:\"0\"},{transform:`translate(${m.x}px,${m.y}px) rotate(${rot1}deg) scale(1)`,opacity:\"0.85\",offset:.25},{transform:`translate(${e.x}px,${e.y}px) rotate(${rot2}deg) scale(0.5)`,opacity:\"0\"}],{duration,delay,easing:\"cubic-bezier(0.6, 0, 0.4, 1)\",fill:\"both\"});anim.onfinish=()=>el.remove();}/* ───────── Component ───────── */export default function ConfettiEffect(props){const{enabled,parentDepth=2,batchSize,spawnInterval,speedBase,speedVariance,spreadInner,spreadMid,spreadOuter,delayMax,baseColor}=props;const selfRef=useRef(null);const intervalRef=useRef(null);useEffect(()=>{const self=selfRef.current;if(!self||!enabled)return;let target=self;for(let i=0;i<parentDepth;i++){target=target?.parentElement||null;}if(!target)return;const colors=generateShades(baseColor);function doSpawnBatch(){if(!target)return;const rect=target.getBoundingClientRect();for(let i=0;i<batchSize;i++){spawnParticle(rect,colors,spreadInner,spreadMid,spreadOuter,speedBase,speedVariance,delayMax);}}doSpawnBatch();intervalRef.current=setInterval(doSpawnBatch,spawnInterval);return()=>{if(intervalRef.current){clearInterval(intervalRef.current);intervalRef.current=null;}};},[enabled,parentDepth,batchSize,spawnInterval,speedBase,speedVariance,spreadInner,spreadMid,spreadOuter,delayMax,baseColor]);return /*#__PURE__*/_jsx(\"div\",{ref:selfRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",minWidth:20,minHeight:20,pointerEvents:\"none\",overflow:\"visible\"}});}/* ───────── Property Controls ───────── */addPropertyControls(ConfettiEffect,{enabled:{type:ControlType.Boolean,title:\"Enabled\",defaultValue:true},baseColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#C9A84C\"},parentDepth:{type:ControlType.Number,title:\"Parent depth\",defaultValue:2,min:1,max:6,step:1,description:\"DOM levels up to position target\"},batchSize:{type:ControlType.Number,title:\"Batch size\",defaultValue:3,min:1,max:10,step:1},spawnInterval:{type:ControlType.Number,title:\"Spawn rate\",defaultValue:160,min:60,max:600,step:10,unit:\"ms\"},speedBase:{type:ControlType.Number,title:\"Duration\",defaultValue:1600,min:400,max:4e3,step:100,unit:\"ms\"},speedVariance:{type:ControlType.Number,title:\"Duration random\",defaultValue:800,min:0,max:2e3,step:100,unit:\"ms\"},delayMax:{type:ControlType.Number,title:\"Spawn delay max\",defaultValue:80,min:0,max:300,step:10,unit:\"ms\"},spreadInner:{type:ControlType.Number,title:\"Orbit inner\",defaultValue:6,min:0,max:40,step:1,unit:\"px\"},spreadMid:{type:ControlType.Number,title:\"Orbit mid\",defaultValue:22,min:4,max:80,step:1,unit:\"px\"},spreadOuter:{type:ControlType.Number,title:\"Orbit outer\",defaultValue:42,min:10,max:150,step:2,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ConfettiEffect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ConfettiEffect.map"],"mappings":"4NAC6B,EAAC,EAAU,UAAU,CAAC,qBAAqB,iBAAiB,CAAC,EAAe,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,UAAU,OAAO,YAAY,MAAM,SAAS,aAAa,UAAU,IAAI,yKAAyK,OAAO,KAAK,EAAE,CAAC,cAAc,UAAU,OAAO,YAAY,MAAM,SAAS,aAAa,UAAU,IAAI,yKAAyK,OAAO,KAAK,CAAC,CAAC,CAAC,EAAe,EAAI,CAAC,i1BAAi1B,EAAe,EAAU,kBCMr2C,SAAS,EAAS,EAAI,CAAC,IAAM,EAAE,SAAS,EAAI,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAU,EAAE,SAAS,EAAI,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAU,EAAE,SAAS,EAAI,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,IAAU,EAAI,KAAK,IAAI,EAAE,EAAE,CAAC,EAAE,EAAI,KAAK,IAAI,EAAE,EAAE,CAAC,EAAM,EAAE,EAAE,EAAE,EAAQ,GAAG,EAAI,GAAK,EAAE,GAAG,IAAM,EAAI,CAAC,IAAM,EAAE,EAAI,EAAqC,OAAjC,EAAE,EAAE,GAAG,GAAG,EAAE,EAAI,GAAK,GAAG,EAAI,GAAY,EAAP,CAAY,KAAK,EAAE,IAAI,EAAE,GA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