�PNG  IHDR��;���IDATx��ܻn�0���K�� �)(�pA��� ���7�LeG{�� �§㻢|��ذaÆ 6lذaÆ 6lذaÆ 6lom��$^�y���ذag�5bÆ 6lذaÆ 6lذa{���� 6lذaÆ �`����}H�Fkm�,�m����Ӫ���ô�ô!� �x�|'ܢ˟;�E:���9�&ᶒ�}�{�v]�n&�6� �h��_��t�ڠ͵-ҫ���Z;��Z$�.�P���k�ž)�!��o���>}l�eQfJ�T��u і���چ��\��X=8��Rن4`Vw�l�>����n�G�^��i�s��"ms�$�u��i��?w�bs[m�6�K4���O���.�4��%����/����b�C%��t ��M�ז� �-l�G6�mrz2���s�%�9��s@���-�k�9�=���)������k�B5����\��+͂�Zsٲ ��Rn��~G���R���C����� �wIcI��n7jJ���hۛNCS|���j0��8y�iHKֶۛ�k�Ɉ+;Sz������L/��F�*\��Ԕ�#"5��m�2��[S��������=�g��n�a�P�e�ғ�L�� lذaÆ 6l�^k��̱aÆ 6lذaÆ 6lذa;���� �_��ذaÆ 6lذaÆ 6lذaÆ ���R���IEND�B` let collect = require('collect.js'); let path = require('path'); let File = require('./File'); class Manifest { /** * Create a new Manifest instance. * * @param {string} name */ constructor(name = 'mix-manifest.json') { this.manifest = {}; this.name = name; } /** * Get the underlying manifest collection. */ get(file = null) { if (file) { return path.posix.join( this.mix.config.publicPath, this.manifest[this.normalizePath(file)] ); } return collect(this.manifest).sortKeys().all(); } /** * Add the given path to the manifest file. * * @param {string} filePath */ add(filePath) { filePath = this.normalizePath(filePath); let original = filePath.replace(/\?id=\w{20}/, ''); this.manifest[original] = filePath; return this; } /** * Add a new hashed key to the manifest. * * @param {string} file */ hash(file) { let hash = new File(path.join(this.mix.config.publicPath, file)).version(); let filePath = this.normalizePath(file); this.manifest[filePath] = filePath + '?id=' + hash; return this; } /** * Transform the Webpack stats into the shape we need. * * @param {object} stats */ transform(stats) { this.flattenAssets(stats).forEach(this.add.bind(this)); return this; } /** * Refresh the mix-manifest.js file. */ refresh() { File.find(this.path()).makeDirectories().write(this.manifest); } /** * Retrieve the JSON output from the manifest file. */ read() { return JSON.parse(File.find(this.path()).read()); } /** * Get the path to the manifest file. */ path() { return path.join(this.mix.config.publicPath, this.name); } /** * Flatten the generated stats assets into an array. * * @param {Object} stats */ flattenAssets(stats) { let assets = Object.assign({}, stats.assetsByChunkName); // If there's a temporary mix.js chunk, we can safely remove it. if (assets.mix) { assets.mix = collect(assets.mix).except('mix.js').all(); } return ( collect(assets) .flatten() // Don't add hot updates to manifest .filter(name => name.indexOf('hot-update') === -1) .all() ); } /** * Prepare the provided path for processing. * * @param {string} filePath */ normalizePath(filePath) { if ( this.mix.config.publicPath && filePath.startsWith(this.mix.config.publicPath) ) { filePath = filePath.substring(this.mix.config.publicPath.length); } filePath = filePath.replace(/\\/g, '/'); if (!filePath.startsWith('/')) { filePath = '/' + filePath; } return filePath; } get mix() { return global.Mix; } } module.exports = Manifest;