!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("source-map")):"function"==typeof define&&define.amd?define(["exports","source-map"],t):t((e=e||self).Terser={},e.sourceMap)}(this,function(e,t){"use strict";function n(e){return e.split("")}function i(e,t){return t.includes(e)}t=t&&t.hasOwnProperty("default")?t.default:t;class r extends Error{constructor(e,t){super(),this.name="DefaultsError",this.message=e,this.defs=t}}function o(e,t,n){!0===e&&(e={});var i=e||{};if(n)for(var o in i)if(D(i,o)&&!D(t,o))throw new r("`"+o+"` is not a supported option",t);for(var o in t)D(t,o)&&(i[o]=e&&D(e,o)?e[o]:t[o]);return i}function a(){}function s(){return!1}function u(){return!0}function c(){return this}function l(){return null}var f=function(){function e(e,o,a){var s,u=[],c=[];function l(){var l=o(e[s],s),f=l instanceof r;return f&&(l=l.v),l instanceof n?(l=l.v)instanceof i?c.push.apply(c,a?l.v.slice().reverse():l.v):c.push(l):l!==t&&(l instanceof i?u.push.apply(u,a?l.v.slice().reverse():l.v):u.push(l)),f}if(Array.isArray(e))if(a){for(s=e.length;--s>=0&&!l(););u.reverse(),c.reverse()}else for(s=0;s=0;)e[n]===t&&e.splice(n,1)}function m(e,t){if(e.length<2)return e.slice();return function e(n){if(n.length<=1)return n;var i=Math.floor(n.length/2),r=n.slice(0,i),o=n.slice(i);return function(e,n){for(var i=[],r=0,o=0,a=0;r!?|~^")),y=/[0-9a-f]/i,C=/^0x[0-9a-f]+$/i,O=/^0[0-7]+$/,F=/^0o[0-7]+$/i,M=/^0b[01]+$/i,R=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,w=/^(0[xob])?[0-9]+n$/i,N=E(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","**","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),x=E(n("  \n\r\t\f\v​           \u2028\u2029   \ufeff")),k=E(n("\n\r\u2028\u2029")),I=E(n(";]),:")),L=E(n("[{(,;:")),V=E(n("[]{}(),;:")),P={ID_Start:/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function B(e,t){var n=e.charAt(t);if(K(n)){var i=e.charAt(t+1);if(U(i))return n+i}if(U(n)){var r=e.charAt(t-1);if(K(r))return r+n}return n}function K(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=55296&&e<=56319}function U(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e>=56320&&e<=57343}function G(e){return e>=48&&e<=57}function H(e){var t=e.charCodeAt(0);return P.ID_Start.test(e)||36==t||95==t}function X(e){var t=e.charCodeAt(0);return P.ID_Continue.test(e)||36==t||95==t||8204==t||8205==t}function z(e){return/^[a-z_$][a-z0-9_$]*$/i.test(e)}class W extends Error{constructor(e,t,n,i,r){super(),this.name="SyntaxError",this.message=e,this.filename=t,this.line=n,this.col=i,this.pos=r}}function Y(e,t,n,i,r){throw new W(e,t,n,i,r)}function q(e,t,n){return e.type==t&&(null==n||e.value==n)}var $={};function j(e,t,n,i){var r={text:e,filename:t,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,brace_counter:0,template_braces:[],comments_before:[],directives:{},directive_stack:[]};function o(){return B(r.text,r.pos)}function a(e,t){var n=B(r.text,r.pos++);if(e&&!n)throw $;return k.has(n)?(r.newline_before=r.newline_before||!t,++r.line,r.col=0,t||"\r"!=n||"\n"!=o()||(++r.pos,n="\n")):(n.length>1&&(++r.pos,++r.col),++r.col),n}function s(e){for(;e-- >0;)a()}function u(e){return r.text.substr(r.pos,e.length)==e}function c(e,t){var n=r.text.indexOf(e,r.pos);if(t&&-1==n)throw $;return n}function l(){r.tokline=r.line,r.tokcol=r.col,r.tokpos=r.pos}var f=!1,p=null;function _(n,i,o){r.regex_allowed="operator"==n&&!Q.has(i)||"keyword"==n&&T.has(i)||"punc"==n&&L.has(i)||"arrow"==n,"punc"==n&&"."==i?f=!0:o||(f=!1);var a={type:n,value:i,line:r.tokline,col:r.tokcol,pos:r.tokpos,endline:r.line,endcol:r.col,endpos:r.pos,nlb:r.newline_before,file:t};return/^(?:num|string|regexp)$/i.test(n)&&(a.raw=e.substring(a.pos,a.endpos)),o||(a.comments_before=r.comments_before,a.comments_after=r.comments_before=[]),r.newline_before=!1,a=new re(a),o||(p=a),a}function d(){for(;x.has(o());)a()}function m(e){Y(e,t,r.tokline,r.tokcol,r.tokpos)}function E(e){var t=!1,n=!1,i=!1,r="."==e,s=!1,u=function(e){for(var t,n="",i=0;(t=o())&&e(t,i++);)n+=a();return n}(function(o,a){if(s)return!1;switch(o.charCodeAt(0)){case 98:case 66:return i=!0;case 111:case 79:case 120:case 88:return!i&&(i=!0);case 101:case 69:return!!i||!t&&(t=n=!0);case 45:return n||0==a&&!e;case 43:return n;case n=!1,46:return!(r||i||t)&&(r=!0)}return"n"===o?(s=!0,!0):y.test(o)});if(e&&(u=e+u),O.test(u)&&ee.has_directive("use strict")&&m("Legacy octal literals are not allowed in strict mode"),u.endsWith("n")){if(!r&&w.test(u))return _("big_int",u.replace("n",""));m("Invalid or unexpected token")}var c=function(e){if(C.test(e))return parseInt(e.substr(2),16);if(O.test(e))return parseInt(e.substr(1),8);if(F.test(e))return parseInt(e.substr(2),8);if(M.test(e))return parseInt(e.substr(2),2);if(R.test(e))return parseFloat(e);var t=parseFloat(e);return t==e?t:void 0}(u);if(!isNaN(c))return _("num",c);m("Invalid syntax: "+u)}function h(e,t,n){var i,s=a(!0,e);switch(s.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(D(2,t));case 117:if("{"==o()){for(a(!0),"}"===o()&&m("Expecting hex-character between {}");"0"==o();)a(!0);var u,l=c("}",!0)-r.pos;return(l>6||(u=D(l,t))>1114111)&&m("Unicode reference out of bounds"),a(!0),(i=u)>65535?(i-=65536,String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):String.fromCharCode(i)}return String.fromCharCode(D(4,t));case 10:return"";case 13:if("\n"==o())return a(!0,e),""}return s>="0"&&s<="7"?(n&&t&&m("Octal escape sequences are not allowed in template strings"),function(e,t){var n=o();n>="0"&&n<="7"&&(e+=a(!0))[0]<="3"&&(n=o())>="0"&&n<="7"&&(e+=a(!0));if("0"===e)return"\0";e.length>0&&ee.has_directive("use strict")&&t&&m("Legacy octal escape sequences are not allowed in strict mode");return String.fromCharCode(parseInt(e,8))}(s,t)):s}function D(e,t){for(var n=0;e>0;--e){if(!t&&isNaN(parseInt(o(),16)))return parseInt(n,16)||"";var i=a(!0);isNaN(parseInt(i,16))&&m("Invalid hex-character pattern in string"),n+=i}return parseInt(n,16)}var g=J("Unterminated string constant",function(){for(var e=a(),t="";;){var n=a(!0,!0);if("\\"==n)n=h(!0,!0);else if("\r"==n||"\n"==n)m("Unterminated string constant");else if(n==e)break;t+=n}var i=_("string",t);return i.quote=e,i}),I=J("Unterminated template",function(e){e&&r.template_braces.push(r.brace_counter);var t,n,i="",s="";for(a(!0,!0);"`"!=(t=a(!0,!0));){if("\r"==t)"\n"==o()&&++r.pos,t="\n";else if("$"==t&&"{"==o())return a(!0,!0),r.brace_counter++,(n=_(e?"template_head":"template_substitution",i)).begin=e,n.raw=s,n.end=!1,n;if(s+=t,"\\"==t){var u=r.pos;t=h(!0,!(p&&("name"===p.type||"punc"===p.type&&(")"===p.value||"]"===p.value))),!0),s+=r.text.substr(u,r.pos-u)}i+=t}return r.template_braces.pop(),(n=_(e?"template_head":"template_substitution",i)).begin=e,n.raw=s,n.end=!0,n});function P(e){var t,n=r.regex_allowed,i=function(){for(var e=r.text,t=r.pos,n=r.text.length;t"===o()?(a(),_("arrow","=>")):j("=");case 96:return I(!0);case 123:r.brace_counter++;break;case 125:if(r.brace_counter--,r.template_braces.length>0&&r.template_braces[r.template_braces.length-1]===r.brace_counter)return I(!1)}if(G(c))return E();if(V.has(t))return _("punc",a());if(b.has(t))return j();if(92==c||H(t))return h=void 0,h=W(),f?_("name",h):A.has(h)?_("atom",h):S.has(h)?N.has(h)?_("operator",h):_("keyword",h):_("name",h);break}var h;m("Unexpected character '"+t+"'")}return ee.next=a,ee.peek=o,ee.context=function(e){return e&&(r=e),r},ee.add_directive=function(e){r.directive_stack[r.directive_stack.length-1].push(e),void 0===r.directives[e]?r.directives[e]=1:r.directives[e]++},ee.push_directives_stack=function(){r.directive_stack.push([])},ee.pop_directives_stack=function(){for(var e=r.directive_stack[r.directive_stack.length-1],t=0;t0},ee}var Z=E(["typeof","void","delete","--","++","!","~","-","+"]),Q=E(["--","++"]),J=E(["=","+=","-=","/=","*=","**=","%=",">>=","<<=",">>>=","|=","^=","&="]),ee=function(e,t){for(var n=0;n","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],{}),te=E(["atom","num","big_int","string","regexp","name"]);function ne(e,t){t=o(t,{bare_returns:!1,ecma:8,expression:!1,filename:null,html5_comments:!0,module:!1,shebang:!0,strict:!1,toplevel:null},!0);var n={input:"string"==typeof e?j(e,t.filename,t.html5_comments,t.shebang):e,token:null,prev:null,peeked:null,in_function:0,in_async:-1,in_generator:-1,in_directives:!0,in_loop:0,labels:[]};function i(e,t){return q(n.token,e,t)}function r(){return n.peeked||(n.peeked=n.input())}function a(){return n.prev=n.token,n.peeked||r(),n.token=n.peeked,n.peeked=null,n.in_directives=n.in_directives&&("string"==n.token.type||i("punc",";")),n.token}function s(){return n.prev}function u(e,t,i,r){var o=n.input.context();Y(e,o.filename,null!=t?t:o.tokline,null!=i?i:o.tokcol,null!=r?r:o.tokpos)}function c(e,t){u(t,e.line,e.col)}function l(e){null==e&&(e=n.token),c(e,"Unexpected token: "+e.type+" ("+e.value+")")}function f(e,t){if(i(e,t))return a();c(n.token,"Unexpected token "+n.token.type+" «"+n.token.value+"», expected "+e+" «"+t+"»")}function p(e){return f("punc",e)}function _(e){return e.nlb||!e.comments_before.every(e=>!e.nlb)}function d(){return!t.strict&&(i("eof")||i("punc","}")||_(n.token))}function m(){return n.in_generator===n.in_function}function E(){return n.in_async===n.in_function}function h(e){i("punc",";")?a():e||d()||l()}function g(){p("(");var e=Qt(!0);return p(")"),e}function S(e){return function(){var t=n.token,i=e.apply(null,arguments),r=s();return i.start=t,i.end=r,i}}function A(){(i("operator","/")||i("operator","/="))&&(n.peeked=null,n.token=n.input(n.token.value.substr(1)))}n.token=a();var T=S(function(e,o,m){switch(A(),n.token.type){case"string":if(n.in_directives){var D=r();!n.token.raw.includes("\\")&&(q(D,"punc",";")||q(D,"punc","}")||_(D)||q(D,"eof"))?n.input.add_directive(n.token.value):n.in_directives=!1}var S=n.in_directives,v=b();return S&&v.body instanceof Jt?new ue(v.body):v;case"template_head":case"num":case"big_int":case"regexp":case"operator":case"atom":return b();case"name":if("async"==n.token.value&&q(r(),"keyword","function"))return a(),a(),o&&u("functions are not allowed as the body of a loop"),O(Ne,!1,!0,e);if("import"==n.token.value&&!q(r(),"punc","(")){a();var C=function(){var e,t,r=s();i("name")&&(e=me(Ht));i("punc",",")&&a();((t=ae(!0))||e)&&f("name","from");var o=n.token;"string"!==o.type&&l();return a(),new it({start:r,imported_name:e,imported_names:t,module_name:new Jt({start:o,value:o.value,quote:o.quote,end:o}),end:n.token})}();return h(),C}return q(r(),"punc",":")?function(){var e=me(zt);"await"===e.name&&E()&&c(n.prev,"await cannot be used as label inside async function");n.labels.some(t=>t.name===e.name)&&u("Label "+e.name+" defined twice");p(":"),n.labels.push(e);var t=T();n.labels.pop(),t instanceof he||e.references.forEach(function(t){t instanceof He&&(t=t.label.start,u("Continue label `"+e.name+"` refers to non-IterationStatement.",t.line,t.col,t.pos))});return new Ee({body:t,label:e})}():b();case"punc":switch(n.token.value){case"{":return new _e({start:n.token,body:N(),end:s()});case"[":case"(":return b();case";":return n.in_directives=!1,a(),new de;default:l()}case"keyword":switch(n.token.value){case"break":return a(),y(Ge);case"continue":return a(),y(He);case"debugger":return a(),h(),new se;case"do":a();var F=rn(T);f("keyword","while");var R=g();return h(!0),new ge({body:F,condition:R});case"while":return a(),new Se({condition:g(),body:rn(function(){return T(!1,!0)})});case"for":return a(),function(){var e="`for await` invalid in this context",t=n.token;"name"==t.type&&"await"==t.value?(E()||c(t,e),a()):t=!1;p("(");var r=null;if(i("punc",";"))t&&c(t,e);else{r=i("keyword","var")?(a(),L(!0)):i("keyword","let")?(a(),V(!0)):i("keyword","const")?(a(),P(!0)):Qt(!0,!0);var o=i("operator","in"),s=i("name","of");if(t&&!s&&c(t,e),o||s)return r instanceof Qe?r.definitions.length>1&&c(r.start,"Only one variable declaration allowed in for..in loop"):Ct(r)||(r=Mt(r))instanceof xe||c(r.start,"Invalid left-hand side in for..in loop"),a(),o?function(e){var t=Qt(!0);return p(")"),new ve({init:e,object:t,body:rn(function(){return T(!1,!0)})})}(r):function(e,t){var n=e instanceof Qe?e.definitions[0].name:null,i=Qt(!0);return p(")"),new Te({await:t,init:e,name:n,object:i,body:rn(function(){return T(!1,!0)})})}(r,!!t)}return function(e){p(";");var t=i("punc",";")?null:Qt(!0);p(";");var n=i("punc",")")?null:Qt(!0);return p(")"),new Ae({init:e,condition:t,step:n,body:rn(function(){return T(!1,!0)})})}(r)}();case"class":return a(),o&&u("classes are not allowed as the body of a loop"),m&&u("classes are not allowed as the body of an if"),$(Ot);case"function":return a(),o&&u("functions are not allowed as the body of a loop"),O(Ne,!1,!1,e);case"if":return a(),function(){var e=g(),t=T(!1,!1,!0),n=null;i("keyword","else")&&(a(),n=T(!1,!1,!0));return new Xe({condition:e,body:t,alternative:n})}();case"return":0!=n.in_function||t.bare_returns||u("'return' outside of function"),a();var w=null;return i("punc",";")?a():d()||(w=Qt(!0),h()),new Be({value:w});case"switch":return a(),new ze({expression:g(),body:rn(x)});case"throw":a(),_(n.token)&&u("Illegal newline after 'throw'");w=Qt(!0);return h(),new Ke({value:w});case"try":return a(),function(){var e=N(),t=null,r=null;if(i("keyword","catch")){var o=n.token;if(a(),i("punc","{"))var c=null;else{p("(");var c=M(void 0,Gt);p(")")}t=new je({start:o,argname:c,body:N(),end:s()})}if(i("keyword","finally")){var o=n.token;a(),r=new Ze({start:o,body:N(),end:s()})}t||r||u("Missing catch/finally blocks");return new $e({body:e,bcatch:t,bfinally:r})}();case"var":a();C=L();return h(),C;case"let":a();C=V();return h(),C;case"const":a();C=P();return h(),C;case"with":return n.input.has_directive("use strict")&&u("Strict mode may not include a with statement"),a(),new be({expression:g(),body:T()});case"export":if(!q(r(),"punc","(")){a();C=function(){var e,t,o,u,c,f=n.token;if(i("keyword","default"))e=!0,a();else if(t=ae(!1)){if(i("name","from")){a();var p=n.token;return"string"!==p.type&&l(),a(),new rt({start:f,is_default:e,exported_names:t,module_name:new Jt({start:p,value:p.value,quote:p.quote,end:p}),end:s()})}return new rt({start:f,is_default:e,exported_names:t,end:s()})}i("punc","{")||e&&(i("keyword","class")||i("keyword","function"))&&q(r(),"punc")?(u=Qt(!1),h()):(o=T(e))instanceof Qe&&e?l(o.start):o instanceof Qe||o instanceof Fe||o instanceof Ot?c=o:o instanceof ce?u=o.body:l(o.start);return new rt({start:f,is_default:e,exported_value:u,exported_definition:c,end:s()})}();return i("punc",";")&&h(),C}}}l()});function b(e){return new ce({body:(e=Qt(!0),h(),e)})}function y(e){var t,i=null;d()||(i=me($t,!0)),null!=i?((t=n.labels.find(e=>e.name===i.name))||u("Undefined label "+i.name),i.thedef=t):0==n.in_loop&&u(e.TYPE+" not inside a loop or switch"),h();var r=new e({label:i});return t&&t.references.push(r),r}var C=function(e,t,r){_(n.token)&&u("Unexpected newline before arrow (=>)"),f("arrow","=>");var o=w(i("punc","{"),!1,r),a=o instanceof Array&&o.length?o[o.length-1].end:o instanceof Array?e:o.end;return new we({start:e,end:a,async:r,argnames:t,body:o})},O=function(e,t,n,r){var o=e===Ne,u=i("operator","*");u&&a();var c=i("name")?me(o?Vt:Bt):null;o&&!c&&(r?e=Re:l()),!c||e===Me||c instanceof wt||l(s());var f=[],p=w(!0,u||t,n,c,f);return new e({start:f.start,end:p.end,is_generator:u,async:n,name:c,argnames:f,body:p})};function F(e,t){var n=new Set,i=!1,r=!1,o=!1,a=!!t,s={add_parameter:function(t){if(n.has(t.value))!1===i&&(i=t),s.check_strict();else if(n.add(t.value),e)switch(t.value){case"arguments":case"eval":case"yield":a&&c(t,"Unexpected "+t.value+" identifier as parameter inside strict mode");break;default:v.has(t.value)&&l()}},mark_default_assignment:function(e){!1===r&&(r=e)},mark_spread:function(e){!1===o&&(o=e)},mark_strict_mode:function(){a=!0},is_strict:function(){return!1!==r||!1!==o||a},check_strict:function(){s.is_strict()&&!1!==i&&c(i,"Parameter "+i.value+" was used already")}};return s}function M(e,t){var r,o=!1;return void 0===e&&(e=F(!0,n.input.has_directive("use strict"))),i("expand","...")&&(o=n.token,e.mark_spread(n.token),a()),r=R(e,t),i("operator","=")&&!1===o&&(e.mark_default_assignment(n.token),a(),r=new Dt({start:r.start,left:r,operator:"=",right:Qt(!1),end:n.token})),!1!==o&&(i("punc",")")||l(),r=new Oe({start:o,expression:r,end:o})),e.check_strict(),r}function R(e,t){var o,c=[],f=!0,_=!1,d=n.token;if(void 0===e&&(e=F(!1,n.input.has_directive("use strict"))),t=void 0===t?Lt:t,i("punc","[")){for(a();!i("punc","]");){if(f?f=!1:p(","),i("expand","...")&&(_=!0,o=n.token,e.mark_spread(n.token),a()),i("punc"))switch(n.token.value){case",":c.push(new un({start:n.token,end:n.token}));continue;case"]":break;case"[":case"{":c.push(R(e,t));break;default:l()}else i("name")?(e.add_parameter(n.token),c.push(me(t))):u("Invalid function parameter");i("operator","=")&&!1===_&&(e.mark_default_assignment(n.token),a(),c[c.length-1]=new Dt({start:c[c.length-1].start,left:c[c.length-1],operator:"=",right:Qt(!1),end:n.token})),_&&(i("punc","]")||u("Rest element must be last element"),c[c.length-1]=new Oe({start:o,expression:c[c.length-1],end:o}))}return p("]"),e.check_strict(),new xe({start:d,names:c,is_array:!0,end:s()})}if(i("punc","{")){for(a();!i("punc","}");){if(f?f=!1:p(","),i("expand","...")&&(_=!0,o=n.token,e.mark_spread(n.token),a()),i("name")&&(q(r(),"punc")||q(r(),"operator"))&&[",","}","="].includes(r().value)){e.add_parameter(n.token);var m=s(),E=me(t);_?c.push(new Oe({start:o,expression:E,end:E.end})):c.push(new vt({start:m,key:E.name,value:E,end:E.end}))}else{if(i("punc","}"))continue;var h=n.token,D=le();null===D?l(s()):"name"!==s().type||i("punc",":")?(p(":"),c.push(new vt({start:h,quote:h.quote,key:D,value:R(e,t),end:s()}))):c.push(new vt({start:s(),key:D,value:new t({start:s(),name:D,end:s()}),end:s()}))}_?i("punc","}")||u("Rest element must be last element"):i("operator","=")&&(e.mark_default_assignment(n.token),a(),c[c.length-1].value=new Dt({start:c[c.length-1].value.start,left:c[c.length-1].value,operator:"=",right:Qt(!1),end:n.token}))}return p("}"),e.check_strict(),new xe({start:d,names:c,is_array:!1,end:s()})}if(i("name"))return e.add_parameter(n.token),me(t);u("Invalid function parameter")}function w(e,r,o,s,u){var c=n.in_loop,f=n.labels,_=n.in_generator,d=n.in_async;if(++n.in_function,r&&(n.in_generator=n.in_function),o&&(n.in_async=n.in_function),u&&function(e){var r=F(!0,n.input.has_directive("use strict"));for(p("(");!i("punc",")");){var o=M(r);if(e.push(o),i("punc",")")||(p(","),i("punc",")")&&t.ecma<8&&l()),o instanceof Oe)break}a()}(u),e&&(n.in_directives=!0),n.in_loop=0,n.labels=[],e){n.input.push_directives_stack();var m=N();s&&pe(s),u&&u.forEach(pe),n.input.pop_directives_stack()}else m=Qt(!1);return--n.in_function,n.in_loop=c,n.labels=f,n.in_generator=_,n.in_async=d,m}function N(){p("{");for(var e=[];!i("punc","}");)i("eof")&&l(),e.push(T());return a(),e}function x(){p("{");for(var e,t=[],r=null,o=null;!i("punc","}");)i("eof")&&l(),i("keyword","case")?(o&&(o.end=s()),r=[],o=new qe({start:(e=n.token,a(),e),expression:Qt(!0),body:r}),t.push(o),p(":")):i("keyword","default")?(o&&(o.end=s()),r=[],o=new Ye({start:(e=n.token,a(),p(":"),e),body:r}),t.push(o)):(r||l(),r.push(T()));return o&&(o.end=s()),a(),t}function k(e,t){for(var r,o=[];;){var c="var"===t?Nt:"const"===t?kt:"let"===t?It:null;if(i("punc","{")||i("punc","[")?r=new ot({start:n.token,name:R(void 0,c),value:i("operator","=")?(f("operator","="),Qt(!1,e)):null,end:s()}):"import"==(r=new ot({start:n.token,name:me(c),value:i("operator","=")?(a(),Qt(!1,e)):e||"const"!==t?null:u("Missing initializer in const declaration"),end:s()})).name.name&&u("Unexpected token: import"),o.push(r),!i("punc",","))break;a()}return o}var L=function(e){return new Je({start:s(),definitions:k(e,"var"),end:s()})},V=function(e){return new et({start:s(),definitions:k(e,"let"),end:s()})},P=function(e){return new tt({start:s(),definitions:k(e,"const"),end:s()})};function B(){var e,t=n.token;switch(t.type){case"name":e=fe(Wt);break;case"num":e=new en({start:t,end:t,value:t.value});break;case"big_int":e=new tn({start:t,end:t,value:t.value});break;case"string":e=new Jt({start:t,end:t,value:t.value,quote:t.quote});break;case"regexp":e=new nn({start:t,end:t,value:t.value});break;case"atom":switch(t.value){case"false":e=new fn({start:t,end:t});break;case"true":e=new pn({start:t,end:t});break;case"null":e=new on({start:t,end:t})}}return a(),e}function K(e,t,n,i){var r=function(e,t){return t?new Dt({start:e.start,left:e,operator:"=",right:t,end:t.end}):e};return e instanceof St?r(new xe({start:e.start,end:e.end,is_array:!1,names:e.properties.map(K)}),i):e instanceof vt?(e.value=K(e.value,0,[e.key]),r(e,i)):e instanceof un?e:e instanceof xe?(e.names=e.names.map(K),r(e,i)):e instanceof Wt?r(new Lt({name:e.name,start:e.start,end:e.end}),i):e instanceof Oe?(e.expression=K(e.expression),r(e,i)):e instanceof gt?r(new xe({start:e.start,end:e.end,is_array:!0,names:e.elements.map(K)}),i):e instanceof ht?r(K(e.left,void 0,void 0,e.right),i):e instanceof Dt?(e.left=K(e.left,0,[e.left]),e):void u("Invalid function parameter",e.start.line,e.start.col)}var U=function(e,o){if(i("operator","new"))return function(e){var r=n.token;if(f("operator","new"),i("punc","."))return a(),f("name","target"),ye(new Rt({start:r,end:s()}),e);var o,u=U(!1);i("punc","(")?(a(),o=H(")",t.ecma>=8)):o=[];var c=new st({start:r,expression:u,args:o,end:s()});return De(c),ye(c,e)}(e);var u,c=n.token,_=i("name","async")&&"["!=(u=r()).value&&"arrow"!=u.type&&B();if(i("punc")){switch(n.token.value){case"(":if(_&&!e)break;var d=function(e,r){var o,u,c,f=[];for(p("(");!i("punc",")");)o&&l(o),i("expand","...")?(o=n.token,r&&(u=n.token),a(),f.push(new Oe({start:s(),expression:Qt(),end:n.token}))):f.push(Qt()),i("punc",")")||(p(","),i("punc",")")&&(t.ecma<8&&l(),c=s(),r&&(u=c)));return p(")"),e&&i("arrow","=>")?o&&c&&l(c):u&&l(u),f}(o,!_);if(o&&i("arrow","=>"))return C(c,d.map(K),!!_);var m=_?new at({expression:_,args:d}):1==d.length?d[0]:new ut({expressions:d});if(m.start){var E=c.comments_before.length;if([].unshift.apply(m.start.comments_before,c.comments_before),c.comments_before=m.start.comments_before,c.comments_before_length=E,0==E&&c.comments_before.length>0){var h=c.comments_before[0];h.nlb||(h.nlb=c.nlb,c.nlb=!1)}c.comments_after=m.start.comments_after}m.start=c;var D=s();return m.end&&(D.comments_before=m.end.comments_before,[].push.apply(m.end.comments_after,D.comments_after),D.comments_after=m.end.comments_after),m.end=D,m instanceof at&&De(m),ye(m,e);case"[":return ye(X(),e);case"{":return ye(W(),e)}_||l()}if(o&&i("name")&&q(r(),"arrow")){var g=new Lt({name:n.token.value,start:c,end:c});return a(),C(c,[g],!!_)}if(i("keyword","function")){a();var S=O(Re,!1,!!_);return S.start=c,S.end=s(),ye(S,e)}if(_)return ye(_,e);if(i("keyword","class")){a();var A=$(Ft);return A.start=c,A.end=s(),ye(A,e)}return i("template_head")?ye(G(),e):te.has(n.token.type)?ye(B(),e):void l()};function G(e){var t=[],i=n.token;for(t.push(new Le({start:n.token,raw:n.token.raw,value:n.token.value,end:n.token}));!1===n.token.end;)a(),A(),t.push(Qt(!0)),q("template_substitution")||l(),t.push(new Le({start:n.token,raw:n.token.raw,value:n.token.value,end:n.token}));return a(),new Ie({start:i,segments:t,end:n.token})}function H(e,t,r){for(var o=!0,u=[];!i("punc",e)&&(o?o=!1:p(","),!t||!i("punc",e));)i("punc",",")&&r?u.push(new un({start:n.token,end:n.token})):i("expand","...")?(a(),u.push(new Oe({start:s(),expression:Qt(),end:n.token}))):u.push(Qt(!1));return a(),u}var X=S(function(){return p("["),new gt({elements:H("]",!t.strict,!0)})}),z=S(function(e,t){return O(Me,e,t)}),W=S(function(){var e=n.token,r=!0,o=[];for(p("{");!i("punc","}")&&(r?r=!1:p(","),t.strict||!i("punc","}"));)if("expand"!=(e=n.token).type){var u,c=le();if(i("punc",":"))null===c?l(s()):(a(),u=Qt(!1));else{var f=ne(c,e);if(f){o.push(f);continue}u=new Wt({start:s(),name:c,end:s()})}i("operator","=")&&(a(),u=new ht({start:e,left:u,operator:"=",right:Qt(!1),end:s()})),o.push(new vt({start:e,quote:e.quote,key:c instanceof oe?c:""+c,value:u,end:s()}))}else a(),o.push(new Oe({start:e,expression:Qt(!1),end:s()}));return a(),new St({properties:o})});function $(e){var t,r,o,u,c=[];for(n.input.push_directives_stack(),n.input.add_directive("use strict"),"name"==n.token.type&&"extends"!=n.token.value&&(o=me(e===Ot?Kt:Ut)),e!==Ot||o||l(),"extends"==n.token.value&&(a(),u=Qt(!0)),p("{"),i("punc",";")&&a();!i("punc","}");)t=n.token,(r=ne(le(),t,!0))||l(),c.push(r),i("punc",";")&&a();return n.input.pop_directives_stack(),a(),new e({start:t,name:o,extends:u,properties:c,end:s()})}function ne(e,t,r){var o=function(e,t){return"string"==typeof e||"number"==typeof e?new Pt({start:t,name:""+e,end:s()}):(null===e&&l(),e)},a=!1,u=!1,c=!1,f=t;if(r&&"static"===e&&!i("punc","(")&&(u=!0,f=n.token,e=le()),"async"!==e||i("punc","(")||i("punc",",")||i("punc","}")||(a=!0,f=n.token,e=le()),null===e&&(c=!0,f=n.token,null===(e=le())&&l()),i("punc","("))return e=o(e,t),new yt({start:t,static:u,is_generator:c,async:a,key:e,quote:e instanceof Pt?f.quote:void 0,value:z(c,a),end:s()});if(f=n.token,"get"==e){if(!i("punc")||i("punc","["))return e=o(le(),t),new bt({start:t,static:u,key:e,quote:e instanceof Pt?f.quote:void 0,value:z(),end:s()})}else if("set"==e&&(!i("punc")||i("punc","[")))return e=o(le(),t),new Tt({start:t,static:u,key:e,quote:e instanceof Pt?f.quote:void 0,value:z(),end:s()})}function ie(e){function t(e){return new e({name:le(),start:s(),end:s()})}var r,o,u=e?Xt:qt,c=e?Ht:Yt,l=n.token;return e?r=t(u):o=t(c),i("name","as")?(a(),e?o=t(c):r=t(u)):e?o=new c(r):r=new u(o),new nt({start:l,foreign_name:r,name:o,end:s()})}function re(e,t){var i,r=e?Xt:qt,o=e?Ht:Yt,a=n.token,u=s();return t=t||new o({name:"*",start:a,end:u}),i=new r({name:"*",start:a,end:u}),new nt({start:a,foreign_name:i,name:t,end:u})}function ae(e){var t;if(i("punc","{")){for(a(),t=[];!i("punc","}");)t.push(ie(e)),i("punc",",")&&a();a()}else if(i("operator","*")){var n;a(),e&&i("name","as")&&(a(),n=me(e?Ht:qt)),t=[re(e,n)]}return t}function le(){var e=n.token;switch(e.type){case"punc":if("["===e.value){a();var t=Qt(!1);return p("]"),t}l(e);case"operator":if("*"===e.value)return a(),null;["delete","in","instanceof","new","typeof","void"].includes(e.value)||l(e);case"name":"yield"==e.value&&(m()?c(e,"Yield cannot be used as identifier inside generators"):q(r(),"punc",":")||q(r(),"punc","(")||!n.input.has_directive("use strict")||c(e,"Unexpected yield identifier inside strict mode"));case"string":case"num":case"big_int":case"keyword":case"atom":return a(),e.value;default:l(e)}}function fe(e){var t=n.token.value;return new("this"==t?jt:"super"==t?Zt:e)({name:String(t),start:n.token,end:n.token})}function pe(e){var t=e.name;m()&&"yield"==t&&c(e.start,"Yield cannot be used as identifier inside generators"),n.input.has_directive("use strict")&&("yield"==t&&c(e.start,"Unexpected yield identifier inside strict mode"),e instanceof wt&&("arguments"==t||"eval"==t)&&c(e.start,"Unexpected "+t+" in strict mode"))}function me(e,t){if(!i("name"))return t||u("Name expected"),null;var n=fe(e);return pe(n),a(),n}function De(e){for(var t=e.start,n=t.comments_before,i=D(t,"comments_before_length")?t.comments_before_length:n.length;--i>=0;){var r=n[i];if(/[@#]__PURE__/.test(r.value)){e.pure=r;break}}}var ye=function(e,t){var r,o=e.start;if(i("punc","."))return a(),ye(new lt({start:o,expression:e,property:(r=n.token,"name"!=r.type&&l(),a(),r.value),end:s()}),t);if(i("punc","[")){a();var u=Qt(!0);return p("]"),ye(new ft({start:o,expression:e,property:u,end:s()}),t)}if(t&&i("punc","(")){a();var c=new at({start:o,expression:e,args:Ve(),end:s()});return De(c),ye(c,!0)}return i("template_head")?ye(new ke({start:o,prefix:e,template_string:G(),end:s()}),t):e},Ve=S(function(){for(var e=[];!i("punc",")");)i("expand","...")?(a(),e.push(new Oe({start:s(),expression:Qt(!1),end:s()}))):e.push(Qt(!1)),i("punc",")")||(p(","),i("punc",")")&&t.ecma<8&&l());return a(),e}),Pe=function(e,t){var r=n.token;if("name"==r.type&&"await"==r.value){if(E())return a(),E()||u("Unexpected await expression outside async function",n.prev.line,n.prev.col,n.prev.pos),new _n({start:s(),end:n.token,expression:Pe(!0)});n.input.has_directive("use strict")&&c(n.token,"Unexpected await identifier inside strict mode")}if(i("operator")&&Z.has(r.value)){a(),A();var o=Ue(_t,r,Pe(e));return o.start=r,o.end=s(),o}for(var f=U(e,t);i("operator")&&Q.has(n.token.value)&&!_(n.token);)f instanceof we&&l(),(f=Ue(dt,n.token,f)).start=r,f.end=n.token,a();return f};function Ue(e,t,i){var r=t.value;switch(r){case"++":case"--":Ct(i)||u("Invalid use of "+r+" operator",t.line,t.col,t.pos);break;case"delete":i instanceof Wt&&n.input.has_directive("use strict")&&u("Calling delete on expression not allowed in strict mode",i.start.line,i.start.col,i.start.pos)}return new e({operator:r,expression:i})}var We=function(e,t,r){var o=i("operator")?n.token.value:null;"in"==o&&r&&(o=null),"**"==o&&e instanceof _t&&!q(e.start,"punc","(")&&"--"!==e.operator&&"++"!==e.operator&&l(e.start);var s=null!=o?ee[o]:null;if(null!=s&&(s>t||"**"===o&&t===s)){a();var u=We(Pe(!0),s,r);return We(new mt({start:e.start,left:e,operator:o,right:u,end:u.end}),t,r)}return e};var pt=function(e){var t=n.token,r=function(e){return We(Pe(!0,!0),0,e)}(e);if(i("operator","?")){a();var o=Qt(!1);return p(":"),new Et({start:t,condition:r,consequent:o,alternative:Qt(!1,e),end:s()})}return r};function Ct(e){return e instanceof ct||e instanceof Wt}function Mt(e){if(e instanceof St)e=new xe({start:e.start,names:e.properties.map(Mt),is_array:!1,end:e.end});else if(e instanceof gt){for(var t=[],n=0;n=0;)o+="this."+t[a]+" = props."+t[a]+";";var s=i&&new i;(s&&s.initialize||n&&n.initialize)&&(o+="this.initialize();"),o+="}}";var u=new Function(o)();if(s&&(u.prototype=s,u.BASE=i),i&&i.SUBCLASSES.push(u),u.prototype.CTOR=u,u.PROPS=t||null,u.SELF_PROPS=r,u.SUBCLASSES=[],e&&(u.prototype.TYPE=u.TYPE=e),n)for(a in n)D(n,a)&&("$"===a[0]?u[a.substr(1)]=n[a]:u.prototype[a]=n[a]);return u.DEFMETHOD=function(e,t){this.prototype[e]=t},u}var re=ie("Token","type value line col pos endline endcol endpos nlb comments_before comments_after file raw",{},null),oe=ie("Node","start end",{_clone:function(e){if(e){var t=this.clone();return t.transform(new En(function(e){if(e!==t)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){return e._visit(this)},walk:function(e){return this._walk(e)}},null);oe.warn_function=null,oe.warn=function(e,t){oe.warn_function&&oe.warn_function(_(e,t))};var ae=ie("Statement",null,{$documentation:"Base class of all statements"}),se=ie("Debugger",null,{$documentation:"Represents a debugger statement"},ae),ue=ie("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"}},ae),ce=ie("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){return e._visit(this,function(){this.body._walk(e)})}},ae);function le(e,t){var n=e.body;if(n instanceof oe)n._walk(t);else for(var i=0,r=n.length;i SymbolDef for all variables/functions defined in this scope",functions:"[Map/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"},get_defun_scope:function(){for(var e=this;e.is_block_scope();)e=e.parent_scope;return e},clone:function(e){var t=this._clone(e);return this.variables&&(t.variables=new Map(this.variables)),this.functions&&(t.functions=new Map(this.functions)),this.enclosed&&(t.enclosed=this.enclosed.slice()),t},pinned:function(){return this.uses_eval||this.uses_with}},pe),Ce=ie("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Map/S] a map of name -> SymbolDef for all undeclared names"},wrap_commonjs:function(e){var t=this.body,n="(function(exports){'$ORIG';})(typeof "+e+"=='undefined'?("+e+"={}):"+e+");";return n=(n=ne(n)).transform(new En(function(e){if(e instanceof ue&&"$ORIG"==e.value)return f.splice(t)}))},wrap_enclose:function(e){"string"!=typeof e&&(e="");var t=e.indexOf(":");t<0&&(t=e.length);var n=this.body;return ne(["(function(",e.slice(0,t),'){"$ORIG"})(',e.slice(t+1),")"].join("")).transform(new En(function(e){if(e instanceof ue&&"$ORIG"==e.value)return f.splice(n)}))}},ye),Oe=ie("Expansion","expression",{$documentation:"An expandible argument, such as ...rest, a splat, such as [1,2,...all], or an expansion in a variable declaration, such as var [first, ...rest] = list",$propdoc:{expression:"[AST_Node] the thing to be expanded"},_walk:function(e){var t=this;return e._visit(this,function(){t.expression.walk(e)})}}),Fe=ie("Lambda","name argnames uses_arguments is_generator async",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg|AST_Destructuring|AST_Expansion|AST_DefaultAssign*] array of function arguments, destructurings, or expanding arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array",is_generator:"[boolean] is this a generator method",async:"[boolean] is this method async"},args_as_names:function(){for(var e=[],t=0;t b)"},Fe),Ne=ie("Defun","inlined",{$documentation:"A function definition"},Fe),xe=ie("Destructuring","names is_array",{$documentation:"A destructuring of several names. Used in destructuring assignment and with destructuring function argument names",$propdoc:{names:"[AST_Node*] Array of properties or elements",is_array:"[Boolean] Whether the destructuring represents an object or array"},_walk:function(e){return e._visit(this,function(){this.names.forEach(function(t){t._walk(e)})})},all_symbols:function(){var e=[];return this.walk(new mn(function(t){t instanceof Mt&&e.push(t),t instanceof Oe&&e.push(t.expression)})),e}}),ke=ie("PrefixedTemplateString","template_string prefix",{$documentation:"A templatestring with a prefix, such as String.raw`foobarbaz`",$propdoc:{template_string:"[AST_TemplateString] The template string",prefix:"[AST_SymbolRef|AST_PropAccess] The prefix, which can be a symbol such as `foo` or a dotted expression such as `String.raw`."},_walk:function(e){this.prefix._walk(e),this.template_string._walk(e)}}),Ie=ie("TemplateString","segments",{$documentation:"A template string literal",$propdoc:{segments:"[AST_Node*] One or more segments, starting with AST_TemplateSegment. AST_Node may follow AST_TemplateSegment, but each AST_Node must be followed by AST_TemplateSegment."},_walk:function(e){return e._visit(this,function(){this.segments.forEach(function(t){t._walk(e)})})}}),Le=ie("TemplateSegment","value raw",{$documentation:"A segment of a template string literal",$propdoc:{value:"Content of the segment",raw:"Raw content of the segment"}}),Ve=ie("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},ae),Pe=ie("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){return e._visit(this,this.value&&function(){this.value._walk(e)})}},Ve),Be=ie("Return",null,{$documentation:"A `return` statement"},Pe),Ke=ie("Throw",null,{$documentation:"A `throw` statement"},Pe),Ue=ie("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){return e._visit(this,this.label&&function(){this.label._walk(e)})}},Ve),Ge=ie("Break",null,{$documentation:"A `break` statement"},Ue),He=ie("Continue",null,{$documentation:"A `continue` statement"},Ue),Xe=ie("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){return e._visit(this,function(){this.condition._walk(e),this.body._walk(e),this.alternative&&this.alternative._walk(e)})}},me),ze=ie("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),le(this,e)})}},pe),We=ie("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},pe),Ye=ie("Default",null,{$documentation:"A `default` switch branch"},We),qe=ie("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(e){return e._visit(this,function(){this.expression._walk(e),le(this,e)})}},We),$e=ie("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){return e._visit(this,function(){le(this,e),this.bcatch&&this.bcatch._walk(e),this.bfinally&&this.bfinally._walk(e)})}},pe),je=ie("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch|AST_Destructuring|AST_Expansion|AST_DefaultAssign] symbol for the exception"},_walk:function(e){return e._visit(this,function(){this.argname&&this.argname._walk(e),le(this,e)})}},pe),Ze=ie("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},pe),Qe=ie("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(e){return e._visit(this,function(){for(var t=this.definitions,n=0,i=t.length;n a`"},mt),gt=ie("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(e){return e._visit(this,function(){for(var t=this.elements,n=0,i=t.length;n=0;){var i=t[n];if(i instanceof e)return i}}has_directive(e){var t=this.directives[e];if(t)return t;var n=this.stack[this.stack.length-1];if(n instanceof ye&&n.body)for(var i=0;i=0;){if((i=t[n])instanceof Ee&&i.label.name==e.label.name)return i.body}else for(n=t.length;--n>=0;){var i;if((i=t[n])instanceof he||e instanceof Ge&&i instanceof ze)return i}}}class En extends mn{constructor(e,t){super(),this.before=e,this.after=t}}var hn=Object.freeze({AST_Accessor:Me,AST_Array:gt,AST_Arrow:we,AST_Assign:ht,AST_Atom:rn,AST_Await:_n,AST_BigInt:tn,AST_Binary:mt,AST_Block:pe,AST_BlockStatement:_e,AST_Boolean:ln,AST_Break:Ge,AST_Call:at,AST_Case:qe,AST_Catch:je,AST_Class:Ct,AST_ClassExpression:Ft,AST_ConciseMethod:yt,AST_Conditional:Et,AST_Const:tt,AST_Constant:Qt,AST_Continue:He,AST_Debugger:se,AST_Default:Ye,AST_DefaultAssign:Dt,AST_DefClass:Ot,AST_Definitions:Qe,AST_Defun:Ne,AST_Destructuring:xe,AST_Directive:ue,AST_Do:ge,AST_Dot:lt,AST_DWLoop:De,AST_EmptyStatement:de,AST_Exit:Pe,AST_Expansion:Oe,AST_Export:rt,AST_False:fn,AST_Finally:Ze,AST_For:Ae,AST_ForIn:ve,AST_ForOf:Te,AST_Function:Re,AST_Hole:un,AST_If:Xe,AST_Import:it,AST_Infinity:cn,AST_IterationStatement:he,AST_Jump:Ve,AST_Label:zt,AST_LabeledStatement:Ee,AST_LabelRef:$t,AST_Lambda:Fe,AST_Let:et,AST_LoopControl:Ue,AST_NameMapping:nt,AST_NaN:an,AST_New:st,AST_NewTarget:Rt,AST_Node:oe,AST_Null:on,AST_Number:en,AST_Object:St,AST_ObjectGetter:bt,AST_ObjectKeyVal:vt,AST_ObjectProperty:At,AST_ObjectSetter:Tt,AST_PrefixedTemplateString:ke,AST_PropAccess:ct,AST_RegExp:nn,AST_Return:Be,AST_Scope:ye,AST_Sequence:ut,AST_SimpleStatement:ce,AST_Statement:ae,AST_StatementWithBody:me,AST_String:Jt,AST_Sub:ft,AST_Super:Zt,AST_Switch:ze,AST_SwitchBranch:We,AST_Symbol:Mt,AST_SymbolBlockDeclaration:xt,AST_SymbolCatch:Gt,AST_SymbolClass:Ut,AST_SymbolConst:kt,AST_SymbolDeclaration:wt,AST_SymbolDefClass:Kt,AST_SymbolDefun:Vt,AST_SymbolExport:Yt,AST_SymbolExportForeign:qt,AST_SymbolFunarg:Lt,AST_SymbolImport:Ht,AST_SymbolImportForeign:Xt,AST_SymbolLambda:Bt,AST_SymbolLet:It,AST_SymbolMethod:Pt,AST_SymbolRef:Wt,AST_SymbolVar:Nt,AST_TemplateSegment:Le,AST_TemplateString:Ie,AST_This:jt,AST_Throw:Ke,AST_Token:re,AST_Toplevel:Ce,AST_True:pn,AST_Try:$e,AST_Unary:pt,AST_UnaryPostfix:dt,AST_UnaryPrefix:_t,AST_Undefined:sn,AST_Var:Je,AST_VarDef:ot,AST_While:Se,AST_With:be,AST_Yield:dn,TreeTransformer:En,TreeWalker:mn,walk_body:le});function Dn(e,t){e.DEFMETHOD("transform",function(e,n){var i,r;return e.push(this),e.before&&(i=e.before(this,t,n)),void 0===i&&(t(i=this,e),e.after&&void 0!==(r=e.after(i,n))&&(i=r)),e.pop(),i})}function gn(e,t){return f(e,function(e){return e.transform(t,!0)})}function Sn(e){let t=e.parent(-1);for(let n,i=0;n=e.parent(i);i++){if(n instanceof ae&&n.body===t)return!0;if(!(n instanceof ut&&n.expressions[0]===t||"Call"===n.TYPE&&n.expression===t||n instanceof lt&&n.expression===t||n instanceof ft&&n.expression===t||n instanceof Et&&n.condition===t||n instanceof mt&&n.left===t||n instanceof dt&&n.expression===t))return!1;t=n}}Dn(oe,a),Dn(Ee,function(e,t){e.label=e.label.transform(t),e.body=e.body.transform(t)}),Dn(ce,function(e,t){e.body=e.body.transform(t)}),Dn(pe,function(e,t){e.body=gn(e.body,t)}),Dn(ge,function(e,t){e.body=e.body.transform(t),e.condition=e.condition.transform(t)}),Dn(Se,function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t)}),Dn(Ae,function(e,t){e.init&&(e.init=e.init.transform(t)),e.condition&&(e.condition=e.condition.transform(t)),e.step&&(e.step=e.step.transform(t)),e.body=e.body.transform(t)}),Dn(ve,function(e,t){e.init=e.init.transform(t),e.object=e.object.transform(t),e.body=e.body.transform(t)}),Dn(be,function(e,t){e.expression=e.expression.transform(t),e.body=e.body.transform(t)}),Dn(Pe,function(e,t){e.value&&(e.value=e.value.transform(t))}),Dn(Ue,function(e,t){e.label&&(e.label=e.label.transform(t))}),Dn(Xe,function(e,t){e.condition=e.condition.transform(t),e.body=e.body.transform(t),e.alternative&&(e.alternative=e.alternative.transform(t))}),Dn(ze,function(e,t){e.expression=e.expression.transform(t),e.body=gn(e.body,t)}),Dn(qe,function(e,t){e.expression=e.expression.transform(t),e.body=gn(e.body,t)}),Dn($e,function(e,t){e.body=gn(e.body,t),e.bcatch&&(e.bcatch=e.bcatch.transform(t)),e.bfinally&&(e.bfinally=e.bfinally.transform(t))}),Dn(je,function(e,t){e.argname&&(e.argname=e.argname.transform(t)),e.body=gn(e.body,t)}),Dn(Qe,function(e,t){e.definitions=gn(e.definitions,t)}),Dn(ot,function(e,t){e.name=e.name.transform(t),e.value&&(e.value=e.value.transform(t))}),Dn(xe,function(e,t){e.names=gn(e.names,t)}),Dn(Fe,function(e,t){e.name&&(e.name=e.name.transform(t)),e.argnames=gn(e.argnames,t),e.body instanceof oe?e.body=e.body.transform(t):e.body=gn(e.body,t)}),Dn(at,function(e,t){e.expression=e.expression.transform(t),e.args=gn(e.args,t)}),Dn(ut,function(e,t){e.expressions=gn(e.expressions,t)}),Dn(lt,function(e,t){e.expression=e.expression.transform(t)}),Dn(ft,function(e,t){e.expression=e.expression.transform(t),e.property=e.property.transform(t)}),Dn(dn,function(e,t){e.expression&&(e.expression=e.expression.transform(t))}),Dn(_n,function(e,t){e.expression=e.expression.transform(t)}),Dn(pt,function(e,t){e.expression=e.expression.transform(t)}),Dn(mt,function(e,t){e.left=e.left.transform(t),e.right=e.right.transform(t)}),Dn(Et,function(e,t){e.condition=e.condition.transform(t),e.consequent=e.consequent.transform(t),e.alternative=e.alternative.transform(t)}),Dn(gt,function(e,t){e.elements=gn(e.elements,t)}),Dn(St,function(e,t){e.properties=gn(e.properties,t)}),Dn(At,function(e,t){e.key instanceof oe&&(e.key=e.key.transform(t)),e.value=e.value.transform(t)}),Dn(Ct,function(e,t){e.name&&(e.name=e.name.transform(t)),e.extends&&(e.extends=e.extends.transform(t)),e.properties=gn(e.properties,t)}),Dn(Oe,function(e,t){e.expression=e.expression.transform(t)}),Dn(nt,function(e,t){e.foreign_name=e.foreign_name.transform(t),e.name=e.name.transform(t)}),Dn(it,function(e,t){e.imported_name&&(e.imported_name=e.imported_name.transform(t)),e.imported_names&&gn(e.imported_names,t),e.module_name=e.module_name.transform(t)}),Dn(rt,function(e,t){e.exported_definition&&(e.exported_definition=e.exported_definition.transform(t)),e.exported_value&&(e.exported_value=e.exported_value.transform(t)),e.exported_names&&gn(e.exported_names,t),e.module_name&&(e.module_name=e.module_name.transform(t))}),Dn(Ie,function(e,t){e.segments=gn(e.segments,t)}),Dn(ke,function(e,t){e.prefix=e.prefix.transform(t),e.template_string=e.template_string.transform(t)});var An=/^$|[;{][\s\n]*$/;const vn=10,Tn=32;function bn(e){return"comment2"==e.type&&/@preserve|@license|@cc_on/i.test(e.value)}function yn(e){var t=!e;void 0===(e=o(e,{ascii_only:!1,beautify:!1,braces:!1,comments:!1,ecma:5,ie8:!1,indent_level:4,indent_start:0,inline_script:!0,keep_quoted_props:!1,max_line_len:!1,preamble:null,quote_keys:!1,quote_style:0,safari10:!1,semicolons:!0,shebang:!0,shorthand:void 0,source_map:null,webkit:!1,width:80,wrap_iife:!1},!0)).shorthand&&(e.shorthand=e.ecma>5);var n=s;if(e.comments){var i=e.comments;if("string"==typeof e.comments&&/^\/.*\/[a-zA-Z]*$/.test(e.comments)){var r=e.comments.lastIndexOf("/");i=new RegExp(e.comments.substr(1,r-1),e.comments.substr(r+1))}n=i instanceof RegExp?function(e){return"comment5"!=e.type&&i.test(e.value)}:"function"==typeof i?function(e){return"comment5"!=e.type&&i(this,e)}:"some"===i?bn:u}var c=0,l=0,f=1,p=0,_="",d=e.ascii_only?function(t,n){return e.ecma>=6&&(t=t.replace(/[\ud800-\udbff][\udc00-\udfff]/g,function(e){return"\\u{"+function(e,t){return K(e.charAt(t))?65536+(e.charCodeAt(t)-55296<<10)+e.charCodeAt(t+1)-56320:e.charCodeAt(t)}(e,0).toString(16)+"}"})),t.replace(/[\u0000-\u001f\u007f-\uffff]/g,function(e){var t=e.charCodeAt(0).toString(16);if(t.length<=2&&!n){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t})}:function(e){for(var t="",n=0,i=e.length;nr?o():a()}}(t,n);return e.inline_script&&(i=(i=(i=i.replace(/<\x2f(script)([>\/\t\n\f\r ])/gi,"<\\/$1$2")).replace(/\x3c!--/g,"\\x3c!--")).replace(/--\x3e/g,"--\\x3e")),i}var h,D,g=!1,S=!1,A=!1,v=0,T=!1,b=!1,y=-1,C="",O=e.source_map&&[],F=O?function(){O.forEach(function(t){try{e.source_map.add(t.token.file,t.line,t.col,t.token.line,t.token.col,t.name||"name"!=t.token.type?t.name:t.token.value)}catch(e){null!=t.token.file&&oe.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:t.token.file,line:t.token.line,col:t.token.col,cline:t.line,ccol:t.col,name:t.name||""})}}),O=[]}:a,M=e.max_line_len?function(){if(l>e.max_line_len){if(v){var t=_.slice(0,v),n=_.slice(v);if(O){var i=n.length-l;O.forEach(function(e){e.line++,e.col+=i})}_=t+"\n"+n,f++,p++,l=n.length}l>e.max_line_len&&oe.warn("Output exceeds {max_line_len} characters",e)}v&&(v=0,F())}:a,R=E("( [ + * / - , . `");function w(t){var n=B(t=String(t),0);T&&n&&(T=!1,"\n"!==n&&(w("\n"),x())),b&&n&&(b=!1,/[\s;})]/.test(n)||N()),y=-1;var i=C.charAt(C.length-1);A&&(A=!1,(":"!==i||"}"!==n)&&(n&&";}".includes(n)||";"===i)||(e.semicolons||R.has(n)?(_+=";",l++,p++):(M(),l>0&&(_+="\n",p++,f++,l=0),/^\s+$/.test(t)&&(A=!0)),e.beautify||(S=!1))),S&&((X(i)&&(X(n)||"\\"==n)||"/"==n&&n==i||("+"==n||"-"==n)&&n==C)&&(_+=" ",l++,p++),S=!1),h&&(O.push({token:h,name:D,line:f,col:l}),h=!1,v||F()),_+=t,g="("==t[t.length-1],p+=t.length;var r=t.split(/\r?\n/),o=r.length-1;f+=o,l+=r[0].length,o>0&&(M(),l=r[o].length),C=t}var N=e.beautify?function(){w(" ")}:function(){S=!0},x=e.beautify?function(t){var n;e.beautify&&w((n=t?.5:0," ".repeat(e.indent_start+c-n*e.indent_level)))}:a,k=e.beautify?function(e,t){!0===e&&(e=P());var n=c;c=e;var i=t();return c=n,i}:function(e,t){return t()},I=e.beautify?function(){if(y<0)return w("\n");"\n"!=_[y]&&(_=_.slice(0,y)+"\n"+_.slice(y),p++,f++),y++}:e.max_line_len?function(){M(),v=_.length}:a,L=e.beautify?function(){w(";")}:function(){A=!0};function V(){A=!1,w(";")}function P(){return c+e.indent_level}function G(){return v&&M(),_}function H(){let e=_.length-1;for(;e>=0;){const t=_.charCodeAt(e);if(t===vn)return!0;if(t!==Tn)return!1;e--}return!0}var z=[];return{get:G,toString:G,indent:x,indentation:function(){return c},current_width:function(){return l-c},should_break:function(){return e.width&&this.current_width()>=e.width},has_parens:function(){return g},newline:I,print:w,star:function(){w("*")},space:N,comma:function(){w(","),N()},colon:function(){w(":"),N()},last:function(){return C},semicolon:L,force_semicolon:V,to_utf8:d,print_name:function(e){w(function(e){return e=e.toString(),e=d(e,!0)}(e))},print_string:function(e,t,n){var i=m(e,t);!0!==n||i.includes("\\")||(An.test(_)||V(),V()),w(i)},print_template_string_chars:function(e){var t=m(e,"`").replace(/\${/g,"\\${");return w(t.substr(1,t.length-2))},encode_string:m,next_indent:P,with_indent:k,with_block:function(e){var t;return w("{"),I(),k(P(),function(){t=e()}),x(),w("}"),t},with_parens:function(e){w("(");var t=e();return w(")"),t},with_square:function(e){w("[");var t=e();return w("]"),t},add_mapping:O?function(e,t){h=e,D=t}:a,option:function(t){return e[t]},prepend_comments:t?a:function(t){var i=this,r=t.start;if(r&&(!r.comments_before||r.comments_before._dumped!==i)){var o=r.comments_before;if(o||(o=r.comments_before=[]),o._dumped=i,t instanceof Pe&&t.value){var a=new mn(function(e){var t=a.parent();if(!(t instanceof Pe||t instanceof mt&&t.left===e||"Call"==t.TYPE&&t.expression===e||t instanceof Et&&t.condition===e||t instanceof lt&&t.expression===e||t instanceof ut&&t.expressions[0]===e||t instanceof ft&&t.expression===e||t instanceof dt))return!0;if(e.start){var n=e.start.comments_before;n&&n._dumped!==i&&(n._dumped=i,o=o.concat(n))}});a.push(t),t.value.walk(a)}if(0==p){o.length>0&&e.shebang&&"comment5"==o[0].type&&(w("#!"+o.shift().value+"\n"),x());var s=e.preamble;s&&w(s.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"))}if(0!=(o=o.filter(n,t)).length){var u=H();o.forEach(function(e,t){u||(e.nlb?(w("\n"),x(),u=!0):t>0&&N()),/comment[134]/.test(e.type)?(w("//"+e.value.replace(/[@#]__PURE__/g," ")+"\n"),x(),u=!0):"comment2"==e.type&&(w("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),u=!1)}),u||(r.nlb?(w("\n"),x()):N())}}},append_comments:t||n===s?a:function(e,t){var i=e.end;if(i){var r=i[t?"comments_before":"comments_after"];if(r&&r._dumped!==this&&(e instanceof ae||r.every(e=>!/comment[134]/.test(e.type)))){r._dumped=this;var o=_.length;r.filter(n,e).forEach(function(e,n){b=!1,T?(w("\n"),x(),T=!1):e.nlb&&(n>0||!H())?(w("\n"),x()):(n>0||!t)&&N(),/comment[134]/.test(e.type)?(w("//"+e.value.replace(/[@#]__PURE__/g," ")),T=!0):"comment2"==e.type&&(w("/*"+e.value.replace(/[@#]__PURE__/g," ")+"*/"),b=!0)}),_.length>o&&(y=o)}}},line:function(){return f},col:function(){return l},pos:function(){return p},push_node:function(e){z.push(e)},pop_node:function(){return z.pop()},parent:function(e){return z[z.length-2-(e||0)]}}}function Cn(e,t,n){this.name=t.name,this.orig=[t],this.init=n,this.eliminated=0,this.scope=e,this.references=[],this.replaced=0,this.global=!1,this.export=!1,this.mangled_name=null,this.undeclared=!1,this.id=Cn.next_id++}!function(){function e(e,t){e.DEFMETHOD("_codegen",t)}var t=!1,n=null,i=null;function r(e,t){Array.isArray(e)?e.forEach(function(e){r(e,t)}):e.DEFMETHOD("needs_parens",t)}function o(e,n,i,r){var o=e.length-1;t=r,e.forEach(function(e,r){!0!==t||e instanceof ue||e instanceof de||e instanceof ce&&e.body instanceof Jt||(t=!1),e instanceof de||(i.indent(),e.print(i),r==o&&n||(i.newline(),n&&i.newline())),!0===t&&e instanceof ce&&e.body instanceof Jt&&(t=!1)}),t=!1}function u(e,t){t.print("{"),t.with_indent(t.next_indent(),function(){t.append_comments(e,!0)}),t.print("}")}function c(e,t,n){e.body.length>0?t.with_block(function(){o(e.body,!1,t,n)}):u(e,t)}function l(e,t,n){var i=!1;n&&e.walk(new mn(function(e){return!!(i||e instanceof ye)||(e instanceof mt&&"in"==e.operator?(i=!0,!0):void 0)})),e.print(t,i)}function f(e,t,n){n.option("quote_keys")?n.print_string(e):""+ +e==e&&e>=0?n.print(d(e)):(v.has(e)?!n.option("ie8"):z(e))?t&&n.option("keep_quoted_props")?n.print_string(e,t):n.print_name(e):n.print_string(e,t)}function p(e,t){t.option("braces")?m(e,t):!e||e instanceof de?t.force_semicolon():e.print(t)}function _(e,t){return e.args.length>0||t.option("beautify")}function d(e){var t,n,i,r=e.toString(10).replace(/^0\./,".").replace("e+","e"),o=[r];return Math.floor(e)===e&&(e<0?o.push("-0x"+(-e).toString(16).toLowerCase()):o.push("0x"+e.toString(16).toLowerCase())),(t=/^\.0+/.exec(r))?(n=t[0].length,i=r.slice(n),o.push(i+"e-"+(i.length+n-1))):(t=/0+$/.exec(r))?(n=t[0].length,o.push(r.slice(0,-n)+"e"+n)):(t=/^(\d)\.(\d+)e(-?\d+)$/.exec(r))&&o.push(t[1]+t[2]+"e"+(t[3]-t[2].length)),function(e){for(var t=e[0],n=t.length,i=1;io||i==o&&(this===t.right||"**"==n))return!0}}),r(dn,function(e){var t=e.parent();return t instanceof mt&&"="!==t.operator||(t instanceof at&&t.expression===this||(t instanceof Et&&t.condition===this||(t instanceof pt||(t instanceof ct&&t.expression===this||void 0))))}),r(ct,function(e){var t=e.parent();if(t instanceof st&&t.expression===this){var n=!1;return this.walk(new mn(function(e){return!!(n||e instanceof ye)||(e instanceof at?(n=!0,!0):void 0)})),n}}),r(at,function(e){var t,n=e.parent();return!!(n instanceof st&&n.expression===this||n instanceof rt&&n.is_default&&this.expression instanceof Re)||this.expression instanceof Re&&n instanceof ct&&n.expression===this&&(t=e.parent(1))instanceof ht&&t.left===n}),r(st,function(e){var t=e.parent();if(!_(this,e)&&(t instanceof ct||t instanceof at&&t.expression===this))return!0}),r(en,function(e){var t=e.parent();if(t instanceof ct&&t.expression===this){var n=this.getValue();if(n<0||/^0/.test(d(n)))return!0}}),r(tn,function(e){var t=e.parent();if(t instanceof ct&&t.expression===this&&this.getValue().startsWith("-"))return!0}),r([ht,Et],function(e){var t=e.parent();return t instanceof pt||(t instanceof mt&&!(t instanceof ht)||(t instanceof at&&t.expression===this||(t instanceof Et&&t.condition===this||(t instanceof ct&&t.expression===this||(this instanceof ht&&this.left instanceof xe&&!1===this.left.is_array||void 0)))))}),e(ue,function(e,t){t.print_string(e.value,e.quote),t.semicolon()}),e(Oe,function(e,t){t.print("..."),e.expression.print(t)}),e(xe,function(e,t){t.print(e.is_array?"[":"{");var n=e.names.length;e.names.forEach(function(e,i){i>0&&t.comma(),e.print(t),i==n-1&&e instanceof un&&t.comma()}),t.print(e.is_array?"]":"}")}),e(se,function(e,t){t.print("debugger"),t.semicolon()}),me.DEFMETHOD("_do_print_body",function(e){p(this.body,e)}),e(ae,function(e,t){e.body.print(t),t.semicolon()}),e(Ce,function(e,t){o(e.body,!0,t,!0),t.print("")}),e(Ee,function(e,t){e.label.print(t),t.colon(),e.body.print(t)}),e(ce,function(e,t){e.body.print(t),t.semicolon()}),e(_e,function(e,t){c(e,t)}),e(de,function(e,t){t.semicolon()}),e(ge,function(e,t){t.print("do"),t.space(),m(e.body,t),t.space(),t.print("while"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.semicolon()}),e(Se,function(e,t){t.print("while"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.space(),e._do_print_body(t)}),e(Ae,function(e,t){t.print("for"),t.space(),t.with_parens(function(){e.init?(e.init instanceof Qe?e.init.print(t):l(e.init,t,!0),t.print(";"),t.space()):t.print(";"),e.condition?(e.condition.print(t),t.print(";"),t.space()):t.print(";"),e.step&&e.step.print(t)}),t.space(),e._do_print_body(t)}),e(ve,function(e,t){t.print("for"),e.await&&(t.space(),t.print("await")),t.space(),t.with_parens(function(){e.init.print(t),t.space(),t.print(e instanceof Te?"of":"in"),t.space(),e.object.print(t)}),t.space(),e._do_print_body(t)}),e(be,function(e,t){t.print("with"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space(),e._do_print_body(t)}),Fe.DEFMETHOD("_do_print",function(e,t){var n=this;t||(n.async&&(e.print("async"),e.space()),e.print("function"),n.is_generator&&e.star(),n.name&&e.space()),n.name instanceof Mt?n.name.print(e):t&&n.name instanceof oe&&e.with_square(function(){n.name.print(e)}),e.with_parens(function(){n.argnames.forEach(function(t,n){n&&e.comma(),t.print(e)})}),e.space(),c(n,e,!0)}),e(Fe,function(e,t){e._do_print(t)}),e(ke,function(e,t){var n=e.prefix,i=n instanceof we||n instanceof mt||n instanceof Et||n instanceof ut||n instanceof pt;i&&t.print("("),e.prefix.print(t),i&&t.print(")"),e.template_string.print(t)}),e(Ie,function(e,t){var n=t.parent()instanceof ke;t.print("`");for(var i=0;i"),e.space(),t.body instanceof oe?t.body.print(e):c(t,e),i&&e.print(")")}),Pe.DEFMETHOD("_do_print",function(e,t){e.print(t),this.value&&(e.space(),this.value.print(e)),e.semicolon()}),e(Be,function(e,t){e._do_print(t,"return")}),e(Ke,function(e,t){e._do_print(t,"throw")}),e(dn,function(e,t){var n=e.is_star?"*":"";t.print("yield"+n),e.expression&&(t.space(),e.expression.print(t))}),e(_n,function(e,t){t.print("await"),t.space();var n=e.expression,i=!(n instanceof at||n instanceof Wt||n instanceof ct||n instanceof pt||n instanceof Qt);i&&t.print("("),e.expression.print(t),i&&t.print(")")}),Ue.DEFMETHOD("_do_print",function(e,t){e.print(t),this.label&&(e.space(),this.label.print(e)),e.semicolon()}),e(Ge,function(e,t){e._do_print(t,"break")}),e(He,function(e,t){e._do_print(t,"continue")}),e(Xe,function(e,t){t.print("if"),t.space(),t.with_parens(function(){e.condition.print(t)}),t.space(),e.alternative?(!function(e,t){var n=e.body;if(t.option("braces")||t.option("ie8")&&n instanceof ge)return m(n,t);if(!n)return t.force_semicolon();for(;;)if(n instanceof Xe){if(!n.alternative)return void m(e.body,t);n=n.alternative}else{if(!(n instanceof me))break;n=n.body}p(e.body,t)}(e,t),t.space(),t.print("else"),t.space(),e.alternative instanceof Xe?e.alternative.print(t):p(e.alternative,t)):e._do_print_body(t)}),e(ze,function(e,t){t.print("switch"),t.space(),t.with_parens(function(){e.expression.print(t)}),t.space();var n=e.body.length-1;n<0?u(e,t):t.with_block(function(){e.body.forEach(function(e,i){t.indent(!0),e.print(t),i0&&t.newline()})})}),We.DEFMETHOD("_do_print_body",function(e){e.newline(),this.body.forEach(function(t){e.indent(),t.print(e),e.newline()})}),e(Ye,function(e,t){t.print("default:"),e._do_print_body(t)}),e(qe,function(e,t){t.print("case"),t.space(),e.expression.print(t),t.print(":"),e._do_print_body(t)}),e($e,function(e,t){t.print("try"),t.space(),c(e,t),e.bcatch&&(t.space(),e.bcatch.print(t)),e.bfinally&&(t.space(),e.bfinally.print(t))}),e(je,function(e,t){t.print("catch"),e.argname&&(t.space(),t.with_parens(function(){e.argname.print(t)})),t.space(),c(e,t)}),e(Ze,function(e,t){t.print("finally"),t.space(),c(e,t)}),Qe.DEFMETHOD("_do_print",function(e,t){e.print(t),e.space(),this.definitions.forEach(function(t,n){n&&e.comma(),t.print(e)});var n=e.parent();(!(n instanceof Ae||n instanceof ve)||n&&n.init!==this)&&e.semicolon()}),e(et,function(e,t){e._do_print(t,"let")}),e(Je,function(e,t){e._do_print(t,"var")}),e(tt,function(e,t){e._do_print(t,"const")}),e(it,function(e,t){t.print("import"),t.space(),e.imported_name&&e.imported_name.print(t),e.imported_name&&e.imported_names&&(t.print(","),t.space()),e.imported_names&&(1===e.imported_names.length&&"*"===e.imported_names[0].foreign_name.name?e.imported_names[0].print(t):(t.print("{"),e.imported_names.forEach(function(n,i){t.space(),n.print(t),i0&&(e.comma(),e.should_break()&&(e.newline(),e.indent())),t.print(e)})}),e(ut,function(e,t){e._do_print(t)}),e(lt,function(e,t){var n=e.expression;n.print(t);var i=e.property;t.option("ie8")&&v.has(i)?(t.print("["),t.add_mapping(e.end),t.print_string(i),t.print("]")):(n instanceof en&&n.getValue()>=0&&(/[xa-f.)]/i.test(t.last())||t.print(".")),t.print("."),t.add_mapping(e.end),t.print_name(i))}),e(ft,function(e,t){e.expression.print(t),t.print("["),e.property.print(t),t.print("]")}),e(_t,function(e,t){var n=e.operator;t.print(n),(/^[a-z]/i.test(n)||/[+-]$/.test(n)&&e.expression instanceof _t&&/^[+-]/.test(e.expression.operator))&&t.space(),e.expression.print(t)}),e(dt,function(e,t){e.expression.print(t),t.print(e.operator)}),e(mt,function(e,t){var n=e.operator;e.left.print(t),">"==n[0]&&e.left instanceof dt&&"--"==e.left.operator?t.print(" "):t.space(),t.print(n),("<"==n||"<<"==n)&&e.right instanceof _t&&"!"==e.right.operator&&e.right.expression instanceof _t&&"--"==e.right.expression.operator?t.print(" "):t.space(),e.right.print(t)}),e(Et,function(e,t){e.condition.print(t),t.space(),t.print("?"),t.space(),e.consequent.print(t),t.space(),t.colon(),e.alternative.print(t)}),e(gt,function(e,t){t.with_square(function(){var n=e.elements,i=n.length;i>0&&t.space(),n.forEach(function(e,n){n&&t.comma(),e.print(t),n===i-1&&e instanceof un&&t.comma()}),i>0&&t.space()})}),e(St,function(e,t){e.properties.length>0?t.with_block(function(){e.properties.forEach(function(e,n){n&&(t.print(","),t.newline()),t.indent(),e.print(t)}),t.newline()}):u(e,t)}),e(Ct,function(e,t){if(t.print("class"),t.space(),e.name&&(e.name.print(t),t.space()),e.extends){var n=!(e.extends instanceof Wt||e.extends instanceof ct||e.extends instanceof Ft||e.extends instanceof Re);t.print("extends"),n?t.print("("):t.space(),e.extends.print(t),n?t.print(")"):t.space()}e.properties.length>0?t.with_block(function(){e.properties.forEach(function(e,n){n&&t.newline(),t.indent(),e.print(t)}),t.newline()}):t.print("{}")}),e(Rt,function(e,t){t.print("new.target")}),e(vt,function(e,t){function n(e){var t=e.definition();return t?t.mangled_name||t.name:e.name}var i=t.option("shorthand");i&&e.value instanceof Mt&&z(e.key)&&n(e.value)===e.key&&!v.has(e.key)?f(e.key,e.quote,t):i&&e.value instanceof Dt&&e.value.left instanceof Mt&&z(e.key)&&n(e.value.left)===e.key?(f(e.key,e.quote,t),t.space(),t.print("="),t.space(),e.value.right.print(t)):(e.key instanceof oe?t.with_square(function(){e.key.print(t)}):f(e.key,e.quote,t),t.colon(),e.value.print(t))}),At.DEFMETHOD("_print_getter_setter",function(e,t){var n=this;n.static&&(t.print("static"),t.space()),e&&(t.print(e),t.space()),n.key instanceof Pt?f(n.key.name,n.quote,t):t.with_square(function(){n.key.print(t)}),n.value._do_print(t,!0)}),e(Tt,function(e,t){e._print_getter_setter("set",t)}),e(bt,function(e,t){e._print_getter_setter("get",t)}),e(yt,function(e,t){var n;e.is_generator&&e.async?n="async*":e.is_generator?n="*":e.async&&(n="async"),e._print_getter_setter(n,t)}),Mt.DEFMETHOD("_do_print",function(e){var t=this.definition();e.print_name(t?t.mangled_name||t.name:this.name)}),e(Mt,function(e,t){e._do_print(t)}),e(un,a),e(jt,function(e,t){t.print("this")}),e(Zt,function(e,t){t.print("super")}),e(Qt,function(e,t){t.print(e.getValue())}),e(Jt,function(e,n){n.print_string(e.getValue(),e.quote,t)}),e(en,function(e,t){i&&e.start&&null!=e.start.raw?t.print(e.start.raw):t.print(d(e.getValue()))}),e(tn,function(e,t){t.print(e.getValue()+"n")}),e(nn,function(e,t){var n=e.getValue().toString();n=t.to_utf8(n),t.print(n);var i=t.parent();i instanceof mt&&/^in/.test(i.operator)&&i.left===e&&t.print(" ")}),E([oe,Ee,Ce],a),E([gt,_e,je,Ct,Qt,se,Qe,ue,Ze,Ve,Fe,st,St,me,Mt,ze,We,$e],function(e){e.add_mapping(this.start)}),E([bt,Tt],function(e){e.add_mapping(this.start,this.key.name)}),E([At],function(e){e.add_mapping(this.start,this.key)})}(),Cn.next_id=1;var On=1,Fn=2;function Mn(e,t){var n=e.enclosed;e:for(;;){var r=Rn(++e.cname);if(!v.has(r)&&!i(r,t.reserved)){for(var o=n.length;--o>=0;){var a=n[o];if(r==(a.mangled_name||a.unmangleable(t)&&a.name))continue e}return r}}}Cn.prototype={unmangleable:function(e){return e||(e={}),this.global&&!e.toplevel||this.export&On||this.undeclared||!e.eval&&this.scope.pinned()||(this.orig[0]instanceof Bt||this.orig[0]instanceof Vt)&&g(e.keep_fnames,this.orig[0].name)||this.orig[0]instanceof Pt||(this.orig[0]instanceof Ut||this.orig[0]instanceof Kt)&&g(e.keep_classnames,this.orig[0].name)},mangle:function(e){var t=e.cache&&e.cache.props;if(this.global&&t&&t.has(this.name))this.mangled_name=t.get(this.name);else if(!this.mangled_name&&!this.unmangleable(e)){var n,i=this.scope,r=this.orig[0];e.ie8&&r instanceof Bt&&(i=i.parent_scope),(n=this.redefined())?this.mangled_name=n.mangled_name||n.name:this.mangled_name=i.next_mangled(e,this),this.global&&t&&t.set(this.name,this.mangled_name)}},redefined:function(){return this.defun&&this.defun.variables.get(this.name)}},Ce.DEFMETHOD("figure_out_scope",function(e){e=o(e,{cache:null,ie8:!1,safari10:!1});var t=this,n=t.parent_scope=null,i=new Map,r=null,a=null,s=[],u=new mn(function(t,o){if(t.is_block_scope()){var c=n;return t.block_scope=n=new ye(t),n.init_scope_vars(c),t instanceof ye||(n.uses_with=c.uses_with,n.uses_eval=c.uses_eval,n.directives=c.directives),e.safari10&&(t instanceof Ae||t instanceof ve)&&s.push(n),o(),n=c,!0}if(t instanceof xe)return a=t,o(),a=null,!0;if(t instanceof ye){t.init_scope_vars(n);c=n;var l=r,f=i;return r=n=t,i=new Map,o(),n=c,r=l,i=f,!0}if(t instanceof Ee){var p=t.label;if(i.has(p.name))throw new Error(_("Label {name} defined twice",p));return i.set(p.name,p),o(),i.delete(p.name),!0}if(t instanceof be)for(var d=n;d;d=d.parent_scope)d.uses_with=!0;else{if(t instanceof Mt&&(t.scope=n),t instanceof zt&&(t.thedef=t,t.references=[]),t instanceof Bt)r.def_function(t,"arguments"==t.name?void 0:r);else if(t instanceof Vt)h((t.scope=r.parent_scope.get_defun_scope()).def_function(t,r),1);else if(t instanceof Ut)h(r.def_variable(t,r),1);else if(t instanceof Ht)n.def_variable(t);else if(t instanceof Kt)h((t.scope=r.parent_scope).def_function(t,r),1);else if(t instanceof Nt||t instanceof It||t instanceof kt){if((m=t instanceof xt?n.def_variable(t,null):r.def_variable(t,"SymbolVar"==t.TYPE?null:void 0)).orig.every(e=>e===t||(t instanceof xt?e instanceof Bt:!(e instanceof It||e instanceof kt)))||Y(t.name+" redeclared",t.start.file,t.start.line,t.start.col,t.start.pos),t instanceof Lt||h(m,2),m.destructuring=a,r!==n){t.mark_enclosed(e);var m=n.find_variable(t);t.thedef!==m&&(t.thedef=m,t.reference(e))}}else if(t instanceof Gt)n.def_variable(t).defun=r;else if(t instanceof $t){var E=i.get(t.name);if(!E)throw new Error(_("Undefined label {name} [{line},{col}]",{name:t.name,line:t.start.line,col:t.start.col}));t.thedef=E}n instanceof Ce||!(t instanceof rt||t instanceof it)||Y(t.TYPE+" statement may only appear at top level",t.start.file,t.start.line,t.start.col,t.start.pos)}function h(e,t){if(a){var n=0;do{t++}while(u.parent(n++)!==a)}var i=u.parent(t);if(e.export=i instanceof rt&&On){var r=i.exported_definition;(r instanceof Ne||r instanceof Ot)&&i.is_default&&(e.export=Fn)}}});t.walk(u),t.globals=new Map;u=new mn(function(n,i){if(n instanceof Ue&&n.label)return n.label.thedef.references.push(n),!0;if(n instanceof Wt){var r,o=n.name;if("eval"==o&&u.parent()instanceof at)for(var a=n.scope;a&&!a.uses_eval;a=a.parent_scope)a.uses_eval=!0;return u.parent()instanceof nt&&u.parent(1).module_name||!(r=n.scope.find_variable(o))?(r=t.def_global(n),n instanceof Yt&&(r.export=On)):r.scope instanceof Fe&&"arguments"==o&&(r.scope.uses_arguments=!0),n.thedef=r,n.reference(e),!n.scope.is_block_scope()||r.orig[0]instanceof xt||(n.scope=n.scope.get_defun_scope()),!0}var s;if(n instanceof Gt&&(s=n.definition().redefined()))for(a=n.scope;a&&(p(a.enclosed,s),a!==s.scope);)a=a.parent_scope});if(t.walk(u),(e.ie8||e.safari10)&&t.walk(new mn(function(n,i){if(n instanceof Gt){var r=n.name,o=n.thedef.references,a=n.thedef.defun,s=a.find_variable(r)||t.globals.get(r)||a.def_variable(n);return o.forEach(function(t){t.thedef=s,t.reference(e)}),n.thedef=s,n.reference(e),!0}})),e.safari10)for(var c=0;c0);return n}return a.consider=function(e,n){for(var i=e.length;--i>=0;)t.set(e[i],t.get(e[i])+n)},a.sort=function(){e=m(n,o).concat(m(i,o))},a.reset=r,r(),a}();class wn extends mn{constructor(e,t){super(),void 0===e.defaults||e.defaults||(t=!0),this.options=o(e,{arguments:!1,arrows:!t,booleans:!t,booleans_as_integers:!1,collapse_vars:!t,comparisons:!t,computed_props:!t,conditionals:!t,dead_code:!t,defaults:!0,directives:!t,drop_console:!1,drop_debugger:!t,ecma:5,evaluate:!t,expression:!1,global_defs:!1,hoist_funs:!1,hoist_props:!t,hoist_vars:!1,ie8:!1,if_return:!t,inline:!t,join_vars:!t,keep_classnames:!1,keep_fargs:!0,keep_fnames:!1,keep_infinity:!1,loops:!t,module:!1,negate_iife:!t,passes:1,properties:!t,pure_getters:!t&&"strict",pure_funcs:null,reduce_funcs:!t,reduce_vars:!t,sequences:!t,side_effects:!t,switches:!t,top_retain:null,toplevel:!(!e||!e.top_retain),typeofs:!t,unsafe:!1,unsafe_arrows:!1,unsafe_comps:!1,unsafe_Function:!1,unsafe_math:!1,unsafe_methods:!1,unsafe_proto:!1,unsafe_regexp:!1,unsafe_undefined:!1,unused:!t,warnings:!1},!0);var n=this.options.global_defs;if("object"==typeof n)for(var i in n)"@"===i[0]&&D(n,i)&&(n[i.slice(1)]=ne(n[i],{expression:!0}));!0===this.options.inline&&(this.options.inline=3);var r=this.options.pure_funcs;this.pure_funcs="function"==typeof r?r:r?function(e){return!r.includes(e.expression.print_to_string())}:u;var a=this.options.top_retain;a instanceof RegExp?this.top_retain=function(e){return a.test(e.name)}:"function"==typeof a?this.top_retain=a:a&&("string"==typeof a&&(a=a.split(/,/)),this.top_retain=function(e){return a.includes(e.name)}),this.options.module&&(this.directives["use strict"]=!0,this.options.toplevel=!0);var s=this.options.toplevel;this.toplevel="string"==typeof s?{funcs:/funcs/.test(s),vars:/vars/.test(s)}:{funcs:s,vars:s};var c=this.options.sequences;this.sequences_limit=1==c?800:0|c,this.warnings_produced={}}option(e){return this.options[e]}exposed(e){if(e.export)return!0;if(e.global)for(var t=0,n=e.orig.length;t0||this.option("reduce_vars"))&&e.reset_opt_flags(this),e=e.transform(this),t>1){var a=0;if(e.walk(new mn(function(){a++})),this.info("pass "+o+": last_count: "+n+", count: "+a),a=0;){if(!(r[o]instanceof vt))return;n||r[o].key!==t||(n=r[o].value)}}return n instanceof Wt&&n.fixed_value()||n}}function n(e,i,r,o,a,s){var u=i.parent(a),c=U(r,u);if(c)return c;if(!s&&u instanceof at&&u.expression===r&&!(o instanceof we)&&!(o instanceof Ct)&&!u.is_expr_pure(e)&&(!(o instanceof Re)||!(u instanceof st)&&o.contains_this()))return!0;if(u instanceof gt)return n(e,i,u,u,a+1);if(u instanceof vt&&r===u.value){var l=i.parent(a+1);return n(e,i,l,l,a+2)}if(u instanceof ct&&u.expression===r){var f=t(o,u.property);return!s&&n(e,i,u,f,a+1)}}function r(e){return e instanceof we||e instanceof Re}function o(e){if(e instanceof jt)return!0;if(e instanceof Wt)return e.definition().orig[0]instanceof Bt;if(e instanceof ct){if((e=e.expression)instanceof Wt){if(e.is_immutable())return!1;e=e.fixed_value()}return!e||!(e instanceof nn)&&(e instanceof Qt||o(e))}return!1}function p(e,t){if(!(e instanceof Wt))return!1;for(var n=e.definition().orig,i=n.length;--i>=0;)if(n[i]instanceof t)return!0}function m(e,t){for(var n,i=0;(n=e.parent(i++))&&!(n instanceof ye);)if(n instanceof je&&n.argname){n=n.argname.definition().scope;break}return n.find_variable(t)}function S(e,t,n){return n||(n={}),t&&(n.start||(n.start=t.start),n.end||(n.end=t.end)),new e(n)}function A(e,t){return 1==t.length?t[0]:S(ut,e,{expressions:t.reduce(b,[])})}function v(e,t){switch(typeof e){case"string":return S(Jt,t,{value:e});case"number":return isNaN(e)?S(an,t):isFinite(e)?1/e<0?S(_t,t,{operator:"-",expression:S(en,t,{value:-e})}):S(en,t,{value:e}):e<0?S(_t,t,{operator:"-",expression:S(cn,t)}):S(cn,t);case"boolean":return S(e?pn:fn,t);case"undefined":return S(sn,t);default:if(null===e)return S(on,t,{value:null});if(e instanceof RegExp)return S(nn,t,{value:e});throw new Error(_("Can't handle constant of type: {type}",{type:typeof e}))}}function T(e,t,n){return e instanceof _t&&"delete"==e.operator||e instanceof at&&e.expression===t&&(n instanceof ct||n instanceof Wt&&"eval"==n.name)?A(t,[S(en,t,{value:0}),n]):n}function b(e,t){return t instanceof ut?e.push.apply(e,t.expressions):e.push(t),e}function y(e){if(null===e)return[];if(e instanceof _e)return e.body;if(e instanceof de)return[];if(e instanceof ae)return[e];throw new Error("Can't convert thing to statement array")}function C(e){return null===e||(e instanceof de||e instanceof _e&&0==e.body.length)}function O(e){return!(e instanceof Ot||e instanceof Ne||e instanceof et||e instanceof tt||e instanceof rt||e instanceof it)}function F(e){return e instanceof he&&e.body instanceof _e?e.body:e}function M(e){return"Call"==e.TYPE&&(e.expression instanceof Re||M(e.expression))}function R(e){return e instanceof Wt&&e.definition().undeclared}e(oe,function(e,t){return e}),Ce.DEFMETHOD("drop_console",function(){return this.transform(new En(function(e){if("Call"==e.TYPE){var t=e.expression;if(t instanceof ct){for(var n=t.expression;n.expression;)n=n.expression;if(R(n)&&"console"==n.name)return S(sn,e)}}}))}),oe.DEFMETHOD("equivalent_to",function(e){return this.TYPE==e.TYPE&&this.print_to_string()==e.print_to_string()}),ye.DEFMETHOD("process_expression",function(e,t){var n=this,i=new En(function(r){if(e&&r instanceof ce)return S(Be,r,{value:r.body});if(!e&&r instanceof Be){if(t){var o=r.value&&r.value.drop_side_effect_free(t,!0);return o?S(ce,r,{body:o}):S(de,r)}return S(ce,r,{body:r.value||S(_t,r,{operator:"void",expression:S(en,r,{value:0})})})}if(r instanceof Ct||r instanceof Fe&&r!==n)return r;if(r instanceof pe){var a=r.body.length-1;a>=0&&(r.body[a]=r.body[a].transform(i))}else r instanceof Xe?(r.body=r.body.transform(i),r.alternative&&(r.alternative=r.alternative.transform(i))):r instanceof be&&(r.body=r.body.transform(i));return r});n.transform(i)}),function(e){function i(e,t){t.assignments=0,t.chained=!1,t.direct_access=!1,t.escaped=!1,t.scope.pinned()?t.fixed=!1:t.orig[0]instanceof kt||!e.exposed(t)?t.fixed=t.init:t.fixed=!1,t.recursive_refs=0,t.references=[],t.should_replace=void 0,t.single_use=void 0}function r(e,t,n){n.variables.forEach(function(n){i(t,n),null===n.fixed?(n.safe_ids=e.safe_ids,c(e,n,!0)):n.fixed&&(e.loop_ids.set(n.id,e.in_loop),c(e,n,!0))})}function o(e,t){t.block_scope&&t.block_scope.variables.forEach(function(t){i(e,t)})}function s(e){e.safe_ids=Object.create(e.safe_ids)}function u(e){e.safe_ids=Object.getPrototypeOf(e.safe_ids)}function c(e,t,n){e.safe_ids[t.id]=n}function l(e,t){if("m"==t.single_use)return!1;if(e.safe_ids[t.id]){if(null==t.fixed){var n=t.orig[0];if(n instanceof Lt||"arguments"==n.name)return!1;t.fixed=S(sn,n)}return!0}return t.fixed instanceof Ne}function f(e,t,n,i){return void 0===t.fixed||(null===t.fixed&&t.safe_ids?(t.safe_ids[t.id]=!1,delete t.safe_ids,!0):!!D(e.safe_ids,t.id)&&(!!l(e,t)&&(!1!==t.fixed&&(!(null!=t.fixed&&(!i||t.references.length>t.assignments))&&(t.fixed instanceof Ne?i instanceof oe&&t.fixed.parent_scope===n:t.orig.every(e=>!(e instanceof kt||e instanceof Vt||e instanceof Bt)))))))}function p(e,n,i,r,o,a,s){var u=e.parent(a);if(o){if(o.is_constant())return;if(o instanceof Ft)return}if(u instanceof ht&&"="==u.operator&&r===u.right||u instanceof at&&(r!==u.expression||u instanceof st)||u instanceof Pe&&r===u.value&&r.scope!==n.scope||u instanceof ot&&r===u.value||u instanceof dn&&r===u.value&&r.scope!==n.scope)return!(s>1)||o&&o.is_constant_expression(i)||(s=1),void((!n.escaped||n.escaped>s)&&(n.escaped=s));if(u instanceof gt||u instanceof _n||u instanceof mt&&B.has(u.operator)||u instanceof Et&&r!==u.condition||u instanceof Oe||u instanceof ut&&r===u.tail_node())p(e,n,i,u,u,a+1,s);else if(u instanceof vt&&r===u.value){var c=e.parent(a+1);p(e,n,i,c,c,a+2,s)}else if(u instanceof ct&&r===u.expression&&(p(e,n,i,u,o=t(o,u.property),a+1,s+1),o))return;a>0||u instanceof ut&&r!==u.tail_node()||u instanceof ce||(n.direct_access=!0)}e(oe,a);var _=new mn(function(e){if(e instanceof Mt){var t=e.definition();t&&(e instanceof Wt&&t.references.push(e),t.fixed=!1)}});function d(e,t,n){this.inlined=!1;var i=e.safe_ids;return e.safe_ids=Object.create(null),r(e,n,this),t(),e.safe_ids=i,!0}function m(e,t,n){var i,o=this;return o.inlined=!1,s(e),r(e,n,o),o.uses_arguments?(t(),void u(e)):(!o.name&&(i=e.parent())instanceof at&&i.expression===o&&o.argnames.forEach(function(t,n){if(t.definition){var r=t.definition();r.orig.length>1||(void 0!==r.fixed||o.uses_arguments&&!e.has_directive("use strict")?r.fixed=!1:(r.fixed=function(){return i.args[n]||S(sn,i)},e.loop_ids.set(r.id,e.in_loop),c(e,r,!0)))}}),t(),u(e),!0)}e(Me,function(e,t,n){return s(e),r(e,n,this),t(),u(e),!0}),e(we,m),e(ht,function(e,t,i){var r=this;if(r.left instanceof xe)r.left.walk(_);else{var o=r.left;if(o instanceof Wt){var a=o.definition(),s=f(e,a,o.scope,r.right);if(a.assignments++,s){var u=a.fixed;if(u||"="==r.operator){var l="="==r.operator,d=l?r.right:r;if(!n(i,e,r,d,0))return a.references.push(o),l||(a.chained=!0),a.fixed=l?function(){return r.right}:function(){return S(mt,r,{operator:r.operator.slice(0,-1),left:u instanceof oe?u:u(),right:r.right})},c(e,a,!1),r.right.walk(e),c(e,a,!0),p(e,a,o.scope,r,d,0,1),!0}}}}}),e(mt,function(e){if(B.has(this.operator))return this.left.walk(e),s(e),this.right.walk(e),u(e),!0}),e(pe,function(e,t,n){o(n,this)}),e(qe,function(e){return s(e),this.expression.walk(e),u(e),s(e),le(this,e),u(e),!0}),e(Ft,function(e,t){return this.inlined=!1,s(e),t(),u(e),!0}),e(Et,function(e){return this.condition.walk(e),s(e),this.consequent.walk(e),u(e),s(e),this.alternative.walk(e),u(e),!0}),e(Ye,function(e,t){return s(e),t(),u(e),!0}),e(Ot,d),e(Ne,d),e(ge,function(e,t,n){o(n,this);var i=e.in_loop;return e.in_loop=this,s(e),this.body.walk(e),ie(this)&&(u(e),s(e)),this.condition.walk(e),u(e),e.in_loop=i,!0}),e(Ae,function(e,t,n){o(n,this),this.init&&this.init.walk(e);var i=e.in_loop;return e.in_loop=this,s(e),this.condition&&this.condition.walk(e),this.body.walk(e),this.step&&(ie(this)&&(u(e),s(e)),this.step.walk(e)),u(e),e.in_loop=i,!0}),e(ve,function(e,t,n){o(n,this),this.init.walk(_),this.object.walk(e);var i=e.in_loop;return e.in_loop=this,s(e),this.body.walk(e),u(e),e.in_loop=i,!0}),e(Re,m),e(Xe,function(e){return this.condition.walk(e),s(e),this.body.walk(e),u(e),this.alternative&&(s(e),this.alternative.walk(e),u(e)),!0}),e(Ee,function(e){return s(e),this.body.walk(e),u(e),!0}),e(Gt,function(){this.definition().fixed=!1}),e(Wt,function(e,t,i){var r,o=this.definition();o.references.push(this),1==o.references.length&&!o.fixed&&o.orig[0]instanceof Vt&&e.loop_ids.set(o.id,e.in_loop),void 0!==o.fixed&&l(e,o)?o.fixed&&((r=this.fixed_value())instanceof Fe&&me(e,o)?o.recursive_refs++:r&&!i.exposed(o)&&function(e,t,n){return t.option("unused")&&!n.scope.pinned()&&n.references.length-n.recursive_refs==1&&e.loop_ids.get(n.id)===e.in_loop}(e,i,o)?o.single_use=r instanceof Fe&&!r.pinned()||r instanceof Ct||o.scope===this.scope&&r.is_constant_expression():o.single_use=!1,n(i,e,this,r,0,function(e){return!!e&&(e.is_constant()||e instanceof Fe||e instanceof jt)}(r))&&(o.single_use?o.single_use="m":o.fixed=!1)):o.fixed=!1,p(e,o,this.scope,this,r,0,1)}),e(Ce,function(e,t,n){this.globals.forEach(function(e){i(n,e)}),r(e,n,this)}),e($e,function(e,t,n){return o(n,this),s(e),le(this,e),u(e),this.bcatch&&(s(e),this.bcatch.walk(e),u(e)),this.bfinally&&this.bfinally.walk(e),!0}),e(pt,function(e,t){var n=this;if("++"===n.operator||"--"===n.operator){var i=n.expression;if(i instanceof Wt){var r=i.definition(),o=f(e,r,i.scope,!0);if(r.assignments++,o){var a=r.fixed;if(a)return r.references.push(i),r.chained=!0,r.fixed=function(){return S(mt,n,{operator:n.operator.slice(0,-1),left:S(_t,n,{operator:"+",expression:a instanceof oe?a:a()}),right:S(en,n,{value:1})})},c(e,r,!0),!0}}}}),e(ot,function(e,t){var n=this;if(n.name instanceof xe)n.name.walk(_);else{var i=n.name.definition();if(n.value){if(f(e,i,n.name.scope,n.value))return i.fixed=function(){return n.value},e.loop_ids.set(i.id,e.in_loop),c(e,i,!1),t(),c(e,i,!0),!0;i.fixed=!1}}}),e(Se,function(e,t,n){o(n,this);var i=e.in_loop;return e.in_loop=this,s(e),t(),u(e),e.in_loop=i,!0})}(function(e,t){e.DEFMETHOD("reduce_vars",t)}),Ce.DEFMETHOD("reset_opt_flags",function(e){var t=this,n=e.option("reduce_vars"),i=new mn(function(r,o){if(r._squeezed=!1,r._optimized=!1,n)return e.top_retain&&(i.parent()===t?r._top=!0:delete r._top),r.reduce_vars(i,o,e)});i.safe_ids=Object.create(null),i.in_loop=null,i.loop_ids=new Map,t.walk(i)}),Mt.DEFMETHOD("fixed_value",function(){var e=this.definition().fixed;return!e||e instanceof oe?e:e()}),Wt.DEFMETHOD("is_immutable",function(){var e=this.definition().orig;return 1==e.length&&e[0]instanceof Bt});var w=E("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");Wt.DEFMETHOD("is_declared",function(e){return!this.definition().undeclared||e.option("unsafe")&&w.has(this.name)});var N,x=E("Infinity NaN undefined");function k(e){return e instanceof cn||e instanceof an||e instanceof sn}function I(e,t){var a,s,u=t.find_parent(ye).get_defun_scope();!function(){var e=t.self(),n=0;do{if(e instanceof je||e instanceof Ze)n++;else if(e instanceof he)a=!0;else{if(e instanceof ye){u=e;break}e instanceof $e&&(s=!0)}}while(e=t.parent(n++))}();var c,l=10;do{c=!1,m(e),t.option("dead_code")&&h(e,t),t.option("if_return")&&E(e,t),t.sequences_limit>0&&(g(e,t),C(e,t)),t.option("join_vars")&&R(e),t.option("collapse_vars")&&_(e,t)}while(c&&l-- >0);function _(e,t){if(u.pinned())return e;for(var l,_=[],d=e.length,m=new En(function(e,n){if(x)return e;if(!N)return e!==h[D]?e:++D=0;){0==d&&t.option("unused")&&X();var h=[];for(z(e[d]);_.length>0;){h=_.pop();var D=0,g=h[h.length-1],A=null,v=null,b=null,y=W(g);if(y&&!o(y)&&!y.has_side_effects(t)){var C=q(g),O=j(y);y instanceof Wt&&C.set(y.name,!1);var F=Z(g),M=Q(),R=g.may_throw(t),w=g.name instanceof Lt,N=w,x=!1,I=0,L=!l||!N;if(!L){for(var V=t.self().argnames.lastIndexOf(g.name)+1;!x&&VI)I=!1;else{x=!1,D=0,N=w;for(P=d;!x&&P!(e instanceof Oe))){var o=t.has_directive("use strict");o&&!i(o,n.body)&&(o=!1);var a=n.argnames.length;l=e.args.slice(a);for(var s=new Set,u=a;--u>=0;){var c=n.argnames[u],f=e.args[u];if(l.unshift(S(ot,c,{name:c,value:f})),!s.has(c.name))if(s.add(c.name),c instanceof Oe){var p=e.args.slice(u);p.every(e=>!H(n,e,o))&&_.unshift([S(ot,c,{name:c.expression,value:S(gt,e,{elements:p})})])}else f?(f instanceof Fe&&f.pinned()||H(n,f,o))&&(f=null):f=S(sn,c).transform(t),f&&_.unshift([S(ot,c,{name:c,value:f})])}}}function z(e){if(h.push(e),e instanceof ht)e.left.has_side_effects(t)||_.push(h.slice()),z(e.right);else if(e instanceof mt)z(e.left),z(e.right);else if(e instanceof at)z(e.expression),e.args.forEach(z);else if(e instanceof qe)z(e.expression);else if(e instanceof Et)z(e.condition),z(e.consequent),z(e.alternative);else if(!(e instanceof Qe)||!t.option("unused")&&e instanceof tt)e instanceof De?(z(e.condition),e.body instanceof pe||z(e.body)):e instanceof Pe?e.value&&z(e.value):e instanceof Ae?(e.init&&z(e.init),e.condition&&z(e.condition),e.step&&z(e.step),e.body instanceof pe||z(e.body)):e instanceof ve?(z(e.object),e.body instanceof pe||z(e.body)):e instanceof Xe?(z(e.condition),e.body instanceof pe||z(e.body),!e.alternative||e.alternative instanceof pe||z(e.alternative)):e instanceof ut?e.expressions.forEach(z):e instanceof ce?z(e.body):e instanceof ze?(z(e.expression),e.body.forEach(z)):e instanceof pt?"++"!=e.operator&&"--"!=e.operator||_.push(h.slice()):e instanceof ot&&e.value&&(_.push(h.slice()),z(e.value));else{var n=e.definitions.length,i=n-200;for(i<0&&(i=0);i1&&!(e.name instanceof Lt)||(o>1?function(e){var t=e.value;if(t instanceof Wt&&"arguments"!=t.name){var n=t.definition();if(!n.undeclared)return A=n}}(e):!t.exposed(r))?S(Wt,e.name,e.name):void 0}}function Y(e){return e[e instanceof ht?"right":"value"]}function q(e){var i=new Map;if(e instanceof pt)return i;var r=new mn(function(e,o){for(var a=e;a instanceof ct;)a=a.expression;(a instanceof Wt||a instanceof jt)&&i.set(a.name,i.get(a.name)||n(t,r,e,e,0))});return Y(e).walk(r),i}function $(n){if(n.name instanceof Lt){var i=t.parent(),r=t.self().argnames,o=r.indexOf(n.name);if(o<0)i.args.length=Math.min(i.args.length,r.length-1);else{var a=i.args;a[o]&&(a[o]=S(en,a[o],{value:0}))}return!0}var s=!1;return e[d].transform(new En(function(e,t,i){return s?e:e===n||e.body===n?(s=!0,e instanceof ot?(e.value=null,e):i?f.skip:null):void 0},function(e){if(e instanceof ut)switch(e.expressions.length){case 0:return null;case 1:return e.expressions[0]}}))}function j(e){for(;e instanceof ct;)e=e.expression;return e instanceof Wt&&e.definition().scope===u&&!(a&&(C.has(e.name)||g instanceof pt||g instanceof ht&&"="!=g.operator))}function Z(e){return!(e instanceof pt)&&Y(e).has_side_effects(t)}function Q(){if(F)return!1;if(A)return!0;if(y instanceof Wt){var e=y.definition();if(e.references.length-e.replaced==(g instanceof ot?1:2))return!0}return!1}function J(e){if(!e.definition)return!0;var t=e.definition();return!(1==t.orig.length&&t.orig[0]instanceof Vt)&&(t.scope.get_defun_scope()!==u||!t.references.every(e=>{var t=e.scope.get_defun_scope();return"Scope"==t.TYPE&&(t=t.parent_scope),t===u}))}}function m(e){for(var t=[],n=0;n=0;){var i=e[n];if(i instanceof Xe&&i.body instanceof Be&&++t>1)return!0}return!1}(e),r=n instanceof Fe,o=e.length;--o>=0;){var a=e[o],s=g(o),u=e[s];if(r&&!u&&a instanceof Be){if(!a.value){c=!0,e.splice(o,1);continue}if(a.value instanceof _t&&"void"==a.value.operator){c=!0,e[o]=S(ce,a,{body:a.value.expression});continue}}if(a instanceof Xe){var l;if(m(l=Z(a.body))){l.label&&d(l.label.thedef.references,l),c=!0,(a=a.clone()).condition=a.condition.negate(t);var f=h(a.body,l);a.body=S(_e,a,{body:y(a.alternative).concat(E())}),a.alternative=S(_e,a,{body:f}),e[o]=a.transform(t);continue}if(m(l=Z(a.alternative))){l.label&&d(l.label.thedef.references,l),c=!0,(a=a.clone()).body=S(_e,a.body,{body:y(a.body).concat(E())});f=h(a.alternative,l);a.alternative=S(_e,a.alternative,{body:f}),e[o]=a.transform(t);continue}}if(a instanceof Xe&&a.body instanceof Be){var p=a.body.value;if(!p&&!a.alternative&&(r&&!u||u instanceof Be&&!u.value)){c=!0,e[o]=S(ce,a.condition,{body:a.condition});continue}if(p&&!a.alternative&&u instanceof Be&&u.value){c=!0,(a=a.clone()).alternative=u,e[o]=a.transform(t),e.splice(s,1);continue}if(p&&!a.alternative&&(!u&&r&&i||u instanceof Be)){c=!0,(a=a.clone()).alternative=u||S(Be,a,{value:null}),e[o]=a.transform(t),u&&e.splice(s,1);continue}var _=e[A(o)];if(t.option("sequences")&&r&&!a.alternative&&_ instanceof Xe&&_.body instanceof Be&&g(s)==e.length&&u instanceof ce){c=!0,(a=a.clone()).alternative=S(_e,u,{body:[u,S(Be,u,{value:null})]}),e[o]=a.transform(t),e.splice(s,1);continue}}}function m(i){if(!i)return!1;for(var a=o+1,s=e.length;a=0;){var i=e[n];if(!(i instanceof Je&&D(i)))break}return n}}function h(e,t){for(var n,i=t.self(),r=0,o=0,a=e.length;r!e.value)}function g(e,t){if(!(e.length<2)){for(var n=[],i=0,r=0,o=e.length;r=t.sequences_limit&&u();var s=a.body;n.length>0&&(s=s.drop_side_effect_free(t)),s&&b(n,s)}else a instanceof Qe&&D(a)||a instanceof Ne?e[i++]=a:(u(),e[i++]=a)}u(),e.length=i,i!=o&&(c=!0)}function u(){if(n.length){var t=A(n[0],n);e[i++]=S(ce,t,{body:t}),n=[]}}}function v(e,t){if(!(e instanceof _e))return e;for(var n=null,i=0,r=e.body.length;i0){var p=u.length;u.push(S(Xe,a,{condition:a.condition,body:l||S(de,a.body),alternative:f})),u.unshift(r,1),[].splice.apply(e,u),o+=p,r+=p+1,i=null,c=!0;continue}}e[r++]=a,i=a instanceof ce?a:null}e.length=r}function M(e,n){if(e instanceof Qe){var i,r=e.definitions[e.definitions.length-1];if(r.value instanceof St)if(n instanceof ht?i=[n]:n instanceof ut&&(i=n.expressions.slice()),i){var o=!1;do{var a=i[0];if(!(a instanceof ht))break;if("="!=a.operator)break;if(!(a.left instanceof ct))break;var s=a.left.expression;if(!(s instanceof Wt))break;if(r.name.name!=s.name)break;if(!a.right.is_constant_expression(u))break;var c=a.left.property;if(c instanceof oe&&(c=c.evaluate(t)),c instanceof oe)break;c=""+c;var l=t.option("ecma")<6&&t.has_directive("use strict")?function(e){return e.key!=c&&e.key&&e.key.name!=c}:function(e){return e.key&&e.key.name!=c};if(!r.value.properties.every(l))break;var f=r.value.properties.filter(function(e){return e.key===c})[0];f?f.value=new ut({start:f.start,expressions:[f.value.clone(),a.right.clone()],end:f.end}):r.value.properties.push(S(vt,a,{key:c,value:a.right})),i.shift(),o=!0}while(i.length);return o&&i}}}function R(e){for(var t,n=0,i=-1,r=e.length;n=0;)if(this.properties[n]._dot_throw(e))return!0;return!1}),e(At,s),e(bt,u),e(Oe,function(e){return this.expression._dot_throw(e)}),e(Re,s),e(we,s),e(dt,s),e(_t,function(){return"void"==this.operator}),e(mt,function(e){return("&&"==this.operator||"||"==this.operator)&&(this.left._dot_throw(e)||this.right._dot_throw(e))}),e(ht,function(e){return"="==this.operator&&this.right._dot_throw(e)}),e(Et,function(e){return this.consequent._dot_throw(e)||this.alternative._dot_throw(e)}),e(lt,function(e){return!!t(e)&&!(this.expression instanceof Re&&"prototype"==this.property)}),e(ut,function(e){return this.tail_node()._dot_throw(e)}),e(Wt,function(e){if(this.is_undefined)return!0;if(!t(e))return!1;if(R(this)&&this.is_declared(e))return!1;if(this.is_immutable())return!1;var n=this.fixed_value();return!n||n._dot_throw(e)})}(function(e,t){e.DEFMETHOD("_dot_throw",t)}),function(e){const t=E("! delete"),n=E("in instanceof == != === !== < <= >= >");e(oe,s),e(_t,function(){return t.has(this.operator)}),e(mt,function(){return n.has(this.operator)||B.has(this.operator)&&this.left.is_boolean()&&this.right.is_boolean()}),e(Et,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()}),e(ht,function(){return"="==this.operator&&this.right.is_boolean()}),e(ut,function(){return this.tail_node().is_boolean()}),e(pn,u),e(fn,u)}(function(e,t){e.DEFMETHOD("is_boolean",t)}),function(e){e(oe,s),e(en,u);var t=E("+ - ~ ++ --");e(pt,function(){return t.has(this.operator)});var n=E("- * / % & | ^ << >> >>>");e(mt,function(e){return n.has(this.operator)||"+"==this.operator&&this.left.is_number(e)&&this.right.is_number(e)}),e(ht,function(e){return n.has(this.operator.slice(0,-1))||"="==this.operator&&this.right.is_number(e)}),e(ut,function(e){return this.tail_node().is_number(e)}),e(Et,function(e){return this.consequent.is_number(e)&&this.alternative.is_number(e)})}(function(e,t){e.DEFMETHOD("is_number",t)}),(N=function(e,t){e.DEFMETHOD("is_string",t)})(oe,s),N(Jt,u),N(Ie,function(){return 1===this.segments.length}),N(_t,function(){return"typeof"==this.operator}),N(mt,function(e){return"+"==this.operator&&(this.left.is_string(e)||this.right.is_string(e))}),N(ht,function(e){return("="==this.operator||"+="==this.operator)&&this.right.is_string(e)}),N(ut,function(e){return this.tail_node().is_string(e)}),N(Et,function(e){return this.consequent.is_string(e)&&this.alternative.is_string(e)});var B=E("&& ||"),K=E("delete ++ --");function U(e,t){return t instanceof pt&&K.has(t.operator)?t.expression:t instanceof ht&&t.left===e?e:void 0}function G(e,t){return e.print_to_string().length>t.print_to_string().length?t:e}function H(e,t,n){return(Sn(e)?function(e,t){return G(S(ce,e,{body:e}),S(ce,t,{body:t})).body}:G)(t,n)}function X(e){for(var t of Object.keys(e))e[t]=E(e[t])}!function(e){function t(e,t){e.warn("global_defs "+t.print_to_string()+" redefined [{file}:{line},{col}]",t.start)}Ce.DEFMETHOD("resolve_defines",function(e){return e.option("global_defs")?(this.figure_out_scope({ie8:e.option("ie8")}),this.transform(new En(function(n){var i=n._find_defs(e,"");if(i){for(var r,o=0,a=n;(r=this.parent(o++))&&r instanceof ct&&r.expression===a;)a=r;if(!U(a,r))return i;t(e,n)}}))):this}),e(oe,a),e(lt,function(e,t){return this.expression._find_defs(e,"."+this.property+t)}),e(wt,function(e){this.global()&&D(e.option("global_defs"),this.name)&&t(e,this)}),e(Wt,function(e,t){if(this.global()){var n=e.option("global_defs"),i=this.name+t;return D(n,i)?function e(t,n){if(t instanceof oe)return S(t.CTOR,n,t);if(Array.isArray(t))return S(gt,n,{elements:t.map(function(t){return e(t,n)})});if(t&&"object"==typeof t){var i=[];for(var r in t)D(t,r)&&i.push(S(vt,n,{key:r,value:e(t[r],n)}));return S(St,n,{properties:i})}return v(t,n)}(n[i],this):void 0}})}(function(e,t){e.DEFMETHOD("_find_defs",t)});var Y=["constructor","toString","valueOf"],q={Array:["indexOf","join","lastIndexOf","slice"].concat(Y),Boolean:Y,Function:Y,Number:["toExponential","toFixed","toPrecision"].concat(Y),Object:Y,RegExp:["test"].concat(Y),String:["charAt","charCodeAt","concat","indexOf","italics","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","trim"].concat(Y)};X(q);var $={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"]};X($),function(e){oe.DEFMETHOD("evaluate",function(e){if(!e.option("evaluate"))return this;var t=this._eval(e,1);return!t||t instanceof RegExp?t:"function"==typeof t||"object"==typeof t?this:t});var t=E("! ~ - + void");oe.DEFMETHOD("is_constant",function(){return this instanceof Qt?!(this instanceof nn):this instanceof _t&&this.expression instanceof Qt&&t.has(this.operator)}),e(ae,function(){throw new Error(_("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),e(Fe,c),e(Ct,c),e(oe,c),e(Qt,function(){return this.getValue()}),e(Ie,function(){return 1!==this.segments.length?this:this.segments[0].value}),e(Re,function(e){if(e.option("unsafe")){var t=function(){};return t.node=this,t.toString=function(){return this.node.print_to_string()},t}return this}),e(gt,function(e,t){if(e.option("unsafe")){for(var n=[],i=0,r=this.elements.length;i>":r=n>>o;break;case">>>":r=n>>>o;break;case"==":r=n==o;break;case"===":r=n===o;break;case"!=":r=n!=o;break;case"!==":r=n!==o;break;case"<":r=n":r=n>o;break;case">=":r=n>=o;break;default:return this}return isNaN(r)&&e.find_parent(be)?this:r}),e(Et,function(e,t){var n=this.condition._eval(e,t);if(n===this.condition)return this;var i=n?this.consequent:this.alternative,r=i._eval(e,t);return r===i?this:r}),e(Wt,function(e,t){var n,i=this.fixed_value();if(!i)return this;if(D(i,"_eval"))n=i._eval();else{if(this._eval=c,n=i._eval(e,t),delete this._eval,n===i)return this;i._eval=function(){return n}}if(n&&"object"==typeof n){var r=this.definition().escaped;if(r&&t>r)return this}return n});var r={Array:Array,Math:Math,Number:Number,Object:Object,String:String},o={Math:["E","LN10","LN2","LOG2E","LOG10E","PI","SQRT1_2","SQRT2"],Number:["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"]};X(o),e(ct,function(e,t){if(e.option("unsafe")){var n=this.property;if(n instanceof oe&&(n=n._eval(e,t))===this.property)return this;var i,a=this.expression;if(R(a)){var s,u="hasOwnProperty"===a.name&&"call"===n&&(s=e.parent()&&e.parent().args)&&s&&s[0]&&s[0].evaluate(e);if(null==(u=u instanceof lt?u.expression:u)||u.thedef&&u.thedef.undeclared)return this.clone();var c=o[a.name];if(!c||!c.has(n))return this;i=r[a.name]}else{if(!(i=a._eval(e,t+1))||i===a||!D(i,n))return this;if("function"==typeof i)switch(n){case"name":return i.node.name?i.node.name.name:"";case"length":return i.node.argnames.length;default:return this}}return i[n]}return this}),e(at,function(e,t){var n=this.expression;if(e.option("unsafe")&&n instanceof ct){var i,o=n.property;if(o instanceof oe&&(o=o._eval(e,t))===n.property)return this;var a=n.expression;if(R(a)){var s="hasOwnProperty"===a.name&&"call"===o&&this.args[0]&&this.args[0].evaluate(e);if(null==(s=s instanceof lt?s.expression:s)||s.thedef&&s.thedef.undeclared)return this.clone();var u=$[a.name];if(!u||!u.has(o))return this;i=r[a.name]}else{if((i=a._eval(e,t+1))===a||!i)return this;var c=q[i.constructor.name];if(!c||!c.has(o))return this}for(var l=[],f=0,p=this.args.length;f=":return r.operator="<",r;case">":return r.operator="<=",r}switch(o){case"==":return r.operator="!=",r;case"!=":return r.operator="==",r;case"===":return r.operator="!==",r;case"!==":return r.operator="===",r;case"&&":return r.operator="||",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i);case"||":return r.operator="&&",r.left=r.left.negate(e,i),r.right=r.right.negate(e),n(this,r,i)}return t(this)})}(function(e,t){e.DEFMETHOD("negate",function(e,n){return t.call(this,e,n)})});var j=E("Boolean decodeURI decodeURIComponent Date encodeURI encodeURIComponent Error escape EvalError isFinite isNaN Number Object parseFloat parseInt RangeError ReferenceError String SyntaxError TypeError unescape URIError");function Z(e){return e&&e.aborts()}at.DEFMETHOD("is_expr_pure",function(e){if(e.option("unsafe")){var t=this.expression,n=this.args&&this.args[0]&&this.args[0].evaluate(e);if(t.expression&&"hasOwnProperty"===t.expression.name&&(null==n||n.thedef&&n.thedef.undeclared))return!1;if(R(t)&&j.has(t.name))return!0;if(t instanceof lt&&R(t.expression)&&$.hasOwnProperty(t.expression.name)&&$[t.expression.name].has(t.property))return!0}return this.pure||!e.pure_funcs(this)}),oe.DEFMETHOD("is_call_pure",s),lt.DEFMETHOD("is_call_pure",function(e){if(!e.option("unsafe"))return;const t=this.expression;let n;return t instanceof gt?n=q.Array:t.is_boolean()?n=q.Boolean:t.is_number(e)?n=q.Number:t instanceof nn?n=q.RegExp:t.is_string(e)?n=q.String:this.may_throw_on_access(e)||(n=q.Object),n&&n.has(this.property)}),function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].has_side_effects(t))return!0;return!1}e(oe,u),e(de,s),e(Qt,s),e(jt,s),e(pe,function(e){return t(this.body,e)}),e(at,function(e){return!(this.is_expr_pure(e)||this.expression.is_call_pure(e)&&!this.expression.has_side_effects(e))||t(this.args,e)}),e(ze,function(e){return this.expression.has_side_effects(e)||t(this.body,e)}),e(qe,function(e){return this.expression.has_side_effects(e)||t(this.body,e)}),e($e,function(e){return t(this.body,e)||this.bcatch&&this.bcatch.has_side_effects(e)||this.bfinally&&this.bfinally.has_side_effects(e)}),e(Xe,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)}),e(Ee,function(e){return this.body.has_side_effects(e)}),e(ce,function(e){return this.body.has_side_effects(e)}),e(Fe,s),e(Ct,s),e(Ot,u),e(mt,function(e){return this.left.has_side_effects(e)||this.right.has_side_effects(e)}),e(ht,u),e(Et,function(e){return this.condition.has_side_effects(e)||this.consequent.has_side_effects(e)||this.alternative.has_side_effects(e)}),e(pt,function(e){return K.has(this.operator)||this.expression.has_side_effects(e)}),e(Wt,function(e){return!this.is_declared(e)}),e(wt,s),e(St,function(e){return t(this.properties,e)}),e(At,function(e){return!!(this.key instanceof vt&&this.key.has_side_effects(e))||this.value.has_side_effects(e)}),e(gt,function(e){return t(this.elements,e)}),e(lt,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)}),e(ft,function(e){return this.expression.may_throw_on_access(e)||this.expression.has_side_effects(e)||this.property.has_side_effects(e)}),e(ut,function(e){return t(this.expressions,e)}),e(Qe,function(e){return t(this.definitions,e)}),e(ot,function(e){return this.value}),e(Le,s),e(Ie,function(e){return t(this.segments,e)})}(function(e,t){e.DEFMETHOD("has_side_effects",t)}),function(e){function t(e,t){for(var n=e.length;--n>=0;)if(e[n].may_throw(t))return!0;return!1}e(oe,u),e(Ct,s),e(Qt,s),e(de,s),e(Fe,s),e(wt,s),e(jt,s),e(gt,function(e){return t(this.elements,e)}),e(ht,function(e){return!!this.right.may_throw(e)||!(!e.has_directive("use strict")&&"="==this.operator&&this.left instanceof Wt)&&this.left.may_throw(e)}),e(mt,function(e){return this.left.may_throw(e)||this.right.may_throw(e)}),e(pe,function(e){return t(this.body,e)}),e(at,function(e){return!!t(this.args,e)||!this.is_expr_pure(e)&&(!!this.expression.may_throw(e)||(!(this.expression instanceof Fe)||t(this.expression.body,e)))}),e(qe,function(e){return this.expression.may_throw(e)||t(this.body,e)}),e(Et,function(e){return this.condition.may_throw(e)||this.consequent.may_throw(e)||this.alternative.may_throw(e)}),e(Qe,function(e){return t(this.definitions,e)}),e(lt,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)}),e(Xe,function(e){return this.condition.may_throw(e)||this.body&&this.body.may_throw(e)||this.alternative&&this.alternative.may_throw(e)}),e(Ee,function(e){return this.body.may_throw(e)}),e(St,function(e){return t(this.properties,e)}),e(At,function(e){return this.value.may_throw(e)}),e(Be,function(e){return this.value&&this.value.may_throw(e)}),e(ut,function(e){return t(this.expressions,e)}),e(ce,function(e){return this.body.may_throw(e)}),e(ft,function(e){return this.expression.may_throw_on_access(e)||this.expression.may_throw(e)||this.property.may_throw(e)}),e(ze,function(e){return this.expression.may_throw(e)||t(this.body,e)}),e(Wt,function(e){return!this.is_declared(e)}),e($e,function(e){return this.bcatch?this.bcatch.may_throw(e):t(this.body,e)||this.bfinally&&this.bfinally.may_throw(e)}),e(pt,function(e){return!("typeof"==this.operator&&this.expression instanceof Wt)&&this.expression.may_throw(e)}),e(ot,function(e){return!!this.value&&this.value.may_throw(e)})}(function(e,t){e.DEFMETHOD("may_throw",t)}),function(e){function t(e){var t=this,n=!0;return t.walk(new mn(function(r){if(!n)return!0;if(r instanceof Wt){if(t.inlined)return n=!1,!0;var o=r.definition();if(i(o,t.enclosed)&&!t.variables.has(o.name)){if(e){var a=e.find_variable(r);if(o.undeclared?!a:a===o)return n="f",!0}n=!1}return!0}return r instanceof jt&&t instanceof we?(n=!1,!0):void 0})),n}e(oe,s),e(Qt,u),e(Ct,function(e){return!(this.extends&&!this.extends.is_constant_expression(e))&&t.call(this,e)}),e(Fe,t),e(pt,function(){return this.expression.is_constant_expression()}),e(mt,function(){return this.left.is_constant_expression()&&this.right.is_constant_expression()}),e(gt,function(){return this.elements.every(e=>e.is_constant_expression())}),e(St,function(){return this.properties.every(e=>e.is_constant_expression())}),e(At,function(){return!(this.key instanceof oe)&&this.value.is_constant_expression()})}(function(e,t){e.DEFMETHOD("is_constant_expression",t)}),function(e){function t(){for(var e=0;e1)&&(s.name=null),s instanceof Fe&&!(s instanceof Me))for(var D=!e.option("keep_fargs"),v=s.argnames,b=v.length;--b>=0;){var y;(y=v[b])instanceof Oe&&(y=y.expression),y instanceof Dt&&(y=y.left),y instanceof xe||o.has(y.definition().id)?D=!1:(y.__unused=!0,D&&(v.pop(),e[y.unreferenced()?"warn":"info"]("Dropping unused function argument {name} [{file}:{line},{col}]",I(y))))}if((s instanceof Ne||s instanceof Ot)&&s!==t){m=s.name.definition();if(!(o.has(m.id)||!n&&m.global))return e[s.name.unreferenced()?"warn":"info"]("Dropping unused function {name} [{file}:{line},{col}]",I(s.name)),m.eliminated++,S(de,s)}if(s instanceof Qe&&!(p instanceof ve&&p.init===s)){var F=!(p instanceof Ce||s instanceof Je),M=[],R=[],w=[],N=[];switch(s.definitions.forEach(function(t){t.value&&(t.value=t.value.transform(E));var n=t.name instanceof xe,r=n?new Cn(null,{name:""}):t.name.definition();if(F&&r.global)return w.push(t);if(!i&&!F||n&&(t.name.names.length||t.name.is_array||1!=e.option("pure_getters"))||o.has(r.id)){if(t.value&&a.has(r.id)&&a.get(r.id)!==t&&(t.value=t.value.drop_side_effect_free(e)),t.name instanceof Nt){var c=u.get(r.id);if(c.length>1&&(!t.value||r.orig.indexOf(t.name)>r.eliminated)){if(e.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]",I(t.name)),t.value){var l=S(Wt,t.name,t.name);r.references.push(l);var f=S(ht,t,{operator:"=",left:l,right:t.value});a.get(r.id)===t&&a.set(r.id,f),N.push(f.transform(E))}return d(c,t),void r.eliminated++}}t.value?(N.length>0&&(w.length>0?(N.push(t.value),t.value=A(t.value,N)):M.push(S(ce,s,{body:A(s,N)})),N=[]),w.push(t)):R.push(t)}else if(r.orig[0]instanceof Gt){(p=t.value&&t.value.drop_side_effect_free(e))&&N.push(p),t.value=null,R.push(t)}else{var p;(p=t.value&&t.value.drop_side_effect_free(e))?(n||e.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",I(t.name)),N.push(p)):n||e[t.name.unreferenced()?"warn":"info"]("Dropping unused variable {name} [{file}:{line},{col}]",I(t.name)),r.eliminated++}}),(R.length>0||w.length>0)&&(s.definitions=R.concat(w),M.push(s)),N.length>0&&M.push(S(ce,s,{body:A(s,N)})),M.length){case 0:return l?f.skip:S(de,s);case 1:return M[0];default:return l?f.splice(M):S(_e,s,{body:M})}}if(s instanceof Ae)return c(s,this),s.init instanceof _e&&(x=s.init,s.init=x.body.pop(),x.body.push(s)),s.init instanceof ce?s.init=s.init.body:C(s.init)&&(s.init=null),x?l?f.splice(x.body):x:s;if(s instanceof Ee&&s.body instanceof Ae){if(c(s,this),s.body instanceof _e){var x=s.body;return s.body=x.body.pop(),x.body.push(s),l?f.splice(x.body):x}return s}if(s instanceof _e)return c(s,this),l&&s.body.every(O)?f.splice(s.body):s;if(s instanceof ye){var k=_;return _=s,c(s,this),_=k,s}}function I(e){return{name:e.name,file:e.start.file,line:e.start.line,col:e.start.col}}});t.transform(E)}}function D(e,n){var i,s=r(e);if(s instanceof Wt&&!p(e.left,xt)&&t.variables.get(s.name)===(i=s.definition()))return e instanceof ht&&(e.right.walk(m),i.chained||e.left.fixed_value()!==e.right||a.set(i.id,e)),!0;if(e instanceof Wt)return i=e.definition(),o.has(i.id)||(o.set(i.id,i),(i=i.redefined())&&o.set(i.id,i)),!0;if(e instanceof ye){var u=_;return _=e,n(),_=u,!0}}}),ye.DEFMETHOD("hoist_declarations",function(e){var t=this;if(e.has_directive("use asm"))return t;if(!Array.isArray(t.body))return t;var n=e.option("hoist_funs"),i=e.option("hoist_vars");if(n||i){var r=[],o=[],a=new Map,s=0,u=0;t.walk(new mn(function(e){return e instanceof ye&&e!==t||(e instanceof Je?(++u,!0):void 0)})),i=i&&u>1;var c=new En(function(u){if(u!==t){if(u instanceof ue)return r.push(u),S(de,u);if(n&&u instanceof Ne&&!(c.parent()instanceof rt)&&c.parent()===t)return o.push(u),S(de,u);if(i&&u instanceof Je){u.definitions.forEach(function(e){e.name instanceof xe||(a.set(e.name.name,e),++s)});var l=u.to_assignments(e),f=c.parent();if(f instanceof ve&&f.init===u){if(null==l){var p=u.definitions[0].name;return S(Wt,p,p)}return l}return f instanceof Ae&&f.init===u?l:l?S(ce,u,{body:l}):S(de,u)}if(u instanceof ye)return u}});if(t=t.transform(c),s>0){var l=[];const e=t instanceof Fe,n=e?t.args_as_names():null;if(a.forEach((t,i)=>{e&&n.some(e=>e.name===t.name.name)?a.delete(i):((t=t.clone()).value=null,l.push(t),a.set(i,t))}),l.length>0){for(var f=0;f0&&(u[0].body=s.concat(u[0].body)),e.body=u;n=u[u.length-1];){var _=n.body[n.body.length-1];if(_ instanceof Ge&&t.loopcontrol_target(_)===e&&n.body.pop(),n.body.length||n instanceof qe&&(o||n.expression.has_side_effects(t)))break;u.pop()===o&&(o=null)}if(0==u.length)return S(_e,e,{body:s.concat(S(ce,e.expression,{body:e.expression}))}).optimize(t);if(1==u.length&&(u[0]===a||u[0]===o)){var d=!1,m=new mn(function(t){if(d||t instanceof Fe||t instanceof ce)return!0;t instanceof Ge&&m.loopcontrol_target(t)===e&&(d=!0)});if(e.walk(m),!d){var E,h=u[0].body.slice();return(E=u[0].expression)&&h.unshift(S(ce,E,{body:E})),h.unshift(S(ce,e.expression,{body:e.expression})),S(_e,e,{body:h}).optimize(t)}}return e;function D(e,n){n&&!Z(n)?n.body=n.body.concat(e.body):L(t,e,s)}}),e($e,function(e,t){if(I(e.body,t),e.bcatch&&e.bfinally&&e.bfinally.body.every(C)&&(e.bfinally=null),t.option("dead_code")&&e.body.every(C)){var n=[];return e.bcatch&&(L(t,e.bcatch,n),n.forEach(function(e){e instanceof Qe&&e.definitions.forEach(function(e){var t=e.name.definition().redefined();t&&(e.name=e.name.clone(),e.name.thedef=t)})})),e.bfinally&&(n=n.concat(e.bfinally.body)),S(_e,e,{body:n}).optimize(t)}return e}),Qe.DEFMETHOD("remove_initializers",function(){var e=[];this.definitions.forEach(function(t){t.name instanceof wt?(t.value=null,e.push(t)):t.name.walk(new mn(function(n){n instanceof wt&&e.push(S(ot,t,{name:n,value:null}))}))}),this.definitions=e}),Qe.DEFMETHOD("to_assignments",function(e){var t=e.option("reduce_vars"),n=this.definitions.reduce(function(e,n){if(!n.value||n.name instanceof xe){if(n.value){var i=S(ot,n,{name:n.name,value:n.value}),r=S(Je,n,{definitions:[i]});e.push(r)}}else{var o=S(Wt,n.name,n.name);e.push(S(ht,n,{operator:"=",left:o,right:n.value})),t&&(o.definition().fixed=!1)}return(n=n.name.definition()).eliminated++,n.replaced--,e},[]);return 0==n.length?null:A(this,n)}),e(Qe,function(e,t){return 0==e.definitions.length?S(de,e):e}),e(it,function(e,t){return e}),e(at,function(e,t){var n=e.expression,i=n;Kt(e,t,e.args);var o=e.args.every(e=>!(e instanceof Oe));t.option("reduce_vars")&&i instanceof Wt&&re(i=i.fixed_value(),t)&&(i=n);var a=i instanceof Fe;if(t.option("unused")&&o&&a&&!i.uses_arguments&&!i.pinned()){for(var s=0,u=0,c=0,l=e.args.length;c=i.argnames.length;if(f||i.argnames[c].__unused){if(D=e.args[c].drop_side_effect_free(t))e.args[s++]=D;else if(!f){e.args[s++]=S(en,e.args[c],{value:0});continue}}else e.args[s++]=e.args[c];u=s}e.args.length=u}if(t.option("unsafe"))if(R(n))switch(n.name){case"Array":if(1!=e.args.length)return S(gt,e,{elements:e.args}).optimize(t);if(e.args[0]instanceof en&&e.args[0].value<=11){const t=[];for(let n=0;n{var n=e.evaluate(t);return p.push(n),e!==n}))try{return H(t,e,S(nn,e,{value:RegExp.apply(RegExp,p)}))}catch(n){t.warn("Error converting {expr} [{file}:{line},{col}]",{expr:e.print_to_string(),file:e.start.file,line:e.start.line,col:e.start.col})}}else if(n instanceof lt)switch(n.property){case"toString":if(0==e.args.length&&!n.expression.may_throw_on_access(t))return S(mt,e,{left:S(Jt,e,{value:""}),operator:"+",right:n.expression}).optimize(t);break;case"join":if(n.expression instanceof gt)e:{var _;if(!(e.args.length>0&&(_=e.args[0].evaluate(t))===e.args[0])){var d,m=[],E=[];for(c=0,l=n.expression.elements.length;c0&&(m.push(S(Jt,e,{value:E.join(_)})),E.length=0),m.push(h))}return E.length>0&&m.push(S(Jt,e,{value:E.join(_)})),0==m.length?S(Jt,e,{value:""}):1==m.length?m[0].is_string(t)?m[0]:S(mt,m[0],{operator:"+",left:S(Jt,e,{value:""}),right:m[0]}):""==_?(d=m[0].is_string(t)||m[1].is_string(t)?m.shift():S(Jt,e,{value:""}),m.reduce(function(e,t){return S(mt,t,{operator:"+",left:e,right:t})},d).optimize(t)):((D=e.clone()).expression=D.expression.clone(),D.expression.expression=D.expression.expression.clone(),D.expression.expression.elements=m,H(t,e,D));var D}}break;case"charAt":if(n.expression.is_string(t)){var g=e.args[0],T=g?g.evaluate(t):0;if(T!==g)return S(ft,n,{expression:n.expression,property:v(0|T,g||n)}).optimize(t)}break;case"apply":if(2==e.args.length&&e.args[1]instanceof gt)return(V=e.args[1].elements.slice()).unshift(e.args[0]),S(at,e,{expression:S(lt,n,{expression:n.expression,property:"call"}),args:V}).optimize(t);break;case"call":var b=n.expression;if(b instanceof Wt&&(b=b.fixed_value()),b instanceof Fe&&!b.contains_this())return(e.args.length?A(this,[e.args[0],S(at,e,{expression:n.expression,args:e.args.slice(1)})]):S(at,e,{expression:n.expression,args:[]})).optimize(t)}if(t.option("unsafe_Function")&&R(n)&&"Function"==n.name){if(0==e.args.length)return S(Re,e,{argnames:[],body:[]}).optimize(t);if(e.args.every(e=>e instanceof Jt))try{var y=ne(N="n(function("+e.args.slice(0,-1).map(function(e){return e.value}).join(",")+"){"+e.args[e.args.length-1].value+"})"),O={ie8:t.option("ie8")};y.figure_out_scope(O);var F,w=new wn(t.options);(y=y.transform(w)).figure_out_scope(O),Rn.reset(),y.compute_char_frequency(O),y.mangle_names(O),y.walk(new mn(function(e){return!!F||(r(e)?(F=e,!0):void 0)})),F.body instanceof oe&&(F.body=[S(Be,F.body,{value:F.body})]);var N=yn();return _e.prototype._codegen.call(F,F,N),e.args=[S(Jt,e,{value:F.argnames.map(function(e){return e.print_to_string()}).join(",")}),S(Jt,e.args[e.args.length-1],{value:N.get().replace(/^{|}$/g,"")})],e}catch(n){if(!(n instanceof W))throw n;t.warn("Error parsing code passed to new Function [{file}:{line},{col}]",e.args[e.args.length-1].start),t.warn(n.toString())}}var k=a&&i.body;k instanceof oe?k=S(Be,k,{value:k}):k&&(k=k[0]);var I=a&&!i.is_generator&&!i.async,L=t.option("inline")&&!e.is_expr_pure(t);if(L&&k instanceof Be&&I&&(!(B=k.value)||B.is_constant_expression())){B=B?B.clone(!0):S(sn,e);var V=e.args.concat(B);return A(e,V).optimize(t)}if(I){var P,B,K,U,G=-1;if(L&&o&&!i.uses_arguments&&!i.pinned()&&!(t.parent()instanceof Ct)&&!(i.name&&i instanceof Re)&&(!(t.find_parent(Fe)instanceof we)||0==i.argnames.length&&(i.body instanceof oe||1==i.body.length))&&(B=function(e){var n=i.body instanceof oe?[i.body]:i.body,r=n.length;if(t.option("inline")<3)return 1==r&&z(e);e=null;for(var o=0;o!e.value))return!1}else{if(e)return!1;a instanceof de||(e=a)}}return z(e)}(k))&&(n===i||t.option("unused")&&1==(P=n.definition()).references.length&&!me(t,P)&&i.is_constant_expression(n.scope))&&!e.pure&&!i.contains_this()&&function(){var n=new Set;do{if(!(K=t.parent(++G)).is_block_scope()||t.parent(G-1)instanceof ye||K.block_scope&&K.block_scope.variables.forEach(function(e){n.add(e.name)}),K instanceof je)K.argname&&n.add(K.argname.name);else if(K instanceof he)U=[];else if(K instanceof Wt&&K.fixed_value()instanceof ye)return!1}while(!(K instanceof ye)||K instanceof we);var r=!(K instanceof Ce)||t.toplevel.vars,o=t.option("inline");return!(!function(e,t){for(var n=i.body.length,r=0;r=0;){var s=o.definitions[a].name;if(s instanceof xe||e.has(s.name)||x.has(s.name)||K.var_names().has(s.name))return!1;U&&U.push(s.definition())}}}return!0}(n,o>=3&&r)||!function(e,t){for(var n=0,r=i.argnames.length;n=2&&r)||!function(){var t=new Set,n=new mn(function(e){if(e instanceof ye){var n=new Set;return e.enclosed.forEach(function(e){n.add(e.name)}),e.variables.forEach(function(e){n.delete(e)}),n.forEach(function(e){t.add(e)}),!0}return!1});if(e.args.forEach(function(e){e.walk(n)}),0==t.size)return!0;for(var r=0,o=i.argnames.length;r=0;){var c=s.definitions[u].name;if(c instanceof xe||t.has(c.name))return!1}}return!0}()||U&&0!=U.length&&Ke(i,U))}()&&!(K instanceof Ct))return i._squeezed=!0,A(e,function(){var n=[],r=[];(function(t,n){for(var r=i.argnames.length,o=e.args.length;--o>=r;)n.push(e.args[o]);for(o=r;--o>=0;){var a=i.argnames[o],s=e.args[o];if(a.__unused||!a.name||K.var_names().has(a.name))s&&n.push(s);else{var u=S(Nt,a,a);a.definition().orig.push(u),!s&&U&&(s=S(sn,e)),Y(t,n,u,s)}}t.reverse(),n.reverse()})(n,r),function(e,t){for(var n=t.length,r=0,o=i.body.length;re.name!=l.name)){var f=i.variables.get(l.name),p=S(Wt,l,l);f.references.push(p),t.splice(n++,0,S(ht,c,{operator:"=",left:p,right:S(sn,l)}))}}}}(n,r),r.push(B),n.length&&(c=K.body.indexOf(t.parent(G-1))+1,K.body.splice(c,0,S(Je,i,{definitions:n})));return r.map(e=>e.clone(!0))}()).optimize(t);if(t.option("side_effects")&&!(i.body instanceof oe)&&i.body.every(C)){V=e.args.concat(S(sn,e));return A(e,V).optimize(t)}}if(t.option("negate_iife")&&t.parent()instanceof ce&&M(e))return e.negate(t,!0);var X=e.evaluate(t);return X!==e?(X=v(X,e).optimize(t),H(t,X,e)):e;function z(t){return t?t instanceof Be?t.value?t.value.clone(!0):S(sn,e):t instanceof ce?S(_t,t,{operator:"void",expression:t.body.clone(!0)}):void 0:S(sn,e)}function Y(t,n,i,r){var o=i.definition();K.variables.set(i.name,o),K.enclosed.push(o),K.var_names().has(i.name)||(K.var_names().add(i.name),t.push(S(ot,i,{name:i,value:null})));var a=S(Wt,i,i);o.references.push(a),r&&n.push(S(ht,e,{operator:"=",left:a,right:r.clone()}))}}),e(st,function(e,t){return t.option("unsafe")&&R(e.expression)&&["Object","RegExp","Function","Error","Array"].includes(e.expression.name)?S(at,e,e).transform(t):e}),e(ut,function(e,t){if(!t.option("side_effects"))return e;var n,i,r=[];n=Sn(t),i=e.expressions.length-1,e.expressions.forEach(function(e,o){o0&&P(r[o],t);)o--;o0)return(n=this.clone()).right=A(this.right,t.slice(o)),(t=t.slice(0,o)).push(n),A(this,t).optimize(e)}}return this});var fe=E("== === != !== * & | ^");function me(e,t){for(var n,i=0;n=e.parent(i);i++)if(n instanceof Fe){var r=n.name;if(r&&r.definition()===t)break}return n}function Te(e,t){return e instanceof Wt||e.TYPE===t.TYPE}function Ke(e,t){var n=!1,r=new mn(function(e){return!!n||(e instanceof Wt&&i(e.definition(),t)?n=!0:void 0)}),o=new mn(function(t){if(n)return!0;if(t instanceof ye&&t!==e){var i=o.parent();if(i instanceof at&&i.expression===t)return;return t.walk(r),!0}});return e.walk(o),n}e(mt,function(e,t){function n(){return e.left.is_constant()||e.right.is_constant()||!e.left.has_side_effects(t)&&!e.right.has_side_effects(t)}function i(t){if(n()){t&&(e.operator=t);var i=e.left;e.left=e.right,e.right=i}}if(fe.has(e.operator)&&e.right.is_constant()&&!e.left.is_constant()&&(e.left instanceof mt&&ee[e.left.operator]>=ee[e.operator]||i()),e=e.lift_sequences(t),t.option("comparisons"))switch(e.operator){case"===":case"!==":var r=!0;(e.left.is_string(t)&&e.right.is_string(t)||e.left.is_number(t)&&e.right.is_number(t)||e.left.is_boolean()&&e.right.is_boolean()||e.left.equivalent_to(e.right))&&(e.operator=e.operator.substr(0,2));case"==":case"!=":if(!r&&P(e.left,t))e.left=S(on,e.left);else if(t.option("typeofs")&&e.left instanceof Jt&&"undefined"==e.left.value&&e.right instanceof _t&&"typeof"==e.right.operator){var o=e.right.expression;(o instanceof Wt?!o.is_declared(t):o instanceof ct&&t.option("ie8"))||(e.right=o,e.left=S(sn,e.left).optimize(t),2==e.operator.length&&(e.operator+="="))}else if(e.left instanceof Wt&&e.right instanceof Wt&&e.left.definition()===e.right.definition()&&((u=e.left.fixed_value())instanceof gt||u instanceof Fe||u instanceof St||u instanceof Ct))return S("="==e.operator[0]?pn:fn,e);break;case"&&":case"||":var a=e.left;if(a.operator==e.operator&&(a=a.right),a instanceof mt&&a.operator==("&&"==e.operator?"!==":"===")&&e.right instanceof mt&&a.operator==e.right.operator&&(P(a.left,t)&&e.right.left instanceof on||a.left instanceof on&&P(e.right.left,t))&&!a.right.has_side_effects(t)&&a.right.equivalent_to(e.right.right)){var s=S(mt,e,{operator:a.operator.slice(0,-1),left:S(on,e),right:a.right});return a!==e.left&&(s=S(mt,e,{operator:e.operator,left:e.left.left,right:s})),s}}var u;if("+"==e.operator&&t.in_boolean_context()){var c=e.left.evaluate(t),l=e.right.evaluate(t);if(c&&"string"==typeof c)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),A(e,[e.right,S(pn,e)]).optimize(t);if(l&&"string"==typeof l)return t.warn("+ in boolean context always true [{file}:{line},{col}]",e.start),A(e,[e.left,S(pn,e)]).optimize(t)}if(t.option("comparisons")&&e.is_boolean()){if(!(t.parent()instanceof mt)||t.parent()instanceof ht){var f=S(_t,e,{operator:"!",expression:e.negate(t,Sn(t))});e=H(t,e,f)}if(t.option("unsafe_comps"))switch(e.operator){case"<":i(">");break;case"<=":i(">=")}}if("+"==e.operator){if(e.right instanceof Jt&&""==e.right.getValue()&&e.left.is_string(t))return e.left;if(e.left instanceof Jt&&""==e.left.getValue()&&e.right.is_string(t))return e.right;if(e.left instanceof mt&&"+"==e.left.operator&&e.left.left instanceof Jt&&""==e.left.left.getValue()&&e.right.is_string(t))return e.left=e.left.right,e.transform(t)}if(t.option("evaluate")){switch(e.operator){case"&&":if(!(c=!!e.left.truthy||!e.left.falsy&&e.left.evaluate(t)))return t.warn("Condition left of && always false [{file}:{line},{col}]",e.start),T(t.parent(),t.self(),e.left).optimize(t);if(!(c instanceof oe))return t.warn("Condition left of && always true [{file}:{line},{col}]",e.start),A(e,[e.left,e.right]).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof oe)){if("&&"==(p=t.parent()).operator&&p.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free && [{file}:{line},{col}]",e.start),e.left.optimize(t)}}else{if(t.in_boolean_context())return t.warn("Boolean && always false [{file}:{line},{col}]",e.start),A(e,[e.left,S(fn,e)]).optimize(t);e.falsy=!0}if("||"==e.left.operator)if(!(_=e.left.right.evaluate(t)))return S(Et,e,{condition:e.left.left,consequent:e.right,alternative:e.left.right}).optimize(t);break;case"||":var p,_;if(!(c=!!e.left.truthy||!e.left.falsy&&e.left.evaluate(t)))return t.warn("Condition left of || always false [{file}:{line},{col}]",e.start),A(e,[e.left,e.right]).optimize(t);if(!(c instanceof oe))return t.warn("Condition left of || always true [{file}:{line},{col}]",e.start),T(t.parent(),t.self(),e.left).optimize(t);if(l=e.right.evaluate(t)){if(!(l instanceof oe)){if(t.in_boolean_context())return t.warn("Boolean || always true [{file}:{line},{col}]",e.start),A(e,[e.left,S(pn,e)]).optimize(t);e.truthy=!0}}else if("||"==(p=t.parent()).operator&&p.left===t.self()||t.in_boolean_context())return t.warn("Dropping side-effect-free || [{file}:{line},{col}]",e.start),e.left.optimize(t);if("&&"==e.left.operator)if((_=e.left.right.evaluate(t))&&!(_ instanceof oe))return S(Et,e,{condition:e.left.left,consequent:e.left.right,alternative:e.right}).optimize(t)}var d=!0;switch(e.operator){case"+":if(e.left instanceof Qt&&e.right instanceof mt&&"+"==e.right.operator&&e.right.left instanceof Qt&&e.right.is_string(t)&&(e=S(mt,e,{operator:"+",left:S(Jt,e.left,{value:""+e.left.getValue()+e.right.left.getValue(),start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof Qt&&e.left instanceof mt&&"+"==e.left.operator&&e.left.right instanceof Qt&&e.left.is_string(t)&&(e=S(mt,e,{operator:"+",left:e.left.left,right:S(Jt,e.right,{value:""+e.left.right.getValue()+e.right.getValue(),start:e.left.right.start,end:e.right.end})})),e.left instanceof mt&&"+"==e.left.operator&&e.left.is_string(t)&&e.left.right instanceof Qt&&e.right instanceof mt&&"+"==e.right.operator&&e.right.left instanceof Qt&&e.right.is_string(t)&&(e=S(mt,e,{operator:"+",left:S(mt,e.left,{operator:"+",left:e.left.left,right:S(Jt,e.left.right,{value:""+e.left.right.getValue()+e.right.left.getValue(),start:e.left.right.start,end:e.right.left.end})}),right:e.right.right})),e.right instanceof _t&&"-"==e.right.operator&&e.left.is_number(t)){e=S(mt,e,{operator:"-",left:e.left,right:e.right.expression});break}if(e.left instanceof _t&&"-"==e.left.operator&&n()&&e.right.is_number(t)){e=S(mt,e,{operator:"-",left:e.right,right:e.left.expression});break}case"*":d=t.option("unsafe_math");case"&":case"|":case"^":if(e.left.is_number(t)&&e.right.is_number(t)&&n()&&!(e.left instanceof mt&&e.left.operator!=e.operator&&ee[e.left.operator]>=ee[e.operator])){var m=S(mt,e,{operator:e.operator,left:e.right,right:e.left});e=e.right instanceof Qt&&!(e.left instanceof Qt)?H(t,m,e):H(t,e,m)}d&&e.is_number(t)&&(e.right instanceof mt&&e.right.operator==e.operator&&(e=S(mt,e,{operator:e.operator,left:S(mt,e.left,{operator:e.operator,left:e.left,right:e.right.left,start:e.left.start,end:e.right.left.end}),right:e.right.right})),e.right instanceof Qt&&e.left instanceof mt&&e.left.operator==e.operator&&(e.left.left instanceof Qt?e=S(mt,e,{operator:e.operator,left:S(mt,e.left,{operator:e.operator,left:e.left.left,right:e.right,start:e.left.left.start,end:e.right.end}),right:e.left.right}):e.left.right instanceof Qt&&(e=S(mt,e,{operator:e.operator,left:S(mt,e.left,{operator:e.operator,left:e.left.right,right:e.right,start:e.left.right.start,end:e.right.end}),right:e.left.left}))),e.left instanceof mt&&e.left.operator==e.operator&&e.left.right instanceof Qt&&e.right instanceof mt&&e.right.operator==e.operator&&e.right.left instanceof Qt&&(e=S(mt,e,{operator:e.operator,left:S(mt,e.left,{operator:e.operator,left:S(mt,e.left.left,{operator:e.operator,left:e.left.right,right:e.right.left,start:e.left.right.start,end:e.right.left.end}),right:e.left.left}),right:e.right.right})))}}if(e.right instanceof mt&&e.right.operator==e.operator&&(B.has(e.operator)||"+"==e.operator&&(e.right.left.is_string(t)||e.left.is_string(t)&&e.right.right.is_string(t))))return e.left=S(mt,e.left,{operator:e.operator,left:e.left,right:e.right.left}),e.right=e.right.right,e.transform(t);var E=e.evaluate(t);return E!==e?(E=v(E,e).optimize(t),H(t,E,e)):e}),e(Yt,function(e,t){return e}),e(Wt,function(e,t){if(!t.option("ie8")&&R(e)&&(!e.scope.uses_with||!t.find_parent(be)))switch(e.name){case"undefined":return S(sn,e).optimize(t);case"NaN":return S(an,e).optimize(t);case"Infinity":return S(cn,e).optimize(t)}var n=t.parent();if(t.option("reduce_vars")&&U(e,n)!==e){var i=e.definition();if(t.top_retain&&i.global&&t.top_retain(i))return i.fixed=!1,i.should_replace=!1,i.single_use=!1,e;var o=e.fixed_value(),a=i.single_use&&!(n instanceof at&&n.is_expr_pure(t));if(a&&(o instanceof Fe||o instanceof Ct))if(re(o,t))a=!1;else if(i.scope!==e.scope&&(!t.option("reduce_funcs")&&o instanceof Fe||1==i.escaped||o.inlined||function(e){for(var t,n=0;t=e.parent(n++);){if(t instanceof ae)return!1;if(t instanceof gt||t instanceof vt||t instanceof St)return!0}return!1}(t)))a=!1;else if(me(t,i))a=!1;else if((i.scope!==e.scope||i.orig[0]instanceof Lt)&&"f"==(a=o.is_constant_expression(e.scope))){var s=e.scope;do{(s instanceof Ne||r(s))&&(s.inlined=!0)}while(s=s.parent_scope)}if(a&&o){var u;if(o instanceof Ot&&(o=S(Ft,o,o)),o instanceof Ne&&(o._squeezed=!0,o=S(Re,o,o)),i.recursive_refs>0&&o.name instanceof Vt){var c=(u=o.clone(!0)).name.definition(),l=u.variables.get(u.name.name),f=l&&l.orig[0];f instanceof Bt||((f=S(Bt,u.name,u.name)).scope=u,u.name=f,l=u.def_function(f)),u.walk(new mn(function(e){e instanceof Wt&&e.definition()===c&&(e.thedef=l,l.references.push(e))}))}else u=o.optimize(t);return u}if(o&&void 0===i.should_replace){var p;if(o instanceof jt)i.orig[0]instanceof Lt||!i.references.every(e=>i.scope===e.scope)||(p=o);else{var _=o.evaluate(t);_===o||!t.option("unsafe_regexp")&&_ instanceof RegExp||(p=v(_,o))}if(p){var d,m=p.optimize(t).print_to_string().length;!function(e){var t;return e.walk(new mn(function(e){if(e instanceof Wt&&(t=!0),t)return!0})),t}(o)?(m=Math.min(m,o.print_to_string().length),d=function(){var e=G(p.optimize(t),o);return e===p||e===o?e.clone(!0):e}):d=function(){var e=p.optimize(t);return e===p?e.clone(!0):e};var E=i.name.length,h=0;t.option("unused")&&!t.exposed(i)&&(h=(E+2+m)/(i.references.length-i.assignments)),i.should_replace=m<=E+h&&d}else i.should_replace=!1}if(i.should_replace)return i.should_replace()}return e}),e(sn,function(e,t){if(t.option("unsafe_undefined")){var n=m(t,"undefined");if(n){var i=S(Wt,e,{name:"undefined",scope:n.scope,thedef:n});return i.is_undefined=!0,i}}var r=U(t.self(),t.parent());return r&&Te(r,e)?e:S(_t,e,{operator:"void",expression:S(en,e,{value:0})})}),e(cn,function(e,t){var n=U(t.self(),t.parent());return n&&Te(n,e)?e:!t.option("keep_infinity")||n&&!Te(n,e)||m(t,"Infinity")?S(mt,e,{operator:"/",left:S(en,e,{value:1}),right:S(en,e,{value:0})}):e}),e(an,function(e,t){var n=U(t.self(),t.parent());return n&&!Te(n,e)||m(t,"NaN")?S(mt,e,{operator:"/",left:S(en,e,{value:0}),right:S(en,e,{value:0})}):e});const nt=E("+ - / * % >> << >>> | ^ &"),Tt=E("* | ^ &");function Rt(e,t){return e instanceof Wt&&(e=e.fixed_value()),!!e&&(!(e instanceof Fe||e instanceof Ct)||t.parent()instanceof st||!e.contains_this())}function It(e,t){return t.in_boolean_context()?H(t,e,A(e,[e,S(pn,e)]).optimize(t)):e}function Kt(e,t,n){for(var i=0;i0&&s.args.length==u.args.length&&s.expression.equivalent_to(u.expression)&&!e.condition.has_side_effects(t)&&!s.expression.has_side_effects(t)&&"number"==typeof(o=function(){for(var e=s.args,t=u.args,n=0,i=e.length;n1)&&(p=null)}else if(!p&&!t.option("keep_fargs")&&s=n.argnames.length;)p=S(Lt,n,{name:n.make_var_name("argument_"+n.argnames.length),scope:n}),n.argnames.push(p),n.enclosed.push(n.def_variable(p));if(p){var d=S(Wt,e,p);return d.reference({}),delete p.__unused,d}}if(U(e,t.parent()))return e;if(o!==r){var m=e.flatten_object(a,t);m&&(i=e.expression=m.expression,r=e.property=m.property)}if(t.option("properties")&&t.option("side_effects")&&r instanceof en&&i instanceof gt){s=r.getValue();var E=i.elements,h=E[s];e:if(Rt(h,t)){for(var D=!0,g=[],T=E.length;--T>s;){(b=E[T].drop_side_effect_free(t))&&(g.unshift(b),D&&b.has_side_effects(t)&&(D=!1))}if(h instanceof Oe)break e;for(h=h instanceof un?S(sn,h):h,D||g.unshift(h);--T>=0;){var b;if((b=E[T])instanceof Oe)break e;(b=b.drop_side_effect_free(t))?g.unshift(b):s--}return D?(g.push(h),A(e,g).optimize(t)):S(ft,e,{expression:S(gt,i,{elements:g}),property:S(en,r,{value:s})})}}var y=e.evaluate(t);return y!==e?H(t,y=v(y,e).optimize(t),e):e}),Fe.DEFMETHOD("contains_this",function(){var e,t=this;return t.walk(new mn(function(n){return!!e||(n instanceof jt?e=!0:n!==t&&n instanceof ye&&!(n instanceof we)||void 0)})),e}),ct.DEFMETHOD("flatten_object",function(e,t){if(t.option("properties")){var n=t.option("unsafe_arrows")&&t.option("ecma")>=6,i=this.expression;if(i instanceof St)for(var r=i.properties,o=r.length;--o>=0;){var a=r[o];if(""+(a instanceof yt?a.key.name:a.key)==e){if(!r.every(e=>e instanceof vt||n&&e instanceof yt&&!e.is_generator))break;if(!Rt(a.value,t))break;return S(ft,this,{expression:S(gt,i,{elements:r.map(function(e){var t=e.value;t instanceof Me&&(t=S(Re,t,t));var n=e.key;return n instanceof oe&&!(n instanceof Pt)?A(e,[n,t]):t})}),property:S(en,this,{value:o})})}}}}),e(lt,function(e,t){if("arguments"!=e.property&&"caller"!=e.property||t.warn("Function.prototype.{prop} not supported [{file}:{line},{col}]",{prop:e.property,file:e.start.file,line:e.start.line,col:e.start.col}),U(e,t.parent()))return e;if(t.option("unsafe_proto")&&e.expression instanceof lt&&"prototype"==e.expression.property){var n=e.expression.expression;if(R(n))switch(n.name){case"Array":e.expression=S(gt,e.expression,{elements:[]});break;case"Function":e.expression=S(Re,e.expression,{argnames:[],body:[]});break;case"Number":e.expression=S(en,e.expression,{value:0});break;case"Object":e.expression=S(St,e.expression,{properties:[]});break;case"RegExp":e.expression=S(nn,e.expression,{value:/t/});break;case"String":e.expression=S(Jt,e.expression,{value:""})}}var i=e.flatten_object(e.property,t);if(i)return i.optimize(t);var r=e.evaluate(t);return r!==e?H(t,r=v(r,e).optimize(t),e):e}),e(gt,function(e,t){var n=It(e,t);return n!==e?n:Kt(e,0,e.elements)}),e(St,function(e,t){var n=It(e,t);if(n!==e)return n;for(var i=e.properties,r=0;r=6&&!e.name&&!e.is_generator&&!e.uses_arguments&&!e.pinned()){var n=!1;if(e.walk(new mn(function(e){return!!n||(e instanceof jt?(n=!0,!0):void 0)})),!n)return S(we,e,e).optimize(t)}return e}),e(Ct,function(e,t){return e}),e(dn,function(e,t){return e.expression&&!e.is_star&&P(e.expression,t)&&(e.expression=null),e}),e(Ie,function(e,t){if(!t.option("evaluate")||t.parent()instanceof ke)return e;for(var n=[],i=0;i=6&&(!(n instanceof RegExp)||n.test(e.key+""))){var i=e.key,r=e.value;if((r instanceof we&&Array.isArray(r.body)&&!r.contains_this()||r instanceof Re)&&!r.name)return S(yt,e,{async:r.async,is_generator:r.is_generator,key:i instanceof oe?i:S(Pt,e,{name:i}),value:S(Me,r,r),quote:e.quote})}return e}),e(xe,function(e,t){if(1==t.option("pure_getters")&&t.option("unused")&&!e.is_array&&Array.isArray(e.names)&&!function(e){for(var t=[/^VarDef$/,/^(Const|Let|Var)$/,/^Export$/],n=0,i=0,r=t.length;n1)throw new Error("inline source map only works with singular input");n.sourceMap.content=(i=e[f],r=void 0,(r=/(?:^|[^.])\/\/# sourceMappingURL=data:application\/json(;[\w=-]*)?;base64,([+\/0-9A-Za-z]*=*)\s*$/.exec(i))?Ln(r[2]):(oe.warn("inline source map not found"),null))}c=n.parse.toplevel}s&&"strict"!==n.mangle.properties.keep_quoted&&xn(c,s),n.wrap&&(c=c.wrap_commonjs(n.wrap)),n.enclose&&(c=c.wrap_enclose(n.enclose)),u&&(u.rename=Date.now()),u&&(u.compress=Date.now()),n.compress&&(c=new wn(n.compress).compress(c)),u&&(u.scope=Date.now()),n.mangle&&c.figure_out_scope(n.mangle),u&&(u.mangle=Date.now()),n.mangle&&(Rn.reset(),c.compute_char_frequency(n.mangle),c.mangle_names(n.mangle)),u&&(u.properties=Date.now()),n.mangle&&n.mangle.properties&&(c=In(c,n.mangle.properties)),u&&(u.output=Date.now());var p={};if(n.output.ast&&(p.ast=c),!D(n.output,"code")||n.output.code){if(n.sourceMap&&("string"==typeof n.sourceMap.content&&(n.sourceMap.content=JSON.parse(n.sourceMap.content)),n.output.source_map=function(e){e=o(e,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var n=new t.SourceMapGenerator({file:e.file,sourceRoot:e.root}),i=e.orig&&new t.SourceMapConsumer(e.orig);return i&&i.sources.forEach(function(e){var t=i.sourceContentFor(e,!0);t&&n.setSourceContent(e,t)}),{add:function(t,r,o,a,s,u){if(i){var c=i.originalPositionFor({line:a,column:s});if(null===c.source)return;t=c.source,a=c.line,s=c.column,u=c.name||u}n.addMapping({generated:{line:r+e.dest_line_diff,column:o},original:{line:a+e.orig_line_diff,column:s},source:t,name:u})},get:function(){return n},toString:function(){return JSON.stringify(n.toJSON())}}}({file:n.sourceMap.filename,orig:n.sourceMap.content,root:n.sourceMap.root}),n.sourceMap.includeSources)){if(e instanceof Ce)throw new Error("original source content unavailable");for(var f in e)D(e,f)&&n.output.source_map.get().setSourceContent(f,e[f])}delete n.output.ast,delete n.output.code;var _=yn(n.output);c.print(_),p.code=_.get(),n.sourceMap&&(p.map=n.output.source_map.toString(),"inline"==n.sourceMap.url?p.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+Vn(p.map):n.sourceMap.url&&(p.code+="\n//# sourceMappingURL="+n.sourceMap.url))}return n.nameCache&&n.mangle&&(n.mangle.cache&&(n.nameCache.vars=Kn(n.mangle.cache)),n.mangle.properties&&n.mangle.properties.cache&&(n.nameCache.props=Kn(n.mangle.properties.cache))),u&&(u.end=Date.now(),p.timings={parse:.001*(u.rename-u.parse),rename:.001*(u.compress-u.rename),compress:.001*(u.scope-u.compress),scope:.001*(u.mangle-u.scope),mangle:.001*(u.properties-u.mangle),properties:.001*(u.output-u.properties),output:.001*(u.end-u.output),total:.001*(u.end-u.start)}),l.length&&(p.warnings=l),p}catch(e){return{error:e}}finally{oe.warn_function=a}}function Gn(e){var t=Un("",e);return t.error&&t.error.defs}!function(){var e=function(e){for(var t=!0,n=0;n2){var n=a[a.length-2];"FunctionDeclaration"!==n.type&&"FunctionExpression"!==n.type&&"ArrowFunctionExpression"!==n.type||(t=Dt)}return new t({start:i(e),end:r(e),left:s(e.left),operator:"=",right:s(e.right)})},SpreadElement:function(e){return new Oe({start:i(e),end:r(e),expression:s(e.argument)})},RestElement:function(e){return new Oe({start:i(e),end:r(e),expression:s(e.argument)})},TemplateElement:function(e){return new Le({start:i(e),end:r(e),value:e.value.cooked,raw:e.value.raw})},TemplateLiteral:function(e){for(var t=[],n=0;n1||e.guardedHandlers&&e.guardedHandlers.length)throw new Error("Multiple catch clauses are not supported.");return new $e({start:i(e),end:r(e),body:s(e.block).body,bcatch:s(t[0]),bfinally:e.finalizer?new Ze(s(e.finalizer)):null})},Property:function(e){var t=e.key,n={start:i(t||e.value),end:r(e.value),key:"Identifier"==t.type?t.name:t.value,value:s(e.value)};return e.computed&&(n.key=s(e.key)),e.method?(n.is_generator=e.value.generator,n.async=e.value.async,e.computed?n.key=s(e.key):n.key=new Pt({name:n.key}),new yt(n)):"init"==e.kind?("Identifier"!=t.type&&"Literal"!=t.type&&(n.key=s(t)),new vt(n)):("string"!=typeof n.key&&"number"!=typeof n.key||(n.key=new Pt({name:n.key})),n.value=new Me(n.value),"get"==e.kind?new bt(n):"set"==e.kind?new Tt(n):"method"==e.kind?(n.async=e.value.async,n.is_generator=e.value.generator,n.quote=e.computed?'"':null,new yt(n)):void 0)},MethodDefinition:function(e){var t={start:i(e),end:r(e),key:e.computed?s(e.key):new Pt({name:e.key.name||e.key.value}),value:s(e.value),static:e.static};return"get"==e.kind?new bt(t):"set"==e.kind?new Tt(t):(t.is_generator=e.value.generator,t.async=e.value.async,new yt(t))},ArrayExpression:function(e){return new gt({start:i(e),end:r(e),elements:e.elements.map(function(e){return null===e?new un:s(e)})})},ObjectExpression:function(e){return new St({start:i(e),end:r(e),properties:e.properties.map(function(e){return"SpreadElement"===e.type?s(e):(e.type="Property",s(e))})})},SequenceExpression:function(e){return new ut({start:i(e),end:r(e),expressions:e.expressions.map(s)})},MemberExpression:function(e){return new(e.computed?ft:lt)({start:i(e),end:r(e),property:e.computed?s(e.property):e.property.name,expression:s(e.object)})},SwitchCase:function(e){return new(e.test?qe:Ye)({start:i(e),end:r(e),expression:s(e.test),body:e.consequent.map(s)})},VariableDeclaration:function(e){return new("const"===e.kind?tt:"let"===e.kind?et:Je)({start:i(e),end:r(e),definitions:e.declarations.map(s)})},ImportDeclaration:function(e){var t=null,n=null;return e.specifiers.forEach(function(e){"ImportSpecifier"===e.type?(n||(n=[]),n.push(new nt({start:i(e),end:r(e),foreign_name:s(e.imported),name:s(e.local)}))):"ImportDefaultSpecifier"===e.type?t=s(e.local):"ImportNamespaceSpecifier"===e.type&&(n||(n=[]),n.push(new nt({start:i(e),end:r(e),foreign_name:new Xt({name:"*"}),name:s(e.local)})))}),new it({start:i(e),end:r(e),imported_name:t,imported_names:n,module_name:s(e.source)})},ExportAllDeclaration:function(e){return new rt({start:i(e),end:r(e),exported_names:[new nt({name:new qt({name:"*"}),foreign_name:new qt({name:"*"})})],module_name:s(e.source)})},ExportNamedDeclaration:function(e){return new rt({start:i(e),end:r(e),exported_definition:s(e.declaration),exported_names:e.specifiers&&e.specifiers.length?e.specifiers.map(function(e){return new nt({foreign_name:s(e.exported),name:s(e.local)})}):null,module_name:s(e.source)})},ExportDefaultDeclaration:function(e){return new rt({start:i(e),end:r(e),exported_value:s(e.declaration),is_default:!0})},Literal:function(e){var t=e.value,n={start:i(e),end:r(e)};if(null===t)return new on(n);var o=e.regex;if(o&&o.pattern){n.value=new RegExp(o.pattern,o.flags);var a=n.value.toString();return n.value.raw_source=o.flags?a.substring(0,a.length-o.flags.length)+o.flags:a,new nn(n)}if(o)return n.value=e.regex&&e.raw?e.raw:t,new nn(n);switch(typeof t){case"string":return n.value=t,new Jt(n);case"number":return n.value=t,new en(n);case"boolean":return new(t?pn:fn)(n)}},MetaProperty:function(e){if("new"===e.meta.name&&"target"===e.property.name)return new Rt({start:i(e),end:r(e)})},Identifier:function(e){var t=a[a.length-2];return new("LabeledStatement"==t.type?zt:"VariableDeclarator"==t.type&&t.id===e?"const"==t.kind?kt:"let"==t.kind?It:Nt:/Import.*Specifier/.test(t.type)?t.local===e?Ht:Xt:"ExportSpecifier"==t.type?t.local===e?Yt:qt:"FunctionExpression"==t.type?t.id===e?Bt:Lt:"FunctionDeclaration"==t.type?t.id===e?Vt:Lt:"ArrowFunctionExpression"==t.type?t.params.includes(e)?Lt:Wt:"ClassExpression"==t.type?t.id===e?Ut:Wt:"Property"==t.type?t.key===e&&t.computed||t.value===e?Wt:Pt:"ClassDeclaration"==t.type?t.id===e?Kt:Wt:"MethodDefinition"==t.type?t.computed?Wt:Pt:"CatchClause"==t.type?Gt:"BreakStatement"==t.type||"ContinueStatement"==t.type?$t:Wt)({start:i(e),end:r(e),name:e.name})},BigIntLiteral:e=>new tn({start:i(e),end:r(e),value:e.value})};function n(e){if("Literal"==e.type)return null!=e.raw?e.raw:e.value+""}function i(e){var t=e.loc,i=t&&t.start,r=e.range;return new re({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[0]:e.start,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[0]:e.start,raw:n(e)})}function r(e){var t=e.loc,i=t&&t.end,r=e.range;return new re({file:t&&t.source,line:i&&i.line,col:i&&i.column,pos:r?r[1]:e.end,endline:i&&i.line,endcol:i&&i.column,endpos:r?r[1]:e.end,raw:n(e)})}function o(e,n,o){var a="function From_Moz_"+e+"(M){\n";a+="return new U2."+n.name+"({\nstart: my_start_token(M),\nend: my_end_token(M)";var c="function To_Moz_"+e+"(M){\n";c+="return {\ntype: "+JSON.stringify(e),o&&o.split(/\s*,\s*/).forEach(function(e){var t=/([a-z0-9$_]+)([=@>%])([a-z0-9$_]+)/i.exec(e);if(!t)throw new Error("Can't understand property map: "+e);var n=t[1],i=t[2],r=t[3];switch(a+=",\n"+r+": ",c+=",\n"+n+": ",i){case"@":a+="M."+n+".map(from_moz)",c+="M."+r+".map(to_moz)";break;case">":a+="from_moz(M."+n+")",c+="to_moz(M."+r+")";break;case"=":a+="M."+n,c+="M."+r;break;case"%":a+="from_moz(M."+n+").body",c+="to_moz_block(M)";break;default:throw new Error("Can't understand operator in propmap: "+e)}}),a+="\n})\n}",c+="\n}\n}",a=new Function("U2","my_start_token","my_end_token","from_moz","return("+a+")")(hn,i,r,s),c=new Function("to_moz","to_moz_block","to_moz_scope","return("+c+")")(l,p,_),t[e]=a,u(n,c)}t.UpdateExpression=t.UnaryExpression=function(e){return new(("prefix"in e?e.prefix:"UnaryExpression"==e.type)?_t:dt)({start:i(e),end:r(e),operator:e.operator,expression:s(e.argument)})},t.ClassDeclaration=t.ClassExpression=function(e){return new("ClassDeclaration"===e.type?Ot:Ft)({start:i(e),end:r(e),name:s(e.id),extends:s(e.superClass),properties:e.body.body.map(s)})},o("EmptyStatement",de),o("BlockStatement",_e,"body@body"),o("IfStatement",Xe,"test>condition, consequent>body, alternate>alternative"),o("LabeledStatement",Ee,"label>label, body>body"),o("BreakStatement",Ge,"label>label"),o("ContinueStatement",He,"label>label"),o("WithStatement",be,"object>expression, body>body"),o("SwitchStatement",ze,"discriminant>expression, cases@body"),o("ReturnStatement",Be,"argument>value"),o("ThrowStatement",Ke,"argument>value"),o("WhileStatement",Se,"test>condition, body>body"),o("DoWhileStatement",ge,"test>condition, body>body"),o("ForStatement",Ae,"init>init, test>condition, update>step, body>body"),o("ForInStatement",ve,"left>init, right>object, body>body"),o("ForOfStatement",Te,"left>init, right>object, body>body, await=await"),o("AwaitExpression",_n,"argument>expression"),o("YieldExpression",dn,"argument>expression, delegate=is_star"),o("DebuggerStatement",se),o("VariableDeclarator",ot,"id>name, init>value"),o("CatchClause",je,"param>argname, body%body"),o("ThisExpression",jt),o("Super",Zt),o("BinaryExpression",mt,"operator=operator, left>left, right>right"),o("LogicalExpression",mt,"operator=operator, left>left, right>right"),o("AssignmentExpression",ht,"operator=operator, left>left, right>right"),o("ConditionalExpression",Et,"test>condition, consequent>consequent, alternate>alternative"),o("NewExpression",st,"callee>expression, arguments@args"),o("CallExpression",at,"callee>expression, arguments@args"),u(Ce,function(e){return _("Program",e)}),u(Oe,function(e,t){return{type:f()?"RestElement":"SpreadElement",argument:l(e.expression)}}),u(ke,function(e){return{type:"TaggedTemplateExpression",tag:l(e.prefix),quasi:l(e.template_string)}}),u(Ie,function(e){for(var t=[],n=[],i=0;i({type:"BigIntLiteral",value:e.value})),ln.DEFMETHOD("to_mozilla_ast",Qt.prototype.to_mozilla_ast),on.DEFMETHOD("to_mozilla_ast",Qt.prototype.to_mozilla_ast),un.DEFMETHOD("to_mozilla_ast",function(){return null}),pe.DEFMETHOD("to_mozilla_ast",_e.prototype.to_mozilla_ast),Fe.DEFMETHOD("to_mozilla_ast",Re.prototype.to_mozilla_ast);var a=null;function s(e){a.push(e);var n=null!=e?t[e.type](e):null;return a.pop(),n}function u(e,t){e.DEFMETHOD("to_mozilla_ast",function(e){return n=this,i=t(this,e),r=n.start,o=n.end,null!=r.pos&&null!=o.endpos&&(i.range=[r.pos,o.endpos]),r.line&&(i.loc={start:{line:r.line,column:r.col},end:o.endline?{line:o.endline,column:o.endcol}:null},r.file&&(i.loc.source=r.file)),i;var n,i,r,o})}oe.from_mozilla_ast=function(e){var t=a;a=[];var n=s(e);return a=t,n};var c=null;function l(e){null===c&&(c=[]),c.push(e);var t=null!=e?e.to_mozilla_ast(c[c.length-2]):null;return c.pop(),0===c.length&&(c=null),t}function f(){for(var e=c.length;e--;)if(c[e]instanceof xe)return!0;return!1}function p(e){return{type:"BlockStatement",body:e.body.map(l)}}function _(e,t){var n=t.body.map(l);return t.body[0]instanceof ce&&t.body[0].body instanceof Jt&&n.unshift(l(new de(t.body[0]))),{type:e,body:n}}}(),e.AST_Accessor=Me,e.AST_Array=gt,e.AST_Arrow=we,e.AST_Assign=ht,e.AST_Atom=rn,e.AST_Await=_n,e.AST_Binary=mt,e.AST_Block=pe,e.AST_BlockStatement=_e,e.AST_Boolean=ln,e.AST_Break=Ge,e.AST_Call=at,e.AST_Case=qe,e.AST_Catch=je,e.AST_Class=Ct,e.AST_ClassExpression=Ft,e.AST_ConciseMethod=yt,e.AST_Conditional=Et,e.AST_Const=tt,e.AST_Constant=Qt,e.AST_Continue=He,e.AST_DWLoop=De,e.AST_Debugger=se,e.AST_DefClass=Ot,e.AST_Default=Ye,e.AST_DefaultAssign=Dt,e.AST_Definitions=Qe,e.AST_Defun=Ne,e.AST_Destructuring=xe,e.AST_Directive=ue,e.AST_Do=ge,e.AST_Dot=lt,e.AST_EmptyStatement=de,e.AST_Exit=Pe,e.AST_Expansion=Oe,e.AST_Export=rt,e.AST_False=fn,e.AST_Finally=Ze,e.AST_For=Ae,e.AST_ForIn=ve,e.AST_ForOf=Te,e.AST_Function=Re,e.AST_Hole=un,e.AST_If=Xe,e.AST_Import=it,e.AST_Infinity=cn,e.AST_IterationStatement=he,e.AST_Jump=Ve,e.AST_Label=zt,e.AST_LabelRef=$t,e.AST_LabeledStatement=Ee,e.AST_Lambda=Fe,e.AST_Let=et,e.AST_LoopControl=Ue,e.AST_NaN=an,e.AST_NameMapping=nt,e.AST_New=st,e.AST_NewTarget=Rt,e.AST_Node=oe,e.AST_Null=on,e.AST_Number=en,e.AST_Object=St,e.AST_ObjectGetter=bt,e.AST_ObjectKeyVal=vt,e.AST_ObjectProperty=At,e.AST_ObjectSetter=Tt,e.AST_PrefixedTemplateString=ke,e.AST_PropAccess=ct,e.AST_RegExp=nn,e.AST_Return=Be,e.AST_Scope=ye,e.AST_Sequence=ut,e.AST_SimpleStatement=ce,e.AST_Statement=ae,e.AST_StatementWithBody=me,e.AST_String=Jt,e.AST_Sub=ft,e.AST_Super=Zt,e.AST_Switch=ze,e.AST_SwitchBranch=We,e.AST_Symbol=Mt,e.AST_SymbolBlockDeclaration=xt,e.AST_SymbolCatch=Gt,e.AST_SymbolClass=Ut,e.AST_SymbolConst=kt,e.AST_SymbolDeclaration=wt,e.AST_SymbolDefClass=Kt,e.AST_SymbolDefun=Vt,e.AST_SymbolExport=Yt,e.AST_SymbolExportForeign=qt,e.AST_SymbolFunarg=Lt,e.AST_SymbolImport=Ht,e.AST_SymbolImportForeign=Xt,e.AST_SymbolLambda=Bt,e.AST_SymbolLet=It,e.AST_SymbolMethod=Pt,e.AST_SymbolRef=Wt,e.AST_SymbolVar=Nt,e.AST_TemplateSegment=Le,e.AST_TemplateString=Ie,e.AST_This=jt,e.AST_Throw=Ke,e.AST_Token=re,e.AST_Toplevel=Ce,e.AST_True=pn,e.AST_Try=$e,e.AST_Unary=pt,e.AST_UnaryPostfix=dt,e.AST_UnaryPrefix=_t,e.AST_Undefined=sn,e.AST_Var=Je,e.AST_VarDef=ot,e.AST_While=Se,e.AST_With=be,e.AST_Yield=dn,e.Compressor=wn,e.OutputStream=yn,e.TreeTransformer=En,e.TreeWalker=mn,e._JS_Parse_Error=W,e._tokenizer=j,e.base54=Rn,e.default_options=function(){const e={};return Object.keys(Gn({0:0})).forEach(t=>{const n=Gn({[t]:{0:0}});n&&(e[t]=n)}),e},e.defaults=o,e.mangle_properties=In,e.minify=Un,e.parse=ne,e.push_uniq=p,e.reserve_quoted_keys=xn,e.string_template=_,e.to_ascii=Ln}); //# sourceMappingURL=bundle.min.js.map