"use strict";var to_ascii="undefined"==typeof atob?function(b){return new Buffer(b,"base64").toString()}:atob,to_base64="undefined"==typeof btoa?function(b){return new Buffer(b).toString("base64")}:btoa;function read_source_map(c){var a=/\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(c);return a?to_ascii(a[2]):(AST_Node.warn("inline source map not found"),null)}function set_shorthand(d,a,b){a[d]&&b.forEach(function(b){a[b]&&("object"!=typeof a[b]&&(a[b]={}),!(d in a[b])&&(a[b][d]=a[d]))})}function init_cache(b){b&&("props"in b?!(b.props instanceof Dictionary)&&(b.props=Dictionary.fromObject(b.props)):b.props=new Dictionary)}function to_json(b){return{props:b.props.toObject()}}function minify(k,a){var b=AST_Node.warn_function;try{a=defaults(a,{compress:{},ecma:void 0,ie8:!1,keep_classnames:void 0,keep_fnames:!1,mangle:{},nameCache:null,output:{},parse:{},rename:void 0,safari10:!1,sourceMap:!1,timings:!1,toplevel:!1,warnings:!1,wrap:!1},!0);var c=a.timings&&{start:Date.now()};void 0===a.keep_classnames&&(a.keep_classnames=a.keep_fnames),void 0===a.rename&&(a.rename=a.compress&&a.mangle),set_shorthand("ecma",a,["parse","compress","output"]),set_shorthand("ie8",a,["compress","mangle","output"]),set_shorthand("keep_classnames",a,["compress","mangle"]),set_shorthand("keep_fnames",a,["compress","mangle"]),set_shorthand("safari10",a,["mangle","output"]),set_shorthand("toplevel",a,["compress","mangle"]),set_shorthand("warnings",a,["compress"]);var d;a.mangle&&(a.mangle=defaults(a.mangle,{cache:a.nameCache&&(a.nameCache.vars||{}),eval:!1,ie8:!1,keep_classnames:!1,keep_fnames:!1,properties:!1,reserved:[],safari10:!1,toplevel:!1},!0),a.mangle.properties&&("object"!=typeof a.mangle.properties&&(a.mangle.properties={}),a.mangle.properties.keep_quoted&&(d=a.mangle.properties.reserved,!Array.isArray(d)&&(d=[]),a.mangle.properties.reserved=d),a.nameCache&&!("cache"in a.mangle.properties)&&(a.mangle.properties.cache=a.nameCache.props||{})),init_cache(a.mangle.cache),init_cache(a.mangle.properties.cache)),a.sourceMap&&(a.sourceMap=defaults(a.sourceMap,{content:null,filename:null,includeSources:!1,root:null,url:null},!0));var e=[];a.warnings&&!AST_Node.warn_function&&(AST_Node.warn_function=function(b){e.push(b)}),c&&(c.parse=Date.now());var f;if(k instanceof AST_Toplevel)f=k;else{for(var g in"string"==typeof k&&(k=[k]),a.parse=a.parse||{},a.parse.toplevel=null,k)if(HOP(k,g)&&(a.parse.filename=g,a.parse.toplevel=parse(k[g],a.parse),a.sourceMap&&"inline"==a.sourceMap.content)){if(1<Object.keys(k).length)throw new Error("inline source map only works with singular input");a.sourceMap.content=read_source_map(k[g])}f=a.parse.toplevel}d&&reserve_quoted_keys(f,d),a.wrap&&(f=f.wrap_commonjs(a.wrap)),c&&(c.rename=Date.now()),0,c&&(c.compress=Date.now()),a.compress&&(f=new Compressor(a.compress).compress(f)),c&&(c.scope=Date.now()),a.mangle&&f.figure_out_scope(a.mangle),c&&(c.mangle=Date.now()),a.mangle&&(base54.reset(),f.compute_char_frequency(a.mangle),f.mangle_names(a.mangle)),c&&(c.properties=Date.now()),a.mangle&&a.mangle.properties&&(f=mangle_properties(f,a.mangle.properties)),c&&(c.output=Date.now());var h={};if(a.output.ast&&(h.ast=f),!HOP(a.output,"code")||a.output.code){if(a.sourceMap&&("string"==typeof a.sourceMap.content&&(a.sourceMap.content=JSON.parse(a.sourceMap.content)),a.output.source_map=SourceMap({file:a.sourceMap.filename,orig:a.sourceMap.content,root:a.sourceMap.root}),a.sourceMap.includeSources))if(k instanceof AST_Toplevel)throw new Error("original source content unavailable");else for(var g in k)HOP(k,g)&&a.output.source_map.get().setSourceContent(g,k[g]);delete a.output.ast,delete a.output.code;var i=OutputStream(a.output);f.print(i),h.code=i.get(),a.sourceMap&&(h.map=a.output.source_map.toString(),"inline"==a.sourceMap.url?h.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+to_base64(h.map):a.sourceMap.url&&(h.code+="\n//# sourceMappingURL="+a.sourceMap.url))}return a.nameCache&&a.mangle&&(a.mangle.cache&&(a.nameCache.vars=to_json(a.mangle.cache)),a.mangle.properties&&a.mangle.properties.cache&&(a.nameCache.props=to_json(a.mangle.properties.cache))),c&&(c.end=Date.now(),h.timings={parse:1e-3*(c.rename-c.parse),rename:1e-3*(c.compress-c.rename),compress:1e-3*(c.scope-c.compress),scope:1e-3*(c.mangle-c.scope),mangle:1e-3*(c.properties-c.mangle),properties:1e-3*(c.output-c.properties),output:1e-3*(c.end-c.output),total:1e-3*(c.end-c.start)}),e.length&&(h.warnings=e),h}catch(b){return{error:b}}finally{AST_Node.warn_function=b}}