| | |
| | | var match = /^# ([^\s=]+)=(\S+)\s*$/.exec(comment.value); |
| | | if (!match) break; |
| | | if (match[1] == "sourceMappingURL") { |
| | | match = /^data:application\/json(;.*?)?;base64,(\S+)$/.exec(match[2]); |
| | | match = /^data:application\/json(;.*?)?;base64,([^,]+)$/.exec(match[2]); |
| | | if (!match) break; |
| | | return to_ascii(match[2]); |
| | | } |
| | |
| | | enclose: false, |
| | | ie: false, |
| | | ie8: false, |
| | | keep_fargs: false, |
| | | keep_fnames: false, |
| | | mangle: {}, |
| | | nameCache: null, |
| | |
| | | }, true); |
| | | if (options.validate) AST_Node.enable_validation(); |
| | | var timings = options.timings && { start: Date.now() }; |
| | | if (options.rename === undefined) options.rename = options.compress && options.mangle; |
| | | if (options.annotations !== undefined) set_shorthand("annotations", options, [ "compress", "output" ]); |
| | | if (options.ie8) options.ie = options.ie || options.ie8; |
| | | if (options.ie) set_shorthand("ie", options, [ "compress", "mangle", "output" ]); |
| | | if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle" ]); |
| | | if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle" ]); |
| | | if (options.v8) set_shorthand("v8", options, [ "mangle", "output" ]); |
| | | if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output" ]); |
| | | if (options.ie) set_shorthand("ie", options, [ "compress", "mangle", "output", "rename" ]); |
| | | if (options.keep_fargs) set_shorthand("keep_fargs", options, [ "compress", "mangle", "rename" ]); |
| | | if (options.keep_fnames) set_shorthand("keep_fnames", options, [ "compress", "mangle", "rename" ]); |
| | | if (options.toplevel) set_shorthand("toplevel", options, [ "compress", "mangle", "rename" ]); |
| | | if (options.v8) set_shorthand("v8", options, [ "mangle", "output", "rename" ]); |
| | | if (options.webkit) set_shorthand("webkit", options, [ "compress", "mangle", "output", "rename" ]); |
| | | var quoted_props; |
| | | if (options.mangle) { |
| | | options.mangle = defaults(options.mangle, { |
| | | cache: options.nameCache && (options.nameCache.vars || {}), |
| | | eval: false, |
| | | ie: false, |
| | | keep_fargs: false, |
| | | keep_fnames: false, |
| | | properties: false, |
| | | reserved: [], |
| | |
| | | init_cache(options.mangle.cache); |
| | | init_cache(options.mangle.properties.cache); |
| | | } |
| | | if (options.rename === undefined) options.rename = options.compress && options.mangle; |
| | | if (options.sourceMap) { |
| | | options.sourceMap = defaults(options.sourceMap, { |
| | | content: null, |
| | |
| | | if (options.validate) toplevel.validate_ast(); |
| | | if (timings) timings.rename = Date.now(); |
| | | if (options.rename) { |
| | | toplevel.figure_out_scope(options.mangle); |
| | | toplevel.expand_names(options.mangle); |
| | | toplevel.figure_out_scope(options.rename); |
| | | toplevel.expand_names(options.rename); |
| | | } |
| | | if (timings) timings.compress = Date.now(); |
| | | if (options.compress) { |