{"version":3,"file":"require-shim.mjs","sources":["../src/require-shim.ts"],"sourcesContent":["/** ****************************************************************************\n * Spine Runtimes License Agreement\n * Last updated July 28, 2023. Replaces all prior versions.\n *\n * Copyright (c) 2013-2023, Esoteric Software LLC\n *\n * Integration of the Spine Runtimes into software or otherwise creating\n * derivative works of the Spine Runtimes is permitted under the terms and\n * conditions of Section 2 of the Spine Editor License Agreement:\n * http://esotericsoftware.com/spine-editor-license\n *\n * Otherwise, it is permitted to integrate the Spine Runtimes into software or\n * otherwise create derivative works of the Spine Runtimes (collectively,\n * \"Products\"), provided that each user of the Products must obtain their own\n * Spine Editor license and redistribution of the Products in any form must\n * include this license and copyright notice.\n *\n * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,\n * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE\n * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *****************************************************************************/\n\ndeclare global\n{\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    // eslint-disable-next-line no-var\n    var require: any;\n    // eslint-disable-next-line no-var\n    var PIXI: any;\n}\n\nif (typeof window !== 'undefined' && window.PIXI)\n{\n    const prevRequire = window.require;\n\n    // eslint-disable-next-line consistent-return\n    (window as any).require = (x: string) =>\n    {\n        if (prevRequire) return prevRequire(x);\n        else if (x.startsWith('@pixi/') || x.startsWith('pixi.js')) return window.PIXI;\n    };\n}\n\nexport { };\n"],"names":[],"mappings":"AAuCA,IAAI,OAAO,MAAA,KAAW,WAAe,IAAA,MAAA,CAAO,IAC5C,EAAA;AACI,EAAA,MAAM,cAAc,MAAO,CAAA,OAAA,CAAA;AAG3B,EAAC,MAAA,CAAe,OAAU,GAAA,CAAC,CAC3B,KAAA;AACI,IAAI,IAAA,WAAA;AAAa,MAAA,OAAO,YAAY,CAAC,CAAA,CAAA;AAAA,SAAA,IAC5B,EAAE,UAAW,CAAA,QAAQ,CAAK,IAAA,CAAA,CAAE,WAAW,SAAS,CAAA;AAAG,MAAA,OAAO,MAAO,CAAA,IAAA,CAAA;AAAA,GAC9E,CAAA;AACJ"}