{"version":3,"file":"ParticleContainer.mjs","sources":["../../../../src/scene/particle-container/shared/ParticleContainer.ts"],"sourcesContent":["import { Bounds } from '../../container/bounds/Bounds';\nimport { ViewContainer, type ViewContainerOptions } from '../../view/ViewContainer';\nimport { type ParticleBuffer } from './ParticleBuffer';\nimport { particleData } from './particleData';\nimport '../init';\n\nimport type { Instruction } from '../../../rendering/renderers/shared/instructions/Instruction';\nimport type { Shader } from '../../../rendering/renderers/shared/shader/Shader';\nimport type { Texture } from '../../../rendering/renderers/shared/texture/Texture';\nimport type { ContainerChild } from '../../container/Container';\nimport type { DestroyOptions } from '../../container/destroyTypes';\nimport type { IParticle } from './Particle';\nimport type { ParticleRendererProperty } from './particleData';\n\nconst emptyBounds = new Bounds(0, 0, 0, 0);\n\n/**\n * Represents the properties of a particle that can be dynamically updated each frame.\n * These properties control which aspects of particles are recalculated during rendering.\n * Setting a property to true enables per-frame updates, while false only updates when manually triggered.\n * @example\n * ```ts\n * // Create a particle container with dynamic position and rotation\n * const container = new ParticleContainer({\n *     dynamicProperties: {\n *         position: true,  // Update positions each frame\n *         rotation: true,  // Update rotations each frame\n *         vertex: false,   // Static vertices\n *         uvs: false,     // Static texture coordinates\n *         color: false     // Static colors\n *     }\n * });\n *\n * // Create a fully dynamic particle container\n * const dynamicContainer = new ParticleContainer({\n *     dynamicProperties: {\n *         vertex: true,    // Dynamic mesh deformation\n *         position: true,  // Dynamic movement\n *         rotation: true,  // Dynamic spinning\n *         uvs: true,      // Dynamic texture animation\n *         color: true     // Dynamic coloring\n *     }\n * });\n * ```\n * @see {@link ParticleContainer} For the main particle container class\n * @see {@link ParticleContainerOptions} For all container configuration options\n * @category scene\n * @standard\n */\nexport interface ParticleProperties\n{\n    /**\n     * When true, vertex positions are updated each frame.\n     * Useful for mesh deformation effects.\n     * @default false\n     */\n    vertex?: boolean;\n\n    /**\n     * When true, particle positions are updated each frame.\n     * Essential for moving particles.\n     * @default true\n     */\n    position?: boolean;\n\n    /**\n     * When true, rotation values are updated each frame.\n     * Needed for spinning particles.\n     * @default false\n     */\n    rotation?: boolean;\n\n    /**\n     * When true, texture coordinates are updated each frame.\n     * Required for texture animation.\n     * @default false\n     */\n    uvs?: boolean;\n\n    /**\n     * When true, color values are updated each frame.\n     * Enables color transitions and alpha changes.\n     * @default false\n     */\n    color?: boolean;\n}\n\n/**\n * Options for configuring a ParticleContainer. Controls how particles are rendered, updated, and managed.\n * @example\n * ```ts\n * // Create a basic particle container\n * const container = new ParticleContainer({\n *     texture: Texture.from('particle.png'),\n *     particles: [\n *         new Particle(texture),\n *         new Particle(texture)\n *     ],\n *     dynamicProperties: {\n *         position: true,  // Update positions each frame\n *         rotation: true   // Update rotations each frame\n *     }\n * });\n * ```\n * @see {@link ParticleContainer} For the main particle container class\n * @see {@link ParticleProperties} For dynamic property configuration\n * @template T The type of particles in the container. Must implement {@link IParticle}. * @category scene\n * @standard\n * @noInheritDoc\n */\nexport interface ParticleContainerOptions\n<T extends IParticle = IParticle> extends PixiMixins.ParticleContainerOptions, Omit<ViewContainerOptions, 'children'>\n{\n    /**\n     * Specifies which particle properties should update each frame.\n     * Set properties to true for per-frame updates, false for static values.\n     * @default { position: true, rotation: false, vertex: false, uvs: false, color: false }\n     */\n    dynamicProperties?: ParticleProperties & Record<string, boolean>;\n\n    /**\n     * Custom shader for rendering particles. Allows for custom visual effects.\n     * @advanced\n     */\n    shader?: Shader;\n\n    /**\n     * When true, particle positions are rounded to the nearest pixel.\n     * Helps achieve crisp rendering at the cost of smooth motion.\n     * @default false\n     */\n    roundPixels?: boolean;\n\n    /**\n     * The texture used for all particles in this container.\n     * If not provided, uses the texture of the first particle added.\n     */\n    texture?: Texture;\n\n    /** Initial array of particles to add to the container. All particles must share the same base texture. */\n    particles?: T[];\n}\n// eslint-disable-next-line requireExport/require-export-jsdoc, requireMemberAPI/require-member-api-doc\nexport interface ParticleContainer extends PixiMixins.ParticleContainer, ViewContainer<ParticleBuffer> {}\n\n/**\n * The ParticleContainer class is a highly optimized container that can render 1000s or particles at great speed.\n *\n * A ParticleContainer is specialized in that it can only contain and render particles. Particles are\n * lightweight objects that use minimal memory, which helps boost performance.\n *\n * It can render particles EXTREMELY fast!\n *\n * The tradeoff of using a ParticleContainer is that most advanced functionality is unavailable. Particles are simple\n * and cannot have children, filters, masks, etc. They possess only the basic properties: position, scale, rotation,\n * and color.\n *\n * All particles must share the same texture source (using something like a sprite sheet works well here).\n *\n * When creating a ParticleContainer, a developer can specify which of these properties are static and which are dynamic.\n * - Static properties are only updated when you add or remove a child, or when the `update` function is called.\n * - Dynamic properties are updated every frame.\n *\n * It is up to the developer to specify which properties are static and which are dynamic. Generally, the more static\n * properties you have (i.e., those that do not change per frame), the faster the rendering.\n *\n * If the developer modifies the children order or any static properties of the particle, they must call the `update` method.\n *\n * By default, only the `position` property is set to dynamic, which makes rendering very fast!\n *\n * Developers can also provide a custom shader to the particle container, allowing them to render particles in a custom way.\n *\n * To help with performance, the particle containers bounds are not calculated.\n * It's up to the developer to set the boundsArea property.\n *\n * It's extremely easy to use. Below is an example of rendering thousands of sprites at lightning speed.\n *\n * --------- EXPERIMENTAL ---------\n *\n * This is a new API, things may change and it may not work as expected.\n * We want to hear your feedback as we go!\n *\n * --------------------------------\n * @example\n * ```ts\n * import { ParticleContainer, Particle } from 'pixi.js';\n *\n * const container = new ParticleContainer();\n *\n * for (let i = 0; i < 100; ++i)\n * {\n *     let particle = new Particle(texture);\n *     container.addParticle(particle);\n * }\n * ```\n * @template T The type of particles in the container. Must implement {@link IParticle}.\n * @category scene\n * @standard\n */\nexport class ParticleContainer\n<T extends IParticle = IParticle> extends ViewContainer<ParticleBuffer> implements Instruction\n{\n    /**\n     * Defines the default options for creating a ParticleContainer.\n     * @example\n     * ```ts\n     * // Change defaults globally\n     * ParticleContainer.defaultOptions = {\n     *     dynamicProperties: {\n     *         position: true,  // Update positions each frame\n     *         rotation: true,  // Update rotations each frame\n     *         vertex: false,   // Static vertices\n     *         uvs: false,      // Static texture coordinates\n     *         color: false     // Static colors\n     *     },\n     *     roundPixels: true // Enable pixel rounding for crisp rendering\n     * };\n     * ```\n     * @property {Record<string, boolean>} dynamicProperties - Specifies which properties are dynamic.\n     * @property {boolean} roundPixels - Indicates if pixels should be rounded.\n     */\n    public static defaultOptions: Pick<ParticleContainerOptions, 'dynamicProperties' | 'roundPixels'> = {\n    /** Specifies which properties are dynamic. */\n        dynamicProperties: {\n            /** Indicates if vertex positions are dynamic. */\n            vertex: false,\n            /** Indicates if particle positions are dynamic. */\n            position: true,\n            /** Indicates if particle rotations are dynamic. */\n            rotation: false,\n            /** Indicates if UV coordinates are dynamic. */\n            uvs: false,\n            /** Indicates if particle colors are dynamic. */\n            color: false,\n        },\n        /** Indicates if pixels should be rounded for rendering. */\n        roundPixels: false\n    };\n\n    /**\n     * The unique identifier for the render pipe of this ParticleContainer.\n     * @internal\n     */\n    public override readonly renderPipeId: string = 'particle';\n\n    /** @internal */\n    public batched = false;\n\n    /**\n     * A record of properties and their corresponding ParticleRendererProperty.\n     * @internal\n     */\n    public _properties: Record<string, ParticleRendererProperty>;\n\n    /**\n     * Indicates if the children of this ParticleContainer have changed and need to be updated.\n     * @internal\n     */\n    public _childrenDirty = false;\n\n    /**\n     * An array of particles that are children of this ParticleContainer.\n     * This array can be modified directly for performance, but the 'update' method\n     * must be called afterwards to ensure the container is rendered correctly.\n     * @example\n     * ```ts\n     * const container = new ParticleContainer();\n     *\n     * // Add particles directly to the array\n     * container.particleChildren.push(\n     *     new Particle(texture),\n     *     new Particle(texture)\n     * );\n     * container.update(); // Required after direct modification\n     *\n     * // Modify existing particles\n     * container.particleChildren.forEach(particle => {\n     *     particle.position.x += 10;\n     * });\n     *\n     * // Remove particles\n     * container.particleChildren.length = 0; // Clear all\n     * container.update();\n     * ```\n     * @see {@link ParticleContainer#update} For updating after modifications\n     * @see {@link ParticleContainer#addParticle} For a safer way to add particles\n     * @see {@link ParticleContainer#removeParticle} For a safer way to remove particles\n     */\n    public particleChildren: T[];\n\n    /**\n     * The shader used for rendering particles in this ParticleContainer.\n     * @advanced\n     */\n    public shader: Shader;\n\n    /**\n     * The texture used for rendering particles in this ParticleContainer. All particles\n     * must share the same base texture for optimal performance.\n     *\n     * > [!NOTE]\n     * > If not set, the texture of the first particle added to this container will be used.\n     * @example\n     * ```ts\n     * const container = new ParticleContainer();\n     * // Set texture for all particles\n     * container.texture = Texture.from('particle.png');\n     *\n     * // Create particles using container's texture\n     * for (let i = 0; i < 100; i++) {\n     *     const particle = new Particle(container.texture);\n     *     container.addParticle(particle); // Will use the particles texture if not set\n     * }\n     * ```\n     * @default null\n     * @see {@link ParticleContainerOptions#texture} For setting texture via constructor\n     * @see {@link Particle} For creating particles with textures\n     */\n    public texture: Texture;\n\n    /**\n     * @param options - The options for creating the sprite.\n     */\n    constructor(options: ParticleContainerOptions<T> = {})\n    {\n        options = {\n            ...ParticleContainer.defaultOptions,\n            ...options,\n            dynamicProperties: {\n                ...ParticleContainer.defaultOptions.dynamicProperties,\n                ...options?.dynamicProperties,\n            },\n        };\n\n        // split out\n        const { dynamicProperties, shader, roundPixels, texture, particles, ...rest } = options;\n\n        super({\n            label: 'ParticleContainer',\n            ...rest,\n        });\n\n        this.texture = texture || null;\n        this.shader = shader;\n\n        this._properties = {};\n\n        for (const key in particleData)\n        {\n            const property = particleData[key];\n            const dynamic = dynamicProperties[key];\n\n            this._properties[key] = {\n                ...property,\n                dynamic,\n            };\n        }\n\n        this.allowChildren = true;\n        this.roundPixels = roundPixels ?? false;\n\n        this.particleChildren = particles ?? [];\n    }\n\n    /**\n     * Adds one or more particles to the container. The particles will be rendered using the container's shared texture\n     * and properties. When adding multiple particles, they must all share the same base texture.\n     * @example\n     * ```ts\n     * const container = new ParticleContainer();\n     *\n     * // Add a single particle\n     * const particle = new Particle(Assets.get('particleTexture'));\n     * container.addParticle(particle);\n     *\n     * // Add multiple particles at once\n     * const particles = [\n     *     new Particle(Assets.get('particleTexture')),\n     *     new Particle(Assets.get('particleTexture')),\n     *     new Particle(Assets.get('particleTexture'))\n     * ];\n     *\n     * container.addParticle(...particles);\n     * ```\n     * @param children - The Particle(s) to add to the container\n     * @returns The first particle that was added, for method chaining\n     * @see {@link ParticleContainer#texture} For setting the shared texture\n     * @see {@link ParticleContainer#update} For updating after modifications\n     */\n    public addParticle(...children: T[]): T\n    {\n        for (let i = 0; i < children.length; i++)\n        {\n            this.particleChildren.push(children[i]);\n        }\n\n        this.onViewUpdate();\n\n        return children[0];\n    }\n\n    /**\n     * Removes one or more particles from the container. The particles must already be children\n     * of this container to be removed.\n     * @example\n     * ```ts\n     * // Remove a single particle\n     * container.removeParticle(particle1);\n     *\n     * // Remove multiple particles at once\n     * container.removeParticle(particle2, particle3);\n     * ```\n     * @param children - The Particle(s) to remove from the container\n     * @returns The first particle that was removed, for method chaining\n     * @see {@link ParticleContainer#particleChildren} For accessing all particles\n     * @see {@link ParticleContainer#removeParticles} For removing particles by index\n     * @see {@link ParticleContainer#removeParticleAt} For removing a particle at a specific index\n     */\n    public removeParticle(...children: T[]): T\n    {\n        let didRemove = false;\n\n        for (let i = 0; i < children.length; i++)\n        {\n            const index = this.particleChildren.indexOf(children[i] as T);\n\n            if (index > -1)\n            {\n                this.particleChildren.splice(index, 1);\n                didRemove = true;\n            }\n        }\n\n        if (didRemove) this.onViewUpdate();\n\n        return children[0];\n    }\n\n    /**\n     * Updates the particle container's internal state. Call this method after manually modifying\n     * the particleChildren array or when changing static properties of particles.\n     * @example\n     * ```ts\n     * // Batch modify particles\n     * container.particleChildren.push(...particles);\n     * container.update(); // Required after direct array modification\n     *\n     * // Update static properties\n     * container.particleChildren.forEach(particle => {\n     *     particle.position.set(\n     *         Math.random() * 800,\n     *         Math.random() * 600\n     *     );\n     * });\n     * container.update(); // Required after changing static positions\n     * ```\n     * @see {@link ParticleProperties} For configuring dynamic vs static properties\n     * @see {@link ParticleContainer#particleChildren} For direct array access\n     */\n    public update()\n    {\n        this._childrenDirty = true;\n    }\n\n    protected override onViewUpdate()\n    {\n        this._childrenDirty = true;\n        super.onViewUpdate();\n    }\n\n    /**\n     * Returns a static empty bounds object since ParticleContainer does not calculate bounds automatically\n     * for performance reasons. Use the `boundsArea` property to manually set container bounds.\n     * @example\n     * ```ts\n     * const container = new ParticleContainer({\n     *     texture: Texture.from('particle.png')\n     * });\n     *\n     * // Default bounds are empty\n     * console.log(container.bounds); // Bounds(0, 0, 0, 0)\n     *\n     * // Set manual bounds for the particle area\n     * container.boundsArea = {\n     *     minX: 0,\n     *     minY: 0,\n     *     maxX: 800,\n     *     maxY: 600\n     * };\n     * ```\n     * @readonly\n     * @returns {Bounds} An empty bounds object (0,0,0,0)\n     * @see {@link Container#boundsArea} For manually setting container bounds\n     * @see {@link Bounds} For bounds object structure\n     */\n    public get bounds()\n    {\n        return emptyBounds;\n    }\n\n    /** @private */\n    protected override updateBounds(): void { /* empty */ }\n\n    /**\n     * Destroys this sprite renderable and optionally its texture.\n     * @param options - Options parameter. A boolean will act as if all options\n     *  have been set to that value\n     * @example\n     * particleContainer.destroy();\n     * particleContainer.destroy(true);\n     * particleContainer.destroy({ texture: true, textureSource: true, children: true });\n     */\n    public override destroy(options: DestroyOptions = false)\n    {\n        super.destroy(options);\n\n        const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n        if (destroyTexture)\n        {\n            const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n            const texture = this.texture ?? this.particleChildren[0]?.texture;\n\n            if (texture)\n            {\n                texture.destroy(destroyTextureSource);\n            }\n        }\n\n        this.texture = null;\n        this.shader?.destroy();\n    }\n\n    /**\n     * Removes all particles from this container that are within the begin and end indexes.\n     * @param beginIndex - The beginning position.\n     * @param endIndex - The ending position. Default value is size of the container.\n     * @returns - List of removed particles\n     */\n    public removeParticles(beginIndex?: number, endIndex?: number)\n    {\n        beginIndex ??= 0;\n        endIndex ??= this.particleChildren.length;\n\n        // Remove the correct range\n        const children = this.particleChildren.splice(\n            beginIndex,\n            endIndex - beginIndex\n        );\n\n        this.onViewUpdate();\n\n        return children as T[];\n    }\n\n    /**\n     * Removes a particle from the specified index position.\n     * @param index - The index to get the particle from\n     * @returns The particle that was removed.\n     */\n    public removeParticleAt<U extends T = T>(index: number): U\n    {\n        const child = this.particleChildren.splice(index, 1);\n\n        this.onViewUpdate();\n\n        return child[0] as U;\n    }\n\n    /**\n     * Adds a particle to the container at a specified index. If the index is out of bounds an error will be thrown.\n     * If the particle is already in this container, it will be moved to the specified index.\n     * @param {Container} child - The particle to add.\n     * @param {number} index - The absolute index where the particle will be positioned at the end of the operation.\n     * @returns {Container} The particle that was added.\n     */\n    public addParticleAt<U extends T = T>(child: U, index: number): U\n    {\n        this.particleChildren.splice(index, 0, child);\n\n        this.onViewUpdate();\n\n        return child;\n    }\n\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.addParticle()` instead.\n     * @param {...any} _children\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override addChild<U extends ContainerChild[]>(..._children: U): U[0]\n    {\n        throw new Error(\n            'ParticleContainer.addChild() is not available. Please use ParticleContainer.addParticle()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     * Calling this method will throw an error. Please use `ParticleContainer.removeParticle()` instead.\n     * @param {...any} _children\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override removeChild<U extends ContainerChild[]>(..._children: U): U[0]\n    {\n        throw new Error(\n            'ParticleContainer.removeChild() is not available. Please use ParticleContainer.removeParticle()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.removeParticles()` instead.\n     * @param {number} [_beginIndex]\n     * @param {number} [_endIndex]\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override removeChildren(_beginIndex?: number, _endIndex?: number): ContainerChild[]\n    {\n        throw new Error(\n            'ParticleContainer.removeChildren() is not available. Please use ParticleContainer.removeParticles()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.removeParticleAt()` instead.\n     * @param {number} _index\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override removeChildAt<U extends ContainerChild>(_index: number): U\n    {\n        throw new Error(\n            'ParticleContainer.removeChildAt() is not available. Please use ParticleContainer.removeParticleAt()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.getParticleAt()` instead.\n     * @param {number} _index\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override getChildAt<U extends ContainerChild>(_index: number): U\n    {\n        throw new Error(\n            'ParticleContainer.getChildAt() is not available. Please use ParticleContainer.getParticleAt()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.setParticleIndex()` instead.\n     * @param {ContainerChild} _child\n     * @param {number} _index\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override setChildIndex(_child: ContainerChild, _index: number): void\n    {\n        throw new Error(\n            'ParticleContainer.setChildIndex() is not available. Please use ParticleContainer.setParticleIndex()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.getParticleIndex()` instead.\n     * @param {ContainerChild} _child\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override getChildIndex(_child: ContainerChild): number\n    {\n        throw new Error(\n            'ParticleContainer.getChildIndex() is not available. Please use ParticleContainer.getParticleIndex()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.addParticleAt()` instead.\n     * @param {ContainerChild} _child\n     * @param {number} _index\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override addChildAt<U extends ContainerChild>(_child: U, _index: number): U\n    {\n        throw new Error(\n            'ParticleContainer.addChildAt() is not available. Please use ParticleContainer.addParticleAt()',\n        );\n    }\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error. Please use `ParticleContainer.swapParticles()` instead.\n     * @param {ContainerChild} _child\n     * @param {ContainerChild} _child2\n     * @ignore\n     */\n    public override swapChildren<U extends ContainerChild>(_child: U, _child2: U): void\n    {\n        throw new Error(\n            'ParticleContainer.swapChildren() is not available. Please use ParticleContainer.swapParticles()',\n        );\n    }\n\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error.\n     * @param _child - The child to reparent\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override reparentChild(..._child: ContainerChild[]): any\n    {\n        throw new Error('ParticleContainer.reparentChild() is not available with the particle container');\n    }\n\n    /**\n     * This method is not available in ParticleContainer.\n     *\n     * Calling this method will throw an error.\n     * @param _child - The child to reparent\n     * @param _index - The index to reparent the child to\n     * @throws {Error} Always throws an error as this method is not available.\n     * @ignore\n     */\n    public override reparentChildAt(_child: ContainerChild, _index: number): any\n    {\n        throw new Error('ParticleContainer.reparentChildAt() is not available with the particle container');\n    }\n}\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,cAAc,IAAI,MAAA,CAAO,CAAA,EAAG,CAAA,EAAG,GAAG,CAAC,CAAA;AAyLlC,MAAM,kBAAA,GAAN,MAAM,kBAAA,SAC6B,aAAA,CAC1C;AAAA;AAAA;AAAA;AAAA,EA0HI,WAAA,CAAY,OAAA,GAAuC,EAAC,EACpD;AACI,IAAA,OAAA,GAAU;AAAA,MACN,GAAG,kBAAA,CAAkB,cAAA;AAAA,MACrB,GAAG,OAAA;AAAA,MACH,iBAAA,EAAmB;AAAA,QACf,GAAG,mBAAkB,cAAA,CAAe,iBAAA;AAAA,QACpC,GAAG,OAAA,EAAS;AAAA;AAChB,KACJ;AAGA,IAAA,MAAM,EAAE,mBAAmB,MAAA,EAAQ,WAAA,EAAa,SAAS,SAAA,EAAW,GAAG,MAAK,GAAI,OAAA;AAE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