UNPKG

vite-plugin-remove-console

Version:

A vite plugin that remove the types of console in the production environment

5 lines (3 loc) 1.18 MB
'use strict'; var path = require('path'); var zB=Object.create;var D1=Object.defineProperty;var XB=Object.getOwnPropertyDescriptor;var KB=Object.getOwnPropertyNames;var JB=Object.getPrototypeOf,WB=Object.prototype.hasOwnProperty;var am=(ie=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(ie,{get:(Se,ze)=>(typeof require<"u"?require:Se)[ze]}):ie)(function(ie){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+ie+'" is not supported')});var GB=(ie,Se)=>()=>(Se||ie((Se={exports:{}}).exports,Se),Se.exports);var YB=(ie,Se,ze,xr)=>{if(Se&&typeof Se=="object"||typeof Se=="function")for(let Bt of KB(Se))!WB.call(ie,Bt)&&Bt!==ze&&D1(ie,Bt,{get:()=>Se[Bt],enumerable:!(xr=XB(Se,Bt))||xr.enumerable});return ie};var HB=(ie,Se,ze)=>(ze=ie!=null?zB(JB(ie)):{},YB(Se||!ie||!ie.__esModule?D1(ze,"default",{value:ie,enumerable:!0}):ze,ie));var C1=GB((om,um)=>{(function(ie,Se){typeof om=="object"&&typeof um<"u"?um.exports=Se():typeof define=="function"&&define.amd?define(Se):(ie=typeof globalThis<"u"?globalThis:ie||self).gogocode=Se();})(om,function(){var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Se(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}});}),e}var ze=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function xr(){throw new Error("setTimeout has not been defined")}function Bt(){throw new Error("clearTimeout has not been defined")}var Lt=xr,Tt=Bt;function ls(t){if(Lt===setTimeout)return setTimeout(t,0);if((Lt===xr||!Lt)&&setTimeout)return Lt=setTimeout,setTimeout(t,0);try{return Lt(t,0)}catch{try{return Lt.call(null,t,0)}catch{return Lt.call(this,t,0)}}}typeof ze.setTimeout=="function"&&(Lt=setTimeout),typeof ze.clearTimeout=="function"&&(Tt=clearTimeout);var vn,vr=[],ps=!1,Ua=-1;function N1(){ps&&vn&&(ps=!1,vn.length?vr=vn.concat(vr):Ua=-1,vr.length&&cm());}function cm(){if(!ps){var t=ls(N1);ps=!0;for(var e=vr.length;e;){for(vn=vr,vr=[];++Ua<e;)vn&&vn[Ua].run();Ua=-1,e=vr.length;}vn=null,ps=!1,function(r){if(Tt===clearTimeout)return clearTimeout(r);if((Tt===Bt||!Tt)&&clearTimeout)return Tt=clearTimeout,clearTimeout(r);try{Tt(r);}catch{try{return Tt.call(null,r)}catch{return Tt.call(this,r)}}}(t);}}function Kt(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];vr.push(new lm(t,e)),vr.length!==1||ps||ls(cm);}function lm(t,e){this.fun=t,this.array=e;}lm.prototype.run=function(){this.fun.apply(null,this.array);};function Fn(){}var _1=Fn,O1=Fn,F1=Fn,I1=Fn,B1=Fn,L1=Fn,M1=Fn,hs=ze.performance||{},R1=hs.now||hs.mozNow||hs.msNow||hs.oNow||hs.webkitNow||function(){return new Date().getTime()},j1=new Date,G={nextTick:Kt,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:_1,addListener:O1,once:F1,off:I1,removeListener:B1,removeAllListeners:L1,emit:M1,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return "/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*R1.call(hs),r=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(r-=t[0],(n-=t[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return (new Date-j1)/1e3}},ir={},ci=Se(Object.freeze({__proto__:null,default:{}})),Yr={},Qc=function(t,e){return Qc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n;}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s]);},Qc(t,e)},Zc=function(){return Zc=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Zc.apply(this,arguments)},el=Object.create?function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s);}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r];};function pm(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return {next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function hm(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n,s,i=r.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(n=i.next()).done;)a.push(n.value);}catch(o){s={error:o};}finally{try{n&&!n.done&&(r=i.return)&&r.call(i);}finally{if(s)throw s.error}}return a}function li(t){return this instanceof li?(this.v=t,this):new li(t)}var U1=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e});}:function(t,e){t.default=e;},$1=Object.freeze({__proto__:null,__extends:function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t;}Qc(t,e),t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r);},get __assign(){return Zc},__rest:function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);}return r},__decorate:function(t,e,r,n){var s,i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var o=t.length-1;o>=0;o--)(s=t[o])&&(a=(i<3?s(a):i>3?s(e,r,a):s(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},__param:function(t,e){return function(r,n){e(r,n,t);}},__metadata:function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)},__awaiter:function(t,e,r,n){return new(r||(r=Promise))(function(s,i){function a(u){try{c(n.next(u));}catch(l){i(l);}}function o(u){try{c(n.throw(u));}catch(l){i(l);}}function c(u){var l;u.done?s(u.value):(l=u.value,l instanceof r?l:new r(function(p){p(l);})).then(a,o);}c((n=n.apply(t,e||[])).next());})},__generator:function(t,e){var r,n,s,i,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(c){return function(u){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(s=2&l[0]?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[2&l[0],s.value]),l[0]){case 0:case 1:s=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!((s=s.length>0&&s[s.length-1])||l[0]!==6&&l[0]!==2)){a=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){a.label=l[1];break}if(l[0]===6&&a.label<s[1]){a.label=s[1],s=l;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(l);break}s[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a);}catch(p){l=[6,p],n=0;}finally{r=s=0;}if(5&l[0])throw l[1];return {value:l[0]?l[1]:void 0,done:!0}}([c,u])}}},__createBinding:el,__exportStar:function(t,e){for(var r in t)r==="default"||Object.prototype.hasOwnProperty.call(e,r)||el(e,t,r);},__values:pm,__read:hm,__spread:function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(hm(arguments[e]));return t},__spreadArrays:function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),s=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,o=i.length;a<o;a++,s++)n[s]=i[a];return n},__spreadArray:function(t,e,r){if(r||arguments.length===2)for(var n,s=0,i=e.length;s<i;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))},__await:li,__asyncGenerator:function(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,s=r.apply(t,e||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(p){s[p]&&(n[p]=function(h){return new Promise(function(f,x){i.push([p,h,f,x])>1||o(p,h);})});}function o(p,h){try{(f=s[p](h)).value instanceof li?Promise.resolve(f.value.v).then(c,u):l(i[0][2],f);}catch(x){l(i[0][3],x);}var f;}function c(p){o("next",p);}function u(p){o("throw",p);}function l(p,h){p(h),i.shift(),i.length&&o(i[0][0],i[0][1]);}},__asyncDelegator:function(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,i){e[s]=t[s]?function(a){return (r=!r)?{value:li(t[s](a)),done:s==="return"}:i?i(a):a}:i;}},__asyncValues:function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=pm(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=t[s]&&function(i){return new Promise(function(a,o){(function(c,u,l,p){Promise.resolve(p).then(function(h){c({value:h,done:l});},u);})(a,o,(i=t[s](i)).done,i.value);})};}},__makeTemplateObject:function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},__importStar:function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&el(e,t,r);return U1(e,t),e},__importDefault:function(t){return t&&t.__esModule?t:{default:t}},__classPrivateFieldGet:function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},__classPrivateFieldSet:function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},__classPrivateFieldIn:function(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}}),rt=Se($1),tl={exports:{}},He={};Object.defineProperty(He,"__esModule",{value:!0}),He.Def=void 0;var ds=rt,dm=Object.prototype,$a=dm.toString,ar=dm.hasOwnProperty,pi=function(){function t(){}return t.prototype.assert=function(e,r){if(!this.check(e,r)){var n=nl(e);throw new Error(n+" does not match type "+this)}return !0},t.prototype.arrayOf=function(){return new rl(this)},t}(),rl=function(t){function e(r){var n=t.call(this)||this;return n.elemType=r,n.kind="ArrayType",n}return ds.__extends(e,t),e.prototype.toString=function(){return "["+this.elemType+"]"},e.prototype.check=function(r,n){var s=this;return Array.isArray(r)&&r.every(function(i){return s.elemType.check(i,n)})},e}(pi),fm=function(t){function e(r){var n=t.call(this)||this;return n.value=r,n.kind="IdentityType",n}return ds.__extends(e,t),e.prototype.toString=function(){return String(this.value)},e.prototype.check=function(r,n){var s=r===this.value;return s||typeof n!="function"||n(this,r),s},e}(pi),mm=function(t){function e(r){var n=t.call(this)||this;return n.fields=r,n.kind="ObjectType",n}return ds.__extends(e,t),e.prototype.toString=function(){return "{ "+this.fields.join(", ")+" }"},e.prototype.check=function(r,n){return $a.call(r)===$a.call({})&&this.fields.every(function(s){return s.type.check(r[s.name],n)})},e}(pi),ym=function(t){function e(r){var n=t.call(this)||this;return n.types=r,n.kind="OrType",n}return ds.__extends(e,t),e.prototype.toString=function(){return this.types.join(" | ")},e.prototype.check=function(r,n){return this.types.some(function(s){return s.check(r,n)})},e}(pi),qa=function(t){function e(r,n){var s=t.call(this)||this;return s.name=r,s.predicate=n,s.kind="PredicateType",s}return ds.__extends(e,t),e.prototype.toString=function(){return this.name},e.prototype.check=function(r,n){var s=this.predicate(r,n);return s||typeof n!="function"||n(this,r),s},e}(pi),Va=function(){function t(e,r){this.type=e,this.typeName=r,this.baseNames=[],this.ownFields=Object.create(null),this.allSupertypes=Object.create(null),this.supertypeList=[],this.allFields=Object.create(null),this.fieldNames=[],this.finalized=!1,this.buildable=!1,this.buildParams=[];}return t.prototype.isSupertypeOf=function(e){if(e instanceof t){if(this.finalized!==!0||e.finalized!==!0)throw new Error("");return ar.call(e.allSupertypes,this.typeName)}throw new Error(e+" is not a Def")},t.prototype.checkAllFields=function(e,r){var n=this.allFields;if(this.finalized!==!0)throw new Error(""+this.typeName);return e!==null&&typeof e=="object"&&Object.keys(n).every(function(s){var i=n[s],a=i.type,o=i.getValue(e);return a.check(o,r)})},t.prototype.bases=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=this.baseNames;if(this.finalized){if(e.length!==n.length)throw new Error("");for(var s=0;s<e.length;s++)if(e[s]!==n[s])throw new Error("");return this}return e.forEach(function(i){n.indexOf(i)<0&&n.push(i);}),this},t}();He.Def=Va;var gm=function(){function t(e,r,n,s){this.name=e,this.type=r,this.defaultFn=n,this.hidden=!!s;}return t.prototype.toString=function(){return JSON.stringify(this.name)+": "+this.type},t.prototype.getValue=function(e){var r=e[this.name];return r!==void 0||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(e)),r},t}();function nl(t){return Array.isArray(t)?"["+t.map(nl).join(", ")+"]":t&&typeof t=="object"?"{ "+Object.keys(t).map(function(e){return e+": "+t[e]}).join(", ")+" }":JSON.stringify(t)}He.default=function(t){var e={or:function(){for(var k=[],L=0;L<arguments.length;L++)k[L]=arguments[L];return new ym(k.map(function(w){return e.from(w)}))},from:function(k,L){if(k instanceof rl||k instanceof fm||k instanceof mm||k instanceof ym||k instanceof qa)return k;if(k instanceof Va)return k.type;if(o.check(k)){if(k.length!==1)throw new Error("only one element type is permitted for typed arrays");return new rl(e.from(k[0]))}if(c.check(k))return new mm(Object.keys(k).map(function(U){return new gm(U,e.from(k[U],U))}));if(typeof k=="function"){var w=r.indexOf(k);if(w>=0)return n[w];if(typeof L!="string")throw new Error("missing name");return new qa(L,k)}return new fm(k)},def:function(k){return ar.call(m,k)?m[k]:m[k]=new g(k)},hasDef:function(k){return ar.call(m,k)}},r=[],n=[];function s(k,L){var w=$a.call(L),U=new qa(k,function($){return $a.call($)===w});return L&&typeof L.constructor=="function"&&(r.push(L.constructor),n.push(U)),U}var i=s("string","truthy"),a=s("function",function(){}),o=s("array",[]),c=s("object",{}),u=s("RegExp",/./),l=s("Date",new Date),p=s("number",3),h=s("boolean",!0),f=s("null",null),x=s("undefined",void 0),d={string:i,function:a,array:o,object:c,RegExp:u,Date:l,number:p,boolean:h,null:f,undefined:x},m=Object.create(null);function y(k){if(k&&typeof k=="object"){var L=k.type;if(typeof L=="string"&&ar.call(m,L)){var w=m[L];if(w.finalized)return w}}return null}var g=function(k){function L(w){var U=k.call(this,new qa(w,function($,te){return U.check($,te)}),w)||this;return U}return ds.__extends(L,k),L.prototype.check=function(w,U){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(w===null||typeof w!="object")return !1;var $=y(w);return $?U&&$===this?this.checkAllFields(w,U):!!this.isSupertypeOf($)&&(!U||$.checkAllFields(w,U)&&this.checkAllFields(w,!1)):(this.typeName==="SourceLocation"||this.typeName==="Position")&&this.checkAllFields(w,U)},L.prototype.build=function(){for(var w=this,U=[],$=0;$<arguments.length;$++)U[$]=arguments[$];if(this.buildParams=U,this.buildable)return this;this.field("type",String,function(){return w.typeName}),this.buildable=!0;var te=function(ge,O,q,H){if(!ar.call(ge,O)){var re=w.allFields;if(!ar.call(re,O))throw new Error(""+O);var Q,_=re[O],N=_.type;if(H)Q=q;else {if(!_.defaultFn){var M="no value or default function given for field "+JSON.stringify(O)+" of "+w.typeName+"("+w.buildParams.map(function(C){return re[C]}).join(", ")+")";throw new Error(M)}Q=_.defaultFn.call(ge);}if(!N.check(Q))throw new Error(nl(Q)+" does not match field "+_+" of type "+w.typeName);ge[O]=Q;}},de=function(){for(var ge=[],O=0;O<arguments.length;O++)ge[O]=arguments[O];var q=ge.length;if(!w.finalized)throw new Error("attempting to instantiate unfinalized type "+w.typeName);var H=Object.create(E);if(w.buildParams.forEach(function(re,Q){Q<q?te(H,re,ge[Q],!0):te(H,re,null,!1);}),Object.keys(w.allFields).forEach(function(re){te(H,re,null,!1);}),H.type!==w.typeName)throw new Error("");return H};return de.from=function(ge){if(!w.finalized)throw new Error("attempting to instantiate unfinalized type "+w.typeName);var O=Object.create(E);if(Object.keys(w.allFields).forEach(function(q){ar.call(ge,q)?te(O,q,ge[q],!0):te(O,q,null,!1);}),O.type!==w.typeName)throw new Error("");return O},Object.defineProperty(v,b(this.typeName),{enumerable:!0,value:de}),this},L.prototype.field=function(w,U,$,te){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(w)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[w]=new gm(w,e.from(U),$,te),this)},L.prototype.finalize=function(){var w=this;if(!this.finalized){var U=this.allFields,$=this.allSupertypes;for(var te in this.baseNames.forEach(function(de){var ge=m[de];if(!(ge instanceof Va)){var O="unknown supertype name "+JSON.stringify(de)+" for subtype "+JSON.stringify(w.typeName);throw new Error(O)}ge.finalize(),A(U,ge.allFields),A($,ge.allSupertypes);}),A(U,this.ownFields),$[this.typeName]=this,this.fieldNames.length=0,U)ar.call(U,te)&&!U[te].hidden&&this.fieldNames.push(te);Object.defineProperty(T,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,function(de,ge){ge.length=0,ge.push(de);for(var O=Object.create(null),q=0;q<ge.length;++q){de=ge[q];var H=m[de];if(H.finalized!==!0)throw new Error("");ar.call(O,de)&&delete ge[O[de]],O[de]=q,ge.push.apply(ge,H.baseNames);}for(var re=0,Q=re,_=ge.length;Q<_;++Q)ar.call(ge,Q)&&(ge[re++]=ge[Q]);ge.length=re;}(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&function(de){var ge=S(de);if(!v[ge]){var O=v[b(de)];if(O){var q=function(){for(var H=[],re=0;re<arguments.length;re++)H[re]=arguments[re];return v.expressionStatement(O.apply(v,H))};q.from=function(){for(var H=[],re=0;re<arguments.length;re++)H[re]=arguments[re];return v.expressionStatement(O.from.apply(v,H))},v[ge]=q;}}}(this.typeName);}},L}(Va),v=Object.create(null),E={};function b(k){return k.replace(/^[A-Z]+/,function(L){var w=L.length;switch(w){case 0:return "";case 1:return L.toLowerCase();default:return L.slice(0,w-1).toLowerCase()+L.charAt(w-1)}})}function S(k){return (k=b(k)).replace(/(Expression)?$/,"Statement")}var T={};function P(k){var L=y(k);if(L)return L.fieldNames.slice(0);if("type"in k)throw new Error("did not recognize object of type "+JSON.stringify(k.type));return Object.keys(k)}function I(k,L){var w=y(k);if(w){var U=w.allFields[L];if(U)return U.getValue(k)}return k&&k[L]}function A(k,L){return Object.keys(L).forEach(function(w){k[w]=L[w];}),k}return {Type:e,builtInTypes:d,getSupertypeNames:function(k){if(!ar.call(m,k))throw new Error("");var L=m[k];if(L.finalized!==!0)throw new Error("");return L.supertypeList.slice(1)},computeSupertypeLookupTable:function(k){for(var L={},w=Object.keys(m),U=w.length,$=0;$<U;++$){var te=w[$],de=m[te];if(de.finalized!==!0)throw new Error(""+te);for(var ge=0;ge<de.supertypeList.length;++ge){var O=de.supertypeList[ge];if(ar.call(k,O)){L[te]=O;break}}}return L},builders:v,defineMethod:function(k,L){var w=E[k];return x.check(L)?delete E[k]:(a.assert(L),Object.defineProperty(E,k,{enumerable:!0,configurable:!0,value:L})),w},getBuilderName:b,getStatementBuilderName:S,namedTypes:T,getFieldNames:P,getFieldValue:I,eachField:function(k,L,w){P(k).forEach(function(U){L.call(this,U,I(k,U));},w);},someField:function(k,L,w){return P(k).some(function(U){return L.call(this,U,I(k,U))},w)},finalize:function(){Object.keys(m).forEach(function(k){m[k].finalize();});}}};var sl={exports:{}},za={exports:{}},Xa={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt.__importDefault(He),n=Object.prototype.hasOwnProperty;e.default=function(s){var i=s.use(r.default),a=i.builtInTypes.array,o=i.builtInTypes.number,c=function d(m,y,g){if(!(this instanceof d))throw new Error("Path constructor cannot be invoked without 'new'");if(y){if(!(y instanceof d))throw new Error("")}else y=null,g=null;this.value=m,this.parentPath=y,this.name=g,this.__childCache=null;},u=c.prototype;function l(d){return d.__childCache||(d.__childCache=Object.create(null))}function p(d,m){var y=l(d),g=d.getValueProperty(m),v=y[m];return n.call(y,m)&&v.value===g||(v=y[m]=new d.constructor(g,d,m)),v}function h(){}function f(d,m,y,g){if(a.assert(d.value),m===0)return h;var v=d.value.length;if(v<1)return h;var E=arguments.length;E===2?(y=0,g=v):E===3?(y=Math.max(y,0),g=v):(y=Math.max(y,0),g=Math.min(g,v)),o.assert(y),o.assert(g);for(var b=Object.create(null),S=l(d),T=y;T<g;++T)if(n.call(d.value,T)){var P=d.get(T);if(P.name!==T)throw new Error("");var I=T+m;P.name=I,b[I]=P,delete S[T];}return delete S.length,function(){for(var A in b){var k=b[A];if(k.name!==+A)throw new Error("");S[A]=k,d.value[A]=k.value;}}}function x(d){if(!(d instanceof c))throw new Error("");var m=d.parentPath;if(!m)return d;var y=m.value,g=l(m);if(y[d.name]===d.value)g[d.name]=d;else if(a.check(y)){var v=y.indexOf(d.value);v>=0&&(g[d.name=v]=d);}else y[d.name]=d.value,g[d.name]=d;if(y[d.name]!==d.value)throw new Error("");if(d.parentPath.get(d.name)!==d)throw new Error("");return d}return u.getValueProperty=function(d){return this.value[d]},u.get=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];for(var y=this,g=d.length,v=0;v<g;++v)y=p(y,d[v]);return y},u.each=function(d,m){var y=[],g=this.value.length,v=0;for(v=0;v<g;++v)n.call(this.value,v)&&(y[v]=this.get(v));for(m=m||this,v=0;v<g;++v)n.call(y,v)&&d.call(m,y[v]);},u.map=function(d,m){var y=[];return this.each(function(g){y.push(d.call(this,g));},m),y},u.filter=function(d,m){var y=[];return this.each(function(g){d.call(this,g)&&y.push(g);},m),y},u.shift=function(){var d=f(this,-1),m=this.value.shift();return d(),m},u.unshift=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];var y=f(this,d.length),g=this.value.unshift.apply(this.value,d);return y(),g},u.push=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];return a.assert(this.value),delete l(this).length,this.value.push.apply(this.value,d)},u.pop=function(){a.assert(this.value);var d=l(this);return delete d[this.value.length-1],delete d.length,this.value.pop()},u.insertAt=function(d){var m=arguments.length,y=f(this,m-1,d);if(y===h&&m<=1)return this;d=Math.max(d,0);for(var g=1;g<m;++g)this.value[d+g-1]=arguments[g];return y(),this},u.insertBefore=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];for(var y=this.parentPath,g=d.length,v=[this.name],E=0;E<g;++E)v.push(d[E]);return y.insertAt.apply(y,v)},u.insertAfter=function(){for(var d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];for(var y=this.parentPath,g=d.length,v=[this.name+1],E=0;E<g;++E)v.push(d[E]);return y.insertAt.apply(y,v)},u.replace=function(d){var m=[],y=this.parentPath.value,g=l(this.parentPath),v=arguments.length;if(x(this),a.check(y)){for(var E=y.length,b=f(this.parentPath,v-1,this.name+1),S=[this.name,1],T=0;T<v;++T)S.push(arguments[T]);var P=y.splice.apply(y,S);if(P[0]!==this.value)throw new Error("");if(y.length!==E-1+v)throw new Error("");if(b(),v===0)delete this.value,delete g[this.name],this.__childCache=null;else {if(y[this.name]!==d)throw new Error("");for(this.value!==d&&(this.value=d,this.__childCache=null),T=0;T<v;++T)m.push(this.parentPath.get(this.name+T));if(m[0]!==this)throw new Error("")}}else if(v===1)this.value!==d&&(this.__childCache=null),this.value=y[this.name]=d,m.push(this);else {if(v!==0)throw new Error("Could not replace path");delete y[this.name],delete this.value,this.__childCache=null;}return m},c},t.exports=e.default;})(Xa,Xa.exports);var il={exports:{}};((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt.__importDefault(He),n=Object.prototype.hasOwnProperty;e.default=function(s){var i=s.use(r.default),a=i.Type,o=i.namedTypes,c=o.Node,u=o.Expression,l=i.builtInTypes.array,p=i.builders,h=function v(E,b){if(!(this instanceof v))throw new Error("Scope constructor cannot be invoked without 'new'");var S;if(x.assert(E.value),b){if(!(b instanceof v))throw new Error("");S=b.depth+1;}else b=null,S=0;Object.defineProperties(this,{path:{value:E},node:{value:E.value},isGlobal:{value:!b,enumerable:!0},depth:{value:S},parent:{value:b},bindings:{value:{}},types:{value:{}}});},f=[o.Program,o.Function,o.CatchClause],x=a.or.apply(a,f);h.isEstablishedBy=function(v){return x.check(v)};var d=h.prototype;function m(v,E,b){var S=v.value;if(v.parent&&o.FunctionExpression.check(v.parent.node)&&v.parent.node.id&&g(v.parent.get("id"),E),S)if(l.check(S))v.each(function(P){y(P,E,b);});else if(o.Function.check(S))v.get("params").each(function(P){g(P,E);}),y(v.get("body"),E,b);else if(o.TypeAlias&&o.TypeAlias.check(S)||o.InterfaceDeclaration&&o.InterfaceDeclaration.check(S)||o.TSTypeAliasDeclaration&&o.TSTypeAliasDeclaration.check(S)||o.TSInterfaceDeclaration&&o.TSInterfaceDeclaration.check(S))(function(P,I){var A=P.value;o.Pattern.assert(A),o.Identifier.check(A)&&(n.call(I,A.name)?I[A.name].push(P):I[A.name]=[P]);})(v.get("id"),b);else if(o.VariableDeclarator.check(S)){var T=v.get("id");o.ObjectPattern.check(T.node)?T.node.properties.forEach(function(P,I){g(v.get("id","properties",I,"key"),E);}):g(v.get("id"),E),y(v.get("init"),E,b);}else S.type==="ImportSpecifier"||S.type==="ImportNamespaceSpecifier"||S.type==="ImportDefaultSpecifier"?g(v.get(S.local?"local":S.name?"name":"id"),E):c.check(S)&&!u.check(S)&&i.eachField(S,function(P,I){var A=v.get(P);if(!function(k,L){return !!(k.value===L||Array.isArray(k.value)&&k.value.length===0&&Array.isArray(L)&&L.length===0)}(A,I))throw new Error("");y(A,E,b);});}function y(v,E,b){var S=v.value;if(!(!S||u.check(S)))if(o.FunctionDeclaration.check(S)&&S.id!==null)g(v.get("id"),E);else if(o.ClassDeclaration&&o.ClassDeclaration.check(S))g(v.get("id"),E);else if(x.check(S)){if(o.CatchClause.check(S)&&o.Identifier.check(S.param)){var T=S.param.name,P=n.call(E,T);m(v.get("body"),E,b),P||delete E[T];}}else m(v,E,b);}function g(v,E){var b=v.value;o.Pattern.assert(b),o.Identifier.check(b)?n.call(E,b.name)?E[b.name].push(v):E[b.name]=[v]:o.AssignmentPattern&&o.AssignmentPattern.check(b)?g(v.get("left"),E):o.ObjectPattern&&o.ObjectPattern.check(b)?v.get("properties").each(function(S){var T=S.value;o.Pattern.check(T)?g(S,E):o.Property.check(T)?g(S.get("value"),E):o.SpreadProperty&&o.SpreadProperty.check(T)&&g(S.get("argument"),E);}):o.ArrayPattern&&o.ArrayPattern.check(b)?v.get("elements").each(function(S){var T=S.value;o.Pattern.check(T)?g(S,E):o.SpreadElement&&o.SpreadElement.check(T)&&g(S.get("argument"),E);}):o.PropertyPattern&&o.PropertyPattern.check(b)?g(v.get("pattern"),E):(o.SpreadElementPattern&&o.SpreadElementPattern.check(b)||o.RestElement&&o.RestElement.check(b)||o.SpreadPropertyPattern&&o.SpreadPropertyPattern.check(b))&&g(v.get("argument"),E);}return d.didScan=!1,d.declares=function(v){return this.scan(),n.call(this.bindings,v)},d.declaresType=function(v){return this.scan(),n.call(this.types,v)},d.declareTemporary=function(v){if(v){if(!/^[a-z$_]/i.test(v))throw new Error("")}else v="t$";v+=this.depth.toString(36)+"$",this.scan();for(var E=0;this.declares(v+E);)++E;var b=v+E;return this.bindings[b]=i.builders.identifier(b)},d.injectTemporary=function(v,E){v||(v=this.declareTemporary());var b=this.path.get("body");return o.BlockStatement.check(b.value)&&(b=b.get("body")),b.unshift(p.variableDeclaration("var",[p.variableDeclarator(v,E||null)])),v},d.scan=function(v){if(v||!this.didScan){for(var E in this.bindings)delete this.bindings[E];((function(b,S,T){var P=b.value;if(x.assert(P),o.CatchClause.check(P)){var I=b.get("param");I.value&&g(I,S);}else m(b,S,T);}))(this.path,this.bindings,this.types),this.didScan=!0;}},d.getBindings=function(){return this.scan(),this.bindings},d.getTypes=function(){return this.scan(),this.types},d.lookup=function(v){for(var E=this;E&&!E.declares(v);E=E.parent);return E},d.lookupType=function(v){for(var E=this;E&&!E.declaresType(v);E=E.parent);return E},d.getGlobalScope=function(){for(var v=this;!v.isGlobal;)v=v.parent;return v},h},t.exports=e.default;}))(il,il.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt,n=r.__importDefault(He),s=r.__importDefault(Xa.exports),i=r.__importDefault(il.exports);e.default=function(a){var o=a.use(n.default),c=o.namedTypes,u=o.builders,l=o.builtInTypes.number,p=o.builtInTypes.array,h=a.use(s.default),f=a.use(i.default),x=function v(E,b,S){if(!(this instanceof v))throw new Error("NodePath constructor cannot be invoked without 'new'");h.call(this,E,b,S);},d=x.prototype=Object.create(h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}});function m(v){return c.BinaryExpression.check(v)||c.LogicalExpression.check(v)}Object.defineProperties(d,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),d.replace=function(){return delete this.node,delete this.parent,delete this.scope,h.prototype.replace.apply(this,arguments)},d.prune=function(){var v=this.parent;return this.replace(),function(E){if(c.VariableDeclaration.check(E.node)){var b=E.get("declarations").value;if(!b||b.length===0)return E.prune()}else if(c.ExpressionStatement.check(E.node)){if(!E.get("expression").value)return E.prune()}else c.IfStatement.check(E.node)&&function(S){var T=S.get("test").value,P=S.get("alternate").value,I=S.get("consequent").value;if(I||P){if(!I&&P){var A=u.unaryExpression("!",T,!0);c.UnaryExpression.check(T)&&T.operator==="!"&&(A=T.argument),S.get("test").replace(A),S.get("consequent").replace(P),S.get("alternate").replace();}}else {var k=u.expressionStatement(T);S.replace(k);}}(E);return E}(v)},d._computeNode=function(){var v=this.value;if(c.Node.check(v))return v;var E=this.parentPath;return E&&E.node||null},d._computeParent=function(){var v=this.value,E=this.parentPath;if(!c.Node.check(v)){for(;E&&!c.Node.check(E.value);)E=E.parentPath;E&&(E=E.parentPath);}for(;E&&!c.Node.check(E.value);)E=E.parentPath;return E||null},d._computeScope=function(){var v=this.value,E=this.parentPath,b=E&&E.scope;return c.Node.check(v)&&f.isEstablishedBy(v)&&(b=new f(this,b)),b||null},d.getValueProperty=function(v){return o.getFieldValue(this.value,v)},d.needsParens=function(v){var E=this.parentPath;if(!E)return !1;var b=this.value;if(!c.Expression.check(b)||b.type==="Identifier")return !1;for(;!c.Node.check(E.value);)if(!(E=E.parentPath))return !1;var S=E.value;switch(b.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return S.type==="MemberExpression"&&this.name==="object"&&S.object===b;case"BinaryExpression":case"LogicalExpression":switch(S.type){case"CallExpression":return this.name==="callee"&&S.callee===b;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return !0;case"MemberExpression":return this.name==="object"&&S.object===b;case"BinaryExpression":case"LogicalExpression":var T=b,P=S.operator,I=y[P],A=T.operator,k=y[A];if(I>k)return !0;if(I===k&&this.name==="right"){if(S.right!==T)throw new Error("Nodes must be equal");return !0}default:return !1}case"SequenceExpression":switch(S.type){case"ForStatement":return !1;case"ExpressionStatement":return this.name!=="expression";default:return !0}case"YieldExpression":switch(S.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return !0;default:return !1}case"Literal":return S.type==="MemberExpression"&&l.check(b.value)&&this.name==="object"&&S.object===b;case"AssignmentExpression":case"ConditionalExpression":switch(S.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return !0;case"CallExpression":return this.name==="callee"&&S.callee===b;case"ConditionalExpression":return this.name==="test"&&S.test===b;case"MemberExpression":return this.name==="object"&&S.object===b;default:return !1}default:if(S.type==="NewExpression"&&this.name==="callee"&&S.callee===b)return g(b)}return !(v===!0||this.canBeFirstInStatement()||!this.firstInStatement())};var y={};function g(v){return !!c.CallExpression.check(v)||(p.check(v)?v.some(g):!!c.Node.check(v)&&o.someField(v,function(E,b){return g(b)}))}return [["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(v,E){v.forEach(function(b){y[b]=E;});}),d.canBeFirstInStatement=function(){var v=this.node;return !c.FunctionExpression.check(v)&&!c.ObjectExpression.check(v)},d.firstInStatement=function(){return function(v){for(var E,b;v.parent;v=v.parent){if(E=v.node,b=v.parent.node,c.BlockStatement.check(b)&&v.parent.name==="body"&&v.name===0){if(b.body[0]!==E)throw new Error("Nodes must be equal");return !0}if(c.ExpressionStatement.check(b)&&v.name==="expression"){if(b.expression!==E)throw new Error("Nodes must be equal");return !0}if(c.SequenceExpression.check(b)&&v.parent.name==="expressions"&&v.name===0){if(b.expressions[0]!==E)throw new Error("Nodes must be equal")}else if(c.CallExpression.check(b)&&v.name==="callee"){if(b.callee!==E)throw new Error("Nodes must be equal")}else if(c.MemberExpression.check(b)&&v.name==="object"){if(b.object!==E)throw new Error("Nodes must be equal")}else if(c.ConditionalExpression.check(b)&&v.name==="test"){if(b.test!==E)throw new Error("Nodes must be equal")}else if(m(b)&&v.name==="left"){if(b.left!==E)throw new Error("Nodes must be equal")}else {if(!c.UnaryExpression.check(b)||b.prefix||v.name!=="argument")return !1;if(b.argument!==E)throw new Error("Nodes must be equal")}}return !0}(this)},x},t.exports=e.default;}(za,za.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt,n=r.__importDefault(He),s=r.__importDefault(za.exports),i=Object.prototype.hasOwnProperty;e.default=function(a){var o=a.use(n.default),c=a.use(s.default),u=o.builtInTypes.array,l=o.builtInTypes.object,p=o.builtInTypes.function,h=function g(){if(!(this instanceof g))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(v){var E=Object.create(null);for(var b in v)/^visit[A-Z]/.test(b)&&(E[b.slice(5)]=!0);for(var S=o.computeSupertypeLookupTable(E),T=Object.create(null),P=Object.keys(S),I=P.length,A=0;A<I;++A){var k=P[A];b="visit"+S[k],p.check(v[b])&&(T[k]=b);}return T}(this),this._shouldVisitComments=i.call(this._methodNameTable,"Block")||i.call(this._methodNameTable,"Line"),this.Context=m(this),this._visiting=!1,this._changeReported=!1;};function f(g,v){for(var E in v)i.call(v,E)&&(g[E]=v[E]);return g}h.fromMethodsObject=function(g){if(g instanceof h)return g;if(!l.check(g))return new h;var v=function b(){if(!(this instanceof b))throw new Error("Visitor constructor cannot be invoked without 'new'");h.call(this);},E=v.prototype=Object.create(x);return E.constructor=v,f(E,g),f(v,h),p.assert(v.fromMethodsObject),p.assert(v.visit),new v},h.visit=function(g,v){return h.fromMethodsObject(v).visit(g)};var x=h.prototype;function d(g,v){if(!(g instanceof c))throw new Error("");if(!(v instanceof h))throw new Error("");var E=g.value;if(u.check(E))g.each(v.visitWithoutReset,v);else if(l.check(E)){var b=o.getFieldNames(E);v._shouldVisitComments&&E.comments&&b.indexOf("comments")<0&&b.push("comments");for(var S=b.length,T=[],P=0;P<S;++P){var I=b[P];i.call(E,I)||(E[I]=o.getFieldValue(E,I)),T.push(g.get(I));}for(P=0;P<S;++P)v.visitWithoutReset(T[P]);}return g.value}function m(g){function v(b){if(!(this instanceof v))throw new Error("");if(!(this instanceof h))throw new Error("");if(!(b instanceof c))throw new Error("");Object.defineProperty(this,"visitor",{value:g,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=b,this.needToCallTraverse=!0,Object.seal(this);}if(!(g instanceof h))throw new Error("");var E=v.prototype=Object.create(g);return E.constructor=v,f(E,y),v}x.visit=function(){if(this._visiting)throw new Error("Recursively calling visitor.visit(path) resets visitor state. Try this.visit(path) or this.traverse(path) instead.");this._visiting=!0,this._changeReported=!1,this._abortRequested=!1;for(var g,v=arguments.length,E=new Array(v),b=0;b<v;++b)E[b]=arguments[b];E[0]instanceof c||(E[0]=new c({root:E[0]}).get("root")),this.reset.apply(this,E);try{var S=this.visitWithoutReset(E[0]);g=!0;}finally{if(this._visiting=!1,!g&&this._abortRequested)return E[0].value}return S},x.AbortRequest=function(){},x.abort=function(){var g=this;g._abortRequested=!0;var v=new g.AbortRequest;throw v.cancel=function(){g._abortRequested=!1;},v},x.reset=function(g){},x.visitWithoutReset=function(g){if(this instanceof this.Context)return this.visitor.visitWithoutReset(g);if(!(g instanceof c))throw new Error("");var v=g.value,E=v&&typeof v=="object"&&typeof v.type=="string"&&this._methodNameTable[v.type];if(!E)return d(g,this);var b=this.acquireContext(g);try{return b.invokeVisitorMethod(E)}finally{this.releaseContext(b);}},x.acquireContext=function(g){return this._reusableContextStack.length===0?new this.Context(g):this._reusableContextStack.pop().reset(g)},x.releaseContext=function(g){if(!(g instanceof this.Context))throw new Error("");this._reusableContextStack.push(g),g.currentPath=null;},x.reportChanged=function(){this._changeReported=!0;},x.wasChangeReported=function(){return this._changeReported};var y=Object.create(null);return y.reset=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof c))throw new Error("");return this.currentPath=g,this.needToCallTraverse=!0,this},y.invokeVisitorMethod=function(g){if(!(this instanceof this.Context))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");var v=this.visitor[g].call(this,this.currentPath);if(v===!1?this.needToCallTraverse=!1:v!==void 0&&(this.currentPath=this.currentPath.replace(v)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),this.needToCallTraverse!==!1)throw new Error("Must either call this.traverse or return false in "+g);var E=this.currentPath;return E&&E.value},y.traverse=function(g,v){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof c))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");return this.needToCallTraverse=!1,d(g,h.fromMethodsObject(v||this.visitor))},y.visit=function(g,v){if(!(this instanceof this.Context))throw new Error("");if(!(g instanceof c))throw new Error("");if(!(this.currentPath instanceof c))throw new Error("");return this.needToCallTraverse=!1,h.fromMethodsObject(v||this.visitor).visitWithoutReset(g)},y.reportChanged=function(){this.visitor.reportChanged();},y.abort=function(){this.needToCallTraverse=!1,this.visitor.abort();},h},t.exports=e.default;}(sl,sl.exports);var al={exports:{}};((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt.__importDefault(He);e.default=function(n){var s=n.use(r.default),i=s.getFieldNames,a=s.getFieldValue,o=s.builtInTypes.array,c=s.builtInTypes.object,u=s.builtInTypes.Date,l=s.builtInTypes.RegExp,p=Object.prototype.hasOwnProperty;function h(d,m,y){return o.check(y)?y.length=0:y=null,x(d,m,y)}function f(d){return /[_$a-z][_$a-z0-9]*/i.test(d)?"."+d:"["+JSON.stringify(d)+"]"}function x(d,m,y){return d===m||(o.check(d)?function(g,v,E){o.assert(g);var b=g.length;if(!o.check(v)||v.length!==b)return E&&E.push("length"),!1;for(var S=0;S<b;++S){if(E&&E.push(S),S in g!=S in v||!x(g[S],v[S],E))return !1;if(E){var T=E.pop();if(T!==S)throw new Error(""+T)}}return !0}(d,m,y):c.check(d)?function(g,v,E){if(c.assert(g),!c.check(v))return !1;if(g.type!==v.type)return E&&E.push("type"),!1;var b=i(g),S=b.length,T=i(v),P=T.length;if(S===P){for(var I=0;I<S;++I){var A=b[I],k=a(g,A),L=a(v,A);if(E&&E.push(A),!x(k,L,E))return !1;if(E){var w=E.pop();if(w!==A)throw new Error(""+w)}}return !0}if(!E)return !1;var U=Object.create(null);for(I=0;I<S;++I)U[b[I]]=!0;for(I=0;I<P;++I){if(A=T[I],!p.call(U,A))return E.push(A),!1;delete U[A];}for(A in U){E.push(A);break}return !1}(d,m,y):u.check(d)?u.check(m)&&+d==+m:l.check(d)?l.check(m)&&d.source===m.source&&d.global===m.global&&d.multiline===m.multiline&&d.ignoreCase===m.ignoreCase:d==m)}return h.assert=function(d,m){var y=[];if(!h(d,m,y)){if(y.length!==0)throw new Error("Nodes differ in the following path: "+y.map(f).join(""));if(d!==m)throw new Error("Nodes must be equal")}},h},t.exports=e.default;}))(al,al.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt,n=r.__importDefault(He),s=r.__importDefault(sl.exports),i=r.__importDefault(al.exports),a=r.__importDefault(Xa.exports),o=r.__importDefault(za.exports);e.default=function(c){var u=function(){var h=[],f=[];function x(m){var y=h.indexOf(m);return y===-1&&(y=h.length,h.push(m),f[y]=m(d)),f[y]}var d={use:x};return d}(),l=u.use(n.default);c.forEach(u.use),l.finalize();var p=u.use(s.default);return {Type:l.Type,builtInTypes:l.builtInTypes,namedTypes:l.namedTypes,builders:l.builders,defineMethod:l.defineMethod,getFieldNames:l.getFieldNames,getFieldValue:l.getFieldValue,eachField:l.eachField,someField:l.someField,getSupertypeNames:l.getSupertypeNames,getBuilderName:l.getBuilderName,astNodesAreEquivalent:u.use(i.default),finalize:l.finalize,Path:u.use(a.default),NodePath:u.use(o.default),PathVisitor:p,use:u.use,visit:p.visit}},t.exports=e.default;}(tl,tl.exports);var Ka={exports:{}},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.LogicalOperators=Ir.AssignmentOperators=Ir.BinaryOperators=void 0,Ir.BinaryOperators=["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],Ir.AssignmentOperators=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],Ir.LogicalOperators=["||","&&"];var Mt={exports:{}};((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt.__importDefault(He);e.default=function(n){var s=n.use(r.default),i=s.Type,a=s.builtInTypes,o=a.number,c=i.or(a.string,a.number,a.boolean,a.null,a.undefined),u=i.from(function(l){if(l===null)return !0;var p=typeof l;return p!=="object"&&p!=="function"},c.toString());return {geq:function(l){return i.from(function(p){return o.check(p)&&p>=l},o+" >= "+l)},defaults:{null:function(){return null},emptyArray:function(){return []},false:function(){return !1},true:function(){return !0},undefined:function(){},"use strict":function(){return "use strict"}},isPrimitive:u}},t.exports=e.default;}))(Mt,Mt.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=rt,n=Ir,s=r.__importDefault(He),i=r.__importDefault(Mt.exports);e.default=function(a){var o=a.use(s.default).Type,c=o.def,u=o.or,l=a.use(i.default),p=l.defaults,h=l.geq;c("Printable").field("loc",u(c("SourceLocation"),null),p.null,!0),c("Node").bases("Printable").field("type",String).field("comments",u([c("Comment")],null),p.null,!0),c("SourceLocation").field("start",c("Position")).field("end",c("Position")).field("source",u(String,null),p.null),c("Position").field("line",h(1)).field("column",h(0)),c("File").bases("Node").build("program","name").field("program",c("Program")).field("name",u(String,null),p.null),c("Program").bases("Node").build("body").field("body",[c("Statement")]),c("Function").bases("Node").field("id",u(c("Identifier"),null),p.null).field("params",[c("Pattern")]).field("body",c("BlockStatement")).field("generator",Boolean,p.false).field("async",Boolean,p.false),c("Statement").bases("Node"),c("EmptyStatement").bases("Statement").build(),c("BlockStatement").bases("Statement").build("body").field("body",[c("Statement")]),c("ExpressionStatement").bases("Statement").build("expression").field("expression",c("Expression")),c("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",c("Expression")).field("consequent",c("Statement")).field("alternate",u(c("Statement"),null),p.null),c("LabeledStatement").bases("Statement").build("label","body").field("label",c("Identifier")).field("body",c("Statement")),c("BreakStatement").bases("Statement").build("label").field("label",u(c("Identifier"),null),p.null),c("ContinueStatement").bases("Statement").build("label").field("label",u(c("Identifier"),null),p.null),c("WithStatement").bases("Statement").build("object","body").field("object",c("Expression")).field("body",c("Statement")),c("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",c("Expression")).field("cases",[c("SwitchCase")]).field("lexical",Boolean,p.false),c("ReturnStatement").bases("Statement").build("argument").field("argument",u(c("Expression"),null)),c("ThrowStatement").bases("Statement").build("argument").field("argument",c("Expression")),c("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",c("BlockStatement")).field("handler",u(c("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[c("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[c("CatchClause")],p.emptyArray).field("finalizer",u(c("BlockStatement"),null),p.null),c("CatchClause").bases("Node").build("param","guard","body").field("param",c("Pattern")).field("guard",u(c("Expression"),null),p.null).field("body",c("BlockStatement")),c("WhileStatement").bases("Statement").build("test","body").field("test",c("Expression")).field("body",c("Statement")),c("DoWhileStatement").bases("Statement").build("body","test").field("body",c("Statement")).field("test",c("Expression")),c("ForStatement").bases("Statement").build("init","test","update","body").field("init",u(c("VariableDeclaration"),c("Expression"),null)).field("test",u(c("Expression"),null)).field("update",u(c("Expression"),null)).field("body",c("Statement")),c("ForInStatement").bases("Statement").build("left","right","body").field("left",u(c("VariableDeclaration"),c("Expression"))).field("right",c("Expression")).field("body",c("Statement")),c("DebuggerStatement").bases("Statement").build(),c("Declaration").bases("Statement"),c("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",c("Identifier")),c("FunctionExpression").bases("Function","Expression").build("id","params","body"),c("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",u("var","let","const")).field("declarations",[c("VariableDeclarator")]),c("VariableDeclarator").bases("Node").build("id","init").field("id",c("Pattern")).field("init",u(c("Expression"),null),p.null),c("Expression").bases("Node"),c("ThisExpression").bases("Expression").build(),c("ArrayExpression").bases("Expression").build("elements").field("elements",[u(c("Expression"),null)]),c("ObjectExpression").bases("Expression").build("properties").field("properties",[c("Property")]),c("Property").bases("Node").build("kind","key","value").field("kind",u("init","get","set")).field("key",u(c("Literal"),c("Identifier"))).field("value",c("Expression")),c("SequenceExpression").bases("Expression").build("expressions").field("expressions",[c("Expression")]);var f=u("-","+","!","~","typeof","void","delete");c("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",c("Expression")).field("prefix",Boolean,p.true);var x=u.apply(void 0,n.BinaryOperators);c("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",x).field("left",c("Expression")).field("right",c("Expression"));var d=u.apply(void 0,n.AssignmentOperators);c("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",d).field("left",u(c("Pattern"),c("MemberExpression"))).field("right",c("Expression"));var m=u("++","--");c("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",c("Expression")).field("prefix",Boolean);var y=u.apply(void 0,n.LogicalOperators);c("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",y).field("left",c("Expression")).field("right",c("Expression")),c("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",c("Expression")).field("consequent",c("Expression")).field("alternate",c("Expression")),c("NewExpression").bases("Expression").build("callee","arguments").field("callee",c("Expression")).field("arguments",[c("Expression")]),c("CallExpression").b