{"version":3,"sources":["jsdelivr-header.js","/npm/@tsparticles/interaction-external-push@3.0.3/browser/Options/Classes/Push.js","/npm/@tsparticles/interaction-external-push@3.0.3/browser/Pusher.js","/npm/@tsparticles/interaction-external-push@3.0.3/browser/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,sICLO,MAAM,CAAK,CACd,aAAc,CACV,KAAK,QAAU,GACf,KAAK,OAAS,CAAA,EACd,KAAK,SAAW,CACpB,CACA,KAAK,EAAM,CACP,GAAI,CAAC,EACD,OAEA,EAAK,UAAY,SACjB,KAAK,QAAU,EAAK,SAEpB,EAAK,SAAW,SAChB,KAAK,OAAS,EAAK,OAAO,IAAK,GAAM,CAAC,GAErC,KAAK,OAAO,SACb,KAAK,QAAU,IAEnB,MAAM,EAAW,EAAK,SAClB,IAAa,SACb,KAAK,SAAW,EAAc,CAAQ,EAE9C,CACJ,CCvBA,MAAM,EAAW,OACV,MAAM,UAAe,CAAuB,CAC/C,YAAY,EAAW,CACnB,MAAM,CAAS,EACf,KAAK,gBAAmB,GAAS,CAC7B,GAAI,IAAS,EACT,OAEJ,MAAM,EAAY,KAAK,UAAW,EAAU,EAAU,cAAe,EAAc,EAAQ,cAAc,MAAM,KAC/G,GAAI,CAAC,EACD,OAEJ,MAAM,EAAW,EAAc,EAAY,QAAQ,EACnD,GAAI,GAAY,EACZ,OAEJ,MAAM,EAAQ,EAAc,CAAC,OAAW,GAAG,EAAY,MAAM,CAAC,EAAG,EAAe,IAAU,OAAY,EAAU,cAAc,UAAU,OAAO,CAAK,EAAI,OACxJ,EAAU,UAAU,KAAK,EAAU,EAAU,cAAc,MAAO,EAAc,CAAK,CACzF,CACJ,CACA,OAAQ,CACR,CACA,MAAO,CACP,CACA,MAAM,UAAW,CACjB,CACA,WAAY,CACR,MAAO,EACX,CACA,gBAAgB,KAAY,EAAS,CAC5B,EAAQ,OACT,EAAQ,KAAO,IAAI,GAEvB,UAAW,KAAU,EACjB,EAAQ,KAAK,KAAK,GAAQ,IAAI,CAEtC,CACA,OAAQ,CACR,CACJ,CCxCO,eAAe,EAA4B,EAAQ,EAAU,GAAM,CACtE,MAAM,EAAO,cAAc,eAAiB,GAAc,IAAI,EAAO,CAAS,EAAG,CAAO,CAC5F","file":"/npm/@tsparticles/interaction-external-push@3.0.3/browser/index.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1.\n * Original file: /npm/@tsparticles/interaction-external-push@3.0.3/browser/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { setRangeValue } from \"@tsparticles/engine\";\nexport class Push {\n    constructor() {\n        this.default = true;\n        this.groups = [];\n        this.quantity = 4;\n    }\n    load(data) {\n        if (!data) {\n            return;\n        }\n        if (data.default !== undefined) {\n            this.default = data.default;\n        }\n        if (data.groups !== undefined) {\n            this.groups = data.groups.map((t) => t);\n        }\n        if (!this.groups.length) {\n            this.default = true;\n        }\n        const quantity = data.quantity;\n        if (quantity !== undefined) {\n            this.quantity = setRangeValue(quantity);\n        }\n    }\n}\n","import { ExternalInteractorBase, getRangeValue, itemFromArray, } from \"@tsparticles/engine\";\nimport { Push } from \"./Options/Classes/Push.js\";\nconst pushMode = \"push\";\nexport class Pusher extends ExternalInteractorBase {\n    constructor(container) {\n        super(container);\n        this.handleClickMode = (mode) => {\n            if (mode !== pushMode) {\n                return;\n            }\n            const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;\n            if (!pushOptions) {\n                return;\n            }\n            const quantity = getRangeValue(pushOptions.quantity);\n            if (quantity <= 0) {\n                return;\n            }\n            const group = itemFromArray([undefined, ...pushOptions.groups]), groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;\n            container.particles.push(quantity, container.interactivity.mouse, groupOptions, group);\n        };\n    }\n    clear() {\n    }\n    init() {\n    }\n    async interact() {\n    }\n    isEnabled() {\n        return true;\n    }\n    loadModeOptions(options, ...sources) {\n        if (!options.push) {\n            options.push = new Push();\n        }\n        for (const source of sources) {\n            options.push.load(source?.push);\n        }\n    }\n    reset() {\n    }\n}\n","import { Pusher } from \"./Pusher.js\";\nexport async function loadExternalPushInteraction(engine, refresh = true) {\n    await engine.addInteractor(\"externalPush\", (container) => new Pusher(container), refresh);\n}\nexport * from \"./Options/Classes/Push.js\";\nexport * from \"./Options/Interfaces/IPush.js\";\n"]}