domma-cms 0.8.0 → 0.8.6

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.
@@ -1 +1 @@
1
- export default{name:"st-davids",displayName:"St David's Day",emoji:"\u{1F33B}",intensityConfig:{light:{count:50,speedRange:[.4,1.2],sizeRange:[2,4],daffodilFields:2,dragonChance:2e-4,twinklingStars:10},medium:{count:100,speedRange:[.5,1.5],sizeRange:[2,5],daffodilFields:3,dragonChance:4e-4,twinklingStars:18},heavy:{count:150,speedRange:[.6,1.8],sizeRange:[3,6],daffodilFields:4,dragonChance:6e-4,twinklingStars:25}},particles:["daffodil-petal","daffodil","spring-sparkle"],decorations:["daffodil-field","welsh-dragon","flag","harp","leek-bundle","twinkling-star"],colors:{primary:"#FFDD00",secondary:"#228B22",accent:"#DC143C",white:"#FFFFFF"},createDaffodilPetal(e,l,i){const r=["#FFDD00","#FFE135","#FFED4E","#FFF68F"];return{type:"daffodil-petal",x:-30,y:Math.random()*l,vx:i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]),size:(i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:r[Math.floor(Math.random()*r.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createDaffodil(e,l,i){return{type:"daffodil",x:-30,y:Math.random()*l,vx:i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]),size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0]),speed:.1,opacity:.8+Math.random()*.2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,active:!0}},createLeek(e,l,i){return{type:"leek",x:-30,y:Math.random()*l,vx:(i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]))*.8,size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0])*1.2,speed:.15,opacity:.7+Math.random()*.3,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,active:!0}},createSpringSparkle(e,l,i){const r=["#FFD700","#FFFFFF","#90EE90","#98FB98"];return{type:"spring-sparkle",x:-20,y:Math.random()*l,vx:(i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]))*.8,size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:r[Math.floor(Math.random()*r.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,l,i){const r=Math.random();return r<.6?this.createDaffodilPetal(e,l,i):r<.8?this.createDaffodil(e,l,i):r<.95?this.createSpringSparkle(e,l,i):this.createLeek(e,l,i)},createDaffodilField(e,l,i={}){const r=[],o=15+Math.floor(Math.random()*10);for(let a=0;a<o;a++)r.push({x:Math.random()*e*.3,y:Math.random()*40,size:5+Math.random()*8,swayPhase:Math.random()*Math.PI*2});return{type:"daffodil-field",x:i.x!==void 0?i.x:Math.random()*e*.7,y:i.y!==void 0?i.y:l-50,flowers:r,opacity:.9,time:0,active:!0,static:!0}},createInitialDecorations(e,l,i){const r=[],o=i.daffodilFields||3;for(let n=0;n<o;n++)r.push(this.createDaffodilField(e,l,{x:e/(o+1)*(n+1),y:l-50}));r.push({type:"welsh-dragon",x:150,y:l-80,baseY:l-80,vx:0,size:35+Math.random()*10,opacity:1,time:0,wingPhase:Math.random()*Math.PI*2,breatheFirePhase:Math.random()*Math.PI*2,active:!0,static:!0}),r.push({type:"harp",x:e-200,y:l-90,size:40+Math.random()*10,opacity:1,glintPhase:Math.random()*Math.PI*2,active:!0,static:!0}),r.push({type:"leek-bundle",x:e*.3,y:l-40,size:25+Math.random()*5,opacity:1,active:!0,static:!0}),r.push({type:"flag",x:e-100,y:80,size:50,opacity:1,wavePhase:Math.random()*Math.PI*2,active:!0,static:!0});const a=i.twinklingStars||18;for(let n=0;n<a;n++)r.push(this.createTwinklingStar(e,l));return r},createTwinklingStar(e,l){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(l*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,l,i,r){const o=Math.random();if(o<r.dragonChance){if(e.some(n=>n.type==="welsh-dragon"))return null;const a=Math.random()<.5;return{type:"welsh-dragon",x:a?-100:l+100,y:Math.random()*i*.4+50,baseY:Math.random()*i*.4+50,vx:a?2+Math.random()*1:-(2+Math.random()*1),size:25+Math.random()*15,opacity:1,waveAmplitude:25+Math.random()*20,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wingPhase:Math.random()*Math.PI*2,breatheFirePhase:Math.random()*Math.PI*2,fireParticles:[],active:!0,static:!1}}return o<4e-4&&e.filter(n=>n.type==="daffodil-field").length<r.daffodilFields?this.createDaffodilField(l,i):null},drawDaffodilPetal(e,l,i){const r=l.x,o=l.y,a=l.size,n=Math.sin(i*l.flutterSpeed+l.flutter)*.3;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.rotate(l.rotation+n),e.fillStyle=l.color,e.strokeStyle="#FFB700",e.lineWidth=a*.08,e.beginPath(),e.ellipse(0,0,a*.6,a*1.2,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="rgba(255, 200, 0, 0.4)",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,-a*1.1),e.lineTo(0,a*1.1),e.stroke(),e.restore()},drawDaffodil(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r),e.rotate(l.rotation),e.fillStyle="#FFA500",e.strokeStyle="#FF8C00",e.lineWidth=o*.08,e.beginPath(),e.moveTo(-o*.25,0),e.lineTo(-o*.3,o*.3),e.lineTo(o*.3,o*.3),e.lineTo(o*.25,0),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#FFDD00",e.strokeStyle="#FFC700",e.lineWidth=o*.06;for(let a=0;a<6;a++){const n=a/6*Math.PI*2-Math.PI/2;e.save(),e.rotate(n),e.translate(0,-o*.7),e.beginPath(),e.ellipse(0,0,o*.4,o*.6,0,0,Math.PI*2),e.fill(),e.stroke(),e.restore()}e.strokeStyle="#228B22",e.lineWidth=o*.12,e.beginPath(),e.moveTo(0,o*.3),e.lineTo(0,o*1.5),e.stroke(),e.restore()},drawLeek(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r),e.rotate(l.rotation),e.fillStyle="#F5F5F5",e.strokeStyle="#DCDCDC",e.lineWidth=o*.08,e.beginPath(),e.ellipse(0,o*1.2,o*.4,o*.5,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#228B22",e.strokeStyle="#006400",e.lineWidth=o*.05,e.beginPath(),e.moveTo(-o*.3,o*1.2),e.quadraticCurveTo(-o*.25,o*.5,-o*.15,0),e.quadraticCurveTo(0,-o*.2,o*.15,0),e.quadraticCurveTo(o*.25,o*.5,o*.3,o*1.2),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(-o*.15,0),e.quadraticCurveTo(-o*.6,-o*.3,-o*.8,0),e.stroke(),e.beginPath(),e.moveTo(o*.15,0),e.quadraticCurveTo(o*.6,-o*.3,o*.8,0),e.stroke(),e.strokeStyle="#D2B48C",e.lineWidth=o*.05;for(let a=0;a<5;a++){const n=(a-2)*o*.15;e.beginPath(),e.moveTo(n,o*1.5),e.lineTo(n+Math.sin(a*1.7)*o*.15,o*1.8),e.stroke()}e.restore()},drawSpringSparkle(e,l,i){const r=l.x,o=l.y,a=l.size,n=.6+Math.sin(i*.004+l.twinklePhase)*.4;e.save(),e.globalAlpha=l.opacity*n,e.translate(r,o),e.rotate(l.rotation),e.fillStyle=l.color,e.shadowColor=l.color,e.shadowBlur=a*2,e.beginPath(),e.moveTo(0,-a),e.lineTo(a*.3,-a*.3),e.lineTo(a,0),e.lineTo(a*.3,a*.3),e.lineTo(0,a),e.lineTo(-a*.3,a*.3),e.lineTo(-a,0),e.lineTo(-a*.3,-a*.3),e.closePath(),e.fill(),e.restore()},drawDaffodilField(e,l,i){const r=l.x,o=l.y;e.save(),e.globalAlpha=l.opacity,l.flowers.forEach(a=>{const n=Math.sin(i*.001+a.swayPhase)*a.size*.2;e.save(),e.translate(r+a.x,o-a.y),e.rotate(n*.1),e.strokeStyle="#228B22",e.lineWidth=a.size*.08,e.beginPath(),e.moveTo(0,0),e.lineTo(n,-a.size*2),e.stroke(),e.fillStyle="#FFDD00",e.shadowColor="#FFDD00",e.shadowBlur=a.size*.5,e.beginPath(),e.arc(n,-a.size*2,a.size*.5,0,Math.PI*2),e.fill(),e.shadowBlur=0,e.fillStyle="#FFA500",e.beginPath(),e.arc(n,-a.size*2,a.size*.25,0,Math.PI*2),e.fill(),e.restore()}),e.restore()},drawWelshDragon(e,l,i){const r=l.x,o=l.y,a=l.size,n=l.vx>0?1:-1;e.save(),e.translate(r,o),n===-1&&e.scale(-1,1);const d=Math.sin(i*.012+l.wingPhase)*(Math.PI/3);e.fillStyle="#DC143C",e.strokeStyle="#8B0000",e.lineWidth=2,e.save(),e.translate(-a*.3,-a*.3),e.rotate(-d*.9),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1.2,-a*.8,-a*1.5,-a*.3,-a*1.3,a*.3),e.bezierCurveTo(-a*.8,a*.2,-a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.save(),e.translate(a*.3,-a*.3),e.rotate(d),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*1.2,-a*.8,a*1.5,-a*.3,a*1.3,a*.3),e.bezierCurveTo(a*.8,a*.2,a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#DC143C",e.strokeStyle="#8B0000",e.lineWidth=2,e.beginPath(),e.ellipse(0,0,a*.7,a*.5,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#DC143C",e.lineWidth=a*.25,e.beginPath(),e.moveTo(-a*.5,0),e.quadraticCurveTo(-a*1.2,-a*.3,-a*1.5,0),e.stroke(),e.fillStyle="#FFD700";for(let s=0;s<3;s++){const h=-a*(.8+s*.25);e.beginPath(),e.moveTo(h-a*.1,-a*.2),e.lineTo(h,-a*.5),e.lineTo(h+a*.1,-a*.2),e.closePath(),e.fill()}if(e.fillStyle="#DC143C",e.beginPath(),e.ellipse(a*.8,-a*.2,a*.4,a*.35,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#DC143C",e.beginPath(),e.moveTo(a*1.1,-a*.2),e.quadraticCurveTo(a*1.4,-a*.15,a*1.3,0),e.quadraticCurveTo(a*1.4,.1,a*1.1,-a*.2),e.closePath(),e.fill(),e.fillStyle="#FFD700",e.beginPath(),e.arc(a*.9,-a*.3,a*.12,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.beginPath(),e.arc(a*.95,-a*.3,a*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#FFD700",e.lineWidth=a*.1,e.beginPath(),e.moveTo(a*.7,-a*.5),e.lineTo(a*.65,-a*.8),e.stroke(),e.beginPath(),e.moveTo(a*.9,-a*.5),e.lineTo(a*.95,-a*.8),e.stroke(),Math.sin(i*.005+l.breatheFirePhase)>.5){const s=e.createLinearGradient(a*1.3,-a*.1,a*2,-a*.1);s.addColorStop(0,"#FF6600"),s.addColorStop(.5,"#FFA500"),s.addColorStop(1,"rgba(255, 255, 0, 0)"),e.fillStyle=s,e.globalAlpha=.8,e.beginPath(),e.moveTo(a*1.3,-a*.1),e.bezierCurveTo(a*1.6,-a*.3,a*1.8,-a*.2,a*2,-a*.1),e.bezierCurveTo(a*1.8,0,a*1.6,.1,a*1.3,-a*.1),e.closePath(),e.fill()}e.restore()},drawHarp(e,l,i){const r=l.x,o=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.strokeStyle="#8b4513",e.lineWidth=a*.08,e.lineCap="round",e.beginPath(),e.moveTo(-a*.3,a*.5),e.bezierCurveTo(-a*.5,a*.1,-a*.4,-a*.4,-a*.2,-a*.7),e.stroke(),e.beginPath(),e.moveTo(-a*.2,-a*.7),e.lineTo(a*.4,-a*.5),e.stroke(),e.beginPath(),e.moveTo(a*.4,-a*.5),e.lineTo(-a*.3,a*.5),e.stroke(),e.strokeStyle="#FFD700",e.lineWidth=a*.02;const n=12;for(let d=0;d<n;d++){const s=d/(n-1),h=-a*.3+s*a*.65,t=a*.5-s*a*1,f=-a*.25+s*a*.55,P=-a*.65+s*a*.15,T=Math.sin(i*.003+d*.3+l.glintPhase)*a*.02;e.beginPath(),e.moveTo(h+T,t),e.lineTo(f+T,P),e.stroke()}e.strokeStyle="#654321",e.lineWidth=a*.03,e.globalAlpha=.6;for(let d=0;d<4;d++){const s=a*.3-d*a*.25;e.beginPath(),e.arc(-a*.35,s,a*.08,0,Math.PI*2),e.stroke()}e.restore()},drawLeekBundle(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r);for(let a=0;a<5;a++){e.save();const n=(a-2)*o*.15,d=(a-2)*.1;e.translate(n,0),e.rotate(d),e.fillStyle="#f5f5dc",e.strokeStyle="#d3d3c0",e.lineWidth=1,e.fillRect(-o*.08,o*.2,o*.16,o*.6),e.strokeRect(-o*.08,o*.2,o*.16,o*.6),e.fillStyle="#228B22",e.strokeStyle="#1a6b1a",e.beginPath(),e.moveTo(-o*.08,o*.2),e.lineTo(-o*.12,-o*.5),e.lineTo(0,-o*.7),e.lineTo(o*.12,-o*.5),e.lineTo(o*.08,o*.2),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="#1a5a1a",e.lineWidth=.5,e.beginPath(),e.moveTo(0,o*.2),e.lineTo(0,-o*.65),e.stroke(),e.restore()}e.fillStyle="#DC143C",e.fillRect(-o*.5,o*.4,o,o*.12),e.beginPath(),e.ellipse(-o*.6,o*.46,o*.12,o*.08,0,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(o*.6,o*.46,o*.12,o*.08,0,0,Math.PI*2),e.fill(),e.restore()},drawFlag(e,l,i){const r=l.x,o=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.strokeStyle="#654321",e.lineWidth=a*.04,e.beginPath(),e.moveTo(0,0),e.lineTo(0,a*1.5),e.stroke();const n=Math.sin(i*.003+l.wavePhase)*a*.08;e.fillStyle="#FFFFFF",e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.3,0+n*.5,a*.6,0-n*.5,a*.9,0+n),e.lineTo(a*.9,a*.3+n),e.bezierCurveTo(a*.6,a*.3-n*.5,a*.3,a*.3+n*.5,0,a*.3),e.closePath(),e.fill(),e.fillStyle="#00B140",e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(a*.3,a*.3+n*.5,a*.6,a*.3-n*.5,a*.9,a*.3+n),e.lineTo(a*.9,a*.6+n),e.bezierCurveTo(a*.6,a*.6-n*.5,a*.3,a*.6+n*.5,0,a*.6),e.closePath(),e.fill(),e.fillStyle="#DC143C",e.save(),e.translate(a*.45,a*.3),e.scale(.28,.28),e.beginPath(),e.ellipse(a*.1,0,a*.45,a*.3,-.2,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.4,-a*.25,a*.22,a*.15,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(-a*.25,a*.1,a*.35,a*.28,.1,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.65,-a*.28,a*.2,a*.12,0,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.55,-a*.32),e.bezierCurveTo(a*.7,-a*.38,a*.85,-a*.35,a*.88,-a*.28),e.lineTo(a*.82,-a*.25),e.bezierCurveTo(a*.78,-a*.28,a*.65,-a*.3,a*.55,-a*.28),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.58,-a*.24),e.bezierCurveTo(a*.72,-a*.22,a*.84,-a*.24,a*.87,-a*.28),e.lineTo(a*.82,-a*.3),e.bezierCurveTo(a*.75,-a*.27,a*.65,-a*.26,a*.58,-a*.27),e.closePath(),e.fill(),e.fillStyle="#FFFF00",e.beginPath(),e.ellipse(a*.58,-a*.32,a*.04,a*.05,.2,0,Math.PI*2),e.fill(),e.fillStyle="#DC143C",e.beginPath(),e.moveTo(a*.5,-a*.38),e.bezierCurveTo(a*.48,-a*.55,a*.52,-a*.65,a*.58,-a*.68),e.lineTo(a*.62,-a*.64),e.bezierCurveTo(a*.58,-a*.62,a*.54,-a*.52,a*.54,-a*.38),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.48,-a*.4),e.bezierCurveTo(a*.42,-a*.58,a*.38,-a*.68,a*.35,-a*.72),e.lineTo(a*.38,-a*.74),e.bezierCurveTo(a*.42,-a*.7,a*.46,-a*.58,a*.5,-a*.42),e.closePath(),e.fill(),e.globalAlpha=.9,e.beginPath(),e.moveTo(-a*.1,-a*.15),e.bezierCurveTo(-a*.3,-a*.5,-a*.35,-a*.75,-a*.25,-a*.85),e.lineTo(-a*.22,-a*.82),e.bezierCurveTo(-a*.1,-a*.85,0,-a*.9,a*.1,-a*.88),e.lineTo(a*.12,-a*.84),e.bezierCurveTo(a*.2,-a*.8,a*.28,-a*.72,a*.3,-a*.62),e.lineTo(a*.25,-a*.58),e.bezierCurveTo(a*.22,-a*.5,a*.18,-a*.35,a*.1,-a*.25),e.lineTo(0,-a*.2),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.15,-a*.2),e.bezierCurveTo(a*.3,-a*.55,a*.45,-a*.78,a*.6,-a*.82),e.lineTo(a*.62,-a*.78),e.bezierCurveTo(a*.7,-a*.75,a*.8,-a*.68,a*.85,-a*.58),e.lineTo(a*.82,-a*.54),e.bezierCurveTo(a*.75,-a*.52,a*.68,-a*.45,a*.6,-a*.38),e.lineTo(a*.55,-a*.35),e.bezierCurveTo(a*.45,-a*.3,a*.32,-a*.25,a*.2,-a*.22),e.closePath(),e.fill(),e.globalAlpha=1,e.beginPath(),e.ellipse(a*.25,a*.15,a*.12,a*.25,.5,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.32,a*.35),e.lineTo(a*.38,a*.55),e.lineTo(a*.42,a*.57),e.lineTo(a*.36,a*.37),e.closePath(),e.fill();for(let s=0;s<3;s++){e.beginPath();const h=a*.36+s*a*.04;e.moveTo(h,a*.55),e.lineTo(h+a*.02,a*.63),e.lineTo(h+a*.04,a*.55),e.closePath(),e.fill()}e.globalAlpha=.85,e.beginPath(),e.ellipse(a*.15,a*.12,a*.1,a*.22,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.18,a*.3),e.lineTo(a*.2,a*.48),e.lineTo(a*.24,a*.5),e.lineTo(a*.22,a*.32),e.closePath(),e.fill(),e.globalAlpha=1,e.beginPath(),e.ellipse(-a*.15,a*.25,a*.15,a*.28,.8,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(-a*.08,a*.48),e.lineTo(-a*.02,a*.65),e.lineTo(a*.02,a*.67),e.lineTo(-a*.04,a*.5),e.closePath(),e.fill();for(let s=0;s<3;s++){e.beginPath();const h=-a*.04+s*a*.04;e.moveTo(h,a*.65),e.lineTo(h+a*.02,a*.72),e.lineTo(h+a*.04,a*.65),e.closePath(),e.fill()}e.globalAlpha=.85,e.beginPath(),e.ellipse(-a*.28,a*.22,a*.13,a*.25,.6,0,Math.PI*2),e.fill(),e.globalAlpha=1,e.beginPath(),e.moveTo(-a*.5,a*.05),e.bezierCurveTo(-a*.75,a*.15,-a*.95,0,-a*1.05,-a*.3),e.bezierCurveTo(-a*1.1,-a*.45,-a*1.05,-a*.6,-a*.95,-a*.68),e.lineTo(-a*.88,-a*.72),e.lineTo(-a*.92,-a*.65),e.bezierCurveTo(-a*1,-a*.56,-a*1.02,-a*.42,-a*.98,-a*.28),e.bezierCurveTo(-a*.88,0,-a*.68,a*.1,-a*.48,a*.08),e.closePath(),e.fill();const d=5;for(let s=0;s<d;s++){const h=s/(d-1),t=-a*.6-h*a*.4,f=a*.1-h*a*.7+Math.sin(h*Math.PI)*a*.15,P=a*.12*(1-h*.5);e.beginPath(),e.moveTo(t,f),e.lineTo(t-P*.3,f-P),e.lineTo(t+P*.3,f-P*.8),e.closePath(),e.fill()}e.restore(),e.restore()},drawTwinklingStar(e,l,i){const r=l.x,o=l.y,a=l.size,n=.5+Math.sin(i*l.twinkleSpeed+l.twinklePhase)*.5,d=`rgba(255, 240, 200, ${n})`,s=`rgba(255, 220, 150, ${n*.4})`;e.save(),e.translate(r,o),e.shadowColor=s,e.shadowBlur=a*3*n,e.fillStyle=d,e.beginPath();for(let h=0;h<4;h++){const t=h*Math.PI/2,f=Math.cos(t)*a,P=Math.sin(t)*a,T=t+Math.PI/4,M=Math.cos(T)*(a*.3),y=Math.sin(T)*(a*.3);h===0?e.moveTo(f,P):e.lineTo(f,P),e.lineTo(M,y)}e.closePath(),e.fill(),e.shadowBlur=a*2*n,e.beginPath(),e.arc(0,0,a*.25,0,Math.PI*2),e.fill(),e.restore()}};
1
+ export default{name:"st-davids",displayName:"St David's Day",emoji:"\u{1F33B}",intensityConfig:{light:{count:50,speedRange:[.4,1.2],sizeRange:[2,4],daffodilFields:2,dragonChance:2e-4,twinklingStars:10},medium:{count:100,speedRange:[.5,1.5],sizeRange:[2,5],daffodilFields:3,dragonChance:4e-4,twinklingStars:18},heavy:{count:150,speedRange:[.6,1.8],sizeRange:[3,6],daffodilFields:4,dragonChance:6e-4,twinklingStars:25}},particles:["daffodil-petal","daffodil","spring-sparkle"],decorations:["daffodil-field","welsh-dragon","flag","harp","leek-bundle","twinkling-star"],colors:{primary:"#FFDD00",secondary:"#228B22",accent:"#DC143C",white:"#FFFFFF"},createDaffodilPetal(e,l,i){const r=["#FFDD00","#FFE135","#FFED4E","#FFF68F"];return{type:"daffodil-petal",x:-30,y:Math.random()*l,vx:i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]),size:(i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:r[Math.floor(Math.random()*r.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createDaffodil(e,l,i){return{type:"daffodil",x:-30,y:Math.random()*l,vx:i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]),size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0]),speed:.1,opacity:.8+Math.random()*.2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,active:!0}},createLeek(e,l,i){return{type:"leek",x:-30,y:Math.random()*l,vx:(i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]))*.8,size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0])*1.2,speed:.15,opacity:.7+Math.random()*.3,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,active:!0}},createSpringSparkle(e,l,i){const r=["#FFD700","#FFFFFF","#90EE90","#98FB98"];return{type:"spring-sparkle",x:-20,y:Math.random()*l,vx:(i.speedRange[0]+Math.random()*(i.speedRange[1]-i.speedRange[0]))*.8,size:i.sizeRange[0]+Math.random()*(i.sizeRange[1]-i.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:r[Math.floor(Math.random()*r.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,l,i){const r=Math.random();return r<.6?this.createDaffodilPetal(e,l,i):r<.8?this.createDaffodil(e,l,i):r<.95?this.createSpringSparkle(e,l,i):this.createLeek(e,l,i)},createDaffodilField(e,l,i={}){const r=[],o=15+Math.floor(Math.random()*10);for(let a=0;a<o;a++)r.push({x:Math.random()*e*.3,y:Math.random()*40,size:5+Math.random()*8,swayPhase:Math.random()*Math.PI*2});return{type:"daffodil-field",x:i.x!==void 0?i.x:Math.random()*e*.7,y:i.y!==void 0?i.y:l-50,flowers:r,opacity:.9,time:0,active:!0,static:!0}},createInitialDecorations(e,l,i){const r=[],o=i.daffodilFields??3;for(let n=0;n<o;n++)r.push(this.createDaffodilField(e,l,{x:e/(o+1)*(n+1),y:l-50}));r.push({type:"welsh-dragon",x:150,y:l-80,baseY:l-80,vx:0,size:35+Math.random()*10,opacity:1,time:0,wingPhase:Math.random()*Math.PI*2,breatheFirePhase:Math.random()*Math.PI*2,active:!0,static:!0}),r.push({type:"harp",x:e-200,y:l-90,size:40+Math.random()*10,opacity:1,glintPhase:Math.random()*Math.PI*2,active:!0,static:!0}),r.push({type:"leek-bundle",x:e*.3,y:l-40,size:25+Math.random()*5,opacity:1,active:!0,static:!0}),r.push({type:"flag",x:e-100,y:80,size:50,opacity:1,wavePhase:Math.random()*Math.PI*2,active:!0,static:!0});const a=i.twinklingStars??18;for(let n=0;n<a;n++)r.push(this.createTwinklingStar(e,l));return r},createTwinklingStar(e,l){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(l*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,l,i,r){const o=Math.random();if(o<r.dragonChance){if(e.some(n=>n.type==="welsh-dragon"))return null;const a=Math.random()<.5;return{type:"welsh-dragon",x:a?-100:l+100,y:Math.random()*i*.4+50,baseY:Math.random()*i*.4+50,vx:a?2+Math.random()*1:-(2+Math.random()*1),size:25+Math.random()*15,opacity:1,waveAmplitude:25+Math.random()*20,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wingPhase:Math.random()*Math.PI*2,breatheFirePhase:Math.random()*Math.PI*2,fireParticles:[],active:!0,static:!1}}return o<4e-4&&e.filter(n=>n.type==="daffodil-field").length<r.daffodilFields?this.createDaffodilField(l,i):null},drawDaffodilPetal(e,l,i){const r=l.x,o=l.y,a=l.size,n=Math.sin(i*l.flutterSpeed+l.flutter)*.3;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.rotate(l.rotation+n),e.fillStyle=l.color,e.strokeStyle="#FFB700",e.lineWidth=a*.08,e.beginPath(),e.ellipse(0,0,a*.6,a*1.2,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="rgba(255, 200, 0, 0.4)",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,-a*1.1),e.lineTo(0,a*1.1),e.stroke(),e.restore()},drawDaffodil(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r),e.rotate(l.rotation),e.fillStyle="#FFA500",e.strokeStyle="#FF8C00",e.lineWidth=o*.08,e.beginPath(),e.moveTo(-o*.25,0),e.lineTo(-o*.3,o*.3),e.lineTo(o*.3,o*.3),e.lineTo(o*.25,0),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#FFDD00",e.strokeStyle="#FFC700",e.lineWidth=o*.06;for(let a=0;a<6;a++){const n=a/6*Math.PI*2-Math.PI/2;e.save(),e.rotate(n),e.translate(0,-o*.7),e.beginPath(),e.ellipse(0,0,o*.4,o*.6,0,0,Math.PI*2),e.fill(),e.stroke(),e.restore()}e.strokeStyle="#228B22",e.lineWidth=o*.12,e.beginPath(),e.moveTo(0,o*.3),e.lineTo(0,o*1.5),e.stroke(),e.restore()},drawLeek(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r),e.rotate(l.rotation),e.fillStyle="#F5F5F5",e.strokeStyle="#DCDCDC",e.lineWidth=o*.08,e.beginPath(),e.ellipse(0,o*1.2,o*.4,o*.5,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#228B22",e.strokeStyle="#006400",e.lineWidth=o*.05,e.beginPath(),e.moveTo(-o*.3,o*1.2),e.quadraticCurveTo(-o*.25,o*.5,-o*.15,0),e.quadraticCurveTo(0,-o*.2,o*.15,0),e.quadraticCurveTo(o*.25,o*.5,o*.3,o*1.2),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(-o*.15,0),e.quadraticCurveTo(-o*.6,-o*.3,-o*.8,0),e.stroke(),e.beginPath(),e.moveTo(o*.15,0),e.quadraticCurveTo(o*.6,-o*.3,o*.8,0),e.stroke(),e.strokeStyle="#D2B48C",e.lineWidth=o*.05;for(let a=0;a<5;a++){const n=(a-2)*o*.15;e.beginPath(),e.moveTo(n,o*1.5),e.lineTo(n+Math.sin(a*1.7)*o*.15,o*1.8),e.stroke()}e.restore()},drawSpringSparkle(e,l,i){const r=l.x,o=l.y,a=l.size,n=.6+Math.sin(i*.004+l.twinklePhase)*.4;e.save(),e.globalAlpha=l.opacity*n,e.translate(r,o),e.rotate(l.rotation),e.fillStyle=l.color,e.shadowColor=l.color,e.shadowBlur=a*2,e.beginPath(),e.moveTo(0,-a),e.lineTo(a*.3,-a*.3),e.lineTo(a,0),e.lineTo(a*.3,a*.3),e.lineTo(0,a),e.lineTo(-a*.3,a*.3),e.lineTo(-a,0),e.lineTo(-a*.3,-a*.3),e.closePath(),e.fill(),e.restore()},drawDaffodilField(e,l,i){const r=l.x,o=l.y;e.save(),e.globalAlpha=l.opacity,l.flowers.forEach(a=>{const n=Math.sin(i*.001+a.swayPhase)*a.size*.2;e.save(),e.translate(r+a.x,o-a.y),e.rotate(n*.1),e.strokeStyle="#228B22",e.lineWidth=a.size*.08,e.beginPath(),e.moveTo(0,0),e.lineTo(n,-a.size*2),e.stroke(),e.fillStyle="#FFDD00",e.shadowColor="#FFDD00",e.shadowBlur=a.size*.5,e.beginPath(),e.arc(n,-a.size*2,a.size*.5,0,Math.PI*2),e.fill(),e.shadowBlur=0,e.fillStyle="#FFA500",e.beginPath(),e.arc(n,-a.size*2,a.size*.25,0,Math.PI*2),e.fill(),e.restore()}),e.restore()},drawWelshDragon(e,l,i){const r=l.x,o=l.y,a=l.size,n=l.vx>0?1:-1;e.save(),e.translate(r,o),n===-1&&e.scale(-1,1);const d=Math.sin(i*.012+l.wingPhase)*(Math.PI/3);e.fillStyle="#DC143C",e.strokeStyle="#8B0000",e.lineWidth=2,e.save(),e.translate(-a*.3,-a*.3),e.rotate(-d*.9),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1.2,-a*.8,-a*1.5,-a*.3,-a*1.3,a*.3),e.bezierCurveTo(-a*.8,a*.2,-a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.save(),e.translate(a*.3,-a*.3),e.rotate(d),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*1.2,-a*.8,a*1.5,-a*.3,a*1.3,a*.3),e.bezierCurveTo(a*.8,a*.2,a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#DC143C",e.strokeStyle="#8B0000",e.lineWidth=2,e.beginPath(),e.ellipse(0,0,a*.7,a*.5,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#DC143C",e.lineWidth=a*.25,e.beginPath(),e.moveTo(-a*.5,0),e.quadraticCurveTo(-a*1.2,-a*.3,-a*1.5,0),e.stroke(),e.fillStyle="#FFD700";for(let s=0;s<3;s++){const h=-a*(.8+s*.25);e.beginPath(),e.moveTo(h-a*.1,-a*.2),e.lineTo(h,-a*.5),e.lineTo(h+a*.1,-a*.2),e.closePath(),e.fill()}if(e.fillStyle="#DC143C",e.beginPath(),e.ellipse(a*.8,-a*.2,a*.4,a*.35,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#DC143C",e.beginPath(),e.moveTo(a*1.1,-a*.2),e.quadraticCurveTo(a*1.4,-a*.15,a*1.3,0),e.quadraticCurveTo(a*1.4,.1,a*1.1,-a*.2),e.closePath(),e.fill(),e.fillStyle="#FFD700",e.beginPath(),e.arc(a*.9,-a*.3,a*.12,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.beginPath(),e.arc(a*.95,-a*.3,a*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#FFD700",e.lineWidth=a*.1,e.beginPath(),e.moveTo(a*.7,-a*.5),e.lineTo(a*.65,-a*.8),e.stroke(),e.beginPath(),e.moveTo(a*.9,-a*.5),e.lineTo(a*.95,-a*.8),e.stroke(),Math.sin(i*.005+l.breatheFirePhase)>.5){const s=e.createLinearGradient(a*1.3,-a*.1,a*2,-a*.1);s.addColorStop(0,"#FF6600"),s.addColorStop(.5,"#FFA500"),s.addColorStop(1,"rgba(255, 255, 0, 0)"),e.fillStyle=s,e.globalAlpha=.8,e.beginPath(),e.moveTo(a*1.3,-a*.1),e.bezierCurveTo(a*1.6,-a*.3,a*1.8,-a*.2,a*2,-a*.1),e.bezierCurveTo(a*1.8,0,a*1.6,.1,a*1.3,-a*.1),e.closePath(),e.fill()}e.restore()},drawHarp(e,l,i){const r=l.x,o=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.strokeStyle="#8b4513",e.lineWidth=a*.08,e.lineCap="round",e.beginPath(),e.moveTo(-a*.3,a*.5),e.bezierCurveTo(-a*.5,a*.1,-a*.4,-a*.4,-a*.2,-a*.7),e.stroke(),e.beginPath(),e.moveTo(-a*.2,-a*.7),e.lineTo(a*.4,-a*.5),e.stroke(),e.beginPath(),e.moveTo(a*.4,-a*.5),e.lineTo(-a*.3,a*.5),e.stroke(),e.strokeStyle="#FFD700",e.lineWidth=a*.02;const n=12;for(let d=0;d<n;d++){const s=d/(n-1),h=-a*.3+s*a*.65,t=a*.5-s*a*1,f=-a*.25+s*a*.55,P=-a*.65+s*a*.15,T=Math.sin(i*.003+d*.3+l.glintPhase)*a*.02;e.beginPath(),e.moveTo(h+T,t),e.lineTo(f+T,P),e.stroke()}e.strokeStyle="#654321",e.lineWidth=a*.03,e.globalAlpha=.6;for(let d=0;d<4;d++){const s=a*.3-d*a*.25;e.beginPath(),e.arc(-a*.35,s,a*.08,0,Math.PI*2),e.stroke()}e.restore()},drawLeekBundle(e,l){const i=l.x,r=l.y,o=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(i,r);for(let a=0;a<5;a++){e.save();const n=(a-2)*o*.15,d=(a-2)*.1;e.translate(n,0),e.rotate(d),e.fillStyle="#f5f5dc",e.strokeStyle="#d3d3c0",e.lineWidth=1,e.fillRect(-o*.08,o*.2,o*.16,o*.6),e.strokeRect(-o*.08,o*.2,o*.16,o*.6),e.fillStyle="#228B22",e.strokeStyle="#1a6b1a",e.beginPath(),e.moveTo(-o*.08,o*.2),e.lineTo(-o*.12,-o*.5),e.lineTo(0,-o*.7),e.lineTo(o*.12,-o*.5),e.lineTo(o*.08,o*.2),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="#1a5a1a",e.lineWidth=.5,e.beginPath(),e.moveTo(0,o*.2),e.lineTo(0,-o*.65),e.stroke(),e.restore()}e.fillStyle="#DC143C",e.fillRect(-o*.5,o*.4,o,o*.12),e.beginPath(),e.ellipse(-o*.6,o*.46,o*.12,o*.08,0,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(o*.6,o*.46,o*.12,o*.08,0,0,Math.PI*2),e.fill(),e.restore()},drawFlag(e,l,i){const r=l.x,o=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(r,o),e.strokeStyle="#654321",e.lineWidth=a*.04,e.beginPath(),e.moveTo(0,0),e.lineTo(0,a*1.5),e.stroke();const n=Math.sin(i*.003+l.wavePhase)*a*.08;e.fillStyle="#FFFFFF",e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.3,0+n*.5,a*.6,0-n*.5,a*.9,0+n),e.lineTo(a*.9,a*.3+n),e.bezierCurveTo(a*.6,a*.3-n*.5,a*.3,a*.3+n*.5,0,a*.3),e.closePath(),e.fill(),e.fillStyle="#00B140",e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(a*.3,a*.3+n*.5,a*.6,a*.3-n*.5,a*.9,a*.3+n),e.lineTo(a*.9,a*.6+n),e.bezierCurveTo(a*.6,a*.6-n*.5,a*.3,a*.6+n*.5,0,a*.6),e.closePath(),e.fill(),e.fillStyle="#DC143C",e.save(),e.translate(a*.45,a*.3),e.scale(.28,.28),e.beginPath(),e.ellipse(a*.1,0,a*.45,a*.3,-.2,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.4,-a*.25,a*.22,a*.15,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(-a*.25,a*.1,a*.35,a*.28,.1,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.65,-a*.28,a*.2,a*.12,0,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.55,-a*.32),e.bezierCurveTo(a*.7,-a*.38,a*.85,-a*.35,a*.88,-a*.28),e.lineTo(a*.82,-a*.25),e.bezierCurveTo(a*.78,-a*.28,a*.65,-a*.3,a*.55,-a*.28),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.58,-a*.24),e.bezierCurveTo(a*.72,-a*.22,a*.84,-a*.24,a*.87,-a*.28),e.lineTo(a*.82,-a*.3),e.bezierCurveTo(a*.75,-a*.27,a*.65,-a*.26,a*.58,-a*.27),e.closePath(),e.fill(),e.fillStyle="#FFFF00",e.beginPath(),e.ellipse(a*.58,-a*.32,a*.04,a*.05,.2,0,Math.PI*2),e.fill(),e.fillStyle="#DC143C",e.beginPath(),e.moveTo(a*.5,-a*.38),e.bezierCurveTo(a*.48,-a*.55,a*.52,-a*.65,a*.58,-a*.68),e.lineTo(a*.62,-a*.64),e.bezierCurveTo(a*.58,-a*.62,a*.54,-a*.52,a*.54,-a*.38),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.48,-a*.4),e.bezierCurveTo(a*.42,-a*.58,a*.38,-a*.68,a*.35,-a*.72),e.lineTo(a*.38,-a*.74),e.bezierCurveTo(a*.42,-a*.7,a*.46,-a*.58,a*.5,-a*.42),e.closePath(),e.fill(),e.globalAlpha=.9,e.beginPath(),e.moveTo(-a*.1,-a*.15),e.bezierCurveTo(-a*.3,-a*.5,-a*.35,-a*.75,-a*.25,-a*.85),e.lineTo(-a*.22,-a*.82),e.bezierCurveTo(-a*.1,-a*.85,0,-a*.9,a*.1,-a*.88),e.lineTo(a*.12,-a*.84),e.bezierCurveTo(a*.2,-a*.8,a*.28,-a*.72,a*.3,-a*.62),e.lineTo(a*.25,-a*.58),e.bezierCurveTo(a*.22,-a*.5,a*.18,-a*.35,a*.1,-a*.25),e.lineTo(0,-a*.2),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*.15,-a*.2),e.bezierCurveTo(a*.3,-a*.55,a*.45,-a*.78,a*.6,-a*.82),e.lineTo(a*.62,-a*.78),e.bezierCurveTo(a*.7,-a*.75,a*.8,-a*.68,a*.85,-a*.58),e.lineTo(a*.82,-a*.54),e.bezierCurveTo(a*.75,-a*.52,a*.68,-a*.45,a*.6,-a*.38),e.lineTo(a*.55,-a*.35),e.bezierCurveTo(a*.45,-a*.3,a*.32,-a*.25,a*.2,-a*.22),e.closePath(),e.fill(),e.globalAlpha=1,e.beginPath(),e.ellipse(a*.25,a*.15,a*.12,a*.25,.5,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.32,a*.35),e.lineTo(a*.38,a*.55),e.lineTo(a*.42,a*.57),e.lineTo(a*.36,a*.37),e.closePath(),e.fill();for(let s=0;s<3;s++){e.beginPath();const h=a*.36+s*a*.04;e.moveTo(h,a*.55),e.lineTo(h+a*.02,a*.63),e.lineTo(h+a*.04,a*.55),e.closePath(),e.fill()}e.globalAlpha=.85,e.beginPath(),e.ellipse(a*.15,a*.12,a*.1,a*.22,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(a*.18,a*.3),e.lineTo(a*.2,a*.48),e.lineTo(a*.24,a*.5),e.lineTo(a*.22,a*.32),e.closePath(),e.fill(),e.globalAlpha=1,e.beginPath(),e.ellipse(-a*.15,a*.25,a*.15,a*.28,.8,0,Math.PI*2),e.fill(),e.beginPath(),e.moveTo(-a*.08,a*.48),e.lineTo(-a*.02,a*.65),e.lineTo(a*.02,a*.67),e.lineTo(-a*.04,a*.5),e.closePath(),e.fill();for(let s=0;s<3;s++){e.beginPath();const h=-a*.04+s*a*.04;e.moveTo(h,a*.65),e.lineTo(h+a*.02,a*.72),e.lineTo(h+a*.04,a*.65),e.closePath(),e.fill()}e.globalAlpha=.85,e.beginPath(),e.ellipse(-a*.28,a*.22,a*.13,a*.25,.6,0,Math.PI*2),e.fill(),e.globalAlpha=1,e.beginPath(),e.moveTo(-a*.5,a*.05),e.bezierCurveTo(-a*.75,a*.15,-a*.95,0,-a*1.05,-a*.3),e.bezierCurveTo(-a*1.1,-a*.45,-a*1.05,-a*.6,-a*.95,-a*.68),e.lineTo(-a*.88,-a*.72),e.lineTo(-a*.92,-a*.65),e.bezierCurveTo(-a*1,-a*.56,-a*1.02,-a*.42,-a*.98,-a*.28),e.bezierCurveTo(-a*.88,0,-a*.68,a*.1,-a*.48,a*.08),e.closePath(),e.fill();const d=5;for(let s=0;s<d;s++){const h=s/(d-1),t=-a*.6-h*a*.4,f=a*.1-h*a*.7+Math.sin(h*Math.PI)*a*.15,P=a*.12*(1-h*.5);e.beginPath(),e.moveTo(t,f),e.lineTo(t-P*.3,f-P),e.lineTo(t+P*.3,f-P*.8),e.closePath(),e.fill()}e.restore(),e.restore()},drawTwinklingStar(e,l,i){const r=l.x,o=l.y,a=l.size,n=.5+Math.sin(i*l.twinkleSpeed+l.twinklePhase)*.5,d=`rgba(255, 240, 200, ${n})`,s=`rgba(255, 220, 150, ${n*.4})`;e.save(),e.translate(r,o),e.shadowColor=s,e.shadowBlur=a*3*n,e.fillStyle=d,e.beginPath();for(let h=0;h<4;h++){const t=h*Math.PI/2,f=Math.cos(t)*a,P=Math.sin(t)*a,T=t+Math.PI/4,M=Math.cos(T)*(a*.3),y=Math.sin(T)*(a*.3);h===0?e.moveTo(f,P):e.lineTo(f,P),e.lineTo(M,y)}e.closePath(),e.fill(),e.shadowBlur=a*2*n,e.beginPath(),e.arc(0,0,a*.25,0,Math.PI*2),e.fill(),e.restore()}};
@@ -1 +1 @@
1
- export default{name:"st-georges",displayName:"St George's Day",emoji:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",intensityConfig:{light:{count:40,speedRange:[.3,1],sizeRange:[2,4],roses:3,knightChance:2e-4,twinklingStars:10},medium:{count:80,speedRange:[.4,1.3],sizeRange:[2,5],roses:5,knightChance:4e-4,twinklingStars:18},heavy:{count:120,speedRange:[.5,1.6],sizeRange:[3,6],roses:8,knightChance:6e-4,twinklingStars:25}},particles:["rose-petal","tudor-rose","oak-leaf","sparkle"],decorations:["english-rose","st-georges-cross","knight","dragon","shield","castle","twinkling-star"],colors:{primary:"#C8102E",secondary:"#FFFFFF",tertiary:"#012169",accent:"#FFD700",greenStem:"#228B22"},createRosePetal(e,l,n){const a=Math.random()<.7?["#C8102E","#DC143C","#B91C1C","#991B1B"]:["#FFFFFF","#FFF5F5","#FECACA","#FEE2E2"];return{type:"rose-petal",x:-30,y:Math.random()*l,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:(n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:a[Math.floor(Math.random()*a.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createTudorRose(e,l,n){return{type:"tudor-rose",x:-30,y:Math.random()*l,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.15,opacity:.8+Math.random()*.2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,petalCount:5,active:!0}},createOakLeaf(e,l,n){const s=Math.random();let a;return s<.6?a="#2d5016":s<.85?a="#6b8e23":a="#8b4513",{type:"oak-leaf",x:-30,y:Math.random()*l,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:a,flutter:Math.random()*Math.PI*2,flutterSpeed:.03+Math.random()*.02,active:!0}},createSparkle(e,l,n){const s=["#FFD700","#FFFFFF","#C8102E"];return{type:"sparkle",x:-20,y:Math.random()*l,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:s[Math.floor(Math.random()*s.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,l,n){const s=Math.random();return s<.6?this.createRosePetal(e,l,n):s<.8?this.createTudorRose(e,l,n):s<.95?this.createSparkle(e,l,n):this.createOakLeaf(e,l,n)},createEnglishRose(e,l,n={}){return{type:"english-rose",x:n.x!==void 0?n.x:Math.random()*e*.8+e*.1,y:n.y!==void 0?n.y:l-60-Math.random()*100,size:15+Math.random()*10,opacity:1,color:Math.random()<.7?"#C8102E":"#FFFFFF",bloomPhase:Math.random()*Math.PI*2,petalCount:8+Math.floor(Math.random()*5),active:!0,static:!0}},createStGeorgesCross(e,l,n={}){return{type:"st-georges-cross",x:n.x!==void 0?n.x:e*.1+Math.random()*e*.8,y:n.y!==void 0?n.y:50+Math.random()*100,size:40+Math.random()*20,opacity:1,waveOffset:Math.random()*Math.PI*2,waveSpeed:.001+Math.random()*.001,active:!0,static:!0}},createKnight(e,l){const n=Math.random()<.5;return{type:"knight",x:n?-80:e+80,y:l-50,baseY:l-50,vx:n?.8+Math.random()*.4:-(.8+Math.random()*.4),size:20+Math.random()*10,opacity:1,marchPhase:Math.random()*Math.PI*2,marchSpeed:.015,active:!0,static:!1}},createDragon(e,l,n={}){const s=Math.random()<.5;return{type:"dragon",x:s?-100:e+100,y:l*.3+Math.random()*l*.2,baseY:l*.3+Math.random()*l*.2,vx:s?1.5+Math.random()*.5:-(1.5+Math.random()*.5),size:30+Math.random()*15,opacity:1,wingPhase:Math.random()*Math.PI*2,wingSpeed:.012,breatheFirePhase:Math.random()*Math.PI*2,active:!0,static:!1}},createShield(e,l,n={}){return{type:"shield",x:n.x!==void 0?n.x:e*.2+Math.random()*e*.6,y:n.y!==void 0?n.y:l-80-Math.random()*150,size:20+Math.random()*10,opacity:1,rotation:-Math.PI/12+Math.random()*(Math.PI/6),glintPhase:Math.random()*Math.PI*2,active:!0,static:!0}},createInitialDecorations(e,l,n){const s=[];s.push({type:"castle",x:150,y:l-100,size:80+Math.random()*20,opacity:1,active:!0,static:!0}),s.push({type:"dragon",x:e-200,y:l-60,baseY:l-60,vx:0,size:25+Math.random()*10,opacity:1,time:0,wingPhase:Math.random()*Math.PI*2,breathePhase:Math.random()*Math.PI*2,active:!0,static:!0}),s.push({type:"knight",x:e*.4,y:l-45,baseY:l-45,vx:0,size:20+Math.random()*5,opacity:1,time:0,legPhase:0,weaponRaised:!0,active:!0,static:!0}),s.push(this.createStGeorgesCross(e,l,{x:150,y:l-180,size:30})),s.push(this.createShield(e,l,{x:e*.15,y:l-60}));const a=n.twinklingStars||18;for(let o=0;o<a;o++)s.push(this.createTwinklingStar(e,l));return s},createTwinklingStar(e,l){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(l*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,l,n,s){const a=Math.random();return a<s.knightChance?e.some(o=>o.type==="knight")?null:this.createKnight(l,n):a<s.knightChance*1.2?e.some(o=>o.type==="dragon")?null:this.createDragon(l,n):a<5e-4&&e.filter(r=>r.type==="english-rose").length<s.roses?this.createEnglishRose(l,n):a<3e-4&&e.filter(r=>r.type==="st-georges-cross").length<2?this.createStGeorgesCross(l,n):a<4e-4&&e.filter(r=>r.type==="shield").length<3?this.createShield(l,n):null},drawRosePetal(e,l,n){const s=l.x,a=l.y,o=l.size,r=Math.sin(n*l.flutterSpeed+l.flutter)*.3;e.save(),e.globalAlpha=l.opacity,e.translate(s,a),e.rotate(l.rotation+r);const h=l.color.includes("FFF")||l.color.includes("fff");e.fillStyle=l.color,e.strokeStyle=h?"#FFE6E6":"#8B0000",e.lineWidth=o*.08,e.beginPath(),e.moveTo(0,-o*.4),e.bezierCurveTo(o*.6,-o*.8,o*.8,-o*.2,o*.4,o*.2),e.lineTo(0,o*1),e.lineTo(-o*.4,o*.2),e.bezierCurveTo(-o*.8,-o*.2,-o*.6,-o*.8,0,-o*.4),e.closePath(),e.fill(),e.stroke(),e.strokeStyle=h?"rgba(255, 182, 193, 0.5)":"rgba(139, 0, 0, 0.4)",e.lineWidth=o*.06,e.beginPath(),e.moveTo(0,-o*.3),e.lineTo(0,o*.9),e.stroke(),e.restore()},drawEnglishRose(e,l,n){const s=l.x,a=l.y,o=l.size,r=.8+(Math.sin(n*.002+l.bloomPhase)+1)*.1;e.save(),e.translate(s,a),e.strokeStyle=this.colors.greenStem,e.lineWidth=o*.12,e.beginPath(),e.moveTo(0,0),e.quadraticCurveTo(-o*.2,o*.8,0,o*1.5),e.stroke(),e.fillStyle="#2D5016",[-1,1].forEach(h=>{e.save(),e.translate(h*o*.15,o*.8),e.rotate(h*Math.PI/6),e.beginPath(),e.ellipse(0,0,o*.3,o*.15,0,0,Math.PI*2),e.fill(),e.restore()}),e.fillStyle=l.color,e.strokeStyle=l.color==="#FFFFFF"?"#FFE6E6":"#8B0000",e.lineWidth=1;for(let h=0;h<l.petalCount;h++){const t=h/l.petalCount*Math.PI*2;e.save(),e.rotate(t),e.translate(0,-o*.4*r),e.beginPath(),e.moveTo(0,o*.25),e.bezierCurveTo(-o*.25,-o*.1,-o*.15,-o*.35,0,-o*.25),e.bezierCurveTo(o*.15,-o*.35,o*.25,-o*.1,0,o*.25),e.closePath(),e.fill(),e.stroke(),e.restore()}e.globalAlpha=.9;for(let h=0;h<l.petalCount-2;h++){const t=h/(l.petalCount-2)*Math.PI*2+Math.PI/l.petalCount;e.save(),e.rotate(t),e.translate(0,-o*.25*r),e.beginPath(),e.moveTo(0,o*.15),e.bezierCurveTo(-o*.15,-o*.05,-o*.1,-o*.2,0,-o*.15),e.bezierCurveTo(o*.1,-o*.2,o*.15,-o*.05,0,o*.15),e.closePath(),e.fill(),e.restore()}e.globalAlpha=1,e.fillStyle="#FFD700",e.beginPath(),e.arc(0,0,o*.15*r,0,Math.PI*2),e.fill(),e.fillStyle="#FFA500";for(let h=0;h<8;h++){const t=h/8*Math.PI*2,i=o*.08*r;e.beginPath(),e.arc(Math.cos(t)*i,Math.sin(t)*i,o*.03,0,Math.PI*2),e.fill()}e.restore()},drawStGeorgesCross(e,l,n){const s=l.x,a=l.y,o=l.size,r=n*l.waveSpeed+l.waveOffset;e.save(),e.translate(s,a);const h=e.createLinearGradient(-o*.64,0,-o*.56,0);h.addColorStop(0,"#5a4a3a"),h.addColorStop(.5,"#8B4513"),h.addColorStop(1,"#6a5343"),e.fillStyle=h,e.fillRect(-o*.64,-o*.35,o*.08,o*1.9),e.strokeStyle="#9a6333",e.lineWidth=1,e.beginPath(),e.moveTo(-o*.64,-o*.35),e.lineTo(-o*.64,o*1.55),e.stroke(),e.strokeStyle="#3a2a1a",e.beginPath(),e.moveTo(-o*.56,-o*.35),e.lineTo(-o*.56,o*1.55),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(-o*.6,-o*.4,o*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#DAA520",e.lineWidth=1.5,e.stroke();const t=o*1.5,i=o*1,f=12;for(let y=0;y<f;y++){const g=-o*.5+y/f*t,P=-o*.5+(y+1)/f*t,z=P-g,T=Math.sin(r+y*.4)*o*.12,S=Math.sin(r+(y+1)*.4)*o*.12,k=(g+z/2+o*.5)/t,u=k>.4&&k<.6;e.save(),e.fillStyle="#FFFFFF",e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill(),e.fillStyle="#C8102E",u&&(e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill()),e.beginPath(),e.moveTo(g,-i*.15+T),e.lineTo(P,-i*.15+S),e.lineTo(P,i*.15+S),e.lineTo(g,i*.15+T),e.closePath(),e.fill();const C=Math.sin(r+y*.4)*.15;C>0?e.fillStyle=`rgba(255, 255, 255, ${C*.3})`:e.fillStyle=`rgba(0, 0, 0, ${-C*.2})`,e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill(),e.strokeStyle="rgba(0, 0, 0, 0.1)",e.lineWidth=.5,e.beginPath(),e.moveTo(P,-i/2+S),e.lineTo(P,i/2+S),e.stroke(),e.restore()}e.strokeStyle="rgba(0, 0, 0, 0.25)",e.lineWidth=1.5,e.beginPath(),e.moveTo(-o*.5,-i/2+Math.sin(r)*o*.12);for(let y=1;y<=f;y++){const g=-o*.5+y/f*t,P=Math.sin(r+y*.4)*o*.12;e.lineTo(g,-i/2+P)}e.lineTo(-o*.5+t,i/2+Math.sin(r+f*.4)*o*.12);for(let y=f;y>=0;y--){const g=-o*.5+y/f*t,P=Math.sin(r+y*.4)*o*.12;e.lineTo(g,i/2+P)}e.closePath(),e.stroke(),e.fillStyle="#A9A9A9";for(let y=0;y<3;y++){const g=-i/2+y/2*i,P=Math.sin(r)*o*.12;e.beginPath(),e.arc(-o*.48,g+P,o*.03,0,Math.PI*2),e.fill(),e.strokeStyle="#696969",e.lineWidth=1,e.stroke()}e.restore()},drawKnight(e,l,n){const s=l.x,a=l.y,o=l.size,r=l.vx>0?1:-1,h=Math.sin(n*l.marchSpeed+l.marchPhase)*(Math.PI/8);e.save(),e.translate(s,a),r===-1&&e.scale(-1,1),e.strokeStyle="#C0C0C0",e.lineWidth=o*.15,e.beginPath(),e.moveTo(-o*.15,o*.5),e.lineTo(-o*.2,o*1.2+Math.sin(h)*o*.15),e.stroke(),e.beginPath(),e.moveTo(o*.15,o*.5),e.lineTo(o*.2,o*1.2+Math.sin(h+Math.PI)*o*.15),e.stroke(),e.fillStyle="#2F4F4F",e.fillRect(-o*.25,o*1.15,o*.2,o*.2),e.fillRect(o*.05,o*1.15,o*.2,o*.2),e.fillStyle="#C0C0C0",e.fillRect(-o*.4,0,o*.8,o*.6),e.fillStyle="#FFFFFF",e.fillRect(-o*.35,o*.05,o*.7,o*.5),e.fillStyle="#C8102E",e.fillRect(-o*.1,o*.05,o*.2,o*.5),e.fillRect(-o*.35,o*.2,o*.7,o*.2),e.save(),e.translate(-o*.5,o*.3),e.rotate(-Math.PI/6),e.fillStyle="#FFFFFF",e.strokeStyle="#FFD700",e.lineWidth=2,e.beginPath(),e.moveTo(0,-o*.4),e.lineTo(o*.25,-o*.3),e.lineTo(o*.25,o*.2),e.lineTo(0,o*.4),e.lineTo(-o*.25,o*.2),e.lineTo(-o*.25,-o*.3),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#C8102E",e.fillRect(-o*.05,-o*.3,o*.1,o*.6),e.fillRect(-o*.2,-o*.05,o*.4,o*.1),e.restore(),e.strokeStyle="#708090",e.lineWidth=o*.1,e.beginPath(),e.moveTo(o*.4,-o*.2),e.lineTo(o*.6,-o*.8),e.stroke(),e.lineWidth=o*.15,e.beginPath(),e.moveTo(o*.3,-o*.3),e.lineTo(o*.5,-o*.3),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(o*.4,-o*.15,o*.08,0,Math.PI*2),e.fill(),e.fillStyle="#708090",e.beginPath(),e.arc(0,-o*.3,o*.35,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.fillRect(-o*.25,-o*.35,o*.5,o*.1),e.fillStyle="#C8102E",e.beginPath(),e.moveTo(0,-o*.65),e.bezierCurveTo(-o*.15,-o*.85,-o*.1,-o*1,0,-o*.95),e.bezierCurveTo(o*.1,-o*1,o*.15,-o*.85,0,-o*.65),e.closePath(),e.fill(),e.restore()},drawDragon(e,l,n){const s=l.x,a=l.y,o=l.size,r=l.vx>0?1:-1,h=Math.sin(n*l.wingSpeed+l.wingPhase)*(Math.PI/3);e.save(),e.translate(s,a),r===-1&&e.scale(-1,1),e.fillStyle="#2F4F2F",e.strokeStyle="#1C3020",e.lineWidth=2,e.save(),e.translate(-o*.3,-o*.2),e.rotate(h),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-o*.4,-o*.3,-o*.6,-o*.2,-o*.7,0),e.bezierCurveTo(-o*.6,o*.1,-o*.4,o*.05,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.save(),e.translate(o*.3,-o*.2),e.rotate(-h),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(o*.4,-o*.3,o*.6,-o*.2,o*.7,0),e.bezierCurveTo(o*.6,o*.1,o*.4,o*.05,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#556B2F",e.strokeStyle="#2F4F2F",e.lineWidth=2,e.beginPath(),e.ellipse(0,0,o*.5,o*.3,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#556B2F",e.lineWidth=o*.2,e.lineCap="round",e.beginPath(),e.moveTo(-o*.4,0),e.quadraticCurveTo(-o*.8,o*.2,-o*1.2,0),e.stroke(),e.strokeStyle="#8B0000",e.lineWidth=2;for(let t=0;t<3;t++){const i=-o*.6-t*o*.2,f=o*.1;e.beginPath(),e.moveTo(i,f),e.lineTo(i,f-o*.15),e.stroke()}if(e.fillStyle="#556B2F",e.beginPath(),e.moveTo(o*.3,-o*.1),e.lineTo(o*.5,-o*.4),e.lineTo(o*.5,-o*.2),e.closePath(),e.fill(),e.fillStyle="#6B8E23",e.beginPath(),e.ellipse(o*.65,-o*.35,o*.25,o*.2,-Math.PI/6,0,Math.PI*2),e.fill(),e.stroke(),e.beginPath(),e.moveTo(o*.75,-o*.35),e.lineTo(o*.95,-o*.35),e.lineTo(o*.85,-o*.25),e.closePath(),e.fill(),e.strokeStyle="#8B4513",e.lineWidth=3,[o*.55,o*.65].forEach(t=>{e.beginPath(),e.moveTo(t,-o*.5),e.lineTo(t,-o*.7),e.stroke()}),e.fillStyle="#FF0000",e.shadowBlur=8,e.shadowColor="#FF0000",e.beginPath(),e.arc(o*.7,-o*.4,o*.05,0,Math.PI*2),e.fill(),e.shadowBlur=0,Math.sin(n*.005+l.breatheFirePhase)>.7){const t=e.createLinearGradient(o*.95,-o*.35,o*1.5,-o*.35);t.addColorStop(0,"rgba(255, 100, 0, 0.8)"),t.addColorStop(.5,"rgba(255, 200, 0, 0.5)"),t.addColorStop(1,"rgba(255, 255, 0, 0)"),e.fillStyle=t,e.beginPath(),e.moveTo(o*.95,-o*.35),e.lineTo(o*1.5,-o*.45),e.lineTo(o*1.5,-o*.25),e.closePath(),e.fill();for(let i=0;i<5;i++){const f=o*1+Math.random()*o*.5,y=-o*.35+(Math.random()-.5)*o*.3;e.fillStyle=`rgba(255, ${100+Math.random()*100}, 0, ${Math.random()*.8})`,e.beginPath(),e.arc(f,y,o*.05,0,Math.PI*2),e.fill()}}e.fillStyle="#9ACD32";for(let t=0;t<3;t++)e.beginPath(),e.arc(-o*.2+t*o*.2,o*.1,o*.08,0,Math.PI*2),e.fill();e.restore()},drawShield(e,l,n){const s=l.x,a=l.y,o=l.size,r=(Math.sin(n*.003+l.glintPhase)+1)*.5;e.save(),e.translate(s,a),e.rotate(l.rotation),e.fillStyle="#FFFFFF",e.strokeStyle="#FFD700",e.lineWidth=2,e.beginPath(),e.moveTo(0,-o*.7),e.lineTo(o*.5,-o*.5),e.lineTo(o*.5,o*.3),e.lineTo(0,o*.7),e.lineTo(-o*.5,o*.3),e.lineTo(-o*.5,-o*.5),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#C8102E",e.fillRect(-o*.1,-o*.6,o*.2,o*1.2),e.fillRect(-o*.45,-o*.1,o*.9,o*.2),e.strokeStyle=`rgba(255, 215, 0, ${r*.8})`,e.lineWidth=3,e.beginPath(),e.moveTo(0,-o*.7),e.lineTo(o*.5,-o*.5),e.lineTo(o*.5,o*.3),e.stroke(),e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=1,e.beginPath(),e.arc(0,0,o*.15,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle=`rgba(255, 255, 255, ${r*.6})`,e.beginPath(),e.arc(-o*.05,-o*.05,o*.06,0,Math.PI*2),e.fill(),e.restore()},drawCastle(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s);const o="#9a958f",r="#6a655f",h="#4a4540",t="#b5b0aa",i=a*1.4,f=a*1;e.fillStyle=h,e.fillRect(-i/2+a*.05,-f+a*.05,i,f);const y=e.createLinearGradient(-i/2,-f,i/2,-f);y.addColorStop(0,r),y.addColorStop(.5,o),y.addColorStop(1,r),e.fillStyle=y,e.fillRect(-i/2,-f,i,f),e.strokeStyle=h,e.lineWidth=2,e.strokeRect(-i/2,-f,i,f),e.strokeStyle="rgba(74, 69, 64, 0.4)",e.lineWidth=1;const g=a*.12,P=a*.18;for(let d=0;d<8;d++){const M=-f+d*g,R=d%2*(P/2);for(let B=0;B<8;B++){const E=-i/2+B*P+R;e.strokeRect(E,M,P,g)}}e.fillStyle=o;const z=a*.15,T=a*.12;for(let d=0;d<9;d++)if(d%2===0){const M=-i/2+d*(i/8);e.fillRect(M,-f-T,z,T),e.strokeRect(M,-f-T,z,T),e.fillStyle=h,e.fillRect(M+z/2-a*.015,-f-T+a*.02,a*.03,T-a*.04),e.fillStyle=o}const S=a*.22,m=a*1.2,k=-a*.85,u=-m/2;e.fillStyle=h,e.beginPath(),e.ellipse(k+a*.03,u+a*.03,S,m/2,0,0,Math.PI*2),e.fill();const C=e.createRadialGradient(k-S*.3,u,0,k,u,S);C.addColorStop(0,t),C.addColorStop(.5,o),C.addColorStop(1,r),e.fillStyle=C,e.beginPath(),e.ellipse(k,u,S,m/2,0,0,Math.PI*2),e.fill(),e.strokeStyle=h,e.lineWidth=2,e.stroke(),e.fillStyle=o;for(let d=0;d<6;d++)if(d%2===0){const M=d/6*Math.PI,R=Math.cos(M)*S;e.fillRect(k+R-a*.06,-m-a*.1,a*.12,a*.1),e.strokeRect(k+R-a*.06,-m-a*.1,a*.12,a*.1)}e.fillStyle="#1a1510";for(let d=0;d<3;d++){const M=u-m*.2+d*m*.25;e.fillRect(k-a*.02,M,a*.04,a*.15),e.beginPath(),e.moveTo(k-a*.02,M+a*.15),e.lineTo(k-a*.06,M+a*.18),e.lineTo(k+a*.06,M+a*.18),e.lineTo(k+a*.02,M+a*.15),e.fill()}const F=a*.85;e.fillStyle=h,e.beginPath(),e.ellipse(F+a*.03,u+a*.03,S,m/2,0,0,Math.PI*2),e.fill();const p=e.createRadialGradient(F+S*.3,u,0,F,u,S);p.addColorStop(0,t),p.addColorStop(.5,o),p.addColorStop(1,r),e.fillStyle=p,e.beginPath(),e.ellipse(F,u,S,m/2,0,0,Math.PI*2),e.fill(),e.strokeStyle=h,e.lineWidth=2,e.stroke(),e.fillStyle=o;for(let d=0;d<6;d++)if(d%2===0){const M=d/6*Math.PI,R=Math.cos(M)*S;e.fillRect(F+R-a*.06,-m-a*.1,a*.12,a*.1),e.strokeRect(F+R-a*.06,-m-a*.1,a*.12,a*.1)}e.fillStyle="#1a1510";for(let d=0;d<3;d++){const M=u-m*.2+d*m*.25;e.fillRect(F-a*.02,M,a*.04,a*.15),e.beginPath(),e.moveTo(F-a*.02,M+a*.15),e.lineTo(F-a*.06,M+a*.18),e.lineTo(F+a*.06,M+a*.18),e.lineTo(F+a*.02,M+a*.15),e.fill()}const b=a*.35,v=a*.5;e.fillStyle=h,e.beginPath(),e.moveTo(-b,-a*.05),e.lineTo(-b,-v),e.arc(0,-v,b,Math.PI,0,!1),e.lineTo(b,-a*.05),e.closePath(),e.fill(),e.strokeStyle=r,e.lineWidth=a*.06,e.beginPath(),e.arc(0,-v,b-a*.03,Math.PI,0,!1),e.stroke(),e.strokeStyle="rgba(74, 69, 64, 0.6)",e.lineWidth=2;for(let d=0;d<9;d++){const M=Math.PI+d/8*Math.PI;e.beginPath(),e.moveTo(0,-v),e.lineTo(Math.cos(M)*b,-v+Math.sin(M)*b),e.stroke()}e.fillStyle="#0a0a08",e.beginPath(),e.moveTo(-b+a*.1,-a*.05),e.lineTo(-b+a*.1,-v+a*.05),e.arc(0,-v+a*.05,b-a*.1,Math.PI,0,!1),e.lineTo(b-a*.1,-a*.05),e.closePath(),e.fill(),e.strokeStyle="#2a2520",e.lineWidth=4;const D=7;for(let d=0;d<D;d++){const M=-b+a*.15+d/(D-1)*(b*2-a*.3);e.beginPath(),e.moveTo(M,-a*.05),e.lineTo(M,-v+a*.15),e.stroke()}e.lineWidth=3;for(let d=0;d<4;d++){const M=-a*.1-d*a*.12;e.beginPath(),e.moveTo(-b+a*.15,M),e.lineTo(b-a*.15,M),e.stroke()}e.fillStyle=r,e.beginPath(),e.moveTo(-i/2,0),e.lineTo(-i/2-a*.08,0),e.lineTo(-i/2-a*.05,-f*.6),e.lineTo(-i/2,-f*.6),e.closePath(),e.fill(),e.strokeStyle=h,e.stroke(),e.beginPath(),e.moveTo(i/2,0),e.lineTo(i/2+a*.08,0),e.lineTo(i/2+a*.05,-f*.6),e.lineTo(i/2,-f*.6),e.closePath(),e.fill(),e.stroke(),e.save(),e.translate(0,-m-a*.15);const W=e.createLinearGradient(-a*.02,0,a*.02,0);W.addColorStop(0,"#5a4a3a"),W.addColorStop(.5,"#8b7355"),W.addColorStop(1,"#5a4a3a"),e.fillStyle=W,e.fillRect(-a*.02,0,a*.04,-a*.45),e.strokeStyle="#3a2a1a",e.lineWidth=1,e.strokeRect(-a*.02,0,a*.04,-a*.45),e.fillStyle="#FFD700",e.beginPath(),e.arc(0,-a*.45,a*.04,0,Math.PI*2),e.fill(),e.strokeStyle="#DAA520",e.stroke();const I=a*.4,w=a*.25;e.fillStyle="#FFFFFF",e.fillRect(0,-a*.42,I,w),e.strokeStyle="rgba(0, 0, 0, 0.1)",e.strokeRect(0,-a*.42,I,w),e.fillStyle="#C8102E",e.fillRect(I*.4,-a*.42,I*.2,w),e.fillRect(0,-a*.42+w*.4,I,w*.2),e.restore(),e.restore()},drawTudorRose(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation),e.fillStyle="#C8102E",e.strokeStyle="#8B0000",e.lineWidth=a*.05;for(let o=0;o<5;o++){const r=o/5*Math.PI*2-Math.PI/2;e.save(),e.rotate(r),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.5,-a*.4,-a*.6,-a*.8,0,-a*1.2),e.bezierCurveTo(a*.6,-a*.8,a*.5,-a*.4,0,0),e.closePath(),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFFFFF",e.strokeStyle="#E0E0E0";for(let o=0;o<5;o++){const r=o/5*Math.PI*2-Math.PI/2+Math.PI/5;e.save(),e.rotate(r),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.3,-a*.25,-a*.35,-a*.5,0,-a*.7),e.bezierCurveTo(a*.35,-a*.5,a*.3,-a*.25,0,0),e.closePath(),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=a*.05,e.beginPath(),e.arc(0,0,a*.2,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#FFA500";for(let o=0;o<5;o++){const r=o/5*Math.PI*2,h=a*.12;e.beginPath(),e.arc(Math.cos(r)*h,Math.sin(r)*h,a*.04,0,Math.PI*2),e.fill()}e.restore()},drawOakLeaf(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation),e.fillStyle=l.color,e.strokeStyle=l.color==="#8b4513"?"#654321":"#1a3a0a",e.lineWidth=a*.08,e.beginPath(),e.moveTo(0,a*1.5),e.bezierCurveTo(a*.3,a*1.2,a*.4,a*1,a*.5,a*.8),e.bezierCurveTo(a*.7,a*.7,a*.8,a*.5,a*.6,a*.3),e.bezierCurveTo(a*.8,a*.2,a*.9,0,a*.7,-a*.3),e.bezierCurveTo(a*.85,-a*.5,a*.8,-a*.8,a*.5,-a*1),e.bezierCurveTo(a*.3,-a*1.2,0,-a*1.3,-a*.3,-a*1.2),e.bezierCurveTo(-a*.8,-a*.8,-a*.85,-a*.5,-a*.7,-a*.3),e.bezierCurveTo(-a*.9,0,-a*.8,a*.2,-a*.6,a*.3),e.bezierCurveTo(-a*.8,a*.5,-a*.7,a*.7,-a*.5,a*.8),e.bezierCurveTo(-a*.4,a*1,-a*.3,a*1.2,0,a*1.5),e.closePath(),e.fill(),e.stroke(),e.strokeStyle=l.color==="#8b4513"?"#654321":"#0a2505",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,a*1.4),e.lineTo(0,-a*1.15),e.stroke(),e.lineWidth=a*.03;for(let o=0;o<4;o++){const r=a*.8-o*a*.5;e.beginPath(),e.moveTo(0,r),e.lineTo(a*.4,r-a*.15),e.stroke(),e.beginPath(),e.moveTo(0,r),e.lineTo(-a*.4,r-a*.15),e.stroke()}e.restore()},drawSparkle(e,l,n){const s=l.x,a=l.y,o=l.size,r=.6+Math.sin(n*.004+l.twinklePhase)*.4;e.save(),e.globalAlpha=l.opacity*r,e.translate(s,a),e.rotate(l.rotation),e.fillStyle=l.color,e.shadowColor=l.color,e.shadowBlur=o*2,e.beginPath(),e.moveTo(0,-o),e.lineTo(o*.3,-o*.3),e.lineTo(o,0),e.lineTo(o*.3,o*.3),e.lineTo(0,o),e.lineTo(-o*.3,o*.3),e.lineTo(-o,0),e.lineTo(-o*.3,-o*.3),e.closePath(),e.fill(),e.restore()},drawCrown(e,l){const n=l.x,s=l.y,a=l.size,o=(Math.sin(l.glint)+1)*.5;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation);const r=e.createLinearGradient(-a,0,a,0);r.addColorStop(0,"#B8860B"),r.addColorStop(.5,"#FFD700"),r.addColorStop(1,"#B8860B"),e.fillStyle=r,e.strokeStyle="#8B6914",e.lineWidth=a*.05,e.beginPath(),e.ellipse(0,a*.3,a*.8,a*.25,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#8B0000",e.lineWidth=a*.08,e.beginPath(),e.ellipse(0,a*.3,a*.7,a*.2,0,0,Math.PI*2),e.stroke(),e.fillStyle=r,e.strokeStyle="#8B6914",e.lineWidth=a*.05;for(let t=0;t<5;t++){const i=t/5*Math.PI*2-Math.PI/2,f=Math.cos(i)*a*.7,y=a*.3+Math.sin(i)*a*.2;e.save(),e.translate(f,y),e.rotate(i+Math.PI/2),e.beginPath(),e.moveTo(0,-a*.8),e.lineTo(-a*.12,-a*.3),e.lineTo(a*.12,-a*.3),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(-a*.12,-a*.3),e.bezierCurveTo(-a*.25,-a*.5,-a*.28,-a*.65,-a*.2,-a*.75),e.lineTo(-a*.15,-a*.65),e.bezierCurveTo(-a*.18,-a*.55,-a*.15,-a*.4,-a*.08,-a*.32),e.fill(),e.stroke(),e.beginPath(),e.moveTo(a*.12,-a*.3),e.bezierCurveTo(a*.25,-a*.5,a*.28,-a*.65,a*.2,-a*.75),e.lineTo(a*.15,-a*.65),e.bezierCurveTo(a*.18,-a*.55,a*.15,-a*.4,a*.08,-a*.32),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFD700",e.strokeStyle="#8B6914",e.lineWidth=a*.04,e.beginPath(),e.fillRect(-a*.05,-a*.9,a*.1,a*.25),e.strokeRect(-a*.05,-a*.9,a*.1,a*.25),e.fillRect(-a*.15,-a*.82,a*.3,a*.08),e.strokeRect(-a*.15,-a*.82,a*.3,a*.08);const h=[{x:0,y:a*.3,color:"#DC143C",size:.12},{x:a*.4,y:a*.3,color:"#0000CD",size:.08},{x:-a*.4,y:a*.3,color:"#0000CD",size:.08}];for(const t of h)e.fillStyle=t.color,e.beginPath(),e.arc(t.x,t.y,a*t.size,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(255, 255, 255, ${o*.7})`,e.beginPath(),e.arc(t.x-a*t.size*.3,t.y-a*t.size*.3,a*t.size*.4,0,Math.PI*2),e.fill();e.restore()},drawTwinklingStar(e,l,n){const s=l.x,a=l.y,o=l.size,r=.5+Math.sin(n*l.twinkleSpeed+l.twinklePhase)*.5,h=`rgba(255, 220, 220, ${r})`,t=`rgba(255, 180, 180, ${r*.4})`;e.save(),e.translate(s,a),e.shadowColor=t,e.shadowBlur=o*3*r,e.fillStyle=h,e.beginPath();for(let i=0;i<4;i++){const f=i*Math.PI/2,y=Math.cos(f)*o,g=Math.sin(f)*o,P=f+Math.PI/4,z=Math.cos(P)*(o*.3),T=Math.sin(P)*(o*.3);i===0?e.moveTo(y,g):e.lineTo(y,g),e.lineTo(z,T)}e.closePath(),e.fill(),e.shadowBlur=o*2*r,e.beginPath(),e.arc(0,0,o*.25,0,Math.PI*2),e.fill(),e.restore()}};
1
+ export default{name:"st-georges",displayName:"St George's Day",emoji:"\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",intensityConfig:{light:{count:40,speedRange:[.3,1],sizeRange:[2,4],roses:3,knightChance:2e-4,twinklingStars:10},medium:{count:80,speedRange:[.4,1.3],sizeRange:[2,5],roses:5,knightChance:4e-4,twinklingStars:18},heavy:{count:120,speedRange:[.5,1.6],sizeRange:[3,6],roses:8,knightChance:6e-4,twinklingStars:25}},particles:["rose-petal","tudor-rose","oak-leaf","sparkle"],decorations:["english-rose","st-georges-cross","knight","dragon","shield","castle","twinkling-star"],colors:{primary:"#C8102E",secondary:"#FFFFFF",tertiary:"#012169",accent:"#FFD700",greenStem:"#228B22"},createRosePetal(e,l,n){const a=Math.random()<.7?["#C8102E","#DC143C","#B91C1C","#991B1B"]:["#FFFFFF","#FFF5F5","#FECACA","#FEE2E2"];return{type:"rose-petal",x:-30,y:Math.random()*l,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:(n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:a[Math.floor(Math.random()*a.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createTudorRose(e,l,n){return{type:"tudor-rose",x:-30,y:Math.random()*l,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.15,opacity:.8+Math.random()*.2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,petalCount:5,active:!0}},createOakLeaf(e,l,n){const s=Math.random();let a;return s<.6?a="#2d5016":s<.85?a="#6b8e23":a="#8b4513",{type:"oak-leaf",x:-30,y:Math.random()*l,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:a,flutter:Math.random()*Math.PI*2,flutterSpeed:.03+Math.random()*.02,active:!0}},createSparkle(e,l,n){const s=["#FFD700","#FFFFFF","#C8102E"];return{type:"sparkle",x:-20,y:Math.random()*l,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:s[Math.floor(Math.random()*s.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,l,n){const s=Math.random();return s<.6?this.createRosePetal(e,l,n):s<.8?this.createTudorRose(e,l,n):s<.95?this.createSparkle(e,l,n):this.createOakLeaf(e,l,n)},createEnglishRose(e,l,n={}){return{type:"english-rose",x:n.x!==void 0?n.x:Math.random()*e*.8+e*.1,y:n.y!==void 0?n.y:l-60-Math.random()*100,size:15+Math.random()*10,opacity:1,color:Math.random()<.7?"#C8102E":"#FFFFFF",bloomPhase:Math.random()*Math.PI*2,petalCount:8+Math.floor(Math.random()*5),active:!0,static:!0}},createStGeorgesCross(e,l,n={}){return{type:"st-georges-cross",x:n.x!==void 0?n.x:e*.1+Math.random()*e*.8,y:n.y!==void 0?n.y:50+Math.random()*100,size:40+Math.random()*20,opacity:1,waveOffset:Math.random()*Math.PI*2,waveSpeed:.001+Math.random()*.001,active:!0,static:!0}},createKnight(e,l){const n=Math.random()<.5;return{type:"knight",x:n?-80:e+80,y:l-50,baseY:l-50,vx:n?.8+Math.random()*.4:-(.8+Math.random()*.4),size:20+Math.random()*10,opacity:1,marchPhase:Math.random()*Math.PI*2,marchSpeed:.015,active:!0,static:!1}},createDragon(e,l,n={}){const s=Math.random()<.5;return{type:"dragon",x:s?-100:e+100,y:l*.3+Math.random()*l*.2,baseY:l*.3+Math.random()*l*.2,vx:s?1.5+Math.random()*.5:-(1.5+Math.random()*.5),size:30+Math.random()*15,opacity:1,wingPhase:Math.random()*Math.PI*2,wingSpeed:.012,breatheFirePhase:Math.random()*Math.PI*2,active:!0,static:!1}},createShield(e,l,n={}){return{type:"shield",x:n.x!==void 0?n.x:e*.2+Math.random()*e*.6,y:n.y!==void 0?n.y:l-80-Math.random()*150,size:20+Math.random()*10,opacity:1,rotation:-Math.PI/12+Math.random()*(Math.PI/6),glintPhase:Math.random()*Math.PI*2,active:!0,static:!0}},createInitialDecorations(e,l,n){const s=[];s.push({type:"castle",x:150,y:l-100,size:80+Math.random()*20,opacity:1,active:!0,static:!0}),s.push({type:"dragon",x:e-200,y:l-60,baseY:l-60,vx:0,size:25+Math.random()*10,opacity:1,time:0,wingPhase:Math.random()*Math.PI*2,breathePhase:Math.random()*Math.PI*2,active:!0,static:!0}),s.push({type:"knight",x:e*.4,y:l-45,baseY:l-45,vx:0,size:20+Math.random()*5,opacity:1,time:0,legPhase:0,weaponRaised:!0,active:!0,static:!0}),s.push(this.createStGeorgesCross(e,l,{x:150,y:l-180,size:30})),s.push(this.createShield(e,l,{x:e*.15,y:l-60}));const a=n.twinklingStars??18;for(let o=0;o<a;o++)s.push(this.createTwinklingStar(e,l));return s},createTwinklingStar(e,l){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(l*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,l,n,s){const a=Math.random();return a<s.knightChance?e.some(o=>o.type==="knight")?null:this.createKnight(l,n):a<s.knightChance*1.2?e.some(o=>o.type==="dragon")?null:this.createDragon(l,n):a<5e-4&&e.filter(r=>r.type==="english-rose").length<s.roses?this.createEnglishRose(l,n):a<3e-4&&e.filter(r=>r.type==="st-georges-cross").length<2?this.createStGeorgesCross(l,n):a<4e-4&&e.filter(r=>r.type==="shield").length<3?this.createShield(l,n):null},drawRosePetal(e,l,n){const s=l.x,a=l.y,o=l.size,r=Math.sin(n*l.flutterSpeed+l.flutter)*.3;e.save(),e.globalAlpha=l.opacity,e.translate(s,a),e.rotate(l.rotation+r);const h=l.color.includes("FFF")||l.color.includes("fff");e.fillStyle=l.color,e.strokeStyle=h?"#FFE6E6":"#8B0000",e.lineWidth=o*.08,e.beginPath(),e.moveTo(0,-o*.4),e.bezierCurveTo(o*.6,-o*.8,o*.8,-o*.2,o*.4,o*.2),e.lineTo(0,o*1),e.lineTo(-o*.4,o*.2),e.bezierCurveTo(-o*.8,-o*.2,-o*.6,-o*.8,0,-o*.4),e.closePath(),e.fill(),e.stroke(),e.strokeStyle=h?"rgba(255, 182, 193, 0.5)":"rgba(139, 0, 0, 0.4)",e.lineWidth=o*.06,e.beginPath(),e.moveTo(0,-o*.3),e.lineTo(0,o*.9),e.stroke(),e.restore()},drawEnglishRose(e,l,n){const s=l.x,a=l.y,o=l.size,r=.8+(Math.sin(n*.002+l.bloomPhase)+1)*.1;e.save(),e.translate(s,a),e.strokeStyle=this.colors.greenStem,e.lineWidth=o*.12,e.beginPath(),e.moveTo(0,0),e.quadraticCurveTo(-o*.2,o*.8,0,o*1.5),e.stroke(),e.fillStyle="#2D5016",[-1,1].forEach(h=>{e.save(),e.translate(h*o*.15,o*.8),e.rotate(h*Math.PI/6),e.beginPath(),e.ellipse(0,0,o*.3,o*.15,0,0,Math.PI*2),e.fill(),e.restore()}),e.fillStyle=l.color,e.strokeStyle=l.color==="#FFFFFF"?"#FFE6E6":"#8B0000",e.lineWidth=1;for(let h=0;h<l.petalCount;h++){const t=h/l.petalCount*Math.PI*2;e.save(),e.rotate(t),e.translate(0,-o*.4*r),e.beginPath(),e.moveTo(0,o*.25),e.bezierCurveTo(-o*.25,-o*.1,-o*.15,-o*.35,0,-o*.25),e.bezierCurveTo(o*.15,-o*.35,o*.25,-o*.1,0,o*.25),e.closePath(),e.fill(),e.stroke(),e.restore()}e.globalAlpha=.9;for(let h=0;h<l.petalCount-2;h++){const t=h/(l.petalCount-2)*Math.PI*2+Math.PI/l.petalCount;e.save(),e.rotate(t),e.translate(0,-o*.25*r),e.beginPath(),e.moveTo(0,o*.15),e.bezierCurveTo(-o*.15,-o*.05,-o*.1,-o*.2,0,-o*.15),e.bezierCurveTo(o*.1,-o*.2,o*.15,-o*.05,0,o*.15),e.closePath(),e.fill(),e.restore()}e.globalAlpha=1,e.fillStyle="#FFD700",e.beginPath(),e.arc(0,0,o*.15*r,0,Math.PI*2),e.fill(),e.fillStyle="#FFA500";for(let h=0;h<8;h++){const t=h/8*Math.PI*2,i=o*.08*r;e.beginPath(),e.arc(Math.cos(t)*i,Math.sin(t)*i,o*.03,0,Math.PI*2),e.fill()}e.restore()},drawStGeorgesCross(e,l,n){const s=l.x,a=l.y,o=l.size,r=n*l.waveSpeed+l.waveOffset;e.save(),e.translate(s,a);const h=e.createLinearGradient(-o*.64,0,-o*.56,0);h.addColorStop(0,"#5a4a3a"),h.addColorStop(.5,"#8B4513"),h.addColorStop(1,"#6a5343"),e.fillStyle=h,e.fillRect(-o*.64,-o*.35,o*.08,o*1.9),e.strokeStyle="#9a6333",e.lineWidth=1,e.beginPath(),e.moveTo(-o*.64,-o*.35),e.lineTo(-o*.64,o*1.55),e.stroke(),e.strokeStyle="#3a2a1a",e.beginPath(),e.moveTo(-o*.56,-o*.35),e.lineTo(-o*.56,o*1.55),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(-o*.6,-o*.4,o*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#DAA520",e.lineWidth=1.5,e.stroke();const t=o*1.5,i=o*1,f=12;for(let y=0;y<f;y++){const g=-o*.5+y/f*t,P=-o*.5+(y+1)/f*t,z=P-g,T=Math.sin(r+y*.4)*o*.12,S=Math.sin(r+(y+1)*.4)*o*.12,k=(g+z/2+o*.5)/t,u=k>.4&&k<.6;e.save(),e.fillStyle="#FFFFFF",e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill(),e.fillStyle="#C8102E",u&&(e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill()),e.beginPath(),e.moveTo(g,-i*.15+T),e.lineTo(P,-i*.15+S),e.lineTo(P,i*.15+S),e.lineTo(g,i*.15+T),e.closePath(),e.fill();const C=Math.sin(r+y*.4)*.15;C>0?e.fillStyle=`rgba(255, 255, 255, ${C*.3})`:e.fillStyle=`rgba(0, 0, 0, ${-C*.2})`,e.beginPath(),e.moveTo(g,-i/2+T),e.lineTo(P,-i/2+S),e.lineTo(P,i/2+S),e.lineTo(g,i/2+T),e.closePath(),e.fill(),e.strokeStyle="rgba(0, 0, 0, 0.1)",e.lineWidth=.5,e.beginPath(),e.moveTo(P,-i/2+S),e.lineTo(P,i/2+S),e.stroke(),e.restore()}e.strokeStyle="rgba(0, 0, 0, 0.25)",e.lineWidth=1.5,e.beginPath(),e.moveTo(-o*.5,-i/2+Math.sin(r)*o*.12);for(let y=1;y<=f;y++){const g=-o*.5+y/f*t,P=Math.sin(r+y*.4)*o*.12;e.lineTo(g,-i/2+P)}e.lineTo(-o*.5+t,i/2+Math.sin(r+f*.4)*o*.12);for(let y=f;y>=0;y--){const g=-o*.5+y/f*t,P=Math.sin(r+y*.4)*o*.12;e.lineTo(g,i/2+P)}e.closePath(),e.stroke(),e.fillStyle="#A9A9A9";for(let y=0;y<3;y++){const g=-i/2+y/2*i,P=Math.sin(r)*o*.12;e.beginPath(),e.arc(-o*.48,g+P,o*.03,0,Math.PI*2),e.fill(),e.strokeStyle="#696969",e.lineWidth=1,e.stroke()}e.restore()},drawKnight(e,l,n){const s=l.x,a=l.y,o=l.size,r=l.vx>0?1:-1,h=Math.sin(n*l.marchSpeed+l.marchPhase)*(Math.PI/8);e.save(),e.translate(s,a),r===-1&&e.scale(-1,1),e.strokeStyle="#C0C0C0",e.lineWidth=o*.15,e.beginPath(),e.moveTo(-o*.15,o*.5),e.lineTo(-o*.2,o*1.2+Math.sin(h)*o*.15),e.stroke(),e.beginPath(),e.moveTo(o*.15,o*.5),e.lineTo(o*.2,o*1.2+Math.sin(h+Math.PI)*o*.15),e.stroke(),e.fillStyle="#2F4F4F",e.fillRect(-o*.25,o*1.15,o*.2,o*.2),e.fillRect(o*.05,o*1.15,o*.2,o*.2),e.fillStyle="#C0C0C0",e.fillRect(-o*.4,0,o*.8,o*.6),e.fillStyle="#FFFFFF",e.fillRect(-o*.35,o*.05,o*.7,o*.5),e.fillStyle="#C8102E",e.fillRect(-o*.1,o*.05,o*.2,o*.5),e.fillRect(-o*.35,o*.2,o*.7,o*.2),e.save(),e.translate(-o*.5,o*.3),e.rotate(-Math.PI/6),e.fillStyle="#FFFFFF",e.strokeStyle="#FFD700",e.lineWidth=2,e.beginPath(),e.moveTo(0,-o*.4),e.lineTo(o*.25,-o*.3),e.lineTo(o*.25,o*.2),e.lineTo(0,o*.4),e.lineTo(-o*.25,o*.2),e.lineTo(-o*.25,-o*.3),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#C8102E",e.fillRect(-o*.05,-o*.3,o*.1,o*.6),e.fillRect(-o*.2,-o*.05,o*.4,o*.1),e.restore(),e.strokeStyle="#708090",e.lineWidth=o*.1,e.beginPath(),e.moveTo(o*.4,-o*.2),e.lineTo(o*.6,-o*.8),e.stroke(),e.lineWidth=o*.15,e.beginPath(),e.moveTo(o*.3,-o*.3),e.lineTo(o*.5,-o*.3),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(o*.4,-o*.15,o*.08,0,Math.PI*2),e.fill(),e.fillStyle="#708090",e.beginPath(),e.arc(0,-o*.3,o*.35,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.fillRect(-o*.25,-o*.35,o*.5,o*.1),e.fillStyle="#C8102E",e.beginPath(),e.moveTo(0,-o*.65),e.bezierCurveTo(-o*.15,-o*.85,-o*.1,-o*1,0,-o*.95),e.bezierCurveTo(o*.1,-o*1,o*.15,-o*.85,0,-o*.65),e.closePath(),e.fill(),e.restore()},drawDragon(e,l,n){const s=l.x,a=l.y,o=l.size,r=l.vx>0?1:-1,h=Math.sin(n*l.wingSpeed+l.wingPhase)*(Math.PI/3);e.save(),e.translate(s,a),r===-1&&e.scale(-1,1),e.fillStyle="#2F4F2F",e.strokeStyle="#1C3020",e.lineWidth=2,e.save(),e.translate(-o*.3,-o*.2),e.rotate(h),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-o*.4,-o*.3,-o*.6,-o*.2,-o*.7,0),e.bezierCurveTo(-o*.6,o*.1,-o*.4,o*.05,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.save(),e.translate(o*.3,-o*.2),e.rotate(-h),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(o*.4,-o*.3,o*.6,-o*.2,o*.7,0),e.bezierCurveTo(o*.6,o*.1,o*.4,o*.05,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#556B2F",e.strokeStyle="#2F4F2F",e.lineWidth=2,e.beginPath(),e.ellipse(0,0,o*.5,o*.3,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#556B2F",e.lineWidth=o*.2,e.lineCap="round",e.beginPath(),e.moveTo(-o*.4,0),e.quadraticCurveTo(-o*.8,o*.2,-o*1.2,0),e.stroke(),e.strokeStyle="#8B0000",e.lineWidth=2;for(let t=0;t<3;t++){const i=-o*.6-t*o*.2,f=o*.1;e.beginPath(),e.moveTo(i,f),e.lineTo(i,f-o*.15),e.stroke()}if(e.fillStyle="#556B2F",e.beginPath(),e.moveTo(o*.3,-o*.1),e.lineTo(o*.5,-o*.4),e.lineTo(o*.5,-o*.2),e.closePath(),e.fill(),e.fillStyle="#6B8E23",e.beginPath(),e.ellipse(o*.65,-o*.35,o*.25,o*.2,-Math.PI/6,0,Math.PI*2),e.fill(),e.stroke(),e.beginPath(),e.moveTo(o*.75,-o*.35),e.lineTo(o*.95,-o*.35),e.lineTo(o*.85,-o*.25),e.closePath(),e.fill(),e.strokeStyle="#8B4513",e.lineWidth=3,[o*.55,o*.65].forEach(t=>{e.beginPath(),e.moveTo(t,-o*.5),e.lineTo(t,-o*.7),e.stroke()}),e.fillStyle="#FF0000",e.shadowBlur=8,e.shadowColor="#FF0000",e.beginPath(),e.arc(o*.7,-o*.4,o*.05,0,Math.PI*2),e.fill(),e.shadowBlur=0,Math.sin(n*.005+l.breatheFirePhase)>.7){const t=e.createLinearGradient(o*.95,-o*.35,o*1.5,-o*.35);t.addColorStop(0,"rgba(255, 100, 0, 0.8)"),t.addColorStop(.5,"rgba(255, 200, 0, 0.5)"),t.addColorStop(1,"rgba(255, 255, 0, 0)"),e.fillStyle=t,e.beginPath(),e.moveTo(o*.95,-o*.35),e.lineTo(o*1.5,-o*.45),e.lineTo(o*1.5,-o*.25),e.closePath(),e.fill();for(let i=0;i<5;i++){const f=o*1+Math.random()*o*.5,y=-o*.35+(Math.random()-.5)*o*.3;e.fillStyle=`rgba(255, ${100+Math.random()*100}, 0, ${Math.random()*.8})`,e.beginPath(),e.arc(f,y,o*.05,0,Math.PI*2),e.fill()}}e.fillStyle="#9ACD32";for(let t=0;t<3;t++)e.beginPath(),e.arc(-o*.2+t*o*.2,o*.1,o*.08,0,Math.PI*2),e.fill();e.restore()},drawShield(e,l,n){const s=l.x,a=l.y,o=l.size,r=(Math.sin(n*.003+l.glintPhase)+1)*.5;e.save(),e.translate(s,a),e.rotate(l.rotation),e.fillStyle="#FFFFFF",e.strokeStyle="#FFD700",e.lineWidth=2,e.beginPath(),e.moveTo(0,-o*.7),e.lineTo(o*.5,-o*.5),e.lineTo(o*.5,o*.3),e.lineTo(0,o*.7),e.lineTo(-o*.5,o*.3),e.lineTo(-o*.5,-o*.5),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#C8102E",e.fillRect(-o*.1,-o*.6,o*.2,o*1.2),e.fillRect(-o*.45,-o*.1,o*.9,o*.2),e.strokeStyle=`rgba(255, 215, 0, ${r*.8})`,e.lineWidth=3,e.beginPath(),e.moveTo(0,-o*.7),e.lineTo(o*.5,-o*.5),e.lineTo(o*.5,o*.3),e.stroke(),e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=1,e.beginPath(),e.arc(0,0,o*.15,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle=`rgba(255, 255, 255, ${r*.6})`,e.beginPath(),e.arc(-o*.05,-o*.05,o*.06,0,Math.PI*2),e.fill(),e.restore()},drawCastle(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s);const o="#9a958f",r="#6a655f",h="#4a4540",t="#b5b0aa",i=a*1.4,f=a*1;e.fillStyle=h,e.fillRect(-i/2+a*.05,-f+a*.05,i,f);const y=e.createLinearGradient(-i/2,-f,i/2,-f);y.addColorStop(0,r),y.addColorStop(.5,o),y.addColorStop(1,r),e.fillStyle=y,e.fillRect(-i/2,-f,i,f),e.strokeStyle=h,e.lineWidth=2,e.strokeRect(-i/2,-f,i,f),e.strokeStyle="rgba(74, 69, 64, 0.4)",e.lineWidth=1;const g=a*.12,P=a*.18;for(let d=0;d<8;d++){const M=-f+d*g,R=d%2*(P/2);for(let B=0;B<8;B++){const E=-i/2+B*P+R;e.strokeRect(E,M,P,g)}}e.fillStyle=o;const z=a*.15,T=a*.12;for(let d=0;d<9;d++)if(d%2===0){const M=-i/2+d*(i/8);e.fillRect(M,-f-T,z,T),e.strokeRect(M,-f-T,z,T),e.fillStyle=h,e.fillRect(M+z/2-a*.015,-f-T+a*.02,a*.03,T-a*.04),e.fillStyle=o}const S=a*.22,m=a*1.2,k=-a*.85,u=-m/2;e.fillStyle=h,e.beginPath(),e.ellipse(k+a*.03,u+a*.03,S,m/2,0,0,Math.PI*2),e.fill();const C=e.createRadialGradient(k-S*.3,u,0,k,u,S);C.addColorStop(0,t),C.addColorStop(.5,o),C.addColorStop(1,r),e.fillStyle=C,e.beginPath(),e.ellipse(k,u,S,m/2,0,0,Math.PI*2),e.fill(),e.strokeStyle=h,e.lineWidth=2,e.stroke(),e.fillStyle=o;for(let d=0;d<6;d++)if(d%2===0){const M=d/6*Math.PI,R=Math.cos(M)*S;e.fillRect(k+R-a*.06,-m-a*.1,a*.12,a*.1),e.strokeRect(k+R-a*.06,-m-a*.1,a*.12,a*.1)}e.fillStyle="#1a1510";for(let d=0;d<3;d++){const M=u-m*.2+d*m*.25;e.fillRect(k-a*.02,M,a*.04,a*.15),e.beginPath(),e.moveTo(k-a*.02,M+a*.15),e.lineTo(k-a*.06,M+a*.18),e.lineTo(k+a*.06,M+a*.18),e.lineTo(k+a*.02,M+a*.15),e.fill()}const F=a*.85;e.fillStyle=h,e.beginPath(),e.ellipse(F+a*.03,u+a*.03,S,m/2,0,0,Math.PI*2),e.fill();const p=e.createRadialGradient(F+S*.3,u,0,F,u,S);p.addColorStop(0,t),p.addColorStop(.5,o),p.addColorStop(1,r),e.fillStyle=p,e.beginPath(),e.ellipse(F,u,S,m/2,0,0,Math.PI*2),e.fill(),e.strokeStyle=h,e.lineWidth=2,e.stroke(),e.fillStyle=o;for(let d=0;d<6;d++)if(d%2===0){const M=d/6*Math.PI,R=Math.cos(M)*S;e.fillRect(F+R-a*.06,-m-a*.1,a*.12,a*.1),e.strokeRect(F+R-a*.06,-m-a*.1,a*.12,a*.1)}e.fillStyle="#1a1510";for(let d=0;d<3;d++){const M=u-m*.2+d*m*.25;e.fillRect(F-a*.02,M,a*.04,a*.15),e.beginPath(),e.moveTo(F-a*.02,M+a*.15),e.lineTo(F-a*.06,M+a*.18),e.lineTo(F+a*.06,M+a*.18),e.lineTo(F+a*.02,M+a*.15),e.fill()}const b=a*.35,v=a*.5;e.fillStyle=h,e.beginPath(),e.moveTo(-b,-a*.05),e.lineTo(-b,-v),e.arc(0,-v,b,Math.PI,0,!1),e.lineTo(b,-a*.05),e.closePath(),e.fill(),e.strokeStyle=r,e.lineWidth=a*.06,e.beginPath(),e.arc(0,-v,b-a*.03,Math.PI,0,!1),e.stroke(),e.strokeStyle="rgba(74, 69, 64, 0.6)",e.lineWidth=2;for(let d=0;d<9;d++){const M=Math.PI+d/8*Math.PI;e.beginPath(),e.moveTo(0,-v),e.lineTo(Math.cos(M)*b,-v+Math.sin(M)*b),e.stroke()}e.fillStyle="#0a0a08",e.beginPath(),e.moveTo(-b+a*.1,-a*.05),e.lineTo(-b+a*.1,-v+a*.05),e.arc(0,-v+a*.05,b-a*.1,Math.PI,0,!1),e.lineTo(b-a*.1,-a*.05),e.closePath(),e.fill(),e.strokeStyle="#2a2520",e.lineWidth=4;const D=7;for(let d=0;d<D;d++){const M=-b+a*.15+d/(D-1)*(b*2-a*.3);e.beginPath(),e.moveTo(M,-a*.05),e.lineTo(M,-v+a*.15),e.stroke()}e.lineWidth=3;for(let d=0;d<4;d++){const M=-a*.1-d*a*.12;e.beginPath(),e.moveTo(-b+a*.15,M),e.lineTo(b-a*.15,M),e.stroke()}e.fillStyle=r,e.beginPath(),e.moveTo(-i/2,0),e.lineTo(-i/2-a*.08,0),e.lineTo(-i/2-a*.05,-f*.6),e.lineTo(-i/2,-f*.6),e.closePath(),e.fill(),e.strokeStyle=h,e.stroke(),e.beginPath(),e.moveTo(i/2,0),e.lineTo(i/2+a*.08,0),e.lineTo(i/2+a*.05,-f*.6),e.lineTo(i/2,-f*.6),e.closePath(),e.fill(),e.stroke(),e.save(),e.translate(0,-m-a*.15);const W=e.createLinearGradient(-a*.02,0,a*.02,0);W.addColorStop(0,"#5a4a3a"),W.addColorStop(.5,"#8b7355"),W.addColorStop(1,"#5a4a3a"),e.fillStyle=W,e.fillRect(-a*.02,0,a*.04,-a*.45),e.strokeStyle="#3a2a1a",e.lineWidth=1,e.strokeRect(-a*.02,0,a*.04,-a*.45),e.fillStyle="#FFD700",e.beginPath(),e.arc(0,-a*.45,a*.04,0,Math.PI*2),e.fill(),e.strokeStyle="#DAA520",e.stroke();const I=a*.4,w=a*.25;e.fillStyle="#FFFFFF",e.fillRect(0,-a*.42,I,w),e.strokeStyle="rgba(0, 0, 0, 0.1)",e.strokeRect(0,-a*.42,I,w),e.fillStyle="#C8102E",e.fillRect(I*.4,-a*.42,I*.2,w),e.fillRect(0,-a*.42+w*.4,I,w*.2),e.restore(),e.restore()},drawTudorRose(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation),e.fillStyle="#C8102E",e.strokeStyle="#8B0000",e.lineWidth=a*.05;for(let o=0;o<5;o++){const r=o/5*Math.PI*2-Math.PI/2;e.save(),e.rotate(r),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.5,-a*.4,-a*.6,-a*.8,0,-a*1.2),e.bezierCurveTo(a*.6,-a*.8,a*.5,-a*.4,0,0),e.closePath(),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFFFFF",e.strokeStyle="#E0E0E0";for(let o=0;o<5;o++){const r=o/5*Math.PI*2-Math.PI/2+Math.PI/5;e.save(),e.rotate(r),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.3,-a*.25,-a*.35,-a*.5,0,-a*.7),e.bezierCurveTo(a*.35,-a*.5,a*.3,-a*.25,0,0),e.closePath(),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=a*.05,e.beginPath(),e.arc(0,0,a*.2,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="#FFA500";for(let o=0;o<5;o++){const r=o/5*Math.PI*2,h=a*.12;e.beginPath(),e.arc(Math.cos(r)*h,Math.sin(r)*h,a*.04,0,Math.PI*2),e.fill()}e.restore()},drawOakLeaf(e,l){const n=l.x,s=l.y,a=l.size;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation),e.fillStyle=l.color,e.strokeStyle=l.color==="#8b4513"?"#654321":"#1a3a0a",e.lineWidth=a*.08,e.beginPath(),e.moveTo(0,a*1.5),e.bezierCurveTo(a*.3,a*1.2,a*.4,a*1,a*.5,a*.8),e.bezierCurveTo(a*.7,a*.7,a*.8,a*.5,a*.6,a*.3),e.bezierCurveTo(a*.8,a*.2,a*.9,0,a*.7,-a*.3),e.bezierCurveTo(a*.85,-a*.5,a*.8,-a*.8,a*.5,-a*1),e.bezierCurveTo(a*.3,-a*1.2,0,-a*1.3,-a*.3,-a*1.2),e.bezierCurveTo(-a*.8,-a*.8,-a*.85,-a*.5,-a*.7,-a*.3),e.bezierCurveTo(-a*.9,0,-a*.8,a*.2,-a*.6,a*.3),e.bezierCurveTo(-a*.8,a*.5,-a*.7,a*.7,-a*.5,a*.8),e.bezierCurveTo(-a*.4,a*1,-a*.3,a*1.2,0,a*1.5),e.closePath(),e.fill(),e.stroke(),e.strokeStyle=l.color==="#8b4513"?"#654321":"#0a2505",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,a*1.4),e.lineTo(0,-a*1.15),e.stroke(),e.lineWidth=a*.03;for(let o=0;o<4;o++){const r=a*.8-o*a*.5;e.beginPath(),e.moveTo(0,r),e.lineTo(a*.4,r-a*.15),e.stroke(),e.beginPath(),e.moveTo(0,r),e.lineTo(-a*.4,r-a*.15),e.stroke()}e.restore()},drawSparkle(e,l,n){const s=l.x,a=l.y,o=l.size,r=.6+Math.sin(n*.004+l.twinklePhase)*.4;e.save(),e.globalAlpha=l.opacity*r,e.translate(s,a),e.rotate(l.rotation),e.fillStyle=l.color,e.shadowColor=l.color,e.shadowBlur=o*2,e.beginPath(),e.moveTo(0,-o),e.lineTo(o*.3,-o*.3),e.lineTo(o,0),e.lineTo(o*.3,o*.3),e.lineTo(0,o),e.lineTo(-o*.3,o*.3),e.lineTo(-o,0),e.lineTo(-o*.3,-o*.3),e.closePath(),e.fill(),e.restore()},drawCrown(e,l){const n=l.x,s=l.y,a=l.size,o=(Math.sin(l.glint)+1)*.5;e.save(),e.globalAlpha=l.opacity,e.translate(n,s),e.rotate(l.rotation);const r=e.createLinearGradient(-a,0,a,0);r.addColorStop(0,"#B8860B"),r.addColorStop(.5,"#FFD700"),r.addColorStop(1,"#B8860B"),e.fillStyle=r,e.strokeStyle="#8B6914",e.lineWidth=a*.05,e.beginPath(),e.ellipse(0,a*.3,a*.8,a*.25,0,0,Math.PI*2),e.fill(),e.stroke(),e.strokeStyle="#8B0000",e.lineWidth=a*.08,e.beginPath(),e.ellipse(0,a*.3,a*.7,a*.2,0,0,Math.PI*2),e.stroke(),e.fillStyle=r,e.strokeStyle="#8B6914",e.lineWidth=a*.05;for(let t=0;t<5;t++){const i=t/5*Math.PI*2-Math.PI/2,f=Math.cos(i)*a*.7,y=a*.3+Math.sin(i)*a*.2;e.save(),e.translate(f,y),e.rotate(i+Math.PI/2),e.beginPath(),e.moveTo(0,-a*.8),e.lineTo(-a*.12,-a*.3),e.lineTo(a*.12,-a*.3),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(-a*.12,-a*.3),e.bezierCurveTo(-a*.25,-a*.5,-a*.28,-a*.65,-a*.2,-a*.75),e.lineTo(-a*.15,-a*.65),e.bezierCurveTo(-a*.18,-a*.55,-a*.15,-a*.4,-a*.08,-a*.32),e.fill(),e.stroke(),e.beginPath(),e.moveTo(a*.12,-a*.3),e.bezierCurveTo(a*.25,-a*.5,a*.28,-a*.65,a*.2,-a*.75),e.lineTo(a*.15,-a*.65),e.bezierCurveTo(a*.18,-a*.55,a*.15,-a*.4,a*.08,-a*.32),e.fill(),e.stroke(),e.restore()}e.fillStyle="#FFD700",e.strokeStyle="#8B6914",e.lineWidth=a*.04,e.beginPath(),e.fillRect(-a*.05,-a*.9,a*.1,a*.25),e.strokeRect(-a*.05,-a*.9,a*.1,a*.25),e.fillRect(-a*.15,-a*.82,a*.3,a*.08),e.strokeRect(-a*.15,-a*.82,a*.3,a*.08);const h=[{x:0,y:a*.3,color:"#DC143C",size:.12},{x:a*.4,y:a*.3,color:"#0000CD",size:.08},{x:-a*.4,y:a*.3,color:"#0000CD",size:.08}];for(const t of h)e.fillStyle=t.color,e.beginPath(),e.arc(t.x,t.y,a*t.size,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(255, 255, 255, ${o*.7})`,e.beginPath(),e.arc(t.x-a*t.size*.3,t.y-a*t.size*.3,a*t.size*.4,0,Math.PI*2),e.fill();e.restore()},drawTwinklingStar(e,l,n){const s=l.x,a=l.y,o=l.size,r=.5+Math.sin(n*l.twinkleSpeed+l.twinklePhase)*.5,h=`rgba(255, 220, 220, ${r})`,t=`rgba(255, 180, 180, ${r*.4})`;e.save(),e.translate(s,a),e.shadowColor=t,e.shadowBlur=o*3*r,e.fillStyle=h,e.beginPath();for(let i=0;i<4;i++){const f=i*Math.PI/2,y=Math.cos(f)*o,g=Math.sin(f)*o,P=f+Math.PI/4,z=Math.cos(P)*(o*.3),T=Math.sin(P)*(o*.3);i===0?e.moveTo(y,g):e.lineTo(y,g),e.lineTo(z,T)}e.closePath(),e.fill(),e.shadowBlur=o*2*r,e.beginPath(),e.arc(0,0,o*.25,0,Math.PI*2),e.fill(),e.restore()}};
@@ -1 +1 @@
1
- export default{name:"st-patricks",displayName:"St Patrick's Day",emoji:"\u2618\uFE0F",intensityConfig:{light:{count:40,speedRange:[.4,1.2],sizeRange:[2,4],pots:1,leprechaunChance:3e-4,twinklingStars:10},medium:{count:80,speedRange:[.5,1.5],sizeRange:[2,5],pots:2,leprechaunChance:5e-4,twinklingStars:18},heavy:{count:120,speedRange:[.6,1.8],sizeRange:[3,6],pots:3,leprechaunChance:8e-4,twinklingStars:25}},particles:["clover-petal","shamrock","gold-coin","sparkle"],decorations:["pot-of-gold","rainbow","leprechaun","harp","static-leprechaun","moon","twinkling-star"],colors:{primary:"#228B22",secondary:"#90EE90",white:"#FFFFFF",accent:"#FFD700",rainbow:["#ff0000","#ffa500","#ffff00","#00ff00","#0000ff","#4b0082","#8b00ff"]},createCloverPetal(e,o,n){const s=["#228B22","#32CD32","#90EE90","#3CB371","#2E8B57"];return{type:"clover-petal",x:-30,y:Math.random()*o,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:(n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.025,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:s[Math.floor(Math.random()*s.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createShamrock(e,o,n){const s=Math.random();let l,a;return s<.5?(l="#228B22",a="#006400"):s<.75?(l="#FFFFFF",a="#d0d0d0"):(l="#FFD700",a="#DAA520"),{type:"shamrock",x:-30,y:Math.random()*o,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.15,opacity:.7+Math.random()*.3,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.025,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,color:l,strokeColor:a,active:!0}},createGoldCoin(e,o,n){return{type:"gold-coin",x:-30,y:Math.random()*o,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:2+Math.random()*3,speed:(Math.random()-.5)*.1,opacity:.9+Math.random()*.1,rotation:0,rotationSpeed:.05+Math.random()*.1,spinPhase:Math.random()*Math.PI*2,glintPhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.01+Math.random()*.02,active:!0}},createPotOfGold(e,o,n={}){return{type:"pot-of-gold",x:n.x!==void 0?n.x:Math.random()*e*.6+e*.2,y:n.y!==void 0?n.y:o-40,size:20+Math.random()*10,opacity:1,glintPhase:Math.random()*Math.PI*2,coins:[],active:!0,static:!0}},createRainbow(e,o,n,s){const a=n,r=(20+n)/2,h=o*.2,t=s-h/2;return{type:"rainbow",x:r,y:t,startX:20,endX:a,endY:s,width:e,height:o,opacity:.7,vx:0,vy:0,active:!0,static:!0}},createSparkle(e,o,n){const s=["#FFD700","#FFFFFF","#228B22"];return{type:"sparkle",x:-20,y:Math.random()*o,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:s[Math.floor(Math.random()*s.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,o,n){const s=Math.random();return s<.6?this.createCloverPetal(e,o,n):s<.8?this.createShamrock(e,o,n):s<.95?this.createGoldCoin(e,o,n):this.createSparkle(e,o,n)},createInitialDecorations(e,o,n){const s=[];s.push({type:"moon",x:e-120,y:100,size:60+Math.random()*20,opacity:.85,glowPhase:Math.random()*Math.PI*2,active:!0,static:!0});const l=20,a=220,r=o-40;s.push(this.createPotOfGold(e,o,{x:a,y:r})),s.push(this.createRainbow(e,o,a,r));const h=1+Math.floor(Math.random()*2);for(let f=0;f<h;f++){const P=60+Math.random()*(e-120);s.push({type:"static-leprechaun",x:P,y:o-35,size:12+Math.random()*4,opacity:1,time:Math.random()*1e3,wavePhase:Math.random()*Math.PI*2,active:!0,static:!0})}const t=n.twinklingStars||18;for(let f=0;f<t;f++)s.push(this.createTwinklingStar(e,o));return s},createTwinklingStar(e,o){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(o*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,o,n,s){const l=Math.random();if(l<s.leprechaunChance){if(e.some(t=>t.type==="leprechaun"))return null;const a=Math.random()<.5,r=(o+100)/180;return{type:"leprechaun",x:a?-50:o+50,y:n-35,baseY:n-35,vx:a?r:-r,vy:0,size:12+Math.random()*6,opacity:1,time:0,legPhase:Math.random()*Math.PI*2,active:!0,static:!1}}if(l<s.leprechaunChance+3e-4){if(e.some(r=>r.type==="banshee"))return null;const a=Math.random()<.5;return{type:"banshee",x:a?-100:o+100,y:Math.random()*(n*.4)+50,baseY:Math.random()*(n*.4)+50,vx:a?2+Math.random()*1:-(2+Math.random()*1),size:18+Math.random()*10,opacity:.6+Math.random()*.2,waveAmplitude:25+Math.random()*20,waveFrequency:.0015+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wailPhase:Math.random()*Math.PI*2,active:!0,static:!1}}if(l<.001&&e.filter(r=>r.type==="pot-of-gold").length<s.pots){const r=this.createPotOfGold(o,n),h=this.createRainbow(o,n,r.x,r.y);return e.push(h),r}return null},updateSpecialParticles(e,o,n,s){return e.forEach(l=>{l.active&&((l.type==="leprechaun"||l.type==="banshee")&&(l.time+=o,l.type==="leprechaun"?(l.vx>0&&l.x>n+l.size*2||l.vx<0&&l.x<-l.size*2)&&(l.active=!1):l.type==="banshee"&&(l.vx>0&&l.x>n+l.size*4||l.vx<0&&l.x<-l.size*4)&&(l.active=!1)),l.type==="static-leprechaun"&&(l.time+=o))}),e.filter(l=>l.active)},drawCloverPetal(e,o,n){const s=o.x,l=o.y,a=o.size,r=Math.sin(n*o.flutterSpeed+o.flutter)*.3;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation+r),e.fillStyle=o.color,e.strokeStyle="#006400",e.lineWidth=a*.08,e.beginPath(),e.moveTo(0,-a*.3),e.bezierCurveTo(-a*.6,-a*.7,-a*.8,-a*.3,-a*.5,a*.2),e.lineTo(0,a*.8),e.lineTo(a*.5,a*.2),e.bezierCurveTo(a*.8,-a*.3,a*.6,-a*.7,0,-a*.3),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="rgba(0, 100, 0, 0.4)",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,-a*.2),e.lineTo(0,a*.7),e.stroke(),e.restore()},drawSparkle(e,o,n){const s=o.x,l=o.y,a=o.size,r=.6+Math.sin(n*.004+o.twinklePhase)*.4;e.save(),e.globalAlpha=o.opacity*r,e.translate(s,l),e.rotate(o.rotation),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*2,e.beginPath(),e.moveTo(0,-a),e.lineTo(a*.3,-a*.3),e.lineTo(a,0),e.lineTo(a*.3,a*.3),e.lineTo(0,a),e.lineTo(-a*.3,a*.3),e.lineTo(-a,0),e.lineTo(-a*.3,-a*.3),e.closePath(),e.fill(),e.restore()},drawShamrock(e,o){const n=o.x,s=o.y,l=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(n,s),e.rotate(o.rotation),e.fillStyle=o.color||"#228B22",e.strokeStyle=o.strokeColor||"#006400",e.lineWidth=l*.1;for(let a=0;a<3;a++){const r=a/3*Math.PI*2-Math.PI/2;e.save(),e.rotate(r),e.translate(0,-l*.7),e.beginPath(),e.moveTo(0,l*.3),e.bezierCurveTo(-l*.5,-l*.2,-l*.3,-l*.6,0,-l*.35),e.bezierCurveTo(l*.3,-l*.6,l*.5,-l*.2,0,l*.3),e.closePath(),e.fill(),e.stroke(),e.restore()}e.strokeStyle="#8B4513",e.lineWidth=l*.15,e.beginPath(),e.moveTo(0,0),e.lineTo(0,l*1.2),e.stroke(),e.restore()},drawGoldCoin(e,o,n){const s=o.x,l=o.y,a=o.size,r=Math.abs(Math.cos(o.rotation))*a;if(e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=a*.15,e.beginPath(),e.ellipse(0,0,r,a,0,0,Math.PI*2),e.fill(),e.stroke(),r>a*.3){const h=(Math.sin(n*.005+o.glintPhase)+1)*.5;e.fillStyle=`rgba(255, 255, 255, ${h*.6})`,e.beginPath(),e.ellipse(-r*.3,-a*.3,r*.3,a*.3,0,0,Math.PI*2),e.fill()}e.restore()},drawPotOfGold(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.translate(s,l),e.fillStyle="#1a1a1a",e.strokeStyle="#0a0a0a",e.lineWidth=2,e.beginPath(),e.arc(0,0,a*.7,0,Math.PI),e.lineTo(-a*.7,a*.4),e.quadraticCurveTo(0,a*.6,a*.7,a*.4),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="#2a2a2a",e.lineWidth=3,e.beginPath(),e.arc(0,-a*.2,a*.5,Math.PI,0),e.stroke();const r=[{x:-a*.4,y:-a*.2,s:.8},{x:a*.3,y:-a*.3,s:.9},{x:-a*.1,y:-a*.5,s:1},{x:a*.5,y:-a*.1,s:.7},{x:-a*.5,y:0,s:.75},{x:a*.1,y:-a*.6,s:.85},{x:0,y:-a*.3,s:.95}];e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=1,r.forEach((t,f)=>{const P=n*.002+f*.5,y=(Math.sin(P)+1)*.5;e.save(),e.translate(t.x,t.y),e.beginPath(),e.arc(0,0,a*.2*t.s,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle=`rgba(255, 255, 255, ${y*.6})`,e.beginPath(),e.arc(-a*.08*t.s,-a*.08*t.s,a*.08*t.s,0,Math.PI*2),e.fill(),e.restore()}),e.globalAlpha=.3;const h=e.createRadialGradient(0,-a*.2,0,0,-a*.2,a*1.5);h.addColorStop(0,"#FFD700"),h.addColorStop(1,"rgba(255, 215, 0, 0)"),e.fillStyle=h,e.fillRect(-a*1.5,-a*1.5,a*3,a*1.5),e.restore()},drawSmallGoldPot(e,o,n,s){e.save(),e.translate(o,n),e.fillStyle="#1a1a1a",e.strokeStyle="#0a0a0a",e.lineWidth=1,e.beginPath(),e.arc(0,-s*.4,s*.7,0,Math.PI,!0),e.lineTo(s*.7,s*.4),e.quadraticCurveTo(0,s*.6,-s*.7,s*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(0,-s*.7,s*.5,0,Math.PI*2),e.fill(),e.restore()},drawRainbow(e,o){const n=o.startX,s=o.endX,l=o.endY,a=o.height;e.save(),e.globalAlpha=.5;const r=Math.abs(s-n),h=(n+s)/2,t=a*.2,f=(r*r+4*t*t)/(8*t),P=l+t-f,y=this.colors.rainbow,g=5;for(let d=y.length-1;d>=0;d--)e.strokeStyle=y[d],e.lineWidth=g,e.beginPath(),e.arc(h,P,f+(y.length-1-d)*g,Math.PI,0),e.stroke();e.restore(),this.drawSmallGoldPot(e,s,l,20)},drawLeprechaun(e,o,n){const s=o.x,l=o.y,a=o.size,r=o.vx>0?1:-1;e.save(),e.translate(s,l),r===-1&&e.scale(-1,1);const h=o.time*.05%(Math.PI*2),t=Math.sin(h+o.legPhase)*(Math.PI/6),f=Math.sin(h+Math.PI+o.legPhase)*(Math.PI/8);e.strokeStyle="#228B22",e.lineWidth=a*.15,e.beginPath(),e.moveTo(a*.2,a*.5),e.lineTo(a*.2+Math.sin(t)*a*.3,a*1.2+Math.cos(t)*a*.1),e.stroke(),e.beginPath(),e.moveTo(-a*.2,a*.5),e.lineTo(-a*.2+Math.sin(t+Math.PI)*a*.3,a*1.2+Math.cos(t+Math.PI)*a*.1),e.stroke(),e.fillStyle="#000000",e.fillRect(a*.2+Math.sin(t)*a*.3-a*.15,a*1.15+Math.cos(t)*a*.1,a*.3,a*.2),e.fillRect(-a*.2+Math.sin(t+Math.PI)*a*.3-a*.15,a*1.15+Math.cos(t+Math.PI)*a*.1,a*.3,a*.2),e.fillStyle="#FFD700",e.fillRect(a*.2+Math.sin(t)*a*.3-a*.1,a*1.2+Math.cos(t)*a*.1,a*.2,a*.1),e.fillRect(-a*.2+Math.sin(t+Math.PI)*a*.3-a*.1,a*1.2+Math.cos(t+Math.PI)*a*.1,a*.2,a*.1),e.fillStyle="#228B22",e.fillRect(-a*.5,0,a,a*.6),e.fillStyle="#000000",e.fillRect(-a*.5,a*.35,a,a*.1),e.fillStyle="#FFD700",e.fillRect(-a*.15,a*.35,a*.3,a*.1),e.fillStyle="#228B22",e.save(),e.translate(a*.4,a*.2),e.rotate(f),e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(-a*.4-a*.15,a*.2),e.rotate(f+Math.PI),e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(0,-a*.3,a*.4,0,Math.PI*2),e.fill(),e.fillStyle="#ff6600",e.beginPath(),e.moveTo(-a*.3,-a*.1),e.quadraticCurveTo(-a*.4,a*.2,0,a*.3),e.quadraticCurveTo(a*.4,a*.2,a*.3,-a*.1),e.closePath(),e.fill(),e.fillStyle="#228B22",e.fillRect(-a*.5,-a*.8,a,a*.1),e.fillRect(-a*.35,-a*1.4,a*.7,a*.6),e.fillStyle="#FFD700",e.fillRect(-a*.15,-a*.85,a*.3,a*.15),e.fillStyle="#000000",e.beginPath(),e.arc(-a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.restore()},drawBanshee(e,o,n){const s=o.x,l=o.y+Math.sin(n*o.waveFrequency+o.waveOffset)*o.waveAmplitude,a=o.size,r=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),r===-1&&e.scale(-1,1);const h=e.createRadialGradient(0,-a*.5,0,0,-a*.5,a*3);h.addColorStop(0,"rgba(180, 255, 180, 0.4)"),h.addColorStop(.3,"rgba(150, 255, 150, 0.2)"),h.addColorStop(.6,"rgba(120, 255, 120, 0.1)"),h.addColorStop(1,"rgba(100, 255, 100, 0)"),e.fillStyle=h,e.fillRect(-a*3,-a*3,a*6,a*6);const t=Math.sin(n*.008+o.wailPhase)*a*.25;e.fillStyle="rgba(200, 240, 200, 0.3)",e.beginPath(),e.moveTo(-a*.8,-a*1.2),e.bezierCurveTo(-a*1.2+t*2,-a*.4,-a*1+t*1.5,a*.6,-a*.6+t,a*1.8),e.bezierCurveTo(-a*.3,a*1.5,a*.3,a*1.5,a*.6-t,a*1.8),e.bezierCurveTo(a*1-t*1.5,a*.6,a*1.2-t*2,-a*.4,a*.8,-a*1.2),e.closePath(),e.fill(),e.fillStyle="rgba(230, 255, 230, 0.85)",e.strokeStyle="rgba(180, 255, 180, 0.6)",e.lineWidth=a*.04,e.beginPath(),e.moveTo(-a*.5,-a*1);for(let i=0;i<=12;i++){const d=i/12,M=Math.sin(n*.012+d*Math.PI*3+o.wailPhase)*a*.3,b=(d-.5)*a*1.8+M,S=-a*1+d*a*2.2;i===0?e.moveTo(b,S):e.lineTo(b,S)}e.lineTo(-a*.5,-a*1),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="rgba(180, 255, 180, 0.4)",e.lineWidth=a*.02;for(let i=0;i<8;i++){const d=-a*.7+i*(a*1.4/7),M=Math.sin(n*.015+i*.8)*a*.2;e.beginPath(),e.moveTo(d,a*.4),e.lineTo(d+M,a*1.2+i%2*a*.4),e.stroke()}const f=Math.sin(n*.006)*.15;e.save(),e.rotate(f),e.fillStyle="rgba(240, 255, 240, 0.9)",e.strokeStyle="rgba(180, 230, 180, 0.5)",e.lineWidth=a*.03,e.beginPath(),e.ellipse(0,-a*.8,a*.35,a*.55,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="rgba(50, 100, 50, 0.6)",e.beginPath(),e.ellipse(-a*.15,-a*.85,a*.12,a*.08,0,0,Math.PI*2),e.ellipse(a*.15,-a*.85,a*.12,a*.08,0,0,Math.PI*2),e.fill();const P=.6+Math.sin(n*.008+o.wailPhase)*.4;e.fillStyle=`rgba(100, 255, 150, ${P})`,e.shadowColor="#64ff96",e.shadowBlur=a*.6,e.beginPath(),e.arc(-a*.15,-a*.85,a*.08,0,Math.PI*2),e.arc(a*.15,-a*.85,a*.08,0,Math.PI*2),e.fill(),e.shadowBlur=0;const y=.2+Math.sin(n*.01+o.wailPhase)*.1;e.fillStyle="rgba(80, 150, 80, 0.7)",e.strokeStyle="rgba(50, 100, 50, 0.8)",e.lineWidth=a*.02,e.beginPath(),e.ellipse(0,-a*.6,a*.15,a*(.2+y),0,0,Math.PI*2),e.fill(),e.stroke(),e.restore(),e.strokeStyle="rgba(220, 255, 220, 0.7)";for(let i=0;i<12;i++){const d=-a*.35+i/11*a*.7,M=Math.sin(n*.01+i*.6+o.wailPhase)*a*.5,b=Math.cos(n*.008+i*.4)*a*.3;e.lineWidth=a*(.04+i%3*.02),e.beginPath(),e.moveTo(d,-a*1.1),e.bezierCurveTo(d+M*.3,-a*.5,d+M*.6+b*.5,a*.2,d+M+b,a*1+i%2*a*.5),e.stroke()}const g=Math.sin(n*.01+o.wailPhase)*a*.3;e.fillStyle="rgba(230, 255, 230, 0.8)",e.strokeStyle="rgba(180, 230, 180, 0.6)",e.lineWidth=a*.02,e.save(),e.translate(-a*.6,-a*.2),e.rotate(-.3+g*.002),e.beginPath(),e.ellipse(0,0,a*.15,a*.25,0,0,Math.PI*2),e.fill(),e.stroke();for(let i=0;i<4;i++){const d=-a*.08+i*a*.055;e.beginPath(),e.moveTo(d,a*.15),e.lineTo(d,a*.35),e.stroke()}e.restore(),e.save(),e.translate(a*.6,-a*.2),e.rotate(.3-g*.002),e.beginPath(),e.ellipse(0,0,a*.15,a*.25,0,0,Math.PI*2),e.fill(),e.stroke();for(let i=0;i<4;i++){const d=-a*.08+i*a*.055;e.beginPath(),e.moveTo(d,a*.15),e.lineTo(d,a*.35),e.stroke()}e.restore(),e.strokeStyle="rgba(180, 255, 180, 0.3)",e.lineWidth=a*.02;for(let i=0;i<6;i++){const d=i/6*Math.PI*2,M=Math.sin(n*.01+i*.8)*a*.6,b=a*(1.5+i%2*.5);e.beginPath(),e.moveTo(0,a*.4),e.bezierCurveTo(Math.cos(d)*a*.8+M*.5,a*1,Math.cos(d)*a*1.5+M,a*1.8,Math.cos(d)*b+M*1.5,a*2.5),e.stroke()}e.restore()},drawMoon(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l);const r=e.createRadialGradient(-a*.2,-a*.2,0,0,0,a);r.addColorStop(0,"#90EE90"),r.addColorStop(.5,"#7FD87F"),r.addColorStop(1,"#5CB85C"),e.fillStyle=r,e.beginPath(),e.arc(0,0,a,0,Math.PI*2),e.fill(),e.fillStyle="rgba(60, 130, 60, 0.3)",e.beginPath(),e.arc(-a*.3,-a*.2,a*.15,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.25,a*.1,a*.2,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.1,-a*.4,a*.12,0,Math.PI*2),e.fill(),e.save(),e.translate(a*.2,a*.35),e.scale(.15,.15),e.fillStyle="rgba(34, 139, 34, 0.4)";for(let f=0;f<3;f++){const P=f/3*Math.PI*2-Math.PI/2;e.save(),e.rotate(P),e.translate(0,-a*.7),e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a*.5,-a*.2,-a*.3,-a*.6,0,-a*.35),e.bezierCurveTo(a*.3,-a*.6,a*.5,-a*.2,0,a*.3),e.closePath(),e.fill(),e.restore()}e.restore();const h=.3+Math.sin(n*.002+o.glowPhase)*.15;e.globalAlpha=h;const t=e.createRadialGradient(0,0,a*.8,0,0,a*1.8);t.addColorStop(0,"rgba(144, 238, 144, 0.8)"),t.addColorStop(.5,"rgba(144, 238, 144, 0.4)"),t.addColorStop(1,"rgba(144, 238, 144, 0)"),e.fillStyle=t,e.beginPath(),e.arc(0,0,a*1.8,0,Math.PI*2),e.fill(),e.restore()},drawStaticLeprechaun(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.translate(s,l);const r=Math.sin(o.time*.005+o.wavePhase)*a*.05,h=Math.sin(o.time*.003+o.wavePhase*.5)*.05;e.translate(0,r),e.rotate(h),e.strokeStyle="#228B22",e.lineWidth=a*.15,e.beginPath(),e.moveTo(-a*.2,a*.5),e.lineTo(-a*.25,a*1.2),e.stroke(),e.beginPath(),e.moveTo(a*.2,a*.5),e.lineTo(a*.25,a*1.2),e.stroke(),e.fillStyle="#000000",e.fillRect(-a*.35,a*1.15,a*.25,a*.15),e.fillRect(a*.1,a*1.15,a*.25,a*.15),e.fillStyle="#FFD700",e.fillRect(-a*.32,a*1.18,a*.15,a*.08),e.fillRect(a*.13,a*1.18,a*.15,a*.08),e.fillStyle="#228B22",e.fillRect(-a*.5,0,a,a*.6),e.fillStyle="#000000",e.fillRect(-a*.5,a*.35,a,a*.1),e.fillStyle="#FFD700",e.fillRect(-a*.15,a*.35,a*.3,a*.1),e.save(),e.translate(-a*.5,a*.2),e.rotate(-.3+Math.sin(o.time*.007+o.wavePhase*1.2)*.1),e.fillStyle="#228B22",e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(a*.5,a*.2),e.rotate(.3-Math.sin(o.time*.006+o.wavePhase*.8)*.05),e.fillStyle="#228B22",e.fillRect(-a*.15,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(-a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(0,-a*.3),e.rotate(Math.sin(o.time*.004+o.wavePhase*1.5)*.02),e.beginPath(),e.arc(0,0,a*.4,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#ff6600",e.beginPath(),e.moveTo(-a*.3,-a*.1),e.quadraticCurveTo(-a*.4,a*.2,0,a*.3),e.quadraticCurveTo(a*.4,a*.2,a*.3,-a*.1),e.closePath(),e.fill(),e.fillStyle="#228B22",e.fillRect(-a*.5,-a*.8,a,a*.1),e.fillRect(-a*.35,-a*1.4,a*.7,a*.6),e.fillStyle="#FFD700",e.fillRect(-a*.15,-a*.85,a*.3,a*.15),e.fillStyle="#000000",e.beginPath(),e.arc(-a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#000000",e.lineWidth=a*.04,e.beginPath(),e.arc(0,-a*.2,a*.15,0,Math.PI),e.stroke(),e.restore()},drawTwinklingStar(e,o,n){const s=o.x,l=o.y,a=o.size,r=.5+Math.sin(n*o.twinkleSpeed+o.twinklePhase)*.5,h=`rgba(220, 255, 220, ${r})`,t=`rgba(180, 255, 180, ${r*.4})`;e.save(),e.translate(s,l),e.shadowColor=t,e.shadowBlur=a*3*r,e.fillStyle=h,e.beginPath();for(let f=0;f<4;f++){const P=f*Math.PI/2,y=Math.cos(P)*a,g=Math.sin(P)*a,i=P+Math.PI/4,d=Math.cos(i)*(a*.3),M=Math.sin(i)*(a*.3);f===0?e.moveTo(y,g):e.lineTo(y,M),e.lineTo(d,M)}e.closePath(),e.fill(),e.shadowBlur=a*2*r,e.beginPath(),e.arc(0,0,a*.25,0,Math.PI*2),e.fill(),e.restore()}};
1
+ export default{name:"st-patricks",displayName:"St Patrick's Day",emoji:"\u2618\uFE0F",intensityConfig:{light:{count:40,speedRange:[.4,1.2],sizeRange:[2,4],pots:1,leprechaunChance:3e-4,twinklingStars:10},medium:{count:80,speedRange:[.5,1.5],sizeRange:[2,5],pots:2,leprechaunChance:5e-4,twinklingStars:18},heavy:{count:120,speedRange:[.6,1.8],sizeRange:[3,6],pots:3,leprechaunChance:8e-4,twinklingStars:25}},particles:["clover-petal","shamrock","gold-coin","sparkle"],decorations:["pot-of-gold","rainbow","leprechaun","harp","static-leprechaun","moon","twinkling-star"],colors:{primary:"#228B22",secondary:"#90EE90",white:"#FFFFFF",accent:"#FFD700",rainbow:["#ff0000","#ffa500","#ffff00","#00ff00","#0000ff","#4b0082","#8b00ff"]},createCloverPetal(e,o,n){const s=["#228B22","#32CD32","#90EE90","#3CB371","#2E8B57"];return{type:"clover-petal",x:-30,y:Math.random()*o,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:(n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]))*1.5,speed:(Math.random()-.5)*.2,opacity:.75+Math.random()*.25,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.025,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.03,color:s[Math.floor(Math.random()*s.length)],flutter:Math.random()*Math.PI*2,flutterSpeed:.02+Math.random()*.02,active:!0}},createShamrock(e,o,n){const s=Math.random();let l,a;return s<.5?(l="#228B22",a="#006400"):s<.75?(l="#FFFFFF",a="#d0d0d0"):(l="#FFD700",a="#DAA520"),{type:"shamrock",x:-30,y:Math.random()*o,vx:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),speed:(Math.random()-.5)*.15,opacity:.7+Math.random()*.3,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.025,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,color:l,strokeColor:a,active:!0}},createGoldCoin(e,o,n){return{type:"gold-coin",x:-30,y:Math.random()*o,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:2+Math.random()*3,speed:(Math.random()-.5)*.1,opacity:.9+Math.random()*.1,rotation:0,rotationSpeed:.05+Math.random()*.1,spinPhase:Math.random()*Math.PI*2,glintPhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.01+Math.random()*.02,active:!0}},createPotOfGold(e,o,n={}){return{type:"pot-of-gold",x:n.x!==void 0?n.x:Math.random()*e*.6+e*.2,y:n.y!==void 0?n.y:o-40,size:20+Math.random()*10,opacity:1,glintPhase:Math.random()*Math.PI*2,coins:[],active:!0,static:!0}},createRainbow(e,o,n,s){const a=n,r=(20+n)/2,h=o*.2,t=s-h/2;return{type:"rainbow",x:r,y:t,startX:20,endX:a,endY:s,width:e,height:o,opacity:.7,vx:0,vy:0,active:!0,static:!0}},createSparkle(e,o,n){const s=["#FFD700","#FFFFFF","#228B22"];return{type:"sparkle",x:-20,y:Math.random()*o,vx:(n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]))*.8,size:n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.6,vy:(Math.random()-.5)*.2,opacity:.6+Math.random()*.4,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.04,color:s[Math.floor(Math.random()*s.length)],twinklePhase:Math.random()*Math.PI*2,windOffset:Math.random()*Math.PI*2,windSpeed:.015+Math.random()*.02,active:!0,static:!1}},createFallingParticle(e,o,n){const s=Math.random();return s<.6?this.createCloverPetal(e,o,n):s<.8?this.createShamrock(e,o,n):s<.95?this.createGoldCoin(e,o,n):this.createSparkle(e,o,n)},createInitialDecorations(e,o,n){const s=[];s.push({type:"moon",x:e-120,y:100,size:60+Math.random()*20,opacity:.85,glowPhase:Math.random()*Math.PI*2,active:!0,static:!0});const l=20,a=220,r=o-40;s.push(this.createPotOfGold(e,o,{x:a,y:r})),s.push(this.createRainbow(e,o,a,r));const h=1+Math.floor(Math.random()*2);for(let f=0;f<h;f++){const P=60+Math.random()*(e-120);s.push({type:"static-leprechaun",x:P,y:o-35,size:12+Math.random()*4,opacity:1,time:Math.random()*1e3,wavePhase:Math.random()*Math.PI*2,active:!0,static:!0})}const t=n.twinklingStars??18;for(let f=0;f<t;f++)s.push(this.createTwinklingStar(e,o));return s},createTwinklingStar(e,o){return{type:"twinkling-star",x:Math.random()*e,y:Math.random()*(o*.5),size:1+Math.random()*2,opacity:.6+Math.random()*.3,twinklePhase:Math.random()*Math.PI*2,twinkleSpeed:.003+Math.random()*.003,active:!0,static:!0}},spawnSpecialParticle(e,o,n,s){const l=Math.random();if(l<s.leprechaunChance){if(e.some(t=>t.type==="leprechaun"))return null;const a=Math.random()<.5,r=(o+100)/180;return{type:"leprechaun",x:a?-50:o+50,y:n-35,baseY:n-35,vx:a?r:-r,vy:0,size:12+Math.random()*6,opacity:1,time:0,legPhase:Math.random()*Math.PI*2,active:!0,static:!1}}if(l<s.leprechaunChance+3e-4){if(e.some(r=>r.type==="banshee"))return null;const a=Math.random()<.5;return{type:"banshee",x:a?-100:o+100,y:Math.random()*(n*.4)+50,baseY:Math.random()*(n*.4)+50,vx:a?2+Math.random()*1:-(2+Math.random()*1),size:18+Math.random()*10,opacity:.6+Math.random()*.2,waveAmplitude:25+Math.random()*20,waveFrequency:.0015+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wailPhase:Math.random()*Math.PI*2,active:!0,static:!1}}if(l<.001&&e.filter(r=>r.type==="pot-of-gold").length<s.pots){const r=this.createPotOfGold(o,n),h=this.createRainbow(o,n,r.x,r.y);return e.push(h),r}return null},updateSpecialParticles(e,o,n,s){return e.forEach(l=>{l.active&&((l.type==="leprechaun"||l.type==="banshee")&&(l.time+=o,l.type==="leprechaun"?(l.vx>0&&l.x>n+l.size*2||l.vx<0&&l.x<-l.size*2)&&(l.active=!1):l.type==="banshee"&&(l.vx>0&&l.x>n+l.size*4||l.vx<0&&l.x<-l.size*4)&&(l.active=!1)),l.type==="static-leprechaun"&&(l.time+=o))}),e.filter(l=>l.active)},drawCloverPetal(e,o,n){const s=o.x,l=o.y,a=o.size,r=Math.sin(n*o.flutterSpeed+o.flutter)*.3;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation+r),e.fillStyle=o.color,e.strokeStyle="#006400",e.lineWidth=a*.08,e.beginPath(),e.moveTo(0,-a*.3),e.bezierCurveTo(-a*.6,-a*.7,-a*.8,-a*.3,-a*.5,a*.2),e.lineTo(0,a*.8),e.lineTo(a*.5,a*.2),e.bezierCurveTo(a*.8,-a*.3,a*.6,-a*.7,0,-a*.3),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="rgba(0, 100, 0, 0.4)",e.lineWidth=a*.06,e.beginPath(),e.moveTo(0,-a*.2),e.lineTo(0,a*.7),e.stroke(),e.restore()},drawSparkle(e,o,n){const s=o.x,l=o.y,a=o.size,r=.6+Math.sin(n*.004+o.twinklePhase)*.4;e.save(),e.globalAlpha=o.opacity*r,e.translate(s,l),e.rotate(o.rotation),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*2,e.beginPath(),e.moveTo(0,-a),e.lineTo(a*.3,-a*.3),e.lineTo(a,0),e.lineTo(a*.3,a*.3),e.lineTo(0,a),e.lineTo(-a*.3,a*.3),e.lineTo(-a,0),e.lineTo(-a*.3,-a*.3),e.closePath(),e.fill(),e.restore()},drawShamrock(e,o){const n=o.x,s=o.y,l=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(n,s),e.rotate(o.rotation),e.fillStyle=o.color||"#228B22",e.strokeStyle=o.strokeColor||"#006400",e.lineWidth=l*.1;for(let a=0;a<3;a++){const r=a/3*Math.PI*2-Math.PI/2;e.save(),e.rotate(r),e.translate(0,-l*.7),e.beginPath(),e.moveTo(0,l*.3),e.bezierCurveTo(-l*.5,-l*.2,-l*.3,-l*.6,0,-l*.35),e.bezierCurveTo(l*.3,-l*.6,l*.5,-l*.2,0,l*.3),e.closePath(),e.fill(),e.stroke(),e.restore()}e.strokeStyle="#8B4513",e.lineWidth=l*.15,e.beginPath(),e.moveTo(0,0),e.lineTo(0,l*1.2),e.stroke(),e.restore()},drawGoldCoin(e,o,n){const s=o.x,l=o.y,a=o.size,r=Math.abs(Math.cos(o.rotation))*a;if(e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=a*.15,e.beginPath(),e.ellipse(0,0,r,a,0,0,Math.PI*2),e.fill(),e.stroke(),r>a*.3){const h=(Math.sin(n*.005+o.glintPhase)+1)*.5;e.fillStyle=`rgba(255, 255, 255, ${h*.6})`,e.beginPath(),e.ellipse(-r*.3,-a*.3,r*.3,a*.3,0,0,Math.PI*2),e.fill()}e.restore()},drawPotOfGold(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.translate(s,l),e.fillStyle="#1a1a1a",e.strokeStyle="#0a0a0a",e.lineWidth=2,e.beginPath(),e.arc(0,0,a*.7,0,Math.PI),e.lineTo(-a*.7,a*.4),e.quadraticCurveTo(0,a*.6,a*.7,a*.4),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="#2a2a2a",e.lineWidth=3,e.beginPath(),e.arc(0,-a*.2,a*.5,Math.PI,0),e.stroke();const r=[{x:-a*.4,y:-a*.2,s:.8},{x:a*.3,y:-a*.3,s:.9},{x:-a*.1,y:-a*.5,s:1},{x:a*.5,y:-a*.1,s:.7},{x:-a*.5,y:0,s:.75},{x:a*.1,y:-a*.6,s:.85},{x:0,y:-a*.3,s:.95}];e.fillStyle="#FFD700",e.strokeStyle="#DAA520",e.lineWidth=1,r.forEach((t,f)=>{const P=n*.002+f*.5,y=(Math.sin(P)+1)*.5;e.save(),e.translate(t.x,t.y),e.beginPath(),e.arc(0,0,a*.2*t.s,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle=`rgba(255, 255, 255, ${y*.6})`,e.beginPath(),e.arc(-a*.08*t.s,-a*.08*t.s,a*.08*t.s,0,Math.PI*2),e.fill(),e.restore()}),e.globalAlpha=.3;const h=e.createRadialGradient(0,-a*.2,0,0,-a*.2,a*1.5);h.addColorStop(0,"#FFD700"),h.addColorStop(1,"rgba(255, 215, 0, 0)"),e.fillStyle=h,e.fillRect(-a*1.5,-a*1.5,a*3,a*1.5),e.restore()},drawSmallGoldPot(e,o,n,s){e.save(),e.translate(o,n),e.fillStyle="#1a1a1a",e.strokeStyle="#0a0a0a",e.lineWidth=1,e.beginPath(),e.arc(0,-s*.4,s*.7,0,Math.PI,!0),e.lineTo(s*.7,s*.4),e.quadraticCurveTo(0,s*.6,-s*.7,s*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#FFD700",e.beginPath(),e.arc(0,-s*.7,s*.5,0,Math.PI*2),e.fill(),e.restore()},drawRainbow(e,o){const n=o.startX,s=o.endX,l=o.endY,a=o.height;e.save(),e.globalAlpha=.5;const r=Math.abs(s-n),h=(n+s)/2,t=a*.2,f=(r*r+4*t*t)/(8*t),P=l+t-f,y=this.colors.rainbow,g=5;for(let d=y.length-1;d>=0;d--)e.strokeStyle=y[d],e.lineWidth=g,e.beginPath(),e.arc(h,P,f+(y.length-1-d)*g,Math.PI,0),e.stroke();e.restore(),this.drawSmallGoldPot(e,s,l,20)},drawLeprechaun(e,o,n){const s=o.x,l=o.y,a=o.size,r=o.vx>0?1:-1;e.save(),e.translate(s,l),r===-1&&e.scale(-1,1);const h=o.time*.05%(Math.PI*2),t=Math.sin(h+o.legPhase)*(Math.PI/6),f=Math.sin(h+Math.PI+o.legPhase)*(Math.PI/8);e.strokeStyle="#228B22",e.lineWidth=a*.15,e.beginPath(),e.moveTo(a*.2,a*.5),e.lineTo(a*.2+Math.sin(t)*a*.3,a*1.2+Math.cos(t)*a*.1),e.stroke(),e.beginPath(),e.moveTo(-a*.2,a*.5),e.lineTo(-a*.2+Math.sin(t+Math.PI)*a*.3,a*1.2+Math.cos(t+Math.PI)*a*.1),e.stroke(),e.fillStyle="#000000",e.fillRect(a*.2+Math.sin(t)*a*.3-a*.15,a*1.15+Math.cos(t)*a*.1,a*.3,a*.2),e.fillRect(-a*.2+Math.sin(t+Math.PI)*a*.3-a*.15,a*1.15+Math.cos(t+Math.PI)*a*.1,a*.3,a*.2),e.fillStyle="#FFD700",e.fillRect(a*.2+Math.sin(t)*a*.3-a*.1,a*1.2+Math.cos(t)*a*.1,a*.2,a*.1),e.fillRect(-a*.2+Math.sin(t+Math.PI)*a*.3-a*.1,a*1.2+Math.cos(t+Math.PI)*a*.1,a*.2,a*.1),e.fillStyle="#228B22",e.fillRect(-a*.5,0,a,a*.6),e.fillStyle="#000000",e.fillRect(-a*.5,a*.35,a,a*.1),e.fillStyle="#FFD700",e.fillRect(-a*.15,a*.35,a*.3,a*.1),e.fillStyle="#228B22",e.save(),e.translate(a*.4,a*.2),e.rotate(f),e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(-a*.4-a*.15,a*.2),e.rotate(f+Math.PI),e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(0,-a*.3,a*.4,0,Math.PI*2),e.fill(),e.fillStyle="#ff6600",e.beginPath(),e.moveTo(-a*.3,-a*.1),e.quadraticCurveTo(-a*.4,a*.2,0,a*.3),e.quadraticCurveTo(a*.4,a*.2,a*.3,-a*.1),e.closePath(),e.fill(),e.fillStyle="#228B22",e.fillRect(-a*.5,-a*.8,a,a*.1),e.fillRect(-a*.35,-a*1.4,a*.7,a*.6),e.fillStyle="#FFD700",e.fillRect(-a*.15,-a*.85,a*.3,a*.15),e.fillStyle="#000000",e.beginPath(),e.arc(-a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.restore()},drawBanshee(e,o,n){const s=o.x,l=o.y+Math.sin(n*o.waveFrequency+o.waveOffset)*o.waveAmplitude,a=o.size,r=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),r===-1&&e.scale(-1,1);const h=e.createRadialGradient(0,-a*.5,0,0,-a*.5,a*3);h.addColorStop(0,"rgba(180, 255, 180, 0.4)"),h.addColorStop(.3,"rgba(150, 255, 150, 0.2)"),h.addColorStop(.6,"rgba(120, 255, 120, 0.1)"),h.addColorStop(1,"rgba(100, 255, 100, 0)"),e.fillStyle=h,e.fillRect(-a*3,-a*3,a*6,a*6);const t=Math.sin(n*.008+o.wailPhase)*a*.25;e.fillStyle="rgba(200, 240, 200, 0.3)",e.beginPath(),e.moveTo(-a*.8,-a*1.2),e.bezierCurveTo(-a*1.2+t*2,-a*.4,-a*1+t*1.5,a*.6,-a*.6+t,a*1.8),e.bezierCurveTo(-a*.3,a*1.5,a*.3,a*1.5,a*.6-t,a*1.8),e.bezierCurveTo(a*1-t*1.5,a*.6,a*1.2-t*2,-a*.4,a*.8,-a*1.2),e.closePath(),e.fill(),e.fillStyle="rgba(230, 255, 230, 0.85)",e.strokeStyle="rgba(180, 255, 180, 0.6)",e.lineWidth=a*.04,e.beginPath(),e.moveTo(-a*.5,-a*1);for(let i=0;i<=12;i++){const d=i/12,M=Math.sin(n*.012+d*Math.PI*3+o.wailPhase)*a*.3,b=(d-.5)*a*1.8+M,S=-a*1+d*a*2.2;i===0?e.moveTo(b,S):e.lineTo(b,S)}e.lineTo(-a*.5,-a*1),e.closePath(),e.fill(),e.stroke(),e.strokeStyle="rgba(180, 255, 180, 0.4)",e.lineWidth=a*.02;for(let i=0;i<8;i++){const d=-a*.7+i*(a*1.4/7),M=Math.sin(n*.015+i*.8)*a*.2;e.beginPath(),e.moveTo(d,a*.4),e.lineTo(d+M,a*1.2+i%2*a*.4),e.stroke()}const f=Math.sin(n*.006)*.15;e.save(),e.rotate(f),e.fillStyle="rgba(240, 255, 240, 0.9)",e.strokeStyle="rgba(180, 230, 180, 0.5)",e.lineWidth=a*.03,e.beginPath(),e.ellipse(0,-a*.8,a*.35,a*.55,0,0,Math.PI*2),e.fill(),e.stroke(),e.fillStyle="rgba(50, 100, 50, 0.6)",e.beginPath(),e.ellipse(-a*.15,-a*.85,a*.12,a*.08,0,0,Math.PI*2),e.ellipse(a*.15,-a*.85,a*.12,a*.08,0,0,Math.PI*2),e.fill();const P=.6+Math.sin(n*.008+o.wailPhase)*.4;e.fillStyle=`rgba(100, 255, 150, ${P})`,e.shadowColor="#64ff96",e.shadowBlur=a*.6,e.beginPath(),e.arc(-a*.15,-a*.85,a*.08,0,Math.PI*2),e.arc(a*.15,-a*.85,a*.08,0,Math.PI*2),e.fill(),e.shadowBlur=0;const y=.2+Math.sin(n*.01+o.wailPhase)*.1;e.fillStyle="rgba(80, 150, 80, 0.7)",e.strokeStyle="rgba(50, 100, 50, 0.8)",e.lineWidth=a*.02,e.beginPath(),e.ellipse(0,-a*.6,a*.15,a*(.2+y),0,0,Math.PI*2),e.fill(),e.stroke(),e.restore(),e.strokeStyle="rgba(220, 255, 220, 0.7)";for(let i=0;i<12;i++){const d=-a*.35+i/11*a*.7,M=Math.sin(n*.01+i*.6+o.wailPhase)*a*.5,b=Math.cos(n*.008+i*.4)*a*.3;e.lineWidth=a*(.04+i%3*.02),e.beginPath(),e.moveTo(d,-a*1.1),e.bezierCurveTo(d+M*.3,-a*.5,d+M*.6+b*.5,a*.2,d+M+b,a*1+i%2*a*.5),e.stroke()}const g=Math.sin(n*.01+o.wailPhase)*a*.3;e.fillStyle="rgba(230, 255, 230, 0.8)",e.strokeStyle="rgba(180, 230, 180, 0.6)",e.lineWidth=a*.02,e.save(),e.translate(-a*.6,-a*.2),e.rotate(-.3+g*.002),e.beginPath(),e.ellipse(0,0,a*.15,a*.25,0,0,Math.PI*2),e.fill(),e.stroke();for(let i=0;i<4;i++){const d=-a*.08+i*a*.055;e.beginPath(),e.moveTo(d,a*.15),e.lineTo(d,a*.35),e.stroke()}e.restore(),e.save(),e.translate(a*.6,-a*.2),e.rotate(.3-g*.002),e.beginPath(),e.ellipse(0,0,a*.15,a*.25,0,0,Math.PI*2),e.fill(),e.stroke();for(let i=0;i<4;i++){const d=-a*.08+i*a*.055;e.beginPath(),e.moveTo(d,a*.15),e.lineTo(d,a*.35),e.stroke()}e.restore(),e.strokeStyle="rgba(180, 255, 180, 0.3)",e.lineWidth=a*.02;for(let i=0;i<6;i++){const d=i/6*Math.PI*2,M=Math.sin(n*.01+i*.8)*a*.6,b=a*(1.5+i%2*.5);e.beginPath(),e.moveTo(0,a*.4),e.bezierCurveTo(Math.cos(d)*a*.8+M*.5,a*1,Math.cos(d)*a*1.5+M,a*1.8,Math.cos(d)*b+M*1.5,a*2.5),e.stroke()}e.restore()},drawMoon(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l);const r=e.createRadialGradient(-a*.2,-a*.2,0,0,0,a);r.addColorStop(0,"#90EE90"),r.addColorStop(.5,"#7FD87F"),r.addColorStop(1,"#5CB85C"),e.fillStyle=r,e.beginPath(),e.arc(0,0,a,0,Math.PI*2),e.fill(),e.fillStyle="rgba(60, 130, 60, 0.3)",e.beginPath(),e.arc(-a*.3,-a*.2,a*.15,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.25,a*.1,a*.2,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.1,-a*.4,a*.12,0,Math.PI*2),e.fill(),e.save(),e.translate(a*.2,a*.35),e.scale(.15,.15),e.fillStyle="rgba(34, 139, 34, 0.4)";for(let f=0;f<3;f++){const P=f/3*Math.PI*2-Math.PI/2;e.save(),e.rotate(P),e.translate(0,-a*.7),e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a*.5,-a*.2,-a*.3,-a*.6,0,-a*.35),e.bezierCurveTo(a*.3,-a*.6,a*.5,-a*.2,0,a*.3),e.closePath(),e.fill(),e.restore()}e.restore();const h=.3+Math.sin(n*.002+o.glowPhase)*.15;e.globalAlpha=h;const t=e.createRadialGradient(0,0,a*.8,0,0,a*1.8);t.addColorStop(0,"rgba(144, 238, 144, 0.8)"),t.addColorStop(.5,"rgba(144, 238, 144, 0.4)"),t.addColorStop(1,"rgba(144, 238, 144, 0)"),e.fillStyle=t,e.beginPath(),e.arc(0,0,a*1.8,0,Math.PI*2),e.fill(),e.restore()},drawStaticLeprechaun(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.translate(s,l);const r=Math.sin(o.time*.005+o.wavePhase)*a*.05,h=Math.sin(o.time*.003+o.wavePhase*.5)*.05;e.translate(0,r),e.rotate(h),e.strokeStyle="#228B22",e.lineWidth=a*.15,e.beginPath(),e.moveTo(-a*.2,a*.5),e.lineTo(-a*.25,a*1.2),e.stroke(),e.beginPath(),e.moveTo(a*.2,a*.5),e.lineTo(a*.25,a*1.2),e.stroke(),e.fillStyle="#000000",e.fillRect(-a*.35,a*1.15,a*.25,a*.15),e.fillRect(a*.1,a*1.15,a*.25,a*.15),e.fillStyle="#FFD700",e.fillRect(-a*.32,a*1.18,a*.15,a*.08),e.fillRect(a*.13,a*1.18,a*.15,a*.08),e.fillStyle="#228B22",e.fillRect(-a*.5,0,a,a*.6),e.fillStyle="#000000",e.fillRect(-a*.5,a*.35,a,a*.1),e.fillStyle="#FFD700",e.fillRect(-a*.15,a*.35,a*.3,a*.1),e.save(),e.translate(-a*.5,a*.2),e.rotate(-.3+Math.sin(o.time*.007+o.wavePhase*1.2)*.1),e.fillStyle="#228B22",e.fillRect(0,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(a*.5,a*.2),e.rotate(.3-Math.sin(o.time*.006+o.wavePhase*.8)*.05),e.fillStyle="#228B22",e.fillRect(-a*.15,0,a*.15,a*.4),e.fillStyle="#FFD7BA",e.beginPath(),e.arc(-a*.075,a*.4,a*.12,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(0,-a*.3),e.rotate(Math.sin(o.time*.004+o.wavePhase*1.5)*.02),e.beginPath(),e.arc(0,0,a*.4,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#ff6600",e.beginPath(),e.moveTo(-a*.3,-a*.1),e.quadraticCurveTo(-a*.4,a*.2,0,a*.3),e.quadraticCurveTo(a*.4,a*.2,a*.3,-a*.1),e.closePath(),e.fill(),e.fillStyle="#228B22",e.fillRect(-a*.5,-a*.8,a,a*.1),e.fillRect(-a*.35,-a*1.4,a*.7,a*.6),e.fillStyle="#FFD700",e.fillRect(-a*.15,-a*.85,a*.3,a*.15),e.fillStyle="#000000",e.beginPath(),e.arc(-a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.12,-a*.35,a*.06,0,Math.PI*2),e.fill(),e.strokeStyle="#000000",e.lineWidth=a*.04,e.beginPath(),e.arc(0,-a*.2,a*.15,0,Math.PI),e.stroke(),e.restore()},drawTwinklingStar(e,o,n){const s=o.x,l=o.y,a=o.size,r=.5+Math.sin(n*o.twinkleSpeed+o.twinklePhase)*.5,h=`rgba(220, 255, 220, ${r})`,t=`rgba(180, 255, 180, ${r*.4})`;e.save(),e.translate(s,l),e.shadowColor=t,e.shadowBlur=a*3*r,e.fillStyle=h,e.beginPath();for(let f=0;f<4;f++){const P=f*Math.PI/2,y=Math.cos(P)*a,g=Math.sin(P)*a,i=P+Math.PI/4,d=Math.cos(i)*(a*.3),M=Math.sin(i)*(a*.3);f===0?e.moveTo(y,g):e.lineTo(y,M),e.lineTo(d,M)}e.closePath(),e.fill(),e.shadowBlur=a*2*r,e.beginPath(),e.arc(0,0,a*.25,0,Math.PI*2),e.fill(),e.restore()}};
@@ -1 +1 @@
1
- export default{name:"valentines",displayName:"Valentine's Day",emoji:"\u{1F495}",intensityConfig:{light:{count:40,speedRange:[.3,.8],sizeRange:[2,4],garlands:1,cupidChance:3e-4},medium:{count:80,speedRange:[.4,1.2],sizeRange:[2,5],garlands:2,cupidChance:5e-4},heavy:{count:150,speedRange:[.5,1.5],sizeRange:[3,6],garlands:3,cupidChance:8e-4}},particles:["heart","rose-petal","sparkle","lips"],decorations:["cupid","love-letter","heart-garland","envelope","butterfly","heart-moon","neon-sign"],colors:{primary:"#ff1493",secondary:"#ff69b4",accent:"#dc143c",light:"#ffb6c1",gold:"#ffd700"},createHeart(e,o,n){const s=Math.random();let l,a,h;const i=["#ff1493","#ff69b4","#dc143c","#ffb6c1","#ff0080"];return s<.33?(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*1.5,a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),h=.8+Math.random()*.2):s<.66?(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),h=.6+Math.random()*.2):(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.8,a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0])*.8,h=.4+Math.random()*.2),{type:"heart",x:Math.random()*e,y:Math.random()*o,size:l,vx:(Math.random()-.5)*.3,vy:(Math.random()-.7)*.2,speed:a*.3,opacity:h,color:i[Math.floor(Math.random()*i.length)],windOffset:Math.random()*Math.PI*2,windSpeed:.005+Math.random()*.01,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.01,pulsePhase:Math.random()*Math.PI*2,pulseSpeed:.002+Math.random()*.003,floatPhase:Math.random()*Math.PI*2,floatSpeed:.001+Math.random()*.002,active:!0,depth:s}},createRosePetal(e,o,n){const s=["#ff1493","#ff69b4","#dc143c","#ff758f","#ffb6c1"];return{type:"rose-petal",x:Math.random()*e,y:-20,size:1.5+Math.random()*2,speed:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0])*.6,opacity:.7+Math.random()*.3,color:s[Math.floor(Math.random()*s.length)],windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.05,flutterPhase:Math.random()*Math.PI*2,active:!0}},createSparkle(e,o,n){return{type:"sparkle",x:Math.random()*e,y:Math.random()*o,size:.5+Math.random()*1.5,opacity:1,life:20+Math.random()*30,maxLife:20+Math.random()*30,color:Math.random()<.5?"#ffd700":"#ffffff",twinklePhase:Math.random()*Math.PI*2,active:!0,static:!0}},createLips(e,o,n){const s=["#dc143c","#ff1493","#c71585","#ff0066"];return{type:"lips",x:Math.random()*e,y:Math.random()*o,size:3+Math.random()*3,vx:(Math.random()-.5)*.4,vy:(Math.random()-.7)*.2,speed:.3+Math.random()*.2,opacity:.8+Math.random()*.2,color:s[Math.floor(Math.random()*s.length)],rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.01,pulsePhase:Math.random()*Math.PI*2,pulseSpeed:.003+Math.random()*.002,floatPhase:Math.random()*Math.PI*2,floatSpeed:.001+Math.random()*.002,kissPhase:Math.random()*Math.PI*2,active:!0}},createHeartGarland(e,o,n={}){const s=8+Math.floor(Math.random()*5),l=[];for(let a=0;a<s;a++)l.push({offset:a/s,size:8+Math.random()*4,color:Math.random()<.5?"#ff1493":"#ff69b4",pulsePhase:Math.random()*Math.PI*2});return{type:"heart-garland",x:0,y:n.y!==void 0?n.y:50+Math.random()*100,width:e,hearts:l,sag:40+Math.random()*30,swayPhase:Math.random()*Math.PI*2,swayAmplitude:10+Math.random()*10,opacity:.8+Math.random()*.2,active:!0,static:!0}},createLoveLetter(e,o,n={}){const s=Math.random()<.5;return{type:"love-letter",x:s?-50:e+50,y:Math.random()*o*.6,baseY:Math.random()*o*.6,vx:s?1+Math.random()*1:-(1+Math.random()*1),size:12+Math.random()*6,opacity:.9+Math.random()*.1,rotation:(Math.random()-.5)*.3,rotationSpeed:(Math.random()-.5)*.005,waveAmplitude:15+Math.random()*15,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,active:!0,static:!1}},createFallingParticle(e,o,n){const s=Math.random();return s<.6?this.createHeart(e,o,n):s<.85?this.createRosePetal(e,o,n):this.createLips(e,o,n)},createInitialDecorations(e,o,n){const s=[],l=n.garlands||2;for(let i=0;i<l;i++)s.push(this.createHeartGarland(e,o,{y:50+i*(o/(l+1))}));const a=4;for(let i=0;i<a;i++)s.push({type:"envelope",x:e/(a+1)*(i+1)+(Math.random()-.5)*30,y:o-25-Math.random()*10,size:15+Math.random()*5,opacity:.85,rotation:(Math.random()-.5)*.3,active:!0,static:!0});const h=n.butterflies||3;for(let i=0;i<h;i++)s.push({type:"butterfly",x:Math.random()*e,y:Math.random()*o*.6+50,baseY:Math.random()*o*.6+50,size:12+Math.random()*6,vx:(Math.random()-.5)*2,vy:0,waveOffset:Math.random()*Math.PI*2,waveFrequency:.003+Math.random()*.002,waveAmplitude:20+Math.random()*15,wingPhase:Math.random()*Math.PI*2,opacity:.9,color:Math.random()<.5?"pink":"purple",active:!0,static:!1});return s.push({type:"heart-moon",x:e*.85,y:o*.15,size:60+Math.random()*20,opacity:.9,glowPhase:Math.random()*Math.PI*2,active:!0,static:!0}),s},spawnSpecialParticle(e,o,n,s){const l=Math.random();if(l<s.cupidChance){if(e.some(h=>h.type==="cupid"))return null;const a=Math.random()<.5;return{type:"cupid",x:a?-100:o+100,y:Math.random()*n*.4+50,baseY:Math.random()*n*.4+50,vx:a?2+Math.random()*1.5:-(2+Math.random()*1.5),size:15+Math.random()*8,opacity:1,waveAmplitude:20+Math.random()*20,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wingPhase:Math.random()*Math.PI*2,active:!0,static:!1}}return l<.001?this.createLoveLetter(o,n):l<.0015?e.some(a=>a.type==="neon-sign"&&a.active)?null:{type:"neon-sign",x:o/2,y:n*.3,size:40+Math.random()*20,opacity:0,targetOpacity:1,phase:"fade-in",phaseTime:0,fadeInDuration:1500,stableDuration:5e3,fadeOutDuration:1e3,crackleIntensity:1,flickerPhase:Math.random()*Math.PI*2,glowPhase:Math.random()*Math.PI*2,tubeFlickers:[],active:!0,static:!1}:l<.02?this.createSparkle(o,n,s):null},drawHeart(e,o,n){const s=o.x,l=o.y,a=o.size,h=1+Math.sin(n*o.pulseSpeed+o.pulsePhase)*.15;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.scale(h,h),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*.8,e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a,-a*.3,-a*.6,-a,0,-a*.4),e.bezierCurveTo(a*.6,-a,a,-a*.3,0,a*.3),e.closePath(),e.fill(),e.shadowBlur=0,e.fillStyle="rgba(255, 255, 255, 0.3)",e.beginPath(),e.arc(-a*.25,-a*.5,a*.15,0,Math.PI*2),e.fill(),e.restore()},drawRosePetal(e,o,n){const s=o.x,l=o.y,a=o.size,h=Math.sin(n*.01+o.flutterPhase)*.3;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation+h),e.fillStyle=o.color,e.strokeStyle="rgba(139, 0, 0, 0.3)",e.lineWidth=.5,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*2,-a,a*2,a,0,0),e.closePath(),e.fill(),e.beginPath(),e.moveTo(0,0),e.quadraticCurveTo(a,0,a*1.5,0),e.stroke(),e.restore()},drawSparkle(e,o,n){const s=o.x,l=o.y,a=o.size,h=o.life/o.maxLife,i=(Math.sin(n*.01+o.twinklePhase)+1)*.5;e.save(),e.globalAlpha=o.opacity*h*i,e.translate(s,l),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*2,e.beginPath();for(let r=0;r<4;r++){const d=r/4*Math.PI*2-Math.PI/2,f=Math.cos(d)*a*3,t=Math.sin(d)*a*3,M=d+Math.PI/4,u=Math.cos(M)*a*.5,P=Math.sin(M)*a*.5;r===0?e.moveTo(f,t):(e.lineTo(u,P),e.lineTo(f,t))}e.closePath(),e.fill(),e.restore()},drawLips(e,o,n){const s=o.x,l=o.y,a=o.size,h=1+Math.sin(n*o.pulseSpeed+o.pulsePhase)*.1,i=Math.sin(n*.008+o.kissPhase);e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.scale(h,h);const r=e.createRadialGradient(0,0,0,0,0,a*2);r.addColorStop(0,o.color),r.addColorStop(.6,o.color),r.addColorStop(1,"#8b0000"),e.fillStyle=r,e.strokeStyle="#8b0000",e.lineWidth=a*.1,e.beginPath(),e.moveTo(-a,0),e.bezierCurveTo(-a*.8,-a*.8,-a*.3,-a*1,0,-a*.6),e.bezierCurveTo(a*.3,-a*1,a*.8,-a*.8,a,0),e.fill(),e.stroke();const d=i*a*.15;if(e.beginPath(),e.moveTo(-a,0),e.bezierCurveTo(-a*.7,a*(.7+d),-a*.3,a*(1+d),0,a*(.8+d)),e.bezierCurveTo(a*.3,a*(1+d),a*.7,a*(.7+d),a,0),e.fill(),e.stroke(),e.globalAlpha=o.opacity*.5,e.fillStyle="rgba(255, 255, 255, 0.6)",e.beginPath(),e.ellipse(-a*.4,-a*.4,a*.2,a*.15,-.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.4,-a*.4,a*.2,a*.15,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(0,a*.5,a*.3,a*.2,0,0,Math.PI*2),e.fill(),i>.8){const f=a*1.5,t=Math.sin(o.kissPhase)*f,M=-Math.abs(Math.cos(o.kissPhase))*f;e.globalAlpha=o.opacity*(i-.8)*5,e.fillStyle="#ffd700",e.shadowColor="#ffd700",e.shadowBlur=a*.5,e.beginPath(),e.arc(t,M,a*.15,0,Math.PI*2),e.fill();for(let u=0;u<4;u++){const P=u/4*Math.PI*2+n*.01,m=t+Math.cos(P)*a*.4,y=M+Math.sin(P)*a*.4;e.beginPath(),e.moveTo(t,M),e.lineTo(m,y),e.lineWidth=a*.05,e.strokeStyle="#ffffff",e.stroke()}}e.restore()},drawCupid(e,o,n){const s=o.x,l=o.y,a=o.size,h=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),h===-1&&e.scale(-1,1);const i=Math.sin(n*.015+o.wingPhase)*(Math.PI/6);e.fillStyle="#ffffff",e.strokeStyle="#ffb6c1",e.lineWidth=1.5,e.save(),e.translate(-a*.2,-a*.3),e.rotate(-i),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1.2,-a*.8,-a*1.5,-a*.3,-a*1.2,a*.3),e.bezierCurveTo(-a*.8,a*.2,-a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#ffdbac",e.beginPath(),e.ellipse(0,0,a*.4,a*.5,0,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.3,-a*.6,a*.35,a*.4,0,0,Math.PI*2),e.fill(),e.fillStyle="#ffd700",e.beginPath(),e.arc(a*.1,-a*.9,a*.22,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.4,-a*.95,a*.18,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.15,-a*.75,a*.15,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.beginPath(),e.arc(a*.42,-a*.62,a*.05,0,Math.PI*2),e.fill(),e.fillStyle="rgba(255, 105, 180, 0.3)",e.beginPath(),e.arc(a*.25,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.strokeStyle="#ffdbac",e.lineWidth=a*.15,e.lineCap="round",e.beginPath(),e.moveTo(-a*.15,a*.4),e.lineTo(-a*.3,a*.8),e.stroke(),e.beginPath(),e.moveTo(-a*.05,a*.4),e.lineTo(-a*.15,a*.75),e.stroke(),e.strokeStyle="#ffdbac",e.lineWidth=a*.12,e.beginPath(),e.moveTo(a*.1,-a*.2),e.lineTo(a*.6,-a*.3),e.stroke(),e.beginPath(),e.moveTo(a*.05,0),e.lineTo(a*.9,-a*.35),e.stroke(),e.strokeStyle="#8B4513",e.lineWidth=2.5,e.beginPath(),e.moveTo(a*.9,-a*.6),e.quadraticCurveTo(a*1.1,-a*.35,a*.9,-a*.1),e.stroke(),e.strokeStyle="#daa520",e.lineWidth=1.5,e.beginPath(),e.moveTo(a*.9,-a*.6),e.lineTo(a*.6,-a*.35),e.lineTo(a*.9,-a*.1),e.stroke(),e.strokeStyle="#8B4513",e.lineWidth=2,e.beginPath(),e.moveTo(a*.6,-a*.35),e.lineTo(a*1.8,-a*.35),e.stroke(),e.fillStyle="#dc143c",e.beginPath(),e.moveTo(a*1.8,-a*.35),e.lineTo(a*2,-a*.35),e.lineTo(a*1.9,-a*.25),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*1.8,-a*.35),e.lineTo(a*2,-a*.35),e.lineTo(a*1.9,-a*.45),e.closePath(),e.fill(),e.fillStyle="#ff69b4",e.beginPath(),e.moveTo(a*.6,-a*.35),e.lineTo(a*.5,-a*.25),e.lineTo(a*.5,-a*.45),e.closePath(),e.fill(),e.fillStyle="#ffffff",e.strokeStyle="#ffb6c1",e.lineWidth=1.5,e.save(),e.translate(a*.1,-a*.3),e.rotate(i),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1,-a*.6,-a*1.3,-a*.2,-a*1,a*.2),e.bezierCurveTo(-a*.6,a*.15,-a*.2,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.restore()},drawLoveLetter(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.fillStyle="#fff5e6",e.strokeStyle="#daa520",e.lineWidth=1,e.fillRect(-a,-a*.7,a*2,a*1.4),e.strokeRect(-a,-a*.7,a*2,a*1.4),e.fillStyle="#ffe4b3",e.beginPath(),e.moveTo(-a,-a*.7),e.lineTo(0,0),e.lineTo(a,-a*.7),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#dc143c",e.shadowColor="#dc143c",e.shadowBlur=5,e.beginPath(),e.moveTo(0,a*.1),e.bezierCurveTo(-a*.3,-a*.1,-a*.2,-a*.3,0,-a*.15),e.bezierCurveTo(a*.2,-a*.3,a*.3,-a*.1,0,a*.1),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()},drawHeartGarland(e,o,n){const s=o.y,l=o.width,a=o.sag,h=o.hearts;e.save(),e.globalAlpha=o.opacity;const i=Math.sin(n*.001+o.swayPhase)*o.swayAmplitude;e.strokeStyle="#daa520",e.lineWidth=2,e.beginPath(),e.moveTo(0,s),e.quadraticCurveTo(l/2,s+a+i,l,s),e.stroke(),h.forEach(r=>{const d=r.offset*l,f=s+Math.sin(Math.PI*r.offset)*(a+i),t=1+Math.sin(n*.003+r.pulsePhase)*.1;e.save(),e.translate(d,f),e.scale(t,t),e.fillStyle=r.color,e.shadowColor=r.color,e.shadowBlur=r.size*.5,e.beginPath(),e.moveTo(0,r.size*.3),e.bezierCurveTo(-r.size,-r.size*.3,-r.size*.6,-r.size,0,-r.size*.4),e.bezierCurveTo(r.size*.6,-r.size,r.size,-r.size*.3,0,r.size*.3),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()}),e.restore()},drawEnvelope(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.fillStyle="#fff5f5",e.strokeStyle="#ff69b4",e.lineWidth=a*.05,e.fillRect(-a*.7,-a*.5,a*1.4,a),e.strokeRect(-a*.7,-a*.5,a*1.4,a),e.fillStyle="#ffe4e1",e.beginPath(),e.moveTo(-a*.7,-a*.5),e.lineTo(0,a*.1),e.lineTo(a*.7,-a*.5),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#ff1493",e.shadowColor="#ff1493",e.shadowBlur=a*.3,e.beginPath(),e.moveTo(0,a*.25),e.bezierCurveTo(-a*.3,-a*.1,-a*.2,-a*.3,0,-a*.15),e.bezierCurveTo(a*.2,-a*.3,a*.3,-a*.1,0,a*.25),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()},drawButterfly(e,o,n){const s=o.x+Math.sin(n*o.waveFrequency+o.waveOffset)*o.waveAmplitude,l=o.baseY+Math.cos(n*o.waveFrequency*.7+o.waveOffset)*(o.waveAmplitude*.6),a=o.size,h=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),h===-1&&e.scale(-1,1);const i=Math.sin(n*.015+o.wingPhase)*(Math.PI/6),d={pink:{main:"#ffb3d9",accent:"#ff69b4",outline:"#ff1493"},purple:{main:"#dda0dd",accent:"#ba55d3",outline:"#9932cc"}}[o.color];e.save(),e.translate(-a*.15,0),e.rotate(-i),e.fillStyle=d.main,e.strokeStyle=d.outline,e.lineWidth=a*.03,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.8,-a*.6,-a*.5,-a*1.2,0,-a*.5),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.7,a*.4,-a*.4,a*.9,0,a*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle=d.accent,e.beginPath(),e.arc(-a*.4,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(-a*.35,a*.35,a*.1,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(a*.15,0),e.rotate(i),e.fillStyle=d.main,e.strokeStyle=d.outline,e.lineWidth=a*.03,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.8,-a*.6,a*.5,-a*1.2,0,-a*.5),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.7,a*.4,a*.4,a*.9,0,a*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle=d.accent,e.beginPath(),e.arc(a*.4,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.35,a*.35,a*.1,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#4a4a4a",e.fillRect(-a*.05,-a*.5,a*.1,a*.9),e.fillStyle="#2a2a2a",e.beginPath(),e.arc(0,-a*.55,a*.12,0,Math.PI*2),e.fill(),e.strokeStyle="#2a2a2a",e.lineWidth=a*.02,e.beginPath(),e.moveTo(0,-a*.6),e.quadraticCurveTo(-a*.15,-a*.8,-a*.2,-a*.75),e.stroke(),e.beginPath(),e.moveTo(0,-a*.6),e.quadraticCurveTo(a*.15,-a*.8,a*.2,-a*.75),e.stroke(),e.fillStyle=d.outline,e.beginPath(),e.arc(-a*.2,-a*.75,a*.04,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.2,-a*.75,a*.04,0,Math.PI*2),e.fill(),e.restore()},drawHeartMoon(e,o,n){const s=o.x,l=o.y,a=o.size,h=.3+Math.sin(n*.002+o.glowPhase)*.2;e.save(),e.globalAlpha=o.opacity,e.translate(s,l);const i=e.createRadialGradient(0,0,a*.5,0,0,a*2.5);i.addColorStop(0,`rgba(255, 182, 193, ${h*.8})`),i.addColorStop(.4,`rgba(255, 105, 180, ${h*.5})`),i.addColorStop(.7,`rgba(255, 20, 147, ${h*.3})`),i.addColorStop(1,"rgba(255, 20, 147, 0)"),e.fillStyle=i,e.beginPath(),e.arc(0,0,a*2.5,0,Math.PI*2),e.fill();const r=e.createRadialGradient(-a*.3,-a*.3,0,0,0,a);r.addColorStop(0,"#ffcce0"),r.addColorStop(.5,"#ffb3d9"),r.addColorStop(1,"#ff69b4"),e.fillStyle=r,e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a*.5,a*.5,-a,a*.2,-a,-a*.2),e.bezierCurveTo(-a,-a*.6,-a*.5,-a*.7,0,-a*.3),e.bezierCurveTo(a*.5,-a*.7,a,-a*.6,a,-a*.2),e.bezierCurveTo(a,a*.2,a*.5,a*.5,0,a*.3),e.closePath(),e.fill(),e.strokeStyle="#ff1493",e.lineWidth=a*.02,e.stroke(),e.fillStyle="rgba(255, 240, 245, 0.4)",e.beginPath(),e.arc(-a*.4,-a*.1,a*.15,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.3,0,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(-a*.2,a*.15,a*.1,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(255, 255, 255, ${h})`;const d=[{x:-a*.3,y:-a*.4},{x:a*.2,y:-a*.3},{x:0,y:0},{x:-a*.5,y:a*.1},{x:a*.4,y:a*.15}];for(const f of d){e.save(),e.translate(f.x,f.y),e.beginPath();const t=a*.08;e.moveTo(0,-t),e.lineTo(t*.2,-t*.2),e.lineTo(t,0),e.lineTo(t*.2,t*.2),e.lineTo(0,t),e.lineTo(-t*.2,t*.2),e.lineTo(-t,0),e.lineTo(-t*.2,-t*.2),e.closePath(),e.fill(),e.restore()}e.restore()},drawNeonSign(e,o,n){const s=o.x,l=o.y,a=o.size;if(o.phaseTime+=16,o.phase==="fade-in"&&o.phaseTime>=o.fadeInDuration)o.phase="stable",o.phaseTime=0,o.opacity=o.targetOpacity,o.crackleIntensity=0;else if(o.phase==="stable"&&o.phaseTime>=o.stableDuration)o.phase="fade-out",o.phaseTime=0;else if(o.phase==="fade-out"&&o.phaseTime>=o.fadeOutDuration){o.active=!1;return}o.phase==="fade-in"?(o.opacity=o.phaseTime/o.fadeInDuration*o.targetOpacity,o.crackleIntensity=1-o.phaseTime/o.fadeInDuration):o.phase==="fade-out"&&(o.opacity=o.targetOpacity*(1-o.phaseTime/o.fadeOutDuration)),e.save(),e.translate(s,l);const h="#ff1493",i="#ff0066",r="#ffffff",d="Happy Valentine's Day",f=a;e.font=`bold ${f}px 'Arial Black', sans-serif`,e.textAlign="center",e.textBaseline="middle";const t=e.measureText(d).width;let M=0;o.crackleIntensity>0&&(M=(Math.random()-.5)*o.crackleIntensity*5);const u=d.split("");let P=-t/2;for(let m=0;m<u.length;m++){const y=u[m],b=e.measureText(y).width,T=(o.crackleIntensity>0?Math.random()<o.crackleIntensity*.3:!1)?o.opacity*(.3+Math.random()*.7):o.opacity;e.save(),e.translate(P+b/2,M),e.globalAlpha=T;const v=.8+Math.sin(n*.002+o.glowPhase+m*.5)*.2;e.shadowColor=h,e.shadowBlur=a*.8*v,e.fillStyle=h,e.fillText(y,0,0),e.shadowBlur=a*.5*v,e.fillStyle=i,e.fillText(y,0,0),e.shadowBlur=a*.3*v,e.fillStyle=r,e.fillText(y,0,0),e.shadowBlur=0,e.fillStyle=r,e.globalAlpha=T*.9,e.fillText(y,0,0),e.restore(),P+=b}if(o.crackleIntensity>.3){for(let m=0;m<3;m++)if(Math.random()<o.crackleIntensity*.5){const y=(Math.random()-.5)*t,b=(Math.random()-.5)*a*.3,g=2+Math.random()*3;e.save(),e.globalAlpha=o.opacity*Math.random(),e.fillStyle=Math.random()<.5?h:r,e.shadowColor=h,e.shadowBlur=g*4,e.beginPath(),e.arc(y,b,g,0,Math.PI*2),e.fill(),e.restore()}}(o.phase==="stable"||o.phase==="fade-out")&&(e.globalAlpha=o.opacity*.1,e.fillStyle="#ff1493",e.fillRect(-t*.55,-a*.6,t*1.1,a*1.2)),e.restore()}};
1
+ export default{name:"valentines",displayName:"Valentine's Day",emoji:"\u{1F495}",intensityConfig:{light:{count:40,speedRange:[.3,.8],sizeRange:[2,4],garlands:1,cupidChance:3e-4},medium:{count:80,speedRange:[.4,1.2],sizeRange:[2,5],garlands:2,cupidChance:5e-4},heavy:{count:150,speedRange:[.5,1.5],sizeRange:[3,6],garlands:3,cupidChance:8e-4}},particles:["heart","rose-petal","sparkle","lips"],decorations:["cupid","love-letter","heart-garland","envelope","butterfly","heart-moon","neon-sign"],colors:{primary:"#ff1493",secondary:"#ff69b4",accent:"#dc143c",light:"#ffb6c1",gold:"#ffd700"},createHeart(e,o,n){const s=Math.random();let l,a,h;const i=["#ff1493","#ff69b4","#dc143c","#ffb6c1","#ff0080"];return s<.33?(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*1.5,a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),h=.8+Math.random()*.2):s<.66?(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0]),a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0]),h=.6+Math.random()*.2):(l=n.sizeRange[0]+Math.random()*(n.sizeRange[1]-n.sizeRange[0])*.8,a=n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0])*.8,h=.4+Math.random()*.2),{type:"heart",x:Math.random()*e,y:Math.random()*o,size:l,vx:(Math.random()-.5)*.3,vy:(Math.random()-.7)*.2,speed:a*.3,opacity:h,color:i[Math.floor(Math.random()*i.length)],windOffset:Math.random()*Math.PI*2,windSpeed:.005+Math.random()*.01,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.01,pulsePhase:Math.random()*Math.PI*2,pulseSpeed:.002+Math.random()*.003,floatPhase:Math.random()*Math.PI*2,floatSpeed:.001+Math.random()*.002,active:!0,depth:s}},createRosePetal(e,o,n){const s=["#ff1493","#ff69b4","#dc143c","#ff758f","#ffb6c1"];return{type:"rose-petal",x:Math.random()*e,y:-20,size:1.5+Math.random()*2,speed:n.speedRange[0]+Math.random()*(n.speedRange[1]-n.speedRange[0])*.6,opacity:.7+Math.random()*.3,color:s[Math.floor(Math.random()*s.length)],windOffset:Math.random()*Math.PI*2,windSpeed:.02+Math.random()*.03,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.05,flutterPhase:Math.random()*Math.PI*2,active:!0}},createSparkle(e,o,n){return{type:"sparkle",x:Math.random()*e,y:Math.random()*o,size:.5+Math.random()*1.5,opacity:1,life:20+Math.random()*30,maxLife:20+Math.random()*30,color:Math.random()<.5?"#ffd700":"#ffffff",twinklePhase:Math.random()*Math.PI*2,active:!0,static:!0}},createLips(e,o,n){const s=["#dc143c","#ff1493","#c71585","#ff0066"];return{type:"lips",x:Math.random()*e,y:Math.random()*o,size:3+Math.random()*3,vx:(Math.random()-.5)*.4,vy:(Math.random()-.7)*.2,speed:.3+Math.random()*.2,opacity:.8+Math.random()*.2,color:s[Math.floor(Math.random()*s.length)],rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.01,pulsePhase:Math.random()*Math.PI*2,pulseSpeed:.003+Math.random()*.002,floatPhase:Math.random()*Math.PI*2,floatSpeed:.001+Math.random()*.002,kissPhase:Math.random()*Math.PI*2,active:!0}},createHeartGarland(e,o,n={}){const s=8+Math.floor(Math.random()*5),l=[];for(let a=0;a<s;a++)l.push({offset:a/s,size:8+Math.random()*4,color:Math.random()<.5?"#ff1493":"#ff69b4",pulsePhase:Math.random()*Math.PI*2});return{type:"heart-garland",x:0,y:n.y!==void 0?n.y:50+Math.random()*100,width:e,hearts:l,sag:40+Math.random()*30,swayPhase:Math.random()*Math.PI*2,swayAmplitude:10+Math.random()*10,opacity:.8+Math.random()*.2,active:!0,static:!0}},createLoveLetter(e,o,n={}){const s=Math.random()<.5;return{type:"love-letter",x:s?-50:e+50,y:Math.random()*o*.6,baseY:Math.random()*o*.6,vx:s?1+Math.random()*1:-(1+Math.random()*1),size:12+Math.random()*6,opacity:.9+Math.random()*.1,rotation:(Math.random()-.5)*.3,rotationSpeed:(Math.random()-.5)*.005,waveAmplitude:15+Math.random()*15,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,active:!0,static:!1}},createFallingParticle(e,o,n){const s=Math.random();return s<.6?this.createHeart(e,o,n):s<.85?this.createRosePetal(e,o,n):this.createLips(e,o,n)},createInitialDecorations(e,o,n){const s=[],l=n.garlands??2;for(let i=0;i<l;i++)s.push(this.createHeartGarland(e,o,{y:50+i*(o/(l+1))}));const a=4;for(let i=0;i<a;i++)s.push({type:"envelope",x:e/(a+1)*(i+1)+(Math.random()-.5)*30,y:o-25-Math.random()*10,size:15+Math.random()*5,opacity:.85,rotation:(Math.random()-.5)*.3,active:!0,static:!0});const h=n.butterflies??3;for(let i=0;i<h;i++)s.push({type:"butterfly",x:Math.random()*e,y:Math.random()*o*.6+50,baseY:Math.random()*o*.6+50,size:12+Math.random()*6,vx:(Math.random()-.5)*2,vy:0,waveOffset:Math.random()*Math.PI*2,waveFrequency:.003+Math.random()*.002,waveAmplitude:20+Math.random()*15,wingPhase:Math.random()*Math.PI*2,opacity:.9,color:Math.random()<.5?"pink":"purple",active:!0,static:!1});return s.push({type:"heart-moon",x:e*.85,y:o*.15,size:60+Math.random()*20,opacity:.9,glowPhase:Math.random()*Math.PI*2,active:!0,static:!0}),s},spawnSpecialParticle(e,o,n,s){const l=Math.random();if(l<s.cupidChance){if(e.some(h=>h.type==="cupid"))return null;const a=Math.random()<.5;return{type:"cupid",x:a?-100:o+100,y:Math.random()*n*.4+50,baseY:Math.random()*n*.4+50,vx:a?2+Math.random()*1.5:-(2+Math.random()*1.5),size:15+Math.random()*8,opacity:1,waveAmplitude:20+Math.random()*20,waveFrequency:.002+Math.random()*.002,waveOffset:Math.random()*Math.PI*2,time:0,wingPhase:Math.random()*Math.PI*2,active:!0,static:!1}}return l<.001?this.createLoveLetter(o,n):l<.0015?e.some(a=>a.type==="neon-sign"&&a.active)?null:{type:"neon-sign",x:o/2,y:n*.3,size:40+Math.random()*20,opacity:0,targetOpacity:1,phase:"fade-in",phaseTime:0,fadeInDuration:1500,stableDuration:5e3,fadeOutDuration:1e3,crackleIntensity:1,flickerPhase:Math.random()*Math.PI*2,glowPhase:Math.random()*Math.PI*2,tubeFlickers:[],active:!0,static:!1}:l<.02?this.createSparkle(o,n,s):null},drawHeart(e,o,n){const s=o.x,l=o.y,a=o.size,h=1+Math.sin(n*o.pulseSpeed+o.pulsePhase)*.15;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.scale(h,h),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*.8,e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a,-a*.3,-a*.6,-a,0,-a*.4),e.bezierCurveTo(a*.6,-a,a,-a*.3,0,a*.3),e.closePath(),e.fill(),e.shadowBlur=0,e.fillStyle="rgba(255, 255, 255, 0.3)",e.beginPath(),e.arc(-a*.25,-a*.5,a*.15,0,Math.PI*2),e.fill(),e.restore()},drawRosePetal(e,o,n){const s=o.x,l=o.y,a=o.size,h=Math.sin(n*.01+o.flutterPhase)*.3;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation+h),e.fillStyle=o.color,e.strokeStyle="rgba(139, 0, 0, 0.3)",e.lineWidth=.5,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*2,-a,a*2,a,0,0),e.closePath(),e.fill(),e.beginPath(),e.moveTo(0,0),e.quadraticCurveTo(a,0,a*1.5,0),e.stroke(),e.restore()},drawSparkle(e,o,n){const s=o.x,l=o.y,a=o.size,h=o.life/o.maxLife,i=(Math.sin(n*.01+o.twinklePhase)+1)*.5;e.save(),e.globalAlpha=o.opacity*h*i,e.translate(s,l),e.fillStyle=o.color,e.shadowColor=o.color,e.shadowBlur=a*2,e.beginPath();for(let r=0;r<4;r++){const d=r/4*Math.PI*2-Math.PI/2,f=Math.cos(d)*a*3,t=Math.sin(d)*a*3,M=d+Math.PI/4,u=Math.cos(M)*a*.5,P=Math.sin(M)*a*.5;r===0?e.moveTo(f,t):(e.lineTo(u,P),e.lineTo(f,t))}e.closePath(),e.fill(),e.restore()},drawLips(e,o,n){const s=o.x,l=o.y,a=o.size,h=1+Math.sin(n*o.pulseSpeed+o.pulsePhase)*.1,i=Math.sin(n*.008+o.kissPhase);e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.scale(h,h);const r=e.createRadialGradient(0,0,0,0,0,a*2);r.addColorStop(0,o.color),r.addColorStop(.6,o.color),r.addColorStop(1,"#8b0000"),e.fillStyle=r,e.strokeStyle="#8b0000",e.lineWidth=a*.1,e.beginPath(),e.moveTo(-a,0),e.bezierCurveTo(-a*.8,-a*.8,-a*.3,-a*1,0,-a*.6),e.bezierCurveTo(a*.3,-a*1,a*.8,-a*.8,a,0),e.fill(),e.stroke();const d=i*a*.15;if(e.beginPath(),e.moveTo(-a,0),e.bezierCurveTo(-a*.7,a*(.7+d),-a*.3,a*(1+d),0,a*(.8+d)),e.bezierCurveTo(a*.3,a*(1+d),a*.7,a*(.7+d),a,0),e.fill(),e.stroke(),e.globalAlpha=o.opacity*.5,e.fillStyle="rgba(255, 255, 255, 0.6)",e.beginPath(),e.ellipse(-a*.4,-a*.4,a*.2,a*.15,-.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.4,-a*.4,a*.2,a*.15,.3,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(0,a*.5,a*.3,a*.2,0,0,Math.PI*2),e.fill(),i>.8){const f=a*1.5,t=Math.sin(o.kissPhase)*f,M=-Math.abs(Math.cos(o.kissPhase))*f;e.globalAlpha=o.opacity*(i-.8)*5,e.fillStyle="#ffd700",e.shadowColor="#ffd700",e.shadowBlur=a*.5,e.beginPath(),e.arc(t,M,a*.15,0,Math.PI*2),e.fill();for(let u=0;u<4;u++){const P=u/4*Math.PI*2+n*.01,m=t+Math.cos(P)*a*.4,y=M+Math.sin(P)*a*.4;e.beginPath(),e.moveTo(t,M),e.lineTo(m,y),e.lineWidth=a*.05,e.strokeStyle="#ffffff",e.stroke()}}e.restore()},drawCupid(e,o,n){const s=o.x,l=o.y,a=o.size,h=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),h===-1&&e.scale(-1,1);const i=Math.sin(n*.015+o.wingPhase)*(Math.PI/6);e.fillStyle="#ffffff",e.strokeStyle="#ffb6c1",e.lineWidth=1.5,e.save(),e.translate(-a*.2,-a*.3),e.rotate(-i),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1.2,-a*.8,-a*1.5,-a*.3,-a*1.2,a*.3),e.bezierCurveTo(-a*.8,a*.2,-a*.3,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.fillStyle="#ffdbac",e.beginPath(),e.ellipse(0,0,a*.4,a*.5,0,0,Math.PI*2),e.fill(),e.beginPath(),e.ellipse(a*.3,-a*.6,a*.35,a*.4,0,0,Math.PI*2),e.fill(),e.fillStyle="#ffd700",e.beginPath(),e.arc(a*.1,-a*.9,a*.22,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.4,-a*.95,a*.18,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.15,-a*.75,a*.15,0,Math.PI*2),e.fill(),e.fillStyle="#000000",e.beginPath(),e.arc(a*.42,-a*.62,a*.05,0,Math.PI*2),e.fill(),e.fillStyle="rgba(255, 105, 180, 0.3)",e.beginPath(),e.arc(a*.25,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.strokeStyle="#ffdbac",e.lineWidth=a*.15,e.lineCap="round",e.beginPath(),e.moveTo(-a*.15,a*.4),e.lineTo(-a*.3,a*.8),e.stroke(),e.beginPath(),e.moveTo(-a*.05,a*.4),e.lineTo(-a*.15,a*.75),e.stroke(),e.strokeStyle="#ffdbac",e.lineWidth=a*.12,e.beginPath(),e.moveTo(a*.1,-a*.2),e.lineTo(a*.6,-a*.3),e.stroke(),e.beginPath(),e.moveTo(a*.05,0),e.lineTo(a*.9,-a*.35),e.stroke(),e.strokeStyle="#8B4513",e.lineWidth=2.5,e.beginPath(),e.moveTo(a*.9,-a*.6),e.quadraticCurveTo(a*1.1,-a*.35,a*.9,-a*.1),e.stroke(),e.strokeStyle="#daa520",e.lineWidth=1.5,e.beginPath(),e.moveTo(a*.9,-a*.6),e.lineTo(a*.6,-a*.35),e.lineTo(a*.9,-a*.1),e.stroke(),e.strokeStyle="#8B4513",e.lineWidth=2,e.beginPath(),e.moveTo(a*.6,-a*.35),e.lineTo(a*1.8,-a*.35),e.stroke(),e.fillStyle="#dc143c",e.beginPath(),e.moveTo(a*1.8,-a*.35),e.lineTo(a*2,-a*.35),e.lineTo(a*1.9,-a*.25),e.closePath(),e.fill(),e.beginPath(),e.moveTo(a*1.8,-a*.35),e.lineTo(a*2,-a*.35),e.lineTo(a*1.9,-a*.45),e.closePath(),e.fill(),e.fillStyle="#ff69b4",e.beginPath(),e.moveTo(a*.6,-a*.35),e.lineTo(a*.5,-a*.25),e.lineTo(a*.5,-a*.45),e.closePath(),e.fill(),e.fillStyle="#ffffff",e.strokeStyle="#ffb6c1",e.lineWidth=1.5,e.save(),e.translate(a*.1,-a*.3),e.rotate(i),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*1,-a*.6,-a*1.3,-a*.2,-a*1,a*.2),e.bezierCurveTo(-a*.6,a*.15,-a*.2,0,0,0),e.closePath(),e.fill(),e.stroke(),e.restore(),e.restore()},drawLoveLetter(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.fillStyle="#fff5e6",e.strokeStyle="#daa520",e.lineWidth=1,e.fillRect(-a,-a*.7,a*2,a*1.4),e.strokeRect(-a,-a*.7,a*2,a*1.4),e.fillStyle="#ffe4b3",e.beginPath(),e.moveTo(-a,-a*.7),e.lineTo(0,0),e.lineTo(a,-a*.7),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#dc143c",e.shadowColor="#dc143c",e.shadowBlur=5,e.beginPath(),e.moveTo(0,a*.1),e.bezierCurveTo(-a*.3,-a*.1,-a*.2,-a*.3,0,-a*.15),e.bezierCurveTo(a*.2,-a*.3,a*.3,-a*.1,0,a*.1),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()},drawHeartGarland(e,o,n){const s=o.y,l=o.width,a=o.sag,h=o.hearts;e.save(),e.globalAlpha=o.opacity;const i=Math.sin(n*.001+o.swayPhase)*o.swayAmplitude;e.strokeStyle="#daa520",e.lineWidth=2,e.beginPath(),e.moveTo(0,s),e.quadraticCurveTo(l/2,s+a+i,l,s),e.stroke(),h.forEach(r=>{const d=r.offset*l,f=s+Math.sin(Math.PI*r.offset)*(a+i),t=1+Math.sin(n*.003+r.pulsePhase)*.1;e.save(),e.translate(d,f),e.scale(t,t),e.fillStyle=r.color,e.shadowColor=r.color,e.shadowBlur=r.size*.5,e.beginPath(),e.moveTo(0,r.size*.3),e.bezierCurveTo(-r.size,-r.size*.3,-r.size*.6,-r.size,0,-r.size*.4),e.bezierCurveTo(r.size*.6,-r.size,r.size,-r.size*.3,0,r.size*.3),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()}),e.restore()},drawEnvelope(e,o,n){const s=o.x,l=o.y,a=o.size;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),e.rotate(o.rotation),e.fillStyle="#fff5f5",e.strokeStyle="#ff69b4",e.lineWidth=a*.05,e.fillRect(-a*.7,-a*.5,a*1.4,a),e.strokeRect(-a*.7,-a*.5,a*1.4,a),e.fillStyle="#ffe4e1",e.beginPath(),e.moveTo(-a*.7,-a*.5),e.lineTo(0,a*.1),e.lineTo(a*.7,-a*.5),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#ff1493",e.shadowColor="#ff1493",e.shadowBlur=a*.3,e.beginPath(),e.moveTo(0,a*.25),e.bezierCurveTo(-a*.3,-a*.1,-a*.2,-a*.3,0,-a*.15),e.bezierCurveTo(a*.2,-a*.3,a*.3,-a*.1,0,a*.25),e.closePath(),e.fill(),e.shadowBlur=0,e.restore()},drawButterfly(e,o,n){const s=o.x+Math.sin(n*o.waveFrequency+o.waveOffset)*o.waveAmplitude,l=o.baseY+Math.cos(n*o.waveFrequency*.7+o.waveOffset)*(o.waveAmplitude*.6),a=o.size,h=o.vx>0?1:-1;e.save(),e.globalAlpha=o.opacity,e.translate(s,l),h===-1&&e.scale(-1,1);const i=Math.sin(n*.015+o.wingPhase)*(Math.PI/6),d={pink:{main:"#ffb3d9",accent:"#ff69b4",outline:"#ff1493"},purple:{main:"#dda0dd",accent:"#ba55d3",outline:"#9932cc"}}[o.color];e.save(),e.translate(-a*.15,0),e.rotate(-i),e.fillStyle=d.main,e.strokeStyle=d.outline,e.lineWidth=a*.03,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.8,-a*.6,-a*.5,-a*1.2,0,-a*.5),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(-a*.7,a*.4,-a*.4,a*.9,0,a*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle=d.accent,e.beginPath(),e.arc(-a*.4,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(-a*.35,a*.35,a*.1,0,Math.PI*2),e.fill(),e.restore(),e.save(),e.translate(a*.15,0),e.rotate(i),e.fillStyle=d.main,e.strokeStyle=d.outline,e.lineWidth=a*.03,e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.8,-a*.6,a*.5,-a*1.2,0,-a*.5),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(0,0),e.bezierCurveTo(a*.7,a*.4,a*.4,a*.9,0,a*.4),e.closePath(),e.fill(),e.stroke(),e.fillStyle=d.accent,e.beginPath(),e.arc(a*.4,-a*.5,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.35,a*.35,a*.1,0,Math.PI*2),e.fill(),e.restore(),e.fillStyle="#4a4a4a",e.fillRect(-a*.05,-a*.5,a*.1,a*.9),e.fillStyle="#2a2a2a",e.beginPath(),e.arc(0,-a*.55,a*.12,0,Math.PI*2),e.fill(),e.strokeStyle="#2a2a2a",e.lineWidth=a*.02,e.beginPath(),e.moveTo(0,-a*.6),e.quadraticCurveTo(-a*.15,-a*.8,-a*.2,-a*.75),e.stroke(),e.beginPath(),e.moveTo(0,-a*.6),e.quadraticCurveTo(a*.15,-a*.8,a*.2,-a*.75),e.stroke(),e.fillStyle=d.outline,e.beginPath(),e.arc(-a*.2,-a*.75,a*.04,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.2,-a*.75,a*.04,0,Math.PI*2),e.fill(),e.restore()},drawHeartMoon(e,o,n){const s=o.x,l=o.y,a=o.size,h=.3+Math.sin(n*.002+o.glowPhase)*.2;e.save(),e.globalAlpha=o.opacity,e.translate(s,l);const i=e.createRadialGradient(0,0,a*.5,0,0,a*2.5);i.addColorStop(0,`rgba(255, 182, 193, ${h*.8})`),i.addColorStop(.4,`rgba(255, 105, 180, ${h*.5})`),i.addColorStop(.7,`rgba(255, 20, 147, ${h*.3})`),i.addColorStop(1,"rgba(255, 20, 147, 0)"),e.fillStyle=i,e.beginPath(),e.arc(0,0,a*2.5,0,Math.PI*2),e.fill();const r=e.createRadialGradient(-a*.3,-a*.3,0,0,0,a);r.addColorStop(0,"#ffcce0"),r.addColorStop(.5,"#ffb3d9"),r.addColorStop(1,"#ff69b4"),e.fillStyle=r,e.beginPath(),e.moveTo(0,a*.3),e.bezierCurveTo(-a*.5,a*.5,-a,a*.2,-a,-a*.2),e.bezierCurveTo(-a,-a*.6,-a*.5,-a*.7,0,-a*.3),e.bezierCurveTo(a*.5,-a*.7,a,-a*.6,a,-a*.2),e.bezierCurveTo(a,a*.2,a*.5,a*.5,0,a*.3),e.closePath(),e.fill(),e.strokeStyle="#ff1493",e.lineWidth=a*.02,e.stroke(),e.fillStyle="rgba(255, 240, 245, 0.4)",e.beginPath(),e.arc(-a*.4,-a*.1,a*.15,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(a*.3,0,a*.12,0,Math.PI*2),e.fill(),e.beginPath(),e.arc(-a*.2,a*.15,a*.1,0,Math.PI*2),e.fill(),e.fillStyle=`rgba(255, 255, 255, ${h})`;const d=[{x:-a*.3,y:-a*.4},{x:a*.2,y:-a*.3},{x:0,y:0},{x:-a*.5,y:a*.1},{x:a*.4,y:a*.15}];for(const f of d){e.save(),e.translate(f.x,f.y),e.beginPath();const t=a*.08;e.moveTo(0,-t),e.lineTo(t*.2,-t*.2),e.lineTo(t,0),e.lineTo(t*.2,t*.2),e.lineTo(0,t),e.lineTo(-t*.2,t*.2),e.lineTo(-t,0),e.lineTo(-t*.2,-t*.2),e.closePath(),e.fill(),e.restore()}e.restore()},drawNeonSign(e,o,n){const s=o.x,l=o.y,a=o.size;if(o.phaseTime+=16,o.phase==="fade-in"&&o.phaseTime>=o.fadeInDuration)o.phase="stable",o.phaseTime=0,o.opacity=o.targetOpacity,o.crackleIntensity=0;else if(o.phase==="stable"&&o.phaseTime>=o.stableDuration)o.phase="fade-out",o.phaseTime=0;else if(o.phase==="fade-out"&&o.phaseTime>=o.fadeOutDuration){o.active=!1;return}o.phase==="fade-in"?(o.opacity=o.phaseTime/o.fadeInDuration*o.targetOpacity,o.crackleIntensity=1-o.phaseTime/o.fadeInDuration):o.phase==="fade-out"&&(o.opacity=o.targetOpacity*(1-o.phaseTime/o.fadeOutDuration)),e.save(),e.translate(s,l);const h="#ff1493",i="#ff0066",r="#ffffff",d="Happy Valentine's Day",f=a;e.font=`bold ${f}px 'Arial Black', sans-serif`,e.textAlign="center",e.textBaseline="middle";const t=e.measureText(d).width;let M=0;o.crackleIntensity>0&&(M=(Math.random()-.5)*o.crackleIntensity*5);const u=d.split("");let P=-t/2;for(let m=0;m<u.length;m++){const y=u[m],b=e.measureText(y).width,T=(o.crackleIntensity>0?Math.random()<o.crackleIntensity*.3:!1)?o.opacity*(.3+Math.random()*.7):o.opacity;e.save(),e.translate(P+b/2,M),e.globalAlpha=T;const v=.8+Math.sin(n*.002+o.glowPhase+m*.5)*.2;e.shadowColor=h,e.shadowBlur=a*.8*v,e.fillStyle=h,e.fillText(y,0,0),e.shadowBlur=a*.5*v,e.fillStyle=i,e.fillText(y,0,0),e.shadowBlur=a*.3*v,e.fillStyle=r,e.fillText(y,0,0),e.shadowBlur=0,e.fillStyle=r,e.globalAlpha=T*.9,e.fillText(y,0,0),e.restore(),P+=b}if(o.crackleIntensity>.3){for(let m=0;m<3;m++)if(Math.random()<o.crackleIntensity*.5){const y=(Math.random()-.5)*t,b=(Math.random()-.5)*a*.3,g=2+Math.random()*3;e.save(),e.globalAlpha=o.opacity*Math.random(),e.fillStyle=Math.random()<.5?h:r,e.shadowColor=h,e.shadowBlur=g*4,e.beginPath(),e.arc(y,b,g,0,Math.PI*2),e.fill(),e.restore()}}(o.phase==="stable"||o.phase==="fade-out")&&(e.globalAlpha=o.opacity*.1,e.fillStyle="#ff1493",e.fillRect(-t*.55,-a*.6,t*1.1,a*1.2)),e.restore()}};
@@ -1 +1 @@
1
- (function(){"use strict";fetch("/api/effects/settings").then(function(d){return d.json()}).then(function(d){var w=d.respectMotion!==!1,E=d.defaultDuration||600,q=d.defaultAnimation||"fade",S=d.defaultThreshold!=null?d.defaultThreshold:.1,m=w&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,u=document.querySelector(".page-body");if(!u)return;function r(t,e){return t.getAttribute("data-fx-"+e)}function i(t,e,a){var n=r(t,e);return n!==null?parseFloat(n):a}function y(t,e,a){var n=r(t,e);return n===null?a:n==="true"||n==="1"}function g(t,e,a){var n=new IntersectionObserver(function(o){o[0].isIntersecting&&(n.unobserve(t),a())},{threshold:e});n.observe(t)}u.querySelectorAll(".dm-fx-reveal").forEach(function(t){var e=r(t,"animation")||q,a=i(t,"duration",E),n=i(t,"delay",0),o=i(t,"threshold",S),f=y(t,"once",!0);m||(t.style.opacity="0",t.style.transition="none",e==="slide-up"?t.style.transform="translateY(30px)":e==="slide-down"?t.style.transform="translateY(-30px)":e==="zoom"?t.style.transform="scale(0.85)":e==="flip"&&(t.style.transform="rotateY(90deg)"),requestAnimationFrame(function(){requestAnimationFrame(function(){t.style.transition="opacity "+a+"ms ease "+n+"ms, transform "+a+"ms ease "+n+"ms";var s=new IntersectionObserver(function(c){c.forEach(function(x){x.isIntersecting?(t.style.opacity="1",t.style.transform="",f&&s.unobserve(t)):f||(t.style.opacity="0",e==="slide-up"?t.style.transform="translateY(30px)":e==="slide-down"?t.style.transform="translateY(-30px)":e==="zoom"?t.style.transform="scale(0.85)":e==="flip"?t.style.transform="rotateY(90deg)":t.style.transform="")})},{threshold:o});s.observe(t)})}))}),u.querySelectorAll(".dm-fx-counter").forEach(function(t){var e=i(t,"to",0),a=i(t,"from",0),n=i(t,"duration",2e3),o=r(t,"prefix")||"",f=r(t,"suffix")||"",s=i(t,"decimals",0),c=r(t,"separator")||"";function x(v){var h=v.toFixed(s);if(c){var p=h.split(".");p[0]=p[0].replace(/\B(?=(\d{3})+(?!\d))/g,c),h=p.join(".")}return o+h+f}if(m){t.textContent=x(e);return}g(t,.5,function(){var v=null;requestAnimationFrame(function h(p){v||(v=p);var A=Math.min((p-v)/n,1),z=1-Math.pow(1-A,3);t.textContent=x(a+(e-a)*z),A<1&&requestAnimationFrame(h)})})}),m||u.querySelectorAll(".dm-fx-scramble").forEach(function(t){var e=i(t,"speed",50),a=t.textContent,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&",o=0;g(t,.3,function(){var f=setInterval(function(){for(var s="",c=0;c<a.length;c++)c<o||a[c]===" "?s+=a[c]:s+=n[Math.floor(Math.random()*n.length)];t.textContent=s,o<a.length?o++:clearInterval(f)},e)})}),m||u.querySelectorAll(".dm-fx-shake").forEach(function(t){var e=i(t,"intensity",5),a=i(t,"duration",500),n=r(t,"direction")||"horizontal",o=n==="vertical"?"translateY":"translateX";t.animate([{transform:o+"(0)"},{transform:o+"(-"+e+"px)"},{transform:o+"("+e+"px)"},{transform:o+"(-"+e+"px)"},{transform:o+"("+e+"px)"},{transform:o+"(0)"}],{duration:a,easing:"ease-in-out"})}),u.querySelectorAll(".dm-fx-ripple").forEach(function(t){t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",function(e){var a=r(t,"colour")||"rgba(255,255,255,0.3)",n=i(t,"duration",600),o=t.getBoundingClientRect(),f=Math.max(o.width,o.height)*2,s=document.createElement("span");s.style.cssText="position:absolute;border-radius:50%;pointer-events:none;width:"+f+"px;height:"+f+"px;left:"+(e.clientX-o.left-f/2)+"px;top:"+(e.clientY-o.top-f/2)+"px;background:"+a+";transform:scale(0);opacity:1;transition:transform "+n+"ms ease,opacity "+n+"ms ease;",t.appendChild(s),requestAnimationFrame(function(){s.style.transform="scale(1)",s.style.opacity="0"}),setTimeout(function(){s.remove()},n)})});var l=window.Domma&&window.Domma.effects;l&&(u.querySelectorAll(".dm-fx-breathe").forEach(function(t){if(!m){var e={};r(t,"amplitude")&&(e.amplitude=i(t,"amplitude",6)),r(t,"duration")&&(e.duration=i(t,"duration",3e3)),r(t,"easing")&&(e.easing=r(t,"easing")),r(t,"stagger")&&(e.stagger=i(t,"stagger",0)),l.breathe(t,e)}}),u.querySelectorAll(".dm-fx-pulse").forEach(function(t){if(!m){var e={};r(t,"scale")&&(e.scale=i(t,"scale",1.05)),r(t,"duration")&&(e.duration=i(t,"duration",2e3)),r(t,"easing")&&(e.easing=r(t,"easing")),l.pulse(t,e)}}),u.querySelectorAll(".dm-fx-scribe").forEach(function(t){var e={};r(t,"speed")&&(e.speed=i(t,"speed",50)),r(t,"delete-speed")&&(e.deleteSpeed=i(t,"delete-speed",30)),r(t,"cursor")&&(e.cursor=y(t,"cursor",!0)),r(t,"cursor-char")&&(e.cursorChar=r(t,"cursor-char")),r(t,"cursor-type")&&(e.cursorType=r(t,"cursor-type")),r(t,"mode")&&(e.mode=r(t,"mode")),r(t,"loop")&&(e.loop=y(t,"loop",!1)),r(t,"loop-delay")&&(e.loopDelay=i(t,"loop-delay",1e3)),r(t,"pause-on-hover")&&(e.pauseOnHover=y(t,"pause-on-hover",!1));var a=r(t,"actions");if(a)try{e.actions=JSON.parse(a)}catch{return}else{var n=t.textContent.trim();if(!n)return;t.textContent="",e.actions=[{render:n}]}l.scribe(t,e)}),u.querySelectorAll(".dm-fx-twinkle").forEach(function(t){var e={};r(t,"count")&&(e.count=i(t,"count",100)),r(t,"shape")&&(e.shape=r(t,"shape")),r(t,"colour")&&(e.colour=r(t,"colour")),r(t,"min-size")&&(e.minSize=i(t,"min-size",1)),r(t,"max-size")&&(e.maxSize=i(t,"max-size",3)),l.twinkle(t,e)}));var b=u.querySelectorAll(".dm-fx-celebrate");b.length&&!m&&import("/public/js/celebrations/index.js").then(function(t){var e=t.CelebrationsEffect;b.forEach(function(a){var n=a.getAttribute("data-fx-theme")||"auto",o=a.getAttribute("data-fx-intensity")||"medium",f=a.getAttribute("data-fx-z-index")?parseInt(a.getAttribute("data-fx-z-index"),10):999;if(!(n==="auto"&&(n=e.getCurrentTheme(),!n))){var s=new e({theme:n,intensity:o,enabled:!0,zIndex:f});s.init().then(function(){s.start()})}})}).catch(function(){})}).catch(function(){})})();
1
+ (function(){"use strict";fetch("/api/effects/settings").then(function(m){return m.json()}).then(function(m){var w=m.respectMotion!==!1,E=m.defaultDuration||600,q=m.defaultAnimation||"fade",z=m.defaultThreshold!=null?m.defaultThreshold:.1,v=w&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,c=document.querySelector(".page-body");if(!c)return;function r(t,e){return t.getAttribute("data-fx-"+e)}function o(t,e,n){var a=r(t,e);return a!==null?parseFloat(a):n}function x(t,e,n){var a=r(t,e);return a===null?n:a==="true"||a==="1"}function g(t,e,n){var a=new IntersectionObserver(function(i){i[0].isIntersecting&&(a.unobserve(t),n())},{threshold:e});a.observe(t)}c.querySelectorAll(".dm-fx-reveal").forEach(function(t){var e=r(t,"animation")||q,n=o(t,"duration",E),a=o(t,"delay",0),i=o(t,"threshold",z),f=x(t,"once",!0);v||(t.style.opacity="0",t.style.transition="none",e==="slide-up"?t.style.transform="translateY(30px)":e==="slide-down"?t.style.transform="translateY(-30px)":e==="zoom"?t.style.transform="scale(0.85)":e==="flip"&&(t.style.transform="rotateY(90deg)"),requestAnimationFrame(function(){requestAnimationFrame(function(){t.style.transition="opacity "+n+"ms ease "+a+"ms, transform "+n+"ms ease "+a+"ms";var s=new IntersectionObserver(function(u){u.forEach(function(l){l.isIntersecting?(t.style.opacity="1",t.style.transform="",f&&s.unobserve(t)):f||(t.style.opacity="0",e==="slide-up"?t.style.transform="translateY(30px)":e==="slide-down"?t.style.transform="translateY(-30px)":e==="zoom"?t.style.transform="scale(0.85)":e==="flip"?t.style.transform="rotateY(90deg)":t.style.transform="")})},{threshold:i});s.observe(t)})}))}),c.querySelectorAll(".dm-fx-counter").forEach(function(t){var e=o(t,"to",0),n=o(t,"from",0),a=o(t,"duration",2e3),i=r(t,"prefix")||"",f=r(t,"suffix")||"",s=o(t,"decimals",0),u=r(t,"separator")||"";function l(d){var y=d.toFixed(s);if(u){var p=y.split(".");p[0]=p[0].replace(/\B(?=(\d{3})+(?!\d))/g,u),y=p.join(".")}return i+y+f}if(v){t.textContent=l(e);return}g(t,.5,function(){var d=null;requestAnimationFrame(function y(p){d||(d=p);var A=Math.min((p-d)/a,1),S=1-Math.pow(1-A,3);t.textContent=l(n+(e-n)*S),A<1&&requestAnimationFrame(y)})})}),v||c.querySelectorAll(".dm-fx-scramble").forEach(function(t){var e=o(t,"speed",50),n=t.textContent,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&",i=0;g(t,.3,function(){var f=setInterval(function(){for(var s="",u=0;u<n.length;u++)u<i||n[u]===" "?s+=n[u]:s+=a[Math.floor(Math.random()*a.length)];t.textContent=s,i<n.length?i++:clearInterval(f)},e)})}),v||c.querySelectorAll(".dm-fx-shake").forEach(function(t){var e=o(t,"intensity",5),n=o(t,"duration",500),a=r(t,"direction")||"horizontal",i=a==="vertical"?"translateY":"translateX";t.animate([{transform:i+"(0)"},{transform:i+"(-"+e+"px)"},{transform:i+"("+e+"px)"},{transform:i+"(-"+e+"px)"},{transform:i+"("+e+"px)"},{transform:i+"(0)"}],{duration:n,easing:"ease-in-out"})}),c.querySelectorAll(".dm-fx-ripple").forEach(function(t){t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",function(e){var n=r(t,"colour")||"rgba(255,255,255,0.3)",a=o(t,"duration",600),i=t.getBoundingClientRect(),f=Math.max(i.width,i.height)*2,s=document.createElement("span");s.style.cssText="position:absolute;border-radius:50%;pointer-events:none;width:"+f+"px;height:"+f+"px;left:"+(e.clientX-i.left-f/2)+"px;top:"+(e.clientY-i.top-f/2)+"px;background:"+n+";transform:scale(0);opacity:1;transition:transform "+a+"ms ease,opacity "+a+"ms ease;",t.appendChild(s),requestAnimationFrame(function(){s.style.transform="scale(1)",s.style.opacity="0"}),setTimeout(function(){s.remove()},a)})});var h=window.Domma&&window.Domma.effects;h&&(c.querySelectorAll(".dm-fx-breathe").forEach(function(t){if(!v){var e={};r(t,"amplitude")&&(e.amplitude=o(t,"amplitude",6)),r(t,"duration")&&(e.duration=o(t,"duration",3e3)),r(t,"easing")&&(e.easing=r(t,"easing")),r(t,"stagger")&&(e.stagger=o(t,"stagger",0)),h.breathe(t,e)}}),c.querySelectorAll(".dm-fx-pulse").forEach(function(t){if(!v){var e={};r(t,"scale")&&(e.scale=o(t,"scale",1.05)),r(t,"duration")&&(e.duration=o(t,"duration",2e3)),r(t,"easing")&&(e.easing=r(t,"easing")),h.pulse(t,e)}}),c.querySelectorAll(".dm-fx-scribe").forEach(function(t){var e={};r(t,"speed")&&(e.speed=o(t,"speed",50)),r(t,"delete-speed")&&(e.deleteSpeed=o(t,"delete-speed",30)),r(t,"cursor")&&(e.cursor=x(t,"cursor",!0)),r(t,"cursor-char")&&(e.cursorChar=r(t,"cursor-char")),r(t,"cursor-type")&&(e.cursorType=r(t,"cursor-type")),r(t,"mode")&&(e.mode=r(t,"mode")),r(t,"loop")&&(e.loop=x(t,"loop",!1)),r(t,"loop-delay")&&(e.loopDelay=o(t,"loop-delay",1e3)),r(t,"pause-on-hover")&&(e.pauseOnHover=x(t,"pause-on-hover",!1));var n=r(t,"actions");if(n)try{e.actions=JSON.parse(n)}catch{return}else{var a=t.textContent.trim();if(!a)return;t.textContent="",e.actions=[{render:a}]}h.scribe(t,e)}),c.querySelectorAll(".dm-fx-twinkle").forEach(function(t){var e={};r(t,"count")&&(e.count=o(t,"count",100)),r(t,"shape")&&(e.shape=r(t,"shape")),r(t,"colour")&&(e.colour=r(t,"colour")),r(t,"min-size")&&(e.minSize=o(t,"min-size",1)),r(t,"max-size")&&(e.maxSize=o(t,"max-size",3)),h.twinkle(t,e)}));var b=c.querySelectorAll(".dm-fx-celebrate");b.length&&!v&&import("/public/js/celebrations/index.js").then(function(t){var e=t.CelebrationsEffect;b.forEach(function(n){var a=n.getAttribute("data-fx-theme")||"auto",i=n.getAttribute("data-fx-intensity")||"medium",f=n.getAttribute("data-fx-z-index")?parseInt(n.getAttribute("data-fx-z-index"),10):999;if(!(a==="auto"&&(a=e.getCurrentTheme(),!a))){var s={},u=["data-fx-theme","data-fx-intensity","data-fx-z-index"];Array.from(n.attributes).forEach(function(d){d.name.startsWith("data-fx-")&&!u.includes(d.name)&&(s[d.name.slice(8)]=d.value)});var l=new e({theme:a,intensity:i,enabled:!0,zIndex:f,overrides:s});l.init().then(function(){l.start()})}})}).catch(function(){})}).catch(function(){})})();
package/public/js/site.js CHANGED
@@ -1 +1 @@
1
- $(()=>{const y=window.__CMS_NAV__||{},r=window.__CMS_SITE__||{};if(r.autoTheme?.enabled){let e=function(n){const u=(n||"07:00").split(":");return+u[0]*60+(+u[1]||0)},o=function(){const n=new Date,u=n.getHours()*60+n.getMinutes();return u>=e(t.dayStart)&&u<e(t.nightStart)?t.dayTheme:t.nightTheme};var s=e,l=o;const t=r.autoTheme;Domma.theme.set(o()),setInterval(()=>Domma.theme.set(o()),6e4)}if($("#site-navbar").length&&y.brand){const t={...y.brand};if(t.icon){let e=`<span data-icon="${t.icon}" style="width:1.1em;height:1.1em;margin-right:.35em;vertical-align:middle;"></span>`;t.text&&(e+=`<span class="navbar-brand-text">${t.text}</span>`),t.html=e}Domma.elements.navbar("#site-navbar",{brand:t,items:y.items||[],variant:y.variant||"dark",position:y.position||"sticky",collapsible:!0}),Domma.icons.scan("#site-navbar")}const v=$("#site-footer");if(v.length){const t=r.social||{},e={twitter:{label:"X / Twitter",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.742l7.73-8.835L1.254 2.25H8.08l4.259 5.629L18.244 2.25zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>'},facebook:{label:"Facebook",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>'},instagram:{label:"Instagram",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>'},linkedin:{label:"LinkedIn",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>'},github:{label:"GitHub",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>'},youtube:{label:"YouTube",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M23.495 6.205a3.007 3.007 0 00-2.088-2.088c-1.87-.501-9.396-.501-9.396-.501s-7.507-.01-9.396.501A3.007 3.007 0 00.527 6.205a31.247 31.247 0 00-.522 5.805 31.247 31.247 0 00.522 5.783 3.007 3.007 0 002.088 2.088c1.868.502 9.396.502 9.396.502s7.506 0 9.396-.502a3.007 3.007 0 002.088-2.088 31.247 31.247 0 00.5-5.783 31.247 31.247 0 00-.5-5.805zM9.609 15.601V8.408l6.264 3.602z"/></svg>'}};let o='<div class="footer-inner container">';if(r.footer){const h=r.footer;o+=`<p>${h.copyright||""}</p>`,h.links?.length&&(o+='<nav class="footer-links">',h.links.forEach(i=>{o+=`<a href="${i.url}">${i.text}</a>`}),o+="</nav>");const f=Object.keys(e).filter(i=>t[i]);f.length&&(o+='<div class="footer-social">',f.forEach(i=>{const{label:d,svg:a}=e[i];o+=`<a href="${t[i]}" target="_blank" rel="noopener noreferrer" aria-label="${d}" class="footer-social-link">${a}</a>`}),o+="</div>")}const n=S.get("reduced_motion"),u=n!==null?!!n:!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);o+=`<label class="form-switch footer-motion-switch" title="Reduce motion"><input type="checkbox" class="form-switch-input" id="dm-motion-switch"${u?" checked":""}><span class="form-switch-label">Reduce motion</span></label>`,o+="</div>",v.html(o,{safe:!1}),document.getElementById("dm-motion-switch").addEventListener("change",function(){S.set("reduced_motion",this.checked),window.location.reload()})}$("#site-sidebar").length&&Domma.elements.sidebar("#site-sidebar",{autoGenerate:!0,selector:"h2, h3",collapsible:!1,push:!0,contentSelector:".site-content"}),Domma.icons.scan();const c=$(".page-body");if(c.length&&(c.find(".accordion").each(function(){Domma.elements.accordion(this,{allowMultiple:this.dataset.multi==="true"})}),c.find(".tabs").each(function(){Domma.elements.tabs(this)}),c.find(".carousel").each(function(){Domma.elements.carousel(this,{autoplay:this.dataset.autoplay==="true",interval:parseInt(this.dataset.interval,10)||5e3,loop:this.dataset.loop!=="false",animation:this.dataset.animation||"slide"})}),c.find(".dm-countdown").each(function(){const t={autoStart:!0};this.dataset.to&&(t.targetDate=new Date(this.dataset.to)),this.dataset.duration&&(t.duration=parseInt(this.dataset.duration,10)),this.dataset.format&&(t.format=this.dataset.format),Domma.elements.timer(this,t)}),c.find("[data-tooltip]").each(function(){Domma.elements.tooltip(this,{content:$(this).data("tooltip"),position:$(this).data("tooltip-position")||"top"})}),c.find(".dm-progression").each(function(){Domma.elements.progression(this,{layout:this.dataset.layout||"vertical",theme:this.dataset.theme||"minimal",mode:this.dataset.mode||"timeline",statusIcons:!0})}),Domma.effects.reveal(".page-body .hero",{animation:"slide-up",duration:480,threshold:.06,stagger:60,once:!1}),c.find(".card[data-collapsible]").each(function(){const t=this.querySelector(".card-header");t&&t.addEventListener("click",()=>this.classList.toggle("is-collapsed"))}),c.find(".dm-so-trigger").each(function(){this.addEventListener("click",()=>{const t=this.dataset.soTarget,e=document.getElementById(t);if(!e)return;const o=E.slideover({title:e.dataset.soTitle||"",size:e.dataset.soSize||"md",position:e.dataset.soPosition||"right"});e.style.display="",o.setContent(e),o.open()})})),typeof $.setup=="function"){const t=Object.assign({},window.__CMS_DCONFIG__||{});if(document.querySelectorAll(".dm-page-config[data-config]").forEach(e=>{try{const o=atob(e.dataset.config),n=JSON.parse(o);Object.assign(t,n)}catch{}}),Object.keys(t).length>0){const e={};for(const[o,n]of Object.entries(t)){const u=n?.events?.click,{confirm:h,toast:f,alert:i,prompt:d,...a}=u||{};h||f||i||d?($(o).on("click",async function(p){if(p.preventDefault(),h&&!await E.confirm(h))return;let C=null;if(!(d&&(C=await E.prompt(d,{inputPlaceholder:a.promptPlaceholder||"",inputValue:a.promptDefault||""}),C===null))){if(a.target){const w=$(a.target);a.toggleClass&&w.toggleClass(a.toggleClass),a.addClass&&w.addClass(a.addClass),a.removeClass&&w.removeClass(a.removeClass),C!==null&&(a.setText&&w.text(C),a.setVal&&w.val(C),a.setAttr&&w.attr(a.setAttr,C))}a.href&&(window.location.href=a.href),f&&E.toast(f,{type:a.toastType||"success"}),i&&E.alert(i)}}),Object.keys(a).length&&(e[o]={...n,events:{...n.events,click:a}})):e[o]=n}$.setup(e)}}c.length&&wireCTAButtons(c.get(0))});function wireCTAButtons(y){y.querySelectorAll(".dm-cta-trigger").forEach(r=>{r.addEventListener("click",async()=>{const b=r.dataset.action,v=r.dataset.entry,g=r.dataset.confirm;let c=S.get("auth_token");if(!c){E.toast("Please log in to perform this action.",{type:"warning"});return}if(g&&!await E.confirm(g))return;const s=Array.from(r.childNodes).map(t=>t.cloneNode(!0));r.disabled=!0,r.textContent="Running\u2026";const l=t=>fetch(`/api/actions/${b}/public`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({entryId:v})});try{let t=await l(c);if(t.status===401){const o=S.get("auth_refresh_token");if(o){const n=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:o})});if(n.ok){const{token:u}=await n.json();S.set("auth_token",u),c=u,t=await l(c)}}}const e=await t.json().catch(()=>({}));if(!t.ok)throw new Error(e.error||e.message||`Error ${t.status}`);E.toast(e.message||"Action completed.",{type:"success"})}catch(t){E.toast(t.message||"Action failed.",{type:"error"})}finally{r.disabled=!1,r.textContent="",s.forEach(t=>r.appendChild(t)),Domma.icons.scan(r)}})})}(function(){const r=document.querySelectorAll("[data-collection-table]");!r.length||typeof T>"u"||!T.create||r.forEach(b=>{let v;try{v=JSON.parse(atob(b.dataset.payload))}catch{return}const{columns:g,rows:c,search:s,sortable:l,exportable:t,pageSize:e,empty:o,ctaConfig:n}=v;if(!g?.length)return;if(n){const f=g.findIndex(i=>i.key==="_cta");f!==-1&&(g[f]={key:"_cta",title:"",render:(i,d)=>{const a=document.createElement("button");if(a.className=`btn btn-${n.style||"primary"} dm-cta-trigger`,a.dataset.action=n.action||"",a.dataset.entry=d._entryId||"",n.confirm&&(a.dataset.confirm=n.confirm),n.icon){const m=document.createElement("span");m.dataset.icon=n.icon,a.appendChild(m),a.appendChild(document.createTextNode(" "))}return a.appendChild(document.createTextNode(n.label||"Run")),a}})}const u="col-table-"+Math.random().toString(36).slice(2,7),h=document.createElement("div");h.id=u,b.replaceChildren(h),T.create("#"+u,{data:c,columns:g,search:s,sortable:l,exportable:t,pageSize:e,emptyMessage:o}),n&&wireCTAButtons(h)})})(),(function(){const r=document.querySelectorAll("[data-form-inline]");if(!r.length||typeof F>"u")return;function b(s,l){const t={};return(s||[]).forEach(e=>{if(e.type==="page-break"||e.type==="spacer"||!e.name)return;const o=e.type==="checkbox"?"boolean":e.type==="date"?"string":e.type,n={...e.formConfig||{}};n.span==="full"&&l&&(n.span=l),t[e.name]={type:o,label:e.label,required:e.required,options:e.options,formConfig:{...e.placeholder&&{placeholder:e.placeholder},...e.helper&&{hint:e.helper},...n}}}),t}function v(s){const l={};return(s||[]).forEach(t=>{if(!(!t.name||t.type==="page-break"||t.type==="spacer")&&(t.type==="select"||t.type==="multiselect")&&t.required){const e=(t.options||[])[0];e&&(l[t.name]=typeof e=="object"?e.value:e)}}),l}function g(s,l){(l||[]).forEach(t=>{if(t.type!=="date"||!t.name)return;const e=s.querySelector(`[name="${t.name}"]`);e&&e.type!=="date"&&(e.type="date")})}function c(s,l,t){let e=s.querySelector(".cms-form-message");e||(e=document.createElement("p"),e.className="cms-form-message",s.appendChild(e)),e.textContent=l,e.style.cssText=t?"color:var(--danger,#f87171);margin-top:.75rem;":"color:var(--success,#4ade80);margin-top:.75rem;"}r.forEach(s=>{let l;try{l=JSON.parse(atob(s.dataset.formInline))}catch{return}const t=l.fields||[],e=l.settings||{},o=e.columns||1,n=e.layout||"stacked",u=t.some(i=>i.type==="page-break"),h=async i=>{try{const d=s.querySelector('[name="website"]'),a=s.querySelector('[name="_t"]'),m=Object.assign({},i);d!==null&&(m._hp=d.value),a!==null&&(m._t=a.value);const p=await H.post(`/api/forms/submit/${l.slug}`,m);if(p?.redirect){window.location.href=p.redirect;return}for(;s.firstChild;)s.removeChild(s.firstChild);c(s,p?.message||e.successMessage||"Thank you for your submission.",!1)}catch(d){throw c(s,d.message||"Submission failed. Please try again.",!0),d}};function f(i){const d=i.querySelector("form");if(!d)return;const a=document.createElement("div");a.className="fb-form-honeypot",a.setAttribute("aria-hidden","true");const m=document.createElement("input");m.name="website",m.type="text",m.tabIndex=-1,m.autocomplete="url",m.placeholder="https://",a.appendChild(m);const p=document.createElement("input");p.name="_t",p.type="hidden",p.value=Date.now(),a.appendChild(p),d.appendChild(a)}if(u&&F.wizard){const i=[];let d=[],a=l.title||"Step 1",m="";t.forEach(p=>{p.type==="page-break"?(i.push({title:a,description:m,fields:b(d,o)}),d=[],a=p.label||`Step ${i.length+1}`,m=p.description||""):p.type!=="spacer"&&d.push(p)}),i.push({title:a,description:m,fields:b(d,o)}),F.wizard(s,{schema:{steps:i},onSubmit:h}),g(s,t),e.honeypot!==!1&&f(s)}else if(F.render){if(F.render(s,b(t,o),v(t),{submitText:e.submitText||"Submit",layout:n,columns:o,onSubmit:h}),n==="grid"&&e.submitSpan==="full"){const i=s.querySelector(".form-buttons");i&&i.classList.add("col-span-full")}g(s,t),e.honeypot!==!1&&f(s)}})})();
1
+ $(()=>{const b=window.__CMS_NAV__||{},d=window.__CMS_SITE__||{};if(d.autoTheme?.enabled){let e=function(s){const f=(s||"07:00").split(":");return+f[0]*60+(+f[1]||0)},o=function(){const s=new Date,f=s.getHours()*60+s.getMinutes();return f>=e(t.dayStart)&&f<e(t.nightStart)?t.dayTheme:t.nightTheme};var r=e,u=o;const t=d.autoTheme;Domma.theme.set(o()),setInterval(()=>Domma.theme.set(o()),6e4)}if($("#site-navbar").length&&b.brand){const t={...b.brand},e=t.size&&t.size!=="md"?` navbar-brand-${t.size}`:"";if(t.logo||t.icon||t.tagline){let o="";t.logo?o+=`<img src="${t.logo}" class="navbar-brand-logo" alt="${t.text||""}">`:t.icon&&(o+=`<span data-icon="${t.icon}" style="width:1.1em;height:1.1em;margin-right:.35em;vertical-align:middle;"></span>`),t.text&&(o+=`<span class="navbar-brand-text${e}">${t.text}</span>`),t.tagline&&(o+=`<small class="navbar-brand-tagline">${t.tagline}</small>`),t.html=o}else e&&t.text&&(t.html=`<span class="navbar-brand-text${e}">${t.text}</span>`);Domma.elements.navbar("#site-navbar",{brand:t,items:b.items||[],variant:b.variant||"dark",position:b.position||"sticky",collapsible:!0}),Domma.icons.scan("#site-navbar")}const y=$("#site-footer");if(y.length){const t=d.social||{},e={twitter:{label:"X / Twitter",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.742l7.73-8.835L1.254 2.25H8.08l4.259 5.629L18.244 2.25zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>'},facebook:{label:"Facebook",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>'},instagram:{label:"Instagram",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>'},linkedin:{label:"LinkedIn",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>'},github:{label:"GitHub",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>'},youtube:{label:"YouTube",svg:'<svg viewBox="0 0 24 24" fill="currentColor"><path d="M23.495 6.205a3.007 3.007 0 00-2.088-2.088c-1.87-.501-9.396-.501-9.396-.501s-7.507-.01-9.396.501A3.007 3.007 0 00.527 6.205a31.247 31.247 0 00-.522 5.805 31.247 31.247 0 00.522 5.783 3.007 3.007 0 002.088 2.088c1.868.502 9.396.502 9.396.502s7.506 0 9.396-.502a3.007 3.007 0 002.088-2.088 31.247 31.247 0 00.5-5.783 31.247 31.247 0 00-.5-5.805zM9.609 15.601V8.408l6.264 3.602z"/></svg>'}};let o='<div class="footer-inner container">';if(d.footer){const m=d.footer;o+=`<p>${m.copyright||""}</p>`,m.links?.length&&(o+='<nav class="footer-links">',m.links.forEach(n=>{o+=`<a href="${n.url}">${n.text}</a>`}),o+="</nav>");const i=Object.keys(e).filter(n=>t[n]);i.length&&(o+='<div class="footer-social">',i.forEach(n=>{const{label:a,svg:c}=e[n];o+=`<a href="${t[n]}" target="_blank" rel="noopener noreferrer" aria-label="${a}" class="footer-social-link">${c}</a>`}),o+="</div>")}o+="</div>",y.html(o);const s=S.get("reduced_motion"),f=s!==null?!!s:!!(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),h=y.get(0).querySelector(".footer-inner");if(h){const m=document.createElement("input");m.type="checkbox",m.className="form-switch-input",m.id="dm-motion-switch",m.checked=f,m.addEventListener("change",function(){S.set("reduced_motion",this.checked),window.location.reload()});const i=document.createElement("span");i.className="form-switch-label",i.textContent="Reduce motion";const n=document.createElement("label");n.className="form-switch footer-motion-switch",n.title="Reduce motion",n.appendChild(m),n.appendChild(i),h.appendChild(n)}}$("#site-sidebar").length&&Domma.elements.sidebar("#site-sidebar",{autoGenerate:!0,selector:"h2, h3",collapsible:!1,push:!0,contentSelector:".site-content"}),Domma.icons.scan();const p=$(".page-body");if(p.length){p.find(".accordion").each(function(){Domma.elements.accordion(this,{allowMultiple:this.dataset.multi==="true"})}),p.find(".tabs").each(function(){Domma.elements.tabs(this)}),p.find(".carousel").each(function(){Domma.elements.carousel(this,{autoplay:this.dataset.autoplay==="true",interval:parseInt(this.dataset.interval,10)||5e3,loop:this.dataset.loop!=="false",animation:this.dataset.animation||"slide"})}),p.find(".dm-countdown").each(function(){const t={autoStart:!0};this.dataset.to&&(t.targetDate=new Date(this.dataset.to)),this.dataset.duration&&(t.duration=parseInt(this.dataset.duration,10)),this.dataset.format&&(t.format=this.dataset.format),Domma.elements.timer(this,t)}),p.find("[data-tooltip]").each(function(){Domma.elements.tooltip(this,{content:$(this).data("tooltip"),position:$(this).data("tooltip-position")||"top"})}),p.find(".dm-progression").each(function(){Domma.elements.progression(this,{layout:this.dataset.layout||"vertical",theme:this.dataset.theme||"minimal",mode:this.dataset.mode||"timeline",statusIcons:!0})});try{Domma.effects.reveal(".page-body .hero",{animation:"slide-up",duration:480,threshold:.06,stagger:60,once:!1})}catch{}document.querySelectorAll(".page-body .row[data-reveal]").forEach(t=>{const e=t.dataset.revealMode||"stagger",o=t.dataset.revealAnimation||"slide-up",s=parseInt(t.dataset.revealDuration,10)||400,f=parseInt(t.dataset.revealStagger,10)||60,h=parseInt(t.dataset.revealDelay,10)||0,m=t.dataset.revealDirection==="rtl",i=Array.from(t.children),n={"slide-up":"translateY(30px)","slide-down":"translateY(-30px)","slide-left":"translateX(30px)","slide-right":"translateX(-30px)",zoom:"scale(0.85)",flip:"perspective(600px) rotateX(15deg)"};i.forEach((a,c)=>{a.style.opacity="0",a.style.transform=n[o]||"",a.style.transition=`opacity ${s}ms ease, transform ${s}ms ease`;const l=m?i.length-1-c:c;a.style.transitionDelay=e==="stagger"?`${h+l*f}ms`:`${h}ms`}),requestAnimationFrame(()=>requestAnimationFrame(()=>{const a=new IntersectionObserver(c=>{c.forEach(l=>{l.isIntersecting&&(l.target.offsetWidth,l.target.style.opacity="1",l.target.style.transform="none",a.unobserve(l.target))})},{threshold:.1});i.forEach(c=>a.observe(c))}))}),p.find(".card[data-collapsible]").each(function(){const t=this.querySelector(".card-header");t&&t.addEventListener("click",()=>this.classList.toggle("is-collapsed"))}),p.find(".dm-so-trigger").each(function(){this.addEventListener("click",()=>{const t=this.dataset.soTarget,e=document.getElementById(t);if(!e)return;const o=E.slideover({title:e.dataset.soTitle||"",size:e.dataset.soSize||"md",position:e.dataset.soPosition||"right"});e.style.display="",o.setContent(e),o.open()})})}if(typeof $.setup=="function"){const t=Object.assign({},window.__CMS_DCONFIG__||{});if(document.querySelectorAll(".dm-page-config[data-config]").forEach(e=>{try{const o=atob(e.dataset.config),s=JSON.parse(o);Object.assign(t,s)}catch{}}),Object.keys(t).length>0){const e={};for(const[o,s]of Object.entries(t)){const f=s?.events?.click,{confirm:h,toast:m,alert:i,prompt:n,...a}=f||{};h||m||i||n?($(o).on("click",async function(l){if(l.preventDefault(),h&&!await E.confirm(h))return;let w=null;if(!(n&&(w=await E.prompt(n,{inputPlaceholder:a.promptPlaceholder||"",inputValue:a.promptDefault||""}),w===null))){if(a.target){const C=$(a.target);a.toggleClass&&C.toggleClass(a.toggleClass),a.addClass&&C.addClass(a.addClass),a.removeClass&&C.removeClass(a.removeClass),w!==null&&(a.setText&&C.text(w),a.setVal&&C.val(w),a.setAttr&&C.attr(a.setAttr,w))}a.href&&(window.location.href=a.href),m&&E.toast(m,{type:a.toastType||"success"}),i&&E.alert(i)}}),Object.keys(a).length&&(e[o]={...s,events:{...s.events,click:a}})):e[o]=s}$.setup(e)}}p.length&&wireCTAButtons(p.get(0))});function wireCTAButtons(b){b.querySelectorAll(".dm-cta-trigger").forEach(d=>{d.addEventListener("click",async()=>{const v=d.dataset.action,y=d.dataset.entry,g=d.dataset.confirm;let p=S.get("auth_token");if(!p){E.toast("Please log in to perform this action.",{type:"warning"});return}if(g&&!await E.confirm(g))return;const r=Array.from(d.childNodes).map(t=>t.cloneNode(!0));d.disabled=!0,d.textContent="Running\u2026";const u=t=>fetch(`/api/actions/${v}/public`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify({entryId:y})});try{let t=await u(p);if(t.status===401){const o=S.get("auth_refresh_token");if(o){const s=await fetch("/api/auth/refresh",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:o})});if(s.ok){const{token:f}=await s.json();S.set("auth_token",f),p=f,t=await u(p)}}}const e=await t.json().catch(()=>({}));if(!t.ok)throw new Error(e.error||e.message||`Error ${t.status}`);E.toast(e.message||"Action completed.",{type:"success"})}catch(t){E.toast(t.message||"Action failed.",{type:"error"})}finally{d.disabled=!1,d.textContent="",r.forEach(t=>d.appendChild(t)),Domma.icons.scan(d)}})})}(function(){const d=document.querySelectorAll("[data-collection-table]");!d.length||typeof T>"u"||!T.create||d.forEach(v=>{let y;try{y=JSON.parse(atob(v.dataset.payload))}catch{return}const{columns:g,rows:p,search:r,sortable:u,exportable:t,pageSize:e,empty:o,ctaConfig:s}=y;if(!g?.length)return;if(s){const m=g.findIndex(i=>i.key==="_cta");m!==-1&&(g[m]={key:"_cta",title:"",render:(i,n)=>{const a=document.createElement("button");if(a.className=`btn btn-${s.style||"primary"} dm-cta-trigger`,a.dataset.action=s.action||"",a.dataset.entry=n._entryId||"",s.confirm&&(a.dataset.confirm=s.confirm),s.icon){const c=document.createElement("span");c.dataset.icon=s.icon,a.appendChild(c),a.appendChild(document.createTextNode(" "))}return a.appendChild(document.createTextNode(s.label||"Run")),a}})}const f="col-table-"+Math.random().toString(36).slice(2,7),h=document.createElement("div");h.id=f,v.replaceChildren(h),T.create("#"+f,{data:p,columns:g,search:r,sortable:u,exportable:t,pageSize:e,emptyMessage:o}),s&&wireCTAButtons(h)})})(),(function(){const d=document.querySelectorAll("[data-form-inline]");if(!d.length||typeof F>"u")return;function v(r,u){const t={};return(r||[]).forEach(e=>{if(e.type==="page-break"||e.type==="spacer"||!e.name)return;const o=e.type==="checkbox"?"boolean":e.type==="date"?"string":e.type,s={...e.formConfig||{}};s.span==="full"&&u&&(s.span=u),t[e.name]={type:o,label:e.label,required:e.required,options:e.options,formConfig:{...e.placeholder&&{placeholder:e.placeholder},...e.helper&&{hint:e.helper},...s}}}),t}function y(r){const u={};return(r||[]).forEach(t=>{if(!(!t.name||t.type==="page-break"||t.type==="spacer")&&(t.type==="select"||t.type==="multiselect")&&t.required){const e=(t.options||[])[0];e&&(u[t.name]=typeof e=="object"?e.value:e)}}),u}function g(r,u){(u||[]).forEach(t=>{if(t.type!=="date"||!t.name)return;const e=r.querySelector(`[name="${t.name}"]`);e&&e.type!=="date"&&(e.type="date")})}function p(r,u,t){let e=r.querySelector(".cms-form-message");e||(e=document.createElement("p"),e.className="cms-form-message",r.appendChild(e)),e.textContent=u,e.style.cssText=t?"color:var(--danger,#f87171);margin-top:.75rem;":"color:var(--success,#4ade80);margin-top:.75rem;"}d.forEach(r=>{let u;try{u=JSON.parse(atob(r.dataset.formInline))}catch{return}const t=u.fields||[],e=u.settings||{},o=e.columns||1,s=e.layout||"stacked",f=t.some(i=>i.type==="page-break"),h=async i=>{try{const n=r.querySelector('[name="website"]'),a=r.querySelector('[name="_t"]'),c=Object.assign({},i);n!==null&&(c._hp=n.value),a!==null&&(c._t=a.value);const l=await H.post(`/api/forms/submit/${u.slug}`,c);if(l?.redirect){window.location.href=l.redirect;return}for(;r.firstChild;)r.removeChild(r.firstChild);p(r,l?.message||e.successMessage||"Thank you for your submission.",!1)}catch(n){throw p(r,n.message||"Submission failed. Please try again.",!0),n}};function m(i){const n=i.querySelector("form");if(!n)return;const a=document.createElement("div");a.className="fb-form-honeypot",a.setAttribute("aria-hidden","true");const c=document.createElement("input");c.name="website",c.type="text",c.tabIndex=-1,c.autocomplete="url",c.placeholder="https://",a.appendChild(c);const l=document.createElement("input");l.name="_t",l.type="hidden",l.value=Date.now(),a.appendChild(l),n.appendChild(a)}if(f&&F.wizard){const i=[];let n=[],a=u.title||"Step 1",c="";t.forEach(l=>{l.type==="page-break"?(i.push({title:a,description:c,fields:v(n,o)}),n=[],a=l.label||`Step ${i.length+1}`,c=l.description||""):l.type!=="spacer"&&n.push(l)}),i.push({title:a,description:c,fields:v(n,o)}),F.wizard(r,{schema:{steps:i},onSubmit:h}),g(r,t),e.honeypot!==!1&&m(r)}else if(F.render){if(F.render(r,v(t,o),y(t),{submitText:e.submitText||"Submit",layout:s,columns:o,onSubmit:h}),s==="grid"&&e.submitSpan==="full"){const i=r.querySelector(".form-buttons");i&&i.classList.add("col-span-full")}g(r,t),e.honeypot!==!1&&m(r)}})})();
@@ -38,13 +38,32 @@ export async function settingsRoutes(fastify) {
38
38
  'title', 'tagline', 'description', 'logo', 'favicon',
39
39
  'theme', 'adminTheme', 'fontFamily', 'fontSize',
40
40
  'smtp', 'footer', 'analytics', 'social', 'locale',
41
- 'layoutOptions', 'seo', 'backToTop', 'cookieConsent', 'breadcrumbs', 'autoTheme'
41
+ 'layoutOptions', 'seo', 'backToTop', 'cookieConsent', 'breadcrumbs', 'autoTheme',
42
+ 'adminBrand'
42
43
  ]);
43
44
  const unknownKeys = Object.keys(data).filter(k => !ALLOWED_KEYS.has(k));
44
45
  if (unknownKeys.length > 0) {
45
46
  return reply.status(400).send({ error: `Unknown settings keys: ${unknownKeys.join(', ')}` });
46
47
  }
47
- saveConfig('site', data);
48
+ // Merge incoming data with existing config so partial updates (e.g. just adminBrand)
49
+ // don't wipe unrelated keys. Nested objects get a shallow merge so sub-fields are
50
+ // preserved even when only some sub-fields are sent.
51
+ const existing = getConfig('site');
52
+ const merged = {...existing};
53
+ for (const [k, v] of Object.entries(data)) {
54
+ const isPlainObject = v !== null && typeof v === 'object' && !Array.isArray(v);
55
+ const existingIsPlainObject = existing[k] !== null && typeof existing[k] === 'object' && !Array.isArray(existing[k]);
56
+ if (isPlainObject && existingIsPlainObject) {
57
+ merged[k] = {...existing[k], ...v};
58
+ } else {
59
+ merged[k] = v;
60
+ }
61
+ }
62
+ // Never erase smtp.pass with the empty string that the GET endpoint injects for safety
63
+ if (merged.smtp && merged.smtp.pass === '' && existing.smtp?.pass) {
64
+ merged.smtp = {...merged.smtp, pass: existing.smtp.pass};
65
+ }
66
+ saveConfig('site', merged);
48
67
  return { success: true };
49
68
  });
50
69
 
package/server/server.js CHANGED
@@ -88,12 +88,11 @@ await app.register(cors, serverConfig.cors);
88
88
  await app.register(multipart, { limits: { fileSize: serverConfig.uploads.maxFileSize } });
89
89
  await app.register(rateLimit, {
90
90
  global: true, // apply default limit to all routes; stricter per-route limits override this
91
- max: 100,
91
+ max: 500,
92
92
  timeWindow: '1 minute',
93
- // When running behind domma-cms-manager, all traffic arrives from 127.0.0.1.
94
- // Exempt loopback so the proxy and health checks are never rate-limited;
95
- // external rate limiting is the manager's responsibility.
96
- allowList: process.env.TRUST_PROXY ? ['127.0.0.1', '::1', '::ffff:127.0.0.1'] : [],
93
+ // Loopback is always exempt local admin use should never be rate-limited.
94
+ // When behind a reverse proxy (TRUST_PROXY), the proxy's loopback is also exempt.
95
+ allowList: ['127.0.0.1', '::1', '::ffff:127.0.0.1'],
97
96
  });
98
97
 
99
98
  // ---------------------------------------------------------------------------
@@ -114,11 +113,14 @@ await app.register(staticPlugin, {
114
113
  decorateReply: false
115
114
  });
116
115
 
117
- // Serve admin panel assets
116
+ // Serve admin panel assets — no-cache so JS/CSS changes are always picked up
118
117
  await app.register(staticPlugin, {
119
118
  root: path.join(ROOT, 'admin'),
120
119
  prefix: '/admin/',
121
- decorateReply: false
120
+ decorateReply: false,
121
+ setHeaders: (res) => {
122
+ res.setHeader('Cache-Control', 'no-cache');
123
+ }
122
124
  });
123
125
 
124
126
  // Ensure required directories exist