UNPKG

3.34 kBJavaScriptView Raw
1/*! For license information please see 112.min.js.LICENSE.txt */
2(this.webpackChunk_tsparticles_fireworks=this.webpackChunk_tsparticles_fireworks||[]).push([[112],{2112:(t,i,e)=>{e.d(i,{EmittersPlugin:()=>n});var o=e(5540),s=e(6491);class n{constructor(t){this._engine=t,this.id="emitters"}async getPlugin(t){const{Emitters:i}=await e.e(823).then(e.bind(e,823));return new i(this._engine,t)}loadOptions(t,i){if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;i?.emitters&&(t.emitters=(0,o.wJ)(i.emitters,(t=>{const i=new s.Emitter;return i.load(t),i})));const e=i?.interactivity?.modes?.emitters;if(e)if((0,o.cy)(e))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:e.map((t=>{const i=new s.Emitter;return i.load(t),i}))};else{const i=e;if(void 0!==i.value){const e=1;if((0,o.cy)(i.value))t.interactivity.modes.emitters={random:{count:i.random.count??e,enable:i.random.enable??!1},value:i.value.map((t=>{const i=new s.Emitter;return i.load(t),i}))};else{const o=new s.Emitter;o.load(i.value),t.interactivity.modes.emitters={random:{count:i.random.count??e,enable:i.random.enable??!1},value:o}}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new s.Emitter}).value.load(e)}}}needsPlugin(t){if(!t)return!1;const i=t.emitters;return(0,o.cy)(i)&&!!i.length||void 0!==i||!!t.interactivity?.events?.onClick?.mode&&(0,o.hn)("emitter",t.interactivity.events.onClick.mode)}}},6491:(t,i,e)=>{e.d(i,{Emitter:()=>l});var o=e(5540);class s{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=(0,o.DT)(t.delay)),void 0!==t.duration&&(this.duration=(0,o.DT)(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class n{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=(0,o.DT)(t.quantity)),void 0!==t.delay&&(this.delay=(0,o.DT)(t.delay)))}}class a{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class r{constructor(){this.options={},this.replace=new a,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=(0,o.zw)({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}var d=e(3839);class l{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new s,this.rate=new n,this.shape=new r,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new d.G),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=(0,o.wJ)(t.particles,(t=>(0,o.zw)({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=(0,o.DT)(t.position.x)),void 0!==t.position.y&&(this.position.y=(0,o.DT)(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new o.A9),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}},3839:(t,i,e)=>{e.d(i,{G:()=>o});class o{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}}}]);
\No newline at end of file