@naanlang/naan 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +46 -0
  3. package/dist/env_web.js +431 -0
  4. package/dist/naan.min.js +73 -0
  5. package/frameworks/browser/browser.nlg +30 -0
  6. package/frameworks/browser/pouchdb/pouchdb.min.js +7 -0
  7. package/frameworks/browser/spark-md5/spark-md5.min.js +1 -0
  8. package/frameworks/browser/sworker.js +192 -0
  9. package/frameworks/browser/terminals.nlg +787 -0
  10. package/frameworks/browser/workers.nlg +386 -0
  11. package/frameworks/client/apiclient.nlg +183 -0
  12. package/frameworks/client/client.nlg +29 -0
  13. package/frameworks/client/psm_client.nlg +572 -0
  14. package/frameworks/common/common.nlg +464 -0
  15. package/frameworks/common/preferences.nlg +131 -0
  16. package/frameworks/common/repltools.nlg +100 -0
  17. package/frameworks/common/watching.nlg +97 -0
  18. package/frameworks/node/apiserver.nlg +399 -0
  19. package/frameworks/node/filesystem.nlg +1012 -0
  20. package/frameworks/node/gitter.nlg +234 -0
  21. package/frameworks/node/node.nlg +81 -0
  22. package/frameworks/node/psm_server.nlg +465 -0
  23. package/frameworks/node/worker.nlg +560 -0
  24. package/frameworks/project/build.nlg +1229 -0
  25. package/frameworks/project/jszip.js +30 -0
  26. package/frameworks/project/jszip.nlg +87 -0
  27. package/frameworks/project/proj_cliser.nlg +139 -0
  28. package/frameworks/project/proj_console.nlg +137 -0
  29. package/frameworks/project/proj_folder.nlg +143 -0
  30. package/frameworks/project/proj_lambda.nlg +137 -0
  31. package/frameworks/project/proj_static.nlg +138 -0
  32. package/frameworks/project/project.nlg +29 -0
  33. package/frameworks/project/projects.nlg +587 -0
  34. package/frameworks/project/uglifyjs.js +1 -0
  35. package/frameworks/project/uglifyjs.nlg +79 -0
  36. package/frameworks/running/debugcom.nlg +163 -0
  37. package/frameworks/running/debugnub.nlg +565 -0
  38. package/frameworks/running/debugutil.nlg +510 -0
  39. package/frameworks/running/executors.nlg +767 -0
  40. package/frameworks/running/running.nlg +151 -0
  41. package/frameworks/running/sourcecode.nlg +346 -0
  42. package/frameworks/running/taskexec.nlg +196 -0
  43. package/frameworks/storage/dbt_pouch.nlg +773 -0
  44. package/frameworks/storage/file_manager.nlg +772 -0
  45. package/frameworks/storage/psm.nlg +326 -0
  46. package/frameworks/storage/psm_dbtables.nlg +814 -0
  47. package/frameworks/storage/resources.nlg +445 -0
  48. package/frameworks/storage/storage.nlg +52 -0
  49. package/lib/browser/env_web.js +431 -0
  50. package/lib/browser/env_webworker.js +146 -0
  51. package/lib/browser/require.js +1653 -0
  52. package/lib/core/naanlib.js +73 -0
  53. package/lib/env_node.js +282 -0
  54. package/lib/env_nodeworker.js +165 -0
  55. package/lib/node_repl.js +25 -0
  56. package/lib/node_repl_init.nlg +52 -0
  57. package/package.json +13 -0
  58. package/plugins/gitClient/clientops.nlg +317 -0
  59. package/plugins/gitClient/gitClient.nlg +63 -0
  60. package/plugins/gitClient/gitutils.nlg +1331 -0
  61. package/plugins/gitClient/minimatch.js +945 -0
  62. package/plugins/gitClient/minimatch_license.txt +15 -0
  63. package/plugins/gitClient/minimatch_readme.md +208 -0
  64. package/plugins/nodeLib/nodeLib.nlg +26 -0
  65. package/plugins/nodeLib/node_cp.nlg +65 -0
  66. package/plugins/nodeLib/node_fs.nlg +137 -0
  67. package/plugins/nodeLib/node_https.nlg +172 -0
  68. package/plugins/nodeLib/node_util.nlg +180 -0
  69. package/plugins/serviceAws/aws/aws-sdk.min.js +88 -0
  70. package/plugins/serviceAws/aws/lambda_rest_index.js +122 -0
  71. package/plugins/serviceAws/aws/lambda_rest_init.nlg +58 -0
  72. package/plugins/serviceAws/aws/lambda_ws_index.js +498 -0
  73. package/plugins/serviceAws/aws/lambda_ws_init.nlg +49 -0
  74. package/plugins/serviceAws/aws_cloudwatchlogs.nlg +122 -0
  75. package/plugins/serviceAws/aws_cognito.nlg +76 -0
  76. package/plugins/serviceAws/aws_dynamo.nlg +509 -0
  77. package/plugins/serviceAws/aws_lambda.nlg +95 -0
  78. package/plugins/serviceAws/aws_s3.nlg +134 -0
  79. package/plugins/serviceAws/aws_utils.nlg +86 -0
  80. package/plugins/serviceAws/dbt_aws.nlg +769 -0
  81. package/plugins/serviceAws/lambda_naan_control.nlg +175 -0
  82. package/plugins/serviceAws/psm_aws.nlg +258 -0
  83. package/plugins/serviceAws/serviceAws.nlg +38 -0
  84. package/plugins/serviceGitHub/gitops.nlg +522 -0
  85. package/plugins/serviceGitHub/psm_github.nlg +205 -0
  86. package/plugins/serviceGitHub/serviceGitHub.nlg +65 -0
  87. package/plugins/serviceGitLab/gitops.nlg +528 -0
  88. package/plugins/serviceGitLab/psm_gitlab.nlg +205 -0
  89. package/plugins/serviceGitLab/serviceGitLab.nlg +65 -0
  90. package/test/harness.nlg +312 -0
  91. package/test/node_test.js +33 -0
  92. package/test/test_01_core.nlg +768 -0
  93. package/test/test_02_context.nlg +269 -0
  94. package/test/test_03_jsinterop.nlg +137 -0
  95. package/test/test_04_numerics.nlg +450 -0
  96. package/test/test_05_strings.nlg +63 -0
  97. package/test/test_06_lingoparse.nlg +500 -0
  98. package/test/test_07_lingo.nlg +623 -0
@@ -0,0 +1 @@
1
+ !function(h){"use strict";function e(e){return e.split("")}function Ke(e,n){return 0<=n.indexOf(e)}function Qe(e,n){for(var t=n.length;0<=--t;)if(e(n[t]))return n[t]}function n(e){Object.defineProperty(e.prototype,"stack",{get:function(){var e=new Error(this.message);e.name=this.name;try{throw e}catch(e){return e.stack}}})}function r(e,n){this.message=e,this.defs=n}function Z(e,n,t){if(t)for(var i in e)if(pn(e,i)&&!pn(n,i))throw new r("`"+i+"` is not a supported option",n);for(var i in e)pn(e,i)&&(n[i]=e[i]);return n}function t(e,n){var t,i=0;for(t in n)pn(n,t)&&(e[t]=n[t],i++);return i}function Ze(){}function en(){return!1}function nn(){return!0}function tn(){return this}function rn(){return null}((r.prototype=Object.create(Error.prototype)).constructor=r).prototype.name="DefaultsError",n(r);var on=function(){function e(e,n){for(var t=[],i=0;i<e.length;i++){var r=n(e[i],i);r!==o&&(r instanceof a?t.push.apply(t,r.v):t.push(r))}return t}e.is_op=function(e){return e===o||e instanceof a},e.splice=function(e){return new a(e)};var o=e.skip={};function a(e){this.v=e}return e}();function an(e,n){if(e.indexOf(n)<0)return e.push(n)}function sn(e,t){return e.replace(/\{([^}]+)\}/g,function(e,n){n=t[n];return n instanceof hn?n.print_to_string():n})}function fn(e,n){n=e.indexOf(n);0<=n&&e.splice(n,1)}function cn(e){Array.isArray(e)||(e=e.split(" "));var n=Object.create(null);return e.forEach(function(e){n[e]=!0}),n}function un(e,n){for(var t=e.length;0<=--t;)if(!n(e[t],t))return!1;return!0}function ln(){this._values=Object.create(null),this._size=0}function pn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function dn(e,n){for(var t,i=e.parent(-1),r=0;t=e.parent(r++);i=t){if(t instanceof Nn)return n&&t.value===i;if(t instanceof wt){if(t.left===i)continue}else if("Call"==t.TYPE){if(t.expression===i)continue}else if(t instanceof xt){if(t.condition===i)continue}else if(t instanceof ht){if(t.expression===i)continue}else if(t instanceof dt){if(t.expressions[0]===i)continue}else{if(t instanceof vn)return t.body===i;if(t instanceof yt&&t.expression===i)continue}return!1}}function i(e,n,t,i){void 0===i&&(i=hn);var r=n=n?n.split(/\s+/):[];i&&i.PROPS&&(n=n.concat(i.PROPS));var o=["return function AST_",e,"(props){","if(props){"];n.forEach(function(e){o.push("this.",e,"=props.",e,";")});var a=i&&new i;(a&&a.initialize||t&&t.initialize)&&o.push("this.initialize();"),o.push("}}");var s=new Function(o.join(""))();if(a&&(s.prototype=a,s.BASE=i),i&&i.SUBCLASSES.push(s),(s.prototype.CTOR=s).PROPS=n||null,s.SELF_PROPS=r,s.SUBCLASSES=[],e&&(s.prototype.TYPE=s.TYPE=e),t)for(var f in t)pn(t,f)&&(/^\$/.test(f)?s[f.substr(1)]=t[f]:s.prototype[f]=t[f]);return s.DEFMETHOD=function(e,n){this.prototype[e]=n},void 0!==h&&(h["AST_"+e]=s),s}ln.prototype={set:function(e,n){return this.has(e)||++this._size,this._values["$"+e]=n,this},add:function(e,n){return this.has(e)?this.get(e).push(n):this.set(e,[n]),this},get:function(e){return this._values["$"+e]},del:function(e){return this.has(e)&&(--this._size,delete this._values["$"+e]),this},has:function(e){return"$"+e in this._values},all:function(e){for(var n in this._values)if(!e(this._values[n],n.substr(1)))return!1;return!0},each:function(e){for(var n in this._values)e(this._values[n],n.substr(1))},size:function(){return this._size},map:function(e){var n,t=[];for(n in this._values)t.push(e(this._values[n],n.substr(1)));return t},clone:function(){var e,n=new ln;for(e in this._values)n._values[e]=this._values[e];return n._size=this._size,n},toObject:function(){return this._values}},ln.fromObject=function(e){var n=new ln;return n._size=t(n._values,e),n};var H=i("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw",{},null),hn=i("Node","start end",{_clone:function(e){if(e){var n=this.clone();return n.transform(new ui(function(e){if(e!==n)return e.clone(!0)}))}return new this.CTOR(this)},clone:function(e){return this._clone(e)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},walk:function(e){e.visit(this)},_validate:Ze,validate:function(){for(var e=this.CTOR;e.prototype._validate.call(this),e=e.BASE;);},validate_ast:function(){var n={};this.walk(new ri(function(e){if(e.validate_visited===n)throw new Error(sn("cannot reuse {type} from [{file}:{line},{col}]",{type:"AST_"+e.TYPE,file:e.start.file,line:e.start.line,col:e.start.col}));e.validate_visited=n}))}},null);(hn.log_function=function(n,e){var t;function i(e){t[e]||(t[e]=!0,n(e))}n?(t=Object.create(null),hn.info=e?function(e,n){i("INFO: "+sn(e,n))}:Ze,hn.warn=function(e,n){i("WARN: "+sn(e,n))}):hn.info=hn.warn=Ze})();var o=[];hn.enable_validation=function(){hn.disable_validation(),function e(n){var t=n.prototype.transform;n.prototype.transform=function(e,n){e=t.call(this,e,n);if(e instanceof hn)e.validate();else if(!(null===e||n&&on.is_op(e)))throw new Error("invalid transformed value: "+e);return e},o.push(function(){n.prototype.transform=t}),n.SUBCLASSES.forEach(e)}(this)},hn.disable_validation=function(){for(var e;e=o.pop();)e()};var vn=i("Statement",null,{$documentation:"Base class of all statements"}),mn=i("Debugger",null,{$documentation:"Represents a debugger statement"},vn),_n=i("Directive","value quote",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",quote:"[string] the original quote character"},_validate:function(){if("string"!=typeof this.value)throw new Error("value must be string")}},vn),gn=i("EmptyStatement",null,{$documentation:"The empty statement (empty block or simply a semicolon)"},vn);function a(e,n,t,i,r){if(t=t?"contain":"be",!(e instanceof hn))throw new Error(n+" must "+t+" AST_Node");if(e instanceof ut)throw new Error(n+" cannot "+t+" AST_DefaultValue");if(e instanceof Tt)throw new Error(n+" cannot "+t+" AST_Destructured");if(e instanceof Zt&&!r)throw new Error(n+" cannot "+t+" AST_Hole");if(e instanceof _t&&!i)throw new Error(n+" cannot "+t+" AST_Spread");if(e instanceof vn&&!Cn(e))throw new Error(n+" cannot "+t+" AST_Statement");if(e instanceof Ct)throw new Error(n+" cannot "+t+" AST_SymbolDeclaration")}function s(e,n){a(e[n],n)}var bn=i("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e)})},_validate:function(){s(this,"body")}},vn),yn=i("BlockScope","enclosed functions make_def parent_scope variables",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",functions:"[Object/S] like `variables`, but only lists function declarations",parent_scope:"[AST_Scope?/S] link to the parent scope",variables:"[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope"},clone:function(e){e=this._clone(e);return this.enclosed&&(e.enclosed=this.enclosed.slice()),this.functions&&(e.functions=this.functions.clone()),this.variables&&(e.variables=this.variables.clone()),e},pinned:function(){return this.resolve().pinned()},resolve:function(){return this.parent_scope.resolve()},_validate:function(){if(null!=this.parent_scope){if(!(this.parent_scope instanceof yn))throw new Error("parent_scope must be AST_BlockScope");if(!(this.resolve()instanceof Mn))throw new Error("must be contained within AST_Scope")}}},vn);function wn(e,n){e.body.forEach(function(e){e.walk(n)})}var xn=i("Block","body",{$documentation:"A body of statements (usually braced)",$propdoc:{body:"[AST_Statement*] an array of statements"},walk:function(e){var n=this;e.visit(n,function(){wn(n,e)})},_validate:function(){this.body.forEach(function(e){if(!(e instanceof vn))throw new Error("body must be AST_Statement[]");if(Cn(e))throw new Error("body cannot contain AST_Function")})}},yn),kn=i("BlockStatement",null,{$documentation:"A block statement"},xn),f=i("StatementWithBody","body",{$documentation:"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",$propdoc:{body:"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"},_validate:function(){if(!(this.body instanceof vn))throw new Error("body must be AST_Statement");if(Cn(this.body))throw new Error("body cannot be AST_Function")}},yn),En=i("LabeledStatement","label",{$documentation:"Statement with a label",$propdoc:{label:"[AST_Label] a label definition"},walk:function(e){var n=this;e.visit(n,function(){n.label.walk(e),n.body.walk(e)})},clone:function(e){var n,t,i=this._clone(e);return e&&(n=i.label,t=this.label,i.walk(new ri(function(e){return e instanceof Jn?e.label&&e.label.thedef===t?((e.label.thedef=n).references.push(e),!0):void 0:e instanceof Mn||void 0}))),i},_validate:function(){if(!(this.label instanceof ee))throw new Error("label must be AST_Label")}},f),Sn=i("IterationStatement",null,{$documentation:"Internal class. All loops inherit from it."},f),Tn=i("DWLoop","condition",{$documentation:"Base class for do/while statements",$propdoc:{condition:"[AST_Node] the loop condition. Should not be instanceof AST_Statement"},_validate:function(){s(this,"condition")}},Sn),Dn=i("Do",null,{$documentation:"A `do` statement",walk:function(e){var n=this;e.visit(n,function(){n.body.walk(e),n.condition.walk(e)})}},Tn),On=i("While",null,{$documentation:"A `while` statement",walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.body.walk(e)})}},Tn),An=i("For","init condition step",{$documentation:"A `for` statement",$propdoc:{init:"[AST_Node?] the `for` initialization code, or null if empty",condition:"[AST_Node?] the `for` termination clause, or null if empty",step:"[AST_Node?] the `for` update clause, or null if empty"},walk:function(e){var n=this;e.visit(n,function(){n.init&&n.init.walk(e),n.condition&&n.condition.walk(e),n.step&&n.step.walk(e),n.body.walk(e)})},_validate:function(){if(null!=this.init){if(!(this.init instanceof hn))throw new Error("init must be AST_Node");if(this.init instanceof vn&&!(this.init instanceof ot||Cn(this.init)))throw new Error("init cannot be AST_Statement")}null!=this.condition&&s(this,"condition"),null!=this.step&&s(this,"step")}},Sn),zn=i("ForIn","init object",{$documentation:"A `for ... in` statement",$propdoc:{init:"[AST_Node] the `for/in` initialization code",object:"[AST_Node] the object that we're looping through"},walk:function(e){var n=this;e.visit(n,function(){n.init.walk(e),n.object.walk(e),n.body.walk(e)})},_validate:function(){if(this.init instanceof ot){if(1!=this.init.definitions.length)throw new Error("init must have single declaration")}else u(this.init,function(e){if(!(e instanceof ht||e instanceof Yt))throw new Error("init must be assignable: "+e.TYPE)});s(this,"object")}},Sn),$n=i("With","expression",{$documentation:"A `with` statement",$propdoc:{expression:"[AST_Node] the `with` expression"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),n.body.walk(e)})},_validate:function(){s(this,"expression")}},f),Mn=i("Scope","uses_eval uses_with",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",uses_with:"[boolean/S] tells whether this scope uses the `with` statement"},pinned:function(){return this.uses_eval||this.uses_with},resolve:tn},xn),jn=i("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Object/S] a map of name -> SymbolDef for all undeclared names"},wrap:function(e){var n=this.body;return ci(["(function(exports){'$ORIG';})(typeof ",e,"=='undefined'?(",e,"={}):",e,");"].join(""),{filename:"wrap="+JSON.stringify(e)}).transform(new ui(function(e){if(e instanceof _n&&"$ORIG"==e.value)return on.splice(n)}))},enclose:function(e){"string"!=typeof e&&(e="");var n=e.indexOf(":");n<0&&(n=e.length);var t=this.body;return ci(["(function(",e.slice(0,n),'){"$ORIG"})(',e.slice(n+1),")"].join(""),{filename:"enclose="+JSON.stringify(e)}).transform(new ui(function(e){if(e instanceof _n&&"$ORIG"==e.value)return on.splice(t)}))}},Mn),Fn=i("Lambda","argnames length_read uses_arguments",{$documentation:"Base class for functions",$propdoc:{argnames:"[(AST_Destructured|AST_SymbolFunarg)*] array of function arguments and/or destructured literals",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array"},each_argname:function(n){var t=new ri(function(e){if(e instanceof Ot)return e.value.walk(t),!0;e instanceof It&&n(e)});this.argnames.forEach(function(e){e.walk(t)})},walk:function(n){var e=this;n.visit(e,function(){e.name&&e.name.walk(n),e.argnames.forEach(function(e){e.walk(n)}),wn(e,n)})},_validate:function(){this.argnames.forEach(function(e){u(e,function(e){if(!(e instanceof It))throw new Error("argnames must be AST_SymbolFunarg[]")},!0)})}},Mn),qn=i("Accessor",null,{$documentation:"A getter/setter function",_validate:function(){if(null!=this.name)throw new Error("name must be null")}},Fn);function Cn(e){return e instanceof Nn||e instanceof Hn||e instanceof In}var Nn=i("Arrow","inlined value",{$documentation:"An arrow function expression",$propdoc:{value:"[AST_Node?] simple return expression, or null if using function body."},walk:function(n){var e=this;n.visit(e,function(){e.argnames.forEach(function(e){e.walk(n)}),e.value?e.value.walk(n):wn(e,n)})},_validate:function(){if(null!=this.name)throw new Error("name must be null");if(this.uses_arguments)throw new Error("uses_arguments must be false");if(null!=this.value&&(s(this,"value"),this.body.length))throw new Error("body must be empty if value exists")}},Fn);function Pn(e){return e instanceof Un||e instanceof Hn}var Hn=i("AsyncFunction","inlined name",{$documentation:"An asynchronous function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function"},_validate:function(){if(null!=this.name&&!(this.name instanceof Ut))throw new Error("name must be AST_SymbolLambda")}},Fn),In=i("Function","inlined name",{$documentation:"A function expression",$propdoc:{name:"[AST_SymbolLambda?] the name of this function"},_validate:function(){if(null!=this.name&&!(this.name instanceof Ut))throw new Error("name must be AST_SymbolLambda")}},Fn);function Rn(e){return e instanceof Un||e instanceof Bn}var Un=i("AsyncDefun","inlined name",{$documentation:"An asynchronous function definition",$propdoc:{name:"[AST_SymbolDefun] the name of this function"},_validate:function(){if(!(this.name instanceof Rt))throw new Error("name must be AST_SymbolDefun")}},Fn),Bn=i("Defun","inlined name",{$documentation:"A function definition",$propdoc:{name:"[AST_SymbolDefun] the name of this function"},_validate:function(){if(!(this.name instanceof Rt))throw new Error("name must be AST_SymbolDefun")}},Fn),Yn=i("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},vn),Ln=i("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},walk:function(e){var n=this;e.visit(n,function(){n.value&&n.value.walk(e)})}},Yn),Vn=i("Return",null,{$documentation:"A `return` statement",_validate:function(){null!=this.value&&s(this,"value")}},Ln),Wn=i("Throw",null,{$documentation:"A `throw` statement",_validate:function(){s(this,"value")}},Ln),Jn=i("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},walk:function(e){var n=this;e.visit(n,function(){n.label&&n.label.walk(e)})},_validate:function(){if(null!=this.label&&!(this.label instanceof ne))throw new Error("label must be AST_LabelRef")}},Yn),Gn=i("Break",null,{$documentation:"A `break` statement"},Jn),Xn=i("Continue",null,{$documentation:"A `continue` statement"},Jn),Kn=i("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.body.walk(e),n.alternative&&n.alternative.walk(e)})},_validate:function(){if(s(this,"condition"),null!=this.alternative){if(!(this.alternative instanceof vn))throw new Error("alternative must be AST_Statement");if(Cn(this.alternative))throw new error("alternative cannot be AST_Function")}}},f),Qn=i("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),wn(n,e)})},_validate:function(){s(this,"expression"),this.body.forEach(function(e){if(!(e instanceof Zn))throw new Error("body must be AST_SwitchBranch[]")})}},xn),Zn=i("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},xn),et=i("Default",null,{$documentation:"A `default` switch branch"},Zn),nt=i("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),wn(n,e)})},_validate:function(){s(this,"expression")}},Zn),tt=i("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){wn(n,e),n.bcatch&&n.bcatch.walk(e),n.bfinally&&n.bfinally.walk(e)})},_validate:function(){if(null!=this.bcatch&&!(this.bcatch instanceof it))throw new Error("bcatch must be AST_Catch");if(null!=this.bfinally&&!(this.bfinally instanceof rt))throw new Error("bfinally must be AST_Finally")}},xn),it=i("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[(AST_Destructured|AST_SymbolCatch)?] symbol for the exception, or null if not present"},walk:function(e){var n=this;e.visit(n,function(){n.argname&&n.argname.walk(e),wn(n,e)})},_validate:function(){null!=this.argname&&u(this.argname,function(e){if(!(e instanceof Bt))throw new Error("argname must be AST_SymbolCatch")})}},xn),rt=i("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},xn),ot=i("Definitions","definitions",{$documentation:"Base class for `var` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},walk:function(n){var e=this;n.visit(e,function(){e.definitions.forEach(function(e){e.walk(n)})})},_validate:function(){if(this.definitions.length<1)throw new Error("must have at least one definition")}},vn),at=i("Const",null,{$documentation:"A `const` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof ct))throw new Error("definitions must be AST_VarDef[]");u(e.name,function(e){if(!(e instanceof Nt))throw new Error("name must be AST_SymbolConst")})})}},ot),st=i("Let",null,{$documentation:"A `let` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof ct))throw new Error("definitions must be AST_VarDef[]");u(e.name,function(e){if(!(e instanceof Pt))throw new Error("name must be AST_SymbolLet")})})}},ot),ft=i("Var",null,{$documentation:"A `var` statement",_validate:function(){this.definitions.forEach(function(e){if(!(e instanceof ct))throw new Error("definitions must be AST_VarDef[]");u(e.name,function(e){if(!(e instanceof Ht))throw new Error("name must be AST_SymbolVar")})})}},ot),ct=i("VarDef","name value",{$documentation:"A variable declaration; only appears in a AST_Definitions node",$propdoc:{name:"[AST_Destructured|AST_SymbolVar] name of the variable",value:"[AST_Node?] initializer, or null of there's no initializer"},walk:function(e){var n=this;e.visit(n,function(){n.name.walk(e),n.value&&n.value.walk(e)})},_validate:function(){null!=this.value&&s(this,"value")}}),ut=i("DefaultValue","name value",{$documentation:"A default value declaration",$propdoc:{name:"[AST_Destructured|AST_SymbolDeclaration] name of the variable",value:"[AST_Node] value to assign if variable is `undefined`"},walk:function(e){var n=this;e.visit(n,function(){n.name.walk(e),n.value.walk(e)})},_validate:function(){s(this,"value")}});function c(e,n,t,i){e[n].forEach(function(e){a(e,n,!0,t,i)})}var lt=i("Call","expression args pure",{$documentation:"A function call expression",$propdoc:{expression:"[AST_Node] expression to invoke as function",args:"[AST_Node*] array of arguments"},walk:function(n){var e=this;n.visit(e,function(){e.expression.walk(n),e.args.forEach(function(e){e.walk(n)})})},_validate:function(){s(this,"expression"),c(this,"args",!0)}}),pt=i("New",null,{$documentation:"An object instantiation. Derives from a function call since it has exactly the same properties"},lt),dt=i("Sequence","expressions",{$documentation:"A sequence expression (comma-separated expressions)",$propdoc:{expressions:"[AST_Node*] array of expressions (at least two)"},walk:function(n){var e=this;n.visit(e,function(){e.expressions.forEach(function(e){e.walk(n)})})},_validate:function(){if(this.expressions.length<2)throw new Error("expressions must contain multiple elements");c(this,"expressions")}}),ht=i("PropAccess","expression property",{$documentation:'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',$propdoc:{expression:"[AST_Node] the “container” expression",property:"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node"},getProperty:function(){var e=this.property;return e instanceof Vt?e.value:e instanceof bt&&"void"==e.operator&&e.expression instanceof Vt?void 0:e},_validate:function(){s(this,"expression")}}),vt=i("Dot",null,{$documentation:"A dotted property access expression",walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){if("string"!=typeof this.property)throw new Error("property must be string")}},ht),mt=i("Sub",null,{$documentation:'Index-style property access, i.e. `a["foo"]`',walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e),n.property.walk(e)})},_validate:function(){s(this,"property")}},ht),_t=i("Spread","expression",{$documentation:"Spread expression in array/object literals or function calls",$propdoc:{expression:"[AST_Node] expression to be expanded"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){s(this,"expression")}}),gt=i("Unary","operator expression",{$documentation:"Base class for unary expressions",$propdoc:{operator:"[string] the operator",expression:"[AST_Node] expression that this unary operator applies to"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){if("string"!=typeof this.operator)throw new Error("operator must be string");s(this,"expression")}}),bt=i("UnaryPrefix",null,{$documentation:"Unary prefix expression, i.e. `typeof i` or `++i`"},gt),yt=i("UnaryPostfix",null,{$documentation:"Unary postfix expression, i.e. `i++`"},gt),wt=i("Binary","operator left right",{$documentation:"Binary expression, i.e. `a + b`",$propdoc:{left:"[AST_Node] left-hand side expression",operator:"[string] the operator",right:"[AST_Node] right-hand side expression"},walk:function(e){var n=this;e.visit(n,function(){n.left.walk(e),n.right.walk(e)})},_validate:function(){if(this instanceof kt||s(this,"left"),"string"!=typeof this.operator)throw new Error("operator must be string");s(this,"right")}}),xt=i("Conditional","condition consequent alternative",{$documentation:"Conditional expression using the ternary operator, i.e. `a ? b : c`",$propdoc:{condition:"[AST_Node]",consequent:"[AST_Node]",alternative:"[AST_Node]"},walk:function(e){var n=this;e.visit(n,function(){n.condition.walk(e),n.consequent.walk(e),n.alternative.walk(e)})},_validate:function(){s(this,"condition"),s(this,"consequent"),s(this,"alternative")}}),kt=i("Assign",null,{$documentation:"An assignment expression — `a = b + 5`",_validate:function(){if(this.operator.indexOf("=")<0)throw new Error('operator must contain "="');if(this.left instanceof Tt){if("="!=this.operator)throw new Error("invalid destructuring operator: "+this.operator);u(this.left,function(e){if(!(e instanceof ht||e instanceof Yt))throw new Error("left must be assignable: "+e.TYPE)})}}},wt),Et=i("Await","expression",{$documentation:"An await expression",$propdoc:{expression:"[AST_Node] expression with Promise to resolve on"},walk:function(e){var n=this;e.visit(n,function(){n.expression.walk(e)})},_validate:function(){s(this,"expression")}}),St=i("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},walk:function(n){var e=this;n.visit(e,function(){e.elements.forEach(function(e){e.walk(n)})})},_validate:function(){c(this,"elements",!0,!0)}}),Tt=i("Destructured",null,{$documentation:"Base class for destructured literal"});function u(e,n,t){return e instanceof ut&&t?u(e.name,n):e instanceof Dt?e.elements.forEach(function(e){e instanceof Zt||u(e,n,!0)}):e instanceof At?e.properties.forEach(function(e){u(e.value,n,!0)}):void n(e)}var Dt=i("DestructuredArray","elements",{$documentation:"A destructured array literal",$propdoc:{elements:"[AST_Node*] array of elements"},walk:function(n){var e=this;n.visit(e,function(){e.elements.forEach(function(e){e.walk(n)})})}},Tt),Ot=i("DestructuredKeyVal","key value",{$documentation:"A key: value destructured property",$propdoc:{key:"[string|AST_Node] property name. For computed property this is an AST_Node.",value:"[AST_Node] property value"},walk:function(e){var n=this;e.visit(n,function(){n.key instanceof hn&&n.key.walk(e),n.value.walk(e)})},_validate:function(){if("string"!=typeof this.key){if(!(this.key instanceof hn))throw new Error("key must be string or AST_Node");s(this,"key")}if(!(this.value instanceof hn))throw new Error("value must be AST_Node")}}),At=i("DestructuredObject","properties",{$documentation:"A destructured object literal",$propdoc:{properties:"[AST_DestructuredKeyVal*] array of properties"},walk:function(n){var e=this;n.visit(e,function(){e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){this.properties.forEach(function(e){if(!(e instanceof Ot))throw new Error("properties must be AST_DestructuredKeyVal[]")})}},Tt),zt=i("Object","properties",{$documentation:"An object literal",$propdoc:{properties:"[(AST_ObjectProperty|AST_Spread)*] array of properties"},walk:function(n){var e=this;n.visit(e,function(){e.properties.forEach(function(e){e.walk(n)})})},_validate:function(){this.properties.forEach(function(e){if(!(e instanceof $t||e instanceof _t))throw new Error("properties must contain AST_ObjectProperty and/or AST_Spread only")})}}),$t=i("ObjectProperty","key value",{$documentation:"Base class for literal object properties",$propdoc:{key:"[string|AST_Node] property name. For computed property this is an AST_Node.",value:"[AST_Node] property value. For getters and setters this is an AST_Accessor."},walk:function(e){var n=this;e.visit(n,function(){n.key instanceof hn&&n.key.walk(e),n.value.walk(e)})},_validate:function(){if("string"!=typeof this.key){if(!(this.key instanceof hn))throw new Error("key must be string or AST_Node");s(this,"key")}if(!(this.value instanceof hn))throw new Error("value must be AST_Node")}}),Mt=i("ObjectKeyVal",null,{$documentation:"A key: value object property",_validate:function(){s(this,"value")}},$t),jt=i("ObjectSetter",null,{$documentation:"An object setter property",_validate:function(){if(!(this.value instanceof qn))throw new Error("value must be AST_Accessor")}},$t),Ft=i("ObjectGetter",null,{$documentation:"An object getter property",_validate:function(){if(!(this.value instanceof qn))throw new Error("value must be AST_Accessor")}},$t),qt=i("Symbol","scope name thedef",{$documentation:"Base class for all symbols",$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},_validate:function(){if("string"!=typeof this.name)throw new Error("name must be string")}}),Ct=i("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var, function name or argument, symbol in catch)"},qt),Nt=i("SymbolConst",null,{$documentation:"Symbol defining a constant"},Ct),Pt=i("SymbolLet",null,{$documentation:"Symbol defining a lexical-scoped variable"},Ct),Ht=i("SymbolVar",null,{$documentation:"Symbol defining a variable"},Ct),It=i("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},Ht),Rt=i("SymbolDefun",null,{$documentation:"Symbol defining a function"},Ct),Ut=i("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},Ct),Bt=i("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},Ct),ee=i("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},qt),Yt=i("SymbolRef","fixed in_arg",{$documentation:"Reference to some symbol (not definition/declaration)"},qt),ne=i("LabelRef",null,{$documentation:"Reference to a label symbol"},qt),Lt=i("This",null,{$documentation:"The `this` symbol",_validate:function(){if("this"!==this.name)throw new Error('name must be "this"')}},qt),Vt=i("Constant",null,{$documentation:"Base class for all constants"}),Wt=i("String","value quote",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string",quote:"[string] the original quote character"},_validate:function(){if("string"!=typeof this.value)throw new Error("value must be string")}},Vt),Jt=i("Number","value",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value"},_validate:function(){if("number"!=typeof this.value)throw new Error("value must be number")}},Vt),Gt=i("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"},_validate:function(){if(!(this.value instanceof RegExp))throw new Error("value must be RegExp")}},Vt),v=i("Atom",null,{$documentation:"Base class for atoms"},Vt),Xt=i("Null",null,{$documentation:"The `null` atom",value:null},v),Kt=i("NaN",null,{$documentation:"The impossible value",value:NaN},v),Qt=i("Undefined",null,{$documentation:"The `undefined` value",value:void 0},v),Zt=i("Hole",null,{$documentation:"A hole in an array",value:void 0},v),ei=i("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},v),ni=i("Boolean",null,{$documentation:"Base class for booleans"},v),ti=i("False",null,{$documentation:"The `false` atom",value:!1},ni),ii=i("True",null,{$documentation:"The `true` atom",value:!0},ni);function ri(e){this.callback=e,this.directives=Object.create(null),this.stack=[]}ri.prototype={visit:function(e,n){this.push(e),!this.callback(e,n||Ze)&&n&&n(),this.pop()},parent:function(e){return this.stack[this.stack.length-2-(e||0)]},push:function(e){e instanceof Fn?this.directives=Object.create(this.directives):e instanceof _n&&!this.directives[e.value]&&(this.directives[e.value]=e),this.stack.push(e)},pop:function(){this.stack.pop()instanceof Fn&&(this.directives=Object.getPrototypeOf(this.directives))},self:function(){return this.stack[this.stack.length-1]},find_parent:function(e){for(var n=this.stack,t=n.length;0<=--t;){var i=n[t];if(i instanceof e)return i}},has_directive:function(e){var n=this.directives[e];if(n)return n;var t=this.stack[this.stack.length-1];if(t instanceof Mn)for(var i=0;i<t.body.length;++i){var r=t.body[i];if(!(r instanceof _n))break;if(r.value==e)return r}},loopcontrol_target:function(e){var n,t=this.stack;if(e.label){for(var i=t.length;0<=--i;)if((n=t[i])instanceof En&&n.label.name==e.label.name)return n.body}else for(i=t.length;0<=--i;)if((n=t[i])instanceof Sn||e instanceof Gn&&n instanceof Qn)return n},in_boolean_context:function(){for(var e,n=this.self(),t=0;e=this.parent(t);t++){if(e instanceof xt&&e.condition===n||e instanceof Tn&&e.condition===n||e instanceof An&&e.condition===n||e instanceof Kn&&e.condition===n||e instanceof Vn&&e.in_bool||e instanceof dt&&e.tail_node()!==n||e instanceof bn||e instanceof bt&&"!"==e.operator&&e.expression===n)return!0;if(e instanceof wt&&("&&"==e.operator||"||"==e.operator)||e instanceof xt||e.tail_node()===n)n=e;else{if(!(e instanceof Vn))return!1;for(var i,r=e;i=this.parent(++t);r=i)if("Call"==i.TYPE){if(!(r instanceof Fn)||r.name)return!1}else if(r instanceof Fn)return!1}}}};var l=["await abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield",D="false null true",te="break case catch const continue debugger default delete do else finally for function if in instanceof let new return switch throw try typeof var void while with"].join(" "),T="return new delete throw else case",te=cn(te),l=cn(l),T=cn(T),D=cn(D),O=/^0b([01]+)$/i,A=/^0x([0-9a-f]+)$/i,z=/^0o?([0-7]+)$/i,$=cn(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),M="\n\r\u2028\u2029",j="+-*&%=<>!?|~^",F="[{(,;:",q=F+")}]",C=M+"  \t\f\v​              \ufeff",N=cn(e("./'\""+j+q+C));function I(e){return 56320<=e&&e<=57343}function P(e){return 48<=e&&e<=57}function R(e){return!N[e]}function oi(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}function ai(e,n,t,i,r){this.message=e,this.filename=n,this.line=t,this.col=i,this.pos=r}function ie(e,n,t,i,r){throw new ai(e,n,t,i,r)}function re(e,n,t){return e.type==n&&(null==t||e.value==t)}M=cn(e(M)),j=cn(e(j)),F=cn(e(F)),q=cn(e(q)),C=cn(e(C)),((ai.prototype=Object.create(Error.prototype)).constructor=ai).prototype.name="SyntaxError",n(ai);var U={};function oe(i,r,o,a){var s={text:i,filename:r,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[],directives:{},directive_stack:[]},f=!1;function c(){return s.text.charAt(s.pos)}function u(e,n){var t=s.text.charAt(s.pos++);if(e&&!t)throw U;return M[t]?(s.col=0,s.line++,n||(s.newline_before=!0),"\r"==t&&"\n"==c()&&(s.pos++,t="\n")):s.col++,t}function l(e){for(;0<e--;)u()}function p(e){return s.text.substr(s.pos,e.length)==e}function d(){s.tokline=s.line,s.tokcol=s.col,s.tokpos=s.pos}function h(e,n,t){s.regex_allowed="operator"==e&&!si[n]||"keyword"==e&&T[n]||"punc"==e&&F[n],"punc"==e&&"."==n?f=!0:t||(f=!1);n={type:e,value:n,line:s.tokline,col:s.tokcol,pos:s.tokpos,endline:s.line,endcol:s.col,endpos:s.pos,nlb:s.newline_before,file:r};return/^(?:num|string|regexp)$/i.test(e)&&(n.raw=i.substring(n.pos,n.endpos)),t||(n.comments_before=s.comments_before,n.comments_after=s.comments_before=[]),s.newline_before=!1,new H(n)}function v(e){ie(e,r,s.tokline,s.tokcol,s.tokpos)}function m(i){var r=!1,o=!1,a=!1,s="."==i,e=function(e){for(var n,t="",i=0;(n=c())&&e(n,i++);)t+=u();return t}(function(e,n){var t=e.charCodeAt(0);switch(t){case 120:case 88:return!a&&(a=!0);case 101:case 69:return a||!r&&(r=o=!0);case 45:return o||0==n&&!i;case 43:return o;case o=!1,46:return!(s||a||r)&&(s=!0)}return P(t)||/[_0-9a-fo]/i.test(e)});i&&(e=i+e),/^0[0-7_]+$/.test(e)?S.has_directive("use strict")&&v("Legacy octal literals are not allowed in strict mode"):e=e.replace(a?/([1-9a-f]|.0)_(?=[0-9a-f])/gi:/([1-9]|.0)_(?=[0-9])/gi,"$1");var n=function(e){if(n=O.exec(e))return parseInt(n[1],2);if(n=A.exec(e))return parseInt(n[1],16);if(n=z.exec(e))return parseInt(n[1],8);var n=parseFloat(e);return n==e?n:void 0}(e);if(!isNaN(n))return h("num",n);v("Invalid syntax: "+e)}function _(e){var n=u(!0,e);switch(n.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 120:return String.fromCharCode(g(2));case 117:if("{"!=c())return String.fromCharCode(g(4));u();var t=0;do{var i=parseInt(u(!0),16)}while(isNaN(i)&&v("Invalid hex-character pattern in string"),t=16*t+i,"}"!=c());return(u(),t<65536)?String.fromCharCode(t):(1114111<t&&v("Invalid character code: "+t),String.fromCharCode(55232+(t>>10))+String.fromCharCode(56320+(1023&t)));case 13:"\n"==c()&&u(!0,e);case 10:return""}return"0"<=n&&n<="7"?function(e){var n=c();"0"<=n&&n<="7"&&(e+=u(!0))[0]<="3"&&"0"<=(n=c())&&n<="7"&&(e+=u(!0));if("0"===e)return"\0";0<e.length&&S.has_directive("use strict")&&v("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}(n):n}function g(e){for(var n=0;0<e;--e){var t=parseInt(u(!0),16);isNaN(t)&&v("Invalid hex-character pattern in string"),n=n<<4|t}return n}var b=e("Unterminated string constant",function(e){for(var n=u(),t="";;){var i=u(!0,!0);if("\\"==i)i=_(!0);else if(M[i])v("Unterminated string constant");else if(i==n)break;t+=i}var r=h("string",t);return r.quote=e,r});function y(e){var n,t=s.regex_allowed,i=function(){for(var e=s.text,n=s.pos;n<s.text.length;++n)if(M[e[n]])return n;return-1}();return-1==i?(n=s.text.substr(s.pos),s.pos=s.text.length):(n=s.text.substring(s.pos,i),s.pos=i),s.col=s.tokcol+(s.pos-s.tokpos),s.comments_before.push(h(e,n,!0)),s.regex_allowed=t,S}var w=e("Unterminated multiline comment",function(){var e=s.regex_allowed,n=function(e,n){if(e=s.text.indexOf(e,s.pos),n&&-1==e)throw U;return e}("*/",!0),n=s.text.substring(s.pos,n).replace(/\r\n|\r|\u2028|\u2029/g,"\n");return l(n.length+2),s.comments_before.push(h("comment2",n,!0)),s.regex_allowed=e,S});function x(){for(var e,n,t=!1,i="",r=!1;e=c();)if(t)"u"!=e&&v("Expecting UnicodeEscapeSequence -- uXXXX"),R(e=_())||v("Unicode char: "+e.charCodeAt(0)+" is not valid in identifier"),i+=e,t=!1;else if("\\"==e)r=t=!0,u();else{if(!R(e))break;i+=u()}return te[i]&&r&&(n=i.charCodeAt(0).toString(16).toUpperCase(),i="\\u"+"0000".substr(n.length)+n+i.slice(1)),i}var k=e("Unterminated regular expression",function(e){for(var n,t=!1,i=!1;n=u(!0);)if(M[n])v("Unexpected line terminator");else if(t)e+="\\"+n,t=!1;else if("["==n)i=!0,e+=n;else if("]"==n&&i)i=!1,e+=n;else{if("/"==n&&!i)break;"\\"==n?t=!0:e+=n}var r=x();try{var o=new RegExp(e,r);return o.raw_source=e,h("regexp",o)}catch(e){v(e.message)}});function E(e){return h("operator",function e(n){if(!c())return n;var t=n+c();return $[t]?(u(),e(t)):n}(e||u()))}function e(n,t){return function(e){try{return t(e)}catch(e){if(e!==U)throw e;v(n)}}}function S(e){if(null!=e)return k(e);for(a&&0==s.pos&&p("#!")&&(d(),l(2),y("comment5"));;){if(!function(){for(;C[c()];)u()}(),d(),o){if(p("\x3c!--")){l(4),y("comment3");continue}if(p("--\x3e")&&s.newline_before){l(3),y("comment4");continue}}var n=c();if(!n)return h("eof");var t=n.charCodeAt(0);switch(t){case 34:case 39:return b(n);case 46:return function(){u();var e=c();if("."!=e)return P(e.charCodeAt(0))?m("."):h("punc",".");for(var n=".";n+=".",u(),"."==c(););return h("operator",n)}();case 47:var i=function(){switch(u(),c()){case"/":return u(),y("comment1");case"*":return u(),w()}return s.regex_allowed?k(""):E("/")}();if(i===S)continue;return i}if(P(t))return m();if(q[n])return h("punc",u());if(p("=>"))return h("punc",u()+u());if(j[n])return E();if(92==t||!N[n])return t=void 0,t=x(),f?h("name",t):D[t]?h("atom",t):te[t]?$[t]?h("operator",t):h("keyword",t):h("name",t);break}v("Unexpected character '"+n+"'")}return S.context=function(e){return e&&(s=e),s},S.add_directive=function(e){s.directive_stack[s.directive_stack.length-1].push(e),s.directives[e]?s.directives[e]++:s.directives[e]=1},S.push_directives_stack=function(){s.directive_stack.push([])},S.pop_directives_stack=function(){for(var e=s.directive_stack.pop(),n=e.length;0<=--n;)s.directives[e[n]]--},S.has_directive=function(e){return 0<s.directives[e]},S}var p,ae=cn("typeof void delete -- ++ ! ~ - +"),si=cn("-- ++"),se=cn("= += -= /= *= %= >>= <<= >>>= |= ^= &="),fi=function(e,n){for(var t=0;t<e.length;)for(var i=e[t++],r=0;r<i.length;r++)n[i[r]]=t;return n}([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),fe=cn("atom num regexp string");function ci(e,s){s=Z(s,{bare_returns:!1,expression:!1,filename:null,html5_comments:!0,shebang:!0,strict:!1,toplevel:null},!0);var f={input:"string"==typeof e?oe(e,s.filename,s.html5_comments,s.shebang):e,in_async:!1,in_directives:!0,in_funarg:-1,in_function:0,in_loop:0,labels:[],peeked:null,prev:null,token:null};function c(e,n){return re(f.token,e,n)}function u(){return f.peeked||(f.peeked=f.input())}function l(){return f.prev=f.token,f.peeked?(f.token=f.peeked,f.peeked=null):f.token=f.input(),f.in_directives=f.in_directives&&("string"==f.token.type||c("punc",";")),f.token}function p(){return f.prev}function a(e,n,t,i){var r=f.input.context();ie(e,r.filename,null!=n?n:r.tokline,null!=t?t:r.tokcol,null!=i?i:r.tokpos)}function o(e,n){a(n,e.line,e.col)}function t(e,n){return e+(void 0===n?"":" «"+n+"»")}function d(e){null==e&&(e=f.token),o(e,"Unexpected token: "+t(e.type,e.value))}function h(e,n){if(c(e,n))return l();o(f.token,"Unexpected token: "+t(f.token.type,f.token.value)+", expected: "+t(e,n))}function v(e){return h("punc",e)}function m(e){return e.nlb||!un(e.comments_before,function(e){return!e.nlb})}function _(){return!s.strict&&(c("eof")||c("punc","}")||m(f.token))}function g(e){c("punc",";")?l():e||_()||v(";")}function b(){v("(");var e=K();return v(")"),e}function n(i){return function(){var e=f.token,n=i.apply(null,arguments),t=p();return n.start=e,n.end=t,n}}function y(){(c("operator","/")||c("operator","/="))&&(f.peeked=null,f.token=f.input(f.token.value.substr(1)))}f.token=l();var w=n(function(){switch(y(),f.token.type){case"string":var e=f.in_directives,n=K();return e&&(n instanceof Wt?(r=n.start.raw.slice(1,-1),f.input.add_directive(r),n.value=r):f.in_directives=e=!1),g(),e?new _n(n):new bn({body:n});case"num":case"regexp":case"operator":case"atom":return x();case"name":switch(f.token.value){case"async":if(re(u(),"keyword","function"))return l(),l(),T(Un);case"await":if(f.in_async)return x();default:return(re(u(),"punc",":")?function(){var n=I(ee);un(f.labels,function(e){return e.name!=n.name})||a("Label "+n.name+" defined twice");v(":"),f.labels.push(n);var e=w();f.labels.pop(),e instanceof Sn||n.references.forEach(function(e){e instanceof Xn&&o(e.label.start,"Continue label `"+n.name+"` must refer to IterationStatement")});return new En({body:e,label:n})}:x)()}case"punc":switch(f.token.value){case"{":return new kn({start:f.token,body:D(),end:p()});case"[":case"(":return x();case";":return f.in_directives=!1,l(),new gn;default:d()}case"keyword":switch(f.token.value){case"break":return l(),k(Gn);case"const":l();var t=A();return g(),t;case"continue":return l(),k(Xn);case"debugger":return l(),g(),new mn;case"do":l();n=Q(w);h("keyword","while");var i=b();return g(!0),new Dn({body:n,condition:i});case"while":return l(),new On({condition:b(),body:Q(w)});case"for":return l(),function(){v("(");var e=null;if(!c("punc",";")&&(e=c("keyword","const")?(l(),A(!0)):c("keyword","let")?(l(),z(!0)):c("keyword","var")?(l(),$(!0)):K(!0),c("operator","in")))return e instanceof ot?1<e.definitions.length&&o(e.start,"Only one variable declaration allowed in for..in loop"):J(e)||(e=G(e))instanceof Tt||o(e.start,"Invalid left-hand side in for..in loop"),l(),function(e){var n=K();return v(")"),new zn({init:e,object:n,body:Q(w)})}(e);return function(e){v(";");var n=c("punc",";")?null:K();v(";");var t=c("punc",")")?null:K();return v(")"),new An({init:e,condition:n,step:t,body:Q(w)})}(e)}();case"function":return l(),T(Bn);case"if":return l(),function(){var e=b(),n=w(),t=null;c("keyword","else")&&(l(),t=w());return new Kn({condition:e,body:n,alternative:t})}();case"let":l();t=z();return g(),t;case"return":0!=f.in_function||s.bare_returns||a("'return' outside of function"),l();var r=null;return c("punc",";")?l():_()||(r=K(),g()),new Vn({value:r});case"switch":return l(),new Qn({expression:b(),body:Q(O)});case"throw":l(),m(f.token)&&a("Illegal newline after 'throw'");r=K();return g(),new Wn({value:r});case"try":return l(),function(){var e=D(),n=null,t=null;{var i;c("keyword","catch")&&(r=f.token,l(),i=null,c("punc","(")&&(l(),i=R(Bt),v(")")),n=new it({start:r,argname:i,body:D(),end:p()}))}{var r;c("keyword","finally")&&(r=f.token,l(),t=new rt({start:r,body:D(),end:p()}))}n||t||a("Missing catch/finally blocks");return new tt({body:e,bcatch:n,bfinally:t})}();case"var":l();t=$();return g(),t;case"with":return f.input.has_directive("use strict")&&a("Strict mode may not include a with statement"),l(),new $n({expression:b(),body:w()})}}d()});function x(){var e=K();return g(),new bn({body:e})}function k(e){var n,t=null;_()||(t=I(ne,!0)),null!=t?((n=Qe(function(e){return e.name==t.name},f.labels))||o(t.start,"Undefined label "+t.name),t.thedef=n):0==f.in_loop&&a(e.TYPE+" not inside a loop or switch"),g();e=new e({label:t});return n&&n.references.push(e),e}function E(e){return e instanceof St?new Dt({start:e.start,elements:e.elements.map(E),end:e.end}):e instanceof kt?new ut({start:e.start,name:E(e.left),value:e.right,end:e.end}):e instanceof ut?(e.name=E(e.name),e):e instanceof Dt?(e.elements=e.elements.map(E),e):e instanceof At?(e.properties.forEach(function(e){e.value=E(e.value)}),e):e instanceof Zt?e:e instanceof zt?new At({start:e.start,properties:e.properties.map(function(e){return e instanceof Mt||o(e.start,"Invalid destructuring assignment"),new Ot({start:e.start,key:e.key,value:E(e.value),end:e.end})}),end:e.end}):e instanceof Yt?new It(e):void o(e.start,"Invalid arrow parameter")}function S(e,n){var t=f.in_async;f.in_async=!1;var i=f.in_funarg;f.in_funarg=f.in_function;var r,o,a=e.map(E);f.in_funarg=i,v("=>");e=f.in_loop,i=f.labels;return++f.in_function,f.in_directives=!0,f.input.push_directives_stack(),f.in_loop=0,f.labels=[],c("punc","{")?(r=D(),o=null,f.input.has_directive("use strict")&&a.forEach(H)):(r=[],o=X()),f.input.pop_directives_stack(),--f.in_function,f.in_loop=e,f.labels=i,f.in_async=t,new Nn({start:n,argnames:a,body:r,value:o,end:p()})}var T=function(e){var n,t=f.in_async;e===Un?(n=I(Rt),f.in_async=!0):e===Bn?(n=I(Rt),f.in_async=!1):(f.in_async=e===Hn,n=I(Ut,!0)),!n||e===qn||n instanceof Ct||d(p()),v("(");var i=f.in_funarg;f.in_funarg=f.in_function;var r=j(")",!s.strict,!1,function(){return U(It)});f.in_funarg=i;var o=f.in_loop,a=f.labels;++f.in_function,f.in_directives=!0,f.input.push_directives_stack(),f.in_loop=0,f.labels=[];i=D();return f.input.has_directive("use strict")&&(n&&H(n),r.forEach(H)),f.input.pop_directives_stack(),--f.in_function,f.in_loop=o,f.labels=a,f.in_async=t,new e({name:n,argnames:r,body:i})};function D(){v("{");for(var e=[];!c("punc","}");)c("eof")&&v("}"),e.push(w());return l(),e}function O(){v("{");for(var e,n,t,i,r=[];!c("punc","}");)c("eof")&&v("}"),c("keyword","case")?(e&&(e.end=p()),n=[],e=new nt({start:(i=f.token,l(),i),expression:K(),body:n}),r.push(e),v(":")):c("keyword","default")?(e&&(e.end=p()),t&&a("More than one default clause in switch statement"),n=[],e=new et({start:(i=f.token,l(),v(":"),i),body:n}),r.push(e),t=e):(n||d(),n.push(w()));return e&&(e.end=p()),l(),r}function i(e,n){for(var t=[];;){var i=f.token,r=R(e),o=null;if(c("operator","=")?(l(),o=X(n)):!n&&(e===Nt||r instanceof Tt)&&a("Missing initializer in declaration"),t.push(new ct({start:i,name:r,value:o,end:p()})),!c("punc",","))break;l()}return t}var A=function(e){return new at({start:p(),definitions:i(Nt,e),end:p()})},z=function(e){return new st({start:p(),definitions:i(Pt,e),end:p()})},$=function(e){return new ft({start:p(),definitions:i(Ht,e),end:p()})};var M=function(e){if(c("operator","new"))return function(e){var n=f.token;h("operator","new");var t=M(!1),i=c("punc","(")?(l(),j(")",!s.strict)):[],i=new pt({start:n,expression:t,args:i,end:p()});return B(i),Y(i,e)}(e);var n,t=f.token;if(c("punc")){switch(t.value){case"(":if(l(),c("punc",")"))return l(),S([],t);var i=K(!1,!0),r=t.comments_before.length;[].unshift.apply(i.start.comments_before,t.comments_before),t.comments_before.length=0,t.comments_before=i.start.comments_before,0==(t.comments_before_length=r)&&0<t.comments_before.length&&((o=t.comments_before[0]).nlb||(o.nlb=t.nlb,t.nlb=!1)),t.comments_after=i.start.comments_after,i.start=t,v(")");var o=p();return o.comments_before=i.end.comments_before,[].push.apply(i.end.comments_after,o.comments_after),o.comments_after.length=0,o.comments_after=i.end.comments_after,i.end=o,i instanceof lt&&B(i),c("punc","=>")?S(i instanceof dt?i.expressions:[i],t):Y(i,e);case"[":return Y(F(),e);case"{":return Y(C(),e)}d()}if(c("name","async")&&re(u(),"keyword","function")?(l(),n=Hn):c("keyword","function")&&(n=In),n){l();var a=T(n);return a.start=t,a.end=p(),Y(a,e)}if(c("name")){a=P(Yt,t);return l(),c("punc","=>")?S([a],t):Y(a,e)}if(fe[f.token.type])return Y(function(){var e,n=f.token;switch(n.type){case"num":e=new Jt({start:n,end:n,value:n.value});break;case"string":e=new Wt({start:n,end:n,value:n.value,quote:n.quote});break;case"regexp":e=new Gt({start:n,end:n,value:n.value});break;case"atom":switch(n.value){case"false":e=new ti({start:n,end:n});break;case"true":e=new ii({start:n,end:n});break;case"null":e=new Xt({start:n,end:n})}}return l(),e}(),e);d()};function j(e,n,t,i){i=i||X;for(var r=!0,o=[];!c("punc",e)&&(r?r=!1:v(","),!n||!c("punc",e));)t&&c("punc",",")?o.push(new Zt({start:f.token,end:f.token})):i===X&&c("operator","...")?o.push(new _t({start:f.token,expression:(l(),i()),end:p()})):o.push(i());return l(),o}var F=n(function(){return v("["),new St({elements:j("]",!s.strict,!0)})}),q=n(function(){return T(qn)}),C=n(function(){v("{");for(var e=!0,n=[];!c("punc","}")&&(e?e=!1:v(","),s.strict||!c("punc","}"));){var t=f.token;if(c("operator","..."))l(),n.push(new _t({start:t,expression:X(),end:p()}));else if(re(u(),"operator","=")){var i=I(Yt);l(),n.push(new Mt({start:t,key:t.value,value:new kt({start:t,left:i,operator:"=",right:X(),end:p()}),end:p()}))}else if(re(u(),"punc",",")||re(u(),"punc","}"))n.push(new Mt({start:t,key:t.value,value:I(Yt),end:p()}));else{var r=N();if(c("punc","(")){var o=f.token;(a=T(In)).start=o,a.end=p(),n.push(new Mt({start:t,key:r,value:a,end:p()}))}else if(c("punc",":"))l(),n.push(new Mt({start:t,key:r,value:X(),end:p()}));else{if("name"==t.type)switch(r){case"async":r=N();var a,o=f.token;(a=T(Hn)).start=o,a.end=p(),n.push(new Mt({start:t,key:r,value:a,end:p()}));continue;case"get":n.push(new Ft({start:t,key:N(),value:q(),end:p()}));continue;case"set":n.push(new jt({start:t,key:N(),value:q(),end:p()}));continue}d()}}}return l(),new zt({properties:n})});function N(){var e=f.token;switch(e.type){case"operator":te[e.value]||d();case"num":case"string":case"name":case"keyword":case"atom":return l(),""+e.value;case"punc":v("[");var n=X();return v("]"),n;default:d()}}function P(e,n){var t=n.value;return"await"===t&&f.in_async&&d(n),new("this"===t?Lt:e)({name:""+t,start:n,end:n})}function H(e){"arguments"!=e.name&&"eval"!=e.name||o(e.start,"Unexpected "+e.name+" in strict mode")}function I(e,n){if(!c("name"))return n||a("Name expected"),null;e=P(e,f.token);return f.input.has_directive("use strict")&&e instanceof Ct&&H(e),l(),e}function R(e){var n=f.token;if(c("punc","["))return l(),new Dt({start:n,elements:j("]",!s.strict,!0,function(){return U(e)}),end:p()});if(c("punc","{")){l();for(var t=!0,i=[];!c("punc","}")&&(t?t=!1:v(","),s.strict||!c("punc","}"));){var r,o=f.token;c("punc","[")||re(u(),"punc",":")?(r=N(),v(":"),i.push(new Ot({start:o,key:r,value:U(e),end:p()}))):(r=I(e),c("operator","=")&&(l(),r=new ut({start:r.start,name:r,value:X(),end:p()})),i.push(new Ot({start:o,key:o.value,value:r,end:p()})))}return l(),new At({start:n,properties:i,end:p()})}return I(e)}function U(e){var n=f.token,e=R(e);return c("operator","=")?(l(),new ut({start:n,name:e,value:X(),end:p()})):e}function B(e){for(var n=e.start,t=n.comments_before,i=pn(n,"comments_before_length")?n.comments_before_length:t.length;0<=--i;){var r=t[i];if(/[@#]__PURE__/.test(r.value)){e.pure=r;break}}}var Y=function(e,n){var t=e.start;if(c("punc","."))return l(),Y(new vt({start:t,expression:e,property:(i=f.token.value,h("name"),i),end:p()}),n);if(c("punc","[")){l();var i=K();return v("]"),Y(new mt({start:t,expression:e,property:i,end:p()}),n)}if(n&&c("punc","(")){l();t=new lt({start:t,expression:e,args:j(")",!s.strict),end:p()});return B(t),Y(t,!0)}return e};function r(e,n,t){var i=n.value;switch(i){case"++":case"--":J(t)||o(n,"Invalid use of "+i+" operator");break;case"delete":t instanceof Yt&&f.input.has_directive("use strict")&&o(t.start,"Calling delete on expression not allowed in strict mode")}return new e({operator:i,expression:t})}function L(){var e=f.token;return f.in_async&&c("name","await")?(f.in_funarg===f.in_function&&a("Invalid use of await in function argument"),f.input.context().regex_allowed=!0,l(),new Et({start:e,expression:L(),end:p()})):function(){var e=f.token;if(c("operator")&&ae[e.value]){l(),y();var n=r(bt,e,L());return n.start=e,n.end=p(),n}for(var t=M(!0);c("operator")&&si[f.token.value]&&!m(f.token);)(t=r(yt,f.token,t)).start=e,t.end=f.token,l();return t}()}var V=function(e,n,t){var i=c("operator")?f.token.value:null;"in"==i&&t&&(i=null);var r=null!=i?fi[i]:null;if(null!=r&&n<r){l();r=V(L(),r,t);return V(new wt({start:e.start,left:e,operator:i,right:r,end:r.end}),n,t)}return e};var W=function(e){var n=f.token,t=(i=e,V(L(),0,i));if(c("operator","?")){l();var i=X();return v(":"),new xt({start:n,condition:t,consequent:i,alternative:X(e),end:p()})}return t};function J(e){return e instanceof ht||e instanceof Yt}function G(e){if(e instanceof St){var n=e.elements.map(G);return un(n,function(e){return e instanceof ut||e instanceof Tt||e instanceof Zt||J(e)})?new Dt({start:e.start,elements:n,end:e.end}):e}if(e instanceof kt){n=G(e.left);return n instanceof Tt||J(n)?new ut({start:e.start,name:n,value:e.right,end:e.end}):e}if(!(e instanceof zt))return e;for(var t=[],i=0;i<e.properties.length;i++){var r=e.properties[i];if(!(r instanceof Mt))return e;var o=G(r.value);if(!(o instanceof ut||o instanceof Tt||J(o)))return e;t.push(new Ot({start:r.start,key:r.key,value:o,end:r.end}))}return new At({start:e.start,properties:t,end:e.end})}function X(e){var n=f.token,t=W(e),i=f.token.value;if(c("operator")&&se[i]){if(J(t)||"="==i&&(t=G(t))instanceof Tt)return l(),new kt({start:n,left:t,operator:i,right:X(e),end:p()});a("Invalid assignment")}return t}function K(e,n){for(var t=f.token,i=[];i.push(X(e)),c("punc",",")&&(l(),!(n&&c("punc",")")&&re(u(),"punc","=>"))););return 1==i.length?i[0]:new dt({start:t,expressions:i,end:p()})}function Q(e){++f.in_loop;e=e();return--f.in_loop,e}if(s.expression){y();e=K();return h("eof"),e}return function(){var e=f.token,n=[];for(f.input.push_directives_stack();!c("eof");)n.push(w());f.input.pop_directives_stack();var t=p(),i=s.toplevel;return i?(i.body=i.body.concat(n),i.end=t):i=new jn({start:e,body:n,end:t}),i}()}function ui(e,n){ri.call(this),this.before=e,this.after=n}function d(e,n){return on(e,function(e){return e.transform(n,!0)})}function m(e,n,t,i){this.eliminated=0,this.global=!1,this.id=e,this.init=i,this.lambda=t instanceof Ut,this.mangled_name=null,this.name=t.name,this.orig=[t],this.references=[],this.replaced=0,this.scope=n,this.undeclared=!1}ui.prototype=new ri,(p=function(e,r){e.DEFMETHOD("transform",function(e,n){var t,i;return e.push(this),e.before&&(t=e.before(this,r,n)),void 0===t&&(r(t=this,e),e.after&&void 0!==(i=e.after(t,n))&&(t=i)),e.pop(),t})})(hn,Ze),p(En,function(e,n){e.label=e.label.transform(n),e.body=e.body.transform(n)}),p(bn,function(e,n){e.body=e.body.transform(n)}),p(xn,function(e,n){e.body=d(e.body,n)}),p(Dn,function(e,n){e.body=e.body.transform(n),e.condition=e.condition.transform(n)}),p(On,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n)}),p(An,function(e,n){e.init&&(e.init=e.init.transform(n)),e.condition&&(e.condition=e.condition.transform(n)),e.step&&(e.step=e.step.transform(n)),e.body=e.body.transform(n)}),p(zn,function(e,n){e.init=e.init.transform(n),e.object=e.object.transform(n),e.body=e.body.transform(n)}),p($n,function(e,n){e.expression=e.expression.transform(n),e.body=e.body.transform(n)}),p(Ln,function(e,n){e.value&&(e.value=e.value.transform(n))}),p(Jn,function(e,n){e.label&&(e.label=e.label.transform(n))}),p(Kn,function(e,n){e.condition=e.condition.transform(n),e.body=e.body.transform(n),e.alternative&&(e.alternative=e.alternative.transform(n))}),p(Qn,function(e,n){e.expression=e.expression.transform(n),e.body=d(e.body,n)}),p(nt,function(e,n){e.expression=e.expression.transform(n),e.body=d(e.body,n)}),p(tt,function(e,n){e.body=d(e.body,n),e.bcatch&&(e.bcatch=e.bcatch.transform(n)),e.bfinally&&(e.bfinally=e.bfinally.transform(n))}),p(it,function(e,n){e.argname&&(e.argname=e.argname.transform(n)),e.body=d(e.body,n)}),p(ot,function(e,n){e.definitions=d(e.definitions,n)}),p(ct,function(e,n){e.name=e.name.transform(n),e.value&&(e.value=e.value.transform(n))}),p(ut,function(e,n){e.name=e.name.transform(n),e.value=e.value.transform(n)}),p(Fn,function(e,n){e.name&&(e.name=e.name.transform(n)),e.argnames=d(e.argnames,n),e.body=d(e.body,n)}),p(Nn,function(e,n){e.argnames=d(e.argnames,n),e.value?e.value=e.value.transform(n):e.body=d(e.body,n)}),p(lt,function(e,n){e.expression=e.expression.transform(n),e.args=d(e.args,n)}),p(dt,function(e,n){e.expressions=d(e.expressions,n)}),p(Et,function(e,n){e.expression=e.expression.transform(n)}),p(vt,function(e,n){e.expression=e.expression.transform(n)}),p(mt,function(e,n){e.expression=e.expression.transform(n),e.property=e.property.transform(n)}),p(_t,function(e,n){e.expression=e.expression.transform(n)}),p(gt,function(e,n){e.expression=e.expression.transform(n)}),p(wt,function(e,n){e.left=e.left.transform(n),e.right=e.right.transform(n)}),p(xt,function(e,n){e.condition=e.condition.transform(n),e.consequent=e.consequent.transform(n),e.alternative=e.alternative.transform(n)}),p(St,function(e,n){e.elements=d(e.elements,n)}),p(Dt,function(e,n){e.elements=d(e.elements,n)}),p(Ot,function(e,n){e.key instanceof hn&&(e.key=e.key.transform(n)),e.value=e.value.transform(n)}),p(At,function(e,n){e.properties=d(e.properties,n)}),p(zt,function(e,n){e.properties=d(e.properties,n)}),p($t,function(e,n){e.key instanceof hn&&(e.key=e.key.transform(n)),e.value=e.value.transform(n)}),m.prototype={forEach:function(e){this.orig.forEach(e),this.references.forEach(e)},mangle:function(e){var n,t=e.cache&&e.cache.props;this.global&&t&&t.has(this.name)?this.mangled_name=t.get(this.name):this.mangled_name||this.unmangleable(e)||(n=this.redefined(),this.mangled_name=n?n.mangled_name||n.name:function(e,i){var n,t=e.scope,r=b(t,i),o=t.cname_holes,a=Object.create(null),s=[t];e.forEach(function(e){var n=e.scope;do{if(!(s.indexOf(n)<0))break;for(var t in b(n,i))a[t]=!0}while(s.push(n),n=n.parent_scope)});for(var f=0;f<o.length;f++)if(n=Y(o[f]),!a[n])return o.splice(f,1),r[n]=!0,n;for(;;)if(n=Y(++t.cname),!(r[n]||l[n]||i.reserved.has[n])){if(!a[n])break;o.push(t.cname)}return r[n]=!0,n}(this,e),this.global&&t&&t.set(this.name,this.mangled_name))},redefined:function(){var e=this.defun;if(e){var n=this.name,e=e.variables.get(n)||e instanceof jn&&e.globals.get(n)||this.orig[0]instanceof Nt&&Qe(function(e){return e.name==n},e.enclosed);return e&&e!==this?e.redefined()||e:void 0}},unmangleable:function(e){return this.global&&!e.toplevel||this.undeclared||!e.eval&&this.scope.pinned()||e.keep_fnames&&(this.orig[0]instanceof Ut||this.orig[0]instanceof Rt)}};var li=cn("delete ++ --");function _(e,n){e.enclosed=[],e.parent_scope=n,e.functions=new ln,e.variables=new ln,n&&(e.make_def=n.make_def)}function g(e,n){_(e,n),e.uses_eval=!1,e.uses_with=!1}function b(e,n){var t,i=e.names_in_use;return i||(e.cname=-1,e.cname_holes=[],e.names_in_use=i=Object.create(null),t=n.cache&&n.cache.props,e.enclosed.forEach(function(e){e.unmangleable(n)&&(i[e.name]=!0),e.global&&t&&t.has(e.name)&&(i[t.get(e.name)]=!0)})),i}function y(e){return e=Z(e,{eval:!1,ie8:!1,keep_fnames:!1,reserved:[],toplevel:!1,v8:!1,webkit:!1}),Array.isArray(e.reserved)||(e.reserved=[]),an(e.reserved,"arguments"),e.reserved.has=cn(e.reserved),e}jn.DEFMETHOD("figure_out_scope",function(c){c=Z(c,{cache:null,ie8:!1});var u=this,o=null,t=0,a=u.parent_scope=null,l=new ri(function(i,e){if(Rn(i))return i.name.walk(l),t(function(){i.argnames.forEach(function(e){e.walk(l)}),wn(i,l)}),!0;if(i instanceof Zn)return i.init_vars(a),e(),!0;if(i instanceof tt)return t(function(){wn(i,l)}),i.bcatch&&i.bcatch.walk(l),i.bfinally&&i.bfinally.walk(l),!0;if(i instanceof $n){for(var n=a;!(n=n.resolve()).uses_with&&(n.uses_with=!0,n=n.parent_scope););return t(e),!0}if(i instanceof yn)return t(e),!0;function t(e){i.init_vars(a);var n=o,t=a;i instanceof Mn&&(o=i),a=i,e(),a=t,o=n}function r(e,n){e!==n&&(i.mark_enclosed(c),n=n.find_variable(i.name),i.thedef!==n&&((i.thedef=n).orig.push(i),i.mark_enclosed(c)))}i instanceof qt&&(i.scope=a),i instanceof ee&&((i.thedef=i).references=[]),i instanceof Bt||i instanceof Nt?a.def_variable(i).defun=o:i instanceof Rt?(o.def_function(i,l.parent()),r(o,a)):i instanceof It?(o.def_variable(i),r(o,a)):i instanceof Ut?(e=o.def_function(i,"arguments"==i.name?void 0:o),c.ie8&&(e.defun=o.parent_scope.resolve())):i instanceof Pt?a.def_variable(i):i instanceof Ht&&(o.def_variable(i,null),r(o,a))});u.make_def=function(e,n){return new m(++t,this,e,n)},u.walk(l),u.globals=new ln;var p=[],l=new ri(function(e){if(e instanceof it)return e.argname instanceof Tt?(p.push(e),e.argname.walk(l),p.pop(),wn(e,l),!0):void 0;if(e instanceof Fn)return p.push(e),e.argnames.forEach(function(e){e.walk(l)}),p.pop(),e instanceof Nn&&e.value?e.value.walk(l):wn(e,l),!0;if(e instanceof Jn)return e.label&&e.label.thedef.references.push(e),!0;if(e instanceof Bt){var n=e.definition().redefined();if(n)for(var t=e.scope;t&&(an(t.enclosed,n),t!==n.scope);t=t.parent_scope);return!0}if(e instanceof Nt){var i=e.definition().redefined();return i&&(i.const_redefs=!0),!0}if(e instanceof Yt){for(var r,o=e.name,a=e.scope.find_variable(o),s=p.length;0<s&&a&&!((s=p.lastIndexOf(a.scope,s-1))<0);){var f=a.orig[0];if(f instanceof Bt||f instanceof It||f instanceof Ut){e.in_arg=!0;break}a=a.scope.parent_scope.find_variable(o)}if(a?"arguments"==o&&d(a)&&((r=l.parent())instanceof kt&&r.left===e||r instanceof gt&&li[r.operator]?a.scope.uses_arguments=3:a.scope.uses_arguments<2&&!(r instanceof ht&&r.expression===e)?a.scope.uses_arguments=2:a.scope.uses_arguments||(a.scope.uses_arguments=!0)):a=u.def_global(e),"eval"==o)if("Call"==(r=l.parent()).TYPE&&r.expression===e)for(t=e.scope;!(t=t.resolve()).uses_eval&&(t.uses_eval=!0,t=t.parent_scope););else a.undeclared&&(u.uses_eval=!0);return e.thedef=a,e.reference(c),!0}e instanceof ct&&e.value&&"arguments"==e.name.name&&(a=e.name.scope.resolve().find_variable("arguments"))&&d(a)&&(a.scope.uses_arguments=3)});function d(e){return e.orig[0]instanceof It&&!(e.orig[1]instanceof It||e.orig[2]instanceof It)&&!(e.scope instanceof Nn)}function i(e,n){var t,i,r=e.name,o=e.thedef;un(o.orig,function(e){return!(e instanceof Nt||e instanceof Pt)})&&((t=n.find_variable(r))?(i=t.redefined())&&(t=i):t=u.globals.get(r),t?t.orig.push(e):t=n.def_variable(e),o.defun=t.scope,o.forEach(function(e){e.redef=!0,e.thedef=t,e.reference(c)}),o.lambda&&(t.lambda=!0),t.undeclared&&u.variables.set(r,t))}u.walk(l),c.ie8&&u.walk(new ri(function(e){if(e instanceof Bt){var n=e.thedef.defun;return n.name instanceof Ut&&n.name.name==e.name&&(n=n.parent_scope.resolve()),i(e,n),!0}if(e instanceof Ut){n=e.thedef;return i(e,e.scope.parent_scope.resolve()),void 0!==e.thedef.init?e.thedef.init=!1:n.init&&(e.thedef.init=n.init),!0}}))}),jn.DEFMETHOD("def_global",function(e){var n=this.globals,t=e.name;if(n.has(t))return n.get(t);e=this.make_def(e);return e.undeclared=!0,e.global=!0,n.set(t,e),e}),yn.DEFMETHOD("init_vars",function(e){_(this,e)}),Mn.DEFMETHOD("init_vars",function(e){g(this,e)}),Nn.DEFMETHOD("init_vars",function(e){g(this,e)}),Fn.DEFMETHOD("init_vars",function(e){return g(this,e),this.uses_arguments=!1,this.def_variable(new It({name:"arguments",start:this.start,end:this.end})),this}),qt.DEFMETHOD("mark_enclosed",function(e){for(var n=this.definition(),t=this.scope;t&&(an(t.enclosed,n),e.keep_fnames&&t.functions.each(function(e){an(n.scope.enclosed,e)}),t!==n.scope);t=t.parent_scope);}),qt.DEFMETHOD("reference",function(e){this.definition().references.push(this),this.mark_enclosed(e)}),yn.DEFMETHOD("find_variable",function(e){return this.variables.get(e)||this.parent_scope&&this.parent_scope.find_variable(e)}),yn.DEFMETHOD("def_function",function(e,n){var t=this.def_variable(e,n);return t.init&&!Rn(t.init)||(t.init=n),this.functions.set(e.name,t),t}),yn.DEFMETHOD("def_variable",function(e,n){var t=this.variables.get(e.name);return t?(t.orig.push(e),Cn(t.init)&&(t.init=n)):(t=this.make_def(e,n),this.variables.set(e.name,t),t.global=!this.parent_scope),e.thedef=t}),qt.DEFMETHOD("unmangleable",function(e){var n=this.definition();return!n||n.unmangleable(e)}),ee.DEFMETHOD("unmangleable",en),qt.DEFMETHOD("definition",function(){return this.thedef}),jn.DEFMETHOD("mangle_names",function(o){o=y(o);var n,r=-1;o.cache&&o.cache.props&&(n=b(this,o),o.cache.props.each(function(e){n[e]=!0}));var a=[],s=new ri(function(n,e){if(n instanceof En){var t=r;return e(),o.v8&&function(e){var n,t=0;for(;n=e.parent(t++);){if(n instanceof xn)return n instanceof jn&&!o.toplevel;if(n instanceof En)return!0}}(s)||(r=t),!0}var i;if(n instanceof yn)return o.webkit&&n instanceof Sn&&n.init instanceof st&&n.init.definitions.forEach(function(e){e.name.match_symbol(function(e){var n,t,i;e instanceof Pt&&(n=e.definition(),t=e.scope.parent_scope,i=t.def_variable(e),e.thedef=n,t.to_mangle.push(i),n.redefined=function(){return i})})},!0),n.to_mangle=[],n.variables.each(function(e){!function(n){var e=n.orig[0],t=n.redefined();if(!t){if(!(e instanceof Nt))return!1;var i=n.scope.resolve();if(n.scope===i)return!1;t=i.def_variable(e),i.to_mangle.push(t)}a.push(n),n.references.forEach(r),(e instanceof Bt||e instanceof Nt)&&r(e);return!0;function r(e){e.thedef=t,e.reference(o),e.thedef=n}}(e)&&n.to_mangle.push(e)}),e(),o.cache&&n instanceof jn&&n.globals.each(f),n instanceof Bn&&s.has_directive("use asm")&&((e=new Yt(n.name)).scope=n,e.reference(o)),n.to_mangle.forEach(f),!0;if(n instanceof ee){for(;i=Y(++r),l[i];);return n.mangled_name=i,!0}});function f(e){o.reserved.has[e.name]||e.mangle(o)}this.walk(s),a.forEach(f)}),jn.DEFMETHOD("find_colliding_names",function(t){var i=t.cache&&t.cache.props,n=Object.create(l);return t.reserved.forEach(r),this.globals.each(o),this.walk(new ri(function(e){e instanceof yn&&e.variables.each(o)})),n;function r(e){n[e]=!0}function o(e){var n=e.name;if(e.global&&i&&i.has(n))n=i.get(n);else if(!e.unmangleable(t))return;r(n)}}),jn.DEFMETHOD("expand_names",function(i){Y.reset(),Y.sort(),i=y(i);var r=this.find_colliding_names(i),o=0;function n(n){var e,t;n.global&&i.cache||n.unmangleable(i)||i.reserved.has[n.name]||(e=n.redefined(),t=e?e.rename||e.name:function(){for(var e;e=Y(o++),r[e];);return e}(),n.rename=t,n.forEach(function(e){e.definition()===n&&(e.name=t)}))}this.globals.each(n),this.walk(new ri(function(e){e instanceof yn&&e.variables.each(n)}))}),hn.DEFMETHOD("tail_node",tn),dt.DEFMETHOD("tail_node",function(){return this.expressions[this.expressions.length-1]}),jn.DEFMETHOD("compute_char_frequency",function(e){e=y(e),Y.reset();var n=qt.prototype.add_source_map;try{qt.prototype.add_source_map=function(){this.unmangleable(e)||Y.consider(this.name,-1)},e.properties&&(vt.prototype.add_source_map=function(){Y.consider(this.property,-1)},mt.prototype.add_source_map=function(){!function e(n){n instanceof Wt?Y.consider(n.value,-1):n instanceof xt?(e(n.consequent),e(n.alternative)):n instanceof dt&&e(n.tail_node())}(this.property)}),Y.consider(this.print_to_string(),1)}finally{qt.prototype.add_source_map=n,delete vt.prototype.add_source_map,delete mt.prototype.add_source_map}Y.sort()});var w,x,k,E,S,B,Y=(w=Object.create(null),E=L("0123456789"),S=L("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_"),J.consider=function(e,n){for(var t=e.length;0<=--t;)k[e[t]]+=n},J.sort=function(){x=S.sort(W).concat(E.sort(W))},(J.reset=V)(),J);function L(e){for(var n=[],t=0;t<e.length;t++){var i=e[t];n.push(i),w[i]=-.01*t}return n}function V(){k=Object.create(w)}function W(e,n){return k[n]-k[e]}function J(e){var n="",t=54;for(e++;n+=x[--e%t],e=Math.floor(e/t),t=64,0<e;);return n}function G(e){return"comment2"==e.type&&/@preserve|@license|@cc_on/i.test(e.value)}function pi(f){var e=!f;f=Z(f,{ascii_only:!1,beautify:!1,braces:!1,comments:!1,galio:!1,ie8:!1,indent_level:4,indent_start:0,inline_script:!0,keep_quoted_props:!1,max_line_len:!1,preamble:null,preserve_line:!1,quote_keys:!1,quote_style:0,semicolons:!0,shebang:!0,source_map:null,v8:!1,webkit:!1,width:80,wrap_iife:!1},!0);var n,c=en;f.comments&&(n=f.comments,"string"==typeof f.comments&&/^\/.*\/[a-zA-Z]*$/.test(f.comments)&&(F=f.comments.lastIndexOf("/"),n=new RegExp(f.comments.substr(1,F-1),f.comments.substr(F+1))),c=n instanceof RegExp?function(e){return"comment5"!=e.type&&n.test(e.value)}:"function"==typeof n?function(e){return"comment5"!=e.type&&n(this,e)}:"some"===n?G:nn);var i=f.indent_start,r=0,o=1,u=0,a="",s=f.ascii_only?function(e,t){return t&&(e=e.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){return"\\u{"+(e.charCodeAt(0)-55232<<10|e.charCodeAt(1)-56320).toString(16)+"}"})),e.replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var n=e.charCodeAt(0).toString(16);if(n.length<=2&&!t){for(;n.length<2;)n="0"+n;return"\\x"+n}for(;n.length<4;)n="0"+n;return"\\u"+n})}:function(e){for(var n,t="",i=0,r=0;i<e.length;i++){var o=e.charCodeAt(i);if(55296<=(n=o)&&n<=56319){if(I(e.charCodeAt(i+1))){i++;continue}}else if(!I(o))continue;t+=e.slice(r,i)+"\\u"+o.toString(16),r=i+1}return 0==r?e:t+e.slice(r)};function t(e,n){n=function(t,e){var i=0,r=0;function n(){return"'"+t.replace(/\x27/g,"\\'")+"'"}function o(){return'"'+t.replace(/\x22/g,'\\"')+'"'}switch(t=t.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g,function(e,n){switch(e){case'"':return++i,'"';case"'":return++r,"'";case"\\":return"\\\\";case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\v":return f.ie8?"\\x0B":"\\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case"\ufeff":return"\\ufeff";case"\0":return/[0-9]/.test(t.charAt(n+1))?"\\x00":"\\0"}return e}),t=s(t),f.quote_style){case 1:return n();case 2:return o();case 3:return("'"==e?n:o)();default:return(r<i?n:o)()}}(e,n);return f.inline_script&&(n=(n=(n=n.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2")).replace(/\x3c!--/g,"\\x3c!--")).replace(/--\x3e/g,"--\\x3e")),n}var l,p,d=!1,h=0,v=!0,m=!1,_=!1,g=!1,b=!1,y=-1,w="",x=f.source_map&&[],k=x?function(n,t){x.forEach(function(e){e.line+=n,e.col+=t})}:Ze,E=x?function(){x.forEach(function(e){f.source_map.add(e.token.file,e.line,e.col,e.token.line,e.token.col,e.name||"name"!=e.token.type?e.name:e.token.value)}),x=[]}:Ze;function S(e){var n=a.lastIndexOf("\n");h<n&&(h=n);var t=a.slice(0,h),n=a.slice(h);for(k(e,n.length-r),o+=e,u+=e,r=n.length,a=t;e--;)a+="\n";a+=n}var T=f.max_line_len?function(){v?r>f.max_line_len&&hn.warn("Output exceeds {max_line_len} characters",f):(r>f.max_line_len&&S(1),v=!0,E())}:Ze,D=cn("( [ + * / - , .");function O(e){var n=(e=String(e)).charAt(0);g&&n&&(g=!1,"\n"!=n&&(O("\n"),z())),b&&n&&(b=!1,/[\s;})]/.test(n)||A()),y=-1;var t=w.slice(-1);_&&(_=!1,(":"==t&&"}"==n||(!n||";}".indexOf(n)<0)&&";"!=t)&&(f.semicolons||D[n]?(a+=";",r++,u++):(T(),a+="\n",u++,o++,r=0,/^\s+$/.test(e)&&(_=!0)),f.beautify||(m=!1))),m&&((R(t)&&(R(n)||"\\"==n)||"/"==n&&n==t||("+"==n||"-"==n)&&n==w||"--"==e&&"!"==w||"in"==e&&"/"==t||"--"==w&&">"==n)&&(a+=" ",r++,u++),"<"==t&&"!"==e||(m=!1)),l&&(x.push({token:l,name:p,line:o,col:r}),l=!1,v&&E()),a+=e,d="("==e.slice(-1),u+=e.length;n=e.split(/\r?\n/),t=n.length-1;o+=t,r+=n[0].length,0<t&&(T(),r=n[t].length),w=e}var A=f.beautify?function(){O(" ")}:function(){m=!0},z=f.beautify?function(e){O(function e(n,t){if(t<=0)return"";if(1==t)return n;var i=e(n,t>>1);return i+=i,1&t?i+n:i}(" ",e?i-(f.indent_level>>1):i))}:Ze,$=f.beautify?function(e,n){!0===e&&(e=q());var t=i;i=e;n=n();return i=t,n}:function(e,n){return n()},M=f.max_line_len||f.preserve_line?function(){T(),h=a.length,v=!1}:Ze,j=f.beautify?function(){if(y<0)return O("\n");"\n"!=a[y]&&(a=a.slice(0,y)+"\n"+a.slice(y),u++,o++),y++}:M,F=f.beautify?function(){O(";")}:function(){_=!0};function q(){return i+f.indent_level}function C(){return v||T(),a}function N(){var e=a.lastIndexOf("\n");return/^ *$/.test(a.slice(e+1))}var P=[];return{get:C,toString:C,indent:z,should_break:e?Ze:function(){return f.width&&r-i>=f.width},has_parens:function(){return d},newline:j,print:O,space:A,comma:function(){M(),O(","),M(),A()},colon:function(){O(":"),A()},last:function(){return w},semicolon:F,force_semicolon:function(){_&&O(";"),O(";")},to_utf8:s,print_name:function(e){O((e=(e=e).toString(),e=s(e,!0)))},print_string:function(e,n){O(t(e,n))},next_indent:q,with_indent:$,with_block:function(e){var n;return O("{"),j(),$(q(),function(){n=e()}),z(),O("}"),n},with_parens:function(e){return O("("),M(),e=e(),M(),O(")"),e},with_square:function(e){return O("["),M(),e=e(),M(),O("]"),e},add_mapping:x?function(e,n){l=e,p=n}:Ze,option:function(e){return f[e]},prepend_comments:e?Ze:function(e){var t,n,i,r=this,o=e instanceof Ln&&e.value,a=(a=s(e))||[];function s(e){var n=e.start;if(!n){if(!o)return;e.start=n=new H}e=n.comments_before;if(!e){if(!o)return;n.comments_before=e=[]}if(e._dumped!==r)return e._dumped=r,e}o&&((t=new ri(function(e){var n=t.parent();if(!(n instanceof Ln||n instanceof wt&&n.left===e||"Call"==n.TYPE&&n.expression===e||n instanceof xt&&n.condition===e||n instanceof vt&&n.expression===e||n instanceof dt&&n.expressions[0]===e||n instanceof mt&&n.expression===e||n instanceof yt))return!0;e=s(e);e&&(a=a.concat(e))})).push(e),e.value.walk(t)),0==u&&(0<a.length&&f.shebang&&"comment5"==a[0].type&&(O("#!"+a.shift().value+"\n"),z()),(n=f.preamble)&&O(n.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))),0!=(a=a.filter(c,e)).length&&(i=N(),a.forEach(function(e,n){i||(e.nlb?(O("\n"),z(),i=!0):0<n&&A()),/comment[134]/.test(e.type)?(O("//"+e.value.replace(/[@#]__PURE__/g," ")+"\n"),z(),i=!0):"comment2"==e.type&&(O("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),i=!1)}),i||(e.start.nlb?(O("\n"),z()):A()))},append_comments:e||c===en?Ze:function(e,t){var n,i=e.end;!i||(n=i[t?"comments_before":"comments_after"])&&n._dumped!==this&&(e instanceof vn||un(n,function(e){return!/comment[134]/.test(e.type)}))&&(n._dumped=this,i=a.length,n.filter(c,e).forEach(function(e,n){b=!1,g?(O("\n"),z(),g=!1):e.nlb&&(0<n||!N())?(O("\n"),z()):(0<n||!t)&&A(),/comment[134]/.test(e.type)?(O("//"+e.value.replace(/[@#]__PURE__/g," ")),g=!0):"comment2"==e.type&&(O("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),b=!0)}),a.length>i&&(y=i))},line:function(){return o},col:function(){return r},pos:function(){return u},push_node:function(e){P.push(e)},pop_node:f.preserve_line?function(){var e=P.pop();e.start&&e.start.line>o&&S(e.start.line-o)}:function(){P.pop()},parent:function(e){return P[P.length-2-(e||0)]}}}function X(e,n){e.DEFMETHOD("_codegen",n)}function K(e,n){e.DEFMETHOD("needs_parens",n)}function Q(e){if(!e.has_parens()&&dn(e))return!0;var n;if(e.option("webkit")&&((n=e.parent())instanceof ht&&n.expression===this))return!0;if(e.option("wrap_iife")&&((n=e.parent())instanceof lt&&n.expression===this))return!0}function ce(e){return!e.has_parens()&&dn(e,!0)}function ue(e,n){n=n.parent();return n instanceof Et||(n instanceof wt?!(n instanceof kt):n instanceof lt?n.expression===e:n instanceof xt?n.condition===e:n instanceof ht?n.expression===e:n instanceof gt||void 0)}function le(e,t,i,n){var r=e.length-1,o=n,n=B;e.forEach(function(e,n){o&&(e instanceof _n?"use asm"==e.value&&(B=!0):e instanceof gn||(e instanceof bn&&e.body instanceof Wt&&i.force_semicolon(),o=!1)),e instanceof gn||(i.indent(),e.print(i),n==r&&t||(i.newline(),t&&i.newline()))}),B=n}function pe(e,n){n.print("{"),n.with_indent(n.next_indent(),function(){n.append_comments(e,!0)}),n.print("}")}function de(e,n,t){0<e.body.length?n.with_block(function(){le(e.body,!1,n,t)}):pe(e,n)}function he(e,t){e.name&&(t.space(),e.name.print(t)),t.with_parens(function(){e.argnames.forEach(function(e,n){n&&t.comma(),e.print(t)})}),t.space(),de(e,t,!0)}function ve(e){e.print("async"),e.space(),e.print("function"),he(this,e)}function me(t,i){return function(e){e.print(t);var n=this[i];n&&(e.space(),n.print(e)),e.semicolon()}}function _e(e,n){n.newline(),e.body.forEach(function(e){n.indent(),e.print(n),n.newline()})}function ge(n){return function(t){t.print(n),t.space(),this.definitions.forEach(function(e,n){n&&t.comma(),e.print(t)});var e=t.parent();(e&&e.init!==this||!(e instanceof An||e instanceof zn))&&t.semicolon()}}function be(e,n,t){var i=!1;t&&e.walk(new ri(function(e){return!!i||(e instanceof wt&&"in"==e.operator?i=!0:e instanceof Mn&&!(e instanceof Nn&&e.value)||void 0)})),e.print(n,i)}function ye(e,t){(e.expression instanceof lt||e.expression instanceof Fn)&&t.add_mapping(e.start),t.with_parens(function(){e.args.forEach(function(e,n){n&&t.comma(),e.print(t)})})}function we(e,n){var t=e.key;t instanceof hn?n.with_square(function(){t.print(n)}):n.option("quote_keys")?n.print_string(t):""+ +t==t&&0<=t?n.print(Te(t)):(e=e.start&&e.start.quote,(l[t]?n.option("ie8"):!oi(t))||e&&n.option("keep_quoted_props")?n.print_string(t,e):n.print_name(t))}function xe(e){we(this,e),e.colon(),this.value.print(e)}function ke(n){return function(e){e.print(n),e.space(),we(this,e),he(this.value,e)}}function Ee(e,n){n.option("braces")&&!(e instanceof at||e instanceof st)?De(e,n):!e||e instanceof gn?n.force_semicolon():e.print(n)}function Se(e,n){return 0<e.args.length||n.option("beautify")}function Te(e){var n,t,i=e.toString(10).replace(/^0\./,".").replace("e+","e"),r=[i];return Math.floor(e)===e&&(e<0?r.push("-0x"+(-e).toString(16).toLowerCase()):r.push("0x"+e.toString(16).toLowerCase())),(n=/^\.0+/.exec(i))?(t=n[0].length,e=i.slice(t),r.push(e+"e-"+(e.length+t-1))):(n=/0+$/.exec(i))?(t=n[0].length,r.push(i.slice(0,-t)+"e"+t)):(n=/^(\d)\.(\d+)e(-?\d+)$/.exec(i))&&r.push(n[1]+n[2]+"e"+(n[3]-n[2].length)),function(e){for(var n=e[0],t=n.length,i=1;i<e.length;++i)e[i].length<t&&(t=(n=e[i]).length);return n}(r)}function De(e,n){!e||e instanceof gn?n.print("{}"):e instanceof kn?e.print(n):n.with_block(function(){n.indent(),e.print(n),n.newline()})}function Oe(e,n){e.forEach(function(e){e.DEFMETHOD("add_source_map",n)})}function di(e,n){if(!(this instanceof di))return new di(e,n);ui.call(this,this.before,this.after),this.options=Z(e,{arguments:!n,arrows:!n,assignments:!n,booleans:!n,collapse_vars:!n,comparisons:!n,conditionals:!n,dead_code:!n,default_values:!n,directives:!n,drop_console:!1,drop_debugger:!n,evaluate:!n,expression:!1,functions:!n,global_defs:!1,hoist_funs:!1,hoist_props:!n,hoist_vars:!1,ie8:!1,if_return:!n,inline:!n,join_vars:!n,keep_fargs:n,keep_fnames:!1,keep_infinity:!1,loops:!n,merge_vars:!n,negate_iife:!n,objects:!n,passes:1,properties:!n,pure_getters:!n&&"strict",pure_funcs:null,reduce_funcs:!n,reduce_vars:!n,sequences:!n,side_effects:!n,spread:!n,strings:!n,switches:!n,top_retain:null,toplevel:!(!e||!e.top_retain),typeofs:!n,unsafe:!1,unsafe_comps:!1,unsafe_Function:!1,unsafe_math:!1,unsafe_proto:!1,unsafe_regexp:!1,unsafe_undefined:!1,unused:!n,varify:!n},!0);n=this.options.evaluate;this.eval_threshold=/eager/.test(n)?1/0:+n;var t=this.options.global_defs;if("object"==typeof t)for(var i in t)/^@/.test(i)&&pn(t,i)&&(t[i.slice(1)]=ci(t[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=3),this.drop_fargs=this.options.keep_fargs?en:function(e,n){if(e.length_read)return!1;var t=e.name;if(!t)return n&&"Call"==n.TYPE&&n.expression===e;if(t.fixed_value()!==e)return!1;t=t.definition();if(t.direct_access)return!1;t=t.escaped;return t&&1!=t.depth};var r=this.options.pure_funcs;"function"==typeof r?this.pure_funcs=r:"string"==typeof r?this.pure_funcs=function(e){return r!==e.expression.print_to_string()}:Array.isArray(r)?this.pure_funcs=function(e){return!Ke(e.expression.print_to_string(),r)}:this.pure_funcs=nn;n=this.options.sequences;this.sequences_limit=1==n?800:0|n;var o=this.options.top_retain;o instanceof RegExp?this.top_retain=function(e){return o.test(e.name)}:"function"==typeof o?this.top_retain=o:o&&("string"==typeof o&&(o=o.split(/,/)),this.top_retain=function(e){return Ke(e.name,o)});n=this.options.toplevel;this.toplevel="string"==typeof n?{funcs:/funcs/.test(n),vars:/vars/.test(n)}:{funcs:n,vars:n}}B=!1,hn.DEFMETHOD("print",function(e,n){var t=this;function i(){e.prepend_comments(t),t.add_source_map(e),t._codegen(e),e.append_comments(t)}e.push_node(t),n||t.needs_parens(e)?e.with_parens(i):i(),e.pop_node()}),hn.DEFMETHOD("print_to_string",function(e){e=pi(e);return this.print(e),e.get()}),K(hn,en),K(Hn,Q),K(In,Q),K(zt,ce),K(gt,function(e){e=e.parent();return(e instanceof lt||e instanceof ht)&&e.expression===this}),K(dt,function(e){e=e.parent();return e instanceof St||e instanceof Nn&&e.value===this||e instanceof Et||e instanceof wt||e instanceof lt||e instanceof xt||e instanceof ut||e instanceof Ot||e instanceof $t||e instanceof ht&&e.expression===this||e instanceof _t||e instanceof gt||e instanceof ct}),K(wt,function(e){var n=e.parent();if(n instanceof Et)return!0;if(n instanceof wt){var t=n.operator,e=fi[t],t=this.operator,t=fi[t];return t<e||e==t&&this===n.right}return n instanceof lt||n instanceof ht?n.expression===this:n instanceof gt||void 0}),K(ht,function(e){var n=this,e=e.parent();if(e instanceof pt&&e.expression===n){for(;n=n.expression,n instanceof ht;);return"Call"==n.TYPE}}),K(lt,function(e){var n=e.parent();if(n instanceof pt)return n.expression===this;if(e.option("webkit")){e=e.parent(1);return this.expression instanceof In&&n instanceof ht&&n.expression===this&&e instanceof kt&&e.left===n}}),K(pt,function(e){if(Se(this,e))return!1;e=e.parent();return e instanceof lt?e.expression===this:e instanceof ht}),K(Jt,function(e){var n=e.parent();if(n instanceof ht&&n.expression===this){n=this.value;return n<0||e.option("galio")&&/^0/.test(Te(n))}}),K(Nn,function(e){return ue(this,e)}),K(kt,function(e){return!!ue(this,e)||(e.option("v8")?this.left instanceof Tt:this.left instanceof At?ce(e):void 0)}),K(xt,function(e){return ue(this,e)}),K(Et,function(e){e=e.parent();return e instanceof lt||e instanceof ht?e.expression===this:void 0}),X(_n,function(e){var n=this.quote,t=this.value;switch(e.option("quote_style")){case 0:case 2:-1==t.indexOf('"')&&(n='"');break;case 1:-1==t.indexOf("'")&&(n="'")}e.print(n+t+n),e.semicolon()}),X(mn,function(e){e.print("debugger"),e.semicolon()}),X(vn,function(e){this.body.print(e),e.semicolon()}),X(jn,function(e){le(this.body,!0,e,!0),e.print("")}),X(En,function(e){this.label.print(e),e.colon(),this.body.print(e)}),X(bn,function(e){this.body.print(e),e.semicolon()}),X(kn,function(e){de(this,e)}),X(gn,function(e){e.semicolon()}),X(Dn,function(e){var n=this;e.print("do"),e.space(),De(n.body,e),e.space(),e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.semicolon()}),X(On,function(e){var n=this;e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.space(),Ee(n.body,e)}),X(An,function(e){var n=this;e.print("for"),e.space(),e.with_parens(function(){n.init?(n.init instanceof ot?n.init.print(e):be(n.init,e,!0),e.print(";"),e.space()):e.print(";"),n.condition?(n.condition.print(e),e.print(";"),e.space()):e.print(";"),n.step&&n.step.print(e)}),e.space(),Ee(n.body,e)}),X(zn,function(e){var n=this;e.print("for"),e.space(),e.with_parens(function(){n.init.print(e),e.space(),e.print("in"),e.space(),n.object.print(e)}),e.space(),Ee(n.body,e)}),X($n,function(e){var n=this;e.print("with"),e.space(),e.with_parens(function(){n.expression.print(e)}),e.space(),Ee(n.body,e)}),X(Nn,function(t){var e=this;1==e.argnames.length&&e.argnames[0]instanceof It?e.argnames[0].print(t):t.with_parens(function(){e.argnames.forEach(function(e,n){n&&t.comma(),e.print(t)})}),t.space(),t.print("=>"),t.space(),e.value?e.value.print(t):de(e,t,!0)}),X(Fn,function(e){e.print("function"),he(this,e)}),X(Un,ve),X(Hn,ve),X(Vn,me("return","value")),X(Wn,me("throw","value")),X(Gn,me("break","label")),X(Xn,me("continue","label")),X(Kn,function(e){var n=this;e.print("if"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.space(),n.alternative?(function(e,n){var t=e.body;if(n.option("braces")&&!(t instanceof at||t instanceof st)||n.option("ie8")&&t instanceof Dn)return De(t,n);if(!t)return n.force_semicolon();for(;;)if(t instanceof Kn){if(!t.alternative)return De(e.body,n);t=t.alternative}else{if(!(t instanceof f))break;t=t.body}Ee(e.body,n)}(n,e),e.space(),e.print("else"),e.space(),n.alternative instanceof Kn?n.alternative.print(e):Ee(n.alternative,e)):Ee(n.body,e)}),X(Qn,function(t){var e=this;t.print("switch"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space();var i=e.body.length-1;i<0?pe(e,t):t.with_block(function(){e.body.forEach(function(e,n){t.indent(!0),e.print(t),n<i&&0<e.body.length&&t.newline()})})}),X(et,function(e){e.print("default:"),_e(this,e)}),X(nt,function(e){e.print("case"),e.space(),this.expression.print(e),e.print(":"),_e(this,e)}),X(tt,function(e){var n=this;e.print("try"),e.space(),de(n,e),n.bcatch&&(e.space(),n.bcatch.print(e)),n.bfinally&&(e.space(),n.bfinally.print(e))}),X(it,function(e){var n=this;e.print("catch"),n.argname&&(e.space(),e.with_parens(function(){n.argname.print(e)})),e.space(),de(n,e)}),X(rt,function(e){e.print("finally"),e.space(),de(this,e)}),X(at,ge("const")),X(st,ge("let")),X(ft,ge("var")),X(ct,function(e){var n;this.name.print(e),this.value&&(e.space(),e.print("="),e.space(),n=(n=e.parent(1))instanceof An||n instanceof zn,be(this.value,e,n))}),X(ut,function(e){this.name.print(e),e.space(),e.print("="),e.space(),this.value.print(e)}),X(lt,function(e){this.expression.print(e),ye(this,e)}),X(pt,function(e){e.print("new"),e.space(),this.expression.print(e),Se(this,e)&&ye(this,e)}),X(dt,function(t){this.expressions.forEach(function(e,n){0<n&&(t.comma(),t.should_break()&&(t.newline(),t.indent())),e.print(t)})}),X(vt,function(e){var n=this.expression;n.print(e);var t=this.property;e.option("ie8")&&l[t]?(e.print("["),e.add_mapping(this.end),e.print_string(t),e.print("]")):(n instanceof Jt&&0<=n.value&&(/[xa-f.)]/i.test(e.last())||e.print(".")),e.print("."),e.add_mapping(this.end),e.print_name(t))}),X(mt,function(e){this.expression.print(e),e.print("["),this.property.print(e),e.print("]")}),X(_t,function(e){e.print("..."),this.expression.print(e)}),X(bt,function(e){var n=this.operator,t=this.expression;e.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&t instanceof bt&&/^[+-]/.test(t.operator))&&e.space(),t.print(e)}),X(yt,function(e){this.expression.print(e),e.print(this.operator)}),X(wt,function(e){this.left.print(e),e.space(),e.print(this.operator),e.space(),this.right.print(e)}),X(xt,function(e){this.condition.print(e),e.space(),e.print("?"),e.space(),this.consequent.print(e),e.space(),e.colon(),this.alternative.print(e)}),X(Et,function(e){e.print("await"),e.space(),this.expression.print(e)}),X(St,function(t){var e=this.elements,i=e.length;t.with_square(0<i?function(){t.space(),e.forEach(function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof Zt&&t.comma()}),t.space()}:Ze)}),X(Dt,function(t){var e=this.elements,i=e.length;t.with_square(0<i?function(){t.space(),e.forEach(function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof Zt&&t.comma()}),t.space()}:Ze)}),X(Ot,xe),X(At,function(t){var e=this.properties;0<e.length?t.with_block(function(){e.forEach(function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)}),t.newline()}):pe(this,t)}),X(zt,function(t){var e=this.properties;0<e.length?t.with_block(function(){e.forEach(function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)}),t.newline()}):pe(this,t)}),X(Mt,xe),X(Ft,ke("get")),X(jt,ke("set")),X(qt,function(e){var n=this.definition();e.print_name(n&&n.mangled_name||this.name)}),X(Zt,Ze),X(Lt,function(e){e.print("this")}),X(Vt,function(e){e.print(this.value)}),X(Wt,function(e){e.print_string(this.value,this.quote)}),X(Jt,function(e){var n=this.start;B&&n&&null!=n.raw?e.print(n.raw):e.print(Te(this.value))}),X(Gt,function(e){var n=this.value,t=n.toString(),i=t.lastIndexOf("/");n.raw_source?t="/"+n.raw_source+t.slice(i):1==i?t="/(?:)"+t.slice(i):t.indexOf("/",1)<i&&(t="/"+t.slice(1,i).replace(/\\\\|[^/]?\//g,function(e){return"\\"==e[0]?e:e.slice(0,-1)+"\\/"})+t.slice(i)),e.print(e.to_utf8(t).replace(/\\(?:\0(?![0-9])|[^\0])/g,function(e){switch(e[1]){case"\n":return"\\n";case"\r":return"\\r";case"\t":return"\t";case"\b":return"\b";case"\f":return"\f";case"\0":return"\0";case"\v":return"\v";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e}}).replace(/[\n\r\u2028\u2029]/g,function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029"}}));t=e.parent();t instanceof wt&&/^in/.test(t.operator)&&t.left===this&&e.print(" ")}),Oe([hn,En],Ze),Oe([St,kn,it,Vt,mn,ot,Tt,rt,Yn,Fn,pt,zt,f,qt,Qn,Zn,tt],function(e){e.add_mapping(this.start)}),Oe([Ot,$t],function(e){"string"==typeof this.key&&e.add_mapping(this.start,this.key)}),t(di.prototype=new ui,{option:function(e){return this.options[e]},exposed:function(e){if(e.undeclared)return!0;if(!(e.global||e.scope.resolve()instanceof jn))return!1;var n=this.toplevel;return!un(e.orig,function(e){return n[e instanceof Rt?"funcs":"vars"]})},compress:function(e){e=e.resolve_defines(this),this.option("expression")&&e.process_expression(!0);for(var n=+this.options.passes||1,t=1/0,i=!1,r={ie8:this.option("ie8")},o=0;o<n;o++)if(e.figure_out_scope(r),(0<o||this.option("reduce_vars"))&&e.reset_opt_flags(this),e=e.transform(this),1<n){var a=0;if(e.walk(new ri(function(){a++})),hn.info("pass {pass}: last_count: {min_count}, count: {count}",{pass:o,min_count:t,count:a}),a<t)t=a,i=!1;else{if(i)break;i=!0}}return this.option("expression")&&e.process_expression(!1),e},before:function(e,n,t){if(e._squeezed)return e;var i=e instanceof Mn;i&&(e.hoist_properties(this),e.hoist_declarations(this),e.process_boolean_returns(this)),n(e,this),n(e,this);var r=e.optimize(this);return!i||r!==e||this.has_directive("use asm")||r.pinned()||(r.merge_variables(this),r.drop_unused(this),n(r,this)),r===e&&(r._squeezed=!0),r}}),function(e){function l(e,n){var t,i=n.getProperty();if(!(i instanceof hn)){if(e instanceof St){n=e.elements;if("length"==i)return k(n.length,e);"number"==typeof i&&i in n&&(t=n[i])}else if(e instanceof Fn){if("length"==i)return e.length_read=!0,k(e.argnames.length,e)}else if(e instanceof zt){i=""+i;for(var r=e.properties,o=r.length;0<=--o;){if(!(r[o]instanceof Mt))return;t||r[o].key!==i||(t=r[o].value)}}return t instanceof Yt&&t.fixed_value()||t}}function ee(e,n,t,i,r,o,a){var s=n.parent(r);if(!(e.option("unsafe")&&s instanceof vt&&(c=i,f=s.property,c instanceof ni?X.Boolean[f]:c instanceof Jt?X.Number[f]:c instanceof Wt?X.String[f]:"valueOf"!=f&&(c instanceof St?X.Array[f]:c instanceof Fn?X.Function[f]:c instanceof zt?X.Object[f]:c instanceof Gt&&(X.RegExp[f]&&!c.value.global))))){var f,c=ue(t,s);if(c)return c;if(s instanceof St)return ee(e,n,s,s,r+1);if(s instanceof lt)return!o&&s.expression===t&&!s.is_expr_pure(e)&&(!Cn(i)||!(s instanceof pt)&&i.contains_this());if(s instanceof zn)return s.init===t;if(s instanceof Mt){if(s.value!==t)return;c=n.parent(r+1);return ee(e,n,c,c,r+2)}if(s instanceof ht&&s.expression===t){i=l(i,s);return(!o||a)&&ee(e,n,s,i,r+1)}}}function ne(e){return"arguments"==e.name&&e.scope.uses_arguments}function h(e){return e.orig[0]instanceof It||e.orig[1]instanceof It}function B(e,n){do{if(e===n)return;if(n instanceof Mn)return 1}while(n=n.parent_scope)}function te(e,n){var t=e.definition();return(!e.in_arg||!h(t))&&un(t.orig,function(e){return!(e instanceof Nt||e instanceof Pt||n&&e instanceof Ut)})}function o(e,n,t){t.assignments=0,t.bool_fn=0,t.cross_loop=!1,t.direct_access=!1,t.escaped=[],t.fixed=!t.const_redefs&&!t.scope.pinned()&&!n.exposed(t)&&!(Cn(t.init)&&t.init!==t.scope)&&t.init,Rn(t.fixed)&&!un(t.references,function(e){var n=e.scope.resolve();do{if(t.scope===n)return 1}while(Cn(n)&&(n=n.parent_scope.resolve()))})&&(e.defun_ids[t.id]=!1),t.recursive_refs=0,t.references=[],t.should_replace=void 0,t.single_use=void 0}function f(n,t,e){e.variables.each(function(e){o(n,t,e),null===e.fixed?(e.safe_ids=n.safe_ids,d(n,e)):e.fixed&&(n.loop_ids[e.id]=n.in_loop,d(n,e))}),e.may_call_this=function(){e.may_call_this=Ze,e.contains_this()&&e.functions.each(function(e){!Rn(e.init)||e.id in n.defun_ids||(n.defun_ids[e.id]=!1)})},e.uses_arguments&&e.each_argname(function(e){e.definition().last_ref=!1}),t.option("ie8")&&e.variables.each(function(e){var n=e.orig[0].definition();n!==e&&(n.fixed=!1)})}function s(n,t){if(t.id in n.defun_ids){var e=n.defun_ids[t.id];if(e){var i=n.defun_visited[t.id];if(e===n.safe_ids){if(!i)return t.fixed}else i?t.init.enclosed.forEach(function(e){t.init.variables.get(e.name)!==e&&(m(n,e)||(e.fixed=!1))}):n.defun_ids[t.id]=!1}}else{if(!n.in_loop)return n.defun_ids[t.id]=n.safe_ids,t.fixed;n.defun_ids[t.id]=!1}}function c(n,e){e.functions.each(function(e){Rn(e.init)&&!n.defun_visited[e.id]&&(n.defun_ids[e.id]=n.safe_ids,e.init.walk(n))})}function u(e){e.safe_ids=Object.create(e.safe_ids)}function p(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function d(e,n){e.safe_ids[n.id]={}}function v(e,n){e.references.push(n),!1!==e.last_ref&&(e.last_ref=n)}function m(e,n){if("m"==n.single_use)return!1;var t=e.safe_ids[n.id];return t?(pn(e.safe_ids,n.id)||(t.read=!(!t.read||t.read===e.safe_ids)||e.safe_ids),null==n.fixed?!ne(n)&&((!n.global||"arguments"!=n.name)&&(e.loop_ids[n.id]=null,n.fixed=ie(Qt,n.orig[0]),!0)):!t.assign||t.assign===e.safe_ids):Rn(n.fixed)}function _(e,n,t){if(t||un(n.orig,function(e){return!(e instanceof Nt)})){if(void 0===n.fixed)return t||un(n.orig,function(e){return!(e instanceof Pt)});if(null===n.fixed&&n.safe_ids)return n.safe_ids[n.id]=!1,delete n.safe_ids,1;if(!1!==n.fixed){t=e.safe_ids[n.id];if(!pn(e.safe_ids,n.id)){if(!t)return;if(t.read&&n.scope!==e.find_parent(Mn))return;t.assign=!(!t.assign||t.assign===e.safe_ids)||e.safe_ids}if(null!=n.fixed&&t.read){if(t.read!==e.safe_ids)return;if(e.loop_ids[n.id]!==e.in_loop)return}return m(e,n)&&un(n.orig,function(e){return!(e instanceof Ut)})}}}function g(e,n){var t=ie(Yt,e,e);return t.fixed=n||ie(Qt,e),t}function b(e,n,t,i,r,o,a){var s,f,c=e.parent(o);if(!r||!r.is_constant()){if(s=n,f=i,(u=c)instanceof kt?"="==u.operator&&u.right===f:u instanceof lt?u.expression!==f||u instanceof pt:u instanceof Ln?u.value===f&&f.scope!==s.scope:u instanceof ct&&u.value===f)return n.escaped.push(c),!(1<a)||r&&r.is_constant_expression(t)||(a=1),void((!n.escaped.depth||n.escaped.depth>a)&&(n.escaped.depth=a));if(u=i,(f=c)instanceof St||(f instanceof wt?ce[f.operator]:f instanceof xt?f.condition!==u:f instanceof dt&&f.tail_node()===u))b(e,n,t,c,c,o+1,a);else if(c instanceof Mt&&c.value===i){var u=e.parent(o+1);b(e,n,t,u,u,o+2,a)}else if(c instanceof ht&&c.expression===i&&(b(e,n,t,c,r=l(r,c),o+1,a+1),r))return;0<o||c instanceof lt&&c.expression===i||c instanceof dt&&c.tail_node()!==i||c instanceof bn||c instanceof gt&&!li[c.operator]||(n.direct_access=!0)}}function y(e){var n;e instanceof mt&&((n=e.expression)instanceof Yt&&(ne(n=n.definition())&&((e=e.property).is_constant()&&(e=e.value),(e instanceof hn||/^[1-9]*[0-9]$/.test(e))&&(n.reassigned=!0,(e instanceof hn?n.scope.argnames:[n.scope.argnames[e]]).forEach(function(e){e instanceof It&&(e.definition().fixed=!1)})))))}function w(o,e,a,n){var s=new ri(function(i){if(i instanceof ut){x(i),u(o),i.value.walk(o),p(o);var r=a;return a=function(){var e=r();return fe(e)?Y(i,[e,i.value]):i.name},i.name.walk(s),a=r,!0}if(i instanceof Dt){x(i);r=a;return i.elements.forEach(function(e,n){return e instanceof Zt?x(e):(a=function(){return ie(mt,e,{expression:r(),property:ie(Jt,e,{value:n})})},void e.walk(s))}),a=r,!0}if(i instanceof At){x(i);r=a;return i.properties.forEach(function(t){x(t),t.key instanceof hn&&(u(o),t.key.walk(o),p(o)),a=function(){var e=t.key,n=mt;return"string"==typeof e&&(oi(e)?n=vt:e=k(e,t)),ie(n,t,{expression:r(),property:e})},t.value.walk(s)}),a=r,!0}return n(i,a,function(){for(var e=o.stack.length,n=0,t=s.stack.length-1;n<t;n++)o.stack.push(s.stack[n]);i.walk(o),o.stack.length=e}),!0});e.walk(s)}function n(e,n,t){var i=this.name.definition().id;return e.defun_visited[i]||e.defun_ids[i]!==e.safe_ids||(e.defun_visited[i]=!0,this.inlined=!1,u(e),f(e,t,this),n(),p(e),c(e,this)),!0}function a(r,e,n){var o=this;o.inlined=!1;var a=r.parent(),t=o instanceof Hn,i=!1;o.walk(new ri(function(e){return t?i=!0:e instanceof Vn?t=!0:e instanceof Mn&&e!==o||void 0})),i&&u(r),f(r,n,o);var s=!o.uses_arguments||r.has_directive("use strict");o.argnames.forEach(function(t,i){var n=a.args[i];w(r,t,function(){var e=o.argnames.indexOf(t);return(e<0?n:a.args[e])||ie(Qt,a)},function(e,n){e=e.definition();s&&void 0===e.fixed?(d(r,e),r.loop_ids[e.id]=r.in_loop,a.args[i],e.fixed=n,e.fixed.assigns=[t]):e.fixed=!1})}),o instanceof Nn&&o.value?o.value.walk(r):wn(o,r);n=r.safe_ids;return p(r),c(r,o),i||(r.safe_ids=n),!0}function x(e){e._squeezed=!1,e._optimized=!1,delete e.fixed,e instanceof Mn&&delete e._var_names}function t(e,n){e=ie(e,this,this);return n(e,this),e}function i(n,t){var i=new ri(function(e){return e instanceof ut?(e.value.walk(t),e.name.walk(i),!0):e instanceof Ot?(e.key instanceof hn&&e.key.walk(t),e.value.walk(i),!0):n(e)});this.walk(i)}function r(e){return e(this)}function H(e){for(var n,t=0;n=e.parent(t++);)if(n.variables)return n}function ie(e,n,t){return t=t||{},n&&(t.start||(t.start=n.start),t.end||(t.end=n.end)),new e(t)}function Y(e,n){return 1==n.length?n[0]:ie(dt,e,{expressions:n.reduce(E,[])})}function k(e,n){switch(typeof e){case"string":return ie(Wt,n,{value:e});case"number":return isNaN(e)?ie(Kt,n):isFinite(e)?1/e<0?ie(bt,n,{operator:"-",expression:ie(Jt,n,{value:-e})}):ie(Jt,n,{value:e}):e<0?ie(bt,n,{operator:"-",expression:ie(ei,n)}):ie(ei,n);case"boolean":return ie(e?ii:ti,n);case"undefined":return ie(Qt,n);default:if(null===e)return ie(Xt,n,{value:null});if(e instanceof RegExp)return ie(Gt,n,{value:e});throw new Error(sn("Can't handle constant of type: {type}",{type:typeof e}))}}function I(e,n){return n instanceof ht||U(n)&&"eval"==n.name}function re(e,n,t,i){var r=!1;return"Call"==n.TYPE?r=n.expression===t&&I(0,i):n instanceof bt&&(r="delete"==n.operator||"typeof"==n.operator&&U(i)),r?Y(t,[ie(Jt,t,{value:0}),i]):i}function E(e,n){return n instanceof dt?e.push.apply(e,n.expressions):e.push(n),e}function S(e){if(null===e)return[];if(e instanceof kn)return un(e.body,function(e){return!(e instanceof at||e instanceof st)})?e.body:[e];if(e instanceof gn)return[];if(e instanceof vn)return[e];throw new Error("Can't convert thing to statement array")}function L(e){return null===e||(e instanceof gn||e instanceof kn&&0==e.body.length)}function T(e){return un(e.body,function(e){return L(e)||e instanceof Bn||e instanceof ft&&un(e.definitions,function(e){return!e.value})})}function D(e){return e instanceof Sn&&e.body instanceof kn?e.body:e}function oe(e){for(;e instanceof ht;)e=e.expression;return e}function R(e){if("Call"!=e.TYPE)return!1;e=e.expression;return e instanceof Hn||e instanceof In||R(e)}function U(e){return e instanceof Yt&&e.definition().undeclared}function ae(e){return e[e instanceof kt?"right":"value"]}e(hn,function(e,n){return e}),hn.DEFMETHOD("equivalent_to",function(e){return this.TYPE==e.TYPE&&this.print_to_string()==e.print_to_string()}),Mn.DEFMETHOD("process_expression",function(t,i){var r=this,o=new ui(function(e){return t&&e instanceof bn?ie(Vn,e,{value:e.body}):!t&&e instanceof Vn?i?i(e):ie(bn,e,{body:e.value||ie(bt,e,{operator:"void",expression:ie(Jt,e,{value:0})})}):(e instanceof Fn&&e!==r||(e instanceof xn?0<=(n=e.body.length-1)&&(e.body[n]=e.body[n].transform(o)):e instanceof Kn?(e.body=e.body.transform(o),e.alternative&&(e.alternative=e.alternative.transform(o))):e instanceof $n&&(e.body=e.body.transform(o))),e);var n});r.transform(o)}),(G=function(e,n){e.DEFMETHOD("reduce_vars",n)})(hn,Ze),G(kt,function(r,e,o){var a=this,s=a.left;if("="==a.operator&&s.equivalent_to(a.right)&&!s.has_side_effects(o))a.right.walk(r),function e(n){{var t;n instanceof vt?e(n.expression):n instanceof mt?(e(n.expression),n.property.walk(r)):n instanceof Yt?(v(t=n.definition(),n),n.fixed=t.fixed):n.walk(r)}}(s),a.__drop=!0;else{if(!(s instanceof Tt||s instanceof Yt))return void y(s);if("="==a.operator)a.right.walk(r),w(r,s,function(){return a.right},function(e,n,t){if(!(e instanceof Yt))return y(e),void t();var i=e.definition();i.assignments++,!ee(o,r,a,a.right,0)&&_(r,i)?(v(i,e),d(r,i),i.single_use&&s instanceof Tt&&(i.single_use=!1),r.loop_ids[i.id]=r.in_loop,b(r,i,e.scope,a,a.right,0,1),e.fixed=i.fixed=n,e.fixed.assigns=[a]):(t(),i.fixed=!1)});else{var n=s.definition();n.assignments++;var t=n.fixed;if(ee(o,r,a,a,0))return void(n.fixed=!1);var i=m(r,n);a.right.walk(r),i&&_(r,n)?(v(n,s),d(r,n),n.single_use&&(n.single_use=!1),s.fixed=n.fixed=function(){return ie(wt,a,{operator:a.operator.slice(0,-1),left:g(s,t),right:a.right})},s.fixed.assigns=t&&t.assigns?t.assigns.slice():[],s.fixed.assigns.push(a)):(s.walk(r),n.fixed=!1)}}return!0}),G(Un,n),G(wt,function(e){if(ce[this.operator])return this.left.walk(e),u(e),this.right.walk(e),p(e),!0}),G(yn,function(n,e,t){this.variables.each(function(e){o(n,t,e)})}),G(lt,function(n,e){n.find_parent(Mn).may_call_this();var t=this.expression;if(Cn(t)){var i=!t.name;return this.args.forEach(function(e){e.walk(n),e instanceof _t&&(i=!1)}),i&&(t.reduce_vars=a),t.walk(n),i&&delete t.reduce_vars,!0}if(t instanceof Yt){var r=t.definition();if("Call"==this.TYPE&&n.in_boolean_context()&&r.bool_fn++,Rn(r.fixed)){r=s(n,r);if(r)return e(),r.walk(n),!0}}else"Call"==this.TYPE&&t instanceof kt&&"="==t.operator&&t.left instanceof Yt&&n.in_boolean_context()&&t.left.definition().bool_fn++}),G(xt,function(e){return this.condition.walk(e),u(e),this.consequent.walk(e),p(e),u(e),this.alternative.walk(e),p(e),!0}),G(ut,function(e){return this.name.walk(e),u(e),this.value.walk(e),p(e),!0}),G(Bn,n),G(Dn,function(e){var n=e.in_loop;return e.in_loop=this,u(e),this.body.walk(e),Ae(this,e.parent())&&(p(e),u(e)),this.condition.walk(e),p(e),e.in_loop=n,!0}),G(An,function(n,e,t){this.variables.each(function(e){o(n,t,e)}),this.init&&this.init.walk(n);var i=n.in_loop;return n.in_loop=this,u(n),this.condition&&this.condition.walk(n),this.body.walk(n),this.step&&(Ae(this,n.parent())&&(p(n),u(n)),this.step.walk(n)),p(n),n.in_loop=i,!0}),G(zn,function(n,e,t){this.variables.each(function(e){o(n,t,e)}),this.object.walk(n);var i=n.in_loop;n.in_loop=this,u(n);var r=this.init;return r instanceof ot?r.definitions[0].name.mark_symbol(function(e){e instanceof Ct&&((e=e.definition()).assignments++,e.fixed=!1)},n):r instanceof Tt||r instanceof Yt?r.mark_symbol(function(e){var n;e instanceof Yt&&(v(n=e.definition(),e),n.assignments++,e.is_immutable()||(n.fixed=!1))},n):r.walk(n),this.body.walk(n),p(n),n.in_loop=i,!0}),G(Kn,function(e){return this.condition.walk(e),u(e),this.body.walk(e),p(e),this.alternative&&(u(e),this.alternative.walk(e),p(e)),!0}),G(En,function(e){return u(e),this.body.walk(e),p(e),!0}),G(Fn,function(e,n,t){var i=this;return i.inlined=!1,u(e),f(e,t,i),n(),p(e),i.name&&b(e,i.name.definition(),i,i.name,i,0,1),c(e,i),!0}),G(Qn,function(n,e,t){this.variables.each(function(e){o(n,t,e)}),this.expression.walk(n);var i=!0;return this.body.forEach(function(e){e instanceof et||(e.expression.walk(n),i&&(i=!1,u(n)))}),i||p(n),wn(this,n),!0}),G(Zn,function(e){return u(e),wn(this,e),p(e),!0}),G(Bt,function(){this.definition().fixed=!1}),G(Yt,function(e,n,t){var i,r,o,a=this.definition();v(a,this),1==a.references.length&&!a.fixed&&a.orig[0]instanceof Rt&&(e.loop_ids[a.id]=e.in_loop),!1===a.fixed?(r=a.redefined())&&B(a.scope,this.scope)&&(r.single_use=!1):void 0!==a.fixed&&m(e,a)?a.fixed&&(this.in_arg&&a.orig[0]instanceof Ut&&(this.fixed=a.scope),o=this.fixed_value(),(i=Le(e,a))?a.recursive_refs++:!o||(r=a,!t.option("unused")||r.scope.pinned()||!1===r.single_use||r.references.length-r.recursive_refs!=1||h(r)&&r.scope.uses_arguments)?a.single_use=!1:(a.in_loop=e.loop_ids[a.id]!==e.in_loop,a.single_use=o instanceof Fn&&!o.pinned()&&(!a.in_loop||e.parent()instanceof lt)||!a.in_loop&&a.scope===this.scope.resolve()&&o.is_constant_expression()),ee(t,e,this,o,0,!!(t=o)&&(t.is_constant()||t instanceof Fn||t instanceof Lt),i)&&(a.single_use?a.single_use="m":a.fixed=!1),a.fixed&&e.loop_ids[a.id]!==e.in_loop&&(a.cross_loop=!0),b(e,a,this.scope,this,o,0,1)):a.fixed=!1,this.fixed||(this.fixed=a.fixed),!Rn(a.fixed)||(o=e.parent())instanceof lt&&o.expression===this||(a=s(e,a))&&a.walk(e)}),G(jn,function(n,e,t){return this.globals.each(function(e){o(n,t,e)}),u(n),f(n,t,this),e(),p(n),c(n,this),!0}),G(tt,function(n,e,t){return this.variables.each(function(e){o(n,t,e)}),u(n),wn(this,n),p(n),this.bcatch&&(u(n),this.bcatch.walk(n),p(n)),this.bfinally&&this.bfinally.walk(n),!0}),G(gt,function(e,n){var t=this;if(si[t.operator]){var i=t.expression;if(i instanceof Yt){var r=i.definition();r.assignments++;var o=r.fixed;return m(e,r)&&_(e,r)?(v(r,i),d(e,r),r.single_use&&(r.single_use=!1),r.fixed=function(){return ie(wt,t,{operator:t.operator.slice(0,-1),left:ie(bt,t,{operator:"+",expression:g(i,o)}),right:ie(Jt,t,{value:1})})},r.fixed.assigns=o&&o.assigns?o.assigns.slice():[],r.fixed.assigns.push(t),t instanceof bt?i.fixed=r.fixed:(i.fixed=function(){return ie(bt,t,{operator:"+",expression:g(i,o)})},i.fixed.assigns=o&&o.assigns)):(i.walk(e),r.fixed=!1),!0}y(i)}}),G(ct,function(i){var r=this;if(r.value)return r.value.walk(i),w(i,r.name,function(){return r.value},function(e,n){var t=e.definition();_(i,t,!0)?(d(i,t),i.loop_ids[t.id]=i.in_loop,t.fixed=n,t.fixed.assigns=[r],(e instanceof Nt&&t.redefined()||!te(e)&&!Me(t))&&(t.single_use=!1)):t.fixed=!1}),!0}),G(On,function(e,n){var t=e.in_loop;return e.in_loop=this,u(e),n(),p(e),e.in_loop=t,!0}),jn.DEFMETHOD("reset_opt_flags",function(t){var i=new ri(t.option("reduce_vars")?function(e,n){return x(e),e.reduce_vars(i,n,t)}:x);i.defun_ids=Object.create(null),i.defun_visited=Object.create(null),i.in_loop=null,i.loop_ids=Object.create(null),i.safe_ids=Object.create(null),this.walk(i)}),qt.DEFMETHOD("fixed_value",function(){var e=this.definition().fixed;return e&&(this.fixed&&(e=this.fixed),e instanceof hn?e:e())}),Yt.DEFMETHOD("is_immutable",function(){var e=this.definition();if(1!=e.orig.length)return!1;var n=e.orig[0];return n instanceof Ut&&e.scope.name===n}),hn.DEFMETHOD("convert_symbol",Ze),Tt.DEFMETHOD("convert_symbol",function(t,i){return this.transform(new ui(function(e,n){return e instanceof ut?((e=e.clone()).name=e.name.transform(this),e):e instanceof Tt?(n(e=e.clone(),this),e):e instanceof Ot?((e=e.clone()).value=e.value.transform(this),e):e.convert_symbol(t,i)}))}),Ct.DEFMETHOD("convert_symbol",t),Yt.DEFMETHOD("convert_symbol",t),ut.DEFMETHOD("mark_symbol",i),Tt.DEFMETHOD("mark_symbol",i),Ct.DEFMETHOD("mark_symbol",r),Yt.DEFMETHOD("mark_symbol",r),hn.DEFMETHOD("match_symbol",function(e){return e(this)}),Tt.DEFMETHOD("match_symbol",function(n,t){var i=!1,r=new ri(function(e){return!!i||(e instanceof ut?t?(e.name.walk(r),!0):i=!0:e instanceof Ot?!t&&e.key instanceof hn?i=!0:(e.value.walk(r),!0):n(e)?i=!0:void 0)});return this.walk(r),i});var O=cn("Array Boolean clearInterval clearTimeout console Date decodeURI decodeURIComponent encodeURI encodeURIComponent Error escape eval EvalError Function isFinite isNaN JSON Math Number parseFloat parseInt RangeError ReferenceError RegExp Object setInterval setTimeout String SyntaxError TypeError unescape URIError");Yt.DEFMETHOD("is_declared",function(e){return this.defined||!this.definition().undeclared||e.option("unsafe")&&O[this.name]});var se=cn("Infinity NaN undefined");function A(e){return un(e.definitions,function(e){return!e.value})}function z(e){return e instanceof Bn||e instanceof ft&&A(e)}function $(e,c){var X,K,Q;!function(){var e=c.self(),n=0;do{if(e instanceof it)c.parent(n).bfinally||n++;else if(e instanceof rt)n++;else if(e instanceof Sn)X=!0;else{if(e instanceof Mn){Q=e;break}e instanceof tt&&(K=K||e)}}while(e=c.parent(n++))}();for(var Z,n=10;Z=!1,function e(n){var t=[];for(var i=0;i<n.length;){var r=n[i];if(r instanceof kn&&un(r.body,function(e){return!(e instanceof at||e instanceof st)}))Z=!0,e(r.body),[].splice.apply(n,[i,1].concat(r.body)),i+=r.body.length;else{if(r instanceof _n){if(Ke(r.value,t)){Z=!0,n.splice(i,1);continue}t.push(r.value)}r instanceof gn?(Z=!0,n.splice(i,1)):i++}}}(e),c.option("dead_code")&&function(n,t){for(var e,i=t.self(),r=0,o=0,a=n.length;r<a;r++){var s,f=n[r];if(f instanceof Jn?(s=t.loopcontrol_target(f),f instanceof Gn&&!(s instanceof Sn)&&D(s)===i||f instanceof Xn&&D(s)===i?f.label&&fn(f.label.thedef.references,f):n[o++]=f):n[o++]=f,_e(f)){e=n.slice(r+1);break}}n.length=o,Z=o!=a,e&&e.forEach(function(e){M(t,e,n)})}(e,c),c.option("if_return")&&function(t,r){for(var o=r.self(),e=r.parent(),i=h(function(e){return e instanceof Fn}),n=i&&e&&"Call"==e.TYPE,a=function(e){for(var n=0,t=e.length;0<=--t;){var i=e[t];if(i instanceof Kn&&i.body instanceof Vn&&1<++n)return!0}return!1}(t),s=t.length;0<=--s;){var f=t[s],c=b(s),u=t[c];if(i&&!u&&f instanceof Vn){if(!f.value){Z=!0,t.splice(s,1);continue}if(f.value instanceof bt&&"void"==f.value.operator){Z=!0,t[s]=ie(bn,f,{body:f.value.expression});continue}}if(f instanceof Kn){var l=_e(f.body);if(m(l)){l.label&&fn(l.label.thedef.references,l),Z=!0,(f=f.clone()).condition=f.condition.negate(r);var p=g(f.body,l);f.body=ie(kn,f,{body:S(f.alternative).concat(_())}),f.alternative=ie(kn,f,{body:p}),t[s]=f,t[s]=f.transform(r);continue}if(l&&!f.alternative&&f.body instanceof kn&&u instanceof Yn){var d=f.condition.negate(r);if(d.print_to_string().length<=f.condition.print_to_string().length){Z=!0,(f=f.clone()).condition=d,t[c]=f.body,f.body=u,t[s]=f,t[s]=f.transform(r);continue}}var d=_e(f.alternative);if(m(d)){d.label&&fn(d.label.thedef.references,d),Z=!0,(f=f.clone()).body=ie(kn,f.body,{body:S(f.body).concat(_())});p=g(f.alternative,d);f.alternative=ie(kn,f.alternative,{body:p}),t[s]=f,t[s]=f.transform(r);continue}r.option("typeofs")&&(l&&!d&&ze(f.condition,null,ie(kn,o,{body:t.slice(s+1)})),!l&&d&&ze(f.condition,ie(kn,o,{body:t.slice(s+1)})))}f instanceof Kn&&f.body instanceof Vn&&(l=f.body.value,d=f.body.in_bool||u instanceof Vn&&u.in_bool,l||f.alternative||!(i&&!u||u instanceof Vn&&!u.value)?!f.alternative&&u instanceof Vn?(Z=!0,(f=f.clone()).alternative=u,t.splice(s,1,f.transform(r)),t.splice(c,1)):f.alternative||u||!i||!(d||l&&a)?(l=t[function(e){for(var n=e;0<=--n&&z(t[n]););return n}(s)],r.option("sequences")&&i&&!f.alternative&&(!l&&n||l instanceof Kn&&l.body instanceof Vn)&&b(c)==t.length&&u instanceof bn&&(Z=!0,(f=f.clone()).alternative=ie(kn,u,{body:[u,ie(Vn,u,{value:null})]}),t.splice(s,1,f.transform(r)),t.splice(c,1))):(Z=!0,(f=f.clone()).alternative=ie(Vn,f,{value:null}),t.splice(s,1,f.transform(r))):(Z=!0,t[s]=ie(bn,f.condition,{body:f.condition})))}function h(e){var n,t=o,i=0;do{do{if(e(t))return!0}while((t=r.parent(i++))instanceof Kn&&(n=t))}while((t instanceof kn||t instanceof Mn)&&function(e,n){var t=e.lastIndexOf(n);if(!(t<0)){for(;++t<e.length;)if(!z(e[t]))return;return 1}}(t.body,n))}function v(n){return h(function(e){return e===n})}function m(e){if(e instanceof Vn)return i&&(!(n=e.value)||n instanceof bt&&"void"==n.operator);if(e instanceof Jn){var n=r.loopcontrol_target(e);return e instanceof Xn?v(D(n)):!(n instanceof Sn)&&v(n)}}function _(){var e=t.slice(s+1);return t.length=s+1,e.filter(function(e){return!(e instanceof Bn)||(t.push(e),!1)})}function g(e,n){for(var t,e=S(e),i=e;(t=i[i.length-1])!==n;)i=t.body;return i.pop(),n.value&&i.push(ie(bn,n.value,{body:n.value.expression})),e}function b(e){for(var n=e+1;n<t.length&&z(t[n]);n++);return n}}(e,c),0<c.sequences_limit&&(function(n,e){if(!(n.length<2)){for(var t=[],i=0,r=0,o=n.length;r<o;r++){var a,s=n[r];s instanceof bn?(t.length>=e.sequences_limit&&f(),a=s.body,0<t.length&&(a=a.drop_side_effect_free(e)),a&&E(t,a)):(z(s)||f(),n[i++]=s)}f(),(n.length=i)!=o&&(Z=!0)}function f(){var e;t.length&&(e=Y(t[0],t),n[i++]=ie(bn,e,{body:e}),t=[])}}(e,c),function(e,n){function t(e){r--,Z=!0;var n=i.body;return Y(n,[n,e])}for(var i,r=0,o=0;o<e.length;o++){var a,s=e[o];if(i&&(s instanceof Ln?s.value=t(s.value||ie(Qt,s)).transform(n):s instanceof An?s.init instanceof ot||(a=!1,i.body.walk(new ri(function(e){return!!(a||e instanceof Mn)||(e instanceof wt&&"in"==e.operator?a=!0:void 0)})),a||(s.init?s.init=t(s.init):(s.init=i.body,r--,Z=!0))):s instanceof zn?s.object=t(s.object):s instanceof Kn?s.condition=t(s.condition):(s instanceof Qn||s instanceof $n)&&(s.expression=t(s.expression))),n.option("conditionals")&&s instanceof Kn){var f=[],c=p(s.body,f),u=p(s.alternative,f);if(!1!==c&&!1!==u&&0<f.length){var l=f.length;f.push(ie(Kn,s,{condition:s.condition,body:c||ie(gn,s.body),alternative:u})),f.unshift(r,1),[].splice.apply(e,f),o+=l,r+=l+1,Z=!(i=null);continue}}e[r++]=s,i=s instanceof bn?s:null}e.length=r}(e,c)),c.option("join_vars")&&function(e){for(var r,n=0,t=-1;n<e.length;n++){var i,o,a=e[n],s=e[t];if(a instanceof ot)s&&s.TYPE==a.TYPE?(s.definitions=s.definitions.concat(a.definitions),Z=!0):r&&r.TYPE==a.TYPE&&A(a)?(r.definitions=r.definitions.concat(a.definitions),Z=!0):(e[++t]=a)instanceof ft&&(r=a);else{if(a instanceof Ln)a.value=f(a.value);else if(a instanceof An)if(o=u(s,a.init))Z=!0,a.init=o.length?Y(a.init,o):null;else{if(s instanceof ft&&(!a.init||a.init.TYPE==s.TYPE)){a.init&&(s.definitions=s.definitions.concat(a.init.definitions)),r=a.init=s,e[t]=c(a),Z=!0;continue}r&&a.init&&r.TYPE==a.init.TYPE&&A(a.init)?(r.definitions=r.definitions.concat(a.init.definitions),a.init=null,Z=!0):a.init instanceof ft&&(r=a.init)}else if(a instanceof zn)r&&r.TYPE==a.init.TYPE&&(i=r.definitions.slice(),a.init=a.init.definitions[0].name.convert_symbol(Yt,function(e,n){i.push(ie(ct,n,{name:n,value:null})),n.definition().references.push(e)}),r.definitions=i,Z=!0),a.object=f(a.object);else if(a instanceof Kn)a.condition=f(a.condition);else if(a instanceof bn){if(o=u(s,a.body)){if(Z=!0,!o.length)continue;a.body=Y(a.body,o)}}else(a instanceof Qn||a instanceof $n)&&(a.expression=f(a.expression));e[++t]=r?c(a):a}}function f(e){var n=u(s,e,1);if(!n)return e;Z=!0;var t=e.tail_node();return n[n.length-1]!==t&&n.push(t.left),Y(e,n)}function c(e){return e.transform(new ui(function(e,n,t){if(e instanceof ot){if(r===e)return e;if(r.TYPE!=e.TYPE)return e;var i=this.parent();return i instanceof zn&&i.init===e?e:A(e)?(r.definitions=r.definitions.concat(e.definitions),Z=!0,i instanceof An&&i.init===e?null:t?on.skip:ie(gn,e)):e}return!(e instanceof Mn)&&e instanceof vn?void 0:e}))}e.length=t+1}(e),c.option("collapse_vars")&&function(o,u){if(!Q.pinned())for(var l,n,r=Object.create(null),p=[],a=Object.create(null),s=o.length,c=new ui(function(e,n){if($)return e;if(!z)return e!==f[d]?e:++d<f.length?P(e,c):(z=!0,(m=(v?function e(n,t){var i=c.parent(t);if(i instanceof St)return e(i,t+1);if(i instanceof kt)return k(i)||i.left.match_symbol(function(e){return e instanceof Yt&&(g.name==e.name||v.name==e.name)})?n:e(i,t+1);if(i instanceof wt){if(ce[i.operator]&&i.left!==n){for(;n=i,i=c.parent(++t),i instanceof wt&&i.operator==n.operator;);return n}return e(i,t+1)}if(i instanceof lt)return i;if(i instanceof nt)return i.expression!==n?n:e(i,t+1);if(i instanceof xt)return i.condition!==n?n:e(i,t+1);if(i instanceof ot)return B(i,t+1);if(i instanceof Dn)return n;if(i instanceof Ln)return B(i,t+1);if(i instanceof An)return i.init!==n&&i.condition!==n?n:e(i,t+1);if(i instanceof zn)return i.init!==n?n:e(i,t+1);if(i instanceof Kn)return i.condition!==n?n:e(i,t+1);if(i instanceof $t){var r=c.parent(t+1);return un(r.properties,function(e){return e instanceof Mt})?e(r,t+2):r}if(i instanceof ht)return e(i,t+1);if(i instanceof dt)return(i.tail_node()===n?e:B)(i,t+1);if(i instanceof bn)return B(i,t+1);if(i instanceof _t)return e(i,t+1);if(i instanceof Qn)return i.expression!==n?n:e(i,t+1);if(i instanceof gt)return"delete"==i.operator?n:e(i,t+1);if(i instanceof ct)return i.name.match_symbol(function(e){return e instanceof Ct&&(g.name==e.name||v.name==e.name)})?n:e(i,t+1);if(i instanceof On)return i.condition!==n?n:e(i,t+1);return null}:function e(n,t){var i=c.parent(t);if(i instanceof St)return n;if(i instanceof kt)return n;if(i instanceof Et)return n;if(i instanceof wt)return n;if(i instanceof lt)return n;if(i instanceof nt)return n;if(i instanceof xt)return n;if(i instanceof ot)return B(i,t+1);if(i instanceof Ln)return n;if(i instanceof Kn)return n;if(i instanceof Sn)return n;if(i instanceof $t)return n;if(i instanceof ht)return n;if(i instanceof dt)return(i.tail_node()===n?e:B)(i,t+1);if(i instanceof bn)return B(i,t+1);if(i instanceof _t)return n;if(i instanceof Qn)return n;if(i instanceof gt)return n;if(i instanceof ct)return n;return null})(e,0))===e&&($=!0),e);var t=c.parent();if(function(e,n){if(e===O)return!0;if(n instanceof An)return e!==n.init;if(e instanceof kt)return"="!=e.operator&&g.equivalent_to(e.left);if(e instanceof lt)return g instanceof ht&&(!!g.equivalent_to(e.expression)&&!(O instanceof In&&!O.contains_this()));if(e instanceof mn)return!0;if(e instanceof Bn)return x&&g.name===e.name.name;if(e instanceof Tt)return(K||!D)&&n instanceof kt;if(e instanceof Ot)return e.key instanceof hn;if(e instanceof Tn)return!0;if(e instanceof Jn)return!0;if(e instanceof Yt){if(e.is_declared(u)){if(e.fixed_value())return!1;if(te(e))return!(n instanceof ht&&n.expression===e)&&ne(e.definition())}else if(H(e,n))return!1;return A?w=!1:!0}return e instanceof tt||e instanceof $n}(e,t))return $=!0,e;if(!_&&I(e,t)&&(_=t),e.single_use&&t instanceof ct&&t.value===e)return e;if(!(e instanceof Ct)&&(y&&g.equivalent_to(e)||w&&(i=w(e,this)))){if(!F||_&&(i||!D||!A))return i||v||($=!0),e;if(ue(e,t))return v&&!i&&(j=!0,M++),e;if(v)return i||M++,e;if(M++,Z=$=!0,hn.info("Collapsing {node} [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col}),h instanceof yt)return g instanceof Yt&&(g.definition().fixed=!1),ie(bt,h,h);if(h instanceof ct){var i=h.name.definition();return i.references.length-i.replaced!=1||u.exposed(i)?ie(kt,h,{operator:"=",left:ie(Yt,h.name,h.name),right:h.value}):(i.replaced++,re(0,t,e,h.value))}return h.write_only=!1,h}if((R(e,t)||k(e))&&(m=e)instanceof Mn&&($=!0),e instanceof qn){var r=F;return F=!1,n(e,c),F=r,N(e)}if(e instanceof Tt){r=F;return F=!1,n(e,c),F=r,N(e)}if(e instanceof ut){e.name=e.name.transform(c);r=F;return F=!1,e.value=e.value.transform(c),F=r,N(e)}return P(e,c)},N),i=new ui(function(e){if($)return e;if(!z){if(e!==f[d])return e;switch(d++,f.length-d){case 0:if(z=!0,j)return e;if(e instanceof ct)return e;q.replaced++;var n=i.parent();return n instanceof dt&&n.tail_node()!==e?(v.replaced++,on.skip):O;case 1:if(!j&&e.body===h)return z=!0,q.replaced++,v.replaced++,null;default:return}}if(e instanceof Yt&&e.name==q.name){if(--M||($=!0),ue(e,i.parent()))return e;q.replaced++;var t=O.clone();return v.references.push(t),t}return e instanceof et||e instanceof Mn?e:void 0},V);0<=--s;){0==s&&u.option("unused")&&function(){var e,n,t=u.self();if(Cn(t)&&!t.name&&!t.uses_arguments&&!t.pinned()&&(e=u.parent())instanceof lt&&e.expression===t&&un(e.args,function(e){return!(e instanceof _t)})){var i=u.has_directive("use strict");i&&!Ke(i,t.body)&&(i=!1);var r=t instanceof Hn?function(e){return e instanceof qt&&"await"==e.name}:function(e){return e instanceof Et&&!o.find_parent(Mn)},o=new ri(function(e){if(!c)return!0;if(r(e))return!(c=null);if(e instanceof Yt&&t.variables.has(e.name)){var n=e.definition().scope;if(n!==Q)for(;n=n.parent_scope;)if(n===Q)return!0;c=null}return e instanceof Lt&&(i||!o.find_parent(Mn))?!(c=null):void 0});l=e.args.slice();for(var a=Object.create(null),s=t.argnames.length;0<=--s;){var f=t.argnames[s],c=e.args[s];if(f instanceof ut&&(n=f.value,f=f.name,l[e.args.length+s]=n),f instanceof Tt){if(!f.match_symbol(en))continue;p.length=0;break}f.name in a||(a[f.name]=!0,n&&(c=!c||fe(c)?n:null),c||n?c instanceof Fn&&c.pinned()?c=null:c&&c.walk(o):c=ie(Qt,f).transform(u),c&&((f=ie(ct,f,{name:f,value:c})).name_index=s,f.arg_index=n?e.args.length+s:s,p.unshift([f])))}}}();var f=[];for(U(o[s]);0<p.length;){f=p.pop();var d=0,h=f[f.length-1],v=null,m=null,_=null,g=function(e){{if(!(e instanceof ct)){if(e instanceof kt){var n=e.left;return"="==e.operator&&n instanceof Yt&&(t=n.definition()).references[0]===n&&!u.exposed(t)&&1<(i=t.references.length-t.replaced)&&Y(e.right),n}return e.expression}var t=e.name.definition();if(!t.const_redefs&&Ke(e.name,t.orig)){var n=t.orig.length-t.eliminated-(a[t.name]||0),i=t.references.length-t.replaced-(r[t.name]||0);return 1<n&&!(e.name instanceof It)?(Y(e.value),ie(Yt,e.name,e.name)):Y(e.value)||1==i&&!u.exposed(t)?ie(Yt,e.name,e.name):void 0}}}(h),b=g&&g.has_side_effects(u),y=g&&!b&&!function e(n,t){if(n instanceof Lt)return!0;if(n instanceof Yt){var i=n.definition();return i.lambda||t.exposed(i)&&se[i.name]}if(n instanceof ht){if((n=n.expression)instanceof Yt){if(n.is_immutable())return!1;n=n.fixed_value()}return!n||(!!n.is_constant()||e(n,t))}return!1}(g,u),w=function(n){if(n instanceof kt&&n.right.single_use)return;var t,i=Object.create(null),e=new ri(function(e){e instanceof Yt&&(i[e.definition().id]=!0)});for(;n instanceof kt&&"="==n.operator;)n.left.walk(e),n=n.right;if(n instanceof Yt){var r=n.evaluate(u);return r===n?o:L(r,o)}if(n instanceof Lt)return o;if(n.is_truthy())return L(!0,en);if(n.is_constant())return L(n.evaluate(u),o);return g instanceof Yt&&(!!function e(n){if(n instanceof St)return!1;if(n instanceof wt&&ce[n.operator])return e(n.left)&&e(n.right);if(n instanceof lt)return!1;if(n instanceof xt)return e(n.consequent)&&e(n.alternative);if(n instanceof zt)return!1;return!n.has_side_effects(u)}(n)&&(n.walk(new ri(function(e){if(t)return!0;e instanceof Yt&&i[e.definition().id]&&(t=!0)})),!t&&o));function o(e){return n.equivalent_to(e)}}(h);if(y||w){var x=h.name instanceof It,k=en;if(h.may_throw(u)){if(x&&Q instanceof Hn)continue;k=K?function(e){return e.has_side_effects(u)}:G}var E=!1,S=!1,T=function(t){var i=new ln;t instanceof ct&&i.add(t.name.name,g);var r=Q.uses_arguments&&!u.has_directive("use strict"),o=Q instanceof jn,a=new ri(function(e){var n;e instanceof Yt?n=e.fixed_value()||e:e instanceof Lt&&(n=e),n&&i.add(e.name,ee(u,a,e,n,0)),r&&e instanceof mt&&(Q.each_argname(function(e){u.option("reduce_vars")&&!e.definition().assignments||i.add(e.name,!0)}),r=!1),o&&("Call"==e.TYPE?S||((n=e.expression)instanceof ht||n instanceof In&&!n.contains_this()||(S=!0)):e instanceof ht&&function e(n){if(n instanceof Yt&&!(n=n.fixed_value()))return!0;if(n instanceof kt)return"="==n.operator&&e(n.right);return n instanceof ht||n instanceof Lt}(e.expression)&&(e!==g||t instanceof gt?E=!0:S=!0))});return t.walk(a),i}(h),D=function(e){var n=oe(e);return n instanceof Yt&&n.definition().scope===Q&&!(X&&(T.has(n.name)&&T.get(n.name)[0]!==e||h instanceof gt||h instanceof kt&&"="!=h.operator))}(g),O=ae(h);b=b||!(h instanceof gt)&&O.has_side_effects(u);var A=function(e){if(e instanceof gt)return!1;if(b)return!1;if(v)return!0;if(!(g instanceof Yt))return!1;var n;if(e instanceof ct)n=1;else{if("="!=e.operator)return!1;n=2}e=g.definition();return e.references.length-e.replaced==n}(h),z=x,$=!1,M=0,j=!1,F=!l||!z;if(!F){for(var e=h.arg_index+1;!$&&e<l.length;e++)l[e]&&l[e].transform(c);F=!0}for(var t=s;!$&&t<o.length;t++)o[t].transform(c);if(v){var q=g.definition(),C=q.references.length-q.replaced;if(h instanceof kt&&C--,!M||C!=M){p.push(f),n=!0;continue}if($=!1,M){d=0,z=x;for(t=s;!$&&t<o.length;t++)o[t].transform(i)||o.splice(t--,1);h instanceof ct&&(M=!u.exposed(q)&&q.references.length==q.replaced),v.single_use=!1}}M&&!function(e){var n=e.name_index;if(0<=n){var t=Q.argnames[n];return t instanceof ut?(t.value=ie(Jt,t,{value:0}),t.name.definition().fixed=!1):(e=u.parent().args)[n]&&(e[n]=ie(Jt,e[n],{value:0}),t.definition().fixed=!1),!0}var i=f.length-1;f[i-1].body===f[i]&&i--;var r=new ui(function(e,n,t){return z||e!==f[d]?e:++d<=i?P(e,r):(z=!0,e instanceof ct?(e.value=null,a[e.name.name]=(a[e.name.name]||0)+1,v&&v.replaced++,e):t?on.skip:null)},V);return z=$=!1,d=0,o[s].transform(r)}(h)&&o.splice(s,1)}}}function N(e){return $||(m===e&&($=!0),_===e&&(_=null)),e}function P(e,n){if(e instanceof yn){if(e instanceof Mn)return e;if(!e.variables||!e.variables.all(function(e){return!T.has(e.name)}))return $=!0,e;if(e instanceof zn)return e.object=e.object.transform(n),$=!0,e;if(e instanceof Qn){e.expression=e.expression.transform(n);for(var t=0;!$&&t<e.body.length;t++){var i=e.body[t];if(i instanceof nt){if(!z){if(i!==f[d])continue;d++}if(i.expression=i.expression.transform(n),!A)break;w=!1}}return $=!0,e}}}function H(e,n){return n instanceof kt?"="==n.operator&&n.left===e:n instanceof ut?n.name===e:n instanceof Dt||n instanceof Ot&&n.value===e}function I(e,n){return n instanceof wt?ce[n.operator]&&n.left!==e:n instanceof nt?n.expression!==e:(n instanceof xt||n instanceof Kn)&&n.condition!==e}function R(e,n){if(e instanceof Et)return 1;if("Binary"==e.TYPE)return"in"==e.operator&&!Be(e.right);if(e instanceof lt){var t=e.expression;if(t instanceof Yt&&(f=t.definition(),t=t.fixed_value()),!(t instanceof Fn))return 1;if(f&&Le(u,f))return 1;if(t.collapse_scanning)return;t.collapse_scanning=!0;var i=F;F=!1;var r=m,o=_;if(un(t.argnames,function(e){if(e instanceof ut){if(e.value.transform(c),$)return;e=e.name}return!(e instanceof Tt)}))if(t instanceof Nn&&t.value)t.value.transform(c);else for(var a=0;!$&&a<t.body.length;a++){var s=t.body[a];if(s instanceof Vn){s.value&&s.value.transform(c);break}s.transform(c)}else $=!0;return(_=o,m=r,F=i,delete t.collapse_scanning,$)?($=!1,1):void 0}if(e instanceof Ln){if(K){if(K.bfinally)return 1;if(K.bcatch&&e instanceof Wn)return 1}return b||g instanceof ht||J(g)}if(e instanceof In)return u.option("ie8")&&e.name&&T.has(e.name.name);if(e instanceof ht){i=e.expression;return b||!v&&i.may_throw_on_access(u)||i instanceof Yt&&ne(i.definition())}if(e instanceof _t)return 1;if(e instanceof Yt){if(W(e))return!H(e,n);if(b&&J(e))return 1;var f=e.definition();return(K||f.scope.resolve()!==Q)&&!te(e)}if(e instanceof Lt)return W(e);if(e instanceof ct)return(K||!D)&&e.name instanceof Tt||(e.value||n instanceof st)&&e.name.match_symbol(function(e){return e instanceof Ct&&(T.has(e.name)||b&&J(e))},!0);e=ue(e.left,e);return e&&(e instanceof ht||((K||!D)&&e instanceof Tt||e.match_symbol(function(e){return e instanceof Yt&&(T.has(e.name)||E&&u.exposed(e.definition()))},!0)))}function U(e){var n;f.push(e),e instanceof St?e.elements.forEach(U):e instanceof kt?(e.left instanceof Tt||p.push(f.slice()),U(e.left),U(e.right),e.left instanceof Yt&&(r[e.left.name]=(r[e.left.name]||0)+1)):e instanceof Et?U(e.expression):e instanceof wt?(U(e.left),U(e.right)):e instanceof lt?(U(e.expression),e.args.forEach(U)):e instanceof nt?U(e.expression):e instanceof xt?(U(e.condition),U(e.consequent),U(e.alternative)):e instanceof ot?e.definitions.forEach(U):e instanceof vt?U(e.expression):e instanceof Tn?(U(e.condition),e.body instanceof xn||U(e.body)):e instanceof Ln?e.value&&U(e.value):e instanceof An?(e.init&&U(e.init),e.condition&&U(e.condition),e.step&&U(e.step),e.body instanceof xn||U(e.body)):e instanceof zn?(U(e.object),e.body instanceof xn||U(e.body)):e instanceof Kn?(U(e.condition),e.body instanceof xn||U(e.body),!e.alternative||e.alternative instanceof xn||U(e.alternative)):e instanceof zt?e.properties.forEach(function(e){f.push(e),e.key instanceof hn&&U(e.key),e instanceof Mt&&U(e.value),f.pop()}):e instanceof dt?e.expressions.forEach(U):e instanceof bn?U(e.body):e instanceof _t?U(e.expression):e instanceof mt?(U(e.expression),U(e.property)):e instanceof Qn?(U(e.expression),e.body.forEach(U)):e instanceof gt?si[e.operator]?p.push(f.slice()):U(e.expression):e instanceof ct&&(e.name instanceof Ht&&(e.value?(n=e.name.definition()).references.length>n.replaced&&p.push(f.slice()):a[e.name.name]=(a[e.name.name]||0)+1),e.value&&U(e.value)),f.pop()}function B(r,o){var a=c.parent(o);if(R(r,a))return r;if(I(r,a))return r;if(a instanceof St)return B(a,o+1);if(a instanceof kt)return n(a.left);if(a instanceof Et)return r;if(a instanceof wt)return B(a,o+1);if(a instanceof lt)return B(a,o+1);if(a instanceof nt)return B(a,o+1);if(a instanceof xt)return B(a,o+1);if(a instanceof ot)return B(a,o+1);if(a instanceof Ln)return B(a,o+1);if(a instanceof Kn)return B(a,o+1);if(a instanceof Sn)return r;if(a instanceof $t){var e=c.parent(o+1);return un(e.properties,function(e){return e instanceof Mt})?B(e,o+2):e}if(a instanceof ht){e=a.expression;if(e===r)return B(a,o+1);e=oe(e);if(!(e instanceof Yt))return B(a,o+1);e=T.get(e.name);return!e||un(e,function(e){return!(e instanceof ht)})?B(a,o+1):r}return a instanceof dt||a instanceof bn?B(a,o+1):a instanceof _t?r:a instanceof Qn||a instanceof gt?B(a,o+1):a instanceof ct?n(a.name):null;function n(e){if(k(a))return r;if(e!==r&&e instanceof Tt){var n=F;F=!1;var t=m,i=_;if(e.transform(c),_=i,m=t,F=n,$)return $=!1,r}return B(a,o+1)}}function Y(e){if(n)n=!1;else if(e instanceof Yt){e=e.definition();return e.undeclared?void 0:!ne(e)&&(v=e)}}function L(t,i){return function(e,n){if(n.in_boolean_context()){if(t&&e.is_truthy()&&!e.has_side_effects(u))return!0;if(e.is_constant())return!e.evaluate(u)==!t}return i(e)}}function V(e){if(e instanceof dt)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}}function W(e){e=T.get(e.name);if(e&&!un(e,function(e){return!e}))return e[0]!==g||void(w=!1)}function J(e){e=e.definition();return!(1==e.orig.length&&e.orig[0]instanceof Rt)&&(e.scope!==Q||(!(!S||!u.exposed(e))||!un(e.references,function(e){return e.scope.resolve()===Q})))}function G(e,n){if(e instanceof kt)return G(e.left,!0);if(e instanceof gt)return G(e.expression,!0);if(e instanceof ct)return e.value&&G(e.value);if(n){if(e instanceof vt)return G(e.expression,!0);if(e instanceof mt)return G(e.expression,!0);if(e instanceof Yt)return e.definition().scope!==Q}return!1}}(e,c),Z&&0<n--;);return e;function p(e,n){if(!(e instanceof kn))return e;for(var t=null,i=0;i<e.body.length;i++){var r=e.body[i];if(r instanceof ft&&A(r))n.push(r);else{if(t||r instanceof at||r instanceof st)return!1;t=r}}return t}function u(e,n,t){var i;if(n instanceof kt?i=[n]:n instanceof dt&&(i=n.expressions.slice()),i){for(var r=!1,o=i.length-1;0<=--o;){var a,s=i[o];s instanceof kt&&"="==s.operator&&s.left instanceof Yt&&(a=i.slice(o+1),l(s.left,s.right,a)&&(r=!0,i=i.slice(0,o+1).concat(a)))}if(e instanceof ot){t=t||0;for(o=e.definitions.length;0<=--o;){var f=e.definitions[o];if(f.value){l(f.name,f.value,i)&&(r=!0),function(e,n,t){if(!c.option("conditionals"))return;if(e.name instanceof Tt)return;var i=!1,r=e.name.definition();for(;n.length>t;){var o=Pe(c,r,e.value,n[0]);if(!o)break;e.value=o,n.shift(),i=!0}return i}(f,i,t)&&(r=!0);break}}e instanceof ft&&function(e,n,t){var i=!1;for(;n.length>t;){var r=n[0];if(!(r instanceof kt))break;if("="!=r.operator)break;var o=r.left;if(!(o instanceof Yt))break;if(U(o))break;if(o.scope.resolve()!==Q)break;var a=o.definition();if(a.scope!==Q)break;if(a.orig.length>a.eliminated+1)break;if("SymbolVar"!=a.orig[0].TYPE)break;o=ie(Ht,o,o);e.push(ie(ct,r,{name:o,value:r.right})),a.orig.push(o),a.replaced++,n.shift(),i=!0}return i}(e.definitions,i,t)&&(r=!0)}return r&&i}}function l(e,n,t){if(n instanceof zt){var i=!1;do{var r=t[0];if(!(r instanceof kt))break;if("="!=r.operator)break;if(!(r.left instanceof ht))break;var o=r.left.expression;if(!(o instanceof Yt))break;if(e.name!=o.name)break;if(!r.right.is_constant_expression(Q))break;var a=r.left.property;if(a instanceof hn&&(a=a.evaluate(c)),a instanceof hn)break;o="__proto__"==(a=""+a)||c.has_directive("use strict")?function(e){return"string"==typeof e.key&&e.key!=a}:function(e){return!(e instanceof Ft||e instanceof jt)||"string"==typeof e.key&&e.key!=a}}while(un(n.properties,o)&&(n.properties.push(ie(Mt,r,{key:a,value:r.right})),t.shift(),i=!0,t.length));return i}}}function M(i,r,o){var a;function s(e){a?(a.push(e),(e instanceof at||e instanceof st)&&(a.required=!0)):o.push(e)}r instanceof ot||Rn(r)||hn.warn("Dropping unreachable code [{file}:{line},{col}]",r.start),r.walk(new ri(function(e,n){if(e instanceof ot){var t=[];return e.remove_initializers(i,t)&&hn.warn("Dropping initialization in unreachable code [{file}:{line},{col}]",e.start),0<t.length&&(e.definitions=t,s(e)),!0}if(Rn(e))return s(e),!0;if(e instanceof Mn)return!0;if(e instanceof yn){e=a;return a=[],n(),a.required?o.push(ie(kn,r,{body:a})):a.length&&[].push.apply(o,a),a=e,!0}}))}function fe(e,n){return e.is_undefined||e instanceof Qt||e instanceof bt&&"void"==e.operator&&(!n||!e.expression.has_side_effects(n))}function j(e,n,t){switch(e){case"-":return n.is_negative_zero()&&(!(t instanceof Vt)||0==t.value);case"&&":case"||":return n.is_negative_zero()||t.is_negative_zero();case"*":case"/":case"%":return!0;default:return!1}}function F(e){return/strict/.test(e.option("pure_getters"))}(G=function(e,n){e.DEFMETHOD("is_truthy",n)})(hn,en),G(St,nn),G(kt,function(){return"="==this.operator&&this.right.is_truthy()}),G(Fn,nn),G(zt,nn),G(Gt,nn),G(dt,function(){return this.tail_node().is_truthy()}),G(Yt,function(){var e=this.fixed_value();if(!e)return!1;this.is_truthy=en;e=e.is_truthy();return delete this.is_truthy,e}),(G=function(e,n){e.DEFMETHOD("is_negative_zero",n)})(hn,nn),G(St,en),G(kt,function(){var e=this.operator;return"="==e?this.right.is_negative_zero():j(e.slice(0,-1),this.left,this.right)}),G(wt,function(){return j(this.operator,this.left,this.right)}),G(Vt,function(){return 0==this.value&&1/this.value<0}),G(Fn,en),G(zt,en),G(Gt,en),G(dt,function(){return this.tail_node().is_negative_zero()}),G(Yt,function(){var e=this.fixed_value();if(!e)return!0;this.is_negative_zero=nn;e=e.is_negative_zero();return delete this.is_negative_zero,e}),G(bt,function(){return"+"==this.operator&&this.expression.is_negative_zero()||"-"==this.operator}),G=function(e,n){e.DEFMETHOD("_dot_throw",n)},hn.DEFMETHOD("may_throw_on_access",function(e){return!e.option("pure_getters")||this._dot_throw(e)}),G(hn,F),G(St,en),G(kt,function(e){if("="!=this.operator)return!1;var n=this.right;if(!n._dot_throw(e))return!1;var t=this.left;return!(t instanceof Yt)||(!(n instanceof wt&&"||"==n.operator&&t.name==n.left.name)||n.right._dot_throw(e))}),G(wt,function(e){switch(this.operator){case"&&":return this.left._dot_throw(e)||this.right._dot_throw(e);case"||":return this.right._dot_throw(e);default:return!1}}),G(xt,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)}),G(Vt,en),G(vt,function(e){if(!F(e))return!1;e=this.expression;return e instanceof Yt&&(e=e.fixed_value()),!(e instanceof Fn&&"prototype"==this.property)}),G(Fn,en),G(Xt,nn),G(zt,function(e){return F(e)&&!un(this.properties,function(e){return e instanceof Mt})}),G(dt,function(e){return this.tail_node()._dot_throw(e)}),G(Yt,function(e){if(this.is_undefined)return!0;if(!F(e))return!1;if(U(this)&&this.is_declared(e))return!1;if(this.is_immutable())return!1;var n=this.definition();if(ne(n)&&un(n.scope.argnames,function(e){return e instanceof It}))return 2<n.scope.uses_arguments;n=this.fixed_value();return!n||(this._dot_throw=nn,n._dot_throw(e)?(delete this._dot_throw,!0):(this._dot_throw=en,!1))}),G(Lt,function(e){return F(e)&&!this.scope.new}),G(bt,function(){return"void"==this.operator}),G(yt,en),G(Qt,nn),(G=function(e,n){e.DEFMETHOD("is_defined",n)})(hn,en),G(St,nn),G(kt,function(e){return"="!=this.operator||this.right.is_defined(e)}),G(wt,function(e){switch(this.operator){case"&&":return this.left.is_defined(e)&&this.right.is_defined(e);case"||":return this.left.is_truthy()||this.right.is_defined(e);default:return!0}}),G(xt,function(e){return this.consequent.is_defined(e)&&this.alternative.is_defined(e)}),G(Vt,nn),G(Zt,en),G(Fn,nn),G(zt,nn),G(dt,function(e){return this.tail_node().is_defined(e)}),G(Yt,function(e){if(this.is_undefined)return!1;if(U(this)&&this.is_declared(e))return!0;if(this.is_immutable())return!0;var n=this.fixed_value();if(!n)return!1;this.is_defined=en;e=n.is_defined(e);return delete this.is_defined,e}),G(bt,function(){return"void"!=this.operator}),G(yt,nn),G(Qt,en),function(e){e(hn,en),e(kt,function(e){return"="==this.operator&&this.right.is_boolean(e)});var n=cn("in instanceof == != === !== < <= >= >");e(wt,function(e){return n[this.operator]||ce[this.operator]&&this.left.is_boolean(e)&&this.right.is_boolean(e)}),e(ni,nn);var t=cn("every hasOwnProperty isPrototypeOf propertyIsEnumerable some");e(lt,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof vt&&(t[e.property]||"test"==e.property&&e.expression instanceof Gt)}),e(xt,function(e){return this.consequent.is_boolean(e)&&this.alternative.is_boolean(e)}),e(pt,en),e(dt,function(e){return this.tail_node().is_boolean(e)}),e(Yt,function(e){var n=this.fixed_value();if(!n)return!1;this.is_boolean=en;e=n.is_boolean(e);return delete this.is_boolean,e});var i=cn("! delete");e(bt,function(){return i[this.operator]})}(function(e,n){e.DEFMETHOD("is_boolean",n)}),function(e){e(hn,en);var n=cn("- * / % & | ^ << >> >>>");e(kt,function(e){return n[this.operator.slice(0,-1)]||"="==this.operator&&this.right.is_number(e)}),e(wt,function(e){return!!n[this.operator]||"+"==this.operator&&((this.left.is_boolean(e)||this.left.is_number(e))&&(this.right.is_boolean(e)||this.right.is_number(e)))});var t=cn(["charCodeAt","getDate","getDay","getFullYear","getHours","getMilliseconds","getMinutes","getMonth","getSeconds","getTime","getTimezoneOffset","getUTCDate","getUTCDay","getUTCFullYear","getUTCHours","getUTCMilliseconds","getUTCMinutes","getUTCMonth","getUTCSeconds","getYear","indexOf","lastIndexOf","localeCompare","push","search","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toExponential","toFixed","toPrecision"]);e(lt,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof vt&&(t[e.property]||U(e.expression)&&"Math"==e.expression.name)}),e(xt,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)}),e(pt,en),e(Jt,nn),e(dt,function(e){return this.tail_node().is_number(e)}),e(Yt,function(e){var n=this.fixed_value();if(!n)return!1;this.is_number=en;e=n.is_number(e);return delete this.is_number,e});var i=cn("+ - ~ ++ --");e(gt,function(){return i[this.operator]})}(function(e,n){e.DEFMETHOD("is_number",n)}),function(e){e(hn,en),e(kt,function(e){switch(this.operator){case"+=":if(this.left.is_string(e))return!0;case"=":return this.right.is_string(e)}}),e(wt,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))});var n=cn(["charAt","substr","substring","toLowerCase","toString","toUpperCase","trim"]);e(lt,function(e){if(!e.option("unsafe"))return!1;e=this.expression;return e instanceof vt&&n[e.property]}),e(xt,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)}),e(dt,function(e){return this.tail_node().is_string(e)}),e(Wt,nn),e(Yt,function(e){var n=this.fixed_value();if(!n)return!1;this.is_string=en;e=n.is_string(e);return delete this.is_string,e}),e(bt,function(){return"typeof"==this.operator})}(function(e,n){e.DEFMETHOD("is_string",n)});var ce=cn("&& ||");function ue(e,n){return n instanceof kt?n.left===e&&e:n instanceof ut?n.name===e&&e:n instanceof Tt||n instanceof Ot?e:n instanceof gt?li[n.operator]&&n.expression:void 0}function q(e){hn.warn("global_defs {node} redefined [{file}:{line},{col}]",{node:e,file:e.start.file,line:e.start.line,col:e.start.col})}function V(e,n,t){return n.print_to_string().length-e.print_to_string().length<(t||0)?n:e}function C(e,n,t){return V(ie(bn,e,{body:e}),ie(bn,n,{body:n}),t).body}function W(e,n,t,i){return(dn(e)?C:V)(n,t,i)}function N(n){var t=Object.create(null);return Object.keys(n).forEach(function(e){t[e]=cn(n[e])}),t}function P(e){for(var n=0;n<e.length;n++){var t=e[n];if(!(t instanceof _n))return t}}function J(e,n){var t=n.evaluate(e);return t===n?n:W(e,n,k(t,n).optimize(e),e.eval_threshold)}G=function(e,n){e.DEFMETHOD("_find_defs",n)},jn.DEFMETHOD("resolve_defines",function(o){return o.option("global_defs")?(this.figure_out_scope({ie8:o.option("ie8")}),this.transform(new ui(function(e){var n=e._find_defs(o,"");if(n){for(var t,i=0,r=e;(t=this.parent(i++))&&t instanceof ht&&t.expression===r;)r=t;if(!ue(r,t))return n;q(e)}}))):this}),G(hn,Ze),G(vt,function(e,n){return this.expression._find_defs(e,"."+this.property+n)}),G(Ct,function(e){this.definition().global&&pn(e.option("global_defs"),this.name)&&q(this)}),G(Yt,function(e,n){if(this.definition().global){e=e.option("global_defs"),n=this.name+n;return pn(e,n)?function n(e,t){if(e instanceof hn)return e.clone(!0);if(Array.isArray(e))return ie(St,t,{elements:e.map(function(e){return n(e,t)})});if(e&&"object"==typeof e){var i,r=[];for(i in e)pn(e,i)&&r.push(ie(Mt,t,{key:i,value:n(e[i],t)}));return ie(zt,t,{properties:r})}return k(e,t)}(e[n],this):void 0}}),Nn.DEFMETHOD("first_statement",function(){return this.value?ie(Vn,this.value,{value:this.value}):P(this.body)}),Fn.DEFMETHOD("first_statement",function(){return P(this.body)});var G,X=N({Array:["indexOf","join","lastIndexOf","slice"].concat(G=["constructor","toString","valueOf"]),Boolean:G,Function:G,Number:["toExponential","toFixed","toPrecision"].concat(G),Object:G,RegExp:["exec","test"].concat(G),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(G)}),K=N({Array:["isArray"],Math:["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","atan2","pow","max","min"],Number:["isFinite","isNaN"],Object:["create","getOwnPropertyDescriptor","getOwnPropertyNames","getPrototypeOf","isExtensible","isFrozen","isSealed","keys"],String:["fromCharCode"]});function Q(e){return ie(bt,e,{operator:"!",expression:e})}function Z(e,n,t){e=Q(e);if(t){t=ie(bn,n,{body:n});return V(e,t)===t?n:e}return V(e,n)}!function(e){e(hn,en),e(Vt,nn),e(Gt,en);var n=cn("! ~ - + void");e(bt,function(){return n[this.operator]&&this.expression instanceof Vt})}(function(e,n){e.DEFMETHOD("is_constant",n)}),function(e){hn.DEFMETHOD("evaluate",function(e,n){if(!e.option("evaluate"))return this;var t=[],e=this._eval(e,n,t,1);return t.forEach(function(e){delete e._eval}),!n&&e&&!(e instanceof RegExp)&&("function"==typeof e||"object"==typeof e)?this:e});var f=new ri(function(e){e instanceof kt&&c(e.left),e instanceof gt&&si[e.operator]&&c(e.expression)});function c(e){e instanceof ht?c(e.expression):e instanceof Yt&&e.definition().references.forEach(function(e){delete e._eval})}e(vn,function(){throw new Error(sn("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),e(qn,tn),e(hn,tn),e(Vt,function(){return this.value}),e(kt,function(e,n,t,i){var r=this.left;if(!n){if(!(r instanceof Yt))return this;if(!pn(r,"_eval")){if(!r.fixed)return this;var o=r.definition();if(!o.fixed)return this;if(o.undeclared)return this;if(o.last_ref!==r)return this;if("m"==o.single_use)return this}}o=this.operator,o=!pn(r,"_eval")&&r instanceof Yt&&r.fixed&&r.definition().fixed?r:"="==o?(r.walk(f),this.right):ie(wt,this,{operator:o.slice(0,-1),left:r,right:this.right}),i=o._eval(e,n,t,i);return"object"==typeof i?this:(c(r),i)}),e(dt,function(e,n,t,i){if(!n)return this;for(var r=this.expressions,o=0,a=r.length-1;o<a;o++)r[o].walk(f);var s=r[a],i=s._eval(e,n,t,i);return i===s?this:i}),e(Fn,function(e){if(e.option("unsafe")){e=function(){};return e.node=this,e.toString=function(){return"function(){}"},e}return this}),e(St,function(e,n,t,i){if(e.option("unsafe")){for(var r=[],o=0;o<this.elements.length;o++){var a=this.elements[o];if(a instanceof Zt)return this;var s=a._eval(e,n,t,i);if(a===s)return this;r.push(s)}return r}return this}),e(zt,function(e,n,t,i){if(e.option("unsafe")){for(var r={},o=0;o<this.properties.length;o++){var a=this.properties[o];if(!(a instanceof Mt))return this;var s=a.key;if(s instanceof hn&&(s=s._eval(e,n,t,i))===a.key)return this;if(a.value instanceof In&&"function"==typeof Object.prototype[s])return this;if(r[s]=a.value._eval(e,n,t,i),r[s]===a.value)return this}return r}return this});var u=cn("! typeof void");e(bt,function(e,n,t,i){var r=this.expression,o=this.operator;if(e.option("typeofs")&&"typeof"==o&&(r instanceof Fn||r instanceof Yt&&r.fixed_value()instanceof Fn))return"function";var a=r instanceof Yt&&r.definition();u[o]||a&&a.fixed||i++;var s=r._eval(e,n,t,i);if(s===r)return n&&"void"==o?void 0:this;switch(o){case"!":return!s;case"typeof":return s instanceof RegExp?this:typeof s;case"void":return;case"~":return~s;case"-":return-s;case"+":return+s;case"++":case"--":if(!a)return this;if(!n){if(a.undeclared)return this;if(a.last_ref!==r)return this}return pn(r,"_eval")&&(s=+(o[0]+1)+ +s),c(r),s}return this}),e(yt,function(e,n,t,i){var r=this.expression;if(r instanceof Yt){if(!pn(r,"_eval")){if(!r.fixed)return this;if(!n){var o=r.definition();if(!o.fixed)return this;if(o.undeclared)return this;if(o.last_ref!==r)return this}}}else if(!n)return this;r instanceof Yt&&r.definition().fixed||i++;i=r._eval(e,n,t,i);return i===r?this:(c(r),+i)});var l=cn("&& || === !==");e(wt,function(e,n,t,i){l[this.operator]||i++;var r=this.left._eval(e,n,t,i);if(r===this.left)return this;if(this.operator==(r?"||":"&&"))return r;var o,a=n&&!(r&&"object"==typeof r),s=this.right._eval(e,a,t,i);if(s===this.right)return this;switch(this.operator){case"&&":o=r&&s;break;case"||":o=r||s;break;case"|":o=r|s;break;case"&":o=r&s;break;case"^":o=r^s;break;case"+":o=r+s;break;case"-":o=r-s;break;case"*":o=r*s;break;case"/":o=r/s;break;case"%":o=r%s;break;case"<<":o=r<<s;break;case">>":o=r>>s;break;case">>>":o=r>>>s;break;case"==":o=r==s;break;case"===":o=r===s;break;case"!=":o=r!=s;break;case"!==":o=r!==s;break;case"<":o=r<s;break;case"<=":o=r<=s;break;case">":o=s<r;break;case">=":o=s<=r;break;case"in":if(s&&"object"==typeof s&&pn(s,r)){o=!0;break}default:return this}if(isNaN(o))return e.find_parent($n)?this:o;if(e.option("unsafe_math")&&!n&&o&&"number"==typeof o&&("+"==this.operator||"-"==this.operator)){n=Math.max(0,f(r),f(s));if(n<16)return+o.toFixed(n)}return o;function f(e){e=/(\.[0-9]*)?(e.+)?$/.exec(+e);return(e[1]||".").length-1-(e[2]||"").slice(1)}}),e(xt,function(e,n,t,i){var r=this.condition._eval(e,n,t,i);if(r===this.condition)return this;r=r?this.consequent:this.alternative,i=r._eval(e,n,t,i);return i===r?this:i}),e(Yt,function(e,n,t,i){var r,o=this.fixed_value();if(!o)return this;if(pn(o,"_eval"))r=o._eval();else{if(this._eval=tn,r=o._eval(e,n,t,i),delete this._eval,r===o)return this;o._eval=function(){return r},t.push(o)}return r&&"object"==typeof r&&!function(n,e){var t=n.definition().escaped;switch(t.length){case 0:return 1;case 1:var i=!1;return t[0].walk(new ri(function(e){return!!i||(e===n?i=!0:e instanceof Mn||void 0)})),i;default:return e<=t.depth}}(this,i)?this:r});var h={Array:Array,Math:Math,Number:Number,Object:Object,String:String},s=N({Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]}),p=cn("global ignoreCase multiline source");e(ht,function(e,n,t,i){if(e.option("unsafe")){var r,o=this.expression;if(!U(o)&&(null==(r=o._eval(e,n,t,i+1))||r===o))return this;var a=this.property;if(a instanceof hn&&(a=a._eval(e,n,t,i))===this.property)return this;if(void 0===r){i=s[o.name];if(!i||!i[a])return this;r=h[o.name]}else if(r instanceof RegExp){if(!p[a])return this}else if("object"==typeof r){if(!pn(r,a))return this}else if("function"==typeof r)switch(a){case"name":return r.node.name?r.node.name.name:"";case"length":return r.node.argnames.length;default:return this}return r[a]}return this}),e(lt,function(o,a,s,f){var e=this.expression,n=e instanceof Yt?e.fixed_value():e;if(n instanceof Bn||n instanceof In){if(n.evaluating)return this;if(n.name&&0<n.name.definition().recursive_refs)return this;if(this.is_expr_pure(o))return this;var r=d(this.args);if(!un(n.argnames,function(e,n){if(e instanceof ut){if(!r)return;if(void 0!==r[n])return;var t=e.value._eval(o,a,s,f);if(t===e.value)return;r[n]=t,e=e.name}return!(e instanceof Tt)}))return this;if(!r&&!a)return this;var t=n.first_statement();if(!(t instanceof Vn)){if(a){var i=!1;if(n.walk(new ri(function(e){return!!i||(e instanceof Vn?(e.value&&void 0!==e.value._eval(o,!0,s,f)&&(i=!0),!0):e instanceof Mn&&e!==n||void 0)})),!i)return}return this}if(!(u=t.value))return;var c=[];return r&&!un(n.argnames,function(e,n){e instanceof ut&&(e=e.name);var t=e.definition();if(t.orig[t.orig.length-1]===e){var i=r[n];return t.references.forEach(function(e){e._eval=function(){return i},c.push(e)}),1}})&&!a||(n.evaluating=!0,u=u._eval(o,a,s,f),delete n.evaluating),c.forEach(function(e){delete e._eval}),u===t.value?this:u}if(o.option("unsafe")&&e instanceof ht){var u,l=e.property;if(l instanceof hn&&(l=l._eval(o,a,s,f))===e.property)return this;e=e.expression;if(U(e)){var p=K[e.name];if(!p||!p[l])return this;u=h[e.name]}else{if(null==(u=e._eval(o,a,s,f+1))||u===e)return this;p=X[u.constructor.name];if(!p||!p[l])return this;if(u instanceof RegExp&&u.global&&!(e instanceof Gt))return this}if(!(r=d(this.args)))return this;if("replace"==l&&"function"==typeof r[1])return this;try{return u[l].apply(u,r)}catch(e){hn.warn("Error evaluating {code} [{file}:{line},{col}]",{code:this,file:this.start.file,line:this.start.line,col:this.start.col})}finally{u instanceof RegExp&&(u.lastIndex=0)}}return this;function d(e){for(var n=[],t=0;t<e.length;t++){var i=e[t],r=i._eval(o,a,s,f);if(i===r)return;n.push(r)}return n}}),e(pt,tn)}(function(e,n){e.DEFMETHOD("_eval",n)}),(G=function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})})(hn,function(){return Q(this)}),G(vn,function(){throw new Error("Cannot negate a statement")}),G(Nn,function(){return Q(this)}),G(Hn,function(){return Q(this)}),G(In,function(){return Q(this)}),G(bt,function(){return"!"==this.operator?this.expression:Q(this)}),G(dt,function(e){var n=this.expressions.slice();return n.push(n.pop().negate(e)),Y(this,n)}),G(xt,function(e,n){var t=this.clone();return t.consequent=t.consequent.negate(e),t.alternative=t.alternative.negate(e),Z(this,t,n)}),G(wt,function(e,n){var t=this.clone(),i=this.operator;if(e.option("unsafe_comps"))switch(i){case"<=":return t.operator=">",t;case"<":return t.operator=">=",t;case">=":return t.operator="<",t;case">":return t.operator="<=",t}switch(i){case"==":return t.operator="!=",t;case"!=":return t.operator="==",t;case"===":return t.operator="!==",t;case"!==":return t.operator="===",t;case"&&":return t.operator="||",t.left=t.left.negate(e,n),t.right=t.right.negate(e),Z(this,t,n);case"||":return t.operator="&&",t.left=t.left.negate(e,n),t.right=t.right.negate(e),Z(this,t,n)}return Q(this)});var le=cn("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");function pe(e){for(;(e=e.tail_node())instanceof Yt;)if(!(e=e.fixed_value()))return!0;return!(e instanceof St||"Binary"==e.TYPE&&!ce[e.operator]||e instanceof Vt||e instanceof Fn||e instanceof zt&&un(e.properties,function(e){return!(e instanceof Ft||e instanceof _t)})||e instanceof Lt||e instanceof gt)}function de(e,n,t){return!un(e,t?function(e){return e instanceof _t?!t(e,n):!e.has_side_effects(n)}:function(e){return!e.has_side_effects(n)})}function he(e,n){return!e.expression.is_string(n)||e.expression.has_side_effects(n)}function ve(e,n){for(var t=e.length;0<=--t;)if(e[t].may_throw(n))return!0;return!1}function me(e){for(var n=e.length;0<=--n;)if(!e[n].is_constant_expression())return!1;return!0}function _e(e){return e&&e.aborts()}function ge(){var e=this.body.length;return 0<e&&_e(this.body[e-1])}lt.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var n=this.expression;if(U(n)&&le[n.name])return!0;if(n instanceof vt&&U(n.expression)){var t=K[n.expression.name];return t&&(t[n.property]||"Math"==n.expression.name&&"random"==n.property)}}return this.pure||!e.pure_funcs(this)}),hn.DEFMETHOD("is_call_pure",en),lt.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return!1;var n=this.expression;if(!(n instanceof vt))return!1;var t,i=n.expression,r=n.property;if(i instanceof St)t=X.Array;else if(i.is_boolean(e))t=X.Boolean;else if(i.is_number(e))t=X.Number;else if(i instanceof Gt)t=X.RegExp;else if(i.is_string(e)){if(t=X.String,"replace"==r){i=this.args[1];if(i&&!i.is_string(e))return!1}}else n.may_throw_on_access(e)||(t=X.Object);return t&&t[r]}),(G=function(e,n){e.DEFMETHOD("has_side_effects",n)})(hn,nn),G(St,function(e){return de(this.elements,e,he)}),G(kt,function(e){var n=this.left;if(!(n instanceof ht))return!0;var t=n.expression;return!(t instanceof Lt)||!t.scope.new||n instanceof mt&&n.property.has_side_effects(e)||this.right.has_side_effects(e)}),G(wt,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)||"in"==this.operator&&!Be(this.right)}),G(xn,function(e){return de(this.body,e)}),G(lt,function(e){return!(this.is_expr_pure(e)||this.is_call_pure(e)&&!this.expression.has_side_effects(e))||de(this.args,e,he)}),G(nt,function(e){return this.expression.has_side_effects(e)||de(this.body,e)}),G(xt,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)}),G(Vt,en),G(ot,function(e){return de(this.definitions,e)}),G(Dt,function(e){return de(this.elements,e)}),G(Ot,function(e){return this.key instanceof hn&&this.key.has_side_effects(e)||this.value.has_side_effects(e)}),G(At,function(e){return de(this.properties,e)}),G(vt,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)}),G(gn,en),G(Kn,function(e){return this.condition.has_side_effects(e)||this.body&&this.body.has_side_effects(e)||this.alternative&&this.alternative.has_side_effects(e)}),G(En,function(e){return this.body.has_side_effects(e)}),G(Fn,en),G(zt,function(e){return de(this.properties,e,function(e,n){e=e.expression;return pe(e)||e.has_side_effects(n)})}),G($t,function(e){return this.key instanceof hn&&this.key.has_side_effects(e)||this.value.has_side_effects(e)}),G(dt,function(e){return de(this.expressions,e)}),G(bn,function(e){return this.body.has_side_effects(e)}),G(mt,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)}),G(Qn,function(e){return this.expression.has_side_effects(e)||de(this.body,e)}),G(Ct,en),G(Yt,function(e){return!this.is_declared(e)||!te(this)}),G(Lt,en),G(tt,function(e){return de(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)}),G(gt,function(e){return li[this.operator]||this.expression.has_side_effects(e)}),G(ct,function(e){return this.value}),(G=function(e,n){e.DEFMETHOD("may_throw",n)})(hn,nn),G(Vt,en),G(gn,en),G(Fn,en),G(Ct,en),G(Lt,en),G(St,function(e){return ve(this.elements,e)}),G(kt,function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof Yt)&&this.left.may_throw(e)}),G(wt,function(e){return this.left.may_throw(e)||this.right.may_throw(e)||"in"==this.operator&&!Be(this.right)}),G(xn,function(e){return ve(this.body,e)}),G(lt,function(e){return!!ve(this.args,e)||!this.is_expr_pure(e)&&(!!this.expression.may_throw(e)||(!(this.expression instanceof Fn)||ve(this.expression.body,e)))}),G(nt,function(e){return this.expression.may_throw(e)||ve(this.body,e)}),G(xt,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)}),G(ot,function(e){return ve(this.definitions,e)}),G(vt,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)}),G(Kn,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)}),G(En,function(e){return this.body.may_throw(e)}),G(zt,function(e){return ve(this.properties,e)}),G($t,function(e){return this.key instanceof hn&&this.key.may_throw(e)||this.value.may_throw(e)}),G(Vn,function(e){return this.value&&this.value.may_throw(e)}),G(dt,function(e){return ve(this.expressions,e)}),G(bn,function(e){return this.body.may_throw(e)}),G(mt,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)}),G(Qn,function(e){return this.expression.may_throw(e)||ve(this.body,e)}),G(Yt,function(e){return!this.is_declared(e)}),G(tt,function(e){return(this.bcatch?this.bcatch.may_throw(e):ve(this.body,e))||this.bfinally&&this.bfinally.may_throw(e)}),G(gt,function(e){return!("typeof"==this.operator&&this.expression instanceof Yt)&&this.expression.may_throw(e)}),G(ct,function(e){return!!this.value&&this.value.may_throw(e)}),(G=function(e,n){e.DEFMETHOD("is_constant_expression",n)})(hn,en),G(St,function(){return me(this.elements)}),G(wt,function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()&&("in"!=this.operator||Be(this.right))}),G(Vt,nn),G(Fn,function(i){var r=this,o=!0,a=[];return r.walk(new ri(function(e,n){if(!o)return!0;if(e instanceof yn)return e===r?void 0:(a.push(e),n(),a.pop(),!0);if(e instanceof Yt){if(r.inlined||e.redef)return!(o=!1);if(r.variables.has(e.name))return!0;var t=e.definition();if(Ke(t.scope,a))return!0;if(i&&!t.redefined()){n=i.find_variable(e.name);if(t.undeclared?!n:n===t)return o="f",!0}return!(o=!1)}return e instanceof Lt?(0==a.length&&r instanceof Nn&&(o=!1),!0):void 0})),o}),G(zt,function(){return me(this.properties)}),G($t,function(){return"string"==typeof this.key&&this.value.is_constant_expression()}),G(gt,function(){return this.expression.is_constant_expression()}),(G=function(e,n){e.DEFMETHOD("aborts",n)})(vn,rn),G(Yn,tn),G(kn,ge),G(Zn,ge),G(Kn,function(){return this.alternative&&_e(this.body)&&_e(this.alternative)&&this});var be=cn(["use asm","use strict"]);function ye(e){switch(e.body.length){case 0:return ie(gn,e);case 1:var n=e.body[0];if(!(n instanceof at||n instanceof st))return n}return e}function we(n,t){n.walk(new ri(function(e){return e instanceof Vn?(t(e),!0):e instanceof Mn&&e!==n||void 0}))}function xe(e){var n=Object.create(null);return we(e,function(e){e=e.value;(e=e&&e.tail_node())instanceof Yt&&(e=e.definition().id,n[e]=(n[e]||0)+1)}),n}function ke(e,n,t){return e.bool_fn+(n[e.id]||0)===e.references.length-e.replaced&&!t.exposed(e)}function Ee(e,i){we(e,function(e){e.in_bool=!0;var n,t=e.value;t&&((n=t.is_truthy()||t.evaluate(i,!0))?!n||n instanceof hn||(t=t.drop_side_effect_free(i),e.value=t?Y(e.value,[t,ie(Jt,e.value,{value:1})]):ie(Jt,e.value,{value:1})):(t=t.drop_side_effect_free(i),e.value=t?Y(e.value,[t,ie(Jt,e.value,{value:0})]):null))})}function Se(e,n){if(!e.name||!n.option("ie8"))return 1;e=e.name.definition();return!n.exposed(e)&&un(e.references,function(e){return!(e instanceof Yt)})}function Te(e,n,t,i){var r=e.length;if(!r)return null;for(var o=[],a=!1,s=0;s<r;s++){var f=e[s],c=i&&f instanceof _t?i(f,n,t):f.drop_side_effect_free(n,t);c!==f&&(a=!0),c&&(o.push(c),t=!1)}return a?o.length?o:null:e}function De(e,n,t){var i=e.expression;return i.is_string(n)?i.drop_side_effect_free(n,t):e}function Oe(e){return e instanceof _t?ie(St,e,{elements:[e]}):e}function Ae(n,e,t){t=t||Jn;var i=!1,r=new ri(function(e){return!!(i||e instanceof Mn)||(e instanceof t&&r.loopcontrol_target(e)===n?i=!0:void 0)});return e instanceof En&&r.push(e),r.push(n),n.body.walk(r),i}function ze(e,n,t){if(e instanceof wt)if(e.left instanceof Wt){if(e.right instanceof bt&&"typeof"==e.right.operator){var i=e.right.expression;if(U(i)){var r,o,a,s="undefined"==e.left.value;switch(e.operator){case"==":r=s?t:n;break;case"!=":r=s?n:t;break;default:return}r&&(o=i.definition(),a=new ri(function(e){if(e instanceof Mn){var n=a.parent();return n instanceof lt&&n.expression===e?void 0:!0}e instanceof Yt&&e.definition()===o&&(e.defined=!0)}),r.walk(a))}}}else switch(e.operator){case"&&":ze(e.left,n),ze(e.right,n);break;case"||":ze(f(e.left),t),ze(f(e.right),t)}function f(e){if(e instanceof wt)switch(e.operator){case"==":return(e=e.clone()).operator="!=",e;case"!=":return(e=e.clone()).operator="==",e}}}function $e(r){return function(n,t){var i=!1;return this.definitions.forEach(function(e){e.value&&(i=!0),e.name.match_symbol(function(e){e instanceof Ct&&t.push(ie(ct,e,{name:e,value:r(n,e)}))},!0)}),i}}function Me(e){return"arguments"!=e.name&&e.orig.length<(e.orig[0]instanceof Ut?3:2)}function je(e,n){if(e.exposed(n))return!0;for(var t=n.scope.resolve(),i=n.scope;i!==t;)if((i=i.parent_scope).var_names()[n.name])return!0}function Fe(e){return ie(ft,e,{definitions:e.definitions.map(function(e){return ie(ct,e,{name:e.name.convert_symbol(Ht,function(e,n){var t=e.definition();t.orig[t.orig.indexOf(n)]=e;e=t.scope.resolve();t.scope!==e&&(t.scope=e).variables.set(t.name,t)}),value:e.value})})})}function qe(e,t){return t.option("varify")&&un(e.definitions,function(e){return!e.name.match_symbol(function(e){if(e instanceof Ct){var n=e.definition();return!e.fixed_value()||!Me(n)||je(t,n)}},!0)})?Fe(e):e}function Ce(e){var n=e.expression;if(!(n instanceof dt))return e;var t=n.expressions.slice(),n=e.clone();return n.expression=t.pop(),t.push(n),Y(e,t)}function Ne(e,t,n){var i=e.expression,r=i instanceof Yt?i.fixed_value():i;if(r instanceof Fn&&!r.uses_arguments&&!(r.pinned()||n&&n.indexOf(r)<0)){var o=e.args;if(un(o,function(e){return!(e instanceof _t)})){for(var a=0,s=0,f=r===i&&!r.name&&t.drop_fargs(r,e)?function(e,n){return!e||(e instanceof Dt?0==e.elements.length&&n instanceof St:e instanceof At?0==e.properties.length&&n&&!n.may_throw_on_access(t):e.__unused)}:en,c=[],u=0;u<o.length;u++){var l=r.argnames[u];if(t.option("default_values")&&l instanceof ut&&o[u].is_defined(t)&&(r.argnames[u]=l=l.name),!l||"__unused"in l){var p=o[u].drop_side_effect_free(t);if(f(l)){l&&r.argnames.splice(u,1),o.splice(u,1),p&&c.push(p),u--;continue}if(p)c.push(p),o[a++]=Y(e,c),c=[];else if(l){if(!c.length){o[a++]=ie(Jt,o[u],{value:0});continue}o[a++]=Y(e,c),c=[]}}else{if(l&&f(l,o[u])){p=o[u].drop_side_effect_free(t);r.argnames.splice(u,1),o.splice(u,1),p&&c.push(p),u--;continue}c.push(o[u]),o[a++]=Y(e,c),c=[]}s=a}for(;u<r.argnames.length;u++)f(r.argnames[u])&&r.argnames.splice(u--,1);o.length=s,c.length&&(i=Y(e,c),o.push(o.length<r.argnames.length?ie(bt,e,{operator:"void",expression:i}):i))}}}function Pe(t,i,e,n){if(n instanceof wt&&ce[n.operator]&&n.right instanceof kt&&"="==n.right.operator&&n.right.left instanceof Yt&&n.right.left.definition()===i&&!e.has_side_effects(t)&&r(n.left)&&r(n.right.right))return i.replaced++,"&&"==n.operator?ie(xt,n,{condition:n.left,consequent:n.right.right,alternative:e}):ie(xt,n,{condition:n.left,consequent:e,alternative:n.right.right});function r(e){if(!e.has_side_effects(t)){var n=!1;return e.walk(new ri(function(e){return!!n||(e instanceof Yt&&e.definition()===i?n=!0:void 0)})),!n}}}e(_n,function(e,n){return!n.option("directives")||be[e.value]&&n.has_directive(e.value)===e?e:ie(gn,e)}),e(mn,function(e,n){return n.option("drop_debugger")?ie(gn,e):e}),e(En,function(e,n){return n.option("dead_code")&&e.body instanceof Gn&&n.loopcontrol_target(e.body)===e.body?ie(gn,e):n.option("unused")&&0==e.label.references.length?e.body:e}),e(xn,function(e,n){return e.body=$(e.body,n),e}),e(kn,function(e,n){return e.body=$(e.body,n),ye(e)}),e(Nn,function(e,n){if(!n.option("arrows"))return e;var t=$(e.value?[e.first_statement()]:e.body,n);switch(t.length){case 1:var i=t[0];if(i instanceof Vn){e.body.length=0,e.value=i.value;break}default:e.body=t,e.value=null}return e}),e(In,function(n,e){if(n.body=$(n.body,e),e.option("inline"))for(var t=0;t<n.body.length;t++){var i=n.body[t];if(!(i instanceof _n)){if(i instanceof Vn){var r=i.value;if(!r||"Call"!=r.TYPE)break;if(r.is_expr_pure(e))break;var o=r.expression;if(o instanceof Yt){if(n.name&&n.name.definition()===o.definition())break;o=o.fixed_value()}if(!(o instanceof Bn||o instanceof In))break;if(o.uses_arguments)break;if(o===r.expression){if(o.parent_scope!==n)break;if(!un(o.enclosed,function(e){return e.scope!==n}))break}if(o.contains_this())break;var a=o.argnames.length;if(0<a&&e.option("inline")<2)break;if(a>n.argnames.length)break;if(!un(n.argnames,function(e){return e instanceof It}))break;if(!un(r.args,function(e){return!(e instanceof _t)}))break;for(var s=0;s<a;s++){var f=r.args[s];if(!(f instanceof Yt))break;if(f.definition()!==n.argnames[s].definition())break}if(s<a)break;for(;s<r.args.length&&!r.args[s].has_side_effects(e);s++);if(s<r.args.length)break;if(a<n.argnames.length&&!e.drop_fargs(n,e.parent())){if(!e.drop_fargs(o,r))break;for(;o.argnames.push(o.make_var(It,o,"argument_"+a)),++a<n.argnames.length;);}return r.expression}break}}return n}),Mn.DEFMETHOD("merge_variables",function(o){if(o.option("merge_vars")){var f,c=this,u={},a=[],s=[],l=0,p=new ln,d=Object.create(null),h=Object.create(null),v=new ri(function(i,e){if(i instanceof kt){var n=i.left;if(n instanceof Tt){i.right.walk(v);var t=new ri(function(e){if(!(e instanceof Tt))return e instanceof Ot?e.key instanceof hn?(w(),e.key.walk(v),x(),w(),e.value.walk(t),x()):e.value.walk(t):e instanceof Yt?k(e,!1):e.walk(v),!0});return n.walk(t),!0}return n instanceof Yt?("="!=i.operator&&k(n,!0),i.right.walk(v),k(n,!1),!0):void 0}if(i instanceof wt)return ce[i.operator]?(i.left.walk(v),w(),i.right.walk(v),x(),!0):void 0;var r;if(i instanceof Gn)return(s=v.loopcontrol_target(i))instanceof Sn||E(s),!0;if(i instanceof lt){var o=i.expression,n=o.tail_node();return Cn(n)?(o!==n&&o.expressions.slice(0,-1).forEach(function(e){e.walk(v)}),i.args.forEach(function(e){e.walk(v)}),n.walk(v),!0):void 0}if(i instanceof xt)return i.condition.walk(v),w(),i.consequent.walk(v),x(),w(),i.alternative.walk(v),x(),!0;if(i instanceof Xn)return(s=v.loopcontrol_target(i))instanceof Dn&&E(s),!0;if(i instanceof Dn){w(),u.block=i,u.loop=!0;var a=u;return i.body.walk(v),u.inserted===i&&(u=a),i.condition.walk(v),x(),!0}if(i instanceof An)return i.init&&i.init.walk(v),w(),u.block=i,u.loop=!0,i.condition&&i.condition.walk(v),i.body.walk(v),i.step&&i.step.walk(v),x(),!0;if(i instanceof zn)return i.object.walk(v),w(),u.block=i,u.loop=!0,i.init.walk(v),i.body.walk(v),x(),!0;if(i instanceof Kn)return i.condition.walk(v),w(),i.body.walk(v),x(),i.alternative&&(w(),i.alternative.walk(v),x()),!0;if(i instanceof En){w(),u.block=i;a=u;return i.body.walk(v),u.inserted===i&&(u=a),x(),!0}if(i instanceof Mn)return w(),(u.block=i)===c&&(f=u),i instanceof Fn&&(i.name&&(d[i.name.definition().id]=!1),t=i.uses_arguments&&!v.has_directive("use strict")?function(e){e instanceof It&&(d[e.definition().id]=!1)}:function(e){e instanceof It&&k(e,!1)},r=new ri(function(e){if(e instanceof Ct&&(d[e.definition().id]=!1),e instanceof Yt){var n=e.definition(),t=i.variables.get(e.name);return t&&(t===n||n.undeclared||i.parent_scope.find_variable(e.name)===n)?(d[n.id]=!1,d[t.id]=!1):(t=u,x(),k(e,!0),u=t),!0}}),i.argnames.forEach(function(e){e.mark_symbol(t,r)})),i instanceof Nn&&i.value?i.value.walk(v):wn(i,v),x(),!0;if(i instanceof Qn){i.expression.walk(v);a=u;return i.body.forEach(function(e){e instanceof et||(e.expression.walk(v),a===u&&w())}),u=a,i.body.forEach(function(e){w(),u.block=i;var n=u;wn(e,v),u.inserted===i&&(u=n),x()}),!0}if(i instanceof Yt)return k(i,!0),!0;if(i instanceof tt)return w(),wn(u.block=i,v),x(),i.bcatch&&(i.bcatch.argname&&i.bcatch.argname.mark_symbol(function(e){e instanceof Bt&&(e=e.definition(),d[e.id]=!1,(e=e.redefined())&&(d[e.id]=!1))},v),w(),i.bfinally&&(u.block=i.bcatch),wn(i.bcatch,v),x()),i.bfinally&&i.bfinally.walk(v),!0;if(i instanceof gt){if(!si[i.operator])return;var s=i.expression;return s instanceof Yt?(k(s,!0),!0):void 0}return i instanceof ct?(i.value&&i.value.walk(v),i.name.mark_symbol(i.value?function(e){if(e instanceof Ct)return e instanceof Ht?k(e,!1):d[e.definition().id]=!1,!0}:function(e){if(e instanceof Ct){var n=e.definition().id;return e instanceof Ht?n in d?d[n]&&d[n].push(e):p.add(n,e):d[n]=!1,!0}},v),!0):i instanceof On?(w(),u.block=i,u.loop=!0,e(),x(),!0):void 0});v.directives=Object.create(o.directives),c.walk(v);for(var e=Object.create(null);a.length&&s.length;){var n=a.pop(),t=n.definition;if(t.id in h&&d[t.id]){for(var i={start:d[t.id].start};t.id in e;)t=e[t.id];i.end=d[t.id].end;var r=[];do{var m=s.pop();if(m&&!(m.index>n.index)){var _=m.definition.id,g=d[_];if(g){if(i.start.block===g.start.block&&T(i,g)&&(!i.start.loop||T(g,i))&&un(g,function(e){return e.scope.find_variable(t.name)===t})){var b=[],y=[];g.forEach(function(e){e.thedef=t,e.name=t.name,(e instanceof Yt?y:b).push(e)}),t.orig=b.concat(t.orig),t.references=y.concat(t.references),t.fixed=m.definition.fixed&&t.fixed,e[_]=t;break}r.unshift(m)}}}while(s.length);r.length&&(s=s.concat(r))}}}function w(){u=Object.create(u)}function x(){u=Object.getPrototypeOf(u)}function k(e,n){var t,i,r=e.definition();if(r.id in d){if(!(i=d[r.id]))return;if(i.start.block!==u.block)return d[r.id]=!1;if(i.push(e),i.end=u,r.id in h)s[h[r.id]]=null;else if(!n)return}else{if((t=c.variables.get(r.name))!==r)return t&&f===u&&(d[t.id]=!1),d[r.id]=!1;if(o.exposed(r)||"arguments"==e.name||"await"==e.name)return d[r.id]=!1;if((i=p.get(r.id)||[]).push(e),d[r.id]=i,!n)return i.start=u,a.push({index:l++,definition:r});if(u.block!==c)return d[r.id]=!1;i.start=f}h[r.id]=s.length,s.push({index:l++,definition:r})}function E(e){for(var n=[];;){if(pn(u,"block")){var t=u.block;if(t instanceof En&&(t=t.body),t===e)break}n.push(u),x()}for(u.inserted=u.block,w();n.length;){var i=n.pop();w(),pn(i,"block")&&(u.block=i.block),pn(i,"loop")&&(u.loop=i.loop)}}function S(e,n){return e===n||e.isPrototypeOf(n)}function T(e,n){return S(e.start,e.end)||S(e.start,n.start)}}),Mn.DEFMETHOD("drop_unused",function(y){if(y.option("unused")){var w=this,x=!(w instanceof jn)||y.toplevel.funcs,k=!(w instanceof jn)||y.toplevel.vars,E=/keep_assign/.test(y.option("unused"))?en:function(e,n){var t,i=!1;if(e instanceof kt?!e.write_only&&"="!=e.operator||(t=e.left):e instanceof gt&&e.write_only&&(t=e.expression),/strict/.test(y.option("pure_getters")))for(;t instanceof ht&&!t.expression.may_throw_on_access(y);)t instanceof mt&&n.unshift(t.property),t=t.expression,i=!0;if(t instanceof Yt&&!y.exposed(t.definition())&&te(t,i))return t},S=Object.create(null),f=function(e){return(f=function e(n,t,i){var r=y.parent(t);if(!r)return i;if(r instanceof Ot){var o=y.parent(t+1);if(r.key===n){var a=y.parent(t+2);if(a instanceof Fn)return e(a,t+3,0<=a.argnames.indexOf(o)?function(e){var n=i(e);if(n)return n;if(n=a.variables.get(e)){var e=n.orig[0];if(e instanceof It||e instanceof Ut)return n}}:function(e){return i(e)||a.variables.get(e)})}return e(o,t+2,i)}return e(r,t+1,r.variables?function(e){return i(e)||r.variables.get(e)}:i)}(w,0,Ze))(e)},T=Object.create(null),c=[],D=Object.create(null),u=Object.create(null),l=Object.create(null);w instanceof jn&&y.top_retain&&w.variables.each(function(e){!y.top_retain(e)||e.id in D||(D[e.id]=!0,c.push(e))});var p=new ln,O=new ln,d=new ln,A=this,h=new ri(function(r,e){if(r instanceof Fn&&r.uses_arguments&&!h.has_directive("use strict")&&r.each_argname(function(e){e=e.definition();e.id in D||(D[e.id]=!0,c.push(e))}),r!==w){if(A===w){if(Rn(r)){var n=r.name.definition();return x||n.id in D||(D[n.id]=!0,c.push(n)),d.add(n.id,r),!0}if(r instanceof ot)return r.definitions.forEach(function(t){var i=t.value&&(t.name instanceof Tt||t.value.has_side_effects(y));t.name.mark_symbol(function(e){if(e instanceof Ct){var n=e.definition();return O.add(n.id,t),r instanceof ft&&n.orig[0]instanceof Bt&&((e=n.redefined())&&O.add(e.id,t)),n.id in D||k&&(r instanceof at?!n.redefined():!n.const_redefs)&&(r instanceof ft||Me(n))||(D[n.id]=!0,c.push(n)),t.value&&(i||d.add(n.id,t.value),p.add(n.id,t)),!0}},h),i&&t.value.walk(h)}),!0;if(r instanceof It){n=r.definition();return O.add(n.id,r),p.add(n.id,r),!0}}return t(r,e,!0)}});h.directives=Object.create(y.directives),w.walk(h),h=new ri(t);for(var e=0;e<c.length;e++){var n=d.get(c[e].id);n&&n.forEach(function(e){e.walk(h)})}Object.keys(S).forEach(function(e){var n,t=S[e];t?(t=t.reduce(function(n,e){return e.forEach(function(e){an(n,e)}),n},[]),n=(p.get(e)||[]).filter(function(n){return Qe(n instanceof gt?function(e){return e===n}:function(e){return e===n||!(e instanceof gt)&&ae(e)===ae(n)},t)}),t.length==n.length?S[e]=n:delete S[e]):delete S[e]});var z=y.option("keep_fnames")?en:y.option("ie8")?function(e){return!y.exposed(e)&&e.references.length==e.replaced}:function(e){return!(e.id in D)||!(e.orig.length<2)&&(e.orig[1]instanceof It||un(e.references,function(e){return!e.in_arg}))},$=[],M=[],j=[],F=new ui(function(e){if(e instanceof ut)return R(F,e);if(e instanceof Dt){for(var n=!0,t=e.elements.length;0<=--t;){var i=e.elements[t].transform(F);i?(e.elements[t]=i,n=!1):n?e.elements.pop():e.elements[t]=ie(Zt,e.elements[t])}return e}if(e instanceof Ot){var r=!1;if(e.key instanceof hn&&(e.key=e.key.transform(q),r=e.key.has_side_effects(y)),r&&b(e.value))e.value=e.value.transform(q);else{r=e.value.transform(F);if(!r)return on.skip;e.value=r}return e}return e instanceof Ct?e.definition().id in D?e:null:void 0}),q=new ui(function(u,e,n){var l=q.parent();if(k){var t=[];if(r=E(u,t)){var i=(o=r.definition()).id in D;if(u instanceof kt?(!i||u.left===r&&H(o,u)<0)&&(g=I(u),!0===u.write_only&&(g=g.drop_side_effect_free(y)||ie(Jt,u,{value:0}))):(!i||u.expression===r&&H(o,u)<0)&&(g=ie(Jt,u,{value:0})),g)switch(l instanceof dt&&l.tail_node()!==u&&(g=g.drop_side_effect_free(y)),g&&t.push(g),t.length){case 0:return on.skip;case 1:return re(0,l,u,t[0].transform(q));default:return Y(u,t.map(function(e){return e.transform(q)}))}}else if(u instanceof yt&&u.expression instanceof Yt&&H(u.expression.definition(),u)<0)return ie(bt,u,{operator:"+",expression:u.expression})}if(u instanceof lt&&M.push(u),A===w){if(u instanceof Fn){if(x&&u!==w&&Rn(u))if(!((o=u.name.definition()).id in D))return C(u.name,"Dropping unused function {name}"),o.eliminated++,n?on.skip:ie(gn,u);if(Cn(u)&&u.name&&z(u.name.definition())&&$.push(u),!(u instanceof qn)){for(var r,o,a=y.drop_fargs(u,l),s=u.argnames,f=s.length;0<=--f;)(r=s[f])instanceof It?(o=r.definition()).id in D?(a=!1,H(o,r)<0&&(r.__unused=null)):a?(C(r,"Dropping unused function argument {name}"),s.pop()):r.__unused=!0:r.transform(F)?a=!1:a?(C(r.name,"Dropping unused function argument {name}"),s.pop()):(r.name.__unused=!0,s[f]=r.name);j.push(u)}}if(u instanceof it&&u.argname instanceof Tt&&u.argname.transform(F),u instanceof ot&&!(l instanceof zn&&l.init===u)){var p=[],d=[],h=[],v=[],m=0,_=u instanceof ft;switch(u.definitions.forEach(function(n){var e,t,i,r,o,a,s;function f(e){var n=e.definition();return n.orig[0]instanceof Bt&&n.scope.resolve()===e.scope.resolve()}function c(){0<v.length&&(0==h.length?p.push(ie(bn,u,{body:Y(u,v)})):n.value?(v.push(n.value),n.value=Y(n.value,v)):n.value=ie(bt,n,{operator:"void",expression:Y(n,v)}),v=[]),h.push(n)}n.value&&(n.value=n.value.transform(q)),n.name instanceof Tt?U(n.name,n.value,function(e){return!k||e.definition().id in D||f(e)||_&&!te(e)?e:null})?c():(s=n.value.drop_side_effect_free(y))&&v.push(s):(e=n.name.definition(),!(t=_?te(n.name):Me(e))||!k||e.id in D?(n.value&&H(e,n)<0&&(r=n.value.write_only,s=n.value.drop_side_effect_free(y),n.value!==s?n.value=s&&Y(n.value,[s,ie(Jt,n.value,{value:0})]):n.value.write_only!==r&&(n.value.write_only=r)),a=O.get(e.id),n.value||u instanceof st?y.option("functions")&&!y.option("ie8")&&!(u instanceof at||u instanceof st)&&1==a.length&&0==e.assignments&&n.value instanceof In&&(e.references.length?un(e.references,function(e){return n.value===e.fixed_value()}):n.value===n.name.fixed_value())&&(!n.value.name||0==(i=n.value.name.definition()).assignments&&(i.name==n.name.name||un(i.references,function(e){return e.scope.find_variable(n.name.name)===n.name.definition()})))&&(y.has_directive("use strict")?l instanceof Mn:l instanceof xn||l instanceof An&&l.init===u||l instanceof Kn)&&function(e,n){n=e.variables.get(n);return!n||e.name&&n===e.name.definition()}(n.value,n.name.name)?(hn.warn("Declaring {name} as function [{file}:{line},{col}]",N(n.name)),(r=ie(Bn,n,n.value)).name=ie(Rt,n.name,n.name),o=n.name.scope.resolve().def_function(r.name),i&&i.references.forEach(function(e){e.name=o.name,e.thedef=o,e.reference({})}),p.push(r)):(t&&1<a.length&&e.orig.indexOf(n.name)>e.eliminated&&(fn(a,n),m++),c()):t&&1<a.length?(hn.info("Dropping declaration of variable {name} [{file}:{line},{col}]",N(n.name)),fn(a,n),e.eliminated++):d.push(n)):f(n.name)?((s=n.value&&n.value.drop_side_effect_free(y))&&v.push(s),1<(a=O.get(e.id)).length?(hn.warn("Dropping duplicated declaration of variable {name} [{file}:{line},{col}]",N(n.name)),fn(a,n),e.eliminated++):(n.value=null,d.push(n))):((s=n.value&&!n.value.single_use&&n.value.drop_side_effect_free(y))?(hn.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",N(n.name)),v.push(s)):C(n.name,"Dropping unused variable {name}"),e.eliminated++))}),d.length){case 0:if(0==h.length)break;if(h.length==m){[].unshift.apply(v,h.map(function(e){hn.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",N(e.name));var n=e.name.definition(),t=ie(Yt,e.name,e.name);n.references.push(t);t=ie(kt,e,{operator:"=",left:t,right:e.value}),e=H(n,e);return 0<=e&&(S[n.id][e]=t),n.eliminated++,t}));break}case 1:if(0==h.length){var c=d[0].name.definition().id;if(c in T){u.definitions=d,T[c].init=u;break}}default:u.definitions=d.concat(h),p.push(u)}return 0<v.length&&p.push(ie(bn,u,{body:Y(u,v)})),P(p,u,n)}if(u instanceof kt){if(e(u,q),u.left instanceof Tt){var g=U(u.left,u.right,function(e){return e});if(!g)return u.right;u.left=g}return u}if(u instanceof En&&u.body instanceof An){if(e(u,q),u.body instanceof kn){var b=u.body;return u.body=b.body.pop(),b.body.push(u),n?on.splice(b.body):b}return u}if(u instanceof Mn){b=A;return e(A=u,q),A=b,u}}},function(e,n){if(e instanceof kn)switch(e.body.length){case 0:return n?on.skip:ie(gn,e);case 1:var t=e.body[0];if(!(t instanceof at||t instanceof st))return t}else{if(e instanceof An)return e.init instanceof kn&&(o=e.init,e.init=o.body.pop(),o.body.push(e)),e.init instanceof Bn?((o=o||ie(kn,e,{body:[e]})).body.splice(-1,0,e.init),e.init=null):e.init instanceof bn?e.init=e.init.body:L(e.init)&&(e.init=null),o?n?on.splice(o.body):o:e;if(e instanceof zn){if(k&&y.option("loops")&&L(e.body)){var i=g(e);if(i){var r=i.definition();if(!(r.id in D)){C(i,"Dropping unused loop variable {name}"),T[r.id]===e&&delete T[r.id];var o=[],i=e.object.drop_side_effect_free(y);return i&&(hn.warn("Side effects in object of for-in loop [{file}:{line},{col}]",i.start),o.push(ie(bn,e,{body:i}))),e.init instanceof ot&&r.orig[0]instanceof Bt&&o.push(e.init),P(o,e,n)}}}}else if(e instanceof dt&&1==e.expressions.length)return e.expressions[0]}});q.push(y.parent()),w.transform(q),w instanceof Fn&&1==w.body.length&&w.body[0]instanceof _n&&"use strict"==w.body[0].value&&(w.body.length=0),$.forEach(function(e){e.name=null}),M.forEach(function(e){Ne(e,y,j)})}function C(e,n){hn[0<e.definition().references.length?"info":"warn"](n+" [{file}:{line},{col}]",N(e))}function N(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}function P(e,n,t){switch(e.length){case 0:return t?on.skip:ie(gn,n);case 1:return e[0];default:return t?on.splice(e):ie(kn,n,{body:e})}}function v(e,n){return e.scope===w&&(e.fixed&&n.fixed||(S[e.id]=!1),!1!==S[e.id])}function m(e,n){S[e.id]||(S[e.id]=[]),n.fixed.assigns&&an(S[e.id],n.fixed.assigns)}function H(e,n){e=S[e.id];return e&&e.indexOf(n)}function _(e,n,t){e.id in D||(n&&t?(D[e.id]=!0,c.push(e)):(u[e.id]=n,l[e.id]=t))}function I(e){var n=e.right;if(!e.write_only)return n;if(!(n instanceof wt&&ce[n.operator]))return n;if(!(n.left instanceof Yt))return n;if(!(e.left instanceof Yt))return n;e=e.left.definition();return n.left.definition()!==e||n.right.has_side_effects(y)?n:(v(e,n.left)&&m(e,n.left),n.right)}function g(e){var n=e.init;if(n instanceof ot)return(n=n.definitions[0].name)instanceof Ct&&n;for(;n instanceof ht;)n=n.expression.tail_node();return n instanceof Yt?n:void 0}function t(e,n,t){e instanceof kt&&e.left instanceof Yt&&(i=e.left.definition()).scope===w&&p.add(i.id,e),e instanceof gt&&e.expression instanceof Yt&&(i=e.expression.definition()).scope===w&&p.add(i.id,e);var i,r=[],o=E(e,r);if(o&&w.variables.get(o.name)===(s=o.definition())&&(!ne(s)||un(w.argnames,function(e){return!e.match_symbol(function(e){if(e instanceof It){e=e.definition();return e.references.length>e.replaced}},!0)}))){if(r.forEach(function(e){e.walk(h)}),e instanceof kt){if("p"===e.write_only&&e.right.may_throw_on_access(y))return;var a,r=I(e);t&&!0===e.write_only&&s.scope===w&&!r.has_side_effects(y)?d.add(s.id,r):r.walk(h),e.left===o?e.write_only||_(s,!0,l[s.id]):(a=o.fixed_value())&&a.is_constant()||_(s,u[s.id],!0)}return v(s,o)&&ue(o,e)!==o&&m(s,o),!0}if(e instanceof zn){if(e.init instanceof Yt&&A===w&&((a=e.init.definition().id)in T||(T[a]=e)),!k||!y.option("loops"))return;if(!L(e.body))return;if(e.init.has_side_effects(y))return;if(!(o=g(e)))return;if((i=o.definition()).scope!==w){o=f(o.name);if((o&&o.redefined()||o)===i)return}return e.object.walk(h),!0}if(e instanceof Yt)return(s=e.definition()).id in D||(D[s.id]=!0,c.push(s)),B(s.scope,e.scope)&&(!(i=s.redefined())||i.id in D||(D[i.id]=!0,c.push(i))),v(s,e)&&m(s,e),!0;if(e instanceof Mn){var s=A;return A=e,n(),A=s,!0}}function b(e){return(e instanceof ut?e.name:e)instanceof Ct}function R(e,n){n.value=n.value.transform(q);var t=n.name.transform(e);if(!t){e=n.value.drop_side_effect_free(y);if(!e)return null;(t=n.name)instanceof Tt?((t=t.clone())[t instanceof Dt?"elements":"properties"]=[],e instanceof St||e.is_string(y)||t instanceof At&&(e instanceof zt||e.is_boolean(y)||e.is_number(y))||(e=ie(St,e,{elements:[e]})),n.name=t):C(t,"Side effects in default value of unused variable {name}"),n.value=e}return n}function U(e,s,f){var c=new ui(function(e){if(e instanceof ut){if(!(y.option("default_values")&&s&&s.is_defined(y)))return R(c,e);e=e.name}if(e instanceof Dt){var n=s;s instanceof Yt&&(s=s.fixed_value());var t=s instanceof St&&s.elements,i=[];if(e.elements.forEach(function(e,n){e instanceof Zt||(s=t&&t[n],(e=e.transform(c))&&(i[n]=e))}),s=n,t&&0==i.length)return null;for(var r=i.length;0<=--r;)i[r]||(i[r]=ie(Zt,e.elements[r]||e));return e.elements=i,e}if(e instanceof At){n=s;if(s instanceof Yt&&(s=s.fixed_value()),s instanceof zt){t=Object.create(null);for(r=0;r<s.properties.length;r++){var o=s.properties[r];if("string"!=typeof o.key){t=null;break}t[o.key]=o.value}}var a=[];return(e.properties.forEach(function(e){var n=e.key instanceof hn?(e.key=e.key.transform(q),s=null,e.key.has_side_effects(y)):(s=t&&t[e.key],!1);n&&b(e.value)?(e.value=e.value.transform(q),a.push(e)):(n=e.value.transform(c))&&(e.value=n,a.push(e))}),s=n,0==a.length&&s&&!s.may_throw_on_access(y))?null:(e.properties=a,e)}return f(e)});return e.transform(c)}}),Mn.DEFMETHOD("hoist_declarations",function(r){var o,a,s,n,f,c,u,l,p,d,h;r.has_directive("use asm")||(o=r.option("hoist_funs"),a=r.option("hoist_vars"),s=this,a&&(n=0,s.walk(new ri(function(e){return 1<n||(e instanceof Mn&&e!==s||(e instanceof ft?(n++,!0):void 0))})),n<=1&&(a=!1)),(o||a)&&(f=Object.create(null),c=[],u=[],l=new ln,p=0,d=new ui(function(e){if(e!==s){if(e instanceof _n)return c.push(e),ie(gn,e);if(o&&e instanceof Bn&&(d.parent()===s||!r.has_directive("use strict")))return u.push(e),ie(gn,e);if(a&&e instanceof ft){if(!un(e.definitions,function(e){e=e.name;return e instanceof Ht&&!f[e.name]&&s.find_variable(e.name)===e.definition()}))return e;e.definitions.forEach(function(e){l.set(e.name.name,e),++p});var n=e.to_assignments(),t=d.parent();if(t instanceof zn&&t.init===e){if(n)return n;var i=e.definitions[0].name;return ie(Yt,i,i)}return t instanceof An&&t.init===e?n:n?ie(bn,e,{body:n}):ie(gn,e)}return e instanceof Mn?e:e instanceof Nt?(f[e.name]=!0,e):void 0}}),s.transform(d),0<p&&(h=[],l.each(function(e,n){s instanceof Fn&&!un(s.argnames,function(e){return e.name!=n})?l.del(n):((e=e.clone()).value=null,h.push(e),l.set(n,e))}),0<h.length&&(function e(n){for(;n.length;){var t=n[0];if(t instanceof bn){var i,r,o=t.body;if(o instanceof kt&&"="==o.operator&&(i=o.left)instanceof qt&&l.has(i.name)){var a=l.get(i.name);if(a.value)break;a.value=o.right,fn(h,a),h.push(a),n.shift();continue}if(o instanceof dt&&(r=o.expressions[0])instanceof kt&&"="==r.operator&&(i=r.left)instanceof qt&&l.has(i.name)){var a=l.get(i.name);if(a.value)break;a.value=r.right,fn(h,a),h.push(a),t.body=Y(o,o.expressions.slice(1));continue}}if(t instanceof gn)n.shift();else{if(!(t instanceof kn)||e(t.body))break;n.shift()}}return n.length}(s.body),h=ie(ft,s,{definitions:h}),u.push(h))),s.body=c.concat(u,s.body)))}),Mn.DEFMETHOD("process_boolean_returns",Ze),Bn.DEFMETHOD("process_boolean_returns",function(e){var n;e.option("booleans")&&(n=xe(this),ke(this.name.definition(),n,e)&&Ee(this,e))}),In.DEFMETHOD("process_boolean_returns",function(e){if(e.option("booleans")){var n=xe(this);if(!this.name||ke(this.name.definition(),n,e)){var t=e.parent();if(t instanceof kt){if("="!=t.operator)return;if(!((i=t.left)instanceof Yt))return;if(!ke(i.definition(),n,e))return}else if(t instanceof lt&&t.expression!==this){var i,r=t.expression;if(r instanceof Yt&&(r=r.fixed_value()),!(r instanceof Fn))return;if(r.uses_arguments||r.pinned())return;if((i=r.argnames[t.args.indexOf(this)])instanceof ut&&(i=i.name),i instanceof It&&!ke(i.definition(),n,e))return}else{if("Call"!=t.TYPE)return;e.pop();t=e.in_boolean_context();if(e.push(this),!t)return}Ee(this,e)}}}),yn.DEFMETHOD("var_names",function(){var t=this._var_names;return t||(this._var_names=t=Object.create(null),this.enclosed.forEach(function(e){t[e.name]=!0}),this.variables.each(function(e,n){t[n]=!0})),t}),Mn.DEFMETHOD("make_var",function(e,n,t){var i=[this];n instanceof Ct&&n.definition().references.forEach(function(e){var n=e.scope;if(!Ke(n,i))for(;an(i,n),n=n.parent_scope,n&&n!==this;);});for(var r=t=t.replace(/(?:^[^a-z_$]|[^a-z0-9_$])/gi,"_"),o=0;!un(i,function(e){return!e.var_names()[r]});o++)r=t+"$"+o;var n=ie(e,n,{name:r,scope:this}),a=this.def_variable(n);return i.forEach(function(e){e.enclosed.push(a),e.var_names()[r]=!0}),n}),Mn.DEFMETHOD("hoist_properties",function(e){var s,r,f;function c(e,n,t){if(e instanceof qt){var i=e.definition();return i.assignments==t?!i.direct_access&&(1!=i.escaped.depth&&(i.references.length-i.replaced!=t&&(!i.single_use&&(!r(i)&&(e.fixed_value()===n&&(n instanceof zt&&0<n.properties.length&&un(n.properties,function(e){return e instanceof Mt&&"string"==typeof e.key})&&un(i.references,function(e){return e.fixed_value()===n})&&te(e))))))):void 0}}e.option("hoist_props")&&!e.has_directive("use asm")&&(r=(s=this)instanceof jn&&e.top_retain||en,f=Object.create(null),s.transform(new ui(function(t,e){if(t instanceof kt){if("="!=t.operator)return;if(!t.write_only)return;if(t.left.scope!==s)return;if(!c(t.left,t.right,1))return;e(t,this);var i=new ln,r=[],o=[];return t.right.properties.forEach(function(e){var n=a(t.left,e.key);o.push(ie(ct,t,{name:n,value:null}));n=ie(Yt,t,{name:n.name,scope:s,thedef:n.definition()});n.reference({}),r.push(ie(kt,t,{operator:"=",left:n,right:e.value}))}),f[t.left.definition().id]=i,s.body.splice(s.body.indexOf(this.stack[1])+1,0,ie(ft,t,{definitions:o})),Y(t,r)}if(t instanceof Mn)return t===s?void 0:t;if(t instanceof ct&&c(t.name,t.value,0)){e(t,this);var i=new ln,n=[];return t.value.properties.forEach(function(e){n.push(ie(ct,t,{name:a(t.name,e.key),value:e.value}))}),f[t.name.definition().id]=i,on.splice(n)}function a(e,n){e=s.make_var(Ht,e,e.name+"_"+n);return i.set(n,e.definition()),e}})),s.transform(new ui(function(i,e){if(i instanceof wt)return t("right");if(i instanceof ht){if(!(i.expression instanceof Yt))return;var n=f[i.expression.definition().id];if(!n)return;n=n.get(i.getProperty()),n=ie(Yt,i,{name:n.name,scope:i.expression.scope,thedef:n});return n.reference({}),n}return i instanceof gt&&!li[i.operator]?t("expression"):void 0;function t(e){var n=i[e];if(n instanceof Yt&&n.definition().id in f){var t=i.clone();return t[e]=ie(zt,n,{properties:[]}),t}}})))}),(G=function(e,n){e.DEFMETHOD("drop_side_effect_free",n)})(hn,tn),G(qn,rn),G(St,function(e,n){n=Te(this.elements,e,n,De);return n?n===this.elements&&un(n,function(e){return e instanceof _t})?this:Y(this,n.map(Oe)):null}),G(Nn,rn),G(kt,function(e){var n=this.left;if(n instanceof ht){var t=n.expression;if(t instanceof kt&&"="==t.operator&&!t.may_throw_on_access(e)&&(t.write_only="p"),e.has_directive("use strict")&&t.is_constant())return this}return n.has_side_effects(e)?this:(this.write_only=!0,oe(n).is_constant_expression(e.find_parent(Mn))?this.right.drop_side_effect_free(e):this)}),G(Hn,rn),G(wt,function(e,n){if("in"==this.operator&&!Be(this.right))return(t=this.left.drop_side_effect_free(e,n))===this.left?this:((i=this.clone()).left=t||ie(Jt,this.left,{value:0}),i);var t,i,r=this.right.drop_side_effect_free(e,n);return r?!ce[this.operator]||r instanceof In?(t=this.left.drop_side_effect_free(e,n))?Y(this,[t,r.drop_side_effect_free(e)]):r:(r!==(i=this).right&&((i=this.clone()).right=r.drop_side_effect_free(e)),(n?C:V)(i,ie(wt,this,{operator:"&&"==i.operator?"||":"&&",left:i.left.negate(e,n),right:i.right}))):this.left.drop_side_effect_free(e,n)}),G(lt,function(t,e){var n=this;if(n.is_expr_pure(t)){n.pure&&hn.warn("Dropping __PURE__ call [{file}:{line},{col}]",n.start);var i=Te(n.args,t,e,De);return i&&Y(n,i.map(Oe))}var r=n.expression;if(n.is_call_pure(t))return(o=n.args.slice()).unshift(r.expression),(o=Te(o,t,e,De))&&Y(n,o.map(Oe));if(r instanceof In&&!(r.name&&(a=r.name.definition()).references.length>a.replaced)&&(r.process_expression(!1,function(e){var n=e.value&&e.value.drop_side_effect_free(t,!0);return n?ie(bn,e,{body:n}):ie(gn,e)}),we(r,function(e){e.value&&(e.value=e.value.drop_side_effect_free(t))}),(n=n.clone()).expression=r.clone()),n instanceof pt){i=r;if(i instanceof Yt&&(i=i.fixed_value()),i instanceof Fn){i.new=!0;var o,a=un(i.body,function(e){return!e.has_side_effects(t)});if(delete i.new,a)return(o=n.args.slice()).unshift(r),(o=Te(o,t,e,De))&&Y(n,o.map(Oe));if(!i.contains_this())return ie(lt,n,n)}}return n}),G(xt,function(e){var n,t,i=this.consequent.drop_side_effect_free(e),r=this.alternative.drop_side_effect_free(e);return i===this.consequent&&r===this.alternative?this:(e.option("ie8")&&(n=[],i instanceof In&&(n.push(i),i=null),r instanceof In&&(n.push(r),r=null)),i?r?((t=this.clone()).consequent=i,t.alternative=r):t=ie(wt,this,{operator:"&&",left:this.condition,right:i}):t=r?ie(wt,this,{operator:"||",left:this.condition,right:r}):this.condition.drop_side_effect_free(e),e.option("ie8")?(t&&n.push(t),0==n.length?null:Y(this,n)):t)}),G(Vt,rn),G(vt,function(e,n){var t=this.expression;return t.may_throw_on_access(e)?this:t.drop_side_effect_free(e,n)}),G(In,function(e){return Se(this,e)?null:this}),G(zt,function(e,n){var t=[];this.properties.forEach(function(e){e instanceof _t?t.push(e):(e.key instanceof hn&&t.push(e.key),t.push(e.value))});n=Te(t,e,n,function(e,n,t){var i=e.expression;return pe(i)?e:i.drop_side_effect_free(n,t)});return n?n!==t||un(n,function(e){return!(e instanceof _t)})?Y(this,n.map(function(e){return e instanceof _t?ie(zt,e,{properties:[e]}):e})):this:null}),G(dt,function(e,n){var t=Te(this.expressions,e,n);if(!t)return null;var i,r,o,n=t.length-1;return e.option("conditionals")&&0<n&&(i=t[n-1])instanceof kt&&"="==i.operator&&(o=i.left)instanceof Yt&&(r=Pe(e,o.definition(),i.right,t[n]))&&((i=i.clone()).right=r,(t=t.slice(0,-2)).push(i)),t===this.expressions?this:Y(this,t)}),G(mt,function(e,n){if(this.expression.may_throw_on_access(e))return this;var t=this.expression.drop_side_effect_free(e,n);if(!t)return this.property.drop_side_effect_free(e,n);e=this.property.drop_side_effect_free(e);return e?Y(this,[t,e]):t}),G(Yt,function(e){return this.is_declared(e)&&te(this)?null:this}),G(Lt,rn),G(gt,function(e,n){var t=this.expression;if(li[this.operator])return this.write_only=!t.has_side_effects(e),this;if("typeof"==this.operator&&t instanceof Yt&&te(t))return null;var i=t.drop_side_effect_free(e,n);return n&&i&&R(i)?i===t&&"!"==this.operator?this:i.negate(e,n):i}),e(bn,function(e,n){if(n.option("side_effects")){var t=e.body,n=t.drop_side_effect_free(n,!0);if(!n)return hn.warn("Dropping side-effect-free statement [{file}:{line},{col}]",e.start),ie(gn,e);if(n!==t)return ie(bn,e,{body:n})}return e}),e(On,function(e,n){return n.option("loops")?ie(An,e,e).optimize(n):e}),e(Dn,function(t,e){if(!e.option("loops"))return t;var n=t.condition.is_truthy()||t.condition.evaluate(e,!0);if(!(n instanceof hn)){if(n&&!Ae(t,e.parent(),Xn))return ie(An,t,{body:ie(kn,t.body,{body:[t.body,ie(bn,t.condition,{body:t.condition})]})}).optimize(e);if(!Ae(t,e.parent()))return ie(kn,t.body,{body:[t.body,ie(bn,t.condition,{body:t.condition})]}).optimize(e)}if(t.body instanceof kn&&!Ae(t,e.parent(),Xn)){for(var i=t.body.body,r=i.length;0<=--r;){var o=i[r];if(o instanceof Kn&&!o.alternative&&o.body instanceof Gn&&e.loopcontrol_target(o.body)===t){if(a(o.condition))break;t.condition=ie(wt,t,{operator:"&&",left:o.condition.negate(e),right:t.condition}),i.splice(r,1)}else if(o instanceof bn){if(a(o.body))break;t.condition=Y(t,[o.body,t.condition]),i.splice(r,1)}else if(!z(o))break}t.body=ye(t.body)}return t.body instanceof gn?ie(An,t,t).optimize(e):t.body instanceof bn?ie(An,t,{condition:Y(t.condition,[t.body.body,t.condition]),body:ie(gn,t)}).optimize(e):t;function a(e){var n=!1;return e.walk(new ri(function(e){return!!n||(e instanceof Yt?(Ke(e.definition(),t.enclosed)||(n=!0),!0):void 0)})),n}}),e(An,function(e,n){if(!n.option("loops"))return e;if(n.option("side_effects")&&(e.init&&(e.init=e.init.drop_side_effect_free(n)),e.step&&(e.step=e.step.drop_side_effect_free(n))),e.condition){var t,i=e.condition.evaluate(n);if(i instanceof hn?i=e.condition.is_truthy()||e.condition.evaluate(n,!0):i?e.condition=null:n.option("dead_code")||(t=e.condition,e.condition=k(i,e.condition),e.condition=V(e.condition.transform(n),t)),i)!e.condition||i instanceof hn||(e.body=ie(kn,e.body,{body:[ie(bn,e.condition,{body:e.condition}),e.body]}),e.condition=null);else if(n.option("dead_code")){i=[];return e.init instanceof vn?i.push(e.init):e.init&&i.push(ie(bn,e.init,{body:e.init})),i.push(ie(bn,e.condition,{body:e.condition})),M(n,e.body,i),ie(kn,e,{body:i}).optimize(n)}}return function n(t,i){var e=a(t.body);if(i.option("dead_code")&&(e instanceof Gn||e instanceof Xn&&s(e)||e instanceof Ln)){var r=[];t.init instanceof vn?r.push(t.init):t.init&&r.push(ie(bn,t.init,{body:t.init}));var o=s(e)||e instanceof Ln;return t.condition&&o?r.push(ie(Kn,t,{condition:t.condition,body:e,alternative:null})):t.condition?r.push(ie(bn,t.condition,{body:t.condition})):o&&r.push(e),M(i,t.body,r),ie(kn,t,{body:r})}if(e instanceof Kn){if((o=a(e.body))instanceof Gn&&!s(o))return t.condition?t.condition=ie(wt,t.condition,{left:t.condition,operator:"&&",right:e.condition.negate(i)}):t.condition=e.condition.negate(i),r=S(e.alternative),M(i,e.body,r),f(r);if((o=a(e.alternative))instanceof Gn&&!s(o))return t.condition?t.condition=ie(wt,t.condition,{left:t.condition,operator:"&&",right:e.condition}):t.condition=e.condition,r=S(e.body),M(i,e.alternative,r),f(r)}return t;function a(e){return e instanceof kn?e.body[0]:e}function s(e){return i.loopcontrol_target(e)!==i.self()}function f(e){return t.body instanceof kn?(t.body=t.body.clone(),t.body.body=e.concat(t.body.body.slice(1)),t.body=t.body.transform(i)):t.body=ie(kn,t.body,{body:e}).transform(i),n(t,i)}}(e,n)}),e(zn,function(e,n){var t;return n.option("varify")&&(e.init instanceof at||e.init instanceof st)&&(((t=e.init.definitions[0].name)instanceof Tt||t instanceof Pt)&&!t.match_symbol(function(e){if(e instanceof Ct)return je(n,e.definition())},!0)&&(e.init=Fe(e.init))),e}),e(Kn,function(e,f){if(L(e.alternative)&&(e.alternative=null),!f.option("conditionals"))return e;var n=e.condition.evaluate(f);if(f.option("dead_code")||n instanceof hn||(c=e.condition,e.condition=k(n,c),e.condition=V(e.condition.transform(f),c)),f.option("dead_code")){if(n instanceof hn&&(n=e.condition.is_truthy()||e.condition.evaluate(f,!0)),!n){hn.warn("Condition always false [{file}:{line},{col}]",e.condition.start);var t=[ie(bn,e.condition,{body:e.condition})];return M(f,e.body,t),e.alternative&&t.push(e.alternative),ie(kn,e,{body:t}).optimize(f)}if(!(n instanceof hn)){hn.warn("Condition always true [{file}:{line},{col}]",e.condition.start);t=[ie(bn,e.condition,{body:e.condition}),e.body];return e.alternative&&M(f,e.alternative,t),ie(kn,e,{body:t}).optimize(f)}}var i=e.condition.negate(f),r=e.condition.print_to_string().length,o=i.print_to_string().length,a=o<r;e.alternative&&a&&(a=!1,e.condition=i,u=e.body,e.body=e.alternative||ie(gn,e),e.alternative=u);var t=[],s=[],c=[],n=p(e.body,t,s,c),u=p(e.alternative,t,s,c);if(n&&u)return 0<s.length&&t.push(ie(ft,e,{definitions:s})),0==n.length?t.push(ie(bn,e.condition,{body:0<u.length?ie(wt,e,{operator:"||",left:e.condition,right:Y(e.alternative,u)}).transform(f):e.condition.clone()}).optimize(f)):0==u.length?(r===o&&!a&&e.condition instanceof wt&&"||"==e.condition.operator&&(a=!0),t.push(ie(bn,e,{body:ie(wt,e,{operator:a?"||":"&&",left:a?i:e.condition,right:Y(e.body,n)}).transform(f)}).optimize(f))):t.push(ie(bn,e,{body:ie(xt,e,{condition:e.condition,consequent:Y(e.body,n),alternative:Y(e.alternative,u)})}).optimize(f)),c.forEach(function(e){e.definition().references.push(e)}),ie(kn,e,{body:t}).optimize(f);if(L(e.body)&&(e=ie(Kn,e,{condition:i,body:e.alternative,alternative:null})),e.body instanceof Ln&&e.alternative instanceof Ln&&e.body.TYPE==e.alternative.TYPE){var l=ie(e.body.CTOR,e,{value:ie(xt,e,{condition:e.condition,consequent:e.body.value||ie(Qt,e.body).transform(f),alternative:e.alternative.value||ie(Qt,e.alternative).transform(f)})});return l instanceof Vn&&(l.in_bool=e.body.in_bool||e.alternative.in_bool),l}if(e.body instanceof Kn&&!e.body.alternative&&!e.alternative&&(e=ie(Kn,e,{condition:ie(wt,e.condition,{operator:"&&",left:e.condition,right:e.body.condition}),body:e.body.body,alternative:null})),_e(e.body)&&e.alternative){l=e.alternative;return e.alternative=null,ie(kn,e,{body:[e,l]}).optimize(f)}if(_e(e.alternative)){t=e.body;return e.body=e.alternative,e.condition=a?i:e.condition.negate(f),e.alternative=null,ie(kn,e,{body:[e,t]}).optimize(f)}return f.option("typeofs")&&ze(e.condition,e.body,e.alternative),e;function p(e,n,t,i){if(null==e)return[];if(e instanceof kn){for(var r=[],o=0;o<e.body.length;o++){var a=e.body[o];if(a instanceof Bn)n.push(a);else if(!(a instanceof gn))if(a instanceof bn){if(!f.option("sequences")&&0<r.length)return;r.push(a.body)}else{if(!(a instanceof ft))return;if(!f.option("sequences")&&0<r.length)return;a.remove_initializers(f,t),a.definitions.forEach(s)}}return r}if(e instanceof Bn)return n.push(e),[];if(e instanceof gn)return[];if(e instanceof bn)return[e.body];if(e instanceof ft){r=[];return e.remove_initializers(f,t),e.definitions.forEach(s),r}function s(e){e.value&&r.push(ie(kt,e,{operator:"=",left:e.name.convert_symbol(Yt,function(e){i.push(e)}),right:e.value}))}}}),e(Qn,function(i,t){if(!t.option("switches"))return i;var e,n,r=i.expression.evaluate(t);if(r instanceof hn||(n=i.expression,i.expression=k(r,n),i.expression=V(i.expression.transform(t),n)),!t.option("dead_code"))return i;r instanceof hn&&(r=i.expression.evaluate(t,!0));for(var o,a,s,f=[],c=[],u=0,l=i.body.length;u<l&&!s;u++){if((e=i.body[u])instanceof et){var p=c[c.length-1];if(o||_(e.body[0],t)&&(!p||_e(p))){b(e,p);continue}o=e}else if(!(r instanceof hn)){if(!((d=e.expression.evaluate(t))instanceof hn)&&d!==r){b(e,c[c.length-1]);continue}d instanceof hn&&(d=e.expression.evaluate(t,!0)),d===r&&(s=e,o&&(a=c.indexOf(o),c.splice(a,1),b(o,c[a-1]),o=null))}_e(e)&&_e(p=c[c.length-1])&&p.body.length==e.body.length&&ie(kn,p,p).equivalent_to(ie(kn,e,e))&&(p.body=[]),c.push(e)}for(;u<l;)b(i.body[u++],c[c.length-1]);for(;e=c[c.length-1];){if(_(e.body[e.body.length-1],t)&&e.body.pop(),e===o){if(!T(e))break}else{if(e.expression.has_side_effects(t))break;if(o){if(!T(o))break;if(c[c.length-2]!==o)break;o.body=o.body.concat(e.body),e.body=[]}else if(!T(e))break}b(e),c.pop()===o&&(o=null)}if(0==c.length)return ie(kn,i,{body:f.concat(ie(bn,i.expression,{body:i.expression}))}).optimize(t);if(c[0].body=f.concat(c[0].body),i.body=c,t.option("conditionals"))switch(c.length){case 1:if(!g(c[0]))break;var d=c[0].expression,h=c[0].body.slice();return c[0]!==o&&c[0]!==s?ie(Kn,i,{condition:ie(wt,i,{operator:"===",left:i.expression,right:d}),body:ie(kn,i,{body:h}),alternative:null}).optimize(t):(d&&h.unshift(ie(bn,d,{body:d})),h.unshift(ie(bn,i.expression,{body:i.expression})),ie(kn,i,{body:h}).optimize(t));case 2:if(!Ke(o,c)||!g(c[1]))break;var v=(h=c[0].body.slice()).length&&_(h[h.length-1],t);if(v&&h.pop(),!un(h,g))break;var m=c[1].body.length&&ie(kn,c[1],c[1]),h=ie(Kn,i,{condition:ie(wt,i,c[0]===o?{operator:"!==",left:i.expression,right:c[1].expression}:{operator:"===",left:i.expression,right:c[0].expression}),body:ie(kn,c[0],{body:h}),alternative:v&&m||null});return!v&&m&&(h=ie(kn,i,{body:[h,m]})),h.optimize(t)}return i;function _(e,n){return e instanceof Gn&&n.loopcontrol_target(e)===i}function g(e){var n=!1,t=new ri(function(e){if(n||e instanceof Fn||e instanceof bn)return!0;_(e,t)&&(n=!0)});return t.push(i),e.walk(t),!n}function b(e,n){n&&!_e(n)?n.body=n.body.concat(e.body):M(t,e,f)}}),e(tt,function(e,n){if(e.body=$(e.body,n),n.option("dead_code")){if(T(e)&&!(e.bcatch&&e.bcatch.argname&&e.bcatch.argname.match_symbol(function(e){return e instanceof Bt&&!te(e)},!0))){var t=[];return e.bcatch&&(M(n,e.bcatch,t),t.forEach(function(e){e instanceof ft&&e.definitions.forEach(function(e){var n=e.name.definition().redefined();n&&(e.name=e.name.clone(),e.name.thedef=n)})})),t.unshift(ie(kn,e,e).optimize(n)),e.bfinally&&t.push(ie(kn,e.bfinally,e.bfinally).optimize(n)),ie(kn,e,{body:t}).optimize(n)}if(e.bfinally&&T(e.bfinally)){t=ie(kn,e.bfinally,e.bfinally).optimize(n);if(t=e.body.concat(t),!e.bcatch)return ie(kn,e,{body:t}).optimize(n);e.body=t,e.bfinally=null}}return e}),at.DEFMETHOD("remove_initializers",$e(function(e,n){return ie(Qt,n).optimize(e)})),st.DEFMETHOD("remove_initializers",$e(rn)),ft.DEFMETHOD("remove_initializers",$e(rn)),ot.DEFMETHOD("to_assignments",function(){var e=this.definitions.reduce(function(e,n){var t,i=n.name.definition();return n.value&&(t=ie(Yt,n.name,n.name),e.push(ie(kt,n,{operator:"=",left:t,right:n.value})),i.references.push(t)),i.eliminated++,e},[]);return 0==e.length?null:Y(this,e)}),e(at,qe),e(st,qe),e(lt,function(f,c){var t,a=f.expression;if(c.option("sequences"))if(a instanceof ht){if((w=Ce(a))!==a){var e=f.clone();return e.expression=w.expressions.pop(),w.expressions.push(e),w.optimize(c)}}else if(!I(0,a.tail_node()))if((w=Ce(f))!==f)return w.optimize(c);if(c.option("unused")&&Ne(f,c),c.option("unsafe"))if(U(a))switch(a.name){case"Array":if(1==f.args.length){if((s=f.args[0])instanceof Jt)try{var n=s.value;if(6<n)break;for(var i=Array(n),r=0;r<n;r++)i[r]=ie(Zt,f);return ie(St,f,{elements:i})}catch(e){hn.warn("Invalid array length: {length} [{file}:{line},{col}]",{length:n,file:f.start.file,line:f.start.line,col:f.start.col});break}if(!s.is_boolean(c)&&!s.is_string(c))break}return ie(St,f,{elements:f.args});case"Object":if(0==f.args.length)return ie(zt,f,{properties:[]});break;case"String":if(0==f.args.length)return ie(Wt,f,{value:""});if(f.args.length<=1)return ie(wt,f,{left:f.args[0],operator:"+",right:ie(Wt,f,{value:""})}).optimize(c);break;case"Number":if(0==f.args.length)return ie(Jt,f,{value:0});if(1==f.args.length)return ie(bt,f,{expression:f.args[0],operator:"+"}).optimize(c);case"Boolean":if(0==f.args.length)return ie(ti,f);if(1==f.args.length)return ie(bt,f,{expression:ie(bt,f,{expression:f.args[0],operator:"!"}),operator:"!"}).optimize(c);break;case"RegExp":var o=[];if(un(f.args,function(e){var n=e.evaluate(c);return o.unshift(n),e!==n}))try{return W(c,f,ie(Gt,f,{value:RegExp.apply(RegExp,o)}))}catch(e){hn.warn("Error converting {expr} [{file}:{line},{col}]",{expr:f,file:f.start.file,line:f.start.line,col:f.start.col})}}else if(a instanceof vt)switch(a.property){case"toString":if(0==f.args.length&&!a.expression.may_throw_on_access(c))return ie(wt,f,{left:ie(Wt,f,{value:""}),operator:"+",right:a.expression}).optimize(c);break;case"join":if(a.expression instanceof St)if(!(0<f.args.length&&(t=f.args[0].evaluate(c))===f.args[0])){var s,i=[],u=[];return(a.expression.elements.forEach(function(e){var n=e.evaluate(c);n!==e?u.push(n):(0<u.length&&(i.push(ie(Wt,f,{value:u.join(t)})),u.length=0),i.push(e))}),0<u.length&&i.push(ie(Wt,f,{value:u.join(t)})),0==i.length)?ie(Wt,f,{value:""}):1==i.length?i[0].is_string(c)?i[0]:ie(wt,i[0],{operator:"+",left:ie(Wt,f,{value:""}),right:i[0]}):""==t?(s=i[0].is_string(c)||i[1].is_string(c)?i.shift():ie(Wt,f,{value:""}),i.reduce(function(e,n){return ie(wt,n,{operator:"+",left:e,right:n})},s).optimize(c)):(($=f.clone()).expression=$.expression.clone(),$.expression.expression=$.expression.expression.clone(),$.expression.expression.elements=i,W(c,f,$))}break;case"charAt":if(f.args.length<2)return($=ie(mt,f,{expression:a.expression,property:f.args.length?ie(wt,f.args[0],{operator:"|",left:ie(Jt,f,{value:0}),right:f.args[0]}):ie(Jt,f,{value:0})})).is_string=nn,$.optimize(c);break;case"apply":if(2==f.args.length&&f.args[1]instanceof St)return(A=f.args[1].elements.slice()).unshift(f.args[0]),ie(lt,f,{expression:ie(vt,a,{expression:a.expression,property:"call"}),args:A}).optimize(c);break;case"call":var l=a.expression;if(l instanceof Yt&&(l=l.fixed_value()),l instanceof Fn&&!l.contains_this())return(f.args.length?Y(this,[f.args[0],ie(lt,f,{expression:a.expression,args:f.args.slice(1)})]):ie(lt,f,{expression:a.expression,args:[]})).optimize(c)}if(c.option("unsafe_Function")&&U(a)&&"Function"==a.name){if(0==f.args.length)return ie(In,f,{argnames:[],body:[]}).init_vars(a.scope);if(un(f.args,function(e){return e instanceof Wt}))try{var p=ci(m="n(function("+f.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+f.args[f.args.length-1].value+"})"),d={ie8:c.option("ie8")};p.figure_out_scope(d);var h,v=new di(c.options);(p=p.transform(v)).figure_out_scope(d),p.compute_char_frequency(d),p.mangle_names(d),p.walk(new ri(function(e){return!!h||(e instanceof Fn?(h=e,!0):void 0)}));var m=pi();return kn.prototype._codegen.call(h,m),f.args=[ie(Wt,f,{value:h.argnames.map(function(e){return e.print_to_string()}).join(",")}),ie(Wt,f.args[f.args.length-1],{value:m.get().replace(/^\{|\}$/g,"")})],f}catch(e){if(!(e instanceof ai))throw e;hn.warn("Error parsing code passed to new Function [{file}:{line},{col}]",f.args[f.args.length-1].start),hn.warn(e.toString())}}var _=a instanceof Yt?a.fixed_value():a,g=_ instanceof Nn||_ instanceof Bn||_ instanceof In,b=g&&_.first_statement(),y=!1,e=g&&un(_.argnames,function(e,n){if(e instanceof ut){y=!0;n=f.args[n];if(n&&!fe(n))return;var t=!1;if(e.value.walk(new ri(function(e){return!!t||(e instanceof Yt&&_.find_variable(e.name)===e.definition()?t=!0:void 0)})),t)return;e=e.name}return!(e instanceof Tt)}),w=e&&c.option("inline")&&!f.is_expr_pure(c);if(w&&b instanceof Vn){var x=b.value;if(a===_&&(!x||x.is_constant_expression()&&F(x)))return Y(f,j(x)).optimize(c)}if(g){var k,E=!1;if(w&&!_.uses_arguments&&!_.pinned()&&!(_.name&&_ instanceof In)&&(a===_||!Le(c,k=a.definition())&&_.is_constant_expression(H(c)))&&un(f.args,function(e){return!(e instanceof _t)})&&(x=function(e){var n=_.body.length;if(n<2&&(e=q(e)))return e;if(c.option("inline")<3)return!1;e=null;for(var t=0;t<n;t++){var i=_.body[t];if(i instanceof ft){var r=E||!un(i.definitions,function(e){return!e.value});if(r&&(E=!0,e))return!1}else if(!(i instanceof Un||i instanceof Bn||i instanceof gn)){if(e)return!1;e=i}}return q(e)}(b))&&!_.contains_this()){var S,T,D,O=a===_||k.single_use&&k.references.length-k.replaced==1;if(function(){if(y)return;if(E)return;if(c.option("inline")<2&&_.argnames.length)return;if(!_.variables.all(function(e){return e.references.length-e.replaced<2&&e.orig[0]instanceof It}))return;var i,r=!1,o=[],a=!1,s=!0;if(x.walk(new ri(function(e,n){if(r)return!0;if(!(e instanceof wt&&ce[e.operator]||e instanceof xt)){if(e instanceof Mn)return r=!0;if(s&&e instanceof qt&&"await"==e.name){if(Pn(c.find_parent(Mn)))return r=!0;s=!1}if(e instanceof Yt){var t=e.definition();if(_.variables.get(e.name)!==t)return void(o=null);if(Rn(t.init))return r=!0;if(ue(e,this.parent()))return r=!0;t=C(t);return(i<t||(i=t),o)?void(a?o=null:o.push(_.argnames[t])):void 0}return e.has_side_effects(c)?(n(),a=!0):void 0}o=null})),r)return;var e=f.args.length;if(o&&_.argnames.length>=e){for(e=_.argnames.length;e-- >i&&_.argnames[e]===o.pop(););e++}var n=a&&!o&&c.find_parent(Mn);return e<=i||un(f.args.slice(i,e),n?function(e){return e.is_constant_expression(n)}:function(e){return!e.has_side_effects(c)})}()){var A=f.args.slice(),z=[];A.push(x.clone(!0).transform(new ui(function(e){if(e instanceof Yt){var n=e.definition();if(_.variables.get(e.name)!==n)return z.push(e),e;var t=C(n),n=A[t];if(!n)return ie(Qt,f);A[t]=null;t=this.parent();return t?re(0,t,e,n):n}})));var $=Y(f,A.filter(function(e){return e})).optimize(c);if($=re(0,c.parent(),c.self(),$),O||V($,f)===$)return z.forEach(function(e){var n=e.definition();n.references.push(e),O?n.replaced++:n.single_use=!1}),$}if(O&&function(){var e,n=Object.create(null),t=0;D=c.self();do{if(D.variables&&D.variables.each(function(e){n[e.name]=!0}),e=D,(D=c.parent(t++))instanceof Tn)T=[];else if(D instanceof An)D.init!==e&&(T=[]);else if(D instanceof zn)D.init!==e&&D.object!==e&&(T=[]);else if(D instanceof Yt&&D.fixed_value()instanceof Mn)return!1}while(!(D instanceof Mn));if(!(S=D.body.indexOf(e)+1))return!1;if(!F(_))return!1;var i=a!==_||_.parent_scope.resolve()===D;D instanceof jn&&(c.toplevel.vars?n.arguments=!0:i=!1);var r=c.option("inline"),o=Object.create(n);return!!function(e,n,t){for(var i=0;i<_.argnames.length;i++){var r=_.argnames[i];if(!r.__unused){if(r instanceof ut&&(r=r.name),!t||N(e,r.name))return!1;n[r.name]=!0,T&&T.push(r.definition())}}return!0}(n,o,2<=r&&i)&&(!!function(n,e,t){for(var i=0;i<_.body.length;i++){var r=_.body[i];if(Rn(r)){if(!t||N(e,r.name.name))return!1;if(!un(r.enclosed,function(e){return e.scope===r||!n[e.name]}))return!1}else if(r instanceof ft){if(!t)return!1;for(var o=r.definitions.length;0<=--o;){var a=r.definitions[o].name;if(N(n,a.name))return!1;T&&T.push(a.definition())}}}return!0}(n,o,3<=r&&i)&&(!T||0==T.length||!We(_,T)))}()){_._squeezed=!0,a!==_&&(_.parent_scope=a.scope);$=Y(f,function(){var e=[],n=[];(function(e,n){for(var t=_.argnames.length,i=f.args.length;--i>=t;)n.push(f.args[i]);for(i=t;0<=--i;){var r,o=_.argnames[i],a=f.args[i];o instanceof ut&&(a=a?Y(f,[a,o.value]):o.value,o=o.name),o.__unused||D.var_names()[o.name]?a&&n.push(a):(r=ie(Ht,o,o),o.definition().orig.push(r),!a&&T&&(a=ie(Qt,f)),"__unused"in o?(P(e,n,r),a&&n.push(a)):P(e,n,r,a))}e.reverse(),n.reverse()})(e,n),function(e,n){for(var t=n.length,i=0;i<_.body.length;i++){var r=_.body[i];if(r instanceof ft)for(var o=0;o<r.definitions.length;o++){var a,s=r.definitions[o],f=s.name,c=f.definition().redefined();c&&((f=f.clone()).thedef=c),P(e,n,f,s.value),T&&un(_.argnames,function(e){return e instanceof ut&&(e=e.name),e.name!=f.name})&&(a=_.variables.get(f.name),c=ie(Yt,f,f),a.references.push(c),n.splice(t++,0,ie(kt,s,{operator:"=",left:c,right:ie(Qt,f)})))}}}(e,n),n.push(x);var t=_.body.filter(function(e){if(Rn(e)){e=e.name.definition();return D.functions.set(e.name,e),D.variables.set(e.name,e),D.enclosed.push(e),D.var_names()[e.name]=!0}});t.unshift(S,0),e.length&&t.push(ie(ft,_,{definitions:e}));return[].splice.apply(D.body,t),_.enclosed.forEach(function(e){D.var_names()[e.name]||(D.enclosed.push(e),D.var_names()[e.name]=!0)}),n}()).optimize(c);return re(0,c.parent(),c.self(),$)}}if(c.option("side_effects")&&e&&un(_.body,L)&&(_!==a||Se(_,c))&&!(_ instanceof Nn&&_.value))return Y(f,j()).optimize(c)}if(c.option("drop_console")&&a instanceof ht){for(var M=a.expression;M.expression;)M=M.expression;if(U(M)&&"console"==M.name)return ie(Qt,f).optimize(c)}return c.option("negate_iife")&&c.parent()instanceof bn&&R(f)?f.negate(c,!0):J(c,f);function j(e){var t=f.args.map(function(e){return e instanceof _t?ie(St,e,{elements:[e]}):e});return _.argnames.forEach(function(e,n){e instanceof ut&&t.push(e.value)}),t.push(e||ie(Qt,f)),t}function F(e){if(!Pn(D||c.find_parent(Mn)))return 1;var t=!0,i=new ri(function(e){if(!t)return!0;if(e instanceof Mn){if(e===_)return;if(e instanceof Nn)for(var n=0;t&&n<e.argnames.length;n++)e.argnames[n].walk(i);else Rn(e)&&"await"==e.name.name&&(t=!1);return!0}e instanceof qt&&"await"==e.name&&e!==_.name&&(t=!1)});return e.walk(i),t}function q(e){return e?e instanceof Vn?e.value||ie(Qt,f):e instanceof bn?ie(bt,e,{operator:"void",expression:e.body}):void 0:ie(Qt,f)}function C(e){for(var n=_.argnames.length;0<=--n;)if(_.argnames[n].definition()===e)return n}function N(e,n){return e[n]||se[n]||D.var_names()[n]}function P(e,n,t,i){var r=t.definition();D.variables.set(t.name,r),D.enclosed.push(r),D.var_names()[t.name]||(D.var_names()[t.name]=!0,e.push(ie(ct,t,{name:t,value:null}))),i&&(t=ie(Yt,t,t),r.references.push(t),n.push(ie(kt,f,{operator:"=",left:t,right:i})))}}),e(pt,function(e,n){if(n.option("sequences")){var t=Ce(e);if(t!==e)return t.optimize(n)}if(n.option("unsafe")){t=e.expression;if(U(t))switch(t.name){case"Object":case"RegExp":case"Function":case"Error":case"Array":return ie(lt,e,e).transform(n)}}return e}),e(dt,function(e,o){var i=function(){if(!o.option("side_effects"))return e.expressions;var t=[],i=dn(o),r=e.expressions.length-1;return e.expressions.forEach(function(e,n){n<r&&(e=e.drop_side_effect_free(o,i)),e&&(E(t,e),i=!1)}),t}(),r=i.length-1;return function(){if(o.option("conditionals"))for(var e=1;e<r;e++){var n,t=i[e-1];t instanceof kt&&"="==t.operator&&t.left instanceof Yt&&(n=t.left.definition(),(n=Pe(o,n,t.right,i[e]))&&(t.right=n,i.splice(e,1),r--))}}(),function(){if(o.option("side_effects")){for(;0<r&&fe(i[r],o);)r--;r<i.length-1&&(i[r]=ie(bt,e,{operator:"void",expression:i[r]}),i.length=r+1)}}(),0==r?(e=re(0,o.parent(),o.self(),i[0]))instanceof dt||(e=e.optimize(o)):e.expressions=i,e}),e(yt,function(e,n){if(n.option("sequences")){var t=Ce(e);if(t!==e)return t.optimize(n)}return J(n,e)});var He=cn("+ -"),Ie=cn("* / %");e(bt,function(e,n){var t=e.operator,i=e.expression;if(n.option("evaluate")&&"delete"==t&&!(i instanceof Yt||i instanceof ht||((r=i)instanceof ei||r instanceof Kt||r instanceof Qt)))return i instanceof dt?((i=i.expressions.slice()).push(ie(ii,e)),Y(e,i).optimize(n)):Y(e,[i,ie(ii,e)]).optimize(n);if(n.option("sequences")&&("typeof"!=t||!U(i.tail_node()))){var r=Ce(e);if(r!==e)return r.optimize(n)}if(n.option("side_effects")&&"void"==t)return(i=i.drop_side_effect_free(n))?(e.expression=i,e):ie(Qt,e).optimize(n);if(n.option("booleans")){if("!"==t&&i.is_truthy())return Y(e,[i,ie(ti,e)]).optimize(n);if(n.in_boolean_context())switch(t){case"!":if(i instanceof bt&&"!"==i.operator)return i.expression;i instanceof wt&&(e=W(n,e,i.negate(n,dn(n))));break;case"typeof":hn.warn("Boolean expression always true [{file}:{line},{col}]",e.start);var o=[ie(ii,e)];return i instanceof Yt&&te(i)||o.unshift(i),Y(e,o).optimize(n)}}return"-"==t&&i instanceof ei&&(i=i.transform(n)),n.option("evaluate")&&i instanceof wt&&He[t]&&Ie[i.operator]&&(i.left.is_constant()||!i.right.has_side_effects(n))?ie(wt,e,{operator:i.operator,left:ie(bt,i.left,{operator:t,expression:i.left}),right:i.right}):"-"==t&&(i instanceof Jt||i instanceof ei)?e:J(n,e)}),wt.DEFMETHOD("lift_sequences",function(e){if(this.left instanceof ht){if(!(this.left.expression instanceof dt))return this;var n=this.left.expression.expressions.slice();return(t=this.clone()).left=t.left.clone(),t.left.expression=n.pop(),n.push(t),Y(this,n)}if(this.left instanceof dt){n=this.left.expressions.slice();return(t=this.clone()).left=n.pop(),n.push(t),Y(this,n)}if(this.right instanceof dt){if(this.left.has_side_effects(e))return this;for(var t,i="="==this.operator&&this.left instanceof Yt,r=(n=this.right.expressions).length-1,o=0;o<r&&(i||!n[o].has_side_effects(e));o++);if(o==r)return n=n.slice(),(t=this.clone()).right=n.pop(),n.push(t),Y(this,n);if(0<o)return(t=this.clone()).right=Y(this.right,n.slice(o)),(n=n.slice(0,o)).push(t),Y(this,n)}return this});var Re=cn("indexOf lastIndexOf"),Ue=cn("== === != !== * & | ^");function Be(e){return e instanceof kt?"="==e.operator&&Be(e.right):e instanceof dt?Be(e.tail_node()):e instanceof Yt?Be(e.fixed_value()):e instanceof St||e instanceof Fn||e instanceof pt||e instanceof zt}function Ye(e,n){return n instanceof vt?Ye(e,n.expression):n instanceof mt?Ye(e,n.expression)&&Ye(e,n.property):n instanceof qt||!n.has_side_effects(e)}function Le(e,n){var t=0,i=e.self();do{if(i instanceof Fn&&i.name&&i.name.definition()===n)return i}while(i=e.parent(t++))}function Ve(e,n){return e instanceof Yt||e.TYPE===n.TYPE}function We(t,n){var i=!1,r=new ri(function(e){return!!i||(e instanceof Yt&&Ke(e.definition(),n)?i=!0:void 0)}),o=new ri(function(e){if(i)return!0;if(e instanceof Mn&&e!==t){var n=o.parent();if(!(n instanceof lt&&n.expression===e))return e.walk(r),!0}});return t.walk(o),i}e(wt,function(t,a){function n(){return t.left.is_constant()||t.right.is_constant()||!t.left.has_side_effects(a)&&!t.right.has_side_effects(a)}function e(e){n()&&(e&&(t.operator=e),e=t.left,t.left=t.right,t.right=e)}function i(){var e=t.right;t.left=ie(wt,t,{operator:t.operator,left:t.left,right:e.left,start:t.left.start,end:e.left.end}),t.right=e.right,t.left=t.left.transform(a)}if(!Ue[t.operator]||!t.right.is_constant()||t.left.is_constant()||t.left instanceof wt&&fi[t.left.operator]>=fi[t.operator]||e(),a.option("sequences")){var r=t.lift_sequences(a);if(r!==t)return r.optimize(a)}if(a.option("assignments")&&ce[t.operator]){var o=t.right;if(t.left instanceof Yt&&o instanceof kt&&"="==o.operator&&t.left.equivalent_to(o.left))return t.right=o.right,o.right=t,o}if(a.option("comparisons"))switch(t.operator){case"===":case"!==":if(fe(t.left,a)&&t.right.is_defined(a))return hn.warn("Expression always defined [{file}:{line},{col}]",t.start),Y(t,[t.right,ie("==="==t.operator?ti:ii,t)]).optimize(a);var s=!0;(t.left.is_string(a)&&t.right.is_string(a)||t.left.is_number(a)&&t.right.is_number(a)||t.left.is_boolean(a)&&t.right.is_boolean(a)||Ye(a,t.left)&&t.left.equivalent_to(t.right))&&(t.operator=t.operator.slice(0,2));case"==":case"!=":if(!s&&fe(t.left,a))t.left=ie(Xt,t.left);else if(a.option("typeofs")&&t.left instanceof Wt&&"undefined"==t.left.value&&t.right instanceof bt&&"typeof"==t.right.operator){var f=t.right.expression;(f instanceof Yt?!f.is_declared(a):f instanceof ht&&a.option("ie8"))||(t.right=f,t.left=ie(Qt,t.left).optimize(a),2==t.operator.length&&(t.operator+="="))}else if(t.left instanceof Yt&&t.right instanceof Yt&&t.left.definition()===t.right.definition()&&Be(t.left))return ie("="==t.operator[0]?ii:ti,t).optimize(a);break;case"&&":case"||":if((h=t.left).operator==t.operator&&(h=h.right),h instanceof wt&&h.operator==("&&"==t.operator?"!==":"===")&&t.right instanceof wt&&h.operator==t.right.operator&&(fe(h.left,a)&&t.right.left instanceof Xt||h.left instanceof Xt&&fe(t.right.left,a))&&!h.right.has_side_effects(a)&&h.right.equivalent_to(t.right.right)){f=ie(wt,t,{operator:h.operator.slice(0,-1),left:ie(Xt,t),right:h.right});return h!==t.left&&(f=ie(wt,t,{operator:t.operator,left:t.left.left,right:f})),f}}var c=a.option("booleans")&&a.in_boolean_context();if(c)switch(t.operator){case"+":var u=t.left.evaluate(a),l=t.right.evaluate(a);if(u&&"string"==typeof u)return hn.warn("+ in boolean context always true [{file}:{line},{col}]",t.start),Y(t,[t.right,ie(ii,t)]).optimize(a);if(l&&"string"==typeof l)return hn.warn("+ in boolean context always true [{file}:{line},{col}]",t.start),Y(t,[t.left,ie(ii,t)]).optimize(a);break;case"==":if(t.left instanceof Wt&&""==t.left.value&&t.right.is_string(a))return ie(bt,t,{operator:"!",expression:t.right}).optimize(a);break;case"!=":if(t.left instanceof Wt&&""==t.left.value&&t.right.is_string(a))return t.right.optimize(a)}var p=a.parent();if(a.option("comparisons")&&t.is_boolean(a)){if(!(p instanceof wt)||p instanceof kt){o=W(a,t,ie(bt,t,{operator:"!",expression:t.negate(a,dn(a))}));if(o!==t)return o}switch(t.operator){case">":e("<");break;case">=":e("<=")}}if(a.option("conditionals")&&ce[t.operator]&&t.right instanceof wt&&t.operator==t.right.operator&&i(),a.option("strings")&&"+"==t.operator){if(t.right instanceof Wt&&""==t.right.value&&t.left.is_string(a))return t.left.optimize(a);if(t.left instanceof Wt&&""==t.left.value&&t.right.is_string(a))return t.right.optimize(a);if(t.left instanceof wt&&"+"==t.left.operator&&t.left.left instanceof Wt&&""==t.left.left.value&&t.right.is_string(a))return t.left=t.left.right,t.optimize(a);t.right instanceof wt&&t.operator==t.right.operator&&(t.left.is_string(a)&&t.right.is_string(a)||t.right.left.is_string(a)&&(t.left.is_constant()||!t.right.right.has_side_effects(a)))&&i()}if(a.option("evaluate")){var d,h,v,m=!0;switch(t.operator){case"&&":if(!(u=x(t.left)))return hn.warn("Condition left of && always false [{file}:{line},{col}]",t.start),re(0,p,a.self(),t.left).optimize(a);if(!(u instanceof hn))return hn.warn("Condition left of && always true [{file}:{line},{col}]",t.start),Y(t,[t.left,t.right]).optimize(a);if(l=t.right.evaluate(a)){if(!(l instanceof hn)&&(c||"&&"==p.operator&&p.left===a.self()))return hn.warn("Dropping side-effect-free && [{file}:{line},{col}]",t.start),t.left.optimize(a)}else{if(c)return hn.warn("Boolean && always false [{file}:{line},{col}]",t.start),Y(t,[t.left,ie(ti,t)]).optimize(a);t.falsy=!0}if("||"==t.left.operator)if(!(d=t.left.right.evaluate(a,!0)))return ie(xt,t,{condition:t.left.left,consequent:t.right,alternative:t.left.right}).optimize(a);break;case"||":if(!(u=x(t.left)))return hn.warn("Condition left of || always false [{file}:{line},{col}]",t.start),Y(t,[t.left,t.right]).optimize(a);if(!(u instanceof hn))return hn.warn("Condition left of || always true [{file}:{line},{col}]",t.start),re(0,p,a.self(),t.left).optimize(a);if(l=t.right.evaluate(a)){if(!(l instanceof hn)){if(c)return hn.warn("Boolean || always true [{file}:{line},{col}]",t.start),Y(t,[t.left,ie(ii,t)]).optimize(a);t.truthy=!0}}else if(c||"||"==p.operator&&p.left===a.self())return hn.warn("Dropping side-effect-free || [{file}:{line},{col}]",t.start),t.left.optimize(a);if("&&"==t.left.operator)if((d=t.left.right.is_truthy()||t.left.right.evaluate(a,!0))&&!(d instanceof hn))return ie(xt,t,{condition:t.left.left,consequent:t.left.right,alternative:t.right}).optimize(a);break;case"+":if(t.left instanceof Vt&&t.right instanceof wt&&"+"==t.right.operator&&t.right.left instanceof Vt&&t.right.is_string(a)&&(t=ie(wt,t,{operator:"+",left:ie(Wt,t.left,{value:""+t.left.value+t.right.left.value,start:t.left.start,end:t.right.left.end}),right:t.right.right})),t.right instanceof Vt&&t.left instanceof wt&&"+"==t.left.operator&&t.left.right instanceof Vt&&t.left.is_string(a)&&(t=ie(wt,t,{operator:"+",left:t.left.left,right:ie(Wt,t.right,{value:""+t.left.right.value+t.right.value,start:t.left.right.start,end:t.right.end})})),t.right instanceof bt&&"-"==t.right.operator&&t.left.is_number(a)){t=ie(wt,t,{operator:"-",left:t.left,right:t.right.expression});break}if(t.left instanceof bt&&"-"==t.left.operator&&n()&&t.right.is_number(a)){t=ie(wt,t,{operator:"-",left:t.right,right:t.left.expression});break}if(a.option("unsafe_math")&&t.left instanceof wt&&fi[t.left.operator]==fi[t.operator]&&t.right.is_constant()&&(t.right.is_boolean(a)||t.right.is_number(a))&&t.left.is_number(a)&&!t.left.right.is_constant()&&(t.left.left.is_boolean(a)||t.left.left.is_number(a))){t=ie(wt,t,{operator:t.left.operator,left:ie(wt,t,{operator:t.operator,left:t.right,right:t.left.left}),right:t.left.right});break}case"-":if(t.right instanceof bt&&"-"==t.right.operator&&t.left.is_number(a)&&t.right.expression.is_number(a)){t=ie(wt,t,{operator:"+",left:t.left,right:t.right.expression});break}case"*":case"/":m=a.option("unsafe_math"),"+"!=t.operator&&["left","right"].forEach(function(e){var n=t[e];n instanceof bt&&"+"==n.operator&&(((n=n.expression).is_boolean(a)||n.is_number(a)||n.is_string(a))&&(t[e]=n))});case"&":case"|":case"^":if("-"==t.operator||"/"==t.operator||!t.left.is_boolean(a)&&!t.left.is_number(a)||!t.right.is_boolean(a)&&!t.right.is_number(a)||!n()||t.left instanceof wt&&t.left.operator!=t.operator&&fi[t.left.operator]>=fi[t.operator]||(v=ie(wt,t,{operator:t.operator,left:t.right,right:t.left}),t=t.right instanceof Vt&&!(t.left instanceof Vt)?W(a,v,t):W(a,t,v)),!m||!t.is_number(a))break;!(t.right instanceof wt&&"%"!=t.right.operator&&fi[t.right.operator]==fi[t.operator]&&t.right.is_number(a)&&("+"!=t.operator||t.right.left.is_boolean(a)||t.right.left.is_number(a)))||"-"==t.operator&&t.left.is_negative_zero()||!t.right.left.is_constant_expression()&&t.right.right.has_side_effects(a)||"+"!=(t=ie(wt,t,{operator:y(t.operator,t.right.operator),left:ie(wt,t.left,{operator:t.operator,left:t.left,right:t.right.left,start:t.left.start,end:t.right.left.end}),right:t.right.right})).operator||t.right.is_boolean(a)||t.right.is_number(a)||(t.right=ie(bt,t.right,{operator:"+",expression:t.right})),t.right instanceof Vt&&t.left instanceof wt&&"%"!=t.left.operator&&fi[t.left.operator]==fi[t.operator]&&t.left.is_number(a)&&(t.left.left instanceof Vt?(h=w(t.left,t.operator,t.left.left,t.right,t.left.left.start,t.right.end),t=w(t,t.left.operator,J(a,h),t.left.right)):t.left.right instanceof Vt&&(v=y(t.left.operator,t.operator),!(v=J(a,w(t.left,v,t.left.right,t.right))).is_constant()||"-"==t.left.operator&&0!=t.right.value&&0==+v.value&&t.left.left.is_negative_zero()||(t=w(t,t.left.operator,t.left.left,v))))}if(!(p instanceof bt&&"delete"==p.operator)){if(t.left instanceof Jt&&!t.right.is_constant())switch(t.operator){case"+":if(0==t.left.value){if(t.right.is_boolean(a))return ie(bt,t,{operator:"+",expression:t.right}).optimize(a);if(t.right.is_number(a)&&!t.right.is_negative_zero())return t.right}break;case"*":if(1==t.left.value)return t.right.is_number(a)?t.right:ie(bt,t,{operator:"+",expression:t.right}).optimize(a)}if(t.right instanceof Jt&&!t.left.is_constant())switch(t.operator){case"+":if(0==t.right.value){if(t.left.is_boolean(a))return ie(bt,t,{operator:"+",expression:t.left}).optimize(a);if(t.left.is_number(a)&&!t.left.is_negative_zero())return t.left}break;case"-":if(0==t.right.value)return t.left.is_number(a)?t.left:ie(bt,t,{operator:"+",expression:t.left}).optimize(a);break;case"/":if(1==t.right.value)return t.left.is_number(a)?t.left:ie(bt,t,{operator:"+",expression:t.left}).optimize(a)}}}if(a.option("typeofs"))switch(t.operator){case"&&":ze(t.left,t.right,null);break;case"||":ze(t.left,null,t.right)}if(a.option("unsafe")){var _=k(t.right);if(c&&_&&("=="==t.operator||"!="==t.operator)&&t.left instanceof Jt&&0==t.left.value)return("=="==t.operator?ie(bt,t,{operator:"!",expression:t.right}):t.right).optimize(a);var g=k(t.left);if(a.option("comparisons")&&function(){switch(t.operator){case"<=":return _&&t.left instanceof Jt&&0==t.left.value;case"<":if(g&&t.right instanceof Jt&&0==t.right.value)return!0;case"==":case"!=":return _?t.left instanceof Jt&&-1==t.left.value||t.left instanceof bt&&"-"==t.left.operator&&t.left.expression instanceof Jt&&1==t.left.expression.value:!1}}()){var b=ie(bt,t,{operator:"!",expression:ie(bt,t,{operator:"~",expression:g?t.left:t.right})});switch(t.operator){case"<":if(g)break;case"<=":case"!=":b=ie(bt,t,{operator:"!",expression:b})}return b.optimize(a)}}return J(a,t);function y(e,n){switch(e){case"-":return"+"==n?"-":"+";case"/":return"*"==n?"/":"*";default:return n}}function w(e,n,t,i,r,o){return"+"==n&&(t.is_boolean(a)||t.is_number(a)||(t=ie(bt,t,{operator:"+",expression:t})),i.is_boolean(a)||i.is_number(a)||(i=ie(bt,i,{operator:"+",expression:i}))),ie(wt,e,{operator:n,left:t,right:i,start:r,end:o})}function x(e){return!!e.truthy||!e.falsy&&(!!e.is_truthy()||e.evaluate(a,!0))}function k(e){return"Call"==e.TYPE&&e.expression instanceof vt&&Re[e.expression.property]}}),e(Yt,function(e,n){if(!n.option("ie8")&&U(e)&&(!e.scope.resolve().uses_with||!n.find_parent($n)))switch(e.name){case"undefined":return ie(Qt,e).optimize(n);case"NaN":return ie(Kt,e).optimize(n);case"Infinity":return ie(ei,e).optimize(n)}var t=n.parent();if(n.option("reduce_vars")&&ue(n.self(),t)!==n.self()){var i,r,o=e.definition(),a=e.fixed_value(),t=o.single_use&&!(t instanceof lt&&t.is_expr_pure(n));if(t)if(a instanceof Fn){if(o.scope===e.scope.resolve()&&!o.in_loop||n.option("reduce_funcs")&&1!=o.escaped.depth&&!a.inlined)if(Le(n,o))t=!1;else if(a.name&&a.name.definition()!==o)t=!1;else if(a.parent_scope!==e.scope.resolve()||h(o)){if("f"==(t=a.is_constant_expression(e.scope)))for(var s=e.scope;(Rn(s)||Cn(s))&&(s.inlined=!0),s=s.parent_scope;);}else a.name&&"await"==a.name.name&&Pn(a)&&(t=!1);else t=!1;t&&(a.parent_scope=e.scope)}else a&&a.is_constant_expression()||(t=!1);if(t)return o.single_use=!1,a._squeezed=!0,a.single_use=!0,a instanceof Un?(a=ie(Hn,a,a)).name=ie(Ut,a.name,a.name):a instanceof Bn&&((a=ie(In,a,a)).name=ie(Ut,a.name,a.name)),a instanceof Fn&&(s=e.scope.resolve(),a.enclosed.forEach(function(e){a.variables.has(e.name)||s.var_names()[e.name]||(s.enclosed.push(e),s.var_names()[e.name]=!0)})),0<o.recursive_refs?(i=(l=a.clone(!0)).name.definition(),(c=(r=l.variables.get(l.name.name))&&r.orig[0])instanceof Ut||(((c=ie(Ut,l.name,l.name)).scope=l).name=c,(r=l.def_function(c)).recursive_refs=o.recursive_refs),l.walk(new ri(function(e){var n,t;e instanceof Yt&&((n=e.definition())===i?(e.thedef=r).references.push(e):(n.single_use=!1,(t=e.fixed_value())instanceof Fn&&t.name&&t.name.definition()===n&&n.scope===t.name.scope&&a.variables.get(t.name.name)===n&&(t.name=t.name.clone(),t=l.variables.get(t.name.name)||l.def_function(t.name),(e.thedef=t).references.push(e))))}))):(l=a.optimize(n))===a&&(l=l.transform(new ui(function(e,n){return e instanceof Mn||n(e=e.clone(),this),e}))),o.replaced++,l;var f,c,u,l,t=e.fixed!==o.fixed;if(a&&(t||!1!==o.should_replace))if(a instanceof Lt?!h(o)&&p(o)&&(f=a):(u=a.evaluate(n,!0))!==a&&"function"!=typeof u&&("object"!=typeof u||u instanceof RegExp&&n.option("unsafe_regexp")&&!o.cross_loop&&p(o))&&(f=k(u,a)),f)if(t||void 0!==o.should_replace||(c=f.optimize(n).print_to_string().length,d(a)||(c=Math.min(c,a.print_to_string().length)),u=o.name.length,n.option("unused")&&!n.exposed(o)&&(u+=(u+2+c)/(o.references.length-o.replaced-o.assignments)),u=c-Math.floor(u),o.should_replace=u<n.eval_threshold),t||o.should_replace)return d(a)?(l=f.optimize(n))===f&&(l=l.clone(!0)):(l=V(f.optimize(n),a))!==f&&l!==a||(l=l.clone(!0)),o.replaced++,l}return e;function p(e){var n=e.scope.resolve();return un(e.references,function(e){return n===e.scope.resolve()})}function d(e){var n;return e.walk(new ri(function(e){if(e instanceof Yt&&(n=!0),n)return!0})),n}}),e(Qt,function(e,n){if(n.option("unsafe_undefined")){var t=H(n).find_variable("undefined");if(t){t=ie(Yt,e,{name:"undefined",scope:t.scope,thedef:t});return t.is_undefined=!0,t}}n=ue(n.self(),n.parent());return n&&Ve(n,e)?e:ie(bt,e,{operator:"void",expression:ie(Jt,e,{value:0})})}),e(ei,function(e,n){var t=ue(n.self(),n.parent());return(!t||!Ve(t,e))&&(!n.option("keep_infinity")||t||H(n).find_variable("Infinity"))?ie(wt,e,{operator:"/",left:ie(Jt,e,{value:1}),right:ie(Jt,e,{value:0})}):e}),e(Kt,function(e,n){var t=ue(n.self(),n.parent());return(!t||!Ve(t,e))&&(t||H(n).find_variable("NaN"))?ie(wt,e,{operator:"/",left:ie(Jt,e,{value:0}),right:ie(Jt,e,{value:0})}):e});var Je=cn("+ - * / % >> << >>> | ^ &"),Ge=cn("* | ^ &");function Xe(e,n){if(e instanceof Yt&&(e=e.fixed_value()),e){if(!(e instanceof Fn))return 1;var t=n.parent();return"Call"!=t.TYPE||(t.expression!==n.self()||!e.contains_this())}}e(kt,function(o,a){if(a.option("dead_code"))if(o.left instanceof ht){if("="==o.operator){if(o.__drop){var e=[o.left.expression];return o.left instanceof mt&&e.push(o.left.property),e.push(o.right),Y(o,e).optimize(a)}if(o.left.equivalent_to(o.right)&&!o.left.has_side_effects(a))return o.right;e=o.left.expression;if(e instanceof Fn||!a.has_directive("use strict")&&e instanceof Vt&&!e.may_throw_on_access(a))return o.left instanceof vt?o.right:Y(o,[o.left.property,o.right]).optimize(a)}}else if(o.left instanceof Yt&&un(o.left.definition().orig,function(e){return!(e instanceof Nt)})){if("="==o.operator&&o.left.equivalent_to(o.right)&&!((f=a.parent())instanceof bt&&"delete"==f.operator))return o.right;if(o.left.is_immutable())return p();var n,t=o.left.definition(),s=t.scope.resolve(),i=s===a.find_parent(Fn),r=0,f=o;do{if(n=f,(f=a.parent(r++))instanceof kt){var c=!1;if(f.left.match_symbol(function(e){if(e instanceof ht)return!0;if(!c&&e instanceof Yt&&e.definition()===t){if(l(r,f))return!0;t.fixed=!1,c=!0}}))break;if(c)return p()}else{if(f instanceof Ln){if(!i)break;if(l(r,f))break;if(We(s,[t]))break;return t.fixed=!1,p()}if(f instanceof ct&&f.name instanceof Ct&&f.name.definition()===t){if(l(r,f))break;return t.fixed=!1,p()}}}while(f instanceof wt&&f.right===n||f instanceof dt&&f.tail_node()===n||f instanceof bt)}if(a.option("sequences")){var u=o.lift_sequences(a);if(u!==o)return u.optimize(a)}if(a.option("assignments")){if("="==o.operator&&o.left instanceof Yt&&o.right instanceof wt){if(o.right.left instanceof Yt&&o.right.left.name==o.left.name&&Je[o.right.operator])return ie(kt,o,{operator:o.right.operator+"=",left:o.left,right:o.right.right}).optimize(a);if(o.right.right instanceof Yt&&o.right.right.name==o.left.name&&Ge[o.right.operator]&&!o.right.left.has_side_effects(a))return ie(kt,o,{operator:o.right.operator+"=",left:o.left,right:o.right.left}).optimize(a)}if(("-="==o.operator||"+="==o.operator&&(o.left.is_boolean(a)||o.left.is_number(a)))&&o.right instanceof Jt&&1==o.right.value){u=o.operator.slice(0,-1);return ie(bt,o,{operator:u+u,expression:o.left})}}return J(a,o);function l(e,n){var t=o.right;o.right=ie(Xt,t);var i,r=n.may_throw(a);for(o.right=t;i=a.parent(e++);){if(i===s)return;if(i instanceof tt){if(i.bfinally)return 1;if(r&&i.bcatch)return 1}}}function p(){return("="!=o.operator?ie(wt,o,{operator:o.operator.slice(0,-1),left:o.left,right:o.right}):re(0,a.parent(),o,o.right)).optimize(a)}}),e(xt,function(r,n){if(n.option("sequences")&&r.condition instanceof dt){var e=r.condition.expressions.slice();return r.condition=e.pop(),e.push(r),Y(r,e)}if(!n.option("conditionals"))return r;var o=r.condition.is_truthy()||r.condition.evaluate(n,!0);if(!o)return hn.warn("Condition always false [{file}:{line},{col}]",r.start),Y(r,[r.condition,r.alternative]).optimize(n);if(!(o instanceof hn))return hn.warn("Condition always true [{file}:{line},{col}]",r.start),Y(r,[r.condition,r.consequent]).optimize(n);var t=o.negate(n,dn(n));W(n,o,t)===t&&(r=ie(xt,r,{condition:t,consequent:r.alternative,alternative:r.consequent}),t=o,o=r.condition);var i=r.consequent,a=r.alternative;if(Ye(n,o)){if(o.equivalent_to(i))return ie(wt,r,{operator:"||",left:o,right:a}).optimize(n);if(o.equivalent_to(a))return ie(wt,r,{operator:"&&",left:o,right:i}).optimize(n)}var s=i.tail_node();if(s instanceof kt){var f="="==s.operator,e=f?a.tail_node():a;if((f||i===s)&&e instanceof kt&&s.operator==e.operator&&s.left.equivalent_to(e.left)&&(f&&s.left instanceof Yt||!o.has_side_effects(n)&&m(i)&&m(a)))return ie(kt,r,{operator:s.operator,left:s.left,right:ie(xt,r,{condition:o,consequent:_(i),alternative:_(a)})})}if(i.equivalent_to(a))return Y(r,[o,i]).optimize(n);var c,s=function e(n,t,i){if(!v(n,t))return!i&&ie(xt,r,{condition:o,consequent:n,alternative:t});var t=e(n.expression,t.expression);if(!t)return;var n=n.clone();n.expression=t;return n}(i,a,!0);if(s)return s;if(i instanceof lt&&a.TYPE==i.TYPE&&0<=(c=h(i,a))&&i.expression.equivalent_to(a.expression)&&!o.has_side_effects(n)&&!i.expression.has_side_effects(n)){s=i.clone();return s.args[c]=ie(xt,r,{condition:o,consequent:i.args[c],alternative:a.args[c]}),s}if(i instanceof xt&&i.alternative.equivalent_to(a))return ie(xt,r,{condition:ie(wt,r,{left:o,operator:"&&",right:i.condition}),consequent:i.consequent,alternative:a});if(i instanceof xt&&i.consequent.equivalent_to(a))return ie(xt,r,{condition:ie(wt,r,{left:t,operator:"||",right:i.condition}),consequent:a,alternative:i.alternative});if(a instanceof xt&&i.equivalent_to(a.consequent))return ie(xt,r,{condition:ie(wt,r,{left:o,operator:"||",right:a.condition}),consequent:i,alternative:a.alternative});if(a instanceof xt&&i.equivalent_to(a.alternative))return ie(xt,r,{condition:ie(wt,r,{left:t,operator:"&&",right:a.condition}),consequent:a.consequent,alternative:i});if((i instanceof dt||a instanceof dt)&&i.tail_node().equivalent_to(a.tail_node()))return Y(r,[ie(xt,r,{condition:o,consequent:g(i),alternative:g(a)}),i.tail_node()]).optimize(n);if(i instanceof wt&&"&&"==i.operator&&i.right.equivalent_to(a))return ie(wt,r,{operator:"&&",left:ie(wt,r,{operator:"||",left:t,right:i.left}),right:a}).optimize(n);if(i instanceof wt&&"||"==i.operator&&i.right.equivalent_to(a))return ie(wt,r,{operator:"||",left:ie(wt,r,{operator:"&&",left:o,right:i.left}),right:a}).optimize(n);if(a instanceof wt&&"&&"==a.operator&&a.right.equivalent_to(i))return ie(wt,r,{operator:"&&",left:ie(wt,r,{operator:"||",left:o,right:a.left}),right:i}).optimize(n);if(a instanceof wt&&"||"==a.operator&&a.right.equivalent_to(i))return ie(wt,r,{operator:"||",left:ie(wt,r,{operator:"&&",left:t,right:a.left}),right:i}).optimize(n);var u=n.option("booleans")&&n.in_boolean_context();return p(i)?d(a)?l(o):ie(wt,r,{operator:"||",left:l(o),right:a}):d(i)?p(a)?l(o.negate(n)):ie(wt,r,{operator:"&&",left:l(o.negate(n)),right:a}):p(a)?ie(wt,r,{operator:"||",left:l(o.negate(n)),right:i}):d(a)?ie(wt,r,{operator:"&&",left:l(o),right:i}):(n.option("typeofs")&&ze(o,i,a),r);function l(e){return e.is_boolean(n)?e:ie(bt,e,{operator:"!",expression:e.negate(n)})}function p(e){return e instanceof ii||u&&e instanceof Vt&&e.value||e instanceof bt&&"!"==e.operator&&e.expression instanceof Vt&&!e.expression.value}function d(e){return e instanceof ti||u&&(e instanceof Vt&&!e.value||e instanceof bt&&"void"==e.operator&&!e.expression.has_side_effects(n))||e instanceof bt&&"!"==e.operator&&e.expression instanceof Vt&&e.expression.value}function h(e,n){var t=e.args,i=n.args,r=t.length;if(r!=i.length)return-2;for(var o=0;o<r;o++)if(!t[o].equivalent_to(i[o])){for(var a=o+1;a<r;a++)if(!t[a].equivalent_to(i[a]))return-2;return o}return-1}function v(e,n){if(e.TYPE==n.TYPE)return e instanceof lt?-1!=h(e,n)?void 0:"Call"!=e.TYPE||!(e.expression instanceof ht||n.expression instanceof ht)||v(e.expression,n.expression):e instanceof vt?e.property==n.property:e instanceof mt?e.property.equivalent_to(n.property):void 0}function m(e){return e===e.tail_node()||un(e.expressions.slice(0,-1),function(e){return!e.has_side_effects(n)})}function _(e){if(!(e instanceof dt))return e.right;var n=e.expressions.slice();return n.push(n.pop().right),Y(e,n)}function g(e){return e instanceof dt?Y(e,e.expressions.slice(0,-1)):ie(Jt,e,{value:0})}}),e(ni,function(e,n){if(!n.option("booleans"))return e;if(n.in_boolean_context())return ie(Jt,e,{value:+e.value});n=n.parent();return n instanceof wt&&("=="==n.operator||"!="==n.operator)?(hn.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]",{operator:n.operator,value:e.value,file:n.start.file,line:n.start.line,col:n.start.col}),ie(Jt,e,{value:+e.value})):ie(bt,e,{operator:"!",expression:ie(Jt,e,{value:1-e.value})})}),e(_t,function(e,n){var t=e.expression;return n.option("spread")&&t instanceof St&&!(n.parent()instanceof zt)?on.splice(t.elements.map(function(e){return e instanceof Zt?ie(Qt,e).optimize(n):e})):e}),e(mt,function(e,t){var n=e.expression,i=e.property;if(t.option("properties")){var r=i.evaluate(t);if(r!==i){"string"==typeof r&&("undefined"==r?r=void 0:(m=parseFloat(r)).toString()==r&&(r=m)),i=e.property=V(i,k(r,i).transform(t));var o=""+r;if(oi(o)&&o.length<=i.print_to_string().length+1)return ie(vt,e,{expression:n,property:o}).optimize(t)}}var a,s,f,c=t.parent(),u=ue(t.self(),c);if(t.option("arguments")&&n instanceof Yt&&ne(h=n.definition())&&!n.in_arg&&i instanceof Jt&&(a=h.scope)===function(){var e,n=0;for(;e=t.parent(n++);)if(e instanceof Fn){if(e instanceof qn)return;if(!(e instanceof Nn))return s=t.parent(n),e}}()&&a.uses_arguments<(u?2:3)){var l=i.value;c instanceof bt&&"delete"==c.operator&&(h.deleted||(h.deleted=[]),h.deleted[l]=!0);var p,d=a.argnames[l];if(h.deleted&&h.deleted[l])d=null;else if(d)!(d instanceof It)||n.scope.find_variable(d.name)!==(p=d.definition())?d=null:!t.has_directive("use strict")&&!a.name&&s instanceof lt&&l<s.args.length&&un(a.argnames,function(e){return e instanceof It})||(!t.option("reduce_vars")||h.reassigned||p.assignments||1<p.orig.length)&&(d=null);else if(l<a.argnames.length+5&&t.drop_fargs(a,s))for(;l>=a.argnames.length;)d=a.make_var(It,a,"argument_"+a.argnames.length),a.argnames.push(d);if(d&&Qe(function(e){return e.name===d.name},a.argnames)===d){h.reassigned=!1;var h=ie(Yt,e,d);return h.reference({}),delete d.__unused,h}}if(u)return e;if(t.option("sequences")&&"Call"!=c.TYPE&&!(c instanceof zn&&c.init===e)){c=Ce(e);if(c!==e)return c.optimize(t)}if(r===i||(v=e.flatten_object(o,t))&&(n=e.expression=v.expression,i=e.property=v.property),t.option("properties")&&t.option("side_effects")&&i instanceof Jt&&n instanceof St&&un(f=n.elements,function(e){return!(e instanceof _t)})){var v=f[l=i.value];if(Xe(v,t)){for(var m,_=v instanceof Zt,g=!_,b=[],y=f.length;--y>l;)(m=f[y].drop_side_effect_free(t))&&(b.unshift(m),g&&m.has_side_effects(t)&&(g=!1));for(g||b.unshift(v);0<=--y;)(m=f[y].drop_side_effect_free(t))?b.unshift(m):_?b.unshift(ie(Zt,f[y])):l--;return g?(b.push(v),Y(e,b).optimize(t)):ie(mt,e,{expression:ie(St,n,{elements:b}),property:ie(Jt,i,{value:l})})}}return J(t,e)}),Nn.DEFMETHOD("contains_this",en),Mn.DEFMETHOD("contains_this",function(){var n,t=this;return t.walk(new ri(function(e){return!!n||(e instanceof Lt?n=!0:e!==t&&e instanceof Mn&&!(e instanceof Nn)||void 0)})),n}),ht.DEFMETHOD("flatten_object",function(e,n){if(n.option("properties")){var t=this.expression;if(t instanceof zt)for(var i=t.properties,r=i.length;0<=--r;){var o=i[r];if(o.key==e){if(!un(i,function(e){return e instanceof Mt&&"string"==typeof e.key}))break;if(!Xe(o.value,n))break;return ie(mt,this,{expression:ie(St,t,{elements:i.map(function(e){return e.value})}),property:ie(Jt,this,{value:r})})}}}}),e(vt,function(e,n){"arguments"!=e.property&&"caller"!=e.property||hn.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]",{prop:e.property,file:e.start.file,line:e.start.line,col:e.start.col});var t=n.parent();if(ue(n.self(),t))return e;if(n.option("sequences")&&"Call"!=t.TYPE&&!(t instanceof zn&&t.init===e)){var i=Ce(e);if(i!==e)return i.optimize(n)}if(n.option("unsafe_proto")&&e.expression instanceof vt&&"prototype"==e.expression.property){var r=e.expression.expression;if(U(r))switch(r.name){case"Array":e.expression=ie(St,e.expression,{elements:[]});break;case"Function":e.expression=ie(In,e.expression,{argnames:[],body:[]}).init_vars(r.scope);break;case"Number":e.expression=ie(Jt,e.expression,{value:0});break;case"Object":e.expression=ie(zt,e.expression,{properties:[]});break;case"RegExp":e.expression=ie(Gt,e.expression,{value:/t/});break;case"String":e.expression=ie(Wt,e.expression,{value:""})}}i=e.flatten_object(e.property,n);return i?i.optimize(n):J(n,e)}),e(Ot,function(e,n){var t;return!n.option("objects")||(t=e.key)instanceof hn&&(t=t.evaluate(n))!==e.key&&(e.key=""+t),e}),e(zt,function(t,i){if(!i.option("objects"))return t;var e,r=!1,o=!1,a=!1,s=i.has_directive("use strict"),f=new ln,c=[];return t.properties.forEach(function(e){if(!(e instanceof _t))return l(e);o=!0;var n=e.expression;i.option("spread")&&n instanceof zt&&un(n.properties,function(e){return!(e instanceof Ft||e instanceof _t)})?(r=!0,n.properties.forEach(function(e){l(e instanceof jt?ie(Mt,e,{key:e.key,value:ie(Qt,e).optimize(i)}):e)})):(a=!0,u(),c.push(e))}),u(),r?(o&&a&&1==c.length&&((e=c[0])instanceof $t&&e.key instanceof Jt&&(e.key=""+e.key.value)),r?ie(zt,t,{properties:c}):t):t;function u(){f.each(function(e){if(1==e.length)return c.push(e[0]);r=!0;var n=s&&!a&&e.pop();c.push(1==e.length?e[0]:ie(Mt,t,{key:e[0].key,value:Y(t,e.map(function(e){return e.value}))})),n&&c.push(n)}),f=new ln}function l(e){var n=e.key;n instanceof hn&&(o=!0,(n=n.evaluate(i))===e.key?a=!0:n=e.key=""+n),e instanceof Mt&&"string"==typeof n?(e.value.has_side_effects(i)&&u(),f.add(n,e)):(u(),c.push(e)),o&&!a&&"string"==typeof n&&/^[1-9]*[0-9]$/.test(n)&&(a=!0,f.has(n)&&(e=f.get(n)[0]),e.key=ie(Jt,e,{value:+n}))}}),e(Vn,function(e,n){return e.value&&fe(e.value,n)&&(e.value=null),e})}(function(e,n){e.DEFMETHOD("optimize",function(e){if(this._optimized)return this;if(e.has_directive("use asm"))return this;e=n(this,e);return e._optimized=!0,e})});var Ae=e("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),ze=Ae.reduce(function(e,n,t){return e[n]=t,e},Object.create(null));function $e(e){var n="";e=Math.abs(e)<<1|e>>>31;do{var t=31&e}while((e>>>=5)&&(t|=32),n+=Ae[t],e);return n}function Me(){var n=Object.create(null),t=[];return t.index=function(e){return pn(n,e)||(n[e]=t.length,t.push(e)),n[e]},t}function je(l){var a,s=Me(),o=l.includeSources&&Object.create(null),f=Me(),c="";l.orig&&Object.keys(l.orig).forEach(function(e){var n=l.orig[e],t=[0,0,1,0,0];if(l.orig[e]={names:n.names,mappings:n.mappings.split(/;/).map(function(e){return t[0]=0,e.split(/,/).map(function(e){return t.slice(0,function(e,n){for(var t=0,i=0,r=0,o=0;r<n.length;r++){var a=ze[n[r]];t+=(31&a)<<i,32&a?i+=5:(e[o++]+=1&t?2147483648|-(t>>1):t>>1,t=i=0)}return o}(t,e))})}),sources:n.sources},o&&n.sourcesContent)for(var i=0;i<n.sources.length;i++){var r=n.sourcesContent[i];r&&(o[n.sources[i]]=r)}});var u=1,p=0,d=0,h=1,v=0,m=0;return{add:l.orig?function(e,n,t,i,r,o){var a=l.orig[e];if(a){var s,f=a.mappings[i-1];if(!f)return;for(var c=0;c<f.length;c++){var u=f[c][0];if(u<=r&&(s=f[c]),r<=u)break}!s||s.length<4?e=null:(e=a.sources[s[1]],i=s[2],r=s[3],4<s.length&&(o=a.names[s[4]]))}_(e,n,t,i,r,o)}:_,setSourceContent:o?function(e,n){o[e]=n}:Ze,toString:function(){return JSON.stringify({version:3,file:l.filename||void 0,sourceRoot:l.root||void 0,sources:s,sourcesContent:o?s.map(function(e){return o[e]||null}):void 0,names:f,mappings:c})}};function _(e,n,t,i,r,o){if(null!=a||null!=e){if(a=e,u<n)for(p=0;c+=";",++u<n;);else c&&(c+=",");c+=$e(t-p),p=t,null!=e&&(e=s.index(e),c+=$e(e-d),d=e,c+=$e(i-h),h=i,c+=$e(r-v),v=r,l.names&&null!=o&&(o=f.index(o),c+=$e(o-m),m=o))}}}!function(){function n(e){for(var n=!0,t=0;t<e.length;t++)n&&e[t]instanceof vn&&e[t].body instanceof Wt?e[t]=new _n({start:e[t].start,end:e[t].end,value:e[t].body.value}):!n||e[t]instanceof vn&&e[t].body instanceof Wt||(n=!1);return e}var i={Program:function(e){return new jn({start:s(e),end:f(e),body:n(e.body.map(c))})},FunctionDeclaration:function(e){return new Bn({start:s(e),end:f(e),name:c(e.id),argnames:e.params.map(c),body:n(c(e.body).body)})},FunctionExpression:function(e){return new In({start:s(e),end:f(e),name:c(e.id),argnames:e.params.map(c),body:n(c(e.body).body)})},ExpressionStatement:function(e){return new bn({start:s(e),end:f(e),body:c(e.expression)})},TryStatement:function(e){var n=e.handlers||[e.handler];if(1<n.length||e.guardedHandlers&&e.guardedHandlers.length)throw new Error("Multiple catch clauses are not supported.");return new tt({start:s(e),end:f(e),body:c(e.block).body,bcatch:c(n[0]),bfinally:e.finalizer?new rt(c(e.finalizer)):null})},Property:function(e){var n=e.key,n={start:s(n),end:f(e.value),key:""+n["Identifier"==n.type?"name":"value"],value:c(e.value)};return"init"==e.kind?new Mt(n):(n.value=new qn(n.value),"get"==e.kind?new Ft(n):"set"==e.kind?new jt(n):void 0)},ArrayExpression:function(e){return new St({start:s(e),end:f(e),elements:e.elements.map(function(e){return null===e?new Zt:c(e)})})},ObjectExpression:function(e){return new zt({start:s(e),end:f(e),properties:e.properties.map(function(e){return e.type="Property",c(e)})})},SequenceExpression:function(e){return new dt({start:s(e),end:f(e),expressions:e.expressions.map(c)})},MemberExpression:function(e){return new(e.computed?mt:vt)({start:s(e),end:f(e),property:e.computed?c(e.property):e.property.name,expression:c(e.object)})},SwitchCase:function(e){return new(e.test?nt:et)({start:s(e),end:f(e),expression:c(e.test),body:e.consequent.map(c)})},VariableDeclaration:function(e){return new ft({start:s(e),end:f(e),definitions:e.declarations.map(c)})},Literal:function(e){var n=e.value,t={start:s(e),end:f(e)};if(null===n)return new Xt(t);var i=e.regex;if(i&&i.pattern)return t.value=new RegExp(i.pattern,i.flags),t.value.raw_source=i.pattern,new Gt(t);if(i)return t.value=e.regex&&e.raw?e.raw:n,new Gt(t);switch(typeof n){case"string":return t.value=n,new Wt(t);case"number":return t.value=n,new Jt(t);case"boolean":return new(n?ii:ti)(t)}},Identifier:function(e){var n=t[t.length-2];return new("LabeledStatement"==n.type?ee:"VariableDeclarator"==n.type&&n.id===e?Ht:"FunctionExpression"==n.type?n.id===e?Ut:It:"FunctionDeclaration"==n.type?n.id===e?Rt:It:"CatchClause"==n.type?Bt:"BreakStatement"==n.type||"ContinueStatement"==n.type?ne:Yt)({start:s(e),end:f(e),name:e.name})},ThisExpression:function(e){return new Lt({start:s(e),end:f(e),name:"this"})}};function r(e){if("Literal"==e.type)return null!=e.raw?e.raw:e.value+""}function s(e){var n=e.loc,t=n&&n.start,i=e.range;return new H({file:n&&n.source,line:t&&t.line,col:t&&t.column,pos:i?i[0]:e.start,endline:t&&t.line,endcol:t&&t.column,endpos:i?i[0]:e.start,raw:r(e)})}function f(e){var n=e.loc,t=n&&n.end,i=e.range;return new H({file:n&&n.source,line:t&&t.line,col:t&&t.column,pos:i?i[1]:e.end,endline:t&&t.line,endcol:t&&t.column,endpos:i?i[1]:e.end,raw:r(e)})}function e(e,n,t){var o="function From_Moz_"+e+"(M){\n";o+="return new U2."+n.name+"({\nstart: my_start_token(M),\nend: my_end_token(M)";var a="function To_Moz_"+e+"(M){\n";a+="return {\ntype: "+JSON.stringify(e),t&&t.split(/\s*,\s*/).forEach(function(e){var n=/([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(e);if(!n)throw new Error("Can't understand property map: "+e);var t=n[1],i=n[2],r=n[3];switch(o+=",\n"+r+": ",a+=",\n"+t+": ",i){case"@":o+="M."+t+".map(from_moz)",a+="M."+r+".map(to_moz)";break;case">":o+="from_moz(M."+t+")",a+="to_moz(M."+r+")";break;case"=":o+="M."+t,a+="M."+r;break;case"%":o+="from_moz(M."+t+").body",a+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}}),o+="\n})\n}",a+="\n}\n}",o=new Function("U2","my_start_token","my_end_token","from_moz","return("+o+")")(h,s,f,c),a=new Function("to_moz","to_moz_block","to_moz_scope","return("+a+")")(l,p,d),i[e]=o,u(n,a)}i.UpdateExpression=i.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?bt:yt)({start:s(e),end:f(e),operator:e.operator,expression:c(e.argument)})},e("EmptyStatement",gn),e("BlockStatement",kn,"body@body"),e("IfStatement",Kn,"test>condition, consequent>body, alternate>alternative"),e("LabeledStatement",En,"label>label, body>body"),e("BreakStatement",Gn,"label>label"),e("ContinueStatement",Xn,"label>label"),e("WithStatement",$n,"object>expression, body>body"),e("SwitchStatement",Qn,"discriminant>expression, cases@body"),e("ReturnStatement",Vn,"argument>value"),e("ThrowStatement",Wn,"argument>value"),e("WhileStatement",On,"test>condition, body>body"),e("DoWhileStatement",Dn,"test>condition, body>body"),e("ForStatement",An,"init>init, test>condition, update>step, body>body"),e("ForInStatement",zn,"left>init, right>object, body>body"),e("DebuggerStatement",mn),e("VariableDeclarator",ct,"id>name, init>value"),e("CatchClause",it,"param>argname, body%body"),e("BinaryExpression",wt,"operator=operator, left>left, right>right"),e("LogicalExpression",wt,"operator=operator, left>left, right>right"),e("AssignmentExpression",kt,"operator=operator, left>left, right>right"),e("ConditionalExpression",xt,"test>condition, consequent>consequent, alternate>alternative"),e("NewExpression",pt,"callee>expression, arguments@args"),e("CallExpression",lt,"callee>expression, arguments@args"),u(jn,function(e){return d("Program",e)}),u(Bn,function(e){return{type:"FunctionDeclaration",id:l(e.name),params:e.argnames.map(l),body:d("BlockStatement",e)}}),u(In,function(e){return{type:"FunctionExpression",id:l(e.name),params:e.argnames.map(l),body:d("BlockStatement",e)}}),u(_n,function(e){return{type:"ExpressionStatement",expression:{type:"Literal",value:e.value}}}),u(bn,function(e){return{type:"ExpressionStatement",expression:l(e.body)}}),u(Zn,function(e){return{type:"SwitchCase",test:l(e.expression),consequent:e.body.map(l)}}),u(tt,function(e){return{type:"TryStatement",block:p(e),handler:l(e.bcatch),guardedHandlers:[],finalizer:l(e.bfinally)}}),u(it,function(e){return{type:"CatchClause",param:l(e.argname),guard:null,body:p(e)}}),u(ot,function(e){return{type:"VariableDeclaration",kind:"var",declarations:e.definitions.map(l)}}),u(dt,function(e){return{type:"SequenceExpression",expressions:e.expressions.map(l)}}),u(ht,function(e){var n=e instanceof mt;return{type:"MemberExpression",object:l(e.expression),computed:n,property:n?l(e.property):{type:"Identifier",name:e.property}}}),u(gt,function(e){return{type:"++"==e.operator||"--"==e.operator?"UpdateExpression":"UnaryExpression",operator:e.operator,prefix:e instanceof bt,argument:l(e.expression)}}),u(wt,function(e){return{type:"&&"==e.operator||"||"==e.operator?"LogicalExpression":"BinaryExpression",left:l(e.left),operator:e.operator,right:l(e.right)}}),u(St,function(e){return{type:"ArrayExpression",elements:e.elements.map(l)}}),u(zt,function(e){return{type:"ObjectExpression",properties:e.properties.map(l)}}),u($t,function(e){var n,t={type:"Literal",value:e.key};return e instanceof Mt?n="init":e instanceof Ft?n="get":e instanceof jt&&(n="set"),{type:"Property",kind:n,key:t,value:l(e.value)}}),u(qt,function(e){var n=e.definition();return{type:"Identifier",name:n&&n.mangled_name||e.name}}),u(Lt,function(){return{type:"ThisExpression"}}),u(Gt,function(e){var n=e.value.toString().match(/[gimuy]*$/)[0],t="/"+e.value.raw_source+"/"+n;return{type:"Literal",value:t,raw:t,regex:{pattern:e.value.raw_source,flags:n}}}),u(Vt,function(e){var n=e.value;return"number"==typeof n&&(n<0||0===n&&1/n<0)?{type:"UnaryExpression",operator:"-",prefix:!0,argument:{type:"Literal",value:-n,raw:e.start.raw}}:{type:"Literal",value:n,raw:e.start.raw}}),u(v,function(e){return{type:"Identifier",name:String(e.value)}}),ni.DEFMETHOD("to_mozilla_ast",Vt.prototype.to_mozilla_ast),Xt.DEFMETHOD("to_mozilla_ast",Vt.prototype.to_mozilla_ast),Zt.DEFMETHOD("to_mozilla_ast",function(){return null}),xn.DEFMETHOD("to_mozilla_ast",kn.prototype.to_mozilla_ast),Fn.DEFMETHOD("to_mozilla_ast",In.prototype.to_mozilla_ast);var t=null;function c(e){t.push(e);e=null!=e?i[e.type](e):null;return t.pop(),e}function u(e,i){e.DEFMETHOD("to_mozilla_ast",function(){return n=i(e=this),t=e.start,e=e.end,null!=t.pos&&null!=e.endpos&&(n.range=[t.pos,e.endpos]),t.line&&(n.loc={start:{line:t.line,column:t.col},end:e.endline?{line:e.endline,column:e.endcol}:null},t.file&&(n.loc.source=t.file)),n;var e,n,t})}function l(e){return null!=e?e.to_mozilla_ast():null}function p(e){return{type:"BlockStatement",body:e.body.map(l)}}function d(e,n){var t=n.body.map(l);return n.body[0]instanceof bn&&n.body[0].body instanceof Wt&&t.unshift(l(new gn(n.body[0]))),{type:e,body:t}}hn.from_mozilla_ast=function(e){var n=t;t=[];e=c(e);return t=n,e.walk(new ri(function(e){if(e instanceof ne){for(var n,t,i=0;(n=this.parent(i))&&!(n instanceof Mn);i++)if(n instanceof En&&n.label.name==e.name){e.thedef=n.label;break}e.thedef||(t=e.start,ie("Undefined label "+e.name,t.file,t.line,t.col,t.pos))}})),e}}();var Fe,qe,Ce,Ne=(Fe=[],["null","true","false","Infinity","-Infinity","undefined"].forEach(Pe),[Array,Boolean,Date,Error,Function,Math,Number,Object,RegExp,String].forEach(function(e){Object.getOwnPropertyNames(e).map(Pe),e.prototype&&(Object.getOwnPropertyNames(new e).map(Pe),Object.getOwnPropertyNames(e.prototype).map(Pe))}),cn(Fe));function Pe(e){Fe.push(e)}function He(e,n){e instanceof xt?(He(e.consequent,n),He(e.alternative,n)):e instanceof dt?He(e.tail_node(),n):e instanceof Wt&&n(e.value)}function Ie(n){try{return JSON.parse(n)}catch(e){throw new Error("invalid input source map: "+n)}}function Re(n,t,e){t[n]&&e.forEach(function(e){t[e]&&("object"!=typeof t[e]&&(t[e]={}),n in t[e]||(t[e][n]=t[n]))})}function Ue(e){e&&("props"in e?e.props instanceof ln||(e.props=ln.fromObject(e.props)):e.props=new ln)}function Be(e){return{props:e.props.toObject()}}Ce="undefined"==typeof Buffer?(qe=atob,btoa):void 0===Buffer.alloc?(qe=function(e){return new Buffer(e,"base64").toString()},function(e){return new Buffer(e).toString("base64")}):(qe=function(e){return Buffer.from(e,"base64").toString()},function(e){return Buffer.from(e).toString("base64")}),h.Dictionary=ln,h.List=on,h.minify=function(i,r){try{(r=Z(r,{compress:{},enclose:!1,ie8:!1,keep_fnames:!1,mangle:{},nameCache:null,output:{},parse:{},rename:void 0,sourceMap:!1,timings:!1,toplevel:!1,v8:!1,validate:!1,warnings:!1,webkit:!1,wrap:!1},!0)).validate&&hn.enable_validation();var e=r.timings&&{start:Date.now()};void 0===r.rename&&(r.rename=r.compress&&r.mangle),Re("ie8",r,["compress","mangle","output"]),Re("keep_fnames",r,["compress","mangle"]),Re("toplevel",r,["compress","mangle"]),Re("v8",r,["mangle","output"]),Re("webkit",r,["mangle","output"]),r.mangle&&(r.mangle=Z(r.mangle,{cache:r.nameCache&&(r.nameCache.vars||{}),eval:!1,ie8:!1,keep_fnames:!1,properties:!1,reserved:[],toplevel:!1,v8:!1,webkit:!1},!0),r.mangle.properties&&("object"!=typeof r.mangle.properties&&(r.mangle.properties={}),r.mangle.properties.keep_quoted&&(c=r.mangle.properties.reserved,Array.isArray(c)||(c=[]),r.mangle.properties.reserved=c),!r.nameCache||"cache"in r.mangle.properties||(r.mangle.properties.cache=r.nameCache.props||{})),Ue(r.mangle.cache),Ue(r.mangle.properties.cache)),r.sourceMap&&(r.sourceMap=Z(r.sourceMap,{content:null,filename:null,includeSources:!1,names:!0,root:null,url:null},!0));var o,n=[];if(r.warnings&&hn.log_function(function(e){n.push(e)},"verbose"==r.warnings),e&&(e.parse=Date.now()),i instanceof jn)o=i;else{"string"==typeof i&&(i=[i]),r.parse=r.parse||{},r.parse.toplevel=null;var t,a=r.sourceMap&&r.sourceMap.content;for(f in"string"==typeof a&&"inline"!=a&&(a=Ie(a)),a&&(r.sourceMap.orig=Object.create(null)),i)pn(i,f)&&(r.parse.filename=f,r.parse.toplevel=o=ci(i[f],r.parse),"inline"==a?(t=function(e,n){for(var t=n.end.comments_after,i=t.length;0<=--i;){var r=t[i];if("comment1"!=r.type)break;r=/^# ([^\s=]+)=(\S+)\s*$/.exec(r.value);if(!r)break;if("sourceMappingURL"==r[1]){if(!(r=/^data:application\/json(;.*?)?;base64,(\S+)$/.exec(r[2])))break;return qe(r[2])}}hn.warn("inline source map not found: {name}",{name:e})}(f,o))&&(r.sourceMap.orig[f]=Ie(t)):a&&(r.sourceMap.orig[f]=a))}c&&(l=c,o.walk(new ri(function(e){e instanceof $t?e.start&&e.start.quote&&u(e.key):e instanceof mt&&He(e.property,u)}))),["enclose","wrap"].forEach(function(e){var n,t=r[e];t&&(n=o.print_to_string().slice(0,-1),o=o[e](t),i[o.start.file]=o.print_to_string().replace(n,""))}),r.validate&&o.validate_ast(),e&&(e.rename=Date.now()),r.rename&&(o.figure_out_scope(r.mangle),o.expand_names(r.mangle)),e&&(e.compress=Date.now()),r.compress&&(o=new di(r.compress).compress(o),r.validate&&o.validate_ast()),e&&(e.scope=Date.now()),r.mangle&&o.figure_out_scope(r.mangle),e&&(e.mangle=Date.now()),r.mangle&&(o.compute_char_frequency(r.mangle),o.mangle_names(r.mangle)),e&&(e.properties=Date.now()),r.mangle&&r.mangle.properties&&function(e,t){t=Z(t,{builtins:!1,cache:null,debug:!1,keep_quoted:!1,regex:null,reserved:null},!0);var n=Object.create(t.builtins?null:Ne);Array.isArray(t.reserved)&&t.reserved.forEach(function(e){n[e]=!0});var i,r=-1;t.cache?(i=t.cache.props).each(function(e){n[e]=!0}):i=new ln;var o,a=t.regex,s=!1!==t.debug;s&&(o=!0===t.debug?"":t.debug);var f=Object.create(null),c=Object.create(n);function u(e){return!c[e]&&!/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(e)}function l(e){return!n[e]&&((!a||a.test(e))&&(i.has(e)||f[e]))}function p(e){u(e)&&(f[e]=!0),l(e)||(c[e]=!0)}function d(e){if(!l(e))return e;var n,t=i.get(e);if(!t){if(!s||u(n="_$"+e+"$"+o+"_")&&(t=n),!t)for(;t=Y(++r),!u(t););i.set(e,t)}return t}function h(e){e instanceof dt?h(e.expressions.tail_node()):e instanceof Wt?e.value=d(e.value):e instanceof xt&&(h(e.consequent),h(e.alternative))}e.walk(new ri(function(e){if(e instanceof wt)"in"==e.operator&&He(e.left,p);else if("Call"==e.TYPE){var n=e.expression;if(n instanceof vt)switch(n.property){case"defineProperty":case"getOwnPropertyDescriptor":if(e.args.length<2)break;if(!((n=n.expression)instanceof Yt))break;if("Object"!=n.name)break;if(!n.definition().undeclared)break;He(e.args[1],p);break;case"hasOwnProperty":if(e.args.length<1)break;He(e.args[0],p)}}else e instanceof vt?p(e.property):e instanceof $t?"string"==typeof e.key&&p(e.key):e instanceof mt&&He(e.property,p)})),e.walk(new ri(function(e){if(e instanceof wt)"in"==e.operator&&h(e.left);else if("Call"==e.TYPE){var n=e.expression;if(n instanceof vt)switch(n.property){case"defineProperty":case"getOwnPropertyDescriptor":if(e.args.length<2)break;if(!((n=n.expression)instanceof Yt))break;if("Object"!=n.name)break;if(!n.definition().undeclared)break;h(e.args[1]);break;case"hasOwnProperty":if(e.args.length<1)break;h(e.args[0])}}else e instanceof vt?e.property=d(e.property):e instanceof $t?"string"==typeof e.key&&(e.key=d(e.key)):e instanceof mt&&(t.keep_quoted||h(e.property))}))}(o,r.mangle.properties),e&&(e.output=Date.now());var s={};if(r.output.ast&&(s.ast=o),!pn(r.output,"code")||r.output.code){if(r.sourceMap&&(r.output.source_map=je(r.sourceMap),r.sourceMap.includeSources)){if(i instanceof jn)throw new Error("original source content unavailable");for(var f in i)pn(i,f)&&r.output.source_map.setSourceContent(f,i[f])}delete r.output.ast,delete r.output.code;var c=pi(r.output);o.print(c),s.code=c.get(),r.sourceMap&&(s.map=r.output.source_map.toString(),(c=r.sourceMap.url)&&(s.code=s.code.replace(/\n\/\/# sourceMappingURL=\S+\s*$/,""),s.code+="inline"==c?"\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+Ce(s.map):"\n//# sourceMappingURL="+c))}return r.nameCache&&r.mangle&&(r.mangle.cache&&(r.nameCache.vars=Be(r.mangle.cache)),r.mangle.properties&&r.mangle.properties.cache&&(r.nameCache.props=Be(r.mangle.properties.cache))),e&&(e.end=Date.now(),s.timings={parse:.001*(e.rename-e.parse),rename:.001*(e.compress-e.rename),compress:.001*(e.scope-e.compress),scope:.001*(e.mangle-e.scope),mangle:.001*(e.properties-e.mangle),properties:.001*(e.output-e.properties),output:.001*(e.end-e.output),total:.001*(e.end-e.start)}),n.length&&(s.warnings=n),s}catch(e){return{error:e}}finally{hn.log_function(),hn.disable_validation()}function u(e){an(l,e)}var l},h.parse=ci,h.push_uniq=an,h.TreeTransformer=ui,h.TreeWalker=ri}("undefined"==typeof UglifyJS?UglifyJS={}:UglifyJS);