1 line
314 KiB
JavaScript
1 line
314 KiB
JavaScript
var e,t;e=this,t=function(e){"use strict";const t=void 0;function n(e){return!r(e)&&e.constructor===Object}function r(e){return null==e}function i(){return"undefined"!=typeof process}function a(e){throw Error(e)}const s="exports",o="template",l="riot",c="RiotComponentWrapper",u="RiotComponent",p="javascript",h="template",d="script",f="style",m="textarea",y="isSpread";var g=Object.freeze({__proto__:null,JAVASCRIPT_OUTPUT_NAME:p,CSS_OUTPUT_NAME:"css",TEMPLATE_OUTPUT_NAME:h,JAVASCRIPT_TAG:d,STYLE_TAG:f,TEXTAREA_TAG:m,IS_RAW:"isRaw",IS_SELF_CLOSING:"isSelfClosing",IS_VOID:"isVoid",IS_BOOLEAN:"isBoolean",IS_CUSTOM:"isCustom",IS_SPREAD:y}),b=Object.freeze({__proto__:null,TAG:1,ATTR:2,TEXT:3,CDATA:4,COMMENT:8,DOCUMENT:9,DOCTYPE:10,DOCUMENT_FRAGMENT:11});const v="Unexpected end of file.",x=/^(?:\/[a-zA-Z]|[a-zA-Z][^\s>/]?)/,S=/(\/?[^\s>/]+)\s*(>)?/g,E=/(\S[^>/=\s]*)(?:\s*=\s*([^>/])?)?/g,T=/\.\.\./,k={script:/<\/script\s*>/gi,style:/<\/style\s*>/gi,textarea:/<\/textarea\s*>/gi},P=/^\/?(?:pre|textarea)$/;function w(e,t,n){return e.lastIndex=t,e.exec(n)}var _=e=>e.replace(/(?=[-[\](){^*+?.$|\\])/g,"\\");function A(e,t,n){n||(n=e.length);const r=(e.slice(0,n).match(/\r\n?|\n/g)||"").length+1;let i=0;for(;--n>=0&&!/[\r\n]/.test(e[n]);)++i;return`[${r},${i}]: ${t}`}function C(e,t,n){const r=/[`$\\]/g;let i;for(;r.lastIndex=t,r.exec(e);){if(i=e[(t=r.lastIndex)-1],"`"===i)return t;if("$"===i&&"{"===e[t++])return n.push("`","}"),t}throw A(e,"Unclosed ES6 template literal.",t)}function I(e,t,n){const r=A(e,t,n);throw Error(r)}const N="[{(,;:?=|&!^~>%*/",O=N+"+-",D=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],j=D.reduce(((e,t)=>e+t.slice(-1)),""),L=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,M=/[$\w]/,B=/.*/g;function F(e,t){for(;--t>=0&&/\s/.test(e[t]););return t}const V=/'[^'\n\r\\]*(?:\\(?:\r\n?|[\S\s])[^'\n\r\\]*)*'/.source,R=`${V}|${V.replace(/'/g,'"')}`,q={};function U(e,t,n,r){let i=0;switch(t){case"[":case"(":case"{":e.push("["===t?"]":"("===t?")":"}");break;case")":case"]":case"}":t!==e.pop()&&I(r,"Unexpected character %1.".replace("%1",t),i),"}"===t&&"`"===e[e.length-1]&&(t=e.pop()),i=n+1;break;case"/":i=function(e,t){let n=B.lastIndex=t++;const r=(B.exec(e)||" ")[0].match(L);if(r){const i=n+r[0].length;n=F(e,n);let a=e[n];if(n<0||N.includes(a))return i;if("."===a)"."===e[n-1]&&(t=i);else{if(("+"===a||"-"===a)&&(e[--n]!==a||(n=F(e,n))<0||O.includes(a=e[n])))return i;if(j.includes(a)){const r=n+1;for(;--n>=0&&M.test(e[n]););D.includes(e.slice(n+1,r))&&(t=i)}}}return t}(r,n)}return{char:t,index:i}}function z(e,t,n){const[r,i]=n,a=t+r.length,s=[],o=function(e){let t=q[e];if(!t){let n=_(e);e.length>1?n+="|[":n=/[{}[\]()]/.test(e)?"[":"["+n,q[e]=t=RegExp(`${R}|${n}\`/\\{}[\\]()]`,"g")}return t}(i);let l,c;for(o.lastIndex=a;c=o.exec(e);){const n=c.index,r=c[0];if(l=o.lastIndex,r===i&&!s.length)return{text:e.slice(a,n),start:t,end:l};const{char:u,index:p}=U(s,r[0],n,e);l=p||l,o.lastIndex="`"===u?C(e,l,s):l}s.length&&I(e,"Unclosed expression.",l)}function W(e){const t=e.last;e.last=null,t&&e.root&&e.builder.push(t)}function J(e,t,n){return e.slice(t,n)}function G(e,t,n,r){void 0===r&&(r={});const i=J(e.data,t,n),a=r.expressions,s=r.unescape;let o=e.last;return e.pos=n,o&&3===o.type?(o.text+=i,o.end=n):(W(e),e.last=o={type:3,text:i,start:t,end:n}),a&&a.length&&(o.expressions=(o.expressions||[]).concat(a)),s&&(o.unescape=s),3}function H(e,t,n,r){const i=function(e,t){const{brackets:n}=e.options,r=e.regexCache[t];if(r)return r;const i=_(n[0]);return Object.assign(e.regexCache,{[t]:RegExp(`(${t})|${i}`,"g")}),e.regexCache[t]}(e,n);i.lastIndex=r;const{unescape:a,expressions:s,end:o}=function(e,t){const{data:n,options:r}=e,{brackets:i}=r,a=[];let s,o,l;for(;(l=t.exec(n))&&!l[1];)if(o=l.index,"\\"===n[o-1])s=l[0];else{const e=z(n,o,i);e&&(a.push(e),t.lastIndex=e.end)}return l||I(n,v,o),{unescape:s,expressions:a,end:l.index}}(e,i);return t?(a&&(t.unescape=a),s.length&&(t.expressions=s)):G(e,r,o,{expressions:s,unescape:a}),o}const X=e=>e.filter(((e,t,n)=>n.indexOf(e)===t)),$=["circle","ellipse","line","path","polygon","polyline","rect","stop","use"],K=["button","data","input","select","li","meter","option","output","progress","textarea","param"],Q=X(["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","animation","audio","canvas","clipPath","color-profile","cursor","defs","desc","discard","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","handler","hatch","hatchpath","hkern","iframe","image","linearGradient","listener","marker","mask","mesh","meshgradient","meshpatch","meshrow","metadata","missing-glyph","mpath","pattern","prefetch","radialGradient","script","set","solidColor","solidcolor","style","svg","switch","symbol","tbreak","text","textArea","textPath","title","tref","tspan","unknown","video","view","vkern"].concat($)).sort(),Y=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function Z(e){return e.join("|")}function ee(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return RegExp(`^/?(?:${Z(t.map(Z))})$`,"i")}const te=ee(X(["a","abbr","address","article","aside","audio","b","bdi","bdo","blockquote","body","canvas","caption","cite","code","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","label","legend","main","map","mark","math","menu","nav","noscript","object","ol","optgroup","p","picture","pre","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","tfoot","th","thead","time","title","tr","u","ul","var","video"].concat(Y).concat(K)).sort()),ne=ee(Q),re=ee(Y),ie=ee($),ae=ee(K),se=ee(["disabled","visible","checked","readonly","required","allowfullscreen","autofocus","autoplay","compact","controls","default","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","noresize","noshade","novalidate","nowrap","open","reversed","seamless","selected","sortable","truespeed","typemustmatch"]),oe=function(e){const t=new WeakMap;return function(){if(t.has(arguments.length<=0?void 0:arguments[0]))return t.get(arguments.length<=0?void 0:arguments[0]);const n=e(...arguments);return t.set(arguments.length<=0?void 0:arguments[0],n),n}}((e=>RegExp(`(${e[0]}[^${e[1]}]*?${e[1]})`,"g"))),le=(e,t)=>H(e,t,"[>/\\s]",t.start);function ce(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return(r=[...n,...r]).length<e.length?ce(e,...r):e(...r)}}function ue(e,t,n,r){const i=e.root,a={type:1,name:t,start:n,end:r};var s;s=t,[te,ne].every((e=>!e.test(s)))&&(a.isCustom=!0),function(e){return[re,ie].some((t=>t.test(e)))}(t)&&(a.isVoid=!0),e.pos=r,i?(t===i.name?e.count++:t===i.close&&e.count--,W(e)):(e.root={name:a.name,close:"/"+t},e.count=1),e.last=a}function pe(e){return e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")}function he(e){return e.replace(/\\/g,"\\\\")}const de=Object.seal({get(){const e=this.store;return{[h]:e.root.nodes[0],css:e.style,[p]:e.script}},push(e){const t=this.store;switch(e.type){case 8:this.pushComment(t,e);break;case 3:this.pushText(t,e);break;case 1:{const n=e.name,r="/",[i]=n;i!==r||e.isVoid?i!==r&&this.openTag(t,e):this.closeTag(t,e,n);break}}},pushComment(e,t){e.last.nodes.push(t)},closeTag(e,t){(e.scryle||e.last).end=t.end,e.root.nodes[0]&&(e.root.nodes[0].end=t.end),e.scryle?e.scryle=null:e.last=e.stack.pop()},openTag(e,t){const n=t.name,r=t.attributes,i=d===n&&!(e=>(e.attributes||[]).some((e=>"src"===e.name)))(t)||n===f;if(i)e[n]&&I(this.store.data,'Multiple inline "<%1>" tags are not supported.'.replace("%1",n),t.start),e[n]=t,e.scryle=e[n];else{const r=e.last,i=t;r.nodes.push(i),(r.isRaw||P.test(n))&&(t.isRaw=!0),t.isSelfClosing||t.isVoid||(e.stack.push(r),i.nodes=[],e.last=i)}r&&this.attrs(r)},attrs(e){e.forEach((e=>{e.value&&this.split(e,e.value,e.valueStart,!0)}))},pushText(e,t){const n=t.text,r=!/\S/.test(n),i=e.scryle;if(i)r||(i.text=t);else{const i=e.last,a=this.compact&&!i.isRaw;if(a&&r)return;this.split(t,n,t.start,a),i.nodes.push(t)}},split(e,t,n,r){const i=e.expressions,a=[];if(i){let s=0;i.forEach((i=>{const o=t.slice(s,i.start-n),l=i.text;a.push(this.sanitise(e,o,r),pe(he(l).trim())),s=i.end-n})),s<e.end&&a.push(this.sanitise(e,t.slice(s),r))}else a[0]=this.sanitise(e,t,r);e.parts=a.filter((e=>e))},sanitise(e,t,n){let r=e.unescape;if(r){let e=0;for(r="\\"+r;-1!==(e=t.indexOf(r,e));)t=t.substr(0,e)+t.substr(e+1),e++}return t=he(t),n?t.replace(/\s+/g," "):pe(t)}});function fe(e,t){const n={type:1,name:"",start:0,end:0,nodes:[]};return Object.assign(Object.create(de),{compact:!1!==t.compact,store:{last:n,stack:[],scryle:null,root:n,style:null,script:null,data:e}})}function me(e,t){const n=ce(ye)(e,t||fe);return{parse:e=>function(e){const{data:t}=e;return ge(e),W(e),e.count&&I(t,e.count>0?v:"Root tag not found.",e.pos),{data:t,output:e.builder.get()}}(n(e))}}function ye(e,t,n){const r=Object.assign({brackets:["{","}"]},e);return{options:r,regexCache:{},pos:0,count:-1,root:null,last:null,scryle:null,builder:t(n,r),data:n}}function ge(e,t){const{data:n}=e,r=n.length;e.pos<r&&e.count&&ge(e,function(e,t){switch(t){case 1:return function(e){const{pos:t,data:n}=e,r=t-1,i=n.substr(t,2);switch(!0){case"!"===i[0]:return function(e,t,n){const r=n+2,i="--"===t.substr(r,2)?"--\x3e":">",a=t.indexOf(i,r);return a<0&&I(t,"Unclosed comment.",n),function(e,t,n,r){e.pos=n,!0===e.options.comments&&(W(e),e.last={type:8,start:t,end:n,text:r})}(e,n,a+i.length,t.substring(n,a+i.length)),3}(e,n,r);case x.test(i):return function(e,t){const{data:n,pos:r}=e,i=S,a=w(i,r,n),s=i.lastIndex,o=a[1].toLowerCase();return o in k&&(e.scryle=o),ue(e,o,t,s),a[2]?3:2}(e,r);default:return G(e,r,t)}}(e);case 2:return function(e){const{data:t,last:n,pos:r,root:i}=e,a=n,s=/\S/g,o=w(s,r,t);switch(!0){case!o:e.pos=t.length;break;case">"===o[0]:return e.pos=a.end=s.lastIndex,a.isSelfClosing&&(e.scryle=null,i&&i.name===a.name&&e.count--),3;case"/"===o[0]:e.pos=s.lastIndex,a.isSelfClosing=!0;break;default:delete a.isSelfClosing,function(e,t,n){const{data:r}=e,i=oe(e.options.brackets),a=E,s=a.lastIndex=i.lastIndex=t,o=a.exec(r),l=(u=o[1],p=e.options.brackets,u[0]===p[0]),c=l?[null,i.exec(r)[1],null]:o;var u,p,h,d;if(c){const t=function(e,t,n,r,i){const a={name:t[1],value:"",start:n,end:r},s=t[2];switch(!0){case(e=>T.test(e))(a.name):return function(e,t){const n=le(e,t);return{[y]:!0,start:t.start,expressions:t.expressions.map((e=>Object.assign(e,{text:e.text.replace(T,"").trim()}))),end:n}}(e,a);case!0===i:return function(e,t){const n=le(e,t);return{start:t.start,name:t.expressions[0].text.trim(),expressions:t.expressions,end:n}}(e,a);default:return function(e,t,n){const{data:r}=e;let{end:i}=t;var a;if(a=t.name,se.test(a)&&(t.isBoolean=!0),n){let a=i;return'"'!==n&&"'"!==n&&(n="",a--),i=H(e,t,n||"[>/\\s]",a),Object.assign(t,{value:J(r,a,i),valueStart:a,end:n?++i:i})}return t}(e,a,s)}}(e,c,s,a.lastIndex,l);e.pos=n.end=t.end,n.attributes=(d=t,void 0===(h=n.attributes)&&(h=[]),h.push(d),h)}}(e,o.index,a)}return 2}(e);default:return function(e){const{pos:t,data:n,scryle:r}=e;switch(!0){case"string"==typeof r:{const i=r,a=k[i],s=w(a,t,n);s||I(n,'Unclosed "%1" block.'.replace("%1",i),t-1);const o=s.index,l=a.lastIndex;e.scryle=null,o>t&&function(e,t,n){const{pos:r}=e,i=n.index;t===m?H(e,null,n[0],r):G(e,r,i)}(e,i,s),ue(e,"/"+i,o,l);break}case"<"===n[t]:return e.pos++,1;default:H(e,null,"<",t)}return 3}(e)}}(e,t))}const be=g,ve=b,xe="bindingTypes",Se="expressionTypes",Ee="template",Te="getComponent",ke="type",Pe="evaluate",we="name",_e="attributes",Ae="if",Ce="each",Ie="key",Ne="slot",Oe="name",De="is";be.IS_RAW;const je=be.IS_VOID,Le=be.IS_CUSTOM,Me=be.IS_BOOLEAN,Be=be.IS_SPREAD;function Fe(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Ve={},Re=function(e,t){return Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Re(e,t)},qe=function(){return qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qe.apply(this,arguments)},Ue=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function ze(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function We(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function Je(e){return this instanceof Je?(this.v=e,this):new Je(e)}var Ge,He=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Xe=Object.freeze({__proto__:null,__extends:function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return qe},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,o)}l((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}},__createBinding:Ue,__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Ue(t,e,n)},__values:ze,__read:We,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(We(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],s=0,o=a.length;s<o;s++,i++)r[i]=a[s];return r},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__await:Je,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||o(e,t)}))})}function o(e,t){try{(n=i[e](t)).value instanceof Je?Promise.resolve(n.value.v).then(l,c):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function l(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:Je(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ze(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Ue(t,e,n);return He(t,e),t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},__classPrivateFieldIn:function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}}),$e=Fe(Xe),Ke={},Qe={exports:{}},Ye={};function Ze(){if(Ge)return Ye;Ge=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.Def=void 0;var e=$e,t=Object.prototype,n=t.toString,r=t.hasOwnProperty,i=function(){function e(){}return e.prototype.assert=function(e,t){if(!this.check(e,t)){var n=h(e);throw Error(n+" does not match type "+this)}return!0},e.prototype.arrayOf=function(){return new a(this)},e}(),a=function(t){function n(e){var n=t.call(this)||this;return n.elemType=e,n.kind="ArrayType",n}return e.__extends(n,t),n.prototype.toString=function(){return"["+this.elemType+"]"},n.prototype.check=function(e,t){var n=this;return Array.isArray(e)&&e.every((function(e){return n.elemType.check(e,t)}))},n}(i),s=function(t){function n(e){var n=t.call(this)||this;return n.value=e,n.kind="IdentityType",n}return e.__extends(n,t),n.prototype.toString=function(){return this.value+""},n.prototype.check=function(e,t){var n=e===this.value;return n||"function"!=typeof t||t(this,e),n},n}(i),o=function(t){function r(e){var n=t.call(this)||this;return n.fields=e,n.kind="ObjectType",n}return e.__extends(r,t),r.prototype.toString=function(){return"{ "+this.fields.join(", ")+" }"},r.prototype.check=function(e,t){return n.call(e)===n.call({})&&this.fields.every((function(n){return n.type.check(e[n.name],t)}))},r}(i),l=function(t){function n(e){var n=t.call(this)||this;return n.types=e,n.kind="OrType",n}return e.__extends(n,t),n.prototype.toString=function(){return this.types.join(" | ")},n.prototype.check=function(e,t){return this.types.some((function(n){return n.check(e,t)}))},n}(i),c=function(t){function n(e,n){var r=t.call(this)||this;return r.name=e,r.predicate=n,r.kind="PredicateType",r}return e.__extends(n,t),n.prototype.toString=function(){return this.name},n.prototype.check=function(e,t){var n=this.predicate(e,t);return n||"function"!=typeof t||t(this,e),n},n}(i),u=function(){function e(e,t){this.type=e,this.typeName=t,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 e.prototype.isSupertypeOf=function(t){if(t instanceof e){if(!0!==this.finalized||!0!==t.finalized)throw Error("");return r.call(t.allSupertypes,this.typeName)}throw Error(t+" is not a Def")},e.prototype.checkAllFields=function(e,t){var n=this.allFields;if(!0!==this.finalized)throw Error(""+this.typeName);return null!==e&&"object"==typeof e&&Object.keys(n).every((function(r){var i=n[r],a=i.type,s=i.getValue(e);return a.check(s,t)}))},e.prototype.bases=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.baseNames;if(this.finalized){if(e.length!==n.length)throw Error("");for(var r=0;r<e.length;r++)if(e[r]!==n[r])throw Error("");return this}return e.forEach((function(e){n.indexOf(e)<0&&n.push(e)})),this},e}();Ye.Def=u;var p=function(){function e(e,t,n,r){this.name=e,this.type=t,this.defaultFn=n,this.hidden=!!r}return e.prototype.toString=function(){return JSON.stringify(this.name)+": "+this.type},e.prototype.getValue=function(e){var t=e[this.name];return void 0!==t||"function"==typeof this.defaultFn&&(t=this.defaultFn.call(e)),t},e}();function h(e){return Array.isArray(e)?"["+e.map(h).join(", ")+"]":e&&"object"==typeof e?"{ "+Object.keys(e).map((function(t){return t+": "+e[t]})).join(", ")+" }":JSON.stringify(e)}return Ye.default=function(t){var i={or:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new l(e.map((function(e){return i.from(e)})))},from:function(e,t){if(e instanceof a||e instanceof s||e instanceof o||e instanceof l||e instanceof c)return e;if(e instanceof u)return e.type;if(b.check(e)){if(1!==e.length)throw Error("only one element type is permitted for typed arrays");return new a(i.from(e[0]))}if(v.check(e))return new o(Object.keys(e).map((function(t){return new p(t,i.from(e[t],t))})));if("function"==typeof e){var n=d.indexOf(e);if(n>=0)return f[n];if("string"!=typeof t)throw Error("missing name");return new c(t,e)}return new s(e)},def:function(e){return r.call(_,e)?_[e]:_[e]=new C(e)},hasDef:function(e){return r.call(_,e)}},d=[],f=[];function m(e,t){var r=n.call(t),i=new c(e,(function(e){return n.call(e)===r}));return t&&"function"==typeof t.constructor&&(d.push(t.constructor),f.push(i)),i}var y=m("string","truthy"),g=m("function",(function(){})),b=m("array",[]),v=m("object",{}),x=m("RegExp",/./),S=m("Date",new Date),E=m("number",3),T=m("boolean",!0),k=m("null",null),P=m("undefined",void 0),w={string:y,function:g,array:b,object:v,RegExp:x,Date:S,number:E,boolean:T,null:k,undefined:P},_=Object.create(null);function A(e){if(e&&"object"==typeof e){var t=e.type;if("string"==typeof t&&r.call(_,t)){var n=_[t];if(n.finalized)return n}}return null}var C=function(t){function n(e){var n=t.call(this,new c(e,(function(e,t){return n.check(e,t)})),e)||this;return n}return e.__extends(n,t),n.prototype.check=function(e,t){if(!0!==this.finalized)throw Error("prematurely checking unfinalized type "+this.typeName);if(null===e||"object"!=typeof e)return!1;var n=A(e);return n?t&&n===this?this.checkAllFields(e,t):!!this.isSupertypeOf(n)&&(!t||n.checkAllFields(e,t)&&this.checkAllFields(e,!1)):("SourceLocation"===this.typeName||"Position"===this.typeName)&&this.checkAllFields(e,t)},n.prototype.build=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.buildParams=t,this.buildable)return this;this.field("type",String,(function(){return e.typeName})),this.buildable=!0;var i=function(t,n,i,a){if(!r.call(t,n)){var s=e.allFields;if(!r.call(s,n))throw Error(""+n);var o,l=s[n],c=l.type;if(a)o=i;else{if(!l.defaultFn){var u="no value or default function given for field "+JSON.stringify(n)+" of "+e.typeName+"("+e.buildParams.map((function(e){return s[e]})).join(", ")+")";throw Error(u)}o=l.defaultFn.call(t)}if(!c.check(o))throw Error(h(o)+" does not match field "+l+" of type "+e.typeName);t[n]=o}},a=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length;if(!e.finalized)throw Error("attempting to instantiate unfinalized type "+e.typeName);var a=Object.create(N);if(e.buildParams.forEach((function(e,n){n<r?i(a,e,t[n],!0):i(a,e,null,!1)})),Object.keys(e.allFields).forEach((function(e){i(a,e,null,!1)})),a.type!==e.typeName)throw Error("");return a};return a.from=function(t){if(!e.finalized)throw Error("attempting to instantiate unfinalized type "+e.typeName);var n=Object.create(N);if(Object.keys(e.allFields).forEach((function(e){r.call(t,e)?i(n,e,t[e],!0):i(n,e,null,!1)})),n.type!==e.typeName)throw Error("");return n},Object.defineProperty(I,O(this.typeName),{enumerable:!0,value:a}),this},n.prototype.field=function(e,t,n,r){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(e)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[e]=new p(e,i.from(t),n,r),this)},n.prototype.finalize=function(){var e=this;if(!this.finalized){var t=this.allFields,n=this.allSupertypes;for(var i in this.baseNames.forEach((function(r){var i=_[r];if(!(i instanceof u)){var a="unknown supertype name "+JSON.stringify(r)+" for subtype "+JSON.stringify(e.typeName);throw Error(a)}i.finalize(),B(t,i.allFields),B(n,i.allSupertypes)})),B(t,this.ownFields),n[this.typeName]=this,this.fieldNames.length=0,t)r.call(t,i)&&!t[i].hidden&&this.fieldNames.push(i);Object.defineProperty(j,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,function(e,t){t.length=0,t.push(e);for(var n=Object.create(null),i=0;i<t.length;++i){e=t[i];var a=_[e];if(!0!==a.finalized)throw Error("");r.call(n,e)&&delete t[n[e]],n[e]=i,t.push.apply(t,a.baseNames)}for(var s=0,o=s,l=t.length;o<l;++o)r.call(t,o)&&(t[s++]=t[o]);t.length=s}(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&function(e){var t=D(e);if(!I[t]){var n=I[O(e)];if(n){var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return I.expressionStatement(n.apply(I,e))};r.from=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return I.expressionStatement(n.from.apply(I,e))},I[t]=r}}}(this.typeName)}},n}(u),I=Object.create(null),N={};function O(e){return e.replace(/^[A-Z]+/,(function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}}))}function D(e){return(e=O(e)).replace(/(Expression)?$/,"Statement")}var j={};function L(e){var t=A(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function M(e,t){var n=A(e);if(n){var r=n.allFields[t];if(r)return r.getValue(e)}return e&&e[t]}function B(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}return{Type:i,builtInTypes:w,getSupertypeNames:function(e){if(!r.call(_,e))throw Error("");var t=_[e];if(!0!==t.finalized)throw Error("");return t.supertypeList.slice(1)},computeSupertypeLookupTable:function(e){for(var t={},n=Object.keys(_),i=n.length,a=0;a<i;++a){var s=n[a],o=_[s];if(!0!==o.finalized)throw Error(""+s);for(var l=0;l<o.supertypeList.length;++l){var c=o.supertypeList[l];if(r.call(e,c)){t[s]=c;break}}}return t},builders:I,defineMethod:function(e,t){var n=N[e];return P.check(t)?delete N[e]:(g.assert(t),Object.defineProperty(N,e,{enumerable:!0,configurable:!0,value:t})),n},getBuilderName:O,getStatementBuilderName:D,namedTypes:j,getFieldNames:L,getFieldValue:M,eachField:function(e,t,n){L(e).forEach((function(n){t.call(this,n,M(e,n))}),n)},someField:function(e,t,n){return L(e).some((function(n){return t.call(this,n,M(e,n))}),n)},finalize:function(){Object.keys(_).forEach((function(e){_[e].finalize()}))}}},Ye}var et,tt={exports:{}},nt={exports:{}},rt={exports:{}};function it(){return et||(et=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e.__importDefault(Ze()),r=Object.prototype.hasOwnProperty;t.default=function(e){var t=e.use(n.default),i=t.builtInTypes.array,a=t.builtInTypes.number,s=function e(t,n,r){if(!(this instanceof e))throw Error("Path constructor cannot be invoked without 'new'");if(n){if(!(n instanceof e))throw Error("")}else n=null,r=null;this.value=t,this.parentPath=n,this.name=r,this.__childCache=null},o=s.prototype;function l(e){return e.__childCache||(e.__childCache=Object.create(null))}function c(e,t){var n=l(e),i=e.getValueProperty(t),a=n[t];return r.call(n,t)&&a.value===i||(a=n[t]=new e.constructor(i,e,t)),a}function u(){}function p(e,t,n,s){if(i.assert(e.value),0===t)return u;var o=e.value.length;if(o<1)return u;var c=arguments.length;2===c?(n=0,s=o):3===c?(n=Math.max(n,0),s=o):(n=Math.max(n,0),s=Math.min(s,o)),a.assert(n),a.assert(s);for(var p=Object.create(null),h=l(e),d=n;d<s;++d)if(r.call(e.value,d)){var f=e.get(d);if(f.name!==d)throw Error("");var m=d+t;f.name=m,p[m]=f,delete h[d]}return delete h.length,function(){for(var t in p){var n=p[t];if(n.name!==+t)throw Error("");h[t]=n,e.value[t]=n.value}}}function h(e){if(!(e instanceof s))throw Error("");var t=e.parentPath;if(!t)return e;var n=t.value,r=l(t);if(n[e.name]===e.value)r[e.name]=e;else if(i.check(n)){var a=n.indexOf(e.value);a>=0&&(r[e.name=a]=e)}else n[e.name]=e.value,r[e.name]=e;if(n[e.name]!==e.value)throw Error("");if(e.parentPath.get(e.name)!==e)throw Error("");return e}return o.getValueProperty=function(e){return this.value[e]},o.get=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this,r=e.length,i=0;i<r;++i)n=c(n,e[i]);return n},o.each=function(e,t){var n=[],i=this.value.length,a=0;for(a=0;a<i;++a)r.call(this.value,a)&&(n[a]=this.get(a));for(t=t||this,a=0;a<i;++a)r.call(n,a)&&e.call(t,n[a])},o.map=function(e,t){var n=[];return this.each((function(t){n.push(e.call(this,t))}),t),n},o.filter=function(e,t){var n=[];return this.each((function(t){e.call(this,t)&&n.push(t)}),t),n},o.shift=function(){var e=p(this,-1),t=this.value.shift();return e(),t},o.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=p(this,e.length),r=this.value.unshift.apply(this.value,e);return n(),r},o.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.assert(this.value),delete l(this).length,this.value.push.apply(this.value,e)},o.pop=function(){i.assert(this.value);var e=l(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},o.insertAt=function(e){var t=arguments.length,n=p(this,t-1,e);if(n===u&&t<=1)return this;e=Math.max(e,0);for(var r=1;r<t;++r)this.value[e+r-1]=arguments[r];return n(),this},o.insertBefore=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this.parentPath,r=e.length,i=[this.name],a=0;a<r;++a)i.push(e[a]);return n.insertAt.apply(n,i)},o.insertAfter=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this.parentPath,r=e.length,i=[this.name+1],a=0;a<r;++a)i.push(e[a]);return n.insertAt.apply(n,i)},o.replace=function(e){var t=[],n=this.parentPath.value,r=l(this.parentPath),a=arguments.length;if(h(this),i.check(n)){for(var s=n.length,o=p(this.parentPath,a-1,this.name+1),c=[this.name,1],u=0;u<a;++u)c.push(arguments[u]);var d=n.splice.apply(n,c);if(d[0]!==this.value)throw Error("");if(n.length!==s-1+a)throw Error("");if(o(),0===a)delete this.value,delete r[this.name],this.__childCache=null;else{if(n[this.name]!==e)throw Error("");for(this.value!==e&&(this.value=e,this.__childCache=null),u=0;u<a;++u)t.push(this.parentPath.get(this.name+u));if(t[0]!==this)throw Error("")}}else if(1===a)this.value!==e&&(this.__childCache=null),this.value=n[this.name]=e,t.push(this);else{if(0!==a)throw Error("Could not replace path");delete n[this.name],delete this.value,this.__childCache=null}return t},s},e.exports=t.default}(rt,rt.exports)),rt.exports}var at,st,ot,lt={exports:{}};function ct(){return st||(st=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Ze()),i=n.__importDefault(it()),a=n.__importDefault((at||(at=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e.__importDefault(Ze()),r=Object.prototype.hasOwnProperty;t.default=function(e){var t=e.use(n.default),i=t.Type,a=t.namedTypes,s=a.Node,o=a.Expression,l=t.builtInTypes.array,c=t.builders,u=function e(t,n){if(!(this instanceof e))throw Error("Scope constructor cannot be invoked without 'new'");var r;if(h.assert(t.value),n){if(!(n instanceof e))throw Error("");r=n.depth+1}else n=null,r=0;Object.defineProperties(this,{path:{value:t},node:{value:t.value},isGlobal:{value:!n,enumerable:!0},depth:{value:r},parent:{value:n},bindings:{value:{}},types:{value:{}}})},p=[a.Program,a.Function,a.CatchClause],h=i.or.apply(i,p);u.isEstablishedBy=function(e){return h.check(e)};var d=u.prototype;function f(e,n,i){var c=e.value;e.parent&&a.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&y(e.parent.get("id"),n),c&&(l.check(c)?e.each((function(e){m(e,n,i)})):a.Function.check(c)?(e.get("params").each((function(e){y(e,n)})),m(e.get("body"),n,i)):a.TypeAlias&&a.TypeAlias.check(c)||a.InterfaceDeclaration&&a.InterfaceDeclaration.check(c)||a.TSTypeAliasDeclaration&&a.TSTypeAliasDeclaration.check(c)||a.TSInterfaceDeclaration&&a.TSInterfaceDeclaration.check(c)?function(e,t){var n=e.value;a.Pattern.assert(n),a.Identifier.check(n)&&(r.call(t,n.name)?t[n.name].push(e):t[n.name]=[e])}(e.get("id"),i):a.VariableDeclarator.check(c)?(y(e.get("id"),n),m(e.get("init"),n,i)):"ImportSpecifier"===c.type||"ImportNamespaceSpecifier"===c.type||"ImportDefaultSpecifier"===c.type?y(e.get(c.local?"local":c.name?"name":"id"),n):s.check(c)&&!o.check(c)&&t.eachField(c,(function(t,r){var a=e.get(t);if(!function(e,t){return e.value===t||!(!Array.isArray(e.value)||0!==e.value.length||!Array.isArray(t)||0!==t.length)}(a,r))throw Error("");m(a,n,i)})))}function m(e,t,n){var i=e.value;if(!i||o.check(i));else if(a.FunctionDeclaration.check(i)&&null!==i.id)y(e.get("id"),t);else if(a.ClassDeclaration&&a.ClassDeclaration.check(i))y(e.get("id"),t);else if(h.check(i)){if(a.CatchClause.check(i)&&a.Identifier.check(i.param)){var s=i.param.name,l=r.call(t,s);f(e.get("body"),t,n),l||delete t[s]}}else f(e,t,n)}function y(e,t){var n=e.value;a.Pattern.assert(n),a.Identifier.check(n)?r.call(t,n.name)?t[n.name].push(e):t[n.name]=[e]:a.AssignmentPattern&&a.AssignmentPattern.check(n)?y(e.get("left"),t):a.ObjectPattern&&a.ObjectPattern.check(n)?e.get("properties").each((function(e){var n=e.value;a.Pattern.check(n)?y(e,t):a.Property.check(n)?y(e.get("value"),t):a.SpreadProperty&&a.SpreadProperty.check(n)&&y(e.get("argument"),t)})):a.ArrayPattern&&a.ArrayPattern.check(n)?e.get("elements").each((function(e){var n=e.value;a.Pattern.check(n)?y(e,t):a.SpreadElement&&a.SpreadElement.check(n)&&y(e.get("argument"),t)})):a.PropertyPattern&&a.PropertyPattern.check(n)?y(e.get("pattern"),t):(a.SpreadElementPattern&&a.SpreadElementPattern.check(n)||a.RestElement&&a.RestElement.check(n)||a.SpreadPropertyPattern&&a.SpreadPropertyPattern.check(n))&&y(e.get("argument"),t)}return d.didScan=!1,d.declares=function(e){return this.scan(),r.call(this.bindings,e)},d.declaresType=function(e){return this.scan(),r.call(this.types,e)},d.declareTemporary=function(e){if(e){if(!/^[a-z$_]/i.test(e))throw Error("")}else e="t$";e+=this.depth.toString(36)+"$",this.scan();for(var n=0;this.declares(e+n);)++n;var r=e+n;return this.bindings[r]=t.builders.identifier(r)},d.injectTemporary=function(e,t){e||(e=this.declareTemporary());var n=this.path.get("body");return a.BlockStatement.check(n.value)&&(n=n.get("body")),n.unshift(c.variableDeclaration("var",[c.variableDeclarator(e,t||null)])),e},d.scan=function(e){if(e||!this.didScan){for(var t in this.bindings)delete this.bindings[t];!function(e,t,n){var r=e.value;if(h.assert(r),a.CatchClause.check(r)){var i=e.get("param");i.value&&y(i,t)}else f(e,t,n)}(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(e){for(var t=this;t&&!t.declares(e);t=t.parent);return t},d.lookupType=function(e){for(var t=this;t&&!t.declaresType(e);t=t.parent);return t},d.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},u},e.exports=t.default}(lt,lt.exports)),lt.exports));t.default=function(e){var t=e.use(r.default),n=t.namedTypes,s=t.builders,o=t.builtInTypes.number,l=t.builtInTypes.array,c=e.use(i.default),u=e.use(a.default),p=function e(t,n,r){if(!(this instanceof e))throw Error("NodePath constructor cannot be invoked without 'new'");c.call(this,t,n,r)},h=p.prototype=Object.create(c.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}});function d(e){return n.BinaryExpression.check(e)||n.LogicalExpression.check(e)}Object.defineProperties(h,{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}}}),h.replace=function(){return delete this.node,delete this.parent,delete this.scope,c.prototype.replace.apply(this,arguments)},h.prune=function(){var e=this.parent;return this.replace(),function(e){if(n.VariableDeclaration.check(e.node)){var t=e.get("declarations").value;if(!t||0===t.length)return e.prune()}else if(n.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else n.IfStatement.check(e.node)&&function(e){var t=e.get("test").value,r=e.get("alternate").value,i=e.get("consequent").value;if(i||r){if(!i&&r){var a=s.unaryExpression("!",t,!0);n.UnaryExpression.check(t)&&"!"===t.operator&&(a=t.argument),e.get("test").replace(a),e.get("consequent").replace(r),e.get("alternate").replace()}}else{var o=s.expressionStatement(t);e.replace(o)}}(e);return e}(e)},h._computeNode=function(){var e=this.value;if(n.Node.check(e))return e;var t=this.parentPath;return t&&t.node||null},h._computeParent=function(){var e=this.value,t=this.parentPath;if(!n.Node.check(e)){for(;t&&!n.Node.check(t.value);)t=t.parentPath;t&&(t=t.parentPath)}for(;t&&!n.Node.check(t.value);)t=t.parentPath;return t||null},h._computeScope=function(){var e=this.value,t=this.parentPath,r=t&&t.scope;return n.Node.check(e)&&u.isEstablishedBy(e)&&(r=new u(this,r)),r||null},h.getValueProperty=function(e){return t.getFieldValue(this.value,e)},h.needsParens=function(e){var t=this.parentPath;if(!t)return!1;var r=this.value;if(!n.Expression.check(r))return!1;if("Identifier"===r.type)return!1;for(;!n.Node.check(t.value);)if(!(t=t.parentPath))return!1;var i=t.value;switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===i.type&&"object"===this.name&&i.object===r;case"BinaryExpression":case"LogicalExpression":switch(i.type){case"CallExpression":return"callee"===this.name&&i.callee===r;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&i.object===r;case"BinaryExpression":case"LogicalExpression":var a=r,s=i.operator,l=f[s],c=a.operator,u=f[c];if(l>u)return!0;if(l===u&&"right"===this.name){if(i.right!==a)throw Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(i.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(i.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"MemberExpression"===i.type&&o.check(r.value)&&"object"===this.name&&i.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(i.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&i.callee===r;case"ConditionalExpression":return"test"===this.name&&i.test===r;case"MemberExpression":return"object"===this.name&&i.object===r;default:return!1}default:if("NewExpression"===i.type&&"callee"===this.name&&i.callee===r)return m(r)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};function m(e){return!!n.CallExpression.check(e)||(l.check(e)?e.some(m):!!n.Node.check(e)&&t.someField(e,(function(e,t){return m(t)})))}return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach((function(e,t){e.forEach((function(e){f[e]=t}))})),h.canBeFirstInStatement=function(){var e=this.node;return!n.FunctionExpression.check(e)&&!n.ObjectExpression.check(e)},h.firstInStatement=function(){return function(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,n.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw Error("Nodes must be equal");return!0}if(n.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw Error("Nodes must be equal");return!0}if(n.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw Error("Nodes must be equal")}else if(n.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw Error("Nodes must be equal")}else if(n.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw Error("Nodes must be equal")}else if(n.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw Error("Nodes must be equal")}else if(d(r)&&"left"===e.name){if(r.left!==t)throw Error("Nodes must be equal")}else{if(!n.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw Error("Nodes must be equal")}}return!0}(this)},p},e.exports=t.default}(nt,nt.exports)),nt.exports}var ut,pt,ht={exports:{}};function dt(){return ut||(ut=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e.__importDefault(Ze());t.default=function(e){var t=e.use(n.default),r=t.getFieldNames,i=t.getFieldValue,a=t.builtInTypes.array,s=t.builtInTypes.object,o=t.builtInTypes.Date,l=t.builtInTypes.RegExp,c=Object.prototype.hasOwnProperty;function u(e,t,n){return a.check(n)?n.length=0:n=null,h(e,t,n)}function p(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function h(e,t,n){return e===t||(a.check(e)?function(e,t,n){a.assert(e);var r=e.length;if(!a.check(t)||t.length!==r)return n&&n.push("length"),!1;for(var i=0;i<r;++i){if(n&&n.push(i),i in e!=i in t)return!1;if(!h(e[i],t[i],n))return!1;if(n){var s=n.pop();if(s!==i)throw Error(""+s)}}return!0}(e,t,n):s.check(e)?function(e,t,n){if(s.assert(e),!s.check(t))return!1;if(e.type!==t.type)return n&&n.push("type"),!1;var a=r(e),o=a.length,l=r(t),u=l.length;if(o===u){for(var p=0;p<o;++p){var d=a[p],f=i(e,d),m=i(t,d);if(n&&n.push(d),!h(f,m,n))return!1;if(n){var y=n.pop();if(y!==d)throw Error(""+y)}}return!0}if(!n)return!1;var g=Object.create(null);for(p=0;p<o;++p)g[a[p]]=!0;for(p=0;p<u;++p){if(d=l[p],!c.call(g,d))return n.push(d),!1;delete g[d]}for(d in g){n.push(d);break}return!1}(e,t,n):o.check(e)?o.check(t)&&+e==+t:l.check(e)?l.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}return u.assert=function(e,t){var n=[];if(!u(e,t,n)){if(0!==n.length)throw Error("Nodes differ in the following path: "+n.map(p).join(""));if(e!==t)throw Error("Nodes must be equal")}},u},e.exports=t.default}(ht,ht.exports)),ht.exports}var ft,mt={exports:{}},yt={};function gt(){return ft||(ft=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.LogicalOperators=yt.AssignmentOperators=yt.BinaryOperators=void 0,yt.BinaryOperators=["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],yt.AssignmentOperators=["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],yt.LogicalOperators=["||","&&"]),yt}var bt,vt,xt={exports:{}};function St(){return bt||(bt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e.__importDefault(Ze());t.default=function(e){var t=e.use(n.default),r=t.Type,i=t.builtInTypes,a=i.number,s=r.or(i.string,i.number,i.boolean,i.null,i.undefined);return{geq:function(e){return r.from((function(t){return a.check(t)&&t>=e}),a+" >= "+e)},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:r.from((function(e){if(null===e)return!0;var t=typeof e;return"object"!==t&&"function"!==t}),s.toString())}},e.exports=t.default}(xt,xt.exports)),xt.exports}function Et(){return vt||(vt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=gt(),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){var t=e.use(i.default).Type,n=t.def,s=t.or,o=e.use(a.default),l=o.defaults,c=o.geq;n("Printable").field("loc",s(n("SourceLocation"),null),l.null,!0),n("Node").bases("Printable").field("type",String).field("comments",s([n("Comment")],null),l.null,!0),n("SourceLocation").field("start",n("Position")).field("end",n("Position")).field("source",s(String,null),l.null),n("Position").field("line",c(1)).field("column",c(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",s(String,null),l.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",s(n("Identifier"),null),l.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")).field("generator",Boolean,l.false).field("async",Boolean,l.false),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",s(n("Statement"),null),l.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",s(n("Identifier"),null),l.null),n("ContinueStatement").bases("Statement").build("label").field("label",s(n("Identifier"),null),l.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,l.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",s(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",s(n("CatchClause"),null),(function(){return this.handlers&&this.handlers[0]||null})).field("handlers",[n("CatchClause")],(function(){return this.handler?[this.handler]:[]}),!0).field("guardedHandlers",[n("CatchClause")],l.emptyArray).field("finalizer",s(n("BlockStatement"),null),l.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",s(n("Expression"),null),l.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(n("VariableDeclaration"),n("Expression"),null)).field("test",s(n("Expression"),null)).field("update",s(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",s(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",s(n("Expression"),null),l.null),n("Expression").bases("Node"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[s(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=s("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,l.true);var p=s.apply(void 0,r.BinaryOperators);n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",p).field("left",n("Expression")).field("right",n("Expression"));var h=s.apply(void 0,r.AssignmentOperators);n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",s(n("Pattern"),n("MemberExpression"))).field("right",n("Expression"));var d=s("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",d).field("argument",n("Expression")).field("prefix",Boolean);var f=s.apply(void 0,r.LogicalOperators);n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",s(n("Identifier"),n("Expression"))).field("computed",Boolean,(function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e})),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",s(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Expression","Pattern").build("name").field("name",String).field("optional",Boolean,l.false),n("Literal").bases("Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),(function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null})),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,l.true).field("trailing",Boolean,l.false)},e.exports=t.default}(mt,mt.exports)),mt.exports}var Tt,kt={exports:{}};function Pt(){return Tt||(Tt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Et()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=t.Type.def,s=t.Type.or,o=e.use(a.default).defaults;n("Function").field("generator",Boolean,o.false).field("expression",Boolean,o.false).field("defaults",[s(n("Expression"),null)],o.emptyArray).field("rest",s(n("Identifier"),null),o.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")).field("typeAnnotation",s(n("TypeAnnotation"),n("TSTypeAnnotation"),null),o.null),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression").field("id",s(n("Identifier"),null)),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,o.null).field("body",s(n("BlockStatement"),n("Expression"))).field("generator",!1,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",s(n("VariableDeclaration"),n("Pattern"))).field("right",n("Expression")).field("body",n("Statement")),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",s(n("Expression"),null)).field("delegate",Boolean,o.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",s(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",s(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",s(n("Literal"),n("Identifier"),n("Expression"))).field("value",s(n("Expression"),n("Pattern"))).field("method",Boolean,o.false).field("shorthand",Boolean,o.false).field("computed",Boolean,o.false),n("ObjectProperty").field("shorthand",Boolean,o.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",s(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,o.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[s(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[s(n("Pattern"),null)]),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[s(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[s(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[s(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression")),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",s("constructor","method","get","set")).field("key",n("Expression")).field("value",n("Function")).field("computed",Boolean,o.false).field("static",Boolean,o.false);var l=s(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",s(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,o.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",l),n("ClassBody").bases("Declaration").build("body").field("body",[l]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",s(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",s(n("Expression"),null),o.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",s(n("Identifier"),null),o.null).field("body",n("ClassBody")).field("superClass",s(n("Expression"),null),o.null),n("Super").bases("Expression").build(),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",s(n("Identifier"),null),o.null).field("id",s(n("Identifier"),null),o.null).field("name",s(n("Identifier"),null),o.null),n("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",n("Identifier")),n("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),n("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),n("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(n("ImportSpecifier"),n("ImportNamespaceSpecifier"),n("ImportDefaultSpecifier"))],o.emptyArray).field("source",n("Literal")).field("importKind",s("value","type"),(function(){return"value"})),n("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(n("Declaration"),null)).field("specifiers",[n("ExportSpecifier")],o.emptyArray).field("source",s(n("Literal"),null),o.null),n("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",n("Identifier")),n("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(n("Declaration"),n("Expression"))),n("ExportAllDeclaration").bases("Declaration").build("source").field("source",n("Literal")),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean),n("MetaProperty").bases("Expression").build("meta","property").field("meta",n("Identifier")).field("property",n("Identifier"))},e.exports=t.default}(kt,kt.exports)),kt.exports}var wt,_t={exports:{}};function At(){return wt||(wt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=gt(),i=n.__importDefault(Pt()),a=n.__importDefault(Ze());t.default=function(e){e.use(i.default);var t=e.use(a.default),s=t.Type.def,o=t.Type.or,l=o.apply(void 0,n.__spreadArrays(r.BinaryOperators,["**"]));s("BinaryExpression").field("operator",l);var c=o.apply(void 0,n.__spreadArrays(r.AssignmentOperators,["**="]));s("AssignmentExpression").field("operator",c)},e.exports=t.default}(_t,_t.exports)),_t.exports}var Ct,It={exports:{}};function Nt(){return Ct||(Ct=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(At()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default).Type.def,n=e.use(a.default).defaults;t("Function").field("async",Boolean,n.false),t("AwaitExpression").bases("Expression").build("argument").field("argument",t("Expression"))},e.exports=t.default}(It,It.exports)),It.exports}var Ot,Dt={exports:{}};function jt(){return Ot||(Ot=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Nt()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=t.Type.def,s=t.Type.or,o=e.use(a.default).defaults;n("ForOfStatement").field("await",Boolean,o.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[s(n("Property"),n("SpreadProperty"),n("SpreadElement"))]),n("TemplateElement").field("value",{cooked:s(String,null),raw:String}),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[s(n("PropertyPattern"),n("Property"),n("RestElement"),n("SpreadPropertyPattern"))])},e.exports=t.default}(Dt,Dt.exports)),Dt.exports}var Lt,Mt={exports:{}};function Bt(){return Lt||(Lt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(jt()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=t.Type.def,s=t.Type.or,o=e.use(a.default).defaults;n("CatchClause").field("param",s(n("Pattern"),null),o.null)},e.exports=t.default}(Mt,Mt.exports)),Mt.exports}var Ft,Vt={exports:{}};function Rt(){return Ft||(Ft=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=gt(),i=n.__importDefault(Bt()),a=n.__importDefault(Ze()),s=n.__importDefault(St());t.default=function(e){e.use(i.default);var t=e.use(a.default),o=t.Type.def,l=t.Type.or,c=e.use(s.default).defaults;o("ImportExpression").bases("Expression").build("source").field("source",o("Expression")),o("ExportAllDeclaration").build("source","exported").field("source",o("Literal")).field("exported",l(o("Identifier"),null)),o("ChainElement").bases("Node").field("optional",Boolean,c.false),o("CallExpression").bases("Expression","ChainElement"),o("MemberExpression").bases("Expression","ChainElement"),o("ChainExpression").bases("Expression").build("expression").field("expression",o("ChainElement")),o("OptionalCallExpression").bases("CallExpression").build("callee","arguments","optional").field("optional",Boolean,c.true),o("OptionalMemberExpression").bases("MemberExpression").build("object","property","computed","optional").field("optional",Boolean,c.true);var u=l.apply(void 0,n.__spreadArrays(r.LogicalOperators,["??"]));o("LogicalExpression").field("operator",u)},e.exports=t.default}(Vt,Vt.exports)),Vt.exports}var qt,Ut,zt={exports:{}},Wt={exports:{}},Jt={exports:{}};function Gt(){return Ut||(Ut=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Ze()),i=n.__importDefault(St()),a=n.__importDefault(Rt());t.default=function(e){e.use(a.default);var t=e.use(r.default),n=t.Type,s=t.Type.def,o=n.or,l=e.use(i.default).defaults;s("AwaitExpression").build("argument","all").field("argument",o(s("Expression"),null)).field("all",Boolean,l.false),s("Decorator").bases("Node").build("expression").field("expression",s("Expression")),s("Property").field("decorators",o([s("Decorator")],null),l.null),s("MethodDefinition").field("decorators",o([s("Decorator")],null),l.null),s("PrivateName").bases("Expression","Pattern").build("id").field("id",s("Identifier")),s("ClassPrivateProperty").bases("ClassProperty").build("key","value").field("key",s("PrivateName")).field("value",o(s("Expression"),null),l.null)},e.exports=t.default}(Jt,Jt.exports)),Jt.exports}var Ht,Xt,$t={exports:{}};function Kt(){return Ht||(Ht=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Ze()),i=n.__importDefault(St());t.default=function(e){var t=e.use(r.default),n=t.Type.def,a=t.Type.or,s=e.use(i.default).defaults,o=a(n("TypeAnnotation"),n("TSTypeAnnotation"),null),l=a(n("TypeParameterDeclaration"),n("TSTypeParameterDeclaration"),null);n("Identifier").field("typeAnnotation",o,s.null),n("ObjectPattern").field("typeAnnotation",o,s.null),n("Function").field("returnType",o,s.null).field("typeParameters",l,s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",a(n("Expression"),null)).field("static",Boolean,s.false).field("typeAnnotation",o,s.null),["ClassDeclaration","ClassExpression"].forEach((function(e){n(e).field("typeParameters",l,s.null).field("superTypeParameters",a(n("TypeParameterInstantiation"),n("TSTypeParameterInstantiation"),null),s.null).field("implements",a([n("ClassImplements")],[n("TSExpressionWithTypeArguments")]),s.emptyArray)}))},e.exports=t.default}($t,$t.exports)),$t.exports}function Qt(){return Xt||(Xt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Gt()),i=n.__importDefault(Kt()),a=n.__importDefault(Ze()),s=n.__importDefault(St());t.default=function(e){e.use(r.default),e.use(i.default);var t=e.use(a.default),n=t.Type.def,o=t.Type.or,l=e.use(s.default).defaults;n("Flow").bases("Node"),n("FlowType").bases("Flow"),n("AnyTypeAnnotation").bases("FlowType").build(),n("EmptyTypeAnnotation").bases("FlowType").build(),n("MixedTypeAnnotation").bases("FlowType").build(),n("VoidTypeAnnotation").bases("FlowType").build(),n("SymbolTypeAnnotation").bases("FlowType").build(),n("NumberTypeAnnotation").bases("FlowType").build(),n("BigIntTypeAnnotation").bases("FlowType").build(),n("NumberLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Number).field("raw",String),n("BigIntLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",null).field("raw",String),n("StringTypeAnnotation").bases("FlowType").build(),n("StringLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("FlowType").build(),n("BooleanLiteralTypeAnnotation").bases("FlowType").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("FlowType")),n("NullableTypeAnnotation").bases("FlowType").build("typeAnnotation").field("typeAnnotation",n("FlowType")),n("NullLiteralTypeAnnotation").bases("FlowType").build(),n("NullTypeAnnotation").bases("FlowType").build(),n("ThisTypeAnnotation").bases("FlowType").build(),n("ExistsTypeAnnotation").bases("FlowType").build(),n("ExistentialTypeParam").bases("FlowType").build(),n("FunctionTypeAnnotation").bases("FlowType").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("FlowType")).field("rest",o(n("FunctionTypeParam"),null)).field("typeParameters",o(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",o(n("Identifier"),null)).field("typeAnnotation",n("FlowType")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("FlowType").build("elementType").field("elementType",n("FlowType")),n("ObjectTypeAnnotation").bases("FlowType").build("properties","indexers","callProperties").field("properties",[o(n("ObjectTypeProperty"),n("ObjectTypeSpreadProperty"))]).field("indexers",[n("ObjectTypeIndexer")],l.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],l.emptyArray).field("inexact",o(Boolean,void 0),l[void 0]).field("exact",Boolean,l.false).field("internalSlots",[n("ObjectTypeInternalSlot")],l.emptyArray),n("Variance").bases("Node").build("kind").field("kind",o("plus","minus"));var c=o(n("Variance"),"plus","minus",null);n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",o(n("Literal"),n("Identifier"))).field("value",n("FlowType")).field("optional",Boolean).field("variance",c,l.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("FlowType")).field("value",n("FlowType")).field("variance",c,l.null).field("static",Boolean,l.false),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,l.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",o(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("FlowType").build("id","typeParameters").field("id",o(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",o(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("FlowType").build("object","property").field("object",n("Identifier")).field("property",o(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("FlowType").build("types").field("types",[n("FlowType")]),n("IntersectionTypeAnnotation").bases("FlowType").build("types").field("types",[n("FlowType")]),n("TypeofTypeAnnotation").bases("FlowType").build("argument").field("argument",n("FlowType")),n("ObjectTypeSpreadProperty").bases("Node").build("argument").field("argument",n("FlowType")),n("ObjectTypeInternalSlot").bases("Node").build("id","value","optional","static","method").field("id",n("Identifier")).field("value",n("FlowType")).field("optional",Boolean).field("static",Boolean).field("method",Boolean),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("FlowType")]),n("TypeParameter").bases("FlowType").build("name","variance","bound","default").field("name",String).field("variance",c,l.null).field("bound",o(n("TypeAnnotation"),null),l.null).field("default",o(n("FlowType"),null),l.null),n("ClassProperty").field("variance",c,l.null),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",o(n("Expression"),null),l.null).field("typeParameters",o(n("TypeParameterInstantiation"),null),l.null),n("InterfaceTypeAnnotation").bases("FlowType").build("body","extends").field("body",n("ObjectTypeAnnotation")).field("extends",o([n("InterfaceExtends")],null),l.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",o(n("TypeParameterDeclaration"),null),l.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",o(n("TypeParameterInstantiation"),null),l.null),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",o(n("TypeParameterDeclaration"),null)).field("right",n("FlowType")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("OpaqueType").bases("Declaration").build("id","typeParameters","impltype","supertype").field("id",n("Identifier")).field("typeParameters",o(n("TypeParameterDeclaration"),null)).field("impltype",n("FlowType")).field("supertype",o(n("FlowType"),null)),n("DeclareOpaqueType").bases("OpaqueType").build("id","typeParameters","supertype").field("impltype",o(n("FlowType"),null)),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("FlowType").build("types").field("types",[n("FlowType")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")).field("predicate",o(n("FlowPredicate"),null),l.null),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",o(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("TypeAnnotation")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",o(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("FlowType"),n("TypeAlias"),n("DeclareOpaqueType"),n("InterfaceDeclaration"),null)).field("specifiers",[o(n("ExportSpecifier"),n("ExportBatchSpecifier"))],l.emptyArray).field("source",o(n("Literal"),null),l.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",o(n("Literal"),null),l.null),n("ImportDeclaration").field("importKind",o("value","type","typeof"),(function(){return"value"})),n("FlowPredicate").bases("Flow"),n("InferredPredicate").bases("FlowPredicate").build(),n("DeclaredPredicate").bases("FlowPredicate").build("value").field("value",n("Expression")),n("Function").field("predicate",o(n("FlowPredicate"),null),l.null),n("CallExpression").field("typeArguments",o(null,n("TypeParameterInstantiation")),l.null),n("NewExpression").field("typeArguments",o(null,n("TypeParameterInstantiation")),l.null),n("EnumDeclaration").bases("Declaration").build("id","body").field("id",n("Identifier")).field("body",o(n("EnumBooleanBody"),n("EnumNumberBody"),n("EnumStringBody"),n("EnumSymbolBody"))),n("EnumBooleanBody").build("members","explicitType").field("members",[n("EnumBooleanMember")]).field("explicitType",Boolean),n("EnumNumberBody").build("members","explicitType").field("members",[n("EnumNumberMember")]).field("explicitType",Boolean),n("EnumStringBody").build("members","explicitType").field("members",o([n("EnumStringMember")],[n("EnumDefaultedMember")])).field("explicitType",Boolean),n("EnumSymbolBody").build("members").field("members",[n("EnumDefaultedMember")]),n("EnumBooleanMember").build("id","init").field("id",n("Identifier")).field("init",o(n("Literal"),Boolean)),n("EnumNumberMember").build("id","init").field("id",n("Identifier")).field("init",n("Literal")),n("EnumStringMember").build("id","init").field("id",n("Identifier")).field("init",n("Literal")),n("EnumDefaultedMember").build("id").field("id",n("Identifier"))},e.exports=t.default}(Wt,Wt.exports)),Wt.exports}var Yt,Zt,en,tn={exports:{}},nn={exports:{}},rn={exports:{}};function an(){return Zt||(Zt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Gt()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=e.use(a.default).defaults,s=t.Type.def,o=t.Type.or;s("Noop").bases("Statement").build(),s("DoExpression").bases("Expression").build("body").field("body",[s("Statement")]),s("BindExpression").bases("Expression").build("object","callee").field("object",o(s("Expression"),null)).field("callee",s("Expression")),s("ParenthesizedExpression").bases("Expression").build("expression").field("expression",s("Expression")),s("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",s("Identifier")),s("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",s("Identifier")),s("CommentBlock").bases("Comment").build("value","leading","trailing"),s("CommentLine").bases("Comment").build("value","leading","trailing"),s("Directive").bases("Node").build("value").field("value",s("DirectiveLiteral")),s("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),s("InterpreterDirective").bases("Node").build("value").field("value",String),s("BlockStatement").bases("Statement").build("body").field("body",[s("Statement")]).field("directives",[s("Directive")],n.emptyArray),s("Program").bases("Node").build("body").field("body",[s("Statement")]).field("directives",[s("Directive")],n.emptyArray).field("interpreter",o(s("InterpreterDirective"),null),n.null),s("StringLiteral").bases("Literal").build("value").field("value",String),s("NumericLiteral").bases("Literal").build("value").field("value",Number).field("raw",o(String,null),n.null).field("extra",{rawValue:Number,raw:String},(function(){return{rawValue:this.value,raw:this.value+""}})),s("BigIntLiteral").bases("Literal").build("value").field("value",o(String,Number)).field("extra",{rawValue:String,raw:String},(function(){return{rawValue:this.value+"",raw:this.value+"n"}})),s("NullLiteral").bases("Literal").build().field("value",null,n.null),s("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),s("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String).field("value",RegExp,(function(){return RegExp(this.pattern,this.flags)}));var l=o(s("Property"),s("ObjectMethod"),s("ObjectProperty"),s("SpreadProperty"),s("SpreadElement"));s("ObjectExpression").bases("Expression").build("properties").field("properties",[l]),s("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",o("method","get","set")).field("key",o(s("Literal"),s("Identifier"),s("Expression"))).field("params",[s("Pattern")]).field("body",s("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("accessibility",o(s("Literal"),null),n.null).field("decorators",o([s("Decorator")],null),n.null),s("ObjectProperty").bases("Node").build("key","value").field("key",o(s("Literal"),s("Identifier"),s("Expression"))).field("value",o(s("Expression"),s("Pattern"))).field("accessibility",o(s("Literal"),null),n.null).field("computed",Boolean,n.false);var c=o(s("MethodDefinition"),s("VariableDeclarator"),s("ClassPropertyDefinition"),s("ClassProperty"),s("ClassPrivateProperty"),s("ClassMethod"),s("ClassPrivateMethod"));s("ClassBody").bases("Declaration").build("body").field("body",[c]),s("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("key",o(s("Literal"),s("Identifier"),s("Expression"))),s("ClassPrivateMethod").bases("Declaration","Function").build("key","params","body","kind","computed","static").field("key",s("PrivateName")),["ClassMethod","ClassPrivateMethod"].forEach((function(e){s(e).field("kind",o("get","set","method","constructor"),(function(){return"method"})).field("body",s("BlockStatement")).field("computed",Boolean,n.false).field("static",o(Boolean,null),n.null).field("abstract",o(Boolean,null),n.null).field("access",o("public","private","protected",null),n.null).field("accessibility",o("public","private","protected",null),n.null).field("decorators",o([s("Decorator")],null),n.null).field("optional",o(Boolean,null),n.null)}));var u=o(s("Property"),s("PropertyPattern"),s("SpreadPropertyPattern"),s("SpreadProperty"),s("ObjectProperty"),s("RestProperty"));s("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",o([s("Decorator")],null),n.null),s("SpreadProperty").bases("Node").build("argument").field("argument",s("Expression")),s("RestProperty").bases("Node").build("argument").field("argument",s("Expression")),s("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",o(s("VariableDeclaration"),s("Expression"))).field("right",s("Expression")).field("body",s("Statement")),s("Import").bases("Expression").build()},e.exports=t.default}(rn,rn.exports)),rn.exports}var sn,on,ln,cn={exports:{}},un={};function pn(){return ln||(ln=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.visit=e.use=e.Type=e.someField=e.PathVisitor=e.Path=e.NodePath=e.namedTypes=e.getSupertypeNames=e.getFieldValue=e.getFieldNames=e.getBuilderName=e.finalize=e.eachField=e.defineMethod=e.builtInTypes=e.builders=e.astNodesAreEquivalent=void 0;var t=$e,n=t.__importDefault((pt||(pt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Ze()),i=n.__importDefault((ot||(ot=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Ze()),i=n.__importDefault(ct()),a=Object.prototype.hasOwnProperty;t.default=function(e){var t=e.use(r.default),n=e.use(i.default),s=t.builtInTypes.array,o=t.builtInTypes.object,l=t.builtInTypes.function,c=function e(){if(!(this instanceof e))throw Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(e){var n=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(n[r.slice(5)]=!0);for(var i=t.computeSupertypeLookupTable(n),a=Object.create(null),s=Object.keys(i),o=s.length,c=0;c<o;++c){var u=s[c];r="visit"+i[u],l.check(e[r])&&(a[u]=r)}return a}(this),this._shouldVisitComments=a.call(this._methodNameTable,"Block")||a.call(this._methodNameTable,"Line"),this.Context=d(this),this._visiting=!1,this._changeReported=!1};function u(e,t){for(var n in t)a.call(t,n)&&(e[n]=t[n]);return e}c.fromMethodsObject=function(e){if(e instanceof c)return e;if(!o.check(e))return new c;var t=function e(){if(!(this instanceof e))throw Error("Visitor constructor cannot be invoked without 'new'");c.call(this)},n=t.prototype=Object.create(p);return n.constructor=t,u(n,e),u(t,c),l.assert(t.fromMethodsObject),l.assert(t.visit),new t},c.visit=function(e,t){return c.fromMethodsObject(t).visit(e)};var p=c.prototype;function h(e,r){if(!(e instanceof n))throw Error("");if(!(r instanceof c))throw Error("");var i=e.value;if(s.check(i))e.each(r.visitWithoutReset,r);else if(o.check(i)){var l=t.getFieldNames(i);r._shouldVisitComments&&i.comments&&l.indexOf("comments")<0&&l.push("comments");for(var u=l.length,p=[],h=0;h<u;++h){var d=l[h];a.call(i,d)||(i[d]=t.getFieldValue(i,d)),p.push(e.get(d))}for(h=0;h<u;++h)r.visitWithoutReset(p[h])}return e.value}function d(e){function t(r){if(!(this instanceof t))throw Error("");if(!(this instanceof c))throw Error("");if(!(r instanceof n))throw Error("");Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=r,this.needToCallTraverse=!0,Object.seal(this)}if(!(e instanceof c))throw Error("");var r=t.prototype=Object.create(e);return r.constructor=t,u(r,f),t}p.visit=function(){if(this._visiting)throw 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 e,t=arguments.length,r=Array(t),i=0;i<t;++i)r[i]=arguments[i];r[0]instanceof n||(r[0]=new n({root:r[0]}).get("root")),this.reset.apply(this,r);try{var a=this.visitWithoutReset(r[0]);e=!0}finally{if(this._visiting=!1,!e&&this._abortRequested)return r[0].value}return a},p.AbortRequest=function(){},p.abort=function(){var e=this;e._abortRequested=!0;var t=new e.AbortRequest;throw t.cancel=function(){e._abortRequested=!1},t},p.reset=function(e){},p.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);if(!(e instanceof n))throw Error("");var t=e.value,r=t&&"object"==typeof t&&"string"==typeof t.type&&this._methodNameTable[t.type];if(!r)return h(e,this);var i=this.acquireContext(e);try{return i.invokeVisitorMethod(r)}finally{this.releaseContext(i)}},p.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},p.releaseContext=function(e){if(!(e instanceof this.Context))throw Error("");this._reusableContextStack.push(e),e.currentPath=null},p.reportChanged=function(){this._changeReported=!0},p.wasChangeReported=function(){return this._changeReported};var f=Object.create(null);return f.reset=function(e){if(!(this instanceof this.Context))throw Error("");if(!(e instanceof n))throw Error("");return this.currentPath=e,this.needToCallTraverse=!0,this},f.invokeVisitorMethod=function(e){if(!(this instanceof this.Context))throw Error("");if(!(this.currentPath instanceof n))throw Error("");var t=this.visitor[e].call(this,this.currentPath);if(!1===t?this.needToCallTraverse=!1:void 0!==t&&(this.currentPath=this.currentPath.replace(t)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),!1!==this.needToCallTraverse)throw Error("Must either call this.traverse or return false in "+e);var r=this.currentPath;return r&&r.value},f.traverse=function(e,t){if(!(this instanceof this.Context))throw Error("");if(!(e instanceof n))throw Error("");if(!(this.currentPath instanceof n))throw Error("");return this.needToCallTraverse=!1,h(e,c.fromMethodsObject(t||this.visitor))},f.visit=function(e,t){if(!(this instanceof this.Context))throw Error("");if(!(e instanceof n))throw Error("");if(!(this.currentPath instanceof n))throw Error("");return this.needToCallTraverse=!1,c.fromMethodsObject(t||this.visitor).visitWithoutReset(e)},f.reportChanged=function(){this.visitor.reportChanged()},f.abort=function(){this.needToCallTraverse=!1,this.visitor.abort()},c},e.exports=t.default}(tt,tt.exports)),tt.exports)),a=n.__importDefault(dt()),s=n.__importDefault(it()),o=n.__importDefault(ct());t.default=function(e){var t=function(){var e=[],t=[],n={use:function(r){var i=e.indexOf(r);return-1===i&&(i=e.length,e.push(r),t[i]=r(n)),t[i]}};return n}(),n=t.use(r.default);e.forEach(t.use),n.finalize();var l=t.use(i.default);return{Type:n.Type,builtInTypes:n.builtInTypes,namedTypes:n.namedTypes,builders:n.builders,defineMethod:n.defineMethod,getFieldNames:n.getFieldNames,getFieldValue:n.getFieldValue,eachField:n.eachField,someField:n.someField,getSupertypeNames:n.getSupertypeNames,getBuilderName:n.getBuilderName,astNodesAreEquivalent:t.use(a.default),finalize:n.finalize,Path:t.use(s.default),NodePath:t.use(o.default),PathVisitor:l,use:t.use,visit:l.visit}},e.exports=t.default}(Qe,Qe.exports)),Qe.exports)),r=t.__importDefault(Et()),i=t.__importDefault(Pt()),a=t.__importDefault(At()),s=t.__importDefault(Nt()),o=t.__importDefault(jt()),l=t.__importDefault(Bt()),c=t.__importDefault(Rt()),u=t.__importDefault((qt||(qt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Rt()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=t.Type.def,s=t.Type.or,o=e.use(a.default).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",s(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",s(n("Literal"),n("JSXExpressionContainer"),n("JSXElement"),n("JSXFragment"),null),o.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",s(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,o.false);var l=s(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var c=[s(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",s(n("Expression"),n("JSXEmptyExpression")));var u=[s(n("JSXText"),n("JSXExpressionContainer"),n("JSXSpreadChild"),n("JSXElement"),n("JSXFragment"),n("Literal"))];n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",s(n("JSXClosingElement"),null),o.null).field("children",u,o.emptyArray).field("name",l,(function(){return this.openingElement.name}),!0).field("selfClosing",Boolean,(function(){return this.openingElement.selfClosing}),!0).field("attributes",c,(function(){return this.openingElement.attributes}),!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",l).field("attributes",c,o.emptyArray).field("selfClosing",Boolean,o.false),n("JSXClosingElement").bases("Node").build("name").field("name",l),n("JSXFragment").bases("Expression").build("openingFragment","closingFragment","children").field("openingFragment",n("JSXOpeningFragment")).field("closingFragment",n("JSXClosingFragment")).field("children",u,o.emptyArray),n("JSXOpeningFragment").bases("Node").build(),n("JSXClosingFragment").bases("Node").build(),n("JSXText").bases("Literal").build("value","raw").field("value",String).field("raw",String,(function(){return this.value})),n("JSXEmptyExpression").bases("Node").build(),n("JSXSpreadChild").bases("Node").build("expression").field("expression",n("Expression"))},e.exports=t.default}(zt,zt.exports)),zt.exports)),p=t.__importDefault(Qt()),h=t.__importDefault((Yt||(Yt=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(Rt()),i=n.__importDefault(Ze()),a=n.__importDefault(St());t.default=function(e){e.use(r.default);var t=e.use(i.default),n=e.use(a.default).defaults,s=t.Type.def,o=t.Type.or;s("VariableDeclaration").field("declarations",[o(s("VariableDeclarator"),s("Identifier"))]),s("Property").field("value",o(s("Expression"),s("Pattern"))),s("ArrayPattern").field("elements",[o(s("Pattern"),s("SpreadElement"),null)]),s("ObjectPattern").field("properties",[o(s("Property"),s("PropertyPattern"),s("SpreadPropertyPattern"),s("SpreadProperty"))]),s("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),s("ExportBatchSpecifier").bases("Specifier").build(),s("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",o(s("Declaration"),s("Expression"),null)).field("specifiers",[o(s("ExportSpecifier"),s("ExportBatchSpecifier"))],n.emptyArray).field("source",o(s("Literal"),null),n.null),s("Block").bases("Comment").build("value","leading","trailing"),s("Line").bases("Comment").build("value","leading","trailing")},e.exports=t.default}(tn,tn.exports)),tn.exports)),d=t.__importDefault((en||(en=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(an()),i=n.__importDefault(Qt());t.default=function(e){e.use(r.default),e.use(i.default)},e.exports=t.default}(nn,nn.exports)),nn.exports)),f=t.__importDefault((sn||(sn=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=$e,r=n.__importDefault(an()),i=n.__importDefault(Kt()),a=n.__importDefault(Ze()),s=n.__importDefault(St());t.default=function(e){e.use(r.default),e.use(i.default);var t=e.use(a.default),n=t.namedTypes,o=t.Type.def,l=t.Type.or,c=e.use(s.default).defaults,u=t.Type.from((function(e,t){return!(!n.StringLiteral||!n.StringLiteral.check(e,t))||!(!n.Literal||!n.Literal.check(e,t)||"string"!=typeof e.value)}),"StringLiteral");o("TSType").bases("Node");var p=l(o("Identifier"),o("TSQualifiedName"));o("TSTypeReference").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("typeName","typeParameters").field("typeName",p),o("TSHasOptionalTypeParameterInstantiation").field("typeParameters",l(o("TSTypeParameterInstantiation"),null),c.null),o("TSHasOptionalTypeParameters").field("typeParameters",l(o("TSTypeParameterDeclaration"),null,void 0),c.null),o("TSHasOptionalTypeAnnotation").field("typeAnnotation",l(o("TSTypeAnnotation"),null),c.null),o("TSQualifiedName").bases("Node").build("left","right").field("left",p).field("right",p),o("TSAsExpression").bases("Expression","Pattern").build("expression","typeAnnotation").field("expression",o("Expression")).field("typeAnnotation",o("TSType")).field("extra",l({parenthesized:Boolean},null),c.null),o("TSNonNullExpression").bases("Expression","Pattern").build("expression").field("expression",o("Expression")),["TSAnyKeyword","TSBigIntKeyword","TSBooleanKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword","TSThisType"].forEach((function(e){o(e).bases("TSType").build()})),o("TSArrayType").bases("TSType").build("elementType").field("elementType",o("TSType")),o("TSLiteralType").bases("TSType").build("literal").field("literal",l(o("NumericLiteral"),o("StringLiteral"),o("BooleanLiteral"),o("TemplateLiteral"),o("UnaryExpression"))),["TSUnionType","TSIntersectionType"].forEach((function(e){o(e).bases("TSType").build("types").field("types",[o("TSType")])})),o("TSConditionalType").bases("TSType").build("checkType","extendsType","trueType","falseType").field("checkType",o("TSType")).field("extendsType",o("TSType")).field("trueType",o("TSType")).field("falseType",o("TSType")),o("TSInferType").bases("TSType").build("typeParameter").field("typeParameter",o("TSTypeParameter")),o("TSParenthesizedType").bases("TSType").build("typeAnnotation").field("typeAnnotation",o("TSType"));var h=[l(o("Identifier"),o("RestElement"),o("ArrayPattern"),o("ObjectPattern"))];["TSFunctionType","TSConstructorType"].forEach((function(e){o(e).bases("TSType","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters").field("parameters",h)})),o("TSDeclareFunction").bases("Declaration","TSHasOptionalTypeParameters").build("id","params","returnType").field("declare",Boolean,c.false).field("async",Boolean,c.false).field("generator",Boolean,c.false).field("id",l(o("Identifier"),null),c.null).field("params",[o("Pattern")]).field("returnType",l(o("TSTypeAnnotation"),o("Noop"),null),c.null),o("TSDeclareMethod").bases("Declaration","TSHasOptionalTypeParameters").build("key","params","returnType").field("async",Boolean,c.false).field("generator",Boolean,c.false).field("params",[o("Pattern")]).field("abstract",Boolean,c.false).field("accessibility",l("public","private","protected",void 0),c[void 0]).field("static",Boolean,c.false).field("computed",Boolean,c.false).field("optional",Boolean,c.false).field("key",l(o("Identifier"),o("StringLiteral"),o("NumericLiteral"),o("Expression"))).field("kind",l("get","set","method","constructor"),(function(){return"method"})).field("access",l("public","private","protected",void 0),c[void 0]).field("decorators",l([o("Decorator")],null),c.null).field("returnType",l(o("TSTypeAnnotation"),o("Noop"),null),c.null),o("TSMappedType").bases("TSType").build("typeParameter","typeAnnotation").field("readonly",l(Boolean,"+","-"),c.false).field("typeParameter",o("TSTypeParameter")).field("optional",l(Boolean,"+","-"),c.false).field("typeAnnotation",l(o("TSType"),null),c.null),o("TSTupleType").bases("TSType").build("elementTypes").field("elementTypes",[l(o("TSType"),o("TSNamedTupleMember"))]),o("TSNamedTupleMember").bases("TSType").build("label","elementType","optional").field("label",o("Identifier")).field("optional",Boolean,c.false).field("elementType",o("TSType")),o("TSRestType").bases("TSType").build("typeAnnotation").field("typeAnnotation",o("TSType")),o("TSOptionalType").bases("TSType").build("typeAnnotation").field("typeAnnotation",o("TSType")),o("TSIndexedAccessType").bases("TSType").build("objectType","indexType").field("objectType",o("TSType")).field("indexType",o("TSType")),o("TSTypeOperator").bases("TSType").build("operator").field("operator",String).field("typeAnnotation",o("TSType")),o("TSTypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",l(o("TSType"),o("TSTypeAnnotation"))),o("TSIndexSignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",[o("Identifier")]).field("readonly",Boolean,c.false),o("TSPropertySignature").bases("Declaration","TSHasOptionalTypeAnnotation").build("key","typeAnnotation","optional").field("key",o("Expression")).field("computed",Boolean,c.false).field("readonly",Boolean,c.false).field("optional",Boolean,c.false).field("initializer",l(o("Expression"),null),c.null),o("TSMethodSignature").bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("key","parameters","typeAnnotation").field("key",o("Expression")).field("computed",Boolean,c.false).field("optional",Boolean,c.false).field("parameters",h),o("TSTypePredicate").bases("TSTypeAnnotation","TSType").build("parameterName","typeAnnotation","asserts").field("parameterName",l(o("Identifier"),o("TSThisType"))).field("typeAnnotation",l(o("TSTypeAnnotation"),null),c.null).field("asserts",Boolean,c.false),["TSCallSignatureDeclaration","TSConstructSignatureDeclaration"].forEach((function(e){o(e).bases("Declaration","TSHasOptionalTypeParameters","TSHasOptionalTypeAnnotation").build("parameters","typeAnnotation").field("parameters",h)})),o("TSEnumMember").bases("Node").build("id","initializer").field("id",l(o("Identifier"),u)).field("initializer",l(o("Expression"),null),c.null),o("TSTypeQuery").bases("TSType").build("exprName").field("exprName",l(p,o("TSImportType")));var d=l(o("TSCallSignatureDeclaration"),o("TSConstructSignatureDeclaration"),o("TSIndexSignature"),o("TSMethodSignature"),o("TSPropertySignature"));o("TSTypeLiteral").bases("TSType").build("members").field("members",[d]),o("TSTypeParameter").bases("Identifier").build("name","constraint","default").field("name",String).field("constraint",l(o("TSType"),void 0),c[void 0]).field("default",l(o("TSType"),void 0),c[void 0]),o("TSTypeAssertion").bases("Expression","Pattern").build("typeAnnotation","expression").field("typeAnnotation",o("TSType")).field("expression",o("Expression")).field("extra",l({parenthesized:Boolean},null),c.null),o("TSTypeParameterDeclaration").bases("Declaration").build("params").field("params",[o("TSTypeParameter")]),o("TSTypeParameterInstantiation").bases("Node").build("params").field("params",[o("TSType")]),o("TSEnumDeclaration").bases("Declaration").build("id","members").field("id",o("Identifier")).field("const",Boolean,c.false).field("declare",Boolean,c.false).field("members",[o("TSEnumMember")]).field("initializer",l(o("Expression"),null),c.null),o("TSTypeAliasDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","typeAnnotation").field("id",o("Identifier")).field("declare",Boolean,c.false).field("typeAnnotation",o("TSType")),o("TSModuleBlock").bases("Node").build("body").field("body",[o("Statement")]),o("TSModuleDeclaration").bases("Declaration").build("id","body").field("id",l(u,p)).field("declare",Boolean,c.false).field("global",Boolean,c.false).field("body",l(o("TSModuleBlock"),o("TSModuleDeclaration"),null),c.null),o("TSImportType").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("argument","qualifier","typeParameters").field("argument",u).field("qualifier",l(p,void 0),c[void 0]),o("TSImportEqualsDeclaration").bases("Declaration").build("id","moduleReference").field("id",o("Identifier")).field("isExport",Boolean,c.false).field("moduleReference",l(p,o("TSExternalModuleReference"))),o("TSExternalModuleReference").bases("Declaration").build("expression").field("expression",u),o("TSExportAssignment").bases("Statement").build("expression").field("expression",o("Expression")),o("TSNamespaceExportDeclaration").bases("Declaration").build("id").field("id",o("Identifier")),o("TSInterfaceBody").bases("Node").build("body").field("body",[d]),o("TSExpressionWithTypeArguments").bases("TSType","TSHasOptionalTypeParameterInstantiation").build("expression","typeParameters").field("expression",p),o("TSInterfaceDeclaration").bases("Declaration","TSHasOptionalTypeParameters").build("id","body").field("id",p).field("declare",Boolean,c.false).field("extends",l([o("TSExpressionWithTypeArguments")],null),c.null).field("body",o("TSInterfaceBody")),o("TSParameterProperty").bases("Pattern").build("parameter").field("accessibility",l("public","private","protected",void 0),c[void 0]).field("readonly",Boolean,c.false).field("parameter",l(o("Identifier"),o("AssignmentPattern"))),o("ClassProperty").field("access",l("public","private","protected",void 0),c[void 0]),o("ClassBody").field("body",[l(o("MethodDefinition"),o("VariableDeclarator"),o("ClassPropertyDefinition"),o("ClassProperty"),o("ClassPrivateProperty"),o("ClassMethod"),o("ClassPrivateMethod"),o("TSDeclareMethod"),d)])},e.exports=t.default}(cn,cn.exports)),cn.exports)),m=t.__importDefault(Gt()),y=(on||(on=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.namedTypes=void 0,e.namedTypes||(e.namedTypes={})}(un)),un);Object.defineProperty(e,"namedTypes",{enumerable:!0,get:function(){return y.namedTypes}});var g=n.default([r.default,i.default,a.default,s.default,o.default,l.default,c.default,u.default,p.default,h.default,d.default,f.default,m.default]),b=g.astNodesAreEquivalent,v=g.builders,x=g.builtInTypes,S=g.defineMethod,E=g.eachField,T=g.finalize,k=g.getBuilderName,P=g.getFieldNames,w=g.getFieldValue,_=g.getSupertypeNames,A=g.namedTypes,C=g.NodePath,I=g.Path,N=g.PathVisitor,O=g.someField,D=g.Type,j=g.use,L=g.visit;e.astNodesAreEquivalent=b,e.builders=v,e.builtInTypes=x,e.defineMethod=S,e.eachField=E,e.finalize=T,e.getBuilderName=k,e.getFieldNames=P,e.getFieldValue=w,e.getSupertypeNames=_,e.NodePath=C,e.Path=I,e.PathVisitor=N,e.someField=O,e.Type=D,e.use=j,e.visit=L,Object.assign(y.namedTypes,A)}(Ke)),Ke}var hn={},dn=Fe(Object.freeze({__proto__:null,default:{ok:()=>!0,strictEqual:()=>!0,deepEqual:()=>!0}})),fn={},mn={},yn={};const gn=function(){},bn=function(){return{addMapping:gn,setSourceContent:gn,toJSON:()=>({})}},vn=function(){},xn=function(){};var Sn=Fe(Object.freeze({__proto__:null,SourceMapGenerator:bn,SourceMapConsumer:vn,SourceNode:xn,default:{SourceNode:xn,SourceMapConsumer:vn,SourceMapGenerator:bn}}));Object.defineProperty(yn,"__esModule",{value:!0}),yn.isTrailingCommaEnabled=yn.getParentExportDeclaration=yn.isExportDeclaration=yn.fixFaultyLocations=yn.getTrueLoc=On=yn.composeSourceMaps=yn.copyPos=yn.comparePos=yn.getUnionOfKeys=yn.getOption=void 0;var En=$e,Tn=En.__importDefault(dn),kn=En.__importStar(pn()).namedTypes,Pn=En.__importDefault(Sn),wn=Pn.default.SourceMapConsumer,_n=Pn.default.SourceMapGenerator,An=Object.prototype.hasOwnProperty;function Cn(e,t){return e.line-t.line||e.column-t.column}function In(e){return{line:e.line,column:e.column}}yn.getOption=function(e,t,n){return e&&An.call(e,t)?e[t]:n},yn.getUnionOfKeys=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n={},r=e.length,i=0;i<r;++i)for(var a=Object.keys(e[i]),s=a.length,o=0;o<s;++o)n[a[o]]=!0;return n},yn.comparePos=Cn,yn.copyPos=In;var Nn,On=yn.composeSourceMaps=function(e,t){if(!e)return t||null;if(!t)return e;var n=new wn(e),r=new wn(t),i=new _n({file:t.file,sourceRoot:t.sourceRoot}),a={};return r.eachMapping((function(e){var t=n.originalPositionFor({line:e.originalLine,column:e.originalColumn}),r=t.source;if(null!==r){i.addMapping({source:r,original:In(t),generated:{line:e.generatedLine,column:e.generatedColumn},name:e.name});var s=n.sourceContentFor(r);s&&!An.call(a,r)&&(a[r]=s,i.setSourceContent(r,s))}})),i.toJSON()};function Dn(e,t){e&&t&&(Cn(t.start,e.start)<0&&(e.start=t.start),Cn(e.end,t.end)<0&&(e.end=t.end))}function jn(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function Ln(){if(Nn)return mn;Nn=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.parse=void 0;var e=yn;return mn.parse=function(n,r){var i=[],a=t.parse(n,{loc:!0,locations:!0,comment:!0,onComment:i,range:e.getOption(r,"range",!1),tolerant:e.getOption(r,"tolerant",!0),tokens:!0,jsx:e.getOption(r,"jsx",!1)});return Array.isArray(a.comments)||(a.comments=i),a},mn}yn.getTrueLoc=function(e,t){if(!e.loc)return null;var n={start:e.loc.start,end:e.loc.end};function r(e){Dn(n,e.loc)}return e.declaration&&e.declaration.decorators&&jn(e)&&e.declaration.decorators.forEach(r),Cn(n.start,n.end)<0&&(n.start=In(n.start),t.skipSpaces(n.start,!1,!0),Cn(n.start,n.end)<0&&(n.end=In(n.end),t.skipSpaces(n.end,!0,!0))),e.comments&&e.comments.forEach(r),n},yn.fixFaultyLocations=function(e,t){var n=e.loc;if(n&&(n.start.line<1&&(n.start.line=1),n.end.line<1&&(n.end.line=1)),"File"===e.type&&(n.start=t.firstPos(),n.end=t.lastPos()),function(e,t){function n(e){for(var n=e&&e.loc,r=n&&n.start,i=n&&In(n.end);r&&i&&Cn(r,i)<0&&(t.prevPos(i),";"===t.charAt(i));)n.end.line=i.line,n.end.column=i.column}"ForStatement"===e.type&&(n(e.init),n(e.test),n(e.update))}(e,t),function(e,t){if("TemplateLiteral"===e.type&&0!==e.quasis.length){if(e.loc){var n=In(e.loc.start);Tn.default.strictEqual(t.charAt(n),"`"),Tn.default.ok(t.nextPos(n));var r=e.quasis[0];Cn(r.loc.start,n)<0&&(r.loc.start=n);var i=In(e.loc.end);Tn.default.ok(t.prevPos(i)),Tn.default.strictEqual(t.charAt(i),"`");var a=e.quasis[e.quasis.length-1];Cn(i,a.loc.end)<0&&(a.loc.end=i)}e.expressions.forEach((function(n,r){var i=t.skipSpaces(n.loc.start,!0,!1);if(t.prevPos(i)&&"{"===t.charAt(i)&&t.prevPos(i)&&"$"===t.charAt(i)){var a=e.quasis[r];Cn(i,a.loc.end)<0&&(a.loc.end=i)}var s=t.skipSpaces(n.loc.end,!1,!1);if("}"===t.charAt(s)){Tn.default.ok(t.nextPos(s));var o=e.quasis[r+1];Cn(o.loc.start,s)<0&&(o.loc.start=s)}}))}}(e,t),n&&e.decorators)e.decorators.forEach((function(e){Dn(n,e.loc)}));else if(e.declaration&&jn(e)){e.declaration.loc=null;var r=e.declaration.decorators;r&&r.forEach((function(e){Dn(n,e.loc)}))}else if(kn.MethodDefinition&&kn.MethodDefinition.check(e)||kn.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,kn.FunctionExpression.check(e.value)&&(e.value.id=null);else if("ObjectTypeProperty"===e.type){var i=e.loc,a=i&&i.end;a&&(a=In(a),t.prevPos(a)&&","===t.charAt(a)&&(a=t.skipSpaces(a,!0,!0))&&(i.end=a))}},yn.isExportDeclaration=jn,yn.getParentExportDeclaration=function(e){var t=e.getParentNode();return"declaration"===e.getName()&&jn(t)?t:null},yn.isTrailingCommaEnabled=function(e,t){var n=e.trailingComma;return"object"==typeof n?!!n[t]:!!n};var Mn,Bn=Fe(Object.freeze({__proto__:null,EOL:"\n"}));function Fn(){if(Mn)return fn;Mn=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.normalize=void 0;var e={parser:Ln(),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:Bn.EOL||"\n",wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0,tokens:!0},t=e.hasOwnProperty;return fn.normalize=function(n){var r=n||e;function i(n){return t.call(r,n)?r[n]:e[n]}return{tabWidth:+i("tabWidth"),useTabs:!!i("useTabs"),reuseWhitespace:!!i("reuseWhitespace"),lineTerminator:i("lineTerminator"),wrapColumn:Math.max(i("wrapColumn"),0),sourceFileName:i("sourceFileName"),sourceMapName:i("sourceMapName"),sourceRoot:i("sourceRoot"),inputSourceMap:i("inputSourceMap"),parser:i("esprima")||i("parser"),range:i("range"),tolerant:i("tolerant"),quote:i("quote"),trailingComma:i("trailingComma"),arrayBracketSpacing:i("arrayBracketSpacing"),objectCurlySpacing:i("objectCurlySpacing"),arrowParensAlways:i("arrowParensAlways"),flowObjectCommas:i("flowObjectCommas"),tokens:!!i("tokens")}},fn}var Vn,Rn,qn={},Un={};function zn(){if(Rn)return qn;Rn=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.concat=qn.fromString=qn.countSpaces=qn.Lines=void 0;var e=$e,t=e.__importDefault(dn),n=e.__importDefault(Sn),r=Fn(),i=yn,a=e.__importDefault(function(){if(Vn)return Un;Vn=1,Object.defineProperty(Un,"__esModule",{value:!0});var e=$e.__importDefault(dn),t=yn,n=function(){function n(e,t,n){void 0===n&&(n=t),this.sourceLines=e,this.sourceLoc=t,this.targetLoc=n}return n.prototype.slice=function(r,a,s){void 0===s&&(s=r.lastPos());var o=this.sourceLines,l=this.sourceLoc,c=this.targetLoc;function u(n){var i=l[n],u=c[n],p=a;return"end"===n?p=s:e.default.strictEqual(n,"start"),function(n,r,i,a,s){var o,l,c=t.comparePos(a,s);if(0===c)return r;if(c<0){o=n.skipSpaces(r)||n.lastPos(),l=i.skipSpaces(a)||i.lastPos();var u=s.line-l.line;for(o.line+=u,l.line+=u,u>0?(o.column=0,l.column=0):e.default.strictEqual(u,0);t.comparePos(l,s)<0&&i.nextPos(l,!0);)e.default.ok(n.nextPos(o,!0)),e.default.strictEqual(n.charAt(o),i.charAt(l))}else for(o=n.skipSpaces(r,!0)||n.firstPos(),l=i.skipSpaces(a,!0)||i.firstPos(),u=s.line-l.line,o.line+=u,l.line+=u,u<0?(o.column=n.getLineLength(o.line),l.column=i.getLineLength(l.line)):e.default.strictEqual(u,0);t.comparePos(s,l)<0&&i.prevPos(l,!0);)e.default.ok(n.prevPos(o,!0)),e.default.strictEqual(n.charAt(o),i.charAt(l));return o}(o,i,r,u,p)}if(t.comparePos(a,c.start)<=0)if(t.comparePos(c.end,s)<=0)c={start:i(c.start,a.line,a.column),end:i(c.end,a.line,a.column)};else{if(t.comparePos(s,c.start)<=0)return null;l={start:l.start,end:u("end")},c={start:i(c.start,a.line,a.column),end:i(s,a.line,a.column)}}else{if(t.comparePos(c.end,a)<=0)return null;t.comparePos(c.end,s)<=0?(l={start:u("start"),end:l.end},c={start:{line:1,column:0},end:i(c.end,a.line,a.column)}):(l={start:u("start"),end:u("end")},c={start:{line:1,column:0},end:i(s,a.line,a.column)})}return new n(this.sourceLines,l,c)},n.prototype.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:r(this.targetLoc.start,e,t),end:r(this.targetLoc.end,e,t)})},n.prototype.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},n.prototype.indent=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=!1),0===e)return this;var i=this.targetLoc,a=i.start.line,s=i.end.line;if(t&&1===a&&1===s)return this;if(i={start:i.start,end:i.end},!t||a>1){var o=i.start.column+e;i.start={line:a,column:r?Math.max(0,o):o}}if(!t||s>1){var l=i.end.column+e;i.end={line:s,column:r?Math.max(0,l):l}}return new n(this.sourceLines,this.sourceLoc,i)},n}();function r(e,t,n){return{line:e.line+t-1,column:1===e.line?e.column+n:e.column}}function i(e,t,n){return{line:e.line-t+1,column:e.line===t?e.column-n:e.column}}return Un.default=n,Un}()),s=function(){function s(e,n){void 0===n&&(n=null),this.infos=e,this.mappings=[],this.cachedSourceMap=null,this.cachedTabWidth=void 0,t.default.ok(e.length>0),this.length=e.length,this.name=n||null,this.name&&this.mappings.push(new a.default(this,{start:this.firstPos(),end:this.lastPos()}))}return s.prototype.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},s.prototype.getSourceMap=function(e,r){if(!e)return null;var a=this;function s(t){return(t=t||{}).file=e,r&&(t.sourceRoot=r),t}if(a.cachedSourceMap)return s(a.cachedSourceMap.toJSON());var o=new n.default.SourceMapGenerator(s()),c={};return a.mappings.forEach((function(e){for(var n=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=a.skipSpaces(e.targetLoc.start)||a.lastPos();i.comparePos(n,e.sourceLoc.end)<0&&i.comparePos(r,e.targetLoc.end)<0;){var s=e.sourceLines.charAt(n),u=a.charAt(r);t.default.strictEqual(s,u);var p=e.sourceLines.name;if(o.addMapping({source:p,original:{line:n.line,column:n.column},generated:{line:r.line,column:r.column}}),!l.call(c,p)){var h=e.sourceLines.toString();o.setSourceContent(p,h),c[p]=h}a.nextPos(r,!0),e.sourceLines.nextPos(n,!0)}})),a.cachedSourceMap=o,o.toJSON()},s.prototype.bootstrapCharAt=function(e){t.default.strictEqual(typeof e,"object"),t.default.strictEqual(typeof e.line,"number"),t.default.strictEqual(typeof e.column,"number");var n=e.line,r=e.column,i=this.toString().split(p),a=i[n-1];return void 0===a?"":r===a.length&&n<i.length?"\n":r>=a.length?"":a.charAt(r)},s.prototype.charAt=function(e){t.default.strictEqual(typeof e,"object"),t.default.strictEqual(typeof e.line,"number"),t.default.strictEqual(typeof e.column,"number");var n=e.line,r=e.column,i=this.infos[n-1],a=r;if(void 0===i||a<0)return"";var s=this.getIndentAt(n);return a<s?" ":(a+=i.sliceStart-s)===i.sliceEnd&&n<this.length?"\n":a>=i.sliceEnd?"":i.line.charAt(a)},s.prototype.stripMargin=function(n,r){if(0===n)return this;if(t.default.ok(n>0,"negative margin: "+n),r&&1===this.length)return this;var i=new s(this.infos.map((function(t,i){return t.line&&(i>0||!r)&&(t=e.__assign(e.__assign({},t),{indent:Math.max(0,t.indent-n)})),t})));if(this.mappings.length>0){var a=i.mappings;t.default.strictEqual(a.length,0),this.mappings.forEach((function(e){a.push(e.indent(n,r,!0))}))}return i},s.prototype.indent=function(n){if(0===n)return this;var r=new s(this.infos.map((function(t){return t.line&&!t.locked&&(t=e.__assign(e.__assign({},t),{indent:t.indent+n})),t})));if(this.mappings.length>0){var i=r.mappings;t.default.strictEqual(i.length,0),this.mappings.forEach((function(e){i.push(e.indent(n))}))}return r},s.prototype.indentTail=function(n){if(0===n)return this;if(this.length<2)return this;var r=new s(this.infos.map((function(t,r){return r>0&&t.line&&!t.locked&&(t=e.__assign(e.__assign({},t),{indent:t.indent+n})),t})));if(this.mappings.length>0){var i=r.mappings;t.default.strictEqual(i.length,0),this.mappings.forEach((function(e){i.push(e.indent(n,!0))}))}return r},s.prototype.lockIndentTail=function(){return this.length<2?this:new s(this.infos.map((function(t,n){return e.__assign(e.__assign({},t),{locked:n>0})})))},s.prototype.getIndentAt=function(e){return t.default.ok(e>=1,"no line "+e+" (line numbers start from 1)"),Math.max(this.infos[e-1].indent,0)},s.prototype.guessTabWidth=function(){if("number"==typeof this.cachedTabWidth)return this.cachedTabWidth;for(var e=[],t=0,n=1,r=this.length;n<=r;++n){var i=this.infos[n-1];if(!d(i.line.slice(i.sliceStart,i.sliceEnd))){var a=Math.abs(i.indent-t);e[a]=1+~~e[a],t=i.indent}}for(var s=-1,o=2,c=1;c<e.length;c+=1)l.call(e,c)&&e[c]>s&&(s=e[c],o=c);return this.cachedTabWidth=o},s.prototype.startsWithComment=function(){if(0===this.infos.length)return!1;var e=this.infos[0],t=e.sliceStart,n=e.sliceEnd,r=e.line.slice(t,n).trim();return 0===r.length||"//"===r.slice(0,2)||"/*"===r.slice(0,2)},s.prototype.isOnlyWhitespace=function(){return d(this.toString())},s.prototype.isPrecededOnlyByWhitespace=function(e){var t=this.infos[e.line-1],n=Math.max(t.indent,0),r=e.column-n;if(r<=0)return!0;var i=t.sliceStart,a=Math.min(i+r,t.sliceEnd);return d(t.line.slice(i,a))},s.prototype.getLineLength=function(e){var t=this.infos[e-1];return this.getIndentAt(e)+t.sliceEnd-t.sliceStart},s.prototype.nextPos=function(e,t){void 0===t&&(t=!1);var n=Math.max(e.line,0);return Math.max(e.column,0)<this.getLineLength(n)?(e.column+=1,!t||!!this.skipSpaces(e,!1,!0)):n<this.length&&(e.line+=1,e.column=0,!t||!!this.skipSpaces(e,!1,!0))},s.prototype.prevPos=function(e,t){void 0===t&&(t=!1);var n=e.line,r=e.column;if(r<1){if((n-=1)<1)return!1;r=this.getLineLength(n)}else r=Math.min(r-1,this.getLineLength(n));return e.line=n,e.column=r,!t||!!this.skipSpaces(e,!0,!0)},s.prototype.firstPos=function(){return{line:1,column:0}},s.prototype.lastPos=function(){return{line:this.length,column:this.getLineLength(this.length)}},s.prototype.skipSpaces=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),e=e?n?e:{line:e.line,column:e.column}:t?this.lastPos():this.firstPos(),t){for(;this.prevPos(e);)if(!d(this.charAt(e))&&this.nextPos(e))return e;return null}for(;d(this.charAt(e));)if(!this.nextPos(e))return null;return e},s.prototype.trimLeft=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);return e?this.slice(e):m},s.prototype.trimRight=function(){var e=this.skipSpaces(this.lastPos(),!0,!0);return e?this.slice(this.firstPos(),e):m},s.prototype.trim=function(){var e=this.skipSpaces(this.firstPos(),!1,!0);if(null===e)return m;var t=this.skipSpaces(this.lastPos(),!0,!0);return null===t?m:this.slice(e,t)},s.prototype.eachPos=function(e,t,n){void 0===t&&(t=this.firstPos()),void 0===n&&(n=!1);var r=this.firstPos();if(t&&(r.line=t.line,r.column=t.column),!n||this.skipSpaces(r,!1,!0))do{e.call(this,r)}while(this.nextPos(r,n))},s.prototype.bootstrapSlice=function(e,t){var n=this.toString().split(p).slice(e.line-1,t.line);return n.length>0&&(n.push(n.pop().slice(0,t.column)),n[0]=n[0].slice(e.column)),h(n.join("\n"))},s.prototype.slice=function(e,n){if(!n){if(!e)return this;n=this.lastPos()}if(!e)throw Error("cannot slice with end but not start");var r=this.infos.slice(e.line-1,n.line);e.line===n.line?r[0]=f(r[0],e.column,n.column):(t.default.ok(e.line<n.line),r[0]=f(r[0],e.column),r.push(f(r.pop(),0,n.column)));var i=new s(r);if(this.mappings.length>0){var a=i.mappings;t.default.strictEqual(a.length,0),this.mappings.forEach((function(t){var r=t.slice(this,e,n);r&&a.push(r)}),this)}return i},s.prototype.bootstrapSliceString=function(e,t,n){return this.slice(e,t).toString(n)},s.prototype.sliceString=function(e,t,n){void 0===e&&(e=this.firstPos()),void 0===t&&(t=this.lastPos());for(var i=r.normalize(n),a=i.tabWidth,s=i.useTabs,o=i.reuseWhitespace,l=i.lineTerminator,u=[],p=e.line;p<=t.line;++p){var h=this.infos[p-1];p===e.line?h=p===t.line?f(h,e.column,t.column):f(h,e.column):p===t.line&&(h=f(h,0,t.column));var m=Math.max(h.indent,0),y=h.line.slice(0,h.sliceStart);if(o&&d(y)&&c(y,a)===m)u.push(h.line.slice(0,h.sliceEnd));else{var g=0,b=m;s&&(b-=(g=Math.floor(m/a))*a);var v="";g>0&&(v+=Array(g+1).join("\t")),b>0&&(v+=Array(b+1).join(" ")),v+=h.line.slice(h.sliceStart,h.sliceEnd),u.push(v)}}return u.join(l)},s.prototype.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},s.prototype.join=function(t){var n,r=this,i=[],a=[];function o(t){if(null!==t){if(n){var r=t.infos[0],s=Array(r.indent+1).join(" "),o=i.length,l=Math.max(n.indent,0)+n.sliceEnd-n.sliceStart;n.line=n.line.slice(0,n.sliceEnd)+s+r.line.slice(r.sliceStart,r.sliceEnd),n.locked=n.locked||r.locked,n.sliceEnd=n.line.length,t.mappings.length>0&&t.mappings.forEach((function(e){a.push(e.add(o,l))}))}else t.mappings.length>0&&a.push.apply(a,t.mappings);t.infos.forEach((function(t,r){(!n||r>0)&&(n=e.__assign({},t),i.push(n))}))}}if(t.map((function(e){var t=h(e);return t.isEmpty()?null:t})).forEach((function(e,t){r.isEmpty()?o(e):function(e,t){t>0&&o(r),o(e)}(e,t)})),i.length<1)return m;var l=new s(i);return l.mappings=a,l},s.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=[this];return r.push.apply(r,e),t.default.strictEqual(r.length,e.length+1),m.join(r)},s}();qn.Lines=s;var o={},l=o.hasOwnProperty;function c(e,n){for(var r=0,i=e.length,a=0;a<i;++a)switch(e.charCodeAt(a)){case 9:t.default.strictEqual(typeof n,"number"),t.default.ok(n>0);var s=Math.ceil(r/n)*n;s===r?r+=n:r=s;break;case 11:case 12:case 13:case 65279:break;default:r+=1}return r}qn.countSpaces=c;var u=/^\s*/,p=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;function h(e,n){if(e instanceof s)return e;e+="";var i=n&&n.tabWidth,a=e.indexOf("\t")<0,h=!n&&a&&e.length<=10;if(t.default.ok(i||a,"No tab width specified but encountered tabs in string\n"+e),h&&l.call(o,e))return o[e];var d=new s(e.split(p).map((function(e){var t=u.exec(e)[0];return{line:e,indent:c(t,i),locked:!1,sliceStart:t.length,sliceEnd:e.length}})),r.normalize(n).sourceFileName);return h&&(o[e]=d),d}function d(e){return!/\S/.test(e)}function f(e,n,r){var i=e.sliceStart,a=e.sliceEnd,s=Math.max(e.indent,0),o=s+a-i;return void 0===r&&(r=o),n=Math.max(n,0),(r=Math.max(r=Math.min(r,o),n))<s?(s=r,a=i):a-=o-r,o=r,o-=n,n<s?s-=n:(n-=s,s=0,i+=n),t.default.ok(s>=0),t.default.ok(i<=a),t.default.strictEqual(o,s+a-i),e.indent===s&&e.sliceStart===i&&e.sliceEnd===a?e:{line:e.line,indent:s,locked:!1,sliceStart:i,sliceEnd:a}}qn.fromString=h,qn.concat=function(e){return m.join(e)};var m=h("");return qn}var Wn,Jn,Gn={};function Hn(){if(Wn)return Gn;Wn=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.printComments=Gn.attach=void 0;var e=$e,t=e.__importDefault(dn),n=e.__importStar(pn()),r=n.namedTypes,i=n.builtInTypes.array,a=n.builtInTypes.object,s=zn(),o=yn,l=new WeakMap;function c(e,t,s){if(!e)return s;if(o.fixFaultyLocations(e,t),s){if(r.Node.check(e)&&r.SourceLocation.check(e.loc)){for(var u=s.length-1;u>=0;--u){var p=s[u];if(p&&p.loc&&o.comparePos(p.loc.end,e.loc.start)<=0)break}return s.splice(u+1,0,e),s}}else{var h=l.get(e);if(h)return h}var d;if(i.check(e))d=Object.keys(e);else{if(!a.check(e))return s;d=n.getFieldNames(e)}s||l.set(e,s=[]),u=0;for(var f=d.length;u<f;++u)c(e[d[u]],t,s);return s}function u(e,t,n){for(var r,i,a=c(e,n),s=0,l=a&&a.length;"number"==typeof l&&s<l;){var p=s+l>>1,h=a[p];if(o.comparePos(h.loc.start,t.loc.start)<=0&&o.comparePos(t.loc.end,h.loc.end)<=0)return void u(t.enclosingNode=h,t,n);if(o.comparePos(h.loc.end,t.loc.start)<=0)r=h,s=p+1;else{if(!(o.comparePos(t.loc.end,h.loc.start)<=0))throw Error("Comment location overlaps with node location");i=h,l=p}}r&&(t.precedingNode=r),i&&(t.followingNode=i)}function p(e,n){var r=e.length;if(0!==r){for(var i,a=e[0].precedingNode,s=e[0].followingNode,o=s.loc.start,l=r;l>0;--l){i=e[l-1],t.default.strictEqual(i.precedingNode,a),t.default.strictEqual(i.followingNode,s);var c=n.sliceString(i.loc.end,o);if(/\S/.test(c))break;o=i.loc.start}for(;l<=r&&(i=e[l])&&("Line"===i.type||"CommentLine"===i.type)&&i.loc.start.column>s.loc.start.column;)++l;e.forEach((function(e,t){t<l?f(a,e):d(s,e)})),e.length=0}}function h(e,t){(e.comments||(e.comments=[])).push(t)}function d(e,t){t.leading=!0,t.trailing=!1,h(e,t)}function f(e,t){t.leading=!1,t.trailing=!0,h(e,t)}return Gn.attach=function(e,n,r){if(i.check(e)){var a=[];e.forEach((function(e){e.loc.lines=r,u(n,e,r);var i=e.precedingNode,s=e.enclosingNode,o=e.followingNode;if(i&&o){var l=a.length;if(l>0){var c=a[l-1];t.default.strictEqual(c.precedingNode===e.precedingNode,c.followingNode===e.followingNode),c.followingNode!==e.followingNode&&p(a,r)}a.push(e)}else if(i)p(a,r),f(i,e);else if(o)p(a,r),d(o,e);else{if(!s)throw Error("AST contains no nodes at all?");p(a,r),function(e,t){t.leading=!1,t.trailing=!1,h(e,t)}(s,e)}})),p(a,r),e.forEach((function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}))}},Gn.printComments=function(e,t){var i=e.getValue(),a=t(e),o=r.Node.check(i)&&n.getFieldValue(i,"comments");if(!o||0===o.length)return a;var l=[],c=[a];return e.each((function(e){var a=e.getValue(),o=n.getFieldValue(a,"leading"),u=n.getFieldValue(a,"trailing");o||u&&!r.Statement.check(i)&&"Block"!==a.type&&"CommentBlock"!==a.type?l.push(function(e,t){var n=e.getValue();r.Comment.assert(n);var i=n.loc,a=i&&i.lines,o=[t(e)];if(n.trailing)o.push("\n");else if(a instanceof s.Lines){var l=a.slice(i.end,a.skipSpaces(i.end)||a.lastPos());1===l.length?o.push(l):o.push(Array(l.length).join("\n"))}else o.push("\n");return s.concat(o)}(e,t)):u&&c.push(function(e,t){var n=e.getValue(e);r.Comment.assert(n);var i=n.loc,a=i&&i.lines,o=[];if(a instanceof s.Lines){var l=a.skipSpaces(i.start,!0)||a.firstPos(),c=a.slice(l,i.start);1===c.length?o.push(c):o.push(Array(c.length).join("\n"))}return o.push(t(e)),s.concat(o)}(e,t))}),"comments"),l.push.apply(l,c),s.concat(l)},Gn}var Xn,$n,Kn,Qn={},Yn={},Zn={};function er(){if(Xn)return Zn;Xn=1,Object.defineProperty(Zn,"__esModule",{value:!0});var e=$e,t=e.__importDefault(dn),n=e.__importStar(pn()),r=e.__importStar(yn),i=n.namedTypes,a=n.builtInTypes.array,s=n.builtInTypes.number,o={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){o[e]=t}))}));var l=function e(n){t.default.ok(this instanceof e),this.stack=[n]},c=l.prototype;function u(e,t){for(var n=e.stack,r=n.length-1;r>=0;r-=2){var a=n[r];if(i.Node.check(a)&&--t<0)return a}return null}function p(e){return i.BinaryExpression.check(e)||i.LogicalExpression.check(e)}function h(e){return!!i.CallExpression.check(e)||(a.check(e)?e.some(h):!!i.Node.check(e)&&n.someField(e,(function(e,t){return h(t)})))}return l.from=function(e){if(e instanceof l)return e.copy();if(e instanceof n.NodePath){for(var t=Object.create(l.prototype),r=[e.value],i=void 0;i=e.parentPath;e=i)r.push(e.name,i.value);return t.stack=r.reverse(),t}return new l(e)},c.copy=function(){var e=Object.create(l.prototype);return e.stack=this.stack.slice(0),e},c.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},c.getValue=function(){var e=this.stack;return e[e.length-1]},c.valueIsDuplicate=function(){var e=this.stack,t=e.length-1;return e.lastIndexOf(e[t],t-1)>=0},c.getNode=function(e){return void 0===e&&(e=0),u(this,~~e)},c.getParentNode=function(e){return void 0===e&&(e=0),u(this,1+~~e)},c.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},c.call=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var s=arguments[a];r=r[s],t.push(s,r)}var o=e(this);return t.length=n,o},c.each=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var s=arguments[a];r=r[s],t.push(s,r)}for(a=0;a<r.length;++a)a in r&&(t.push(a,r[a]),e(this),t.length-=2);t.length=n},c.map=function(e){for(var t=this.stack,n=t.length,r=t[n-1],i=arguments.length,a=1;a<i;++a){var s=arguments[a];r=r[s],t.push(s,r)}var o=Array(r.length);for(a=0;a<r.length;++a)a in r&&(t.push(a,r[a]),o[a]=e(this,a),t.length-=2);return t.length=n,o},c.hasParens=function(){var e=this.getNode(),t=this.getPrevToken(e);if(!t)return!1;var n=this.getNextToken(e);if(!n)return!1;if("("===t.value){if(")"===n.value)return!0;if(!this.canBeFirstInStatement()&&this.firstInStatement()&&!this.needsParens(!0))return!0}return!1},c.getPrevToken=function(e){var t=(e=e||this.getNode())&&e.loc,n=t&&t.tokens;if(n&&t.start.token>0){var i=n[t.start.token-1];if(i){var a=this.getRootValue().loc;if(r.comparePos(a.start,i.loc.start)<=0)return i}}return null},c.getNextToken=function(e){var t=(e=e||this.getNode())&&e.loc,n=t&&t.tokens;if(n&&t.end.token<n.length){var i=n[t.end.token];if(i){var a=this.getRootValue().loc;if(r.comparePos(i.loc.end,a.end)<=0)return i}}return null},c.needsParens=function(e){var n=this.getNode();if("AssignmentExpression"===n.type&&"ObjectPattern"===n.left.type)return!0;var r=this.getParentNode();if(!r)return!1;var a=this.getName();if(this.getValue()!==n)return!1;if(i.Statement.check(n))return!1;if("Identifier"===n.type)return!1;if("ParenthesizedExpression"===r.type||n.extra&&n.extra.parenthesized)return!1;switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===r.type&&"object"===a&&r.object===n;case"BinaryExpression":case"LogicalExpression":switch(r.type){case"CallExpression":return"callee"===a&&r.callee===n;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===a&&r.object===n;case"BinaryExpression":case"LogicalExpression":var l=r.operator,c=o[l],u=n.operator,d=o[u];if(c>d)return!0;if(c===d&&"right"===a)return t.default.strictEqual(r.right,n),!0;break;default:return!1}break;case"SequenceExpression":switch(r.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==a;default:return!0}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===r.type;case"Literal":return"MemberExpression"===r.type&&s.check(n.value)&&"object"===a&&r.object===n;case"NumericLiteral":return"MemberExpression"===r.type&&"object"===a&&r.object===n;case"YieldExpression":case"AwaitExpression":case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":case"NewExpression":return"callee"===a&&r.callee===n;case"ConditionalExpression":return"test"===a&&r.test===n;case"MemberExpression":return"object"===a&&r.object===n;default:return!1}case"ArrowFunctionExpression":return!(!i.CallExpression.check(r)||"callee"!==a||r.callee!==n)||!(!i.MemberExpression.check(r)||"object"!==a||r.object!==n)||!(!i.TSAsExpression||!i.TSAsExpression.check(r)||"expression"!==a||r.expression!==n)||p(r);case"ObjectExpression":if("ArrowFunctionExpression"===r.type&&"body"===a&&r.body===n)return!0;break;case"TSAsExpression":if("ArrowFunctionExpression"===r.type&&"body"===a&&r.body===n&&"ObjectExpression"===n.expression.type)return!0;break;case"CallExpression":if("declaration"===a&&i.ExportDefaultDeclaration.check(r)&&i.FunctionExpression.check(n.callee))return!0}return"NewExpression"===r.type&&"callee"===a&&r.callee===n?h(n):!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())},c.canBeFirstInStatement=function(){var e=this.getNode();return!i.FunctionExpression.check(e)&&!i.ObjectExpression.check(e)&&!i.ClassExpression.check(e)},c.firstInStatement=function(){for(var e,n,r,a,s=this.stack,o=s.length-1;o>=0;o-=2)if(i.Node.check(s[o])&&(r=e,a=n,e=s[o-1],n=s[o]),n&&a){if(i.BlockStatement.check(n)&&"body"===e&&0===r)return t.default.strictEqual(n.body[0],a),!0;if(i.ExpressionStatement.check(n)&&"expression"===r)return t.default.strictEqual(n.expression,a),!0;if(i.AssignmentExpression.check(n)&&"left"===r)return t.default.strictEqual(n.left,a),!0;if(i.ArrowFunctionExpression.check(n)&&"body"===r)return t.default.strictEqual(n.body,a),!0;if(i.SequenceExpression.check(n)&&"expressions"===e&&0===r)t.default.strictEqual(n.expressions[0],a);else if(i.CallExpression.check(n)&&"callee"===r)t.default.strictEqual(n.callee,a);else if(i.MemberExpression.check(n)&&"object"===r)t.default.strictEqual(n.object,a);else if(i.ConditionalExpression.check(n)&&"test"===r)t.default.strictEqual(n.test,a);else if(p(n)&&"left"===r)t.default.strictEqual(n.left,a);else{if(!i.UnaryExpression.check(n)||n.prefix||"argument"!==r)return!1;t.default.strictEqual(n.argument,a)}}return!0},Zn.default=l,Zn}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.run=e.prettyPrint=e.print=e.types=e.parse=void 0;var n=$e,r=n.__importDefault(void 0),i=n.__importStar(pn());e.types=i;var a=function(){if(Jn)return hn;Jn=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.parse=void 0;var e=$e,n=e.__importDefault(dn),r=e.__importStar(pn()),i=r.builders,a=r.builtInTypes.object,s=r.builtInTypes.array,o=Fn(),l=zn(),c=Hn(),u=e.__importStar(yn);hn.parse=function(e,n){n=o.normalize(n);var r,a,s=l.fromString(e,n),h=s.toString({tabWidth:n.tabWidth,reuseWhitespace:!1,useTabs:!1}),d=[],f=n.parser.parse(h,{jsx:!0,loc:!0,locations:!0,range:n.range,comment:!0,onComment:d,tolerant:u.getOption(n,"tolerant",!0),ecmaVersion:6,sourceType:u.getOption(n,"sourceType","module")}),m=Array.isArray(f.tokens)?f.tokens:t.tokenize(h,{loc:!0});delete f.tokens,m.forEach((function(e){"string"!=typeof e.value&&(e.value=s.sliceString(e.loc.start,e.loc.end))})),Array.isArray(f.comments)&&(d=f.comments,delete f.comments),f.loc?u.fixFaultyLocations(f,s):f.loc={start:s.firstPos(),end:s.lastPos()},f.loc.lines=s,f.loc.indent=0,"Program"===f.type?(a=f,(r=i.file(f,n.sourceFileName||null)).loc={start:s.firstPos(),end:s.lastPos(),lines:s,indent:0}):"File"===f.type&&(a=(r=f).program),n.tokens&&(r.tokens=m);var y=u.getTrueLoc({type:a.type,loc:a.loc,body:[],comments:d},s);return a.loc.start=y.start,a.loc.end=y.end,c.attach(d,a.body.length?r.program:r,s),new p(s,m).copy(r)};var p=function e(t,r){n.default.ok(this instanceof e),this.lines=t,this.tokens=r,this.startTokenIndex=0,this.endTokenIndex=r.length,this.indent=0,this.seen=new Map},h=p.prototype;return h.copy=function(e){if(this.seen.has(e))return this.seen.get(e);if(s.check(e)){var t=Array(e.length);return this.seen.set(e,t),e.forEach((function(e,n){t[n]=this.copy(e)}),this),t}if(!a.check(e))return e;u.fixFaultyLocations(e,this.lines);var n=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}});this.seen.set(e,n);var r=e.loc,i=this.indent,o=i,l=this.startTokenIndex,c=this.endTokenIndex;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(o=this.indent=r.start.column),r.lines=this.lines,r.tokens=this.tokens,r.indent=o,this.findTokenRange(r));for(var p=Object.keys(e),h=p.length,d=0;d<h;++d){var f=p[d];"loc"===f||"tokens"===f&&"File"===e.type?n[f]=e[f]:n[f]=this.copy(e[f])}return this.indent=i,this.startTokenIndex=l,this.endTokenIndex=c,n},h.findTokenRange=function(e){for(;this.startTokenIndex>0;){var t=e.tokens[this.startTokenIndex];if(!(u.comparePos(e.start,t.loc.start)<0))break;--this.startTokenIndex}for(;this.endTokenIndex<e.tokens.length&&(t=e.tokens[this.endTokenIndex],u.comparePos(t.loc.end,e.end)<0);)++this.endTokenIndex;for(;this.startTokenIndex<this.endTokenIndex&&(t=e.tokens[this.startTokenIndex],u.comparePos(t.loc.start,e.start)<0);)++this.startTokenIndex;for(e.start.token=this.startTokenIndex;this.endTokenIndex>this.startTokenIndex&&(t=e.tokens[this.endTokenIndex-1],u.comparePos(e.end,t.loc.end)<0);)--this.endTokenIndex;e.end.token=this.endTokenIndex},hn}();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var s=function(){if(Kn)return Qn;Kn=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Printer=void 0;var e=$e,t=e.__importDefault(dn),n=Hn(),r=zn(),i=Fn(),a=function(){if($n)return Yn;$n=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.getReprinter=Yn.Patcher=void 0;var e=$e,t=e.__importDefault(dn),n=e.__importStar(zn()),r=e.__importStar(pn()),i=r.namedTypes.Printable,a=r.namedTypes.Expression,s=r.namedTypes.ReturnStatement,o=r.namedTypes.SourceLocation,l=yn,c=e.__importDefault(er()),u=r.builtInTypes.object,p=r.builtInTypes.array,h=r.builtInTypes.string,d=/[0-9a-z_$]/i,f=function e(r){t.default.ok(this instanceof e),t.default.ok(r instanceof n.Lines);var i=[];this.replace=function(e,t){h.check(t)&&(t=n.fromString(t)),i.push({lines:t,start:e.start,end:e.end})},this.get=function(e){var a=(e=e||{start:{line:1,column:0},end:{line:r.length,column:r.getLineLength(r.length)}}).start,s=[];function o(e,n){t.default.ok(l.comparePos(e,n)<=0),s.push(r.slice(e,n))}return i.sort((function(e,t){return l.comparePos(e.start,t.start)})).forEach((function(e){l.comparePos(a,e.start)>0||(o(a,e.start),s.push(e.lines),a=e.end)})),o(a,e.end),n.concat(s)}};Yn.Patcher=f;var m=f.prototype;function y(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach((function(e){(e.leading||e.trailing)&&t.push(e)})),t}function g(e,t,n){var r=e.getValue();return r===t.getValue()||(p.check(r)?b(e,t,n):!!u.check(r)&&function(e,t,n){var r=e.getValue();if(u.assert(r),null===r.original)return!1;var s=t.getValue();if(!u.check(s))return!1;if(r===s||e.valueIsDuplicate()||t.valueIsDuplicate())return!0;if(i.check(r)){if(!i.check(s))return!1;var o=e.getParentNode(),l=t.getParentNode();if(null!==l&&"FunctionTypeAnnotation"===l.type&&null!==o&&"FunctionTypeAnnotation"===o.type){var c=1!==l.params.length||!!l.params[0].name,p=1!==o.params.length||!!o.params[0].name;if(!c&&p)return!1}if(r.type===s.type){var h=[];if(v(e,t,h))n.push.apply(n,h);else{if(!s.loc)return!1;n.push({oldPath:t.copy(),newPath:e.copy()})}return!0}return!!(a.check(r)&&a.check(s)&&s.loc)&&(n.push({oldPath:t.copy(),newPath:e.copy()}),!0)}return v(e,t,n)}(e,t,n))}function b(e,t,n){var r=e.getValue(),i=t.getValue();if(r===i||e.valueIsDuplicate()||t.valueIsDuplicate())return!0;p.assert(r);var a=r.length;if(!p.check(i)||i.length!==a)return!1;for(var s=0;s<a;++s){e.stack.push(s,r[s]),t.stack.push(s,i[s]);var o=g(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!o)return!1}return!0}function v(e,t,n){var i=e.getValue(),a=t.getValue();if(u.assert(i),u.assert(a),null===i.original)return!1;if(e.needsParens()&&!t.hasParens())return!1;var o=l.getUnionOfKeys(a,i);"File"!==a.type&&"File"!==i.type||delete o.tokens,delete o.loc;var c=n.length;for(var p in o)if("_"!==p.charAt(0)){e.stack.push(p,r.getFieldValue(i,p)),t.stack.push(p,r.getFieldValue(a,p));var h=g(e,t,n);if(e.stack.length-=2,t.stack.length-=2,!h)return!1}return!(s.check(e.getNode())&&n.length>c)}return m.tryToReprintComments=function(e,n,r){var i=this;if(!e.comments&&!n.comments)return!0;var a=c.default.from(e),s=c.default.from(n);a.stack.push("comments",y(e)),s.stack.push("comments",y(n));var o=[],l=b(a,s,o);return l&&o.length>0&&o.forEach((function(e){var n=e.oldPath.getValue();t.default.ok(n.leading||n.trailing),i.replace(n.loc,r(e.newPath).indentTail(n.loc.indent))})),l},m.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach((function(n){n.leading?t.replace({start:n.loc.start,end:e.loc.lines.skipSpaces(n.loc.end,!1,!1)},""):n.trailing&&t.replace({start:e.loc.lines.skipSpaces(n.loc.start,!0,!1),end:n.loc.end},"")}))}},Yn.getReprinter=function(e){t.default.ok(e instanceof c.default);var r=e.getValue();if(i.check(r)){var a=r.original,s=a&&a.loc,u=s&&s.lines,p=[];if(u&&function(e,n){var r=e.getValue();i.assert(r);var a=r.original;if(i.assert(a),t.default.deepEqual(n,[]),r.type!==a.type)return!1;var s=v(e,new c.default(a),n);return s||(n.length=0),s}(e,p))return function(t){var r=new f(u);p.forEach((function(e){var i=e.newPath.getValue(),a=e.oldPath.getValue();o.assert(a.loc,!0);var s=!r.tryToReprintComments(i,a,t);s&&r.deleteComments(a);var c=t(e.newPath,{includeComments:s,avoidRootParens:a.type===i.type&&e.oldPath.hasParens()}).indentTail(a.loc.indent),p=function(e,t,n){var r=l.copyPos(t.start),i=e.prevPos(r)&&e.charAt(r),a=n.charAt(n.firstPos());return i&&d.test(i)&&a&&d.test(a)}(u,a.loc,c),h=function(e,t,n){var r=e.charAt(t.end),i=n.lastPos(),a=n.prevPos(i)&&n.charAt(i);return a&&d.test(a)&&r&&d.test(r)}(u,a.loc,c);if(p||h){var f=[];p&&f.push(" "),f.push(c),h&&f.push(" "),c=n.concat(f)}r.replace(a.loc,c)}));var i=r.get(s).indentTail(-a.loc.indent);return e.needsParens()?n.concat(["(",i,")"]):i}}},Yn}(),s=e.__importStar(pn()),o=s.namedTypes,l=s.builtInTypes.string,c=s.builtInTypes.object,u=e.__importDefault(er()),p=e.__importStar(yn),h=function e(n,r){t.default.ok(this instanceof e),l.assert(n),this.code=n,r&&(c.assert(r),this.map=r)},d=!1;h.prototype.toString=function(){return d||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),d=!0),this.code};var f=new h("");function m(e,n,i,a){t.default.ok(e instanceof u.default);var l=e.getValue(),c=[],h=function(e,n,i){var a=e.getValue();if(!a)return r.fromString("");if("string"==typeof a)return r.fromString(a,n);o.Printable.assert(a);var l=[];switch(a.type){case"File":return e.call(i,"program");case"Program":return a.directives&&e.each((function(e){l.push(i(e),";\n")}),"directives"),a.interpreter&&l.push(e.call(i,"interpreter")),l.push(e.call((function(e){return y(e,n,i)}),"body")),r.concat(l);case"Noop":case"EmptyStatement":return r.fromString("");case"ExpressionStatement":return r.concat([e.call(i,"expression"),";"]);case"ParenthesizedExpression":return r.concat(["(",e.call(i,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return r.fromString(" ").join([e.call(i,"left"),a.operator,e.call(i,"right")]);case"AssignmentPattern":return r.concat([e.call(i,"left")," = ",e.call(i,"right")]);case"MemberExpression":case"OptionalMemberExpression":l.push(e.call(i,"object"));var c=e.call(i,"property"),u=s.getFieldValue(a,"optional");return a.computed?l.push(u?"?.[":"[",c,"]"):l.push(u?"?.":".",c),r.concat(l);case"ChainExpression":return e.call(i,"expression");case"MetaProperty":return r.concat([e.call(i,"meta"),".",e.call(i,"property")]);case"BindExpression":return a.object&&l.push(e.call(i,"object")),l.push("::",e.call(i,"callee")),r.concat(l);case"Path":return r.fromString(".").join(a.body);case"Identifier":return r.concat([r.fromString(a.name,n),a.optional?"?":"",e.call(i,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"ObjectTypeSpreadProperty":case"RestElement":return r.concat(["...",e.call(i,"argument"),e.call(i,"typeAnnotation")]);case"FunctionDeclaration":case"FunctionExpression":case"TSDeclareFunction":return a.declare&&l.push("declare "),a.async&&l.push("async "),l.push("function"),a.generator&&l.push("*"),a.id?l.push(" ",e.call(i,"id"),e.call(i,"typeParameters")):a.typeParameters&&l.push(e.call(i,"typeParameters")),l.push("(",v(e,n,i),")",e.call(i,"returnType")),a.body&&l.push(" ",e.call(i,"body")),r.concat(l);case"ArrowFunctionExpression":return a.async&&l.push("async "),a.typeParameters&&l.push(e.call(i,"typeParameters")),n.arrowParensAlways||1!==a.params.length||a.rest||"Identifier"!==a.params[0].type||a.params[0].typeAnnotation||a.returnType?l.push("(",v(e,n,i),")",e.call(i,"returnType")):l.push(e.call(i,"params",0)),l.push(" => ",e.call(i,"body")),r.concat(l);case"MethodDefinition":return g(e,n,i);case"YieldExpression":return l.push("yield"),a.delegate&&l.push("*"),a.argument&&l.push(" ",e.call(i,"argument")),r.concat(l);case"AwaitExpression":return l.push("await"),a.all&&l.push("*"),a.argument&&l.push(" ",e.call(i,"argument")),r.concat(l);case"ModuleDeclaration":return l.push("module",e.call(i,"id")),a.source?(t.default.ok(!a.body),l.push("from",e.call(i,"source"))):l.push(e.call(i,"body")),r.fromString(" ").join(l);case"ImportSpecifier":return a.importKind&&"value"!==a.importKind&&l.push(a.importKind+" "),a.imported?(l.push(e.call(i,"imported")),a.local&&a.local.name!==a.imported.name&&l.push(" as ",e.call(i,"local"))):a.id&&(l.push(e.call(i,"id")),a.name&&l.push(" as ",e.call(i,"name"))),r.concat(l);case"ExportSpecifier":return a.local?(l.push(e.call(i,"local")),a.exported&&a.exported.name!==a.local.name&&l.push(" as ",e.call(i,"exported"))):a.id&&(l.push(e.call(i,"id")),a.name&&l.push(" as ",e.call(i,"name"))),r.concat(l);case"ExportBatchSpecifier":return r.fromString("*");case"ImportNamespaceSpecifier":return l.push("* as "),a.local?l.push(e.call(i,"local")):a.id&&l.push(e.call(i,"id")),r.concat(l);case"ImportDefaultSpecifier":return a.local?e.call(i,"local"):e.call(i,"id");case"TSExportAssignment":return r.concat(["export = ",e.call(i,"expression")]);case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return x(e,n,i);case"ExportAllDeclaration":return l.push("export *"),a.exported&&l.push(" as ",e.call(i,"exported")),l.push(" from ",e.call(i,"source"),";"),r.concat(l);case"TSNamespaceExportDeclaration":return l.push("export as namespace ",e.call(i,"id")),A(r.concat(l));case"ExportNamespaceSpecifier":return r.concat(["* as ",e.call(i,"exported")]);case"ExportDefaultSpecifier":return e.call(i,"exported");case"Import":return r.fromString("import",n);case"ImportExpression":return r.concat(["import(",e.call(i,"source"),")"]);case"ImportDeclaration":if(l.push("import "),a.importKind&&"value"!==a.importKind&&l.push(a.importKind+" "),a.specifiers&&a.specifiers.length>0){var h=[],d=[];e.each((function(e){var t=e.getValue();"ImportSpecifier"===t.type?d.push(i(e)):"ImportDefaultSpecifier"!==t.type&&"ImportNamespaceSpecifier"!==t.type||h.push(i(e))}),"specifiers"),h.forEach((function(e,t){t>0&&l.push(", "),l.push(e)})),d.length>0&&((be=r.fromString(", ").join(d)).getLineLength(1)>n.wrapColumn&&(be=r.concat([r.fromString(",\n").join(d).indent(n.tabWidth),","])),h.length>0&&l.push(", "),be.length>1?l.push("{\n",be,"\n}"):n.objectCurlySpacing?l.push("{ ",be," }"):l.push("{",be,"}")),l.push(" from ")}return l.push(e.call(i,"source"),";"),r.concat(l);case"BlockStatement":var f=e.call((function(e){return y(e,n,i)}),"body");return!f.isEmpty()||a.directives&&0!==a.directives.length?(l.push("{\n"),a.directives&&e.each((function(e){l.push(A(i(e).indent(n.tabWidth)),a.directives.length>1||!f.isEmpty()?"\n":"")}),"directives"),l.push(f.indent(n.tabWidth)),l.push("\n}"),r.concat(l)):r.fromString("{}");case"ReturnStatement":if(l.push("return"),a.argument){var m=e.call(i,"argument");m.startsWithComment()||m.length>1&&o.JSXElement&&o.JSXElement.check(a.argument)?l.push(" (\n",m.indent(n.tabWidth),"\n)"):l.push(" ",m)}return l.push(";"),r.concat(l);case"CallExpression":case"OptionalCallExpression":return l.push(e.call(i,"callee")),a.typeParameters&&l.push(e.call(i,"typeParameters")),a.typeArguments&&l.push(e.call(i,"typeArguments")),s.getFieldValue(a,"optional")&&l.push("?."),l.push(b(e,n,i)),r.concat(l);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var k="ObjectTypeAnnotation"===a.type,w=n.flowObjectCommas?",":k?";":",",C=[],I=!1;k&&(C.push("indexers","callProperties"),null!=a.internalSlots&&C.push("internalSlots")),C.push("properties");var N=0;C.forEach((function(e){N+=a[e].length}));var O=k&&1===N||0===N,D=a.exact?"{|":"{",j=a.exact?"|}":"}";l.push(O?D:D+"\n");var L=l.length-1,M=0;if(C.forEach((function(t){e.each((function(e){var t=i(e);O||(t=t.indent(n.tabWidth));var r=!k&&t.length>1;r&&I&&l.push("\n"),l.push(t),M<N-1?(l.push(w+(r?"\n\n":"\n")),I=!r):(1!==N&&k||!O&&p.isTrailingCommaEnabled(n,"objects")&&"RestElement"!==e.getValue().type)&&l.push(w),M++}),t)})),a.inexact){var B=r.fromString("...",n);O?(N>0&&l.push(w," "),l.push(B)):l.push("\n",B.indent(n.tabWidth))}return l.push(O?j:"\n"+j),0!==M&&O&&n.objectCurlySpacing&&(l[L]=D+" ",l[l.length-1]=" "+j),a.typeAnnotation&&l.push(e.call(i,"typeAnnotation")),r.concat(l);case"PropertyPattern":return r.concat([e.call(i,"key"),": ",e.call(i,"pattern")]);case"ObjectProperty":case"Property":if(a.method||"get"===a.kind||"set"===a.kind)return g(e,n,i);if(a.shorthand&&"AssignmentPattern"===a.value.type)return e.call(i,"value");var F=e.call(i,"key");return a.computed?l.push("[",F,"]"):l.push(F),a.shorthand&&a.key.name===a.value.name||l.push(": ",e.call(i,"value")),r.concat(l);case"ClassMethod":case"ObjectMethod":case"ClassPrivateMethod":case"TSDeclareMethod":return g(e,n,i);case"PrivateName":return r.concat(["#",e.call(i,"id")]);case"Decorator":return r.concat(["@",e.call(i,"expression")]);case"ArrayExpression":case"ArrayPattern":var V=a.elements.length,R=e.map(i,"elements"),q=r.fromString(", ").join(R).getLineLength(1)<=n.wrapColumn;return q?n.arrayBracketSpacing?l.push("[ "):l.push("["):l.push("[\n"),e.each((function(e){var t=e.getName();if(e.getValue()){var r=R[t];q?t>0&&l.push(" "):r=r.indent(n.tabWidth),l.push(r),(t<V-1||!q&&p.isTrailingCommaEnabled(n,"arrays"))&&l.push(","),q||l.push("\n")}else l.push(",")}),"elements"),q&&n.arrayBracketSpacing?l.push(" ]"):l.push("]"),a.typeAnnotation&&l.push(e.call(i,"typeAnnotation")),r.concat(l);case"SequenceExpression":return r.fromString(", ").join(e.map(i,"expressions"));case"ThisExpression":return r.fromString("this");case"Super":return r.fromString("super");case"NullLiteral":return r.fromString("null");case"RegExpLiteral":return r.fromString(a.extra.raw);case"BigIntLiteral":return r.fromString(a.value+"n");case"NumericLiteral":return a.extra&&"string"==typeof a.extra.raw&&Number(a.extra.raw)===a.value?r.fromString(a.extra.raw,n):r.fromString(a.value,n);case"BooleanLiteral":case"StringLiteral":case"Literal":return"number"==typeof a.value&&"string"==typeof a.raw&&Number(a.raw)===a.value?r.fromString(a.raw,n):"string"!=typeof a.value?r.fromString(a.value,n):r.fromString(_(a.value,n),n);case"Directive":return e.call(i,"value");case"DirectiveLiteral":return r.fromString(_(a.value,n));case"InterpreterDirective":return r.fromString("#!"+a.value+"\n",n);case"ModuleSpecifier":if(a.local)throw Error("The ESTree ModuleSpecifier type should be abstract");return r.fromString(_(a.value,n),n);case"UnaryExpression":return l.push(a.operator),/[a-z]$/.test(a.operator)&&l.push(" "),l.push(e.call(i,"argument")),r.concat(l);case"UpdateExpression":return l.push(e.call(i,"argument"),a.operator),a.prefix&&l.reverse(),r.concat(l);case"ConditionalExpression":return r.concat([e.call(i,"test")," ? ",e.call(i,"consequent")," : ",e.call(i,"alternate")]);case"NewExpression":return l.push("new ",e.call(i,"callee")),a.typeParameters&&l.push(e.call(i,"typeParameters")),a.typeArguments&&l.push(e.call(i,"typeArguments")),a.arguments&&l.push(b(e,n,i)),r.concat(l);case"VariableDeclaration":a.declare&&l.push("declare "),l.push(a.kind," ");var U=0,z=e.map((function(e){var t=i(e);return U=Math.max(t.length,U),t}),"declarations");1===U?l.push(r.fromString(", ").join(z)):z.length>1?l.push(r.fromString(",\n").join(z).indentTail(a.kind.length+1)):l.push(z[0]);var W=e.getParentNode();return o.ForStatement.check(W)||o.ForInStatement.check(W)||o.ForOfStatement&&o.ForOfStatement.check(W)||o.ForAwaitStatement&&o.ForAwaitStatement.check(W)||l.push(";"),r.concat(l);case"VariableDeclarator":return a.init?r.fromString(" = ").join([e.call(i,"id"),e.call(i,"init")]):e.call(i,"id");case"WithStatement":return r.concat(["with (",e.call(i,"object"),") ",e.call(i,"body")]);case"IfStatement":var J=T(e.call(i,"consequent"),n);return l.push("if (",e.call(i,"test"),")",J),a.alternate&&l.push(P(J)?" else":"\nelse",T(e.call(i,"alternate"),n)),r.concat(l);case"ForStatement":var G=e.call(i,"init"),H=G.length>1?";\n":"; ",X=r.fromString(H).join([G,e.call(i,"test"),e.call(i,"update")]).indentTail(5),$=r.concat(["for (",X,")"]),K=T(e.call(i,"body"),n);return l.push($),$.length>1&&(l.push("\n"),K=K.trimLeft()),l.push(K),r.concat(l);case"WhileStatement":return r.concat(["while (",e.call(i,"test"),")",T(e.call(i,"body"),n)]);case"ForInStatement":return r.concat([a.each?"for each (":"for (",e.call(i,"left")," in ",e.call(i,"right"),")",T(e.call(i,"body"),n)]);case"ForOfStatement":case"ForAwaitStatement":return l.push("for "),(a.await||"ForAwaitStatement"===a.type)&&l.push("await "),l.push("(",e.call(i,"left")," of ",e.call(i,"right"),")",T(e.call(i,"body"),n)),r.concat(l);case"DoWhileStatement":var Q=r.concat(["do",T(e.call(i,"body"),n)]);return l.push(Q),P(Q)?l.push(" while"):l.push("\nwhile"),l.push(" (",e.call(i,"test"),");"),r.concat(l);case"DoExpression":var Y=e.call((function(e){return y(e,n,i)}),"body");return r.concat(["do {\n",Y.indent(n.tabWidth),"\n}"]);case"BreakStatement":return l.push("break"),a.label&&l.push(" ",e.call(i,"label")),l.push(";"),r.concat(l);case"ContinueStatement":return l.push("continue"),a.label&&l.push(" ",e.call(i,"label")),l.push(";"),r.concat(l);case"LabeledStatement":return r.concat([e.call(i,"label"),":\n",e.call(i,"body")]);case"TryStatement":return l.push("try ",e.call(i,"block")),a.handler?l.push(" ",e.call(i,"handler")):a.handlers&&e.each((function(e){l.push(" ",i(e))}),"handlers"),a.finalizer&&l.push(" finally ",e.call(i,"finalizer")),r.concat(l);case"CatchClause":return l.push("catch "),a.param&&l.push("(",e.call(i,"param")),a.guard&&l.push(" if ",e.call(i,"guard")),a.param&&l.push(") "),l.push(e.call(i,"body")),r.concat(l);case"ThrowStatement":return r.concat(["throw ",e.call(i,"argument"),";"]);case"SwitchStatement":return r.concat(["switch (",e.call(i,"discriminant"),") {\n",r.fromString("\n").join(e.map(i,"cases")),"\n}"]);case"SwitchCase":return a.test?l.push("case ",e.call(i,"test"),":"):l.push("default:"),a.consequent.length>0&&l.push("\n",e.call((function(e){return y(e,n,i)}),"consequent").indent(n.tabWidth)),r.concat(l);case"DebuggerStatement":return r.fromString("debugger;");case"JSXAttribute":return l.push(e.call(i,"name")),a.value&&l.push("=",e.call(i,"value")),r.concat(l);case"JSXIdentifier":return r.fromString(a.name,n);case"JSXNamespacedName":return r.fromString(":").join([e.call(i,"namespace"),e.call(i,"name")]);case"JSXMemberExpression":return r.fromString(".").join([e.call(i,"object"),e.call(i,"property")]);case"JSXSpreadAttribute":return r.concat(["{...",e.call(i,"argument"),"}"]);case"JSXSpreadChild":return r.concat(["{...",e.call(i,"expression"),"}"]);case"JSXExpressionContainer":return r.concat(["{",e.call(i,"expression"),"}"]);case"JSXElement":case"JSXFragment":var Z="opening"+("JSXElement"===a.type?"Element":"Fragment"),ee="closing"+("JSXElement"===a.type?"Element":"Fragment"),te=e.call(i,Z);if(a[Z].selfClosing)return t.default.ok(!a[ee],"unexpected "+ee+" element in self-closing "+a.type),te;var ne=r.concat(e.map((function(e){var t=e.getValue();if(o.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return i(e)}),"children")).indentTail(n.tabWidth),re=e.call(i,ee);return r.concat([te,ne,re]);case"JSXOpeningElement":l.push("<",e.call(i,"name"));var ie=[];e.each((function(e){ie.push(" ",i(e))}),"attributes");var ae=r.concat(ie);return(ae.length>1||ae.getLineLength(1)>n.wrapColumn)&&(ie.forEach((function(e,n){" "===e&&(t.default.strictEqual(n%2,0),ie[n]="\n")})),ae=r.concat(ie).indentTail(n.tabWidth)),l.push(ae,a.selfClosing?" />":">"),r.concat(l);case"JSXClosingElement":return r.concat(["</",e.call(i,"name"),">"]);case"JSXOpeningFragment":return r.fromString("<>");case"JSXClosingFragment":return r.fromString("</>");case"JSXText":return r.fromString(a.value,n);case"JSXEmptyExpression":return r.fromString("");case"TypeAnnotatedIdentifier":return r.concat([e.call(i,"annotation")," ",e.call(i,"identifier")]);case"ClassBody":return 0===a.body.length?r.fromString("{}"):r.concat(["{\n",e.call((function(e){return y(e,n,i)}),"body").indent(n.tabWidth),"\n}"]);case"ClassPropertyDefinition":return l.push("static ",e.call(i,"definition")),o.MethodDefinition.check(a.definition)||l.push(";"),r.concat(l);case"ClassProperty":a.declare&&l.push("declare ");var se=a.accessibility||a.access;return"string"==typeof se&&l.push(se," "),a.static&&l.push("static "),a.abstract&&l.push("abstract "),a.readonly&&l.push("readonly "),F=e.call(i,"key"),a.computed&&(F=r.concat(["[",F,"]"])),a.variance&&(F=r.concat([E(e,i),F])),l.push(F),a.optional&&l.push("?"),a.typeAnnotation&&l.push(e.call(i,"typeAnnotation")),a.value&&l.push(" = ",e.call(i,"value")),l.push(";"),r.concat(l);case"ClassPrivateProperty":return a.static&&l.push("static "),l.push(e.call(i,"key")),a.typeAnnotation&&l.push(e.call(i,"typeAnnotation")),a.value&&l.push(" = ",e.call(i,"value")),l.push(";"),r.concat(l);case"ClassDeclaration":case"ClassExpression":return a.declare&&l.push("declare "),a.abstract&&l.push("abstract "),l.push("class"),a.id&&l.push(" ",e.call(i,"id")),a.typeParameters&&l.push(e.call(i,"typeParameters")),a.superClass&&l.push(" extends ",e.call(i,"superClass"),e.call(i,"superTypeParameters")),a.implements&&a.implements.length>0&&l.push(" implements ",r.fromString(", ").join(e.map(i,"implements"))),l.push(" ",e.call(i,"body")),r.concat(l);case"TemplateElement":return r.fromString(a.value.raw,n).lockIndentTail();case"TemplateLiteral":var oe=e.map(i,"expressions");return l.push("`"),e.each((function(e){var t=e.getName();l.push(i(e)),t<oe.length&&l.push("${",oe[t],"}")}),"quasis"),l.push("`"),r.concat(l).lockIndentTail();case"TaggedTemplateExpression":return r.concat([e.call(i,"tag"),e.call(i,"quasi")]);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"Flow":case"FlowType":case"FlowPredicate":case"MemberTypeAnnotation":case"Type":case"TSHasOptionalTypeParameterInstantiation":case"TSHasOptionalTypeParameters":case"TSHasOptionalTypeAnnotation":case"ChainElement":throw Error("unprintable type: "+JSON.stringify(a.type));case"CommentBlock":case"Block":return r.concat(["/*",r.fromString(a.value,n),"*/"]);case"CommentLine":case"Line":return r.concat(["//",r.fromString(a.value,n)]);case"TypeAnnotation":return a.typeAnnotation?("FunctionTypeAnnotation"!==a.typeAnnotation.type&&l.push(": "),l.push(e.call(i,"typeAnnotation")),r.concat(l)):r.fromString("");case"ExistentialTypeParam":case"ExistsTypeAnnotation":return r.fromString("*",n);case"EmptyTypeAnnotation":return r.fromString("empty",n);case"AnyTypeAnnotation":return r.fromString("any",n);case"MixedTypeAnnotation":return r.fromString("mixed",n);case"ArrayTypeAnnotation":return r.concat([e.call(i,"elementType"),"[]"]);case"TupleTypeAnnotation":var le=e.map(i,"types"),ce=r.fromString(", ").join(le).getLineLength(1)<=n.wrapColumn;return ce?n.arrayBracketSpacing?l.push("[ "):l.push("["):l.push("[\n"),e.each((function(e){var t=e.getName();if(e.getValue()){var r=le[t];ce?t>0&&l.push(" "):r=r.indent(n.tabWidth),l.push(r),(t<a.types.length-1||!ce&&p.isTrailingCommaEnabled(n,"arrays"))&&l.push(","),ce||l.push("\n")}else l.push(",")}),"types"),ce&&n.arrayBracketSpacing?l.push(" ]"):l.push("]"),r.concat(l);case"BooleanTypeAnnotation":return r.fromString("boolean",n);case"BooleanLiteralTypeAnnotation":return t.default.strictEqual(typeof a.value,"boolean"),r.fromString(""+a.value,n);case"InterfaceTypeAnnotation":return l.push("interface"),a.extends&&a.extends.length>0&&l.push(" extends ",r.fromString(", ").join(e.map(i,"extends"))),l.push(" ",e.call(i,"body")),r.concat(l);case"DeclareClass":return S(e,["class ",e.call(i,"id")," ",e.call(i,"body")]);case"DeclareFunction":return S(e,["function ",e.call(i,"id"),";"]);case"DeclareModule":return S(e,["module ",e.call(i,"id")," ",e.call(i,"body")]);case"DeclareModuleExports":return S(e,["module.exports",e.call(i,"typeAnnotation")]);case"DeclareVariable":return S(e,["var ",e.call(i,"id"),";"]);case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return r.concat(["declare ",x(e,n,i)]);case"EnumDeclaration":return r.concat(["enum ",e.call(i,"id"),e.call(i,"body")]);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return("EnumSymbolBody"===a.type||a.explicitType)&&l.push(" of ",a.type.slice(4,-4).toLowerCase()),l.push(" {\n",r.fromString("\n").join(e.map(i,"members")).indent(n.tabWidth),"\n}"),r.concat(l);case"EnumDefaultedMember":return r.concat([e.call(i,"id"),","]);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":return r.concat([e.call(i,"id")," = ",e.call(i,"init"),","]);case"InferredPredicate":return r.fromString("%checks",n);case"DeclaredPredicate":return r.concat(["%checks(",e.call(i,"value"),")"]);case"FunctionTypeAnnotation":var ue=e.getParentNode(0),pe=!(o.ObjectTypeCallProperty.check(ue)||o.ObjectTypeInternalSlot.check(ue)&&ue.method||o.DeclareFunction.check(e.getParentNode(2)));pe&&!o.FunctionTypeParam.check(ue)&&!o.TypeAlias.check(ue)&&l.push(": ");var he=!!a.typeParameters,de=he||1!==a.params.length||a.params[0].name;return l.push(he?e.call(i,"typeParameters"):"",de?"(":"",v(e,n,i),de?")":""),a.returnType&&l.push(pe?" => ":": ",e.call(i,"returnType")),r.concat(l);case"FunctionTypeParam":var fe=e.call(i,"name");return l.push(fe),a.optional&&l.push("?"),fe.infos[0].line&&l.push(": "),l.push(e.call(i,"typeAnnotation")),r.concat(l);case"GenericTypeAnnotation":return r.concat([e.call(i,"id"),e.call(i,"typeParameters")]);case"DeclareInterface":l.push("declare ");case"InterfaceDeclaration":case"TSInterfaceDeclaration":return a.declare&&l.push("declare "),l.push("interface ",e.call(i,"id"),e.call(i,"typeParameters")," "),a.extends&&a.extends.length>0&&l.push("extends ",r.fromString(", ").join(e.map(i,"extends"))," "),a.body&&l.push(e.call(i,"body")),r.concat(l);case"ClassImplements":case"InterfaceExtends":return r.concat([e.call(i,"id"),e.call(i,"typeParameters")]);case"IntersectionTypeAnnotation":return r.fromString(" & ").join(e.map(i,"types"));case"NullableTypeAnnotation":return r.concat(["?",e.call(i,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return r.fromString("null",n);case"ThisTypeAnnotation":return r.fromString("this",n);case"NumberTypeAnnotation":return r.fromString("number",n);case"ObjectTypeCallProperty":return e.call(i,"value");case"ObjectTypeIndexer":return a.static&&l.push("static "),l.push(E(e,i),"["),a.id&&l.push(e.call(i,"id"),": "),l.push(e.call(i,"key"),"]: ",e.call(i,"value")),r.concat(l);case"ObjectTypeProperty":return r.concat([E(e,i),e.call(i,"key"),a.optional?"?":"",": ",e.call(i,"value")]);case"ObjectTypeInternalSlot":return r.concat([a.static?"static ":"","[[",e.call(i,"id"),"]]",a.optional?"?":"","FunctionTypeAnnotation"!==a.value.type?": ":"",e.call(i,"value")]);case"QualifiedTypeIdentifier":return r.concat([e.call(i,"qualification"),".",e.call(i,"id")]);case"StringLiteralTypeAnnotation":return r.fromString(_(a.value,n),n);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return t.default.strictEqual(typeof a.value,"number"),r.fromString(JSON.stringify(a.value),n);case"BigIntLiteralTypeAnnotation":return r.fromString(a.raw,n);case"StringTypeAnnotation":return r.fromString("string",n);case"DeclareTypeAlias":l.push("declare ");case"TypeAlias":return r.concat(["type ",e.call(i,"id"),e.call(i,"typeParameters")," = ",e.call(i,"right"),";"]);case"DeclareOpaqueType":l.push("declare ");case"OpaqueType":return l.push("opaque type ",e.call(i,"id"),e.call(i,"typeParameters")),a.supertype&&l.push(": ",e.call(i,"supertype")),a.impltype&&l.push(" = ",e.call(i,"impltype")),l.push(";"),r.concat(l);case"TypeCastExpression":return r.concat(["(",e.call(i,"expression"),e.call(i,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return r.concat(["<",r.fromString(", ").join(e.map(i,"params")),">"]);case"Variance":return"plus"===a.kind?r.fromString("+"):"minus"===a.kind?r.fromString("-"):r.fromString("");case"TypeParameter":return a.variance&&l.push(E(e,i)),l.push(e.call(i,"name")),a.bound&&l.push(e.call(i,"bound")),a.default&&l.push("=",e.call(i,"default")),r.concat(l);case"TypeofTypeAnnotation":return r.concat([r.fromString("typeof ",n),e.call(i,"argument")]);case"UnionTypeAnnotation":return r.fromString(" | ").join(e.map(i,"types"));case"VoidTypeAnnotation":return r.fromString("void",n);case"NullTypeAnnotation":return r.fromString("null",n);case"SymbolTypeAnnotation":return r.fromString("symbol",n);case"BigIntTypeAnnotation":return r.fromString("bigint",n);case"TSType":throw Error("unprintable type: "+JSON.stringify(a.type));case"TSNumberKeyword":return r.fromString("number",n);case"TSBigIntKeyword":return r.fromString("bigint",n);case"TSObjectKeyword":return r.fromString("object",n);case"TSBooleanKeyword":return r.fromString("boolean",n);case"TSStringKeyword":return r.fromString("string",n);case"TSSymbolKeyword":return r.fromString("symbol",n);case"TSAnyKeyword":return r.fromString("any",n);case"TSVoidKeyword":return r.fromString("void",n);case"TSThisType":return r.fromString("this",n);case"TSNullKeyword":return r.fromString("null",n);case"TSUndefinedKeyword":return r.fromString("undefined",n);case"TSUnknownKeyword":return r.fromString("unknown",n);case"TSNeverKeyword":return r.fromString("never",n);case"TSArrayType":return r.concat([e.call(i,"elementType"),"[]"]);case"TSLiteralType":return e.call(i,"literal");case"TSUnionType":return r.fromString(" | ").join(e.map(i,"types"));case"TSIntersectionType":return r.fromString(" & ").join(e.map(i,"types"));case"TSConditionalType":return l.push(e.call(i,"checkType")," extends ",e.call(i,"extendsType")," ? ",e.call(i,"trueType")," : ",e.call(i,"falseType")),r.concat(l);case"TSInferType":return l.push("infer ",e.call(i,"typeParameter")),r.concat(l);case"TSParenthesizedType":return r.concat(["(",e.call(i,"typeAnnotation"),")"]);case"TSFunctionType":return r.concat([e.call(i,"typeParameters"),"(",v(e,n,i),") => ",e.call(i,"typeAnnotation","typeAnnotation")]);case"TSConstructorType":return r.concat(["new ",e.call(i,"typeParameters"),"(",v(e,n,i),") => ",e.call(i,"typeAnnotation","typeAnnotation")]);case"TSMappedType":return l.push(a.readonly?"readonly ":"","[",e.call(i,"typeParameter"),"]",a.optional?"?":""),a.typeAnnotation&&l.push(": ",e.call(i,"typeAnnotation"),";"),r.concat(["{\n",r.concat(l).indent(n.tabWidth),"\n}"]);case"TSTupleType":return r.concat(["[",r.fromString(", ").join(e.map(i,"elementTypes")),"]"]);case"TSNamedTupleMember":return l.push(e.call(i,"label")),a.optional&&l.push("?"),l.push(": ",e.call(i,"elementType")),r.concat(l);case"TSRestType":return r.concat(["...",e.call(i,"typeAnnotation")]);case"TSOptionalType":return r.concat([e.call(i,"typeAnnotation"),"?"]);case"TSIndexedAccessType":return r.concat([e.call(i,"objectType"),"[",e.call(i,"indexType"),"]"]);case"TSTypeOperator":return r.concat([e.call(i,"operator")," ",e.call(i,"typeAnnotation")]);case"TSTypeLiteral":return(ge=r.fromString(",\n").join(e.map(i,"members"))).isEmpty()?r.fromString("{}",n):(l.push("{\n",ge.indent(n.tabWidth),"\n}"),r.concat(l));case"TSEnumMember":return l.push(e.call(i,"id")),a.initializer&&l.push(" = ",e.call(i,"initializer")),r.concat(l);case"TSTypeQuery":return r.concat(["typeof ",e.call(i,"exprName")]);case"TSParameterProperty":return a.accessibility&&l.push(a.accessibility," "),a.export&&l.push("export "),a.static&&l.push("static "),a.readonly&&l.push("readonly "),l.push(e.call(i,"parameter")),r.concat(l);case"TSTypeReference":return r.concat([e.call(i,"typeName"),e.call(i,"typeParameters")]);case"TSQualifiedName":return r.concat([e.call(i,"left"),".",e.call(i,"right")]);case"TSAsExpression":var me=e.call(i,"expression");return l.push(me,r.fromString(" as "),e.call(i,"typeAnnotation")),r.concat(l);case"TSNonNullExpression":return r.concat([e.call(i,"expression"),"!"]);case"TSTypeAnnotation":return r.concat([": ",e.call(i,"typeAnnotation")]);case"TSIndexSignature":return r.concat([a.readonly?"readonly ":"","[",e.map(i,"parameters"),"]",e.call(i,"typeAnnotation")]);case"TSPropertySignature":return l.push(E(e,i),a.readonly?"readonly ":""),a.computed?l.push("[",e.call(i,"key"),"]"):l.push(e.call(i,"key")),l.push(a.optional?"?":"",e.call(i,"typeAnnotation")),r.concat(l);case"TSMethodSignature":return a.computed?l.push("[",e.call(i,"key"),"]"):l.push(e.call(i,"key")),a.optional&&l.push("?"),l.push(e.call(i,"typeParameters"),"(",v(e,n,i),")",e.call(i,"typeAnnotation")),r.concat(l);case"TSTypePredicate":return a.asserts&&l.push("asserts "),l.push(e.call(i,"parameterName")),a.typeAnnotation&&l.push(" is ",e.call(i,"typeAnnotation","typeAnnotation")),r.concat(l);case"TSCallSignatureDeclaration":return r.concat([e.call(i,"typeParameters"),"(",v(e,n,i),")",e.call(i,"typeAnnotation")]);case"TSConstructSignatureDeclaration":return a.typeParameters?l.push("new",e.call(i,"typeParameters")):l.push("new "),l.push("(",v(e,n,i),")",e.call(i,"typeAnnotation")),r.concat(l);case"TSTypeAliasDeclaration":return r.concat([a.declare?"declare ":"","type ",e.call(i,"id"),e.call(i,"typeParameters")," = ",e.call(i,"typeAnnotation"),";"]);case"TSTypeParameter":l.push(e.call(i,"name")),ue=e.getParentNode(0);var ye=o.TSMappedType.check(ue);return a.constraint&&l.push(ye?" in ":" extends ",e.call(i,"constraint")),a.default&&l.push(" = ",e.call(i,"default")),r.concat(l);case"TSTypeAssertion":return l.push("<",e.call(i,"typeAnnotation"),"> ",e.call(i,"expression")),r.concat(l);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return r.concat(["<",r.fromString(", ").join(e.map(i,"params")),">"]);case"TSEnumDeclaration":var ge;return l.push(a.declare?"declare ":"",a.const?"const ":"","enum ",e.call(i,"id")),(ge=r.fromString(",\n").join(e.map(i,"members"))).isEmpty()?l.push(" {}"):l.push(" {\n",ge.indent(n.tabWidth),"\n}"),r.concat(l);case"TSExpressionWithTypeArguments":return r.concat([e.call(i,"expression"),e.call(i,"typeParameters")]);case"TSInterfaceBody":var be;return(be=r.fromString(";\n").join(e.map(i,"body"))).isEmpty()?r.fromString("{}",n):r.concat(["{\n",be.indent(n.tabWidth),";","\n}"]);case"TSImportType":return l.push("import(",e.call(i,"argument"),")"),a.qualifier&&l.push(".",e.call(i,"qualifier")),a.typeParameters&&l.push(e.call(i,"typeParameters")),r.concat(l);case"TSImportEqualsDeclaration":return a.isExport&&l.push("export "),l.push("import ",e.call(i,"id")," = ",e.call(i,"moduleReference")),A(r.concat(l));case"TSExternalModuleReference":return r.concat(["require(",e.call(i,"expression"),")"]);case"TSModuleDeclaration":if("TSModuleDeclaration"===(ue=e.getParentNode()).type?l.push("."):(a.declare&&l.push("declare "),a.global||("StringLiteral"===a.id.type||"Literal"===a.id.type&&"string"==typeof a.id.value||a.loc&&a.loc.lines&&a.id.loc&&a.loc.lines.sliceString(a.loc.start,a.id.loc.start).indexOf("module")>=0?l.push("module "):l.push("namespace "))),l.push(e.call(i,"id")),a.body&&"TSModuleDeclaration"===a.body.type)l.push(e.call(i,"body"));else if(a.body){var ve=e.call(i,"body");ve.isEmpty()?l.push(" {}"):l.push(" {\n",ve.indent(n.tabWidth),"\n}")}return r.concat(l);case"TSModuleBlock":return e.call((function(e){return y(e,n,i)}),"body");default:throw Error("unknown type: "+JSON.stringify(a.type))}}(e,n,a);if(!l||h.isEmpty())return h;var d=!!l.extra&&l.extra.parenthesized,f=function(e,t){var n=[],i=e.getValue();return i.decorators&&i.decorators.length>0&&!p.getParentExportDeclaration(e)?e.each((function(e){n.push(t(e),"\n")}),"decorators"):p.isExportDeclaration(i)&&i.declaration&&i.declaration.decorators&&e.each((function(e){n.push(t(e),"\n")}),"declaration","decorators"),r.concat(n)}(e,a);return f.isEmpty()?i.avoidRootParens||(d=d||e.needsParens()):c.push(f),d&&c.unshift("("),c.push(h),d&&c.push(")"),r.concat(c)}function y(e,n,i){var a=[],s=!1,c=!1;e.each((function(e){var t=e.getValue();t&&("EmptyStatement"!==t.type||t.comments&&t.comments.length>0)&&(o.Comment.check(t)?s=!0:o.Statement.check(t)?c=!0:l.assert(t),a.push({node:t,printed:i(e)}))})),s&&t.default.strictEqual(c,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var u=null,h=a.length,d=[];return a.forEach((function(e,t){var i,a,s=e.printed,o=e.node,l=s.length>1,c=t>0,f=t<h-1,m=o&&o.loc&&o.loc.lines,y=m&&n.reuseWhitespace&&p.getTrueLoc(o,m);if(c)if(y){var g=m.skipSpaces(y.start,!0),b=g?g.line:1,v=y.start.line-b;i=Array(v+1).join("\n")}else i=l?"\n\n":"\n";else i="";if(f)if(y){var x=m.skipSpaces(y.end),S=(x?x.line:m.length)-y.end.line;a=Array(S+1).join("\n")}else a=l?"\n\n":"\n";else a="";d.push(function(e,t){if(!e&&!t)return r.fromString("");if(!e)return r.fromString(t);if(!t)return r.fromString(e);var n=r.fromString(e),i=r.fromString(t);return i.length>n.length?i:n}(u,i),s),f?u=a:a&&d.push(a)})),r.concat(d)}function g(e,t,n){var i=e.getNode(),a=i.kind,s=[],l=i.value;o.FunctionExpression.check(l)||(l=i);var c=i.accessibility||i.access;"string"==typeof c&&s.push(c," "),i.static&&s.push("static "),i.abstract&&s.push("abstract "),i.readonly&&s.push("readonly "),l.async&&s.push("async "),l.generator&&s.push("*"),"get"!==a&&"set"!==a||s.push(a," ");var u=e.call(n,"key");return i.computed&&(u=r.concat(["[",u,"]"])),s.push(u),i.optional&&s.push("?"),i===l?(s.push(e.call(n,"typeParameters"),"(",v(e,t,n),")",e.call(n,"returnType")),i.body?s.push(" ",e.call(n,"body")):s.push(";")):(s.push(e.call(n,"value","typeParameters"),"(",e.call((function(e){return v(e,t,n)}),"value"),")",e.call(n,"value","returnType")),l.body?s.push(" ",e.call(n,"value","body")):s.push(";")),r.concat(s)}function b(e,t,n){var i=e.map(n,"arguments"),a=p.isTrailingCommaEnabled(t,"parameters"),s=r.fromString(", ").join(i);return s.getLineLength(1)>t.wrapColumn?(s=r.fromString(",\n").join(i),r.concat(["(\n",s.indent(t.tabWidth),a?",\n)":"\n)"])):r.concat(["(",s,")"])}function v(e,t,n){var i,a=e.getValue(),s=[];a.params?(i=a.params,s=e.map(n,"params")):a.parameters&&(i=a.parameters,s=e.map(n,"parameters")),a.defaults&&e.each((function(e){var t=e.getName(),i=s[t];i&&e.getValue()&&(s[t]=r.concat([i," = ",n(e)]))}),"defaults"),a.rest&&s.push(r.concat(["...",e.call(n,"rest")]));var o=r.fromString(", ").join(s);return o.length>1||o.getLineLength(1)>t.wrapColumn?(o=r.fromString(",\n").join(s),o=p.isTrailingCommaEnabled(t,"parameters")&&!a.rest&&"RestElement"!==i[i.length-1].type?r.concat([o,",\n"]):r.concat([o,"\n"]),r.concat(["\n",o.indent(t.tabWidth)])):o}function x(e,t,n){var i=e.getValue(),a=["export "];i.exportKind&&"type"===i.exportKind&&(i.declaration||a.push("type "));var s=t.objectCurlySpacing;if(o.Declaration.assert(i),(i.default||"ExportDefaultDeclaration"===i.type)&&a.push("default "),i.declaration)a.push(e.call(n,"declaration"));else if(i.specifiers){if(1===i.specifiers.length&&"ExportBatchSpecifier"===i.specifiers[0].type)a.push("*");else if(0===i.specifiers.length)a.push("{}");else if("ExportDefaultSpecifier"===i.specifiers[0].type){var l=[],c=[];if(e.each((function(e){"ExportDefaultSpecifier"===e.getValue().type?l.push(n(e)):c.push(n(e))}),"specifiers"),l.forEach((function(e,t){t>0&&a.push(", "),a.push(e)})),c.length>0){var u=r.fromString(", ").join(c);u.getLineLength(1)>t.wrapColumn&&(u=r.concat([r.fromString(",\n").join(c).indent(t.tabWidth),","])),l.length>0&&a.push(", "),u.length>1?a.push("{\n",u,"\n}"):t.objectCurlySpacing?a.push("{ ",u," }"):a.push("{",u,"}")}}else a.push(s?"{ ":"{",r.fromString(", ").join(e.map(n,"specifiers")),s?" }":"}");i.source&&a.push(" from ",e.call(n,"source"))}var p=r.concat(a);return";"===k(p)||i.declaration&&("FunctionDeclaration"===i.declaration.type||"ClassDeclaration"===i.declaration.type||"TSModuleDeclaration"===i.declaration.type||"TSInterfaceDeclaration"===i.declaration.type||"TSEnumDeclaration"===i.declaration.type)||(p=r.concat([p,";"])),p}function S(e,n){var i=p.getParentExportDeclaration(e);return i?t.default.strictEqual(i.type,"DeclareExportDeclaration"):n.unshift("declare "),r.concat(n)}function E(e,t){return e.call((function(e){var n=e.getValue();return n?"plus"===n?r.fromString("+"):"minus"===n?r.fromString("-"):t(e):r.fromString("")}),"variance")}function T(e,t){return e.length>1?r.concat([" ",e]):r.concat(["\n",A(e).indent(t.tabWidth)])}function k(e){var t=e.lastPos();do{var n=e.charAt(t);if(/\S/.test(n))return n}while(e.prevPos(t))}function P(e){return"}"===k(e)}function w(e){return e.replace(/['"]/g,(function(e){return'"'===e?"'":'"'}))}function _(e,t){switch(l.assert(e),t.quote){case"auto":var n=JSON.stringify(e),r=w(JSON.stringify(w(e)));return n.length>r.length?r:n;case"single":return w(JSON.stringify(w(e)));default:return JSON.stringify(e)}}function A(e){var t=k(e);return!t||"\n};".indexOf(t)<0?r.concat([e,";"]):e}return Qn.Printer=function e(r){t.default.ok(this instanceof e);var s=r&&r.tabWidth;function o(e,t){return e=Object.assign({},e,t),function(t){return l(t,e)}}function l(e,i){if(t.default.ok(e instanceof u.default),(i=i||{}).includeComments)return n.printComments(e,o(i,{includeComments:!1}));var c=r.tabWidth;if(!s){var p=e.getNode().loc;p&&p.lines&&p.lines.guessTabWidth&&(r.tabWidth=p.lines.guessTabWidth())}var h=a.getReprinter(e),d=h?h(l):m(e,r,i,o(i,{includeComments:!0,avoidRootParens:!1}));return r.tabWidth=c,d}(r=i.normalize(r)).sourceFileName=null,this.print=function(e){if(!e)return f;var t=l(u.default.from(e),{includeComments:!0,avoidRootParens:!1});return new h(t.toString(r),p.composeSourceMaps(r.inputSourceMap,t.getSourceMap(r.sourceMapName,r.sourceRoot)))},this.printGenerically=function(e){if(!e)return f;var t=u.default.from(e),i=r.reuseWhitespace;r.reuseWhitespace=!1;var a=new h(function e(t){return n.printComments(t,(function(t){return m(t,r,{includeComments:!0,avoidRootParens:!1},e)}))}(t).toString(r));return r.reuseWhitespace=i,a}},Qn}(),o=pn();function l(e,t){return new s.Printer(t).print(e)}function c(e){process.stdout.write(e)}Object.defineProperty(e,"visit",{enumerable:!0,get:function(){return o.visit}}),e.print=l,e.prettyPrint=function(e,t){return new s.Printer(t).printGenerically(e)},e.run=function(e,t){return function(e,t,n){r.default.readFile(e,"utf-8",(function(e,r){e?console.error(e):function(e,t,n){var r=n&&n.writeback||c;t(a.parse(e,n),(function(e){r(l(e,n).code)}))}(r,t,n)}))}(process.argv[2],e,t)}}(Ve);const tr=Ve.types,nr=Ve.types.builders,rr=Ve.types.namedTypes,ir=["window","document","console"],ar=Object.keys({AggregateError:!1,Array:!1,ArrayBuffer:!1,Atomics:!1,BigInt:!1,BigInt64Array:!1,BigUint64Array:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,FinalizationRegistry:!1,Float32Array:!1,Float64Array:!1,Function:!1,globalThis:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,SharedArrayBuffer:!1,String:!1,Symbol:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakRef:!1,WeakSet:!1}),sr=e=>rr.Identifier.check(e),or=e=>rr.Literal.check(e),lr=e=>rr.ExpressionStatement.check(e),cr=e=>lr(e)&&hr(e.expression.left)&&(e=>rr.ThisExpression.check(e))(e.expression.left.object),ur=e=>rr.SequenceExpression.check(e),pr=e=>rr.ExportDefaultDeclaration.check(e),hr=e=>rr.MemberExpression.check(e),dr=e=>rr.ImportDeclaration.check(e),fr=e=>rr.TSTypeAliasDeclaration.check(e),mr=e=>rr.TSInterfaceDeclaration.check(e),yr=e=>rr.ExportNamedDeclaration.check(e);function gr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>function(){return e(t(...arguments))}))}function br(e){return function(e){return"template"===e.name}(e)&&!r(Nr(Ne,e))&&!Cr(e)&&!Ar(e)}function vr(e){let{scope:t,node:n}=e;return n.object?vr({node:n.object,scope:t}):!!((e=>e&&e.raw)(n)||(e=>{let{name:t}=e;return ar.includes(t)})(n)||(e=>{let{name:t}=e;return ir.includes(t)})(n)||(e=>rr.NewExpression.check(e))(n)||function(e,t){return void 0===n&&(n=!1),tr.visit(t,{visitIdentifier(t){e.lookup(ri(t.node))&&(n=!0),this.abort()}}),n;var n}(t,n))}function xr(e){return!(!e[Le]&&!Ir(e))}function Sr(e){return"slot"===e.name}function Er(e){return!!e[je]}function Tr(e){return e.type===ve.TAG}function kr(e){return e.type===ve.TEXT}function Pr(e){return e.isRoot}const wr=(()=>{const e=/^on/;return t=>e.test(t.name)})();function _r(e){return!!(e.expressions||Ai(e).some((e=>_r(e)))||e.nodes&&e.nodes.some((e=>kr(e)&&_r(e))))}const Ar=gr(Boolean,Or),Cr=gr(Boolean,Dr),Ir=gr(Boolean,Lr);function Nr(e,t){return t.attributes&&t.attributes.find((t=>ri(t)===e))}function Or(e){return Nr(Ae,e)}function Dr(e){return Nr(Ce,e)}function jr(e){return Nr(Ie,e)}function Lr(e){return Nr(De,e)}function Mr(){return nr.literal(null)}function Br(e,t){const n=nr.property("init",nr.identifier(e),t,!1);return n.sho,n}gr(Boolean,jr);const Fr=/\r\n?|\n/g;function Vr(e,t,n){const{column:r,line:i}=function(e,t){const n=function(e){return e.split(Fr)}(e.slice(0,t));return{line:n.length,column:n[n.length-1].length}}(t,n.start);return`${"\n".repeat(i-1)}${" ".repeat(r+1)}${e}`}var Rr={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};const qr=/&(\S+);/g,Ur=/^[\da-fA-F]+$/,zr=/^\d+$/;function Wr(e){return e.replace(qr,((e,t)=>{const[n,r]=t;return"#"===n?"x"===r?function(e){const t=e.substr(2);return Ur.test(t)?String.fromCodePoint(parseInt(t,16)):e}(t):function(e){const t=e.substr(1);return zr.test(t)?String.fromCodePoint(parseInt(t,10)):e}(t):Rr[t]||t}))}function Jr(e,t){return e.replace(RegExp("\\\\"+t,"gm"),t)}function Gr(e,t,n){if(1===e.parts.length)return yi(e.expressions[0],t,n);const r=function(e,t){return e.expressions.reduce(((n,r,i)=>{const a=i?e.expressions[i-1].end:e.start,s=Wr(t.substring(a,r.start));return n.push(0===i?function(e){return(e.trimStart||e.trimLeft).apply(e)}(s):s),i===e.expressions.length-1&&n.push(Wr(function(e){return(e.trimEnd||e.trimRight).apply(e)}(t.substring(r.end,e.end)))),n}),[]).filter((e=>!(0===e.trim().indexOf("<!")))).map((t=>e.unescape?Jr(t,e.unescape):t))}(e,n),i=r.reduce(((r,i,a)=>{const s=e.expressions[a];return[...r,nr.literal(i),s?yi(s,t,n):Mr()]}),[]).filter((e=>!or(e)||e.value));return Oi(i)}function Hr(e,t,n,r,i){switch(!0){case kr(e):return function(e,t,n,r){return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(Se),nr.identifier("TEXT"),!1)),Br("childNodeIndex",nr.literal(r)),Br(Pe,fi(Gr(e,t,n)))])}(e,t,n,r);case"value"===e.name&&(a=i.name,ae.test(a))&&!("progress"===i.name):return function(e,t,n){return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(Se),nr.identifier("VALUE"),!1)),Br(Pe,Bi(e,t,n))])}(e,t,n);case wr(e):return function(e,t,n){return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(Se),nr.identifier("EVENT"),!1)),Br(we,nr.literal(e.name)),Br(Pe,Bi(e,t,n))])}(e,t,n);default:return function(e,t,n){return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(Se),nr.identifier("ATTRIBUTE"),!1)),Br(we,(r=e,r[Be]?Mr():nr.literal(e.name))),Br(Pe,Bi(e,t,n))]);var r}(e,t,n)}var a}function Xr(e,t,n){return(r=e,Ai(r).filter(_r)).map((r=>Hr(r,t,n,0,e)));var r}var $r,Kr={},Qr={exports:{}};function Yr(){return $r||($r=1,function(e,t){!function(e){var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],r="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",i={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",s={5:a,"5module":a+" export import",6:a+" const class extends export import super"},o=/^in(stanceof)?$/,l=RegExp("["+r+"]"),c=RegExp("["+r+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function u(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}}function p(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&u(e,n)))}function h(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==r&&(u(e,n)||u(e,t)))))}var d=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function f(e,t){return new d(e,{beforeExpr:!0,binop:t})}var m={beforeExpr:!0},y={startsExpr:!0},g={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,g[e]=new d(e,t)}var v={num:new d("num",y),regexp:new d("regexp",y),string:new d("string",y),name:new d("name",y),privateId:new d("privateId",y),eof:new d("eof"),bracketL:new d("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new d("]"),braceL:new d("{",{beforeExpr:!0,startsExpr:!0}),braceR:new d("}"),parenL:new d("(",{beforeExpr:!0,startsExpr:!0}),parenR:new d(")"),comma:new d(",",m),semi:new d(";",m),colon:new d(":",m),dot:new d("."),question:new d("?",m),questionDot:new d("?."),arrow:new d("=>",m),template:new d("template"),invalidTemplate:new d("invalidTemplate"),ellipsis:new d("...",m),backQuote:new d("`",y),dollarBraceL:new d("${",{beforeExpr:!0,startsExpr:!0}),eq:new d("=",{beforeExpr:!0,isAssign:!0}),assign:new d("_=",{beforeExpr:!0,isAssign:!0}),incDec:new d("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new d("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:f("||",1),logicalAND:f("&&",2),bitwiseOR:f("|",3),bitwiseXOR:f("^",4),bitwiseAND:f("&",5),equality:f("==/!=/===/!==",6),relational:f("</>/<=/>=",7),bitShift:f("<</>>/>>>",8),plusMin:new d("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:f("%",10),star:f("*",10),slash:f("/",10),starstar:new d("**",{beforeExpr:!0}),coalesce:f("??",1),_break:b("break"),_case:b("case",m),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",m),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",m),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",y),_if:b("if"),_return:b("return",m),_switch:b("switch"),_throw:b("throw",m),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",y),_super:b("super",y),_class:b("class",y),_extends:b("extends",m),_export:b("export"),_import:b("import",y),_null:b("null",y),_true:b("true",y),_false:b("false",y),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,S=RegExp(x.source,"g");function E(e){return 10===e||13===e||8232===e||8233===e}function T(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(E(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var k=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,w=Object.prototype,_=w.hasOwnProperty,A=w.toString,C=Object.hasOwn||function(e,t){return _.call(e,t)},I=Array.isArray||function(e){return"[object Array]"===A.call(e)};function N(e){return RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function O(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e))}var D=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,j=function(e,t){this.line=e,this.column=t};j.prototype.offset=function(e){return new j(this.line,this.column+e)};var L=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function M(e,t){for(var n=1,r=0;;){var i=T(e,r,t);if(i<0)return new j(n,t-r);++n,r=i}}var B={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},F=!1;function V(e,t){return 2|(e?4:0)|(t?8:0)}var R=function(e,t,n){this.options=e=function(e){var t={};for(var n in B)t[n]=e&&C(e,n)?e[n]:B[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!F&&"object"==typeof console&&console.warn&&(F=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),null==e.allowHashBang&&(t.allowHashBang=t.ecmaVersion>=14),I(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return I(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,a,s,o){var l={type:n?"Block":"Line",value:r,start:i,end:a};e.locations&&(l.loc=new L(this,s,o)),e.ranges&&(l.range=[i,a]),t.push(l)}}(t,t.onComment)),t}(e),this.sourceFile=e.sourceFile,this.keywords=N(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=i[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=N(r);var a=(r?r+" ":"")+i.strict;this.reservedWordsStrict=N(a),this.reservedWordsStrictBind=N(a+" "+i.strictBind),this.input=t+"",this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=v.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},q={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};R.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},q.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},q.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},q.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},q.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||256&t.flags)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},q.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(64&t)>0||n||this.options.allowSuperOutsideMethod},q.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},q.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},q.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,n=e.inClassFieldInit;return(258&t)>0||n},q.inClassStaticBlock.get=function(){return(256&this.currentVarScope().flags)>0},R.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},R.parse=function(e,t){return new this(t,e).parse()},R.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},R.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(R.prototype,q);var U=R.prototype,z=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;U.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){P.lastIndex=e,e+=P.exec(this.input)[0].length;var t=z.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){P.lastIndex=e+t[0].length;var n=P.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,P.lastIndex=e,e+=P.exec(this.input)[0].length,";"===this.input[e]&&e++}},U.eat=function(e){return this.type===e&&(this.next(),!0)},U.isContextual=function(e){return this.type===v.name&&this.value===e&&!this.containsEsc},U.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},U.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},U.canInsertSemicolon=function(){return this.type===v.eof||this.type===v.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},U.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},U.semicolon=function(){this.eat(v.semi)||this.insertSemicolon()||this.unexpected()},U.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},U.expect=function(e){this.eat(e)||this.unexpected()},U.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var W=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};U.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},U.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},U.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},U.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var J=R.prototype;J.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==v.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var G={kind:"loop"},H={kind:"switch"};J.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;P.lastIndex=this.pos;var t=P.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r||r>55295&&r<56320)return!0;if(e)return!1;if(123===r)return!0;if(p(r,!0)){for(var i=n+1;h(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var a=this.input.slice(n,i);if(!o.test(a))return!0}return!1},J.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;P.lastIndex=this.pos;var e,t=P.exec(this.input),n=this.pos+t[0].length;return!(x.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(h(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},J.parseStatement=function(e,t,n){var r,i=this.type,a=this.startNode();switch(this.isLet(e)&&(i=v._var,r="let"),i){case v._break:case v._continue:return this.parseBreakContinueStatement(a,i.keyword);case v._debugger:return this.parseDebuggerStatement(a);case v._do:return this.parseDoStatement(a);case v._for:return this.parseForStatement(a);case v._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case v._class:return e&&this.unexpected(),this.parseClass(a,!0);case v._if:return this.parseIfStatement(a);case v._return:return this.parseReturnStatement(a);case v._switch:return this.parseSwitchStatement(a);case v._throw:return this.parseThrowStatement(a);case v._try:return this.parseTryStatement(a);case v._const:case v._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(a,r);case v._while:return this.parseWhileStatement(a);case v._with:return this.parseWithStatement(a);case v.braceL:return this.parseBlock(!0,a);case v.semi:return this.parseEmptyStatement(a);case v._export:case v._import:if(this.options.ecmaVersion>10&&i===v._import){P.lastIndex=this.pos;var s=P.exec(this.input),o=this.pos+s[0].length,l=this.input.charCodeAt(o);if(40===l||46===l)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===v._import?this.parseImport(a):this.parseExport(a,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var c=this.value,u=this.parseExpression();return i===v.name&&"Identifier"===u.type&&this.eat(v.colon)?this.parseLabeledStatement(a,c,u,e):this.parseExpressionStatement(a,u)}},J.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(v.semi)||this.insertSemicolon()?e.label=null:this.type!==v.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},J.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},J.parseDoStatement=function(e){return this.next(),this.labels.push(G),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(v._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(v.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},J.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(G),this.enterScope(0),this.expect(v.parenL),this.type===v.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===v._var||this.type===v._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),(this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===r.declarations.length?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var a=this.isContextual("let"),s=!1,o=new W,l=this.parseExpression(!(t>-1)||"await",o);return this.type===v._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===v._in?t>-1&&this.unexpected(t):e.await=t>-1),a&&s&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,o),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(o,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},J.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,$|(n?0:K),!1,t)},J.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(v._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},J.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(v.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},J.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(v.braceL),this.labels.push(H),this.enterScope(0);for(var n=!1;this.type!==v.braceR;)if(this.type===v._case||this.type===v._default){var r=this.type===v._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(v.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},J.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var X=[];J.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===v._catch){var t=this.startNode();if(this.next(),this.eat(v.parenL)){t.param=this.parseBindingAtom();var n="Identifier"===t.param.type;this.enterScope(n?32:0),this.checkLValPattern(t.param,n?4:2),this.expect(v.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(v._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},J.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},J.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(G),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},J.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},J.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},J.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var s=this.type.isLoop?"loop":this.type===v._switch?"switch":null,o=this.labels.length-1;o>=0;o--){var l=this.labels[o];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},J.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},J.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(v.braceL),e&&this.enterScope(0);this.type!==v.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},J.parseFor=function(e,t){return e.init=t,this.expect(v.semi),e.test=this.type===v.semi?null:this.parseExpression(),this.expect(v.semi),e.update=this.type===v.parenR?null:this.parseExpression(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},J.parseForIn=function(e,t){var n=this.type===v._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(v.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},J.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(v.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===v._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===r.id.type||t&&(this.type===v._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(v.comma))break}return e},J.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var $=1,K=2;function Q(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function Y(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}J.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===v.star&&t&K&&this.unexpected(),e.generator=this.eat(v.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&$&&(e.id=4&t&&this.type!==v.name?null:this.parseIdent(),!e.id||t&K||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var a=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(V(e.async,e.generator)),t&$||(e.id=this.type===v.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&$?"FunctionDeclaration":"FunctionExpression")},J.parseFunctionParams=function(e){this.expect(v.parenL),e.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},J.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(v.braceL);this.type!==v.braceR;){var s=this.parseClassElement(null!==e.superClass);s&&(i.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind?(a&&this.raise(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&"PrivateIdentifier"===s.key.type&&Q(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},J.parseClassElement=function(e){if(this.eat(v.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,a=!1,s="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(v.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===v.star?o=!0:r="static"}if(n.static=o,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==v.star||this.canInsertSemicolon()?r="async":a=!0),!r&&(t>=9||!a)&&this.eat(v.star)&&(i=!0),!r&&!a&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===v.parenL||"method"!==s||i||a){var c=!n.static&&Y(n,"constructor"),u=c&&e;c&&"method"!==s&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":s,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},J.isClassElementNameStart=function(){return this.type===v.name||this.type===v.privateId||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword},J.parseClassElementName=function(e){this.type===v.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},J.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&Y(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==a.params.length&&this.raiseRecoverable(a.start,"getter should have no params"),"set"===e.kind&&1!==a.params.length&&this.raiseRecoverable(a.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===a.params[0].type&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},J.parseClassField=function(e){if(Y(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Y(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(v.eq)){var t=this.currentThisScope(),n=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=n}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},J.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==v.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},J.parseClassId=function(e,t){this.type===v.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},J.parseClassSuper=function(e){e.superClass=this.eat(v._extends)?this.parseExprSubscripts(!1):null},J.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},J.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,n=e.used,r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var s=n[a];C(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}},J.parseExport=function(e,t){if(this.next(),this.eat(v.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(v._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===v._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,4|$,!1,n)}else if(this.type===v._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==v.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,s=e.specifiers;a<s.length;a+=1){var o=s[a];this.checkUnreserved(o.local),this.checkLocalExport(o.local),"Literal"===o.local.type&&this.raise(o.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},J.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),C(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},J.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if("ArrayPattern"===n)for(var s=0,o=t.elements;s<o.length;s+=1){var l=o[s];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===n&&this.checkPatternExport(e,t.expression)},J.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},J.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},J.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(v.braceL);!this.eat(v.braceR);){if(n)n=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var r=this.startNode();r.local=this.parseModuleExportName(),r.exported=this.eatContextual("as")?this.parseModuleExportName():r.local,this.checkExport(e,r.exported,r.exported.start),t.push(this.finishNode(r,"ExportSpecifier"))}return t},J.parseImport=function(e){return this.next(),this.type===v.string?(e.specifiers=X,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===v.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},J.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===v.name){var n=this.startNode();if(n.local=this.parseIdent(),this.checkLValSimple(n.local,2),e.push(this.finishNode(n,"ImportDefaultSpecifier")),!this.eat(v.comma))return e}if(this.type===v.star){var r=this.startNode();return this.next(),this.expectContextual("as"),r.local=this.parseIdent(),this.checkLValSimple(r.local,2),e.push(this.finishNode(r,"ImportNamespaceSpecifier")),e}for(this.expect(v.braceL);!this.eat(v.braceR);){if(t)t=!1;else if(this.expect(v.comma),this.afterTrailingComma(v.braceR))break;var i=this.startNode();i.imported=this.parseModuleExportName(),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLValSimple(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},J.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===v.string){var e=this.parseLiteral(this.value);return D.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},J.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},J.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Z=R.prototype;Z.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),"RestElement"!==a.type||"ArrayPattern"!==a.argument.type&&"ObjectPattern"!==a.argument.type||this.raise(a.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},Z.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];6===this.options.ecmaVersion&&t&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}return e},Z.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},Z.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==v.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},Z.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case v.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(v.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case v.braceL:return this.parseObj(!0)}return this.parseIdent()},Z.parseBindingList=function(e,t,n){for(var r=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(v.comma),t&&this.type===v.comma)r.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===v.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),r.push(a),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var s=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(s),r.push(s)}return r},Z.parseBindingListItem=function(e){return e},Z.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(v.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},Z.checkLValSimple=function(e,t,n){void 0===t&&(t=0);var r=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(C(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),5!==t&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},Z.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case"ArrayPattern":for(var s=0,o=e.elements;s<o.length;s+=1){var l=o[s];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},Z.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=0),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var ee=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},te={b_stat:new ee("{",!1),b_expr:new ee("{",!0),b_tmpl:new ee("${",!1),p_stat:new ee("(",!1),p_expr:new ee("(",!0),q_tmpl:new ee("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new ee("function",!1),f_expr:new ee("function",!0),f_expr_gen:new ee("function",!0,!1,null,!0),f_gen:new ee("function",!1,!1,null,!0)},ne=R.prototype;ne.initialContext=function(){return[te.b_stat]},ne.curContext=function(){return this.context[this.context.length-1]},ne.braceIsBlock=function(e){var t=this.curContext();return t===te.f_expr||t===te.f_stat||(e!==v.colon||t!==te.b_stat&&t!==te.b_expr?e===v._return||e===v.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===v._else||e===v.semi||e===v.eof||e===v.parenR||e===v.arrow||(e===v.braceL?t===te.b_stat:e!==v._var&&e!==v._const&&e!==v.name&&!this.exprAllowed):!t.isExpr)},ne.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e===v.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ne.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},v.parenR.updateContext=v.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===te.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},v.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},v.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},v.parenL.updateContext=function(e){var t=e===v._if||e===v._for||e===v._with||e===v._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},v.incDec.updateContext=function(){},v._function.updateContext=v._class.updateContext=function(e){!e.beforeExpr||e===v._else||e===v.semi&&this.curContext()!==te.p_stat||e===v._return&&x.test(this.input.slice(this.lastTokEnd,this.start))||(e===v.colon||e===v.braceL)&&this.curContext()===te.b_stat?this.context.push(te.f_stat):this.context.push(te.f_expr),this.exprAllowed=!1},v.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},v.star.updateContext=function(e){if(e===v._function){var t=this.context.length-1;this.context[t]===te.f_expr?this.context[t]=te.f_expr_gen:this.context[t]=te.f_gen}this.exprAllowed=!0},v.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==v.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var re=R.prototype;function ie(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&ie(e.expression)}re.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=i.value+"";break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===a&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var s=t[r="$"+r];s?("init"===a?this.strict&&s.init||s.get||s.set:s.init||s[a])&&this.raiseRecoverable(i.start,"Redefinition of property"):s=t[r]={init:!1,get:!1,set:!1},s[a]=!0}}},re.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===v.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(v.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i},re.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,s=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new W,r=!0);var o=this.start,l=this.startLoc;this.type!==v.parenL&&this.type!==v.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,o,l)),this.type.isAssign){var u=this.startNodeAt(o,l);return u.operator=this.value,this.type===v.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===v.eq?this.checkLValPattern(c):this.checkLValSimple(c),u.left=c,this.next(),u.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),c},re.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(v.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(v.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i},re.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},re.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(null!=a&&(!i||this.type!==v._in)&&a>r){var s=this.type===v.logicalOR||this.type===v.logicalAND,o=this.type===v.coalesce;o&&(a=v.logicalAND.binop);var l=this.value;this.next();var c=this.start,u=this.startLoc,p=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,u,a,i),h=this.buildBinary(t,n,e,p,l,s||o);return(s&&this.type===v.coalesce||o&&(this.type===v.logicalOR||this.type===v.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,r,i)}return e},re.buildBinary=function(e,t,n,r,i,a){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=n,s.operator=i,s.right=r,this.finishNode(s,a?"LogicalExpression":"BinaryExpression")},re.parseMaybeUnary=function(e,t,n,r){var i,a=this.start,s=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===v.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):"delete"===o.operator&&ie(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==v.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(a,s);c.operator=this.value,c.prefix=!1,c.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==v._in&&this.unexpected();return n||!this.eat(v.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(a,s,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},re.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===a.type&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},re.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,s=!1;;){var o=this.parseSubscript(e,t,n,r,a,s,i);if(o.optional&&(s=!0),o===e||"ArrowFunctionExpression"===o.type){if(s){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}},re.parseSubscript=function(e,t,n,r,i,a,s){var o=this.options.ecmaVersion>=11,l=o&&this.eat(v.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(v.bracketL);if(c||l&&this.type!==v.parenL&&this.type!==v.backQuote||this.eat(v.dot)){var u=this.startNodeAt(t,n);u.object=e,c?(u.property=this.parseExpression(),this.expect(v.bracketR)):this.type===v.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!c,o&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(v.parenL)){var p=new W,h=this.yieldPos,d=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1,p);if(i&&!l&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(p,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=d,this.awaitIdentPos=f,this.parseArrowExpression(this.startNodeAt(t,n),m,!0,s);this.checkExpressionErrors(p,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=d||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var y=this.startNodeAt(t,n);y.callee=e,y.arguments=m,o&&(y.optional=l),e=this.finishNode(y,"CallExpression")}else if(this.type===v.backQuote){(l||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(t,n);g.tag=e,g.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(g,"TaggedTemplateExpression")}return e},re.parseExprAtom=function(e,t){this.type===v.slash&&this.readRegexp();var n,r=this.potentialArrowAt===this.start;switch(this.type){case v._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type!==v.parenL||this.allowDirectSuper||this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==v.dot&&this.type!==v.bracketL&&this.type!==v.parenL&&this.unexpected(),this.finishNode(n,"Super");case v._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case v.name:var i=this.start,a=this.startLoc,s=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(v._function))return this.overrideContext(te.f_expr),this.parseFunction(this.startNodeAt(i,a),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(v.arrow))return this.parseArrowExpression(this.startNodeAt(i,a),[o],!1,t);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===v.name&&!s&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(v.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,a),[o],!0,t)}return o;case v.regexp:var l=this.value;return(n=this.parseLiteral(l.value)).regex={pattern:l.pattern,flags:l.flags},n;case v.num:case v.string:return this.parseLiteral(this.value);case v._null:case v._true:case v._false:return(n=this.startNode()).value=this.type===v._null?null:this.type===v._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case v.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),u;case v.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(v.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case v.braceL:return this.overrideContext(te.b_expr),this.parseObj(!1,e);case v._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case v._class:return this.parseClass(this.startNode(),!1);case v._new:return this.parseNew();case v.backQuote:return this.parseTemplate();case v._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},re.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case v.parenL:return this.parseDynamicImport(e);case v.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},re.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(v.parenR)){var t=this.start;this.eat(v.comma)&&this.eat(v.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},re.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},re.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},re.parseParenExpression=function(){this.expect(v.parenL);var e=this.parseExpression();return this.expect(v.parenR),e},re.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o=this.start,l=this.startLoc,c=[],u=!0,p=!1,h=new W,d=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==v.parenR;){if(u?u=!1:this.expect(v.comma),a&&this.afterTrailingComma(v.parenR,!0)){p=!0;break}if(this.type===v.ellipsis){s=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var m=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(v.parenR),e&&!this.canInsertSemicolon()&&this.eat(v.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=f,this.parseParenArrowList(r,i,c,t);c.length&&!p||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((n=this.startNodeAt(o,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",m,y)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(r,i);return g.expression=n,this.finishNode(g,"ParenthesizedExpression")}return n},re.parseParenItem=function(e){return e},re.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var ae=[];re.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(v.dot)){e.meta=t;var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc,a=this.type===v._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),r,i,!0,!1),a&&"ImportExpression"===e.callee.type&&this.raise(r,"Cannot use new with import()"),this.eat(v.parenL)?e.arguments=this.parseExprList(v.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ae,this.finishNode(e,"NewExpression")},re.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===v.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===v.backQuote,this.finishNode(n,"TemplateElement")},re.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===v.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(v.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(v.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},re.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===v.name||this.type===v.num||this.type===v.string||this.type===v.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===v.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},re.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(v.braceR);){if(r)r=!1;else if(this.expect(v.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(v.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},re.parseProperty=function(e,t){var n,r,i,a,s=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(v.ellipsis))return e?(s.argument=this.parseIdent(!1),this.type===v.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(s,"RestElement")):(s.argument=this.parseMaybeAssign(!1,t),this.type===v.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(s,"SpreadElement"));this.options.ecmaVersion>=6&&(s.method=!1,s.shorthand=!1,(e||t)&&(i=this.start,a=this.startLoc),e||(n=this.eat(v.star)));var o=this.containsEsc;return this.parsePropertyName(s),!e&&!o&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(s)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(v.star),this.parsePropertyName(s,t)):r=!1,this.parsePropertyValue(s,e,n,r,i,a,t,o),this.finishNode(s,"Property")},re.parsePropertyValue=function(e,t,n,r,i,a,s,o){if((n||r)&&this.type===v.colon&&this.unexpected(),this.eat(v.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===v.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||o||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===v.comma||this.type===v.braceR||this.type===v.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===v.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var l="get"===e.kind?0:1;if(e.value.params.length!==l){var c=e.value.start;"get"===e.kind?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},re.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(v.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(v.bracketR),e.key;e.computed=!1}return e.key=this.type===v.num||this.type===v.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},re.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},re.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|V(t,r.generator)|(n?128:0)),this.expect(v.parenL),r.params=this.parseBindingList(v.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")},re.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|V(n,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")},re.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==v.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);a&&!o||(s=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},re.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},re.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,1,t?null:n)}},re.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(v.comma),t&&this.afterTrailingComma(e))break;var s=void 0;n&&this.type===v.comma?s=null:this.type===v.ellipsis?(s=this.parseSpread(r),r&&this.type===v.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):s=this.parseMaybeAssign(!1,r),i.push(s)}return i},re.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&"arguments"===r&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},re.parseIdent=function(e,t){var n=this.startNode();return this.type===v.name?n.name=this.value:this.type.keyword?(n.name=this.type.keyword,"class"!==n.name&&"function"!==n.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(n,"Identifier"),e||(this.checkUnreserved(n),"await"!==n.name||this.awaitIdentPos||(this.awaitIdentPos=n.start)),n},re.parsePrivateIdent=function(){var e=this.startNode();return this.type===v.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},re.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===v.semi||this.canInsertSemicolon()||this.type!==v.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(v.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},re.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var se=R.prototype;se.raise=function(e,t){var n=M(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},se.raiseRecoverable=se.raise,se.curPosition=function(){if(this.options.locations)return new j(this.curLine,this.pos-this.lineStart)};var oe=R.prototype,le=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};oe.enterScope=function(e){this.scopeStack.push(new le(e))},oe.exitScope=function(){this.scopeStack.pop()},oe.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},oe.declareName=function(e,t,n){var r=!1;if(2===t){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var s=this.scopeStack.length-1;s>=0;--s){var o=this.scopeStack[s];if(o.lexical.indexOf(e)>-1&&!(32&o.flags&&o.lexical[0]===e)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(e)>-1){r=!0;break}if(o.var.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e],259&o.flags)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},oe.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},oe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},oe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},oe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var ce=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new L(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},ue=R.prototype;function pe(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}ue.startNode=function(){return new ce(this,this.start,this.startLoc)},ue.startNodeAt=function(e,t){return new ce(this,e,t)},ue.finishNode=function(e,t){return pe.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},ue.finishNodeAt=function(e,t,n,r){return pe.call(this,e,t,n,r)},ue.copyNode=function(e){var t=new ce(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};for(var he,de,fe="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",me=fe+" Extended_Pictographic",ye=me+" EBase EComp EMod EPres ExtPict",ge={9:fe,10:me,11:me,12:ye,13:ye},be="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ve="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",xe=ve+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Se=xe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Ee=Se+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Te={9:ve,10:xe,11:Se,12:Ee,13:Ee+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"},ke={},Pe=0,we=[9,10,11,12,13];Pe<we.length;Pe+=1)de=void 0,(de=ke[he=we[Pe]]={binary:N(ge[he]+" "+be),nonBinary:{General_Category:N(be),Script:N(Te[he])}}).nonBinary.Script_Extensions=de.nonBinary.Script,de.nonBinary.gc=de.nonBinary.General_Category,de.nonBinary.sc=de.nonBinary.Script,de.nonBinary.scx=de.nonBinary.Script_Extensions;var _e=R.prototype,Ae=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":""),this.unicodeProperties=ke[e.options.ecmaVersion>=13?13:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Ce(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Ie(e){return e>=65&&e<=90||e>=97&&e<=122}function Ne(e){return Ie(e)||95===e}function Oe(e){return Ne(e)||De(e)}function De(e){return e>=48&&e<=57}function je(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Le(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Me(e){return e>=48&&e<=55}Ae.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,this.switchU=r&&this.parser.options.ecmaVersion>=6,this.switchN=r&&this.parser.options.ecmaVersion>=9},Ae.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ae.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},Ae.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,a=n.charCodeAt(e);return!t&&!this.switchU||a<=55295||a>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},Ae.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ae.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ae.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ae.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},_e.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=0;r<n.length;r++){var i=n.charAt(r);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(i,r+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},_e.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},_e.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];-1===e.groupNames.indexOf(r)&&e.raise("Invalid named capture referenced")}},_e.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},_e.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},_e.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},_e.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},_e.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},_e.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},_e.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},_e.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},_e.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},_e.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},_e.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},_e.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},_e.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},_e.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Ce(t)&&(e.lastIntValue=t,e.advance(),!0)},_e.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!Ce(n);)e.advance();return e.pos!==t},_e.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},_e.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},_e.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},_e.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=O(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=O(e.lastIntValue);return!0}return!1},_e.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return p(e,!0)||36===e||95===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},_e.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),function(e){return h(e,!0)||36===e||95===e||8204===e||8205===e}(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},_e.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},_e.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},_e.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},_e.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},_e.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},_e.regexp_eatZero=function(e){return 48===e.current()&&!De(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},_e.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},_e.regexp_eatControlLetter=function(e){var t=e.current();return!!Ie(t)&&(e.lastIntValue=t%32,e.advance(),!0)},_e.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n,r=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(i&&a>=55296&&a<=56319){var s=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=1024*(a-55296)+(o-56320)+65536,!0}e.pos=s,e.lastIntValue=a}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&(n=e.lastIntValue)>=0&&n<=1114111)return!0;i&&e.raise("Invalid unicode escape"),e.pos=r}return!1},_e.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},_e.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},_e.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},_e.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},_e.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){C(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},_e.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},_e.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ne(t=e.current());)e.lastStringValue+=O(t),e.advance();return""!==e.lastStringValue},_e.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Oe(t=e.current());)e.lastStringValue+=O(t),e.advance();return""!==e.lastStringValue},_e.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},_e.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},_e.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},_e.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||Me(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},_e.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},_e.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!De(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},_e.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},_e.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;De(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},_e.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;je(n=e.current());)e.lastIntValue=16*e.lastIntValue+Le(n),e.advance();return e.pos!==t},_e.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},_e.regexp_eatOctalDigit=function(e){var t=e.current();return Me(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},_e.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!je(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+Le(i),e.advance()}return!0};var Be=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new L(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},Fe=R.prototype;function Ve(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}Fe.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Be(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},Fe.getToken=function(){return this.next(),new Be(this)},"undefined"!=typeof Symbol&&(Fe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===v.eof,value:t}}}}),Fe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(v.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Fe.readToken=function(e){return p(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Fe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Fe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=T(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},Fe.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!E(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},Fe.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&k.test(String.fromCharCode(e))))break e;++this.pos}}},Fe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},Fe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(v.ellipsis)):(++this.pos,this.finishToken(v.dot))},Fe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(v.assign,2):this.finishOp(v.slash,1)},Fe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?v.star:v.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=v.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(v.assign,n+1):this.finishOp(r,n)},Fe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(124===e?v.logicalOR:v.logicalAND,2):61===t?this.finishOp(v.assign,2):this.finishOp(124===e?v.bitwiseOR:v.bitwiseAND,1)},Fe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(v.assign,2):this.finishOp(v.bitwiseXOR,1)},Fe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!x.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(v.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(v.assign,2):this.finishOp(v.plusMin,1)},Fe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(v.assign,n+1):this.finishOp(v.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(v.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Fe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(v.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(v.arrow)):this.finishOp(61===e?v.eq:v.prefix,1)},Fe.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(v.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(v.assign,3):this.finishOp(v.coalesce,2)}return this.finishOp(v.question,1)},Fe.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,p(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(v.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+O(e)+"'")},Fe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(v.parenL);case 41:return++this.pos,this.finishToken(v.parenR);case 59:return++this.pos,this.finishToken(v.semi);case 44:return++this.pos,this.finishToken(v.comma);case 91:return++this.pos,this.finishToken(v.bracketL);case 93:return++this.pos,this.finishToken(v.bracketR);case 123:return++this.pos,this.finishToken(v.braceL);case 125:return++this.pos,this.finishToken(v.braceR);case 58:return++this.pos,this.finishToken(v.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(v.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(v.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+O(e)+"'")},Fe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},Fe.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var o=this.regexpState||(this.regexpState=new Ae(this));o.reset(n,i,s),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=RegExp(i,s)}catch(e){}return this.finishToken(v.regexp,{pattern:i,flags:s,value:l})},Fe.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),a=this.pos,s=0,o=0,l=0,c=null==t?1/0:t;l<c;++l,++this.pos){var u=this.input.charCodeAt(this.pos),p=void 0;if(r&&95===u)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===o&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=u;else{if((p=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;o=u,s=s*e+p}}return r&&95===o&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=t&&this.pos-a!==t?null:s},Fe.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=Ve(this.input.slice(t,this.pos)),++this.pos):p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,n)},Fe.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=Ve(this.input.slice(t,this.pos));return++this.pos,p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(v.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a,s=(a=this.input.slice(t,this.pos),n?parseInt(a,8):parseFloat(a.replace(/_/g,"")));return this.finishToken(v.num,s)},Fe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Fe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(E(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(v.string,t)};var Re={};Fe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Re)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Fe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Re;this.raise(e,t)},Fe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==v.template&&this.type!==v.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(v.template,e)):36===n?(this.pos+=2,this.finishToken(v.dollarBraceL)):(++this.pos,this.finishToken(v.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(E(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Fe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(v.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},Fe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return O(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;return this.invalidStringToken(n,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return E(t)?"":String.fromCharCode(t)}},Fe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},Fe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(h(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?p:h)(s,r)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=O(s),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},Fe.readWord=function(){var e=this.readWord1(),t=v.name;return this.keywords.test(e)&&(t=g[e]),this.finishToken(t,e)};var qe="8.8.0";R.acorn={Parser:R,version:qe,defaultOptions:B,Position:j,SourceLocation:L,getLineInfo:M,Node:ce,TokenType:d,tokTypes:v,keywordTypes:g,TokContext:ee,tokContexts:te,isIdentifierChar:h,isIdentifierStart:p,Token:Be,isNewLine:E,lineBreak:x,lineBreakG:S,nonASCIIwhitespace:k},e.Node=ce,e.Parser=R,e.Position=j,e.SourceLocation=L,e.TokContext=ee,e.Token=Be,e.TokenType=d,e.defaultOptions=B,e.getLineInfo=M,e.isIdentifierChar=h,e.isIdentifierStart=p,e.isNewLine=E,e.keywordTypes=g,e.lineBreak=x,e.lineBreakG=S,e.nonASCIIwhitespace=k,e.parse=function(e,t){return R.parse(e,t)},e.parseExpressionAt=function(e,t,n){return R.parseExpressionAt(e,t,n)},e.tokContexts=te,e.tokTypes=v,e.tokenizer=function(e,t){return R.tokenizer(e,t)},e.version=qe,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Qr.exports)),Qr.exports}Object.defineProperty(Kr,"__esModule",{value:!0});var Zr=Kr.parse=void 0,ei=yn;function ti(e,t){return Ve.parse(e,Object.assign({parser:{parse:(e,t)=>Zr(e,Object.assign({},t,{ecmaVersion:"latest"}))}},t))}Zr=Kr.parse=function(e,t){var n=[],r=[],i=Yr().parse(e,{allowHashBang:!0,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,ecmaVersion:ei.getOption(t,"ecmaVersion",8),sourceType:ei.getOption(t,"sourceType","module"),locations:!0,onComment:n,onToken:r});return i.comments||(i.comments=n),i.tokens||(i.tokens=r),i};const ni=nr.identifier("_scope"),ri=e=>e&&e.name?e.name:e;function ii(e,t){e.replace(nr.memberExpression(ni,t,!1))}function ai(e){if(!vr(e))return ii(e,e.node),!1;this.traverse(e)}function si(e){const t=()=>this.traverse(e.get("object")),n=e.node.object;switch(!0){case vr(e):n.arguments&&n.arguments.length&&t();break;case!e.value.computed&&sr(n):ii(e,e.node);break;default:this.traverse(e)}return!1}function oi(e){const t=e.node.value,n=e.node.shorthand;return sr(t)||hr(t)||n?(n&&(e.node.shorthand=!1),ai.call(this,e.get("value"))):this.traverse(e.get("value")),!1}function li(e){e.replace(ni),this.traverse(e)}function ci(e){const t=e.parent.value;return hr(t)&&!t.computed||ai.call(this,e),!1}function ui(e){return tr.visit(e,{visitIdentifier:ci,visitMemberExpression:si,visitObjectProperty:oi,visitThisExpression:li,visitClassExpression:()=>!1}),e}function pi(e,t,n){return ti(`(${t?Vr(e.text,n,e):e.text})`,{sourceFileName:t})}function hi(e){return Br("template",e?bi(...e):Mr())}function di(e){return e.expressions?e.expressions[0]:Object.assign({},e,{text:e.value})}function fi(e){const t=nr.arrowFunctionExpression([ni],e);return(e=>rr.ObjectExpression.check(e))(e)&&(e.extra={parenthesized:!0}),t}function mi(e,t,n){return gr(fi,yi)(e,t,n)}function yi(e,t,n){return gr(gi,ui,pi)(e,t,n)}function gi(e){const t=e.program.body;return t[0]?t[0].expression:t}function bi(e,t){return nr.callExpression(nr.identifier(Ee),[e?nr.literal(e):Mr(),t?nr.arrayExpression(t):Mr()])}const vi=e=>nr.arrowFunctionExpression([Ee,Se,xe,Te].map(nr.identifier),e),xi=e=>`[${e}]`;function Si(e){return e?[Br("redundantAttribute",nr.literal(e)),Br("selector",gr(nr.literal,xi)(e))]:[]}function Ei(e,t){return t?e.filter((e=>e.name!==t)):e}function Ti(e){return Ai(e).filter((e=>![Ae,Ce,Ie,Ne,De].includes(e.name)))}function ki(e){return{nodes:_i(e),isRoot:!0}}function Pi(e){return Object.assign({},ki(e),{attributes:Ti(e)})}function wi(e){return e.map((e=>e.expressions?e:Object.assign({},e,{expressions:[{start:e.valueStart,end:e.end,text:`'${e.value||e.name}'`}]})))}function _i(e){return e&&e.nodes?e.nodes:[]}function Ai(e){return e.attributes?e.attributes:[]}function Ci(e,t,n){const r=Lr(e),i=e=>`'${e}'`;return r?r.expressions?fi(Di(r,t,n)):mi(Object.assign({},r,{text:i(r.value)}),t,n):mi(Object.assign({},e,{text:i(ri(e))}),t,n)}function Ii(e,t){return e.unescape?Object.assign({},e,{[t]:Jr(e[t],e.unescape)}):e}function Ni(e){const t=function(e){return function(e){return Ai(e).filter((e=>!_r(e)))}(e).map((e=>e[Me]||!e.value?e.name:`${e.name}="${Ii(e,"value").value}"`)).join(" ")}(e);switch(!0){case Tr(e):return`<${e.name}${t?" "+t:""}${Er(e)?"/":""}>`;case kr(e):return _r(e)?" ":Ii(e,"text").text;default:return e.text||""}}function Oi(e){return nr.callExpression(nr.memberExpression(nr.arrayExpression(e),nr.identifier("join"),!1),[nr.literal("")])}function Di(e,t,n){if(!e.parts||1===e.parts.length)return yi(e.expressions[0],t,n);const r=[...e.parts.reduce(((r,i)=>{const a=e.expressions.find((e=>e.text.trim()===i));return[...r,a?yi(a,t,n):nr.literal(Wr(i))]}),[])].filter((e=>!or(e)||e.value));return Oi(r)}const ji=(void 0===Li&&(Li=0),()=>"expr"+Li++);var Li;function Mi(e,t,n,r){return nr.arrayExpression([...gr((t=>t.map((t=>Hr(t,n,r,0,e)))),(e=>e.filter(_r)),(e=>Ei(e,t)),Ti)(e)])}function Bi(e,t,n){return _r(e)?fi(Di(e,t,n)):nr.arrowFunctionExpression([],nr.literal(e.value||!0))}function Fi(e){return e&&e.toJSON?e.toJSON():e}const Vi=Object.freeze({code:"",ast:[],meta:{},map:null});function Ri(e,t){const n=Object.assign({},Vi,e,{meta:t});return!n.map&&t&&t.options&&t.options.file?Object.assign({},n,{map:(t.options.file,new bn)}):n}const qi=new Set,Ui=Object.freeze({javascript:new Map,css:new Map,template:(new Map).set("default",(e=>({code:e})))});function zi(e){a(`No preprocessor of type "${e}" was found, please make sure to use one of these: 'javascript', 'css' or 'template'`)}function Wi(e,t,n,r){return Ui[e]||zi(e),Ui[e].has(t)||function(e){a(`No preprocessor named "${e}" was found, are you sure you have registered it?'`)}(t),function(e,t,n){return Ri(e?e(n,t):{code:n},t)}(Ui[e].get(t),n,r)}function Ji(e,t){return Ve.print(e,Object.assign({},t,{parser:{parse:(e,t)=>Zr(e,Object.assign({},t,{ecmaVersion:"latest"}))},tabWidth:2,wrapColumn:0,quote:"single"}))}const Gi=e=>ur(e.left)?e.left.expressions[0]:e.left,Hi=e=>ur(e.left)?e.left.expressions[1]:null,Xi=e=>e.right,$i=gr(nr.literal,ri),Ki=e=>Br("itemName",gr($i,Gi)(e)),Qi=e=>Br("indexName",gr($i,Hi)(e)),Yi=(e,t,n,r)=>Br(Pe,gr((e=>mi(e,n,r)),(e=>Object.assign({},t,{text:Ji(e).code})),Xi)(e));function Zi(e,t,n){const r=pi(e,t,n).program.body[0];lr(r)||a(`The each directives supported should be of type "ExpressionStatement",you have provided a "${r.type}"`);const{expression:i}=r;return[Ki(i),Qi(i),Yi(i,e,t,n)]}function ea(e,t,n,r){const[i,a,s]=[Or,Dr,jr].map((t=>t(e))),o=e=>e?mi(di(e),n,r):Mr();return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(xe),nr.identifier("EACH"),!1)),Br("getKey",o(s)),Br("condition",o(i)),hi(ca(e,n,r,t)),...Si(t),...gr(Zi,di)(a)])}function ta(e,t,n,r){const i=Or(e);return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(xe),nr.identifier("IF"),!1)),Br(Pe,mi(i.expressions[0],n,r)),...Si(t),hi(ca(e,n,r,t))])}function na(e,t,n){const r=_i(e);return r.filter(kr).filter(_r).map((i=>Hr(i,t,n,r.indexOf(i),e)))}function ra(e,t,n,r){return nr.objectExpression([...br(e)||Pr(e)?[]:Si(t),Br("expressions",nr.arrayExpression([...na(e,n,r),...Xr(e,n,r)]))])}function ia(e,t,n,r){const i=Nr(Oe,e),a=i?i.value:"default";return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(xe),nr.identifier("SLOT"),!1)),Br(_e,Mi(Object.assign({},e,{attributes:Ai(e).filter((e=>ri(e)!==Oe))}),t,n,r)),Br(we,nr.literal(a)),...Si(t)])}function aa(e){return _i(e).reduce(((e,t)=>{const n=function(e){return Ai(e).find((e=>e.name===Ne))}(t);return n?e[n.value]=t:e.default=Pi({nodes:[..._i(e.default),t]}),e}),{default:null})}function sa(e,t,n){return nr.arrayExpression([...gr((e=>e.map((e=>{let[r,i]=e;return function(e,t,n,r){const i=Object.assign({},t,{attributes:Ai(t)}),[a,s]=ua(i,n,r);return nr.objectExpression([Br("id",nr.literal(e)),Br("html",nr.literal(a)),Br("bindings",nr.arrayExpression(s))])}(r,i,t,n)}))),(e=>e.filter((e=>{let[,t]=e;return t}))),Object.entries,aa)(e)])}function oa(e,t,n,r){return nr.objectExpression([Br(ke,nr.memberExpression(nr.identifier(xe),nr.identifier("TAG"),!1)),Br("getComponent",nr.identifier(Te)),Br(Pe,Ci(e,n,r)),Br("slots",sa(e,n,r)),Br(_e,Mi(e,t,n,r)),...Si(t)])}const la=Object.freeze({html:[],bindings:[],parent:null});function ca(e,t,n,r){const i=xr(e),a=function(e,t){return Object.assign({},e,{attributes:Ei(Ai(e),t)})}(e,r);return i?[null,[oa(a,null,t,n)]]:ua(Pi(a),t,n)}function ua(e,t,n,r){e||a("Something went wrong with your tag DOM parsing, your tag template can't be created");const[i,s]=function(e,t,n,r){return i=e,[_r,Dr,Or,xr,Sr].every((e=>!e(i)))?[Ni(e),[]]:function(e,t,n,r){return!0===kr(e)?[Ni(e),[]]:function(e,t,n){const r=Pr(e)?null:ji(),i=function(e,t){return t?Object.assign({},e,{attributes:[{name:t,value:t},...Ai(e)]}):e}(e,r),a=Ni(i);switch(!0){case Cr(i):return[a,[ea(i,r,t,n)]];case Ar(i):return[a,[ta(i,r,t,n)]];case xr(i):return[a,[oa(i,r,t,n)]];case Sr(i):return[a,[ia(i,r)]];default:return[a,[ra(i,r,t,n)]]}}(e,t,n)}(e,t,n);var i}(e,t,n),o=_i(e),l=!1===br(e),c=Object.assign({},JSON.parse(JSON.stringify(la)),r);var u;return l&&c.html.push(...i),c.bindings.push(...s),o.length&&(u=e,![Dr,Or,xr].some((e=>e(u))))&&o.forEach((r=>ua(r,t,n,Object.assign({parent:e},c)))),l&&Tr(e)&&!Er(e)&&c.html.push(function(e){return e.name?`</${e.name}>`:""}(e)),[c.html.join(""),c.bindings]}var pa={}.hasOwnProperty,ha=/[ -,\.\/:-@\[-\^`\{-~]/,da=/[ -,\.\/:-@\[\]\^`\{-~]/,fa=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,ma=function e(t,n){"single"!=(n=function(e,t){if(!e)return t;var n={};for(var r in t)n[r]=pa.call(e,r)?e[r]:t[r];return n}(n,e.options)).quotes&&"double"!=n.quotes&&(n.quotes="single");for(var r="double"==n.quotes?'"':"'",i=n.isIdentifier,a=t.charAt(0),s="",o=0,l=t.length;o<l;){var c=t.charAt(o++),u=c.charCodeAt(),p=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&o<l){var h=t.charCodeAt(o++);56320==(64512&h)?u=((1023&u)<<10)+(1023&h)+65536:o--}p="\\"+u.toString(16).toUpperCase()+" "}else p=n.escapeEverything?ha.test(c)?"\\"+c:"\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?"\\"+u.toString(16).toUpperCase()+" ":"\\"==c||!i&&('"'==c&&r==c||"'"==c&&r==c)||i&&da.test(c)?"\\"+c:c;s+=p}return i&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(a)&&(s="\\3"+a+" "+s.slice(1))),s=s.replace(fa,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!i&&n.wrap?r+s+r:s};ma.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},ma.version="3.0.0";var ya=ma;function ga(e){const t=e.attributes?e.attributes.find((e=>"type"===e.name)):null;return t?t.value.replace("text/",""):null}function ba(e,t,n,r){const i=r.text;return t?Wi(e,t,n,i):{code:i}}const va=":host",xa=["from","to"],Sa=/\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//g,Ea=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,"g"),Ta=/([^,]+)(?::\w+(?:[\s|\S]*?\))?(?:[^,:]*)?)+|([^,]+)/g,ka=e=>e.replace(/\\/g,"\\\\");function Pa(e,t,n,r){const i=ga(e),{options:a}=n,s=ba("css",i,n,e.text).code.replace(Sa,"").replace(/\s+/g," ").trim(),o=(l=n.tagName,ka(ya(l,{isIdentifier:!0})));var l;const c=(a.scopedCss?function(e,t){return t.replace(Ea,(function(t,n,r){if(!r)return t;const i=function(e,t){return t.replace(Ta,((t,n)=>{const r=t.trim(),i=n?n.trim():r;return 0===i.indexOf(e)||!i||xa.indexOf(i)>-1||"%"===i.slice(-1)?t:i.indexOf(va)<0?`${e} ${r},[is="${e}"] ${r}`:`${r.replace(va,e)},${r.replace(va,`[is="${e}"]`)}`}))}(e,r);return n?`${n} ${i}`:i}))}(o,ka(s)):ka(s)).trim();return tr.visit(r,{visitProperty(e){if("css"===e.value.key.name)return e.value.value=nr.templateLiteral([nr.templateElement({raw:c,cooked:""},!1)],[]),!1;this.traverse(e)}}),r}function wa(e){return!e||!e.length}function _a(e){return!e||wa(e.mappings)}function Aa(e){return e.filter(dr)}function Ca(e){return e.filter((e=>!dr(e)))}function Ia(e){return e.filter((e=>!yr(e)||pr(e)))}function Na(e){return e.body||e.program.body}function Oa(e,t){return tr.visit(e,{visitProperty(e){if(e.value.key.name===s)return e.value.value=t.declaration,!1;this.traverse(e)}}),e}function Da(e,t,n,i){const a=ga(e),o=Vr(e.text.text,t,e),{options:p}=n,h=ba("javascript",a,n,Object.assign({},e,{text:o})),d=Fi(h.map),f=Na(ti(h.code,{sourceFileName:p.file,inputSourceMap:_a(d)?null:d})),m=f.find(pr),y=r(m),g=Na(i),b=function(e){const t=e.filter(yr).map((e=>e.declaration)),n=t.filter(fr),r=t.filter(mr),i=e=>{let{typeName:t}=e;return!(!t||!t.name)&&t.name===u},a=e=>{let{expression:t}=e;return t.name===u};return n.find((e=>e.typeAnnotation.types&&e.typeAnnotation.types.some(i)||i(e.typeAnnotation)))||r.find((e=>e.extends&&e.extends.some(a)))}(f);if(m&&f.some(cr))throw Error('You can\t use "export default {}" and root this statements in the same component');return g.unshift(...y?[...Aa(f),...(v=f,v.filter(yr))]:function(e){return e.filter((e=>!pr(e)&&!cr(e)))}(f)),y&&Oa(i,function(e){return nr.exportDefaultDeclaration(nr.functionDeclaration(nr.identifier(s),[],nr.blockStatement([...gr(Ca,Ia)(e),nr.returnStatement(nr.thisExpression())])))}(f)),m&&Oa(i,m),b?function(e,t){const n=Na(e),r=nr.importSpecifier(nr.identifier(c)),i=t.id.name,a=Aa(n).find((e=>e.source.value===l)),s=n.find(pr),o=s.declaration;return a?a.specifiers.push(r):n.unshift(0,nr.importDeclaration([r],nr.stringLiteral(l))),s.declaration=nr.tsAsExpression(o,nr.tsTypeReference(nr.identifier(c),nr.tsTypeParameterInstantiation([nr.tsTypeReference(nr.identifier(i))]))),e}(i,b):i;var v}function ja(e,t,n,r){const{options:i}=n;return function(e,t,n,r){return tr.visit(e,{visitProperty(e){if(e.value.key.name===o)return e.value.value=vi(function(e,t,n){return bi(...ua((r=e,Object.assign({},ki(r),{attributes:gr(wi,Ti)(r)})),t,n));var r}(r,t,n)),!1;this.traverse(e)}}),e}(r,i.file,t,e)}const La={template:"default",file:"[unknown-source-file]",scopedCss:!0};function Ma(e){let{tagName:t}=e;return nr.program([nr.exportDefaultDeclaration(nr.objectExpression([Br("css",Mr()),Br(s,Mr()),Br(o,Mr()),Br("name",nr.literal(t))]))])}function Ba(e){const t=Fi(e);return _a(t)?null:t}function Fa(e,t){return Object.assign({},e,{sourcesContent:[t]})}const Va=(e,t)=>{const{parse:n}=me(t);return n(e).output.template};function Ra(e,t){return gr((e=>{let{code:t}=e;return t}),Ji,vi,sa)(Va(e,t),La.file,e)}function qa(e,t){void 0===t&&(t={});const r=function(e,t){return{tagName:null,fragments:null,options:Object.assign({},La,t),source:e}}(e,t),{options:a}=r,{code:s,map:o}=Wi("template",a.template,r,e),{parse:l}=me(a),{template:c,css:u,javascript:p}=l(s).output;if(function(e,t,r){const i=e?(""+t.substr(0,e.start)+t.substr(e.end,t.length)).trim():"";if(i)try{const{template:e,javascript:t,css:a}=r(i).output;return[e,t,a].some(n)}catch(e){return!1}return!1}(c||u||p,s,l))throw Error("Multiple HTML root nodes are not supported");return Object.assign(r,{tagName:c.name,fragments:{template:c,css:u,javascript:p}}),gr((e=>Object.assign({},e,{meta:r})),(e=>function(e,t){return Array.from(qi).reduce((function(e,n){const{code:r,map:a}=e,s=n(r,t);return{code:s.code,map:(o=a,l=s.map,i()&&o&&l&&l.mappings?On(Fi(o),Fi(l)):i()&&o?Fi(o):{})};var o,l}),Ri(e,t))}(e,r)),(t=>Object.assign({},t,{map:Fa(t.map,e)})),(e=>r.ast=e&&Ji(e,{sourceMapName:a.file+".map",inputSourceMap:Ba(o)})),Ua(ja,c,s,r),Ua(Da,p,s,r),Ua(Pa,u,s,r))(Ma(r))}function Ua(e,t,n,r){return!t||!t.text&&wa(t.nodes)&&wa(t.attributes)?e=>e:ce(e)(t,n,r)}const za=Object.freeze({__proto__:null,compile:qa,createInitialInput:Ma,generateSlotsFromString:Ra,generateTemplateFunctionFromString:function(e,t){return gr((e=>{let{code:t}=e;return t}),Ji,bi)(...ua(Va(e,t),La.file,e))},registerPostprocessor:function(e){return qi.has(e)&&a(`This postprocessor "${e.name||e.toString()}" was already registered`),qi.add(e),qi},registerPreprocessor:function(e,t,n){return e||a("Please define the type of preprocessor you want to register 'javascript', 'css' or 'template'"),t||a("Please define a name for your preprocessor"),n||a("Please provide a preprocessor function"),Ui[e]||zi(e),Ui[e].has(t)&&a(`The preprocessor ${t} was already registered before`),Ui[e].set(t,n),Ui}}),Wa={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function Ja(e,t){return typeof e===t}function Ga(e){const t=e.ownerSVGElement;return!!t||null===t}function Ha(e){return"template"===e.tagName.toLowerCase()}function Xa(e){return Ja(e,"function")}function $a(e){return!Ka(e)&&e.constructor===Object}function Ka(e){return null==e}const Qa=new Map,Ya=Symbol(),Za=new Set,es="mount",ts="update",ns="unmount",rs="props",is="slots",as="root",ss=Symbol(),os=Symbol(),ls=Symbol(),cs=Symbol(),us=Symbol();function ps(e){return e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))}function hs(e){for(;e.firstChild;)e.removeChild(e.firstChild)}const ds=e=>e.remove(),fs=(e,t)=>t&&t.parentNode&&t.parentNode.insertBefore(e,t),ms={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function ys(){return this}function gs(e){return Xa(e)?e.prototype&&e.prototype.constructor?new e:e():e}function bs(e){const t=new Map,n=n=>(t.has(n)||t.set(n,e.call(this,n)))&&t.get(n);return n.cache=t,n}function vs(e){return e.reduce(((e,t)=>{const{value:n,type:r}=t;switch(!0){case!t.name&&0===r:return Object.assign({},e,n);case 3===r:e.value=t.value;break;default:e[ps(t.name)]=t.value}return e}),{})}function xs(e,t,n,r){return void 0===r&&(r={}),Object.defineProperty(e,t,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function Ss(e,t,n){return Object.entries(t).forEach((t=>{let[r,i]=t;xs(e,r,i,n)})),e}function Es(e,t){return Object.entries(t).forEach((t=>{let[n,r]=t;e[n]||(e[n]=r)})),e}const Ts=Object.freeze({[es]:ys,[ts]:ys,[ns]:ys}),ks=Object.assign({},Ts,{clone:ys,createDOM:ys}),Ps=Symbol(),ws=Symbol(),_s=Symbol(),As={nodes:[],mount(e,t){return this.update(e,t)},update(e,t){const{placeholder:n,nodes:r,childrenMap:i}=this,a=e===_s?null:this.evaluate(e),s=a?Array.from(a):[],{newChildrenMap:o,batches:l,futureNodes:c}=function(e,t,n,r){const{condition:i,template:a,childrenMap:s,itemName:o,getKey:l,indexName:c,root:u,isTemplateTag:p}=r,h=new Map,d=[],f=[];return e.forEach(((e,r)=>{const m=function(e,t){let{itemName:n,indexName:r,index:i,item:a}=t;return xs(e,n,a),r&&xs(e,r,i),e}(Object.create(t),{itemName:o,indexName:c,index:r,item:e}),y=l?l(m):r,g=s.get(y),b=[];if(function(e,t){return!!e&&!e(t)}(i,m))return;const v=!g,x=g?g.template:a.clone(),S=x.el||u.cloneNode(),E=p&&v?function(e){const t=e.dom.cloneNode(!0),{head:n,tail:r}=function(){const e=document.createTextNode(""),t=document.createTextNode("");return e[Ps]=!0,t[ws]=!0,{head:e,tail:t}}();return{avoidDOMInjection:!0,fragment:t,head:n,tail:r,children:[n,...Array.from(t.childNodes),r]}}(x):x.meta;v?d.push((()=>x.mount(S,m,n,E))):d.push((()=>x.update(m,n))),p?b.push(...E.children):b.push(S),s.delete(y),f.push(...b),h.set(y,{nodes:b,template:x,context:m,index:r})})),{newChildrenMap:h,batches:d,futureNodes:f}}(s,e,t,this);return((e,t,n,r)=>{const i=t.length;let a=e.length,s=i,o=0,l=0,c=null;for(;o<a||l<s;)if(a===o){const e=s<i?l?n(t[l-1],-0).nextSibling:n(t[s-l],0):r;for(;l<s;)fs(n(t[l++],1),e)}else if(s===l)for(;o<a;)c&&c.has(e[o])||ds(n(e[o],-1)),o++;else if(e[o]===t[l])o++,l++;else if(e[a-1]===t[s-1])a--,s--;else if(e[o]===t[s-1]&&t[l]===e[a-1]){const r=n(e[--a],-1).nextSibling;fs(n(t[l++],1),n(e[o++],-1).nextSibling),fs(n(t[--s],1),r),e[a]=t[s]}else{if(!c){c=new Map;let e=l;for(;e<s;)c.set(t[e],e++)}if(c.has(e[o])){const r=c.get(e[o]);if(l<r&&r<s){let i=o,h=1;for(;++i<a&&i<s&&c.get(e[i])===r+h;)h++;if(h>r-l){const i=n(e[o],0);for(;l<r;)fs(n(t[l++],1),i)}else u=n(t[l++],1),(p=n(e[o++],-1))&&p.parentNode&&p.parentNode.replaceChild(u,p)}else o++}else ds(n(e[o++],-1))}var u,p})(r,c,function(e,t){return(n,r)=>{if(r<0){const n=e[e.length-1];if(n){const{template:r,nodes:i,context:a}=n;i.pop(),i.length||(e.pop(),r.unmount(a,t,null))}}return n}}(Array.from(i.values()),t),n),l.forEach((e=>e())),this.childrenMap=o,this.nodes=c,this},unmount(e,t){return this.update(_s,t),this}},Cs={mount(e,t){return this.update(e,t)},update(e,t){const n=!!this.evaluate(e),r=!this.value&&n,i=this.value&&!n,a=()=>{const n=this.node.cloneNode();fs(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,e,t)};switch(!0){case r:a();break;case i:this.unmount(e);break;default:n&&this.template.update(e,t)}return this.value=n,this},unmount(e,t){return this.template.unmount(e,t,!0),this}},Is="undefined"==typeof Element?{}:Element.prototype,Ns=bs((e=>Is.hasOwnProperty(e))),Os=/^on/,Ds={handleEvent(e){this[e.type](e)}},js=new WeakMap;function Ls(e){return Ka(e)?"":e}const Ms=(e,t)=>{const n=e.childNodes[t];if(n.nodeType===Node.COMMENT_NODE){const t=document.createTextNode("");return e.replaceChild(t,n),t}return n},Bs={0:function e(t,n,r,i){let{name:a}=n;if(!a)return i&&function(e,t,n){const r=t?Object.keys(t):[];Object.keys(n).filter((e=>!r.includes(e))).forEach((t=>e.removeAttribute(t)))}(t,r,i),void(r&&function(t,n){Object.entries(n).forEach((n=>{let[r,i]=n;return e(t,{name:r},i)}))}(t,r));!Ns(a)&&(function(e){return Ja(e,"boolean")}(r)||$a(r)||Xa(r))&&(t[a]=r),function(e){return!e&&0!==e}(r)?t.removeAttribute(a):function(e){return!0===e||["string","number"].includes(typeof e)}(r)&&t.setAttribute(a,function(e,t){return!0===t?e:t}(a,r))},1:function(e,t,n){let{name:r}=t;const i=r.replace(Os,""),a=js.get(e)||(e=>{const t=Object.create(Ds);return js.set(e,t),t})(e),[s,o]=(e=>Array.isArray(e)?e:[e,!1])(n),l=a[i],c=s&&!l;l&&!s&&e.removeEventListener(i,a),c&&e.addEventListener(i,a,o),a[i]=s},2:function(e,t,n){e.data=Ls(n)},3:function(e,t,n){e.value=Ls(n)}},Fs={mount(e){return this.value=this.evaluate(e),Vs(this,this.value),this},update(e){const t=this.evaluate(e);return this.value!==t&&(Vs(this,t),this.value=t),this},unmount(){return 1===this.type&&Vs(this,null),this}};function Vs(e,t){return Bs[e.type](e.node,e,t,e.value)}function Rs(e,t){return Object.assign({},Fs,t,{node:2===t.type?Ms(e,t.childNodeIndex):e})}const qs=(e,t)=>e[ls]||t,Us={attributes:[],getTemplateScope(e,t){return function(e,t,n){if(!e||!e.length)return n;const r=e.map((e=>Object.assign({},e,{value:e.evaluate(t)})));return Object.assign(Object.create(n||null),vs(r))}(this.attributes,e,t)},mount(e,t){const n=!!e.slots&&e.slots.find((e=>{let{id:t}=e;return t===this.name})),{parentNode:r}=this.node,i=qs(e,t);return this.template=n&&Ks(n.html,n.bindings).createDOM(r),this.template&&(hs(this.node),this.template.mount(this.node,this.getTemplateScope(e,i),i),this.template.children=Array.from(this.node.childNodes)),zs(this.node),ds(this.node),this},update(e,t){if(this.template){const n=qs(e,t);this.template.update(this.getTemplateScope(e,n),n)}return this},unmount(e,t,n){return this.template&&this.template.unmount(this.getTemplateScope(e,t),null,n),this}};function zs(e){const t=e&&e.firstChild;t&&(fs(t,e),zs(e))}function Ws(e){return e.reduce(((e,t)=>{let{bindings:n}=t;return e.concat(n)}),[])}const Js={mount(e){return this.update(e)},update(e,t){const n=this.evaluate(e);return n&&n===this.name?this.tag.update(e):(this.unmount(e,t,!0),this.name=n,this.tag=(r=this.getComponent(n),void 0===(i=this.slots)&&(i=[]),void 0===(a=this.attributes)&&(a=[]),r?r({slots:i,attributes:a}):Ks(function(e){return e.reduce(((e,t)=>e+t.html),"")}(i),[...Ws(i),{expressions:a.map((e=>Object.assign({type:0},e)))}])),this.tag.mount(this.node,e)),this;var r,i,a},unmount(e,t,n){return this.tag&&this.tag.unmount(n),this}},Gs={1:function(e,t){let{evaluate:n,template:r}=t;const i=document.createTextNode("");return fs(i,e),ds(e),Object.assign({},Cs,{node:e,evaluate:n,placeholder:i,template:r.createDOM(e)})},2:function(e,t){let{expressions:n}=t;return Object.assign({},(r=n.map((t=>Rs(e,t))),["mount","update","unmount"].reduce(((e,t)=>Object.assign({},e,{[t]:e=>r.map((n=>n[t](e)))&&void 0})),{})));var r},0:function(e,t){let{evaluate:n,condition:r,itemName:i,indexName:a,getKey:s,template:o}=t;const l=document.createTextNode(""),c=e.cloneNode();return fs(l,e),ds(e),Object.assign({},As,{childrenMap:new Map,node:e,root:c,condition:r,evaluate:n,isTemplateTag:Ha(c),template:o.createDOM(e),getKey:s,indexName:a,itemName:i,placeholder:l})},3:function(e,t){let{evaluate:n,getComponent:r,slots:i,attributes:a}=t;return Object.assign({},Js,{node:e,evaluate:n,slots:i,attributes:a,getComponent:r})},4:function(e,t){let{name:n,attributes:r}=t;return Object.assign({},Us,{attributes:r,node:e,name:n})}};function Hs(e,t){return e.map((e=>2===e.type?Object.assign({},e,{childNodeIndex:e.childNodeIndex+t}):e))}function Xs(e,t,n){const{selector:r,type:i,redundantAttribute:a,expressions:s}=t,o=r?e.querySelector(r):e;a&&o.removeAttribute(a);const l=s||[];return(Gs[i]||Gs[2])(o,Object.assign({},t,{expressions:n&&!r?Hs(l,n):l}))}const $s={createDOM(e){return this.dom=this.dom||function(e,t){return t&&("string"==typeof t?function(e,t){return Ga(e)?function(e,t){return t.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,"application/xml").documentElement,!0)}(t,e):function(e,t){const n=Ha(t)?t:document.createElement("template");return n.innerHTML=e,n.content}(t,e)}(e,t):t)}(e,this.html)||document.createDocumentFragment(),this},mount(e,t,n,r){void 0===r&&(r={}),this.el&&this.unmount(t);const{fragment:i,children:a,avoidDOMInjection:s}=r,{parentNode:o}=a?a[0]:e,l=Ha(e),c=l?function(e,t,n){const r=Array.from(e.childNodes);return Math.max(r.indexOf(t),r.indexOf(n.head)+1,0)}(o,e,r):null;this.createDOM(e);const u=i||this.dom.cloneNode(!0);return this.el=l?o:e,this.children=l?a||Array.from(u.childNodes):null,!s&&u&&function(e,t){switch(!0){case Ga(e):!function(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}(t,e);break;case Ha(e):e.parentNode.replaceChild(t,e);break;default:e.appendChild(t)}}(e,u),this.bindings=this.bindingsData.map((e=>Xs(this.el,e,c))),this.bindings.forEach((e=>e.mount(t,n))),this.meta=r,this},update(e,t){return this.bindings.forEach((n=>n.update(e,t))),this},unmount(e,t,n){void 0===n&&(n=!1);const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(e,t,n))),!0){case r[ss]||null===n:break;case Array.isArray(this.children):!function(e){for(let t=0;t<e.length;t++)ds(e[t])}(this.children);break;case!n:hs(r);break;case!!n:ds(r)}return this.el=null,this},clone(){return Object.assign({},this,{meta:{},el:null})}};function Ks(e,t){return void 0===t&&(t=[]),Object.assign({},$s,{html:e,bindingsData:t})}const Qs=(e,t)=>e[Ya]=t;function Ys(e){return[es,ts,ns].reduce(((t,n)=>(t[n]=e(n),t)),{})}function Zs(e){return Array.isArray(e)?e:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(e))&&"number"==typeof e.length?Array.from(e):[e]}function eo(e,t){return Zs("string"==typeof e?(t||document).querySelectorAll(e):e)}const to=Object.freeze({$(e){return eo(e,this.root)[0]},$$(e){return eo(e,this.root)}}),no=Object.freeze({shouldUpdate:ys,onBeforeMount:ys,onMounted:ys,onBeforeUpdate:ys,onUpdated:ys,onBeforeUnmount:ys,onUnmounted:ys}),ro=e=>1===e.length?e[0]:e;function io(e,t,n){const r="object"==typeof t?t:{[t]:n},i=Object.keys(r);return Zs(e).forEach((e=>{i.forEach((t=>e.setAttribute(t,r[t])))})),e}function ao(e,t){return function(e,t,n){const r="string"==typeof t?[t]:t;return ro(Zs(e).map((e=>ro(r.map((t=>e.getAttribute(t)))))))}(e,t)}const so=new Map;var oo;const lo={CSS_BY_NAME:so,add(e,t){return so.has(e)||(so.set(e,t),this.inject()),this},inject(){return(oo||(io(oo=eo("style[riot]")[0]||document.createElement("style"),"type","text/css"),oo.parentNode||document.head.appendChild(oo),oo)).innerHTML=[...so.values()].join("\n"),this},remove(e){return so.has(e)&&(so.delete(e),this.inject()),this}};function co(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return(r=[...n,...r]).length<e.length?co(e,...r):e(...r)}}function uo(e){return ao(e,"is")||e.tagName.toLowerCase()}function po(e,t){return Object.assign({},e,gs(t))}function ho(e,t){let{slots:n,attributes:r,props:i}=t;return a=function(e){return[...Za].reduce(((e,t)=>t(e)||e),e)}(Ss($a(e)?Object.create(e):e,{mount(t,a,s){return void 0===a&&(a={}),xs(t,ss,!1),this[ls]=s,this[cs]=function(e,t){void 0===t&&(t=[]);const n=t.map((t=>Rs(e,t))),r={};return Object.assign(r,Object.assign({expressions:n},Ys((e=>t=>(n.forEach((n=>n[e](t))),r)))))}(t,r).mount(s),xs(this,rs,Object.freeze(Object.assign({},function(e,t){return void 0===t&&(t={}),Object.assign({},function(e){return Array.from(e.attributes).reduce(((e,t)=>(e[ps(t.name)]=t.value,e)),{})}(e),gs(t))}(t,i),vs(this[cs].expressions)))),this.state=po(this.state,a),this[us]=this.template.createDOM(t).clone(),Qs(t,this),e.name&&function(e,t){uo(e)!==t&&io(e,"is",t)}(t,e.name),xs(this,as,t),xs(this,is,n),this.onBeforeMount(this.props,this.state),this[us].mount(t,this,s),this.onMounted(this.props,this.state),this},update(e,t){void 0===e&&(e={}),t&&(this[ls]=t,this[cs].update(t));const n=vs(this[cs].expressions);if(!1!==this.shouldUpdate(n,this.props))return xs(this,rs,Object.freeze(Object.assign({},this.props,n))),this.state=po(this.state,e),this.onBeforeUpdate(this.props,this.state),this[os]||(this[os]=!0,this[us].update(this,this[ls])),this.onUpdated(this.props,this.state),this[os]=!1,this},unmount(e){return this.onBeforeUnmount(this.props,this.state),this[cs].unmount(),this[us].unmount(this,this[ls],null===e?null:!e),this.onUnmounted(this.props,this.state),this}})),Object.keys(e).filter((t=>Xa(e[t]))).forEach((e=>{a[e]=a[e].bind(a)})),a;var a}function fo(e){let{css:t,template:n,componentAPI:r,name:i}=e;return t&&i&&lo.add(i,t),co(ho)(Ss(Es(r,Object.assign({},no,{[rs]:{},state:{}})),Object.assign({[is]:null,[as]:null},to,{name:i,css:t,template:n})))}const mo=bs(yo);function yo(e){const{css:t,template:n,exports:r,name:i}=e,a=n?function(e,t,n){return e(Ks,ms,Wa,n)}(n,0,(e=>{const t=(void 0===(n=e.exports?e.exports.components:{})&&(n={}),Object.entries(gs(n)).reduce(((e,t)=>{let[n,r]=t;var i;return e[(i=n,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=yo(r),e}),{}));var n;return n=>n===e.name?mo(e):t[n]||Qa.get(n)})(e)):ks;return e=>{let{slots:s,attributes:o,props:l}=e;if(r&&r[ss])return function(e,t){let{slots:n,attributes:r,props:i,css:a,template:s}=t;const o=Es(e({slots:n,attributes:r,props:i}),Ts);return Ys((e=>function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];if(e===es){const[e]=n;xs(e,ss,!0),Qs(e,o)}return o[e](...n),o}))}(r,{slots:s,attributes:o,props:l,css:t,template:n});const c=gs(r)||{},u=fo({css:t,template:a,componentAPI:c,name:i})({slots:s,attributes:o,props:l});return{mount:(e,t,n)=>u.mount(e,n,t),update:(e,t)=>u.update(t,e),unmount:e=>u.unmount(e)}}}function go(e,t){let{css:n,template:r,exports:i}=t;return Qa.has(e),Qa.set(e,yo({name:e,css:n,template:r,exports:i})),Qa}const bo={cssManager:lo,DOMBindings:{template:Ks,createBinding:Xs,createExpression:Rs,bindingTypes:Wa,expressionTypes:ms},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:Ya,PARENT_KEY_SYMBOL:ls}};async function vo(e,t){const n=await fetch(e);return qa(await n.text(),Object.assign({file:e},t))}const xo="__riot_registry__";function So(e,t,n){window[xo]||(window[xo]={}),function(e,t){const n=document.createElement("script"),r=document.documentElement;t&&(n.text=`${e}\n//# sourceURL=${t}.js`),r.appendChild(n),r.removeChild(n)}(`window.__riot_registry__['${t}'] = ${function(e){return`(function (global){${e}})(this)`.replace("export default","return")}(e)}`,n),go(t,window[xo][t])}function Eo(e){if(!e.innerHTML.trim())return null;const t=Ra(e.outerHTML);return e.innerHTML="",Function("return "+t)()(Ks,ms,Wa,(e=>Qa.get(e)))}e.__=bo,e.compile=async function(e){const t=eo('script[type="riot"]').map((e=>ao(e,"src")||ao(e,"data-src")));(await Promise.all(t.map((t=>vo(t,e))))).forEach(((e,n)=>{let{code:r,meta:i}=e;const a=t[n],{tagName:s}=i;So(r,s,a)}))},e.compileFromString=function(e,t){return qa(e,t)},e.compileFromUrl=vo,e.compiler=za,e.component=function(e){const t=function(e){return function(t,n,r){let{slots:i,attributes:a,parentScope:s}=void 0===r?{}:r;return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>function(){return e(t(...arguments))}))}((e=>e.mount(t,s)),(e=>e({props:n,slots:i,attributes:a})),yo)(e)}}(e);return function(e,n,r){let{slots:i,attributes:a,parentScope:s}=void 0===r?{}:r;return t(e,n,{slots:i||Eo(e),attributes:a,parentScope:s})}},e.inject=So,e.install=function(e){return Xa(e),Za.has(e),Za.add(e),Za},e.mount=function(e,t,n){return eo(e).map((e=>function(e,t,n,r){const i=n||uo(e);return Qa.has(i),Qa.get(i)({props:t,slots:r}).mount(e)}(e,t,n,Eo(e))))},e.pure=function(e){return Xa(e),e[ss]=!0,e},e.register=go,e.uninstall=function(e){return Za.has(e),Za.delete(e),Za},e.unmount=function(e,t){return eo(e).map((e=>(e[Ya]&&e[Ya].unmount(t),e)))},e.unregister=function(e){return Qa.has(e),Qa.delete(e),lo.remove(e),Qa},e.version="v7.1.0",e.withTypes=e=>e},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).riot={}); |