import{_ as t,n as a,t as e,a as r,x as s,r as i,dC as o,b as n}from"./card-b98d578d.js";import{c as d}from"./repeat-08ca48e7.js";import{B as l}from"./base-91ab3d27.js";let c=class extends r{constructor(){super(...arguments),this.angle=0,this.distance=100,this.color="#ffcc00",this.size="4px",this.duration="1.5s",this.delay="0s",this.gravity=0}render(){return s`✦`}updated(){const t=this.angle*Math.PI/180,a=Math.cos(t)*this.distance,e=Math.sin(t)*this.distance+this.gravity;this.style.setProperty("--end-x",`${a}px`),this.style.setProperty("--end-y",`${e}px`),this.style.setProperty("--color",this.color),this.style.setProperty("--size",this.size),this.style.setProperty("--duration",this.duration),this.style.setProperty("--delay",this.delay)}static get styles(){return i(":host {\n position: absolute;\n left: 0;\n top: 0;\n user-select: none;\n pointer-events: none;\n will-change: transform, opacity;\n animation: explode var(--duration) ease-out forwards;\n animation-delay: var(--delay);\n opacity: 0;\n}\n\n.spark {\n font-size: var(--size, 4px);\n color: var(--color, #ffcc00);\n text-shadow: 0 0 4px #fff, 0 0 8px var(--color), 0 0 16px var(--color), 0 0 32px var(--color), 0 0 48px var(--color);\n filter: brightness(1.3);\n}\n\n@keyframes explode {\n 0% {\n transform: translate(0, 0) scale(1);\n opacity: 1;\n }\n 55% {\n opacity: 1;\n }\n 100% {\n transform: translate(var(--end-x), var(--end-y)) scale(0.3);\n opacity: 0;\n }\n}")}};t([a({type:Number})],c.prototype,"angle",void 0),t([a({type:Number})],c.prototype,"distance",void 0),t([a({type:String})],c.prototype,"color",void 0),t([a({type:String})],c.prototype,"size",void 0),t([a({type:String})],c.prototype,"duration",void 0),t([a({type:String})],c.prototype,"delay",void 0),t([a({type:Number})],c.prototype,"gravity",void 0),c=t([e("advanced-camera-card-firework-particle")],c);const p=["#ff2222","#ffdd00","#22ff22","#22aaff","#ff22ff","#ffffff","#ffaa00","#22ffff","#ff66aa","#aaaaff"];let h=class extends r{constructor(){super(...arguments),this.posX="50%",this.posY="50%",this.delay="0s",this.scale=1,this.burstType="standard",this._particles=[],this._color="",this._initialized=!1}_initializeParticles(){if(!this._initialized)switch(this._initialized=!0,this._color=p[Math.floor(Math.random()*p.length)],this.burstType){case"ring":this._initializeRingParticles();break;case"palm":this._initializePalmParticles();break;default:this._initializeStandardParticles()}}_initializeStandardParticles(){const t=Math.round(36*this.scale);this._particles=Array.from({length:t},((a,e)=>({id:e,angle:360/t*e+20*(Math.random()-.5),distance:(80*Math.random()+100)*this.scale,color:this._color,size:(12*Math.random()+18)*this.scale+"px",duration:.5*Math.random()+1.8+"s",delay:.08*Math.random()+"s",gravity:0})))}_initializeRingParticles(){const t=Math.round(36*this.scale*1.5),a=(120+40*Math.random())*this.scale;this._particles=Array.from({length:t},((e,r)=>({id:r,angle:360/t*r,distance:a+10*(Math.random()-.5),color:this._color,size:(8*Math.random()+14)*this.scale+"px",duration:.3*Math.random()+1.5+"s",delay:.02*Math.random()+"s",gravity:0})))}_initializePalmParticles(){const t=Math.round(18*this.scale);this._particles=Array.from({length:t},((a,e)=>({id:e,angle:360/t*e+15*(Math.random()-.5),distance:(60*Math.random()+140)*this.scale,color:this._color,size:(10*Math.random()+20)*this.scale+"px",duration:.8*Math.random()+2.2+"s",delay:.05*Math.random()+"s",gravity:80+60*Math.random()})))}render(){return this._initializeParticles(),s`
${d(this._particles,(t=>t.id),(t=>s`
`))}
`}updated(){this.style.setProperty("--pos-x",this.posX),this.style.setProperty("--pos-y",this.posY),this.style.setProperty("--delay",this.delay)}static get styles(){return i(":host {\n position: absolute;\n left: var(--pos-x, 50%);\n top: var(--pos-y, 50%);\n user-select: none;\n pointer-events: none;\n opacity: 0;\n animation: burst-appear 0.01s linear forwards;\n animation-delay: var(--delay, 0s);\n}\n\n@keyframes burst-appear {\n to {\n opacity: 1;\n }\n}")}};t([a({type:String})],h.prototype,"posX",void 0),t([a({type:String})],h.prototype,"posY",void 0),t([a({type:String})],h.prototype,"delay",void 0),t([a({type:Number})],h.prototype,"scale",void 0),t([a({type:String})],h.prototype,"burstType",void 0),h=t([e("advanced-camera-card-firework-burst")],h);let y=class extends l{constructor(){super(...arguments),this._bursts=[],this._burstIdCounter=0,this._timer=new o}connectedCallback(){super.connectedCallback(),this._startFireworks()}disconnectedCallback(){super.disconnectedCallback(),this._stopFireworks()}_startFireworks(){this._createBursts(3),this._timer.startRepeated(2,(()=>{const t=Math.floor(4*Math.random())+2;this._createBursts(t)}))}_stopFireworks(){this._timer.stop()}_createBursts(t){const a=[];for(let e=0;et.id),(t=>s`
`))}
`}};t([n()],y.prototype,"_bursts",void 0),y=t([e("advanced-camera-card-effect-fireworks")],y);export{y as AdvancedCameraCardEffectFireworks};