@gct-paas/render 0.1.4-dev.11 → 0.1.4-dev.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.esm.min.js +6189 -0
  2. package/dist/index.min.css +2 -0
  3. package/es/Event/Dependency/controller.mjs +81 -94
  4. package/es/Event/Dependency/displayRule.mjs +65 -67
  5. package/es/Event/Dependency/useDependency.mjs +117 -0
  6. package/es/Event/Dependency/useDependencyToShow.mjs +100 -96
  7. package/es/Event/baseEvent.d.ts +8 -7
  8. package/es/Event/baseEvent.mjs +382 -423
  9. package/es/Event/bizServiceRequest.mjs +28 -40
  10. package/es/Event/eventType.d.ts +1 -1
  11. package/es/Event/eventType.mjs +1 -0
  12. package/es/Event/index.d.ts +4 -3
  13. package/es/Event/index.mjs +5 -0
  14. package/es/Event/utils/appRedis.mjs +39 -49
  15. package/es/Event/utils/globalLoading.mjs +95 -94
  16. package/es/Event/utils/processRovedInfo.mjs +228 -294
  17. package/es/Event/utils/runGlobalByPage.mjs +297 -301
  18. package/es/Event/utils/verificationVar.mjs +32 -38
  19. package/es/_virtual/_plugin-vue_export-helper.mjs +8 -0
  20. package/es/_virtual/_rolldown/runtime.mjs +13 -0
  21. package/es/components/HandwritingPad.vue.d.ts +27 -0
  22. package/es/components/HandwritingPad.vue.mjs +7 -0
  23. package/es/components/HandwritingPad.vue_vue_type_script_setup_true_name_HandwritingPad_lang.mjs +109 -0
  24. package/es/components/HandwritingPad.vue_vue_type_style_index_0_scoped_d5b980b7_lang.css +9 -0
  25. package/es/components/index.d.ts +2 -0
  26. package/es/components/index.mjs +1 -0
  27. package/es/enums/index.mjs +17 -5
  28. package/es/hooks/useStorageRef.mjs +35 -31
  29. package/es/index.d.ts +1 -0
  30. package/es/index.mjs +20 -21
  31. package/es/register/render-register/render-register.mjs +63 -58
  32. package/es/utils/cacheAdapter.mjs +62 -54
  33. package/es/utils/expression/index.mjs +105 -122
  34. package/es/utils/expression/regularExpression/methods.mjs +426 -567
  35. package/es/utils/field-attrs/basicAttrs.mjs +56 -80
  36. package/es/utils/field-attrs/index.mjs +16 -13
  37. package/es/utils/get-ref-data.mjs +41 -59
  38. package/es/utils/getFieldSchema.mjs +66 -80
  39. package/es/utils/index.d.ts +2 -2
  40. package/es/utils/index.mjs +6 -0
  41. package/es/utils/model-transformer.mjs +74 -64
  42. package/es/utils/useStyle.mjs +20 -16
  43. package/package.json +10 -10
  44. package/dist/index.esm.min.mjs +0 -7042
  45. package/dist/index.min.cjs +0 -17
  46. package/dist/index.system.min.js +0 -17
@@ -1,17 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("@gct-paas/core"),j=require("lodash-es"),De=require("@gct-paas/schema"),T=require("dayjs"),_=require("bignumber.js"),k=require("vue"),Jt=require("qs");function Xt(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const Yt=Xt(j);class Kt{map=new Map;register(e,t){this.map.set(e,t)}unregister(e){this.map.delete(e)}get(e){return this.map.get(e)}keys(){return Array.from(this.map.keys())}}const Vt={[x.FIELD_TYPE.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[x.FIELD_TYPE.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[x.FIELD_TYPE.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[x.FIELD_TYPE.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[x.FIELD_TYPE.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[x.FIELD_TYPE.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},$t=(i,e)=>{const{attrsTransform:t=[]}=Vt[i]??{};return t.reduce((n,r)=>{const a=j.get(e,r.from);return n[r.to]=a,n},{})};function jt(i){const{style:e={}}=i||{},t="ignoringStyle"in i?i.ignoringStyle??[]:[],s=De.propsToStyle(e),n=De.generateWrapperStyle(e,t),r=De.extractFontStyle(e.labelFont),a=De.extractFontStyle(e.contentFont);return{wrapperStyle:n,wStyle:s,labelFont:r,contentFont:a}}class kt{static modelData=new Map;static FiledData=new Map;static responsePromise=new Map;static silent=!1;static async getMap(e,t=!0){if(!e)return Promise.reject();if(!this.responsePromise.has(e)||!t){const s=(async()=>{const n=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,n);const r=!!n?.fieldMetaList&&n.fieldMetaList.reduce((a,o)=>(o.key&&(a[o.key]=o),a),{});r&&this.FiledData.set(e,r)})();this.responsePromise.set(e,s)}return this.responsePromise.get(e)}static async getConfigByField(e,t,s=!0){return await this.getMap(e,s),this.FiledData.get(e)[t]}static async getConfigByModel(e){return await this.getMap(e),this.modelData.get(e)}static clearCacheMap(e=!1){e&&this.responsePromise.clear(),this.modelData.clear(),this.FiledData.clear()}}async function Gt(i,e=!1){const{modelKey:t,field:s,isCustomField:n,fieldName:r,readonly:a,fieldType:o}=i.props;if(!i.isField&&!e||s==="table_name_")return{};let u;if(n?u={name:r,type:""}:t&&(u=await kt.getConfigByField(t,s)),!n&&(!u||u.type!==o))throw new Error("该字段可能已经被删除");if(!u)return{};const{required:c,specificConfig:l}=u;return i.props.fieldRequired=!!c,c&&!a&&(i.props.required=!0),l?.digits!==void 0&&(i.props.precision=l.digits),u}function bt(i,e){return i?.map(s=>oe(s,e))||[]}function oe(i={},e={}){const t=j.cloneDeep(i);t._X_ROW_KEY=void 0;const s=Object.keys(e??{})?.length?Object.keys(t).reduce((n,r)=>{const a=e[r],o=t[r];if(a&&o)try{const u=(o+"").split(",").map(c=>a[c]);n[r]={[o+""]:u}}catch{}return n},{}):t._DICT||{};return{...t,_DICT:s,_OPCT:t.__FOREIGN__&&typeof t.__FOREIGN__=="object"?oe(t.__FOREIGN__,e):{}}}function Wt(i,e,t){if(typeof e!="object")return;const s=oe(e,t);j.merge(i,s)}function Ht(i,e,t){if(typeof e!="object")return;for(const n in i)n!=="_OPCT"&&n!=="_NOSUBMIT"&&delete i[n];const s=oe(e,t);s._X_ROW_KEY=e._X_ROW_KEY,j.merge(i,s)}function vt(i,e={},t={}){const s=j.cloneDeep(e.__FOREIGN__||e),n={_DICT:{}};return Object.keys(s).forEach(r=>{const a=`${i}.${r}`,o=t[r],u=s[r];if(o&&u)try{const c=(u+"").split(",").map(l=>o[l]);n._DICT[a]={[u+""]:c}}catch{}n[a]=u}),{...s,_OPCT:n}}function qt(i={},e={}){const t=j.cloneDeep(i);return Object.keys(e??{})?.length?Object.keys(t).reduce((s,n)=>{const r=e[n]||{},a=t[n];try{s[n]=(a+"").split(",").map(o=>r[o]).join(",")}catch{s[n]=a}return s},{}):t}function ue(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Se={exports:{}},Qt=Se.exports,Ze;function Zt(){return Ze||(Ze=1,(function(i,e){(function(t,s){i.exports=s()})(Qt,(function(){var t="minute",s=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var u=a.prototype;o.utc=function(m){var w={date:m,utc:!0,args:arguments};return new a(w)},u.utc=function(m){var w=o(this.toDate(),{locale:this.$L,utc:!0});return m?w.add(this.utcOffset(),t):w},u.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var c=u.parse;u.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var l=u.init;u.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else l.call(this)};var p=u.utcOffset;u.utcOffset=function(m,w){var N=this.$utils().u;if(N(m))return this.$u?0:N(this.$offset)?p.call(this):this.$offset;if(typeof m=="string"&&(m=(function(E){E===void 0&&(E="");var g=E.match(s);if(!g)return null;var y=(""+g[0]).match(n)||["-",0,0],C=y[0],I=60*+y[1]+ +y[2];return I===0?0:C==="+"?I:-I})(m),m===null))return this;var M=Math.abs(m)<=16?60*m:m;if(M===0)return this.utc(w);var O=this.clone();if(w)return O.$offset=M,O.$u=!1,O;var J=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(O=this.local().add(M+J,t)).$offset=M,O.$x.$localOffset=J,O};var d=u.format;u.format=function(m){var w=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,w)},u.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var D=u.toDate;u.toDate=function(m){return m==="s"&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():D.call(this)};var F=u.diff;u.diff=function(m,w,N){if(m&&this.$u===m.$u)return F.call(this,m,w,N);var M=this.local(),O=o(m).local();return F.call(M,O,w,N)}}}))})(Se)),Se.exports}var es=Zt();const ts=ue(es);var we={exports:{}},ss=we.exports,et;function is(){return et||(et=1,(function(i,e){(function(t,s){i.exports=s()})(ss,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},s={};return function(n,r,a){var o,u=function(d,D,F){F===void 0&&(F={});var m=new Date(d),w=(function(N,M){M===void 0&&(M={});var O=M.timeZoneName||"short",J=N+"|"+O,E=s[J];return E||(E=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:N,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:O}),s[J]=E),E})(D,F);return w.formatToParts(m)},c=function(d,D){for(var F=u(d,D),m=[],w=0;w<F.length;w+=1){var N=F[w],M=N.type,O=N.value,J=t[M];J>=0&&(m[J]=parseInt(O,10))}var E=m[3],g=E===24?0:E,y=m[0]+"-"+m[1]+"-"+m[2]+" "+g+":"+m[4]+":"+m[5]+":000",C=+d;return(a.utc(y).valueOf()-(C-=C%1e3))/6e4},l=r.prototype;l.tz=function(d,D){d===void 0&&(d=o);var F,m=this.utcOffset(),w=this.toDate(),N=w.toLocaleString("en-US",{timeZone:d}),M=Math.round((w-new Date(N))/1e3/60),O=15*-Math.round(w.getTimezoneOffset()/15)-M;if(!Number(O))F=this.utcOffset(0,D);else if(F=a(N,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(O,!0),D){var J=F.utcOffset();F=F.add(m-J,"minute")}return F.$x.$timezone=d,F},l.offsetName=function(d){var D=this.$x.$timezone||a.tz.guess(),F=u(this.valueOf(),D,{timeZoneName:d}).find((function(m){return m.type.toLowerCase()==="timezonename"}));return F&&F.value};var p=l.startOf;l.startOf=function(d,D){if(!this.$x||!this.$x.$timezone)return p.call(this,d,D);var F=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(F,d,D).tz(this.$x.$timezone,!0)},a.tz=function(d,D,F){var m=F&&D,w=F||D||o,N=c(+a(),w);if(typeof d!="string")return a(d).tz(w);var M=(function(g,y,C){var I=g-60*y*1e3,B=c(I,C);if(y===B)return[I,y];var L=c(I-=60*(B-y)*1e3,C);return B===L?[I,B]:[g-60*Math.min(B,L)*1e3,Math.max(B,L)]})(a.utc(d,m).valueOf(),N,w),O=M[0],J=M[1],E=a(O).utcOffset(J);return E.$x.$timezone=w,E},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(d){o=d}}}))})(we)),we.exports}var ns=is();const rs=ue(ns);var ke={exports:{}},as=ke.exports,tt;function os(){return tt||(tt=1,(function(i,e){(function(t,s){i.exports=s()})(as,(function(){var t="month",s="quarter";return function(n,r){var a=r.prototype;a.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var o=a.add;a.add=function(c,l){return c=Number(c),this.$utils().p(l)===s?this.add(3*c,t):o.bind(this)(c,l)};var u=a.startOf;a.startOf=function(c,l){var p=this.$utils(),d=!!p.u(l)||l;if(p.p(c)===s){var D=this.quarter()-1;return d?this.month(3*D).startOf(t).startOf("day"):this.month(3*D+2).endOf(t).endOf("day")}return u.bind(this)(c,l)}}}))})(ke)),ke.exports}var us=os();const cs=ue(us);var be={exports:{}},ls=be.exports,st;function hs(){return st||(st=1,(function(i,e){(function(t,s){i.exports=s()})(ls,(function(){return function(t,s){s.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}))})(be)),be.exports}var ps=hs();const ds=ue(ps);var ve={exports:{}},fs=ve.exports,it;function ms(){return it||(it=1,(function(i,e){(function(t,s){i.exports=s()})(fs,(function(){var t="day";return function(s,n,r){var a=function(c){return c.add(4-c.isoWeekday(),t)},o=n.prototype;o.isoWeekYear=function(){return a(this).year()},o.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var l,p,d,D,F=a(this),m=(l=this.isoWeekYear(),p=this.$u,d=(p?r.utc:r)().year(l).startOf("year"),D=4-d.isoWeekday(),d.isoWeekday()>4&&(D+=7),d.add(D,t));return F.diff(m,"week")+1},o.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=o.startOf;o.startOf=function(c,l){var p=this.$utils(),d=!!p.u(l)||l;return p.p(c)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,l)}}}))})(ve)),ve.exports}var Ds=ms();const xs=ue(Ds);T.extend(ts);T.extend(rs);T.extend(cs);T.extend(ds);T.extend(xs);function Es(i,e,t){return i?e:t}function gs(i){return i==null||i===""||i===0}function Cs(i){return j.isNull(i)}function ys(i){return j.isUndefined(i)}function As(...i){return(()=>{for(const s of i)if(!s)return!1;return!0})()}function Fs(...i){return i.some(s=>s)}function Ss(i,e){return j.isEqual(i,e)}function ws(i,e){return i!==e}function ks(i,e){return typeof i=="number"&&typeof e=="number"||typeof i=="string"&&typeof e=="string"||i instanceof Date&&e instanceof Date?i<=e:!1}function bs(i,e){return typeof i=="number"&&typeof e=="number"||typeof i=="string"&&typeof e=="string"||i instanceof Date&&e instanceof Date?i<e:!1}function vs(i,e){return typeof i=="number"&&typeof e=="number"||typeof i=="string"&&typeof e=="string"||i instanceof Date&&e instanceof Date?i>=e:!1}function Bs(i,e){return typeof i=="number"&&typeof e=="number"||typeof i=="string"&&typeof e=="string"||i instanceof Date&&e instanceof Date?i>e:!1}function Ts(i){return i?.length||0}function Is(...i){return i.join("")}function Ns(i="",e,t){return(()=>{const r=(e<0?[...i].reverse().join(""):i).slice(Math.abs(e+ +(e<0)),Math.abs(t)+ +(e>=0));return e<0?[...r].reverse().join(""):r})()}function Ps(i="",e,t){return(()=>{const r=(e<0?[...i].reverse().join(""):i).slice(Math.abs(e+ +(e<0)),Math.abs(e+ +(e<0))+Math.abs(t));return e<0?[...r].reverse().join(""):r})()}function Ms(i=""){return i.toUpperCase()}function Os(i=""){return i.toLowerCase()}function Rs(i=""){return i.trim()}function Ls(i=""){return i.replace(/^\s\s*/,"")}function _s(i=""){return i.replace(/\s\s*$/,"")}function Us(i="",e=""){return i.match(new RegExp(e,"g"))?.length||null}function zs(i="",e="",t=""){return i.replace(new RegExp(e,"g"),t)}function Js(i="",e=""){return i.includes(e)}function Xs(i="",e=""){return(()=>{const n=i.match(new RegExp(e,"g"))?.length;return n||0})()}function Ys(i=""){return(()=>{const s=parseFloat(i);return isNaN(s)?null:s})()}function Ks(i="",e=""){return i.split(e)}function Vs(...i){const e=i.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?e.reduce(je,0):""}function $s(...i){return i.flat().reduce(je,0)}function js(i,...e){return e.reduce(Li,i)}function Gs(i,...e){const t=e.flat().filter(r=>r!==""&&r!==null&&r!==void 0);return t.length?t.reduce(Bt,i):""}function Ws(i,...e){return e.reduce(_i,i)}function Hs(i,e){return(()=>{if(e<0)throw new Error("Decimal places should be non-negative.");const n=i.toString().split("."),[r,a=""]=n;if(e==0)return r;let o=a.split("");if(o.length>e)o=o.slice(0,e);else{const u=o.length;for(let c=0;c<e-u;c++)o.push("0")}return`${r}.${o.join("")}`})()}function qs(i,e){return(()=>{if(i===null||i===""||i===void 0)return"";if(e<0)throw new Error("Decimal places should be non-negative.");const n=Math.trunc(e),r=Number(i);if(isNaN(r))return"";const a=r>0?(+(Math.round(+(r+`e${n}`))+`e-${n}`)).toFixed(n):-(+(Math.round(+(-r+`e${n}`))+`e-${n}`)).toFixed(n);return parseFloat(a+"")})()}function Qs(i,e){if(i===null||i===""||i===void 0)return"";if(e<0)throw new Error("Decimal places should be non-negative.");return e=e?parseInt(e+""):0,new _(i).decimalPlaces(e,_.ROUND_UP).toNumber()}function Zs(...i){const e=i.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?Math.max.apply(null,e):""}function ei(i,e){return(()=>{if(e<1||e>i.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return i.sort((r,a)=>a-r)[e-1]})()}function ti(...i){const e=i.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?Math.min.apply(null,e):""}function si(i,e){return(()=>{if(e<1||e>i.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return i.sort((r,a)=>r-a)[e-1]})()}function ii(...i){const e=i.flat().filter(n=>n!==""&&n!==null&&n!==void 0),t=e.length;if(!t)return"";let s=new _(0);for(const n of e)s=s.plus(n);return s.dividedBy(t).toNumber()}function ni(i){return Math.abs.call(null,i)}function ri(i,e){return(()=>{if(i===0)throw new Error("The second value should not be zero.");const n=new _(i).mod(e).toNumber();return isNaN(n)?"":n})()}function Ke(i){if(typeof i=="number")return Number.isFinite(i)?i:null;if(typeof i=="string"){const e=i.trim();if(e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}if(typeof i=="bigint"){const e=Number(i);return Number.isFinite(e)?e:null}return null}function ai(i,e){return(()=>{const n=Ke(i),r=Ke(e);return n===null||r===null?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function oi(i){return(()=>{const s=Ke(i);return s===null?NaN:Math.sqrt(s)})()}function ui(i,e){return(()=>{if(Array.isArray(i)){if(typeof e=="number")return i[e];throw new Error("For arrays, the second argument should be a number.")}else if(typeof i=="object"){if(typeof e=="string")return i[e];throw new Error("For objects, the second argument (b) should be a string.")}else throw new Error("Unsupported data type. The first argument (a) should be an array or an object.")})()}function ci(i,e,t){return(()=>{if(Array.isArray(i))if(typeof e=="number"&&e>=0&&e<i.length)i[e]=t;else throw new Error("For arrays, the second argument (b) should be a number.");else if(typeof i=="object")if(typeof e=="string"&&i)i[e]=t;else throw new Error("For objects, the second argument (b) should be a string.");else throw new Error("Unsupported data type. The first argument (a) should be an array or an object.");return i})()}function li(i,e){return(()=>{if(!e)throw new Error("For arrays, the second argument should not be null or undefined");return i.push(e),i})()}function hi(i,e){return(()=>{if(!e)throw new Error("For arrays, the second argument should not be null or undefined");return i.unshift(e),i})()}function pi(i){return i?(()=>{if(!i)throw new Error("the frist argument should not be null");const s=new Date(i*1e3),n=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),a=String(s.getDate()).padStart(2,"0"),o=String(s.getHours()).padStart(2,"0"),u=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${n}-${r}-${a} ${o}:${u}:${c}`})():void 0}function di(i){return i?T(i).unix():void 0}function fi(i,e){return i?T(i).format(e):void 0}function mi(){return T().format("YYYY-MM-DD HH:MM:ss")}function Di(){return T().format("YYYY-MM-DD")}function xi(i){return T(i).year()}function Ei(i){return T(i).month()}function gi(i){return T(i).day()}function Ci(i){return T(i).hour()}function yi(i){return T(i).minute()}function Ai(){return(()=>{const t=Y(T().startOf("week").toDate()),s=Y(T().endOf("week").toDate());return[t,s]})()}function Fi(){return(()=>{const t=Y(T().subtract(1,"week").startOf("week").toDate()),s=Y(T().subtract(1,"week").endOf("week").toDate());return[t,s]})()}function Si(){return(()=>{const t=Y(T().startOf("month").toDate()),s=Y(T().endOf("month").toDate());return[t,s]})()}function wi(){return(()=>{const t=Y(T().subtract(1,"month").startOf("month").toDate()),s=Y(T().subtract(1,"month").endOf("month").toDate());return[t,s]})()}function ki(){return(()=>{const t=Y(T().startOf("year").toDate()),s=Y(T().endOf("year").toDate());return[t,s]})()}function bi(){return(()=>{const t=Y(T().subtract(1,"year").startOf("year").toDate()),s=Y(T().subtract(1,"year").endOf("year").toDate());return[t,s]})()}function vi(){return(()=>{const t=Math.floor((T().month()+3)/3),s=Y(T().quarter(t).startOf("quarter").toDate()),n=Y(T().quarter(t).endOf("quarter").toDate());return[s,n]})()}function Bi(){return(()=>{const t=Math.floor((T().month()+3)/3),s=Y(T().quarter(t-1).startOf("quarter").toDate()),n=Y(T().quarter(t-1).endOf("quarter").toDate());return[s,n]})()}function Ti(i,e){return(()=>{const[n,r]=e;return i>=n&&i<=r})()}function Ii(i,e){return(()=>{const[n,r]=e,a=T(i,"HH:mm");if(n>r){const o=T(n,"HH:mm"),u=T(r,"HH:mm").add(1,"day");return a>=o||a<=u}else return a>=T(n,"HH:mm")&&a<=T(r,"HH:mm")})()}function Y(i){return T(i).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function Ni(...i){return[...i]}function Pi(...i){const e=(i.length-i.length%2)/2,t={};return Array(e).forEach(s=>{const n=i[s*2],r=i[s*2+1];t[n]=r}),t}function Mi(...i){return i=i.flat().filter(t=>t!==""&&t!==null&&t!==void 0),i.length===0?"":i.map(t=>{const s=Bt(t,t);return s!==""?s:new _(0).toNumber()}).reduce((t,s)=>je(t,s)||_(0).toNumber(),new _(0).toNumber())}function Oi(i){return Array.isArray(i)?i.length:""}function Ri(...i){const e=i.flat().map(n=>Number(n)).filter(n=>Number.isFinite(n));if(e.length<2)return"";const t=e.reduce((n,r)=>n+r,0)/e.length,s=e.reduce((n,r)=>{const a=r-t;return n+a*a},0)/(e.length-1);return Math.sqrt(s)}function je(i,e){const t=new _(i).plus(new _(e)).toNumber();return isNaN(t)?"":t}function Li(i,e){const t=new _(i).minus(new _(e)).toNumber();return isNaN(t)?"":t}function Bt(i,e){const t=new _(i).multipliedBy(new _(e)).toNumber();return isNaN(t)?"":t}function _i(i,e){const t=new _(i).div(new _(e)).toNumber();return isNaN(t)?"":t}const Tt=Object.freeze(Object.defineProperty({__proto__:null,ABS:ni,ADD:$s,AND:As,AVERAGE:ii,CONCAT:Is,COUNT:Oi,DATE2TIMESTAMP:di,DATEFORMAT:fi,DAY:gi,DIVISION:Ws,EQ:Ss,FINDSTR:Js,FIXED:Hs,GE:vs,GET:ui,GT:Bs,HEADPUSH:hi,HOUR:Ci,IF:Es,ISDATERANGE:Ti,ISEMPTY:gs,ISNULL:Cs,ISTIMERANGE:Ii,ISUNDEFINED:ys,LARGE:ei,LASTMONTHRANGE:wi,LASTQUARTER:Bi,LASTWEEKRANGE:Fi,LASTYEARRANGE:bi,LE:ks,LEN:Ts,LOWER:Os,LT:bs,LTRIM:Ls,MAX:Zs,MIN:ti,MINUTE:yi,MOD:ri,MONTH:Ei,MONTHRANGE:Si,MULTIPLICATION:Gs,NE:ws,NOW:mi,OR:Fs,PARSENUMBER:Ys,POWER:ai,PUSH:li,PUT:ci,QUARTER:vi,REDUCE:js,REPEAT:Us,REPLACE:zs,ROUND:qs,ROUNDUP:Qs,RTRIM:_s,SEARCHSTR:Xs,SEQMAP:Pi,SMALL:si,SPLIT:Ks,SQRT:oi,STDEV:Ri,SUBSTR:Ps,SUBSTRING:Ns,SUM:Vs,SUMSQ:Mi,TIMESTAMP2DATE:pi,TODAY:Di,TRIM:Rs,TUPLE:Ni,UPPER:Ms,WEEKRANGE:Ai,YEAR:xi,YEARRANGE:ki},Symbol.toStringTag,{value:"Module"}));var h;(function(i){i.AssignmentExpression="AssignmentExpression",i.AssignmentPattern="AssignmentPattern",i.ArrayExpression="ArrayExpression",i.ArrayPattern="ArrayPattern",i.ArrowFunctionExpression="ArrowFunctionExpression",i.AwaitExpression="AwaitExpression",i.BlockStatement="BlockStatement",i.BinaryExpression="BinaryExpression",i.BreakStatement="BreakStatement",i.CallExpression="CallExpression",i.CatchClause="CatchClause",i.ChainExpression="ChainExpression",i.ClassBody="ClassBody",i.ClassDeclaration="ClassDeclaration",i.ClassExpression="ClassExpression",i.ConditionalExpression="ConditionalExpression",i.ContinueStatement="ContinueStatement",i.Decorator="Decorator",i.DoWhileStatement="DoWhileStatement",i.DebuggerStatement="DebuggerStatement",i.EmptyStatement="EmptyStatement",i.ExportAllDeclaration="ExportAllDeclaration",i.ExportDefaultDeclaration="ExportDefaultDeclaration",i.ExportNamedDeclaration="ExportNamedDeclaration",i.ExportSpecifier="ExportSpecifier",i.ExpressionStatement="ExpressionStatement",i.ForStatement="ForStatement",i.ForOfStatement="ForOfStatement",i.ForInStatement="ForInStatement",i.FunctionDeclaration="FunctionDeclaration",i.FunctionExpression="FunctionExpression",i.Identifier="Identifier",i.IfStatement="IfStatement",i.ImportAttribute="ImportAttribute",i.ImportExpression="ImportExpression",i.ImportDeclaration="ImportDeclaration",i.ImportDefaultSpecifier="ImportDefaultSpecifier",i.ImportNamespaceSpecifier="ImportNamespaceSpecifier",i.ImportSpecifier="ImportSpecifier",i.Literal="Literal",i.LabeledStatement="LabeledStatement",i.LogicalExpression="LogicalExpression",i.MemberExpression="MemberExpression",i.MetaProperty="MetaProperty",i.MethodDefinition="MethodDefinition",i.NewExpression="NewExpression",i.ObjectExpression="ObjectExpression",i.ObjectPattern="ObjectPattern",i.Program="Program",i.Property="Property",i.PrivateIdentifier="PrivateIdentifier",i.RestElement="RestElement",i.ReturnStatement="ReturnStatement",i.SequenceExpression="SequenceExpression",i.SpreadElement="SpreadElement",i.StaticBlock="StaticBlock",i.Super="Super",i.SwitchCase="SwitchCase",i.SwitchStatement="SwitchStatement",i.TaggedTemplateExpression="TaggedTemplateExpression",i.TemplateElement="TemplateElement",i.TemplateLiteral="TemplateLiteral",i.ThisExpression="ThisExpression",i.ThrowStatement="ThrowStatement",i.TryStatement="TryStatement",i.UnaryExpression="UnaryExpression",i.UpdateExpression="UpdateExpression",i.VariableDeclaration="VariableDeclaration",i.VariableDeclarator="VariableDeclarator",i.WhileStatement="WhileStatement",i.WithStatement="WithStatement",i.YieldExpression="YieldExpression"})(h||(h={}));class Ui{constructor(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}insertInnerComments(e,t){if(e.type===h.BlockStatement&&e.body.length===0){const s=[];for(let n=this.leading.length-1;n>=0;--n){const r=this.leading[n];t.end.offset>=r.start&&(s.unshift(r.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}s.length&&(e.innerComments=s)}}findTrailingComments(e){let t=[];if(this.trailing.length>0){for(let n=this.trailing.length-1;n>=0;--n){const r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}const s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){const n=s.node.trailingComments[0];n&&n.range[0]>=e.end.offset&&(t=s.node.trailingComments,delete s.node.trailingComments)}return t}findLeadingComments(e){const t=[];let s;for(;this.stack.length>0;){const n=this.stack[this.stack.length-1];if(n&&n.start>=e.start.offset)s=n.node,this.stack.pop();else break}if(s){const n=s.leadingComments?s.leadingComments.length:0;for(let r=n-1;r>=0;--r){const a=s.leadingComments[r];a.range[1]<=e.start.offset&&(t.unshift(a),s.leadingComments.splice(r,1))}return s.leadingComments&&s.leadingComments.length===0&&delete s.leadingComments,t}for(let n=this.leading.length-1;n>=0;--n){const r=this.leading[n];r.start<=e.start.offset&&(t.unshift(r.comment),this.leading.splice(n,1))}return t}visitNode(e,t){if(e.type===h.Program&&e.body.length>0)return;this.insertInnerComments(e,t);const s=this.findTrailingComments(t),n=this.findLeadingComments(t);n.length>0&&(e.leadingComments=n),s.length>0&&(e.trailingComments=s),this.stack.push({node:e,start:t.start.offset})}visitComment(e,t){const s=e.type[0]==="L"?"Line":"Block",n={type:s,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){const r={comment:{type:s,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=s,this.leading.push(r),this.trailing.push(r)}}visit(e,t){e.type==="LineComment"?this.visitComment(e,t):e.type==="BlockComment"?this.visitComment(e,t):this.attach&&this.visitNode(e,t)}}const nt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDEC0-\uDEEB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7C6\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB67\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD46\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E\uDC5F\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},S={fromCodePoint(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isStringWellFormedUnicode(i){for(let e=0;e<i.length;e++){let t=i.charCodeAt(e);if(t>=55296&&t<=56319){if(e===i.length-1||(e++,t=i.charCodeAt(e),t<56320&&t>57343))return!1}else if(t>=56320&&t<=57343)return!1}return!0},isWhiteSpace(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&nt.NonAsciiIdentifierStart.test(S.fromCodePoint(i))},isIdentifierPart(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&nt.NonAsciiIdentifierPart.test(S.fromCodePoint(i))},isDecimalDigit(i){return i>=48&&i<=57},isDecimalDigitChar(i){return i.length===1&&S.isDecimalDigit(i.charCodeAt(0))},isHexDigit(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isHexDigitChar(i){return i.length===1&&S.isHexDigit(i.charCodeAt(0))},isOctalDigit(i){return i>=48&&i<=55},isOctalDigitChar(i){return i.length===1&&S.isOctalDigit(i.charCodeAt(0))}};var U;(function(i){i.JSXAttribute="JSXAttribute",i.JSXClosingElement="JSXClosingElement",i.JSXClosingFragment="JSXClosingFragment",i.JSXElement="JSXElement",i.JSXEmptyExpression="JSXEmptyExpression",i.JSXExpressionContainer="JSXExpressionContainer",i.JSXIdentifier="JSXIdentifier",i.JSXMemberExpression="JSXMemberExpression",i.JSXNamespacedName="JSXNamespacedName",i.JSXOpeningElement="JSXOpeningElement",i.JSXOpeningFragment="JSXOpeningFragment",i.JSXSpreadAttribute="JSXSpreadAttribute",i.JSXText="JSXText"})(U||(U={}));class zi{constructor(e){this.type=U.JSXClosingElement,this.name=e}}class Ji{constructor(){this.type=U.JSXClosingFragment}}class Pe{constructor(e,t,s){this.type=U.JSXElement,this.openingElement=e,this.children=t,this.closingElement=s}}class Xi{constructor(){this.type=U.JSXEmptyExpression}}class rt{constructor(e){this.type=U.JSXExpressionContainer,this.expression=e}}class Yi{constructor(e){this.type=U.JSXIdentifier,this.name=e}}class Ki{constructor(e,t){this.type=U.JSXMemberExpression,this.object=e,this.property=t}}class Vi{constructor(e,t){this.type=U.JSXAttribute,this.name=e,this.value=t}}class at{constructor(e,t){this.type=U.JSXNamespacedName,this.namespace=e,this.name=t}}class ot{constructor(e,t,s){this.type=U.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=s}}class $i{constructor(e){this.type=U.JSXOpeningFragment,this.selfClosing=e}}class ji{constructor(e){this.type=U.JSXSpreadAttribute,this.argument=e}}class Gi{constructor(e,t){this.type=U.JSXText,this.value=e,this.raw=t}}class Wi{constructor(e){this.type=h.ArrayExpression,this.elements=e}}class Hi{constructor(e){this.type=h.ArrayPattern,this.elements=e}}class qi{constructor(e,t,s,n){this.type=h.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=s,this.async=n}}class Qi{constructor(e,t,s){this.type=h.AssignmentExpression,this.operator=e,this.left=t,this.right=s}}class Me{constructor(e,t){this.type=h.AssignmentPattern,this.left=e,this.right=t}}class Zi{constructor(e,t,s,n){this.type=h.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=n,this.expression=!1,this.async=!0}}class en{constructor(e){this.type=h.AwaitExpression,this.argument=e}}class ut{constructor(e,t,s){this.type=h.Literal,this.value=e,this.raw=t,this.bigint=s}}class Oe{constructor(e,t,s){this.type=h.BinaryExpression,this.operator=e,this.left=t,this.right=s}}class ct{constructor(e){this.type=h.BlockStatement,this.body=e}}class tn{constructor(e){this.type=h.BreakStatement,this.label=e}}class sn{constructor(e,t,s){this.type=h.CallExpression,this.callee=e,this.arguments=t,this.optional=s}}class nn{constructor(e,t){this.type=h.CatchClause,this.param=e,this.body=t}}class lt{constructor(e){this.type=h.ChainExpression,this.expression=e}}class rn{constructor(e){this.type=h.ClassBody,this.body=e}}class an{constructor(e,t,s,n){this.type=h.ClassDeclaration,this.id=e,this.superClass=t,this.body=s,this.decorators=n}}class on{constructor(e,t,s,n){this.type=h.ClassExpression,this.id=e,this.superClass=t,this.body=s,this.decorators=n}}class un{constructor(e,t,s){this.type=h.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=s}}class cn{constructor(e){this.type=h.ContinueStatement,this.label=e}}class ln{constructor(){this.type=h.DebuggerStatement}}class hn{constructor(e){this.type=h.Decorator,this.expression=e}}class pn{constructor(e,t){this.type=h.ExpressionStatement,this.expression=e,this.directive=t}}class dn{constructor(e,t){this.type=h.DoWhileStatement,this.body=e,this.test=t}}class he{constructor(){this.type=h.EmptyStatement}}class fn{constructor(e,t,s){this.type=h.ExportAllDeclaration,this.source=e,this.exported=t,this.assertions=s}}class xe{constructor(e){this.type=h.ExportDefaultDeclaration,this.declaration=e}}class Re{constructor(e,t,s,n){this.type=h.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=s,this.assertions=n}}class mn{constructor(e,t){this.type=h.ExportSpecifier,this.exported=t,this.local=e}}class Le{constructor(e){this.type=h.ExpressionStatement,this.expression=e}}class Dn{constructor(e,t,s){this.type=h.ForInStatement,this.left=e,this.right=t,this.body=s,this.each=!1}}class xn{constructor(e,t,s,n){this.type=h.ForOfStatement,this.await=n,this.left=e,this.right=t,this.body=s}}class En{constructor(e,t,s,n){this.type=h.ForStatement,this.init=e,this.test=t,this.update=s,this.body=n}}class gn{constructor(e,t,s,n){this.type=h.FunctionDeclaration,this.id=e,this.params=t,this.body=s,this.generator=n,this.expression=!1,this.async=!1}}class se{constructor(e,t,s,n,r){this.type=h.FunctionExpression,this.id=e,this.params=t,this.body=s,this.generator=n,this.expression=!1,this.async=r}}class G{constructor(e){this.type=h.Identifier,this.name=e}}class Cn{constructor(e,t,s){this.type=h.IfStatement,this.test=e,this.consequent=t,this.alternate=s}}class yn{constructor(e,t){this.type=h.ImportAttribute,this.key=e,this.value=t}}class An{constructor(e,t){this.type=h.ImportExpression,this.source=e,this.attributes=t}}class Fn{constructor(e,t,s){this.type=h.ImportDeclaration,this.specifiers=e,this.source=t,this.assertions=s}}class Sn{constructor(e){this.type=h.ImportDefaultSpecifier,this.local=e}}class wn{constructor(e){this.type=h.ImportNamespaceSpecifier,this.local=e}}class kn{constructor(e,t){this.type=h.ImportSpecifier,this.local=e,this.imported=t}}class bn{constructor(e,t){this.type=h.LabeledStatement,this.label=e,this.body=t}}class ee{constructor(e,t){this.type=h.Literal,this.value=e,this.raw=t}}class ht{constructor(e,t,s){this.type=h.LogicalExpression,this.operator=e,this.left=t,this.right=s}}class Ee{constructor(e,t,s,n){this.type=h.MemberExpression,this.computed=e,this.object=t,this.property=s,this.optional=n}}class pt{constructor(e,t){this.type=h.MetaProperty,this.meta=e,this.property=t}}class vn{constructor(e,t,s,n,r,a){this.type=h.MethodDefinition,this.key=e,this.computed=t,this.value=s,this.kind=n,this.static=r,this.decorators=a}}class Bn{constructor(e){this.type=h.Program,this.body=e,this.sourceType="module"}}class Tn{constructor(e,t){this.type=h.NewExpression,this.callee=e,this.arguments=t}}class In{constructor(e){this.type=h.ObjectExpression,this.properties=e}}class Nn{constructor(e){this.type=h.ObjectPattern,this.properties=e}}class ge{constructor(e){this.type=h.PrivateIdentifier,this.name=e}}class dt{constructor(e,t,s,n,r,a){this.type=h.Property,this.key=t,this.computed=s,this.value=n,this.kind=e,this.method=r,this.shorthand=a}}class Pn{constructor(e,t,s,n,r){this.type=h.Property,this.key=e,this.computed=t,this.value=s,this.static=n,this.decorators=r}}class Mn{constructor(e,t,s,n){this.type=h.Literal,this.value=e,this.raw=t,this.regex={pattern:s,flags:n}}}class Ce{constructor(e){this.type=h.RestElement,this.argument=e}}class On{constructor(e){this.type=h.ReturnStatement,this.argument=e}}class Rn{constructor(e){this.type=h.Program,this.body=e,this.sourceType="script"}}class _e{constructor(e){this.type=h.SequenceExpression,this.expressions=e}}class Ln{constructor(e){this.type=h.SpreadElement,this.argument=e}}class _n{constructor(e){this.type=h.StaticBlock,this.body=e}}class ft{constructor(){this.type=h.Super}}class Un{constructor(e,t){this.type=h.SwitchCase,this.test=e,this.consequent=t}}class zn{constructor(e,t){this.type=h.SwitchStatement,this.discriminant=e,this.cases=t}}class mt{constructor(e,t){this.type=h.TaggedTemplateExpression,this.tag=e,this.quasi=t}}class Dt{constructor(e,t){this.type=h.TemplateElement,this.value=e,this.tail=t}}class Jn{constructor(e,t){this.type=h.TemplateLiteral,this.quasis=e,this.expressions=t}}class Xn{constructor(){this.type=h.ThisExpression}}class Yn{constructor(e){this.type=h.ThrowStatement,this.argument=e}}class Kn{constructor(e,t,s){this.type=h.TryStatement,this.block=e,this.handler=t,this.finalizer=s}}class Vn{constructor(e,t){this.type=h.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}class xt{constructor(e,t,s){this.type=h.UpdateExpression,this.operator=e,this.argument=t,this.prefix=s}}class Z{constructor(e,t){this.type=h.VariableDeclaration,this.declarations=e,this.kind=t}}class Et{constructor(e,t){this.type=h.VariableDeclarator,this.id=e,this.init=t}}class $n{constructor(e,t){this.type=h.WhileStatement,this.test=e,this.body=t}}class jn{constructor(e,t){this.type=h.WithStatement,this.object=e,this.body=t}}class Gn{constructor(e,t){this.type=h.YieldExpression,this.argument=e,this.delegate=t}}function Q(i,e){if(!i)throw new Error("ASSERT: "+e)}class Wn{constructor(){this.errors=[],this.tolerant=!1}recordError(e){this.errors.push(e)}tolerate(e){if(this.tolerant)this.recordError(e);else throw e}constructError(e,t){let s=new Error(e);try{throw s}catch(n){Object.create&&Object.defineProperty&&(s=Object.create(n),Object.defineProperty(s,"column",{value:t}))}return s}createError(e,t,s,n){const r="Line "+t+": "+n,a=this.constructError(r,s);return a.index=e,a.lineNumber=t,a.description=n,a}throwError(e,t,s,n){throw this.createError(e,t,s,n)}tolerateError(e,t,s,n){const r=this.createError(e,t,s,n);if(this.tolerant)this.recordError(r);else throw r}}const f={AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",BadImportCallArity:"Unexpected token",BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",CannotUseImportMetaOutsideAModule:"Cannot use 'import.meta' outside a module",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorIsPrivate:"Class constructor may not be a private method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DefaultRestProperty:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateParameter:"Duplicate parameter name not allowed in this context",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",InvalidTaggedTemplateOnOptionalChain:"Invalid tagged template on optional chain",InvalidUnicodeEscapeSequence:"Invalid Unicode escape sequence",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoAsAndFromEscapeSequences:"The `as` and `from` contextual keywords must not contain Unicode escape sequences.",NoCatchOrFinally:"Missing catch or finally after try",NoSemicolonAfterDecorator:"Decorators must not be followed by a semicolon.",NumericSeperatorOneUnderscore:"Numeric separator must be exactly one underscore",NumericSeperatorNotAllowedHere:"Numeric separator is not allowed here",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",PropertyAfterRestProperty:"Unexpected token",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",TemplateEscape89:"\\8 and \\9 are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedSuper:"'super' keyword unexpected here",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"};function gt(i){return"0123456789abcdef".indexOf(i.toLowerCase())}function Ue(i){return"01234567".indexOf(i)}class Hn{constructor(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}saveState(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}}restoreState(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart,this.curlyStack=e.curlyStack}eof(){return this.index>=this.length}throwUnexpectedToken(e=f.UnexpectedTokenIllegal){return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}tolerateUnexpectedToken(e=f.UnexpectedTokenIllegal){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}skipSingleLineComment(e){let t=[],s,n;for(this.trackComment&&(t=[],s=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){const r=this.source.charCodeAt(this.index);if(++this.index,S.isLineTerminator(r)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};const a={multiLine:!1,slice:[s+e,this.index-1],range:[s,this.index-1],loc:n};t.push(a)}return r===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};const r={multiLine:!1,slice:[s+e,this.index],range:[s,this.index],loc:n};t.push(r)}return t}skipMultiLineComment(){let e=[],t,s;for(this.trackComment&&(e=[],t=this.index-2,s={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){const n=this.source.charCodeAt(this.index);if(S.isLineTerminator(n))n===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(n===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};const r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:s};e.push(r)}return e}++this.index}else++this.index}if(this.trackComment){s.end={line:this.lineNumber,column:this.index-this.lineStart};const n={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:s};e.push(n)}return this.tolerateUnexpectedToken(),e}scanComments(){let e;this.trackComment&&(e=[]);let t=this.index===0;for(;!this.eof();){let s=this.source.charCodeAt(this.index);if(S.isWhiteSpace(s))++this.index;else if(S.isLineTerminator(s))++this.index,s===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(s===47)if(s=this.source.charCodeAt(this.index+1),s===47){this.index+=2;const n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else if(s===42){this.index+=2;const n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else break;else if(t&&s===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;const n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else break;else if(s===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;const n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}else break;else break}return e}isFutureReservedWord(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}}isStrictModeReservedWord(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}isRestrictedWord(e){return e==="eval"||e==="arguments"}isKeyword(e){switch(e.length){case 2:return e==="if"||e==="in"||e==="do";case 3:return e==="var"||e==="for"||e==="new"||e==="try"||e==="let";case 4:return e==="this"||e==="else"||e==="case"||e==="void"||e==="with"||e==="enum";case 5:return e==="while"||e==="break"||e==="catch"||e==="throw"||e==="const"||e==="yield"||e==="class"||e==="super";case 6:return e==="return"||e==="typeof"||e==="delete"||e==="switch"||e==="export"||e==="import";case 7:return e==="default"||e==="finally"||e==="extends";case 8:return e==="function"||e==="continue"||e==="debugger";case 10:return e==="instanceof";default:return!1}}codePointAt(e){let t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){const s=this.source.charCodeAt(e+1);s>=56320&&s<=57343&&(t=(t-55296)*1024+s-56320+65536)}return t}scanHexEscape(e){const t=e==="u"?4:2;let s=0;for(let n=0;n<t;++n)if(!this.eof()&&S.isHexDigit(this.source.charCodeAt(this.index)))s=s*16+gt(this.source[this.index++]);else return null;return String.fromCharCode(s)}tryToScanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;if(e==="}")return null;for(;!this.eof()&&(e=this.source[this.index++],!!S.isHexDigit(e.charCodeAt(0)));)t=t*16+gt(e);return t>1114111||e!=="}"?null:S.fromCodePoint(t)}scanUnicodeCodePointEscape(){const e=this.tryToScanUnicodeCodePointEscape();return e===null?this.throwUnexpectedToken():e}getIdentifier(){const e=this.index++;for(;!this.eof();){const t=this.source.charCodeAt(this.index);if(t===92)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(S.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)}getComplexIdentifier(){let e=this.codePointAt(this.index),t=S.fromCodePoint(e);this.index+=t.length;let s;for(e===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,s=this.scanUnicodeCodePointEscape()):(s=this.scanHexEscape("u"),(s===null||s==="\\"||!S.isIdentifierStart(s.charCodeAt(0)))&&this.throwUnexpectedToken()),t=s);!this.eof()&&(e=this.codePointAt(this.index),!!S.isIdentifierPart(e));)s=S.fromCodePoint(e),t+=s,this.index+=s.length,e===92&&(t=t.substr(0,t.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,s=this.scanUnicodeCodePointEscape()):(s=this.scanHexEscape("u"),(s===null||s==="\\"||!S.isIdentifierPart(s.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=s);return t}octalToDecimal(e){let t=e!=="0",s=Ue(e);return!this.eof()&&S.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,s=s*8+Ue(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&S.isOctalDigit(this.source.charCodeAt(this.index))&&(s=s*8+Ue(this.source[this.index++]))),{code:s,octal:t}}scanIdentifier(){let e;const t=this.index,s=this.source.charCodeAt(t)===92,n=s?this.getComplexIdentifier():this.getIdentifier();if(n.length===1?e=3:this.isKeyword(n)?e=4:n==="null"?e=5:n==="true"||n==="false"?e=1:e=3,e!==3&&t+n.length!==this.index){const r=this.index;this.index=t,this.tolerateUnexpectedToken(f.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index,escaped:s}}scanPunctuator(){const e=this.index;let t=this.source[this.index];switch(t){case"(":case"{":t==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case"?":++this.index,this.source[this.index]==="?"&&(++this.index,this.source[this.index]==="="?(++this.index,t="??="):t="??"),this.source[this.index]==="."&&!/^\d$/.test(this.source[this.index+1])&&(++this.index,t="?.");break;case"#":case")":case";":case",":case"[":case"]":case":":case"~":case"@":++this.index;break;default:t=this.source.substr(this.index,4),t===">>>="?this.index+=4:(t=t.substr(0,3),t==="==="||t==="!=="||t===">>>"||t==="<<="||t===">>="||t==="**="||t==="&&="||t==="||="?this.index+=3:(t=t.substr(0,2),t==="&&"||t==="||"||t==="=="||t==="!="||t==="+="||t==="-="||t==="*="||t==="/="||t==="++"||t==="--"||t==="<<"||t===">>"||t==="&="||t==="|="||t==="^="||t==="%="||t==="<="||t===">="||t==="=>"||t==="**"?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanHexLiteral(e){let t=this.scanLiteralPart(S.isHexDigitChar);return t.length===0&&this.throwUnexpectedToken(),this.source[this.index]==="n"?(this.index++,{type:6,value:BigInt("0x"+t),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(S.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanBinaryLiteral(e){let t,s=this.scanLiteralPart(n=>n==="0"||n==="1");return s.length===0&&this.throwUnexpectedToken(),this.source[this.index]==="n"?(this.index++,{type:6,value:BigInt("0b"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(this.eof()||(t=this.source.charCodeAt(this.index),(S.isIdentifierStart(t)||S.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(s,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanOctalLiteral(e,t){let s="",n=!1;return S.isOctalDigit(e.charCodeAt(0))?(n=!0,s="0"+this.source[this.index++]):++this.index,s+=this.scanLiteralPart(S.isOctalDigitChar),!n&&s.length===0&&this.throwUnexpectedToken(),this.source[this.index]==="n"?(this.index++,{type:6,value:BigInt("0o"+s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}):((S.isIdentifierStart(this.source.charCodeAt(this.index))||S.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(s,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index})}isImplicitOctalLiteral(){for(let e=this.index+1;e<this.length;++e){const t=this.source[e];if(t==="8"||t==="9"||t==="n")return!1;if(!S.isOctalDigit(t.charCodeAt(0)))return!0}return!0}scanLiteralPart(e){let t="";for(this.source[this.index]==="_"&&this.throwUnexpectedToken(f.NumericSeperatorNotAllowedHere);this.source[this.index]&&(e(this.source[this.index])||this.source[this.index]==="_");)this.source[this.index]!=="_"&&(t+=this.source[this.index]),this.index++,this.source[this.index-1]==="_"&&this.source[this.index]==="_"&&this.throwUnexpectedToken(f.NumericSeperatorOneUnderscore);return this.source[this.index-1]==="_"&&this.throwUnexpectedToken(f.NumericSeperatorNotAllowedHere),t}scanNumericLiteral(){const e=this.index;let t=this.source[e];Q(S.isDecimalDigit(t.charCodeAt(0))||t===".","Numeric literal must start with a decimal digit or a decimal point");let s="";if(t!=="."){if(s=this.source[this.index++],t=this.source[this.index],s==="0"){if(t==="x"||t==="X")return++this.index,this.scanHexLiteral(e);if(t==="b"||t==="B")return++this.index,this.scanBinaryLiteral(e);if(t==="o"||t==="O")return this.scanOctalLiteral(t,e);if(t&&S.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}this.index--,s=this.scanLiteralPart(S.isDecimalDigitChar),t=this.source[this.index]}if(t==="."&&(s+=this.source[this.index++],s+=this.scanLiteralPart(S.isDecimalDigitChar),t=this.source[this.index]),t==="e"||t==="E")s+=this.source[this.index++],t=this.source[this.index],(t==="+"||t==="-")&&(s+=this.source[this.index++]),S.isDecimalDigit(this.source.charCodeAt(this.index))?s+=this.scanLiteralPart(S.isDecimalDigitChar):this.throwUnexpectedToken();else if(t==="n")return s.length>1&&s[0]==="0"&&this.throwUnexpectedToken(),this.index++,{type:6,value:BigInt(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index};return S.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(s),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){const e=this.index;let t=this.source[e];Q(t==="'"||t==='"',"String literal must starts with a quote"),++this.index;let s=!1,n="";for(;!this.eof();){let r=this.source[this.index++];if(r===t){t="";break}else if(r==="\\")if(r=this.source[this.index++],!r||!S.isLineTerminator(r.charCodeAt(0)))switch(r){case"u":if(this.source[this.index]==="{")++this.index,n+=this.scanUnicodeCodePointEscape();else{const o=this.scanHexEscape(r);o===null&&this.throwUnexpectedToken(),n+=o}break;case"x":const a=this.scanHexEscape(r);a===null&&this.throwUnexpectedToken(f.InvalidHexEscapeSequence),n+=a;break;case"n":n+=`
2
- `;break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;case"8":case"9":n+=r,this.tolerateUnexpectedToken();break;default:if(r&&S.isOctalDigit(r.charCodeAt(0))){const o=this.octalToDecimal(r);s=o.octal||s,n+=String.fromCharCode(o.code)}else n+=r;break}else++this.lineNumber,r==="\r"&&this.source[this.index]===`
3
- `&&++this.index,this.lineStart=this.index;else{if(S.isLineTerminator(r.charCodeAt(0)))break;n+=r}}return t!==""&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:n,octal:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1;const s=this.index,n=this.source[s]==="`";let r=!1,a=null,o=2;for(++this.index;!this.eof();){let u=this.source[this.index++];if(u==="`"){o=1,r=!0,t=!0;break}else if(u==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,t=!0;break}e+=u}else{if(a!==null)continue;if(u==="\\")if(u=this.source[this.index++],S.isLineTerminator(u.charCodeAt(0)))++this.lineNumber,u==="\r"&&this.source[this.index]===`
4
- `&&++this.index,this.lineStart=this.index;else switch(u){case"n":e+=`
5
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"u":if(this.source[this.index]==="{"){++this.index;const l=this.tryToScanUnicodeCodePointEscape();l===null?a="u":e+=l}else{const l=this.scanHexEscape(u);l===null?a="u":e+=l}break;case"x":const c=this.scanHexEscape(u);c===null?a="x":e+=c;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:u==="0"?S.isDecimalDigit(this.source.charCodeAt(this.index))?a="0":e+="\0":S.isDecimalDigitChar(u)?a=u:e+=u;break}else S.isLineTerminator(u.charCodeAt(0))?(++this.lineNumber,u==="\r"&&this.source[this.index]===`
6
- `&&++this.index,this.lineStart=this.index,e+=`
7
- `):e+=u}}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:10,value:this.source.slice(s+1,this.index-o),cooked:a===null?e:null,head:n,tail:r,notEscapeSequenceHead:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:s,end:this.index}}testRegExp(e,t){let n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(r,a,o)=>{const u=parseInt(a||o,16);return u>1114111&&this.throwUnexpectedToken(f.InvalidRegExp),u<=65535?String.fromCharCode(u):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch{this.throwUnexpectedToken(f.InvalidRegExp)}try{return new RegExp(e,t)}catch{return null}}scanRegExpBody(){let e=this.source[this.index];Q(e==="/","Regular expression literal must start with a slash");let t=this.source[this.index++],s=!1,n=!1;for(;!this.eof();)if(e=this.source[this.index++],t+=e,e==="\\")e=this.source[this.index++],S.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(f.UnterminatedRegExp),t+=e;else if(S.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(f.UnterminatedRegExp);else if(s)e==="]"&&(s=!1);else if(e==="/"){n=!0;break}else e==="["&&(s=!0);return n||this.throwUnexpectedToken(f.UnterminatedRegExp),t.substr(1,t.length-2)}scanRegExpFlags(){let e="",t="";for(;!this.eof();){let s=this.source[this.index];if(!S.isIdentifierPart(s.charCodeAt(0)))break;if(++this.index,s==="\\"&&!this.eof())if(s=this.source[this.index],s==="u"){++this.index;let n=this.index;const r=this.scanHexEscape("u");if(r!==null)for(t+=r,e+="\\u";n<this.index;++n)e+=this.source[n];else this.index=n,t+="u",e+="\\u";this.tolerateUnexpectedToken()}else e+="\\",this.tolerateUnexpectedToken();else t+=s,e+=s}return t}scanRegExp(){const e=this.index,t=this.scanRegExpBody(),s=this.scanRegExpFlags(),n=this.testRegExp(t,s);return{type:9,value:"",pattern:t,flags:s,regex:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}lex(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};const e=this.source.charCodeAt(this.index);return S.isIdentifierStart(e)?this.scanIdentifier():e===40||e===41||e===59?this.scanPunctuator():e===39||e===34?this.scanStringLiteral():e===46?S.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():S.isDecimalDigit(e)?this.scanNumericLiteral():e===96||e===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():e>=55296&&e<57343&&S.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}}const V={};V[1]="Boolean";V[2]="<end>";V[3]="Identifier";V[4]="Keyword";V[5]="Null";V[6]="Numeric";V[7]="Punctuator";V[8]="String";V[9]="RegularExpression";V[10]="Template";const W="ArrowParameterPlaceHolder";class It{constructor(e,t={},s){this.config={range:typeof t.range=="boolean"&&t.range,loc:typeof t.loc=="boolean"&&t.loc,source:null,tokens:typeof t.tokens=="boolean"&&t.tokens,comment:typeof t.comment=="boolean"&&t.comment,tolerant:typeof t.tolerant=="boolean"&&t.tolerant},this.config.loc&&t.source&&t.source!==null&&(this.config.source=String(t.source)),this.delegate=s,this.errorHandler=new Wn,this.errorHandler.tolerant=this.config.tolerant==!0,this.scanner=new Hn(e,this.errorHandler),this.scanner.trackComment=this.config.comment==!0,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"??":5,"||":6,"&&":7,"|":8,"^":9,"&":10,"==":11,"!=":11,"===":11,"!==":11,"<":12,">":12,"<=":12,">=":12,"<<":13,">>":13,">>>":13,"+":14,"-":14,"*":15,"/":15,"%":15},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,isAsync:!1,allowIn:!0,allowStrictDirective:!0,allowSuper:!1,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inConstructor:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,inClassConstructor:!1,labelSet:{},strict:!1,decorators:null},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}throwError(e,...t){const s=t.slice(),n=e.replace(/%(\d)/g,(u,c)=>(Q(c<s.length,"Message reference must be in range"),s[c])),r=this.lastMarker.index,a=this.lastMarker.line,o=this.lastMarker.column+1;throw this.errorHandler.createError(r,a,o,n)}tolerateError(e,...t){const s=t.slice(),n=e.replace(/%(\d)/g,(u,c)=>(Q(c<s.length,"Message reference must be in range"),s[c])),r=this.lastMarker.index,a=this.scanner.lineNumber,o=this.lastMarker.column+1;this.errorHandler.tolerateError(r,a,o,n)}unexpectedTokenError(e,t){let s=t||f.UnexpectedToken,n;if(e?(t||(s=e.type===2?f.UnexpectedEOS:e.type===3?f.UnexpectedIdentifier:e.type===6?f.UnexpectedNumber:e.type===8?f.UnexpectedString:e.type===10?f.UnexpectedTemplate:f.UnexpectedToken,e.type===4&&(this.scanner.isFutureReservedWord(e.value)?s=f.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(s=f.StrictReservedWord))),n=e.value):n="ILLEGAL",s=s.replace("%0",n),e&&typeof e.lineNumber=="number"){const r=e.start,a=e.lineNumber,o=this.lastMarker.index-this.lastMarker.column,u=e.start-o+1;return this.errorHandler.createError(r,a,u,s)}else{const r=this.lastMarker.index,a=this.lastMarker.line,o=this.lastMarker.column+1;return this.errorHandler.createError(r,a,o,s)}}throwUnexpectedToken(e,t){throw this.unexpectedTokenError(e,t)}tolerateUnexpectedToken(e,t){this.errorHandler.tolerate(this.unexpectedTokenError(e,t))}tolerateInvalidLoopStatement(){(this.matchKeyword("class")||this.matchKeyword("function"))&&this.tolerateError(f.UnexpectedToken,this.lookahead)}collectComments(){if(!this.config.comment)this.scanner.scanComments();else{const e=this.scanner.scanComments();if(e.length>0&&this.delegate)for(let t=0;t<e.length;++t){const s=e[t],n={type:s.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(s.slice[0],s.slice[1])};this.config.range&&(n.range=s.range),this.config.loc&&(n.loc=s.loc);const r={start:{line:s.loc.start.line,column:s.loc.start.column,offset:s.range[0]},end:{line:s.loc.end.line,column:s.loc.end.column,offset:s.range[1]}};this.delegate(n,r)}}}getTokenRaw(e){return this.scanner.source.slice(e.start,e.end)}convertToken(e){const t={type:V[e.type],value:this.getTokenRaw(e)};if(this.config.range&&(t.range=[e.start,e.end]),this.config.loc&&(t.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),e.type===9){const s=e.pattern,n=e.flags;t.regex={pattern:s,flags:n}}return t}nextToken(){const e=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);const t=this.scanner.lex();return this.hasLineTerminator=e.lineNumber!==t.lineNumber,t&&this.context.strict&&t.type===3&&this.scanner.isStrictModeReservedWord(t.value)&&(t.type=4),this.lookahead=t,this.config.tokens&&t.type!==2&&this.tokens.push(this.convertToken(t)),e}nextRegexToken(){this.collectComments();const e=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(e))),this.lookahead=e,this.nextToken(),e}createNode(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}}startNode(e,t=0){let s=e.start-e.lineStart,n=e.lineNumber;return s<0&&(s+=t,n--),{index:e.start,line:n,column:s}}finalize(e,t){if(this.config.range&&(t.range=[e.index,this.lastMarker.index]),this.config.loc&&(t.loc={start:{line:e.line,column:e.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(t.loc.source=this.config.source)),this.delegate){const s={start:{line:e.line,column:e.column,offset:e.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(t,s)}return t}expect(e){const t=this.nextToken();(t.type!==7||t.value!==e)&&this.throwUnexpectedToken(t)}expectCommaSeparator(){if(this.config.tolerant){const e=this.lookahead;e.type===7&&e.value===","?this.nextToken():e.type===7&&e.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(e)):this.tolerateUnexpectedToken(e,f.UnexpectedToken)}else this.expect(",")}expectKeyword(e){const t=this.nextToken();(t.type!==4||t.value!==e)&&this.throwUnexpectedToken(t)}match(e){return this.lookahead.type===7&&this.lookahead.value===e}matchKeyword(e){return this.lookahead.type===4&&this.lookahead.value===e}matchContextualKeyword(e){return this.lookahead.type===3&&this.lookahead.value===e}matchAssign(){if(this.lookahead.type!==7)return!1;const e=this.lookahead.value;return e==="="||e==="*="||e==="**="||e==="/="||e==="%="||e==="+="||e==="-="||e==="<<="||e===">>="||e===">>>="||e==="&="||e==="^="||e==="|="||e==="&&="||e==="||="||e==="??="}isolateCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const r=e.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=s,this.context.firstCoverInitializedNameError=n,r}inheritCoverGrammar(e){const t=this.context.isBindingElement,s=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;const r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&s,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,r}consumeSemicolon(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)}parsePrimaryExpression(){const e=this.createNode();let t,s,n;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.isAsync)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(e,new G(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,f.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),n=this.getTokenRaw(s),typeof s.value=="bigint"?t=this.finalize(e,new ut(s.value,n,s.value.toString())):t=this.finalize(e,new ee(s.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),n=this.getTokenRaw(s),t=this.finalize(e,new ee(s.value==="true",n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,s=this.nextToken(),n=this.getTokenRaw(s),t=this.finalize(e,new ee(null,n));break;case 10:t=this.parseTemplateLiteral({isTagged:!1});break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,s=this.nextRegexToken(),n=this.getTokenRaw(s),t=this.finalize(e,new Mn(s.regex,n,s.pattern,s.flags));break;case"#":this.nextToken(),t=this.finalize(e,new ge(this.nextToken().value));break;case"@":let r=this.parseDecorators();this.context.decorators=r,this.parsePrimaryExpression(),this.context.decorators=null,t=this.finalize(e,new ge(this.nextToken().value));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(e,new G(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(e,new Xn)):this.matchKeyword("class")?t=this.parseClassExpression():this.matchKeyword("new")?t=this.parseNewExpression():this.matchImportCall()?t=this.parseImportCall():this.matchImportMeta()?(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,f.CannotUseImportMetaOutsideAModule),t=this.parseImportMeta()):t=this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t}parseSpreadElement(){const e=this.createNode();this.expect("...");const t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new Ln(t))}parseArrayInitializer(){const e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){const s=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(s)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new Wi(t))}parsePropertyMethod(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=this.context.strict,s=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;const n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=s,n}parsePropertyMethodFunction(e){const t=this.createNode(),s=this.context.allowYield;this.context.allowYield=!0;const n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=s,this.finalize(t,new se(null,n.params,r,e,!1))}parsePropertyMethodAsyncFunction(e){const t=this.createNode(),s=this.context.allowYield,n=this.context.isAsync;this.context.allowYield=!1,this.context.isAsync=!0;const r=this.parseFormalParameters(),a=this.parsePropertyMethod(r);return this.context.allowYield=s,this.context.isAsync=n,this.finalize(t,new se(null,r.params,a,e,!0))}parseObjectPropertyKey(e=!1){const t=this.createNode(),s=this.nextToken();let n;switch(s.type){case 8:case 6:this.context.strict&&s.octal&&this.tolerateUnexpectedToken(s,f.StrictOctalLiteral);const r=this.getTokenRaw(s);typeof s.value=="bigint"?n=this.finalize(t,new ut(s.value,r,s.value.toString())):n=this.finalize(t,new ee(s.value,r));break;case 3:case 1:case 5:case 4:n=this.finalize(t,e?new ge(s.value):new G(s.value));break;case 7:s.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(s);break;default:n=this.throwUnexpectedToken(s)}return n}isPropertyKey(e,t){return e.type===h.Identifier&&e.name===t||e.type===h.Literal&&e.value===t}parseObjectProperty(e){const t=this.createNode(),s=this.lookahead;let n,r=null,a=null,o=!1,u=!1,c=!1,l=!1,p=!1;if(s.type===3){const D=s.value;this.nextToken(),o=this.match("["),l=!this.hasLineTerminator&&D==="async"&&!this.match(":")&&!this.match("(")&&!this.match(","),p=this.match("*"),p&&this.nextToken(),r=l?this.parseObjectPropertyKey():this.finalize(t,new G(D))}else this.match("*")?this.nextToken():(o=this.match("["),r=this.parseObjectPropertyKey());const d=this.qualifiedPropertyName(this.lookahead);if(s.type===3&&!l&&s.value==="get"&&d)n="get",o=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(s.type===3&&!l&&s.value==="set"&&d)n="set",o=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(s.type===7&&s.value==="*"&&d)n="init",o=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(!1),u=!0;else if(r||this.throwUnexpectedToken(this.lookahead),n="init",this.match(":")&&!l)!o&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(f.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=l?this.parsePropertyMethodAsyncFunction(p):this.parsePropertyMethodFunction(p),u=!0;else if(s.type===3){const D=this.finalize(t,new G(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;const F=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(t,new Me(D,F))}else c=!0,a=D}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new dt(n,r,o,a,u,c))}parseObjectInitializer(){const e=this.createNode();this.expect("{");const t=[],s={value:!1};for(;!this.match("}");){const n=this.match("...")?this.parseSpreadElement():this.parseObjectProperty(s);t.push(n),!this.match("}")&&(!n.method||this.match(","))&&this.expectCommaSeparator()}return this.expect("}"),this.finalize(e,new In(t))}throwTemplateLiteralEarlyErrors(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,f.InvalidUnicodeEscapeSequence);case"x":return this.throwUnexpectedToken(e,f.InvalidHexEscapeSequence);case"8":case"9":return this.throwUnexpectedToken(e,f.TemplateEscape89);default:return this.throwUnexpectedToken(e,f.TemplateOctalLiteral)}}parseTemplateHead(e){Q(this.lookahead.head,"Template literal must start with a template head");const t=this.createNode(),s=this.nextToken();!e.isTagged&&s.notEscapeSequenceHead!==null&&this.throwTemplateLiteralEarlyErrors(s);const n=s.value,r=s.cooked;return this.finalize(t,new Dt({raw:n,cooked:r},s.tail))}parseTemplateElement(e){this.lookahead.type!==10&&this.throwUnexpectedToken();const t=this.createNode(),s=this.nextToken();!e.isTagged&&s.notEscapeSequenceHead!==null&&this.throwTemplateLiteralEarlyErrors(s);const n=s.value,r=s.cooked;return this.finalize(t,new Dt({raw:n,cooked:r},s.tail))}parseTemplateLiteral(e){const t=this.createNode(),s=[],n=[];let r=this.parseTemplateHead(e);for(n.push(r);!r.tail;)s.push(this.parseExpression()),r=this.parseTemplateElement(e),n.push(r);return this.finalize(t,new Jn(n,s))}reinterpretExpressionAsPattern(e){switch(e.type){case h.Identifier:case h.MemberExpression:case h.RestElement:case h.AssignmentPattern:break;case h.SpreadElement:e.type=h.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case h.ArrayExpression:e.type=h.ArrayPattern;for(let t=0;t<e.elements.length;t++)e.elements[t]!==null&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case h.ObjectExpression:e.type=h.ObjectPattern;for(let t=0;t<e.properties.length;t++){const s=e.properties[t];this.reinterpretExpressionAsPattern(s.type===h.SpreadElement?s:s.value)}break;case h.AssignmentExpression:e.type=h.AssignmentPattern,delete e.operator,this.reinterpretExpressionAsPattern(e.left);break}}parseGroupExpression(){let e;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),e={type:W,params:[],async:!1};else{const t=this.lookahead,s=[];if(this.match("..."))e=this.parseRestElement(s),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:W,params:[e],async:!1};else{let n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){const r=[];for(this.context.isAssignmentTarget=!1,r.push(e);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(let a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);n=!0,e={type:W,params:r,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(s)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(let a=0;a<r.length;a++)this.reinterpretExpressionAsPattern(r[a]);n=!0,e={type:W,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new _e(r)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===h.Identifier&&e.name==="yield"&&(n=!0,e={type:W,params:[e],async:!1}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===h.SequenceExpression)for(let a=0;a<e.expressions.length;a++)this.reinterpretExpressionAsPattern(e.expressions[a]);else this.reinterpretExpressionAsPattern(e);const r=e.type===h.SequenceExpression?e.expressions:[e];e={type:W,params:r,async:!1}}this.context.isBindingElement=!1}}}return e}parseArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(e.push(t),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),e}isIdentifierName(e){return e.type===3||e.type===4||e.type===1||e.type===5}parseIdentifierName(e=!1){let t=!1,s=this.createNode(),n=this.nextToken();return n.value==="#"&&e&&(n=this.nextToken(),t=!0),this.isIdentifierName(n)||this.throwUnexpectedToken(n),this.finalize(s,t?new ge(n.value):new G(n.value))}parseNewExpression(){const e=this.createNode(),t=this.parseIdentifierName();Q(t.name==="new","New expression must start with `new`");let s;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){const n=this.parseIdentifierName();s=new pt(t,n)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{const n=this.isolateCoverGrammar(this.parseLeftHandSideExpression),r=this.match("(")?this.parseArguments():[];s=new Tn(n,r),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,s)}parseAsyncArgument(){const e=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,e}parseAsyncArguments(){this.expect("(");const e=[];if(!this.match(")"))for(;;){const t=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(e.push(t),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),e}matchImportCall(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=s.type===7&&s.value==="("}return e}parseImportCall(){const e=this.createNode();this.expectKeyword("import"),this.expect("(");const t=this.parseAssignmentExpression();let s=null;return this.match(",")&&(this.nextToken(),s=this.parseObjectInitializer()),!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new An(t,s))}matchImportMeta(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();if(s.type===7&&s.value==="."){this.scanner.scanComments();const n=this.scanner.lex();e=n.type===3&&n.value==="meta",e&&n.end-n.start!==4&&this.tolerateUnexpectedToken(n,f.InvalidEscapedReservedWord)}else e=!1;this.scanner.restoreState(t)}return e}parseImportMeta(){const e=this.createNode(),t=this.parseIdentifierName();this.expect(".");const s=this.parseIdentifierName();return this.context.isAssignmentTarget=!1,this.finalize(e,new pt(t,s))}parseLeftHandSideExpressionAllowCall(){const e=this.lookahead,t=this.matchContextualKeyword("async"),s=this.context.allowIn;this.context.allowIn=!0;let n;const r=this.matchKeyword("super");r&&this.context.inFunctionBody?(n=this.createNode(),this.nextToken(),n=this.finalize(n,new ft),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):n=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),r&&this.match("(")&&(!this.context.inClassConstructor||!this.context.allowSuper)&&this.tolerateError(f.UnexpectedSuper);let a=!1;for(;;){let o=!1;if(this.match("?.")&&(o=!0,a=!0,this.expect("?.")),this.match("(")){const u=t&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;const c=u?this.parseAsyncArguments():this.parseArguments();if(n.type===h.ImportExpression&&c.length!==1&&this.tolerateError(f.BadImportCallArity),n=this.finalize(this.startNode(e),new sn(n,c,o)),u&&this.match("=>")){for(let l=0;l<c.length;++l)this.reinterpretExpressionAsPattern(c[l]);n={type:W,params:c,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!o,this.expect("[");const u=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),n=this.finalize(this.startNode(e),new Ee(!0,n,u,o))}else if(this.lookahead.type===10&&this.lookahead.head){o&&this.throwUnexpectedToken(this.lookahead),a&&this.throwError(f.InvalidTaggedTemplateOnOptionalChain);const u=this.parseTemplateLiteral({isTagged:!0});n=this.finalize(this.startNode(e),new mt(n,u))}else if(this.match(".")||o){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!o,o||this.expect(".");const u=this.parseIdentifierName(!0);n=this.finalize(this.startNode(e),new Ee(!1,n,u,o))}else break}return this.context.allowIn=s,a?new lt(n):n}parseSuper(){const e=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(e,new ft)}parseLeftHandSideExpression(){Q(this.context.allowIn,"callee of new expression always allow in keyword.");const e=this.startNode(this.lookahead);let t=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression),s=!1;for(;;){let n=!1;if(this.match("?.")&&(n=!0,s=!0,this.expect("?.")),this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!n,this.expect("[");const r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(e,new Ee(!0,t,r,n))}else if(this.lookahead.type===10&&this.lookahead.head){n&&this.throwUnexpectedToken(this.lookahead),s&&this.throwError(f.InvalidTaggedTemplateOnOptionalChain);const r=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new mt(t,r))}else if(this.match(".")||n){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!n,n||this.expect(".");const r=this.parseIdentifierName();t=this.finalize(e,new Ee(!1,t,r,n))}else break}return s?new lt(t):t}parseUpdateExpression(){let e;const t=this.lookahead;if(this.match("++")||this.match("--")){const s=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===h.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(f.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(f.InvalidLHSInAssignment);const r=!0;e=this.finalize(s,new xt(n.value,e,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(e=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&e.type===h.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(f.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(f.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const s=this.nextToken().value,n=!1;e=this.finalize(this.startNode(t),new xt(s,e,n))}return e}parseAwaitExpression(){const e=this.createNode();this.nextToken();const t=this.parseUnaryExpression();return this.finalize(e,new en(t))}parseUnaryExpression(){let e;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){const t=this.startNode(this.lookahead),s=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new Vn(s.value,e)),this.context.strict&&e.operator==="delete"&&e.argument.type===h.Identifier&&this.tolerateError(f.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else(this.context.isModule&&!this.context.inFunctionBody||this.context.isAsync)&&this.matchContextualKeyword("await")?e=this.parseAwaitExpression():e=this.parseUpdateExpression();return e}parseExponentiationExpression(){const e=this.lookahead,t=this.match("(");let s=this.inheritCoverGrammar(this.parseUnaryExpression);if((s.type!==h.UnaryExpression||t)&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const r=s,a=this.isolateCoverGrammar(this.parseExponentiationExpression);s=this.finalize(this.startNode(e),new Oe("**",r,a))}return s}binaryPrecedence(e){const t=e.value;let s;return e.type===7?s=this.operatorPrecedence[t]||0:e.type===4?s=t==="instanceof"||this.context.allowIn&&t==="in"?12:0:s=0,s}parseBinaryExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseExponentiationExpression),s=!0,n=!0;const r=u=>{(u.value==="&&"||u.value==="||")&&(n=!1),u.value==="??"&&(s=!1)},a=this.lookahead;let o=this.binaryPrecedence(a);if(o>0){r(a),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const u=[e,this.lookahead];let c=t,l=this.isolateCoverGrammar(this.parseExponentiationExpression);const p=[c,a.value,l],d=[o];for(;o=this.binaryPrecedence(this.lookahead),!(o<=0);){for((!s&&(this.lookahead.value==="&&"||this.lookahead.value==="||")||!n&&this.lookahead.value==="??")&&this.throwUnexpectedToken(this.lookahead),r(this.lookahead);p.length>2&&o<=d[d.length-1];){l=p.pop();const m=p.pop();d.pop(),c=p.pop(),u.pop();const w=u[u.length-1],N=this.startNode(w,w.lineStart),M=m==="||"||m==="&&"||m==="??";p.push(this.finalize(N,M?new ht(m,c,l):new Oe(m,c,l)))}p.push(this.nextToken().value),d.push(o),u.push(this.lookahead),p.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}let D=p.length-1;t=p[D];let F=u.pop();for(;D>1;){const m=u.pop(),w=F&&F.lineStart,N=this.startNode(m,w),M=p[D-1],O=M==="||"||M==="&&"||M==="??";t=this.finalize(N,O?new ht(M,p[D-2],t):new Oe(M,p[D-2],t)),D-=2,F=m}}return t}parseConditionalExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();const s=this.context.allowIn;this.context.allowIn=!0;const n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=s,this.expect(":");const r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new un(t,n,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t}checkPatternParam(e,t){switch(t.type){case h.Identifier:this.validateParam(e,t,t.name);break;case h.RestElement:this.checkPatternParam(e,t.argument);break;case h.AssignmentPattern:this.checkPatternParam(e,t.left);break;case h.ArrayPattern:for(let s=0;s<t.elements.length;s++)t.elements[s]!==null&&this.checkPatternParam(e,t.elements[s]);break;case h.ObjectPattern:for(let s=0;s<t.properties.length;s++){const n=t.properties[s];this.checkPatternParam(e,n.type===h.RestElement?n:n.value)}break}e.simple=e.simple&&t instanceof G}reinterpretAsCoverFormalsList(e){let t=[e];const s={simple:!0,paramSet:{}};let n=!1;switch(e.type){case h.Identifier:break;case W:t=e.params,n=e.async;break;default:return null}for(let r=0;r<t.length;++r){const a=t[r];a.type===h.AssignmentPattern?a.right.type===h.YieldExpression&&(a.right.argument&&this.throwUnexpectedToken(this.lookahead),a.right.type=h.Identifier,a.right.name="yield",delete a.right.argument,delete a.right.delegate):n&&a.type===h.Identifier&&a.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(s,a),t[r]=a}if(this.context.strict||!this.context.allowYield)for(let r=0;r<t.length;++r)t[r].type===h.YieldExpression&&this.throwUnexpectedToken(this.lookahead);if(s.hasDuplicateParameterNames){const r=this.context.strict?s.stricted:s.firstRestricted;this.throwUnexpectedToken(r,f.DuplicateParameter)}return{simple:s.simple,params:t,stricted:s.stricted,firstRestricted:s.firstRestricted,message:s.message}}parseAssignmentExpression(){let e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{const t=this.lookahead;let s=t;if(e=this.parseConditionalExpression(),s.type===3&&s.lineNumber===this.lookahead.lineNumber&&s.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){const n=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(n),e={type:W,params:[n],async:!0}}if(e.type===W||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const n=e.async,r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;const a=this.context.strict,o=this.context.allowStrictDirective;this.context.allowStrictDirective=r.simple;const u=this.context.allowYield,c=this.context.isAsync;this.context.allowYield=!0,this.context.isAsync=n;const l=this.startNode(t);this.expect("=>");let p;if(this.match("{")){const D=this.context.allowIn;this.context.allowIn=!0,p=this.parseFunctionSourceElements(),this.context.allowIn=D}else p=this.isolateCoverGrammar(this.parseAssignmentExpression);const d=p.type!==h.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(l,new qi(r.params,p,d,n)),this.context.strict=a,this.context.allowStrictDirective=o,this.context.allowYield=u,this.context.isAsync=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(f.InvalidLHSInAssignment),this.context.strict&&e.type===h.Identifier){const a=e;this.scanner.isRestrictedWord(a.name)&&this.tolerateUnexpectedToken(s,f.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(a.name)&&this.tolerateUnexpectedToken(s,f.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),s=this.nextToken();const n=s.value,r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new Qi(n,e,r)),this.context.firstCoverInitializedNameError=null}}return e}parseExpression(){const e=this.lookahead;let t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){const s=[];for(s.push(t);this.lookahead.type!==2&&this.match(",");)this.nextToken(),s.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new _e(s))}return t}parseStatementListItem(){let e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,f.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():this.matchImportMeta()?e=this.parseStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,f.IllegalImportDeclaration),e=this.parseImportDeclaration());break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement();break}else e=this.parseStatement();return e}parseBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new ct(t))}parseLexicalBinding(e,t){const s=this.createNode(),n=[],r=this.parsePattern(n,e);this.context.strict&&r.type===h.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(f.StrictVarName);let a=null;return e==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(f.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==h.Identifier||this.match("="))&&(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(s,new Et(r,a))}parseBindingList(e,t){const s=[this.parseLexicalBinding(e,t)];for(;this.match(",");)this.nextToken(),s.push(this.parseLexicalBinding(e,t));return s}isLexicalDeclaration(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.scanner.lex();return this.scanner.restoreState(e),t.type===3||t.type===7&&t.value==="["||t.type===7&&t.value==="{"||t.type===4&&t.value==="let"||t.type===4&&t.value==="yield"}parseLexicalDeclaration(e){const t=this.createNode(),s=this.nextToken().value;Q(s==="let"||s==="const","Lexical declaration must be either let or const");const n=this.parseBindingList(s,e);return this.consumeSemicolon(),this.finalize(t,new Z(n,s))}isInitializedProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),this.lookahead.type===3&&t.value==="="}isDeclaredProperty(){let e=this.scanner.saveState();this.scanner.scanComments();let t=this.scanner.lex();return this.scanner.restoreState(e),this.lookahead.type===3&&t.value===";"||this.lookahead.type===3&&t.lineNumber!==this.startMarker.line}parseBindingRestElement(e,t){const s=this.createNode();this.expect("...");const n=this.parsePattern(e,t);return this.finalize(s,new Ce(n))}parseArrayPattern(e,t){const s=this.createNode();this.expect("[");const n=[];for(;!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(e,t));break}else n.push(this.parsePatternWithDefault(e,t));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(s,new Hi(n))}parsePropertyPattern(e,t){const s=this.createNode();let n=!1,r=!1;const a=!1;let o,u;if(this.lookahead.type===3){const c=this.lookahead;o=this.parseVariableIdentifier();const l=this.finalize(s,new G(c.value));if(this.match("=")){e.push(c),r=!0,this.nextToken();const p=this.parseAssignmentExpression();u=this.finalize(this.startNode(c),new Me(l,p))}else this.match(":")?(this.expect(":"),u=this.parsePatternWithDefault(e,t)):(e.push(c),r=!0,u=l)}else n=this.match("["),o=this.parseObjectPropertyKey(),this.expect(":"),u=this.parsePatternWithDefault(e,t);return this.finalize(s,new dt("init",o,n,u,a,r))}parseRestProperty(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError(f.DefaultRestProperty),this.match("}")||this.throwError(f.PropertyAfterRestProperty),this.finalize(t,new Ce(s))}parseObjectPattern(e,t){const s=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.match("...")?this.parseRestProperty(e):this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(s,new Nn(n))}parsePattern(e,t){let s;return this.match("[")?s=this.parseArrayPattern(e,t):this.match("{")?s=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&(t==="const"||t==="let")&&this.tolerateUnexpectedToken(this.lookahead,f.LetInLexicalBinding),e.push(this.lookahead),s=this.parseVariableIdentifier(t)),s}parsePatternWithDefault(e,t){const s=this.lookahead;let n=this.parsePattern(e,t);if(this.match("=")){this.nextToken();const r=this.context.allowYield;this.context.allowYield=!0;const a=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,n=this.finalize(this.startNode(s),new Me(n,a))}return n}parseVariableIdentifier(e){const t=this.createNode(),s=this.nextToken();return s.type===4&&s.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(s,f.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(s):s.type!==3?this.context.strict&&s.type===4&&this.scanner.isStrictModeReservedWord(s.value)?this.tolerateUnexpectedToken(s,f.StrictReservedWord):(this.context.strict||s.value!=="let"||e!=="var")&&this.throwUnexpectedToken(s):(this.context.isModule||this.context.isAsync)&&s.type===3&&s.value==="await"&&this.tolerateUnexpectedToken(s),this.finalize(t,new G(s.value))}parseVariableDeclaration(e){const t=this.createNode(),s=[],n=this.parsePattern(s,"var");this.context.strict&&n.type===h.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(f.StrictVarName);let r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==h.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new Et(n,r))}parseVariableDeclarationList(e){const t={inFor:e.inFor},s=[];for(s.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),s.push(this.parseVariableDeclaration(t));return s}parseVariableStatement(){const e=this.createNode();this.expectKeyword("var");const t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new Z(t,"var"))}parseEmptyStatement(){const e=this.createNode();return this.expect(";"),this.finalize(e,new he)}parseExpressionStatement(){const e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new Le(t))}parseIfClause(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(f.StrictFunction),this.parseStatement()}parseIfStatement(){const e=this.createNode();let t,s=null;this.expectKeyword("if"),this.expect("(");const n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new he)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),s=this.parseIfClause())),this.finalize(e,new Cn(n,t,s))}parseDoWhileStatement(){const e=this.createNode();this.expectKeyword("do"),this.tolerateInvalidLoopStatement();const t=this.context.inIteration;this.context.inIteration=!0;const s=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");const n=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new dn(s,n))}parseWhileStatement(){const e=this.createNode();let t;this.expectKeyword("while"),this.expect("(");const s=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new he);else{this.expect(")");const n=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=n}return this.finalize(e,new $n(s,t))}parseForStatement(){let e=null,t=null,s=null,n=!0,r,a,o=!1;const u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.isAsync||this.tolerateUnexpectedToken(this.lookahead),o=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();const l=this.context.allowIn;this.context.allowIn=!1;const p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=l,!o&&p.length===1&&this.matchKeyword("in")){const d=p[0];d.init&&(d.id.type===h.ArrayPattern||d.id.type===h.ObjectPattern||this.context.strict)&&this.tolerateError(f.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new Z(p,"var")),this.nextToken(),r=e,a=this.parseExpression(),e=null}else p.length===1&&p[0].init===null&&this.matchContextualKeyword("of")?(e=this.finalize(e,new Z(p,"var")),this.nextToken(),r=e,a=this.parseAssignmentExpression(),e=null,n=!1):(e=this.finalize(e,new Z(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();const l=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")e=this.finalize(e,new G(l)),this.nextToken(),r=e,a=this.parseExpression(),e=null;else{const p=this.context.allowIn;this.context.allowIn=!1;const d=this.parseBindingList(l,{inFor:!0});this.context.allowIn=p,d.length===1&&d[0].init===null&&this.matchKeyword("in")?(e=this.finalize(e,new Z(d,l)),this.nextToken(),r=e,a=this.parseExpression(),e=null):d.length===1&&d[0].init===null&&this.matchContextualKeyword("of")?(e=this.finalize(e,new Z(d,l)),this.nextToken(),r=e,a=this.parseAssignmentExpression(),e=null,n=!1):(this.consumeSemicolon(),e=this.finalize(e,new Z(d,l)))}}else{const l=this.lookahead,p=this.context.isBindingElement,d=this.context.isAssignmentTarget,D=this.context.firstCoverInitializedNameError,F=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=F,this.matchKeyword("in"))(!this.context.isAssignmentTarget||e.type===h.AssignmentExpression)&&this.tolerateError(f.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),r=e,a=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||e.type===h.AssignmentExpression)&&this.tolerateError(f.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),r=e,a=this.parseAssignmentExpression(),e=null,n=!1;else{if(this.context.isBindingElement=p,this.context.isAssignmentTarget=d,this.context.firstCoverInitializedNameError=D,this.match(",")){const m=[e];for(;this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(l),new _e(m))}this.expect(";")}}typeof r>"u"&&(this.match(";")||(t=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(s=this.isolateCoverGrammar(this.parseExpression)));let c;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new he);else{this.expect(")"),this.tolerateInvalidLoopStatement();const l=this.context.inIteration;this.context.inIteration=!0,c=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=l}return typeof r>"u"?this.finalize(u,new En(e,t,s,c)):n?this.finalize(u,new Dn(r,a,c)):this.finalize(u,new xn(r,a,c,o))}parseContinueStatement(){const e=this.createNode();this.expectKeyword("continue");let t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){const s=this.parseVariableIdentifier();t=s;const n="$"+s.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(f.UnknownLabel,s.name)}return this.consumeSemicolon(),t===null&&!this.context.inIteration&&this.throwError(f.IllegalContinue),this.finalize(e,new cn(t))}parseBreakStatement(){const e=this.createNode();this.expectKeyword("break");let t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){const s=this.parseVariableIdentifier(),n="$"+s.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(f.UnknownLabel,s.name),t=s}return this.consumeSemicolon(),t===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(f.IllegalBreak),this.finalize(e,new tn(t))}parseReturnStatement(){this.context.inFunctionBody||this.tolerateError(f.IllegalReturn);const e=this.createNode();this.expectKeyword("return");const s=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(e,new On(s))}parseWithStatement(){this.context.strict&&this.tolerateError(f.StrictModeWith);const e=this.createNode();let t;this.expectKeyword("with"),this.expect("(");const s=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new he)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new jn(s,t))}parseSwitchCase(){const e=this.createNode();let t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");const s=[];for(;!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)s.push(this.parseStatementListItem());return this.finalize(e,new Un(t,s))}parseSwitchStatement(){const e=this.createNode();this.expectKeyword("switch"),this.expect("(");const t=this.parseExpression();this.expect(")");const s=this.context.inSwitch;this.context.inSwitch=!0;const n=[];let r=!1;for(this.expect("{");!this.match("}");){const a=this.parseSwitchCase();a.test===null&&(r&&this.throwError(f.MultipleDefaultsInSwitch),r=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=s,this.finalize(e,new zn(t,n))}parseLabelledStatement(){const e=this.createNode(),t=this.parseExpression();let s;if(t.type===h.Identifier&&this.match(":")){this.nextToken();const n=t,r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(f.Redeclaration,"Label",n.name),this.context.labelSet[r]=!0;let a;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){const o=this.lookahead,u=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(o,f.StrictFunction):u.generator&&this.tolerateUnexpectedToken(o,f.GeneratorInLegacyContext),a=u}else a=this.parseStatement();delete this.context.labelSet[r],s=new bn(n,a)}else this.consumeSemicolon(),s=new Le(t);return this.finalize(e,s)}parseThrowStatement(){const e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(f.NewlineAfterThrow);const t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new Yn(t))}parseCatchClause(){const e=this.createNode();this.expectKeyword("catch");let t=null;if(this.match("(")){this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);const n=[];t=this.parsePattern(n);const r={};for(let a=0;a<n.length;a++){const o="$"+n[a].value;Object.prototype.hasOwnProperty.call(r,o)&&this.tolerateError(f.DuplicateBinding,n[a].value),r[o]=!0}this.context.strict&&t.type===h.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(f.StrictCatchVariable),this.expect(")")}const s=this.parseBlock();return this.finalize(e,new nn(t,s))}parseFinallyClause(){return this.expectKeyword("finally"),this.parseBlock()}parseTryStatement(){const e=this.createNode();this.expectKeyword("try");const t=this.parseBlock(),s=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return!s&&!n&&this.throwError(f.NoCatchOrFinally),this.finalize(e,new Kn(t,s,n))}parseDebuggerStatement(){const e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new ln)}parseStatement(){let e;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:e=this.parseExpressionStatement();break;case 7:const t=this.lookahead.value;t==="{"?e=this.parseBlock():t==="("?e=this.parseExpressionStatement():t===";"?e=this.parseEmptyStatement():e=this.parseExpressionStatement();break;case 3:e=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":e=this.parseBreakStatement();break;case"continue":e=this.parseContinueStatement();break;case"debugger":e=this.parseDebuggerStatement();break;case"do":e=this.parseDoWhileStatement();break;case"for":e=this.parseForStatement();break;case"function":e=this.parseFunctionDeclaration();break;case"if":e=this.parseIfStatement();break;case"return":e=this.parseReturnStatement();break;case"switch":e=this.parseSwitchStatement();break;case"throw":e=this.parseThrowStatement();break;case"try":e=this.parseTryStatement();break;case"var":e=this.parseVariableStatement();break;case"while":e=this.parseWhileStatement();break;case"with":e=this.parseWithStatement();break;default:e=this.parseExpressionStatement();break}break;default:e=this.throwUnexpectedToken(this.lookahead)}return e}parseFunctionSourceElements(){const e=this.createNode();this.expect("{");const t=this.parseDirectivePrologues(),s=this.context.labelSet,n=this.context.inIteration,r=this.context.inSwitch,a=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=s,this.context.inIteration=n,this.context.inSwitch=r,this.context.inFunctionBody=a,this.finalize(e,new ct(t))}validateParam(e,t,s){const n="$"+s;this.context.strict?(this.scanner.isRestrictedWord(s)&&(e.stricted=t,e.message=f.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)):e.firstRestricted||(this.scanner.isRestrictedWord(s)?(e.firstRestricted=t,e.message=f.StrictParamName):this.scanner.isStrictModeReservedWord(s)?(e.firstRestricted=t,e.message=f.StrictReservedWord):Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)),typeof Object.defineProperty=="function"?Object.defineProperty(e.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):e.paramSet[n]=!0}parseRestElement(e){const t=this.createNode();this.expect("...");const s=this.parsePattern(e);return this.match("=")&&this.throwError(f.DefaultRestParameter),this.match(")")||this.throwError(f.ParameterAfterRestParameter),this.finalize(t,new Ce(s))}parseFormalParameter(e){const t=[],s=this.match("...")?this.parseRestElement(t):this.parsePatternWithDefault(t);for(let n=0;n<t.length;n++)this.validateParam(e,t[n],t[n].value);e.simple=e.simple&&s instanceof G,e.params.push(s)}parseFormalParameters(e){const t={simple:!0,hasDuplicateParameterNames:!1,params:[],firstRestricted:e};if(this.expect("("),!this.match(")"))for(t.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(t),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),t.hasDuplicateParameterNames&&(this.context.strict||this.context.isAsync||!t.simple)&&this.throwError(f.DuplicateParameter),{simple:t.simple,params:t.params,stricted:t.stricted,firstRestricted:t.firstRestricted,message:t.message}}matchAsyncFunction(){let e=this.matchContextualKeyword("async");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const s=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===s.lineNumber&&s.type===4&&s.value==="function"}return e}parseFunctionDeclaration(e){const t=this.createNode(),s=this.matchContextualKeyword("async");s&&(this.context.inIteration&&this.tolerateError(f.AsyncFunctionInSingleStatementContext),this.nextToken()),this.expectKeyword("function");const n=this.match("*");n&&this.nextToken();let r,a=null,o=null;if(!e||!this.match("(")){const w=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(w.value)&&this.tolerateUnexpectedToken(w,f.StrictFunctionName):this.scanner.isRestrictedWord(w.value)?(o=w,r=f.StrictFunctionName):this.scanner.isStrictModeReservedWord(w.value)&&(o=w,r=f.StrictReservedWord)}const u=this.context.isAsync,c=this.context.allowYield;this.context.isAsync=s,this.context.allowYield=!n;const l=this.parseFormalParameters(o),p=l.params,d=l.stricted;o=l.firstRestricted,l.message&&(r=l.message);const D=this.context.strict,F=this.context.allowStrictDirective;this.context.allowStrictDirective=l.simple;const m=this.parseFunctionSourceElements();return this.context.strict&&o&&this.throwUnexpectedToken(o,r),this.context.strict&&d&&this.tolerateUnexpectedToken(d,r),this.context.strict=D,this.context.allowStrictDirective=F,this.context.isAsync=u,this.context.allowYield=c,s?this.finalize(t,new Zi(a,p,m,n)):this.finalize(t,new gn(a,p,m,n))}parseFunctionExpression(){const e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");const s=this.match("*");s&&this.nextToken();let n,r=null,a;const o=this.context.isAsync,u=this.context.allowYield;if(this.context.isAsync=t,this.context.allowYield=!s,!this.match("(")){const m=this.lookahead;r=!this.context.strict&&!s&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(m.value)&&this.tolerateUnexpectedToken(m,f.StrictFunctionName):this.scanner.isRestrictedWord(m.value)?(a=m,n=f.StrictFunctionName):this.scanner.isStrictModeReservedWord(m.value)&&(a=m,n=f.StrictReservedWord)}const c=this.parseFormalParameters(a),l=c.params,p=c.stricted;a=c.firstRestricted,c.message&&(n=c.message);const d=this.context.strict,D=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;const F=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=d,this.context.allowStrictDirective=D,this.context.isAsync=o,this.context.allowYield=u,this.finalize(e,new se(r,l,F,s,t))}parseDirective(){const e=this.lookahead,t=this.createNode(),s=this.parseExpression(),n=s.type===h.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,n?new pn(s,n):new Le(s))}parseDirectivePrologues(){let e=null;const t=[];for(;;){const s=this.lookahead;if(s.type!==8)break;const n=this.parseDirective();t.push(n);const r=n.directive;if(typeof r!="string")break;r==="use strict"?(this.context.strict=!0,e&&this.tolerateUnexpectedToken(e,f.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(s,f.IllegalLanguageModeDirective)):!e&&s.octal&&(e=s)}return t}qualifiedPropertyName(e){switch(e.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return e.value==="["||e.value==="#"}return!1}parseGetterMethod(){const e=this.createNode(),t=!1,s=this.context.allowYield;this.context.allowYield=!t;const n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(f.BadGetterArity);const r=this.parsePropertyMethod(n);return this.context.allowYield=s,this.finalize(e,new se(null,n.params,r,t,!1))}parseSetterMethod(){const e=this.createNode(),t=!1,s=this.context.allowYield;this.context.allowYield=!t;const n=this.parseFormalParameters();n.params.length!==1?this.tolerateError(f.BadSetterArity):n.params[0]instanceof Ce&&this.tolerateError(f.BadSetterRestParameter);const r=this.parsePropertyMethod(n);return this.context.allowYield=s,this.finalize(e,new se(null,n.params,r,t,!1))}parseGeneratorMethod(e){const t=this.createNode(),s=!0,n=this.context.allowYield;this.context.allowYield=!0;const r=this.parseFormalParameters();this.context.allowYield=!1;const a=this.parsePropertyMethod(r);return this.context.allowYield=n,this.finalize(t,new se(null,r.params,a,s,e))}isStartOfExpression(){let e=!0;const t=this.lookahead.value;switch(this.lookahead.type){case 7:e=t==="["||t==="("||t==="{"||t==="+"||t==="-"||t==="!"||t==="~"||t==="++"||t==="--"||t==="/"||t==="/=";break;case 4:e=t==="class"||t==="delete"||t==="function"||t==="let"||t==="new"||t==="super"||t==="this"||t==="typeof"||t==="void"||t==="yield";break}return e}parseYieldExpression(){const e=this.createNode();this.expectKeyword("yield");let t=null,s=!1;if(!this.hasLineTerminator){const n=this.context.allowYield;this.context.allowYield=!1,s=this.match("*"),s?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new Gn(t,s))}parseStaticBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new _n(t))}parseDecorator(){const e=this.createNode();this.expect("@");const t=this.context.strict,s=this.context.allowYield,n=this.context.isAsync;this.context.strict=!1,this.context.allowYield=!0,this.context.isAsync=!1;const r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall);return this.context.strict=t,this.context.allowYield=s,this.context.isAsync=n,this.match(";")&&this.throwError(f.NoSemicolonAfterDecorator),this.finalize(e,new hn(r))}parseDecorators(){let e=null;for(;this.match("@");)e==null&&(e=[]),e.push(this.parseDecorator());return e}parseClassElement(e){let t=this.lookahead;const s=this.createNode(),n=this.context.inConstructor;let r="",a=null,o=null,u=!1,c=!1,l=!1,p=!1,d=!1,D=!1;const F=this.parseDecorators();if(F&&(t=this.lookahead),this.match("*"))this.nextToken();else{u=this.match("["),this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(D);const w=a;if(this.context.inConstructor=t.type===3&&t.value==="constructor",w.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,l=!0,u=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead)):(this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(D))),w.name==="static"&&this.match("{"))return this.parseStaticBlock();if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){const N=this.lookahead.value;N!==":"&&N!=="("&&(p=!0,d=this.match("*"),d&&this.nextToken(),t=this.lookahead,u=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(D=!0,this.nextToken())):(this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(D)),t.type===3&&t.value==="constructor"&&!l&&this.tolerateUnexpectedToken(t,f.ConstructorIsAsync))}}t.type===3&&t.value==="constructor"&&D&&this.tolerateUnexpectedToken(t,f.ConstructorIsPrivate);const m=this.qualifiedPropertyName(this.lookahead);if(t.type===3||t.type===8?t.value==="get"&&m?(r="get",this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead),u=this.match("["),a=this.parseObjectPropertyKey(D),this.context.allowYield=!1,o=this.parseGetterMethod()):t.value==="set"&&m?(r="set",this.match("#")&&(D=!0,this.nextToken(),t=this.lookahead),u=this.match("["),a=this.parseObjectPropertyKey(D),o=this.parseSetterMethod()):this.match("(")||(r="property",u=!1,this.match("=")&&(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression))):t.type===7&&t.value==="*"&&m?(r="init",u=this.match("["),a=this.parseObjectPropertyKey(D),o=this.parseGeneratorMethod(p),c=!0):t.type===7&&t.value==="["&&!this.match("(")&&(r="property",u=!0,this.match("=")&&(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression))),!r&&a&&this.match("(")){const w=this.context.inClassConstructor;this.context.inClassConstructor=t.value==="constructor",r="init",o=p?this.parsePropertyMethodAsyncFunction(d):this.parsePropertyMethodFunction(d),this.context.inClassConstructor=w,c=!0}return r||this.throwUnexpectedToken(this.lookahead),r==="init"&&(r="method"),u||(l&&this.isPropertyKey(a,"prototype")&&this.throwUnexpectedToken(t,f.StaticPrototype),!l&&this.isPropertyKey(a,"constructor")&&((r!=="method"||!c||o&&o.generator)&&this.throwUnexpectedToken(t,f.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,f.DuplicateConstructor):e.value=!0,r="constructor")),this.context.inConstructor=n,r==="property"?(this.consumeSemicolon(),this.finalize(s,new Pn(a,u,o,l,F))):this.finalize(s,new vn(a,u,o,r,l,F))}parseClassElementList(){const e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e}parseClassBody(){const e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new rn(t))}parseClassDeclaration(e){const t=this.createNode(),s=this.context.strict,n=this.context.allowSuper;this.context.strict=!0,this.expectKeyword("class");const r=e&&this.lookahead.type!==3?null:this.parseVariableIdentifier();let a=null;this.matchKeyword("extends")&&(this.nextToken(),a=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const o=this.parseClassBody();return this.context.allowSuper=n,this.context.strict=s,this.finalize(t,new an(r,a,o,this.context.decorators))}parseClassExpression(){const e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");const s=this.lookahead.type===3?this.parseVariableIdentifier():null;let n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall),this.context.allowSuper=!0);const r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new on(s,n,r,this.context.decorators))}parseModule(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;const e=this.createNode(),t=this.parseDirectivePrologues();for(;this.lookahead.type!==2;)t.push(this.parseStatementListItem());return this.finalize(e,new Bn(t))}parseScript(){const e=this.createNode(),t=this.parseDirectivePrologues();for(;this.lookahead.type!==2;)t.push(this.parseStatementListItem());return this.finalize(e,new Rn(t))}parseImportAttributes(){if(this.lookahead.value==="assert"){this.nextToken(),this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportAttribute()),this.match("}")||this.expectCommaSeparator();return this.expect("}"),e}return null}parseImportAttribute(){const e=this.createNode();this.lookahead.type!==3&&this.throwUnexpectedToken(this.nextToken());const t=this.parseIdentifierName();this.match(":")||this.throwUnexpectedToken(this.nextToken()),this.nextToken();const s=this.nextToken(),n=this.getTokenRaw(s),r=this.finalize(e,new ee(s.value,n));return this.finalize(e,new yn(t,r))}parseModuleSpecifier(){const e=this.createNode();this.lookahead.type!==8&&this.throwError(f.InvalidModuleSpecifier);const t=this.nextToken(),s=this.getTokenRaw(t);return S.isStringWellFormedUnicode(t.value)||this.throwError(f.InvalidModuleSpecifier),this.finalize(e,new ee(t.value,s))}parseImportSpecifier(){const e=this.createNode();let t,s;return this.lookahead.type===3?(t=this.parseVariableIdentifier(),s=t,this.matchContextualKeyword("as")&&(this.nextToken(),s=this.parseVariableIdentifier())):(t=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName(),s=t,this.matchContextualKeyword("as")?(this.nextToken(),s=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(e,new kn(s,t))}parseNamedImports(){this.expect("{");const e=[];for(;!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e}parseImportDefaultSpecifier(){const e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new Sn(t))}parseImportNamespaceSpecifier(){const e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(f.NoAsAfterImportNamespace),this.lookahead.escaped&&this.throwError(f.NoAsAndFromEscapeSequences),this.nextToken();const t=this.parseIdentifierName();return this.finalize(e,new wn(t))}parseImportDeclaration(){this.context.inFunctionBody&&this.throwError(f.IllegalImportDeclaration);const e=this.createNode();this.expectKeyword("import");let t,s=[];if(this.lookahead.type===8)t=this.parseModuleSpecifier();else{if(this.match("{")?s=s.concat(this.parseNamedImports()):this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(s.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?s.push(this.parseImportNamespaceSpecifier()):this.match("{")?s=s.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){const r=this.lookahead.value?f.UnexpectedToken:f.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}const n=this.parseImportAttributes();return this.consumeSemicolon(),this.finalize(e,new Fn(s,t,n))}parseExportSpecifier(){const e=this.createNode(),t=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName();let s=t;return this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(f.NoAsAndFromEscapeSequences),this.nextToken(),s=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName()),this.finalize(e,new mn(t,s))}parseExportDeclaration(){this.context.inFunctionBody&&this.throwError(f.IllegalExportDeclaration);const e=this.createNode();this.expectKeyword("export");let t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){const s=this.parseFunctionDeclaration(!0);t=this.finalize(e,new xe(s))}else if(this.matchKeyword("class")){const s=this.parseClassDeclaration(!0);t=this.finalize(e,new xe(s))}else if(this.matchContextualKeyword("async")){const s=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new xe(s))}else{this.matchContextualKeyword("from")&&this.throwError(f.UnexpectedToken,this.lookahead.value);const s=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new xe(s))}else if(this.match("*")){this.nextToken();let s=null;if(this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(f.NoAsAndFromEscapeSequences),this.nextToken(),s=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName()),!this.matchContextualKeyword("from")){const a=this.lookahead.value?f.UnexpectedToken:f.MissingFromClause;this.throwError(a,this.lookahead.value)}this.lookahead.escaped&&this.throwError(f.NoAsAndFromEscapeSequences),this.nextToken();const n=this.parseModuleSpecifier(),r=this.parseImportAttributes();this.consumeSemicolon(),t=this.finalize(e,new fn(n,s,r))}else if(this.lookahead.type===4){let s;switch(this.lookahead.value){case"let":case"const":s=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":s=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new Re(s,[],null,null))}else if(this.matchAsyncFunction()){const s=this.parseFunctionDeclaration();t=this.finalize(e,new Re(s,[],null,null))}else{const s=[];let n=null,r=!1,a=null;for(this.expect("{");!this.match("}");)r=r||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.lookahead.escaped&&this.throwError(f.NoAsAndFromEscapeSequences),this.nextToken(),n=this.parseModuleSpecifier(),a=this.parseImportAttributes(),this.consumeSemicolon();else if(r){const o=this.lookahead.value?f.UnexpectedToken:f.MissingFromClause;this.throwError(o,this.lookahead.value)}else a=this.parseImportAttributes(),this.consumeSemicolon();t=this.finalize(e,new Re(null,s,n,a))}return t}}const Ct={quot:'"',amp:"&",apos:"'",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:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"};V[100]="JSXIdentifier";V[101]="JSXText";function ie(i){let e;switch(i.type){case U.JSXIdentifier:e=i.name;break;case U.JSXNamespacedName:const s=i;e=ie(s.namespace)+":"+ie(s.name);break;case U.JSXMemberExpression:const n=i;e=ie(n.object)+"."+ie(n.property);break}return e}class qn extends It{constructor(e,t,s){super(e,t,s)}parsePrimaryExpression(){return this.match("<")?this.parseJSXRoot():super.parsePrimaryExpression()}startJSX(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column}finishJSX(){this.nextToken()}reenterJSX(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()}createJSXNode(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}createJSXChildNode(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}scanXHTMLEntity(e){let t="&",s=!0,n=!1,r=!1,a=!1;for(;!this.scanner.eof()&&s&&!n;){const o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=o===";",t+=o,++this.scanner.index,!n)switch(t.length){case 2:r=o==="#";break;case 3:r&&(a=o==="x",s=a||S.isDecimalDigit(o.charCodeAt(0)),r=r&&!a);break;default:s=s&&!(r&&!S.isDecimalDigit(o.charCodeAt(0))),s=s&&!(a&&!S.isHexDigit(o.charCodeAt(0)));break}}if(s&&n&&t.length>2){const o=t.substr(1,t.length-2);r&&o.length>1?t=String.fromCharCode(parseInt(o.substr(1),10)):a&&o.length>2?t=String.fromCharCode(parseInt("0"+o.substr(1),16)):!r&&!a&&Ct[o]&&(t=Ct[o])}return t}lexJSX(){const e=this.scanner.source.charCodeAt(this.scanner.index);if(e===60||e===62||e===47||e===58||e===61||e===123||e===125)return{type:7,value:this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(e===34||e===39){const t=this.scanner.index,s=this.scanner.source[this.scanner.index++];let n="";for(;!this.scanner.eof();){const r=this.scanner.source[this.scanner.index++];if(r===s)break;r==="&"?n+=this.scanXHTMLEntity(s):n+=r}return{type:8,value:n,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(e===46){const t=this.scanner.source.charCodeAt(this.scanner.index+1),s=this.scanner.source.charCodeAt(this.scanner.index+2),n=t===46&&s===46?"...":".",r=this.scanner.index;return this.scanner.index+=n.length,{type:7,value:n,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(e===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(S.isIdentifierStart(e)&&e!==92){const t=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){const n=this.scanner.source.charCodeAt(this.scanner.index);if(S.isIdentifierPart(n)&&n!==92)++this.scanner.index;else if(n===45)++this.scanner.index;else break}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()}nextJSXToken(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e}nextJSXText(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;const e=this.scanner.index;let t="";for(;!this.scanner.eof();){const n=this.scanner.source[this.scanner.index];if(n==="{"||n==="<")break;++this.scanner.index,t+=n,S.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,n==="\r"&&this.scanner.source[this.scanner.index]===`
8
- `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;const s={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(s)),s}peekJSXToken(){const e=this.scanner.saveState();this.scanner.scanComments();const t=this.lexJSX();return this.scanner.restoreState(e),t}expectJSX(e){const t=this.nextJSXToken();(t.type!==7||t.value!==e)&&this.throwUnexpectedToken(t)}matchJSX(e){const t=this.peekJSXToken();return t.type===7&&t.value===e}parseJSXIdentifier(){const e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==100&&this.throwUnexpectedToken(t),this.finalize(e,new Yi(t.value))}parseJSXElementName(){const e=this.createJSXNode();let t=this.parseJSXIdentifier();if(this.matchJSX(":")){const s=t;this.expectJSX(":");const n=this.parseJSXIdentifier();t=this.finalize(e,new at(s,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){const s=t;this.expectJSX(".");const n=this.parseJSXIdentifier();t=this.finalize(e,new Ki(s,n))}return t}parseJSXAttributeName(){const e=this.createJSXNode();let t;const s=this.parseJSXIdentifier();if(this.matchJSX(":")){const n=s;this.expectJSX(":");const r=this.parseJSXIdentifier();t=this.finalize(e,new at(n,r))}else t=s;return t}parseJSXStringLiteralAttribute(){const e=this.createJSXNode(),t=this.nextJSXToken();t.type!==8&&this.throwUnexpectedToken(t);const s=this.getTokenRaw(t);return this.finalize(e,new ee(t.value,s))}parseJSXExpressionAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new rt(t))}parseJSXAttributeValue(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()}parseJSXNameValueAttribute(){const e=this.createJSXNode(),t=this.parseJSXAttributeName();let s=null;return this.matchJSX("=")&&(this.expectJSX("="),s=this.parseJSXAttributeValue()),this.finalize(e,new Vi(t,s))}parseJSXSpreadAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new ji(t))}parseJSXAttributes(){const e=[];for(;!this.matchJSX("/")&&!this.matchJSX(">");){const t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e}parseJSXOpeningElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new $i(!1));const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new ot(t,n,s))}parseJSXBoundaryElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){if(this.expectJSX("/"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new Ji);const r=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new zi(r))}const t=this.parseJSXElementName(),s=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new ot(t,n,s))}parseJSXEmptyExpression(){const e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new Xi)}parseJSXExpressionContainer(){const e=this.createJSXNode();this.expectJSX("{");let t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new rt(t))}parseJSXChildren(){const e=[];for(;!this.scanner.eof();){const t=this.createJSXChildNode(),s=this.nextJSXText();if(s.start<s.end){const n=this.getTokenRaw(s),r=this.finalize(t,new Gi(s.value,n));e.push(r)}if(this.scanner.source[this.scanner.index]==="{"){const n=this.parseJSXExpressionContainer();e.push(n)}else break}return e}parseComplexJSXElement(e){const t=[];for(;!this.scanner.eof();){e.children=e.children.concat(this.parseJSXChildren());const s=this.createJSXChildNode(),n=this.parseJSXBoundaryElement();if(n.type===U.JSXOpeningElement){const r=n;if(r.selfClosing){const a=this.finalize(s,new Pe(r,[],null));e.children.push(a)}else t.push(e),e={node:s,opening:r,closing:null,children:[]}}if(n.type===U.JSXClosingElement){e.closing=n;const r=ie(e.opening.name),a=ie(e.closing.name);if(r!==a&&this.tolerateError("Expected corresponding JSX closing tag for %0",r),t.length>0){const o=this.finalize(e.node,new Pe(e.opening,e.children,e.closing));e=t[t.length-1],e.children.push(o),t.pop()}else break}if(n.type===U.JSXClosingFragment)if(e.closing=n,e.opening.type!==U.JSXOpeningFragment)this.tolerateError("Expected corresponding JSX closing tag for jsx fragment");else break}return e}parseJSXElement(){const e=this.createJSXNode(),t=this.parseJSXOpeningElement();let s=[],n=null;if(!t.selfClosing){const r=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:s});s=r.children,n=r.closing}return this.finalize(e,new Pe(t,s,n))}parseJSXRoot(){this.config.tokens&&this.tokens.pop(),this.startJSX();const e=this.parseJSXElement();return this.finishJSX(),e}isStartOfExpression(){return super.isStartOfExpression()||this.match("<")}}function Nt(i,e,t){let s=null;const n=(p,d)=>{t&&t(p,d),s&&s.visit(p,d)};let r=typeof t=="function"?n:null,a=!1;if(e){a=typeof e.comment=="boolean"&&e.comment;const p=typeof e.attachComment=="boolean"&&e.attachComment;(a||p)&&(s=new Ui,s.attach=p,e.comment=!0,r=n)}let o=!1;e&&typeof e.sourceType=="string"&&(o=e.sourceType==="module");let u;e&&typeof e.jsx=="boolean"&&e.jsx?u=new qn(i,e,r):u=new It(i,e,r);const l=o?u.parseModule():u.parseScript();return a&&s&&(l.comments=s.comments),u.config.tokens&&(l.tokens=u.tokens),u.config.tolerant&&(l.errors=u.errorHandler.errors),l}var ze={},yt;function Qn(){return yt||(yt=1,(function(i){(function e(t){var s,n,r,a,o,u;function c(E){var g={},y,C;for(y in E)E.hasOwnProperty(y)&&(C=E[y],typeof C=="object"&&C!==null?g[y]=c(C):g[y]=C);return g}function l(E,g){var y,C,I,B;for(C=E.length,I=0;C;)y=C>>>1,B=I+y,g(E[B])?C=y:(I=B+1,C-=y+1);return I}s={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ChainExpression:"ChainExpression",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",PrivateIdentifier:"PrivateIdentifier",Program:"Program",Property:"Property",PropertyDefinition:"PropertyDefinition",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},r={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},a={},o={},u={},n={Break:a,Skip:o,Remove:u};function p(E,g){this.parent=E,this.key=g}p.prototype.replace=function(g){this.parent[this.key]=g},p.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function d(E,g,y,C){this.node=E,this.path=g,this.wrap=y,this.ref=C}function D(){}D.prototype.path=function(){var g,y,C,I,B,L;function b(v,A){if(Array.isArray(A))for(C=0,I=A.length;C<I;++C)v.push(A[C]);else v.push(A)}if(!this.__current.path)return null;for(B=[],g=2,y=this.__leavelist.length;g<y;++g)L=this.__leavelist[g],b(B,L.path);return b(B,this.__current.path),B},D.prototype.type=function(){var E=this.current();return E.type||this.__current.wrap},D.prototype.parents=function(){var g,y,C;for(C=[],g=1,y=this.__leavelist.length;g<y;++g)C.push(this.__leavelist[g].node);return C},D.prototype.current=function(){return this.__current.node},D.prototype.__execute=function(g,y){var C,I;return I=void 0,C=this.__current,this.__current=y,this.__state=null,g&&(I=g.call(this,y.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=C,I},D.prototype.notify=function(g){this.__state=g},D.prototype.skip=function(){this.notify(o)},D.prototype.break=function(){this.notify(a)},D.prototype.remove=function(){this.notify(u)},D.prototype.__initialize=function(E,g){this.visitor=g,this.root=E,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,g.fallback==="iteration"?this.__fallback=Object.keys:typeof g.fallback=="function"&&(this.__fallback=g.fallback),this.__keys=r,g.keys&&(this.__keys=Object.assign(Object.create(this.__keys),g.keys))};function F(E){return E==null?!1:typeof E=="object"&&typeof E.type=="string"}function m(E,g){return(E===s.ObjectExpression||E===s.ObjectPattern)&&g==="properties"}function w(E,g){for(var y=E.length-1;y>=0;--y)if(E[y].node===g)return!0;return!1}D.prototype.traverse=function(g,y){var C,I,B,L,b,v,A,P,R,z,X,H;for(this.__initialize(g,y),H={},C=this.__worklist,I=this.__leavelist,C.push(new d(g,null,null,null)),I.push(new d(null,null,null,null));C.length;){if(B=C.pop(),B===H){if(B=I.pop(),v=this.__execute(y.leave,B),this.__state===a||v===a)return;continue}if(B.node){if(v=this.__execute(y.enter,B),this.__state===a||v===a)return;if(C.push(H),I.push(B),this.__state===o||v===o)continue;if(L=B.node,b=L.type||B.wrap,z=this.__keys[b],!z)if(this.__fallback)z=this.__fallback(L);else throw new Error("Unknown node type "+b+".");for(P=z.length;(P-=1)>=0;)if(A=z[P],X=L[A],!!X){if(Array.isArray(X)){for(R=X.length;(R-=1)>=0;)if(X[R]&&!w(I,X[R])){if(m(b,z[P]))B=new d(X[R],[A,R],"Property",null);else if(F(X[R]))B=new d(X[R],[A,R],null,null);else continue;C.push(B)}}else if(F(X)){if(w(I,X))continue;C.push(new d(X,A,null,null))}}}}},D.prototype.replace=function(g,y){var C,I,B,L,b,v,A,P,R,z,X,H,te;function He(Ie){var Ne,qe,le,Qe;if(Ie.ref.remove()){for(qe=Ie.ref.key,Qe=Ie.ref.parent,Ne=C.length;Ne--;)if(le=C[Ne],le.ref&&le.ref.parent===Qe){if(le.ref.key<qe)break;--le.ref.key}}}for(this.__initialize(g,y),X={},C=this.__worklist,I=this.__leavelist,H={root:g},v=new d(g,null,null,new p(H,"root")),C.push(v),I.push(v);C.length;){if(v=C.pop(),v===X){if(v=I.pop(),b=this.__execute(y.leave,v),b!==void 0&&b!==a&&b!==o&&b!==u&&v.ref.replace(b),(this.__state===u||b===u)&&He(v),this.__state===a||b===a)return H.root;continue}if(b=this.__execute(y.enter,v),b!==void 0&&b!==a&&b!==o&&b!==u&&(v.ref.replace(b),v.node=b),(this.__state===u||b===u)&&(He(v),v.node=null),this.__state===a||b===a)return H.root;if(B=v.node,!!B&&(C.push(X),I.push(v),!(this.__state===o||b===o))){if(L=B.type||v.wrap,R=this.__keys[L],!R)if(this.__fallback)R=this.__fallback(B);else throw new Error("Unknown node type "+L+".");for(A=R.length;(A-=1)>=0;)if(te=R[A],z=B[te],!!z)if(Array.isArray(z)){for(P=z.length;(P-=1)>=0;)if(z[P]){if(m(L,R[A]))v=new d(z[P],[te,P],"Property",new p(z,P));else if(F(z[P]))v=new d(z[P],[te,P],null,new p(z,P));else continue;C.push(v)}}else F(z)&&C.push(new d(z,te,null,new p(B,te)))}}return H.root};function N(E,g){var y=new D;return y.traverse(E,g)}function M(E,g){var y=new D;return y.replace(E,g)}function O(E,g){var y;return y=l(g,function(I){return I.range[0]>E.range[0]}),E.extendedRange=[E.range[0],E.range[1]],y!==g.length&&(E.extendedRange[1]=g[y].range[0]),y-=1,y>=0&&(E.extendedRange[0]=g[y].range[1]),E}function J(E,g,y){var C=[],I,B,L,b;if(!E.range)throw new Error("attachComments needs range information");if(!y.length){if(g.length){for(L=0,B=g.length;L<B;L+=1)I=c(g[L]),I.extendedRange=[0,E.range[0]],C.push(I);E.leadingComments=C}return E}for(L=0,B=g.length;L<B;L+=1)C.push(O(c(g[L]),y));return b=0,N(E,{enter:function(v){for(var A;b<C.length&&(A=C[b],!(A.extendedRange[1]>v.range[0]));)A.extendedRange[1]===v.range[0]?(v.leadingComments||(v.leadingComments=[]),v.leadingComments.push(A),C.splice(b,1)):b+=1;if(b===C.length)return n.Break;if(C[b].extendedRange[0]>v.range[1])return n.Skip}}),b=0,N(E,{leave:function(v){for(var A;b<C.length&&(A=C[b],!(v.range[1]<A.extendedRange[0]));)v.range[1]===A.extendedRange[0]?(v.trailingComments||(v.trailingComments=[]),v.trailingComments.push(A),C.splice(b,1)):b+=1;if(b===C.length)return n.Break;if(C[b].extendedRange[0]>v.range[1])return n.Skip}}),E}return t.Syntax=s,t.traverse=N,t.replace=M,t.attachComments=J,t.VisitorKeys=r,t.VisitorOption=n,t.Controller=D,t.cloneEnvironment=function(){return e({})},t})(i)})(ze)),ze}var Zn=Qn();const Ve=ue(Zn);function er(i,e){return k.getCurrentScope()?(k.onScopeDispose(i,e),!0):!1}const Pt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const tr=Object.prototype.toString,sr=i=>tr.call(i)==="[object Object]",$e=()=>{};function ir(...i){if(i.length!==1)return k.toRef(...i);const e=i[0];return typeof e=="function"?k.readonly(k.customRef(()=>({get:e,set:$e}))):k.ref(e)}function nr(i,e){function t(...s){return new Promise((n,r)=>{Promise.resolve(i(()=>e.apply(this,s),{fn:e,thisArg:this,args:s})).then(n).catch(r)})}return t}const Mt=i=>i();function rr(i,e={}){let t,s,n=$e;const r=u=>{clearTimeout(u),n(),n=$e};let a;return u=>{const c=k.toValue(i),l=k.toValue(e.maxWait);return t&&r(t),c<=0||l!==void 0&&l<=0?(s&&(r(s),s=void 0),Promise.resolve(u())):new Promise((p,d)=>{n=e.rejectOnCancel?d:p,a=u,l&&!s&&(s=setTimeout(()=>{t&&r(t),s=void 0,p(a())},l)),t=setTimeout(()=>{s&&r(s),s=void 0,p(u())},c)})}}function ar(i=Mt,e={}){const{initialState:t="active"}=e,s=ir(t==="active");function n(){s.value=!1}function r(){s.value=!0}const a=(...o)=>{s.value&&i(...o)};return{isActive:k.readonly(s),pause:n,resume:r,eventFilter:a}}function Je(i){return Array.isArray(i)?i:[i]}function or(i){return k.getCurrentInstance()}function Ot(i,e,t={}){const{eventFilter:s=Mt,...n}=t;return k.watch(i,nr(s,e),n)}function ur(i,e,t={}){const{eventFilter:s,initialState:n="active",...r}=t,{eventFilter:a,pause:o,resume:u,isActive:c}=ar(s,{initialState:n});return{stop:Ot(i,e,{...r,eventFilter:a}),pause:o,resume:u,isActive:c}}function Rt(i,e=!0,t){or()?k.onMounted(i,t):e?i():k.nextTick(i)}function Lt(i,e,t={}){const{debounce:s=0,maxWait:n=void 0,...r}=t;return Ot(i,e,{...r,eventFilter:rr(s,{maxWait:n})})}function cr(i,e,t){return k.watch(i,e,{...t,immediate:!0})}const ne=Pt?window:void 0,lr=Pt?window.document:void 0;function hr(i){var e;const t=k.toValue(i);return(e=t?.$el)!==null&&e!==void 0?e:t}function At(...i){const e=(s,n,r,a)=>(s.addEventListener(n,r,a),()=>s.removeEventListener(n,r,a)),t=k.computed(()=>{const s=Je(k.toValue(i[0])).filter(n=>n!=null);return s.every(n=>typeof n!="string")?s:void 0});return cr(()=>{var s,n;return[(s=(n=t.value)===null||n===void 0?void 0:n.map(r=>hr(r)))!==null&&s!==void 0?s:[ne].filter(r=>r!=null),Je(k.toValue(t.value?i[1]:i[0])),Je(k.unref(t.value?i[2]:i[1])),k.toValue(t.value?i[3]:i[2])]},([s,n,r,a],o,u)=>{if(!s?.length||!n?.length||!r?.length)return;const c=sr(a)?{...a}:a,l=s.flatMap(p=>n.flatMap(d=>r.map(D=>e(p,d,D,c))));u(()=>{l.forEach(p=>p())})},{flush:"post"})}const ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ae="__vueuse_ssr_handlers__",pr=dr();function dr(){return Ae in ye||(ye[Ae]=ye[Ae]||{}),ye[Ae]}function fr(i,e){return pr[i]||e}function mr(i){return i==null?"any":i instanceof Set?"set":i instanceof Map?"map":i instanceof Date?"date":typeof i=="boolean"?"boolean":typeof i=="string"?"string":typeof i=="object"?"object":Number.isNaN(i)?"any":"number"}const Dr={boolean:{read:i=>i==="true",write:i=>String(i)},object:{read:i=>JSON.parse(i),write:i=>JSON.stringify(i)},number:{read:i=>Number.parseFloat(i),write:i=>String(i)},any:{read:i=>i,write:i=>String(i)},string:{read:i=>i,write:i=>String(i)},map:{read:i=>new Map(JSON.parse(i)),write:i=>JSON.stringify(Array.from(i.entries()))},set:{read:i=>new Set(JSON.parse(i)),write:i=>JSON.stringify(Array.from(i))},date:{read:i=>new Date(i),write:i=>i.toISOString()}},Ft="vueuse-storage";function xr(i,e,t,s={}){var n;const{flush:r="pre",deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:u=!0,mergeDefaults:c=!1,shallow:l,window:p=ne,eventFilter:d,onError:D=A=>{console.error(A)},initOnMounted:F}=s,m=(l?k.shallowRef:k.ref)(typeof e=="function"?e():e),w=k.computed(()=>k.toValue(i));if(!t)try{t=fr("getDefaultStorage",()=>ne?.localStorage)()}catch(A){D(A)}if(!t)return m;const N=k.toValue(e),M=mr(N),O=(n=s.serializer)!==null&&n!==void 0?n:Dr[M],{pause:J,resume:E}=ur(m,A=>B(A),{flush:r,deep:a,eventFilter:d});k.watch(w,()=>b(),{flush:r});let g=!1;const y=A=>{F&&!g||b(A)},C=A=>{F&&!g||v(A)};p&&o&&(t instanceof Storage?At(p,"storage",y,{passive:!0}):At(p,Ft,C)),F?Rt(()=>{g=!0,b()}):b();function I(A,P){if(p){const R={key:w.value,oldValue:A,newValue:P,storageArea:t};p.dispatchEvent(t instanceof Storage?new StorageEvent("storage",R):new CustomEvent(Ft,{detail:R}))}}function B(A){try{const P=t.getItem(w.value);if(A==null)I(P,null),t.removeItem(w.value);else{const R=O.write(A);P!==R&&(t.setItem(w.value,R),I(P,R))}}catch(P){D(P)}}function L(A){const P=A?A.newValue:t.getItem(w.value);if(P==null)return u&&N!=null&&t.setItem(w.value,O.write(N)),N;if(!A&&c){const R=O.read(P);return typeof c=="function"?c(R,N):M==="object"&&!Array.isArray(R)?{...N,...R}:R}else return typeof P!="string"?P:O.read(P)}function b(A){if(!(A&&A.storageArea!==t)){if(A&&A.key==null){m.value=N;return}if(!(A&&A.key!==w.value)){J();try{const P=O.write(m.value);(A===void 0||A?.newValue!==P)&&(m.value=L(A))}catch(P){D(P)}finally{A?k.nextTick(E):E()}}}}function v(A){b(A.detail)}return m}function Er(i,e,t={}){const{window:s=ne}=t;return xr(i,e,s?.localStorage,t)}function Ge(i,e){const s=k.shallowReactive(new Map),n=(...l)=>JSON.stringify(l),r=(l,...p)=>(s.set(l,i(...p)),s.get(l)),a=(...l)=>r(n(...l),...l),o=(...l)=>{s.delete(n(...l))},u=()=>{s.clear()},c=(...l)=>{const p=n(...l);return s.has(p)?s.get(p):r(p,...l)};return c.load=a,c.delete=o,c.clear=u,c.generateKey=n,c.cache=s,c}let gr=0;function Cr(i,e={}){const t=k.shallowRef(!1),{document:s=lr,immediate:n=!0,manual:r=!1,id:a=`vueuse_styletag_${++gr}`}=e,o=k.shallowRef(i);let u=()=>{};const c=()=>{if(!s)return;const p=s.getElementById(a)||s.createElement("style");p.isConnected||(p.id=a,e.nonce&&(p.nonce=e.nonce),e.media&&(p.media=e.media),s.head.appendChild(p)),!t.value&&(u=k.watch(o,d=>{p.textContent=d},{immediate:!0}),t.value=!0)},l=()=>{!s||!t.value||(u(),s.head.removeChild(s.getElementById(a)),t.value=!1)};return n&&!r&&Rt(c),r||er(l),{id:a,css:o,unload:l,load:c,isLoaded:k.readonly(t)}}window._METHOD_DEBUG_=Tt;const ce=Ge(wr),me=Ge(Sr);function _t(i){return i.type===h.MemberExpression?`${i.object.type===h.MemberExpression?_t(i.object):i.object.name}.${i.property.name}`:i.type===h.Identifier?i.name:""}const yr=Object.getPrototypeOf(async function(){}).constructor;async function Ar(i){let e=[];return i.length>0&&(e=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:i.join(",")})),e}const Fr=Ge(Ar);async function Sr(i,e){const t=ce(i,!0),s=t.filter(d=>x.innerVarIds.includes(d)).sort(),n=t.filter(d=>d.startsWith(x.SYSTEM_VAR_PREFIX)).sort(),r=await Fr([...s,...n]),a=Nt(i);Ve.replace(a,{enter(d){if(d.type===h.BinaryExpression){const{operator:D}=d,F=x.operator2FuncMap[D];return F?{type:h.CallExpression,arguments:[d.left,d.right],callee:{type:h.Identifier,name:F},optional:!1}:d}return d}}),Ve.traverse(a,{enter:function(d){d.type===h.CallExpression&&d.callee.type===h.Identifier&&(d.callee.name=`await Methods.${d.callee.name}`)}});const o="",u={},c=[];r.forEach(d=>{c.push(`const ${d.key} = ${JSON.stringify(d.value)};`)}),Object.keys(e).map(d=>{if(d.includes(".")){const[D="",F]=d.split(".");u[D]||(c.push(`const ${D} = {};`),u[D]=!0),c.push(`${D}.${F} = ${JSON.stringify(e[d])};`)}else c.push(`const ${d} = ${JSON.stringify(e[d])};`)});const l=new yr("Methods",[...c,"return new Promise(async(resolve)=>{",`const res = ${o};`,"resolve(res);","})"].join(`
9
- `)),p=await l(Tt);return console.info("【表达式】",i),console.info("【参数】",e),console.info("【执行语句】",l.toString()),console.info("【执行结果】",p),p}function wr(i,e=!1){const t=Nt(i);let s=[];return Ve.traverse(t,{enter:function(n){if(n.type===h.MemberExpression){const r=_t(n);s.push(r),Object.assign(n,{name:r,type:h.Identifier})}else n.type===h.Identifier&&s.push(n.name);e?s=s.filter(r=>!x.functionMap[r]&&r!=="undefined"):s=s.filter(r=>!x.functionMap[r]&&r!=="undefined"&&!x.innerVarIds.includes(r)&&!r.startsWith(x.SYSTEM_VAR_PREFIX)&&!r.startsWith("undefined."))}}),[...new Set(s)]}window.gct_expression={execute:me,identify:ce};function kr(i,e,t=!1){if(t||i?.customApi?.value)return e(i);const s=5e3,n=typeof i=="object"?Jt.stringify({...i,customApi:null}):i;let r=Xe.get(n);return r||(r=(async()=>{try{return await e(i)}catch(a){throw Xe.delete(n),a}})(),Xe.set(n,r,s),r)}class Xe{static cachedata={};static set(e,t,s){this.cachedata[e]={maxAge:s||0,value:t,now:Date.now()}}static get(e){this.reset();const t=this.cachedata[e];return t?t.value:null}static delete(e){return delete this.cachedata[e]}static clear(){this.cachedata={}}static reset(){for(const e in this.cachedata){const t=this.cachedata[e];t&&Date.now()-t.now>t.maxAge&&this.delete(e)}}}async function br({ids:i,refOriginField:e,refOriginFieldType:t,model:s,foreignFields:n}){if(!i)return Promise.reject();const r=await vr({refOriginFieldType:t,modelKey:s,foreignFields:n,ids:i});if(r?.data)return vt(e,r.data,r.dict)}async function vr({refOriginFieldType:i,modelKey:e,foreignFields:t,ids:s}){if(i===x.FIELD_TYPE.RDO_REF){const{data:n={},dict:r={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:e,bsKey:"rdoGetVersionByRefId",modelCategory:x.EntityModelCategoryEnum.ENTITY},{foreignFields:t},{refId:s});return{data:n,dict:r}}else{const{data:n={},dict:r={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:e,bsKey:"getOne",modelCategory:x.EntityModelCategoryEnum.ENTITY},{query:{"id_.eq":s},foreignFields:t},{});return{data:n,dict:r}}}const Br=i=>kr(i,br);var pe=(i=>(i.SELECT_ID="$VAR_GCT_SELECT_ID",i))(pe||{});const St=Er("GCT_APP_GlobalCache",{}),Tr=i=>{const e=k.computed({get(){return St.value[i]||{}},set(s){St.value[i]=s}});return{selectID:k.computed({get(){return e.value[pe.SELECT_ID]},set(s){e.value[pe.SELECT_ID]?e.value[pe.SELECT_ID]=s:e.value={...e.value,[pe.SELECT_ID]:s}}}),cacheMap:e}};class Ye{static ENV;static AID;static userInfo;static runApp({userInfo:e,env:t,aid:s}){this.ENV=t,this.AID=s,this.userInfo=e}}const Ir=({value:i,appredis:e,key:t,type:s})=>{const n=Ye.ENV!=="dev"?e:!1,r=`${Ye.AID}_${Ye.userInfo?.userId}`,{cacheMap:a}=Tr(r);return new Proxy({value:i,type:s},{get(u,c){return n&&c==="value"?a.value[t]:Reflect.get(u,c)},set(u,c,l,p){return n&&c==="value"&&(a.value[t]?a.value[t]=l:a.value={...a.value,[t]:l}),Reflect.set(u,c,l,p)}})},Nr={[x.GLOBAL_VAR_TYPE.DATE]:{callback(i){return T(i,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid()},message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[x.GLOBAL_VAR_TYPE.TIME]:{callback(i){return T(i,"HH:mm:ss",!0).isValid()},message:"时间变量格式HH:mm:ss"},[x.GLOBAL_VAR_TYPE.DATETIME]:{callback(i){return T(i,["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss"]).isValid()},message:"日期时间变量格式为YYYY-MM-DD HH:mm:ss,YYYY/MM/DD HH:mm:ss"}};function Pr(i,e){if(e===x.GLOBAL_VAR_TYPE.NULL)return!0;const{callback:t,message:s}=Nr[e]||{callback(n){return Object.prototype.toString.call(n).slice(8,-1).toLowerCase()===e}};return t(i)?Promise.resolve():Promise.reject(s)}const Mr={web_module:{getPageInfo:_gct.api.apaas.webpage.getInfo},mobile_module:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},pad_module:{getPageInfo:_gct.api.apaas.padPage.getInfo}},$=k.ref({}),re=k.ref({}),ae=k.ref({});function Or(i,e){ae.value[i]=e}const q=k.ref({pageStyle:{},pageConfig:{},pageName:""}),Rr=k.toRef(()=>{const{title:i}=q.value.pageConfig||{};return i});class K{static modalsCache={};static pageID="";static permissions={};static ContextCache={};static startRuning=!1;static globalHookCaches={pageMounted:[],pageActivated:[],pageDestroyed:[]};static setModals(e){this.modalsCache={},e?.forEach(t=>{this.modalsCache[t.id]=t})}static async getModalById(e){if(!e)return Promise.reject();if(/^i?g_modal_/.test(e)&&!this.modalsCache[e]){const[s]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(s?.configJson){const n=JSON.parse(s.configJson);this.modalsCache[e]=n}}const t=this.modalsCache[e];return t||(console.error(`模态框${e}不存在`),Promise.reject())}static getPremission(e){if(!e)return!0;const t=this.permissions[e];return t?x.usePermissionStore().getPermissionByKey(this.pageID,t):!0}static setPremission(e,t){this.permissions[t]=e}static setContextByKey(e,t){t?this.ContextCache[t]=e:this.ContextCache={page:e}}static getContextByKey(e){return this.ContextCache[e||"page"]}static async initvars(){(await _gct.api.apaas.appGlobalSettings.getList({type:"var",fullInfo:!0})||[]).forEach(t=>{if(t.configJson)try{const s=JSON.parse(t.configJson);re.value[s.key]=Ir({value:s.defaultValue,appredis:s.appredis,key:s.key,type:s.type})}catch(s){console.error("initvars",s)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(t=>{if(t.configJson)try{const s=new Function(JSON.parse(t.configJson).runJs),n=this.globalHookCaches[t.key];n&&n.push(s)}catch(s){console.error("inithooks",s)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){if(this.setModals(e.modals),e.pageVars?.forEach(t=>{$.value[t.key]={value:t.varInfo?.defaultValue,type:t.varInfo.type}}),!this.startRuning){this.startRuning=!0;try{await Promise.all([this.initvars(),this.inithooks()])}catch(t){console.log(t)}}}static getGlobalVar(e){const t=re.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const s=re.value[e];if(!s)return console.warn("变量key不存在");s.value=t}static getPageVar(e){const t=$.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const s=$.value[e];if(!s)return console.warn("变量key不存在");await Pr(t,s.type),$.value[e]&&($.value[e].value=t)}static getPageGlobalVar(e){return $.value[e]?.value}static setPageGlobalVar(e,t){$.value[e]?$.value[e].value=t:$.value[e]={value:t,type:"string"}}static async initPageByid(e,t="web_module"){this.pageID=e;const s=Mr[t].getPageInfo,n=await s({id:e}),{runtimeJson:r,name:a}=n||{};if(q.value.pageName=a,!r)return Promise.reject();const o=JSON.parse(r);return o.widgets.filter(u=>u.type!=="bottom-button-container").length?(await this.initGlobalS(o),q.value.pageConfig=o.pageConfig||{},q.value.pageStyle=o.pageStyle||{},{res:n,data:o,name:a}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:s,name:n}=t||{};if(!s)return Promise.reject();q.value.pageName=n;const r=JSON.parse(s);return await this.initGlobalS(r),q.value.pageConfig=r.pageConfig||{},q.value.pageStyle=r.pageStyle||{},{res:t,data:r,name:n}}static usePageHooks(e,t,s,n){const r=k.ref(!1);return k.onMounted(async()=>{await k.nextTick();const a=t?.pageBeforeMount;if(a?.name&&await e.runExportByName(a.name,a.extraParams),n&&await n(e),r.value=!0,s.pageMounted)for(const c of this.globalHookCaches.pageMounted)await c();const{extraParams:o,name:u}=t?.pageMounted||{};u&&e.runAsyncExportByName(u,o)}),k.onBeforeUnmount(async()=>{q.value={};const{extraParams:a,name:o}=t?.pageDestroyed||{};if(o&&e.runExportByName(o,a),s.pageDestroyed)for(const u of this.globalHookCaches.pageDestroyed)await u()}),k.onActivated(async()=>{if(K.setContextByKey(e.context),s.pageActivated)for(const u of this.globalHookCaches.pageActivated)await u();const{extraParams:a,name:o}=t?.pageActivated||{};o&&e.runAsyncExportByName(o,a)}),{pageload:r}}}const Te=K.getPremission.bind(K),Fe=i=>(e,t={},s={},n={})=>i({modelKey:e.key,bsKey:e.action,modelCategory:e.modelCategory??x.EntityModelCategoryEnum.ENTITY},t,s,n),Ut={post:Fe(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:Fe(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:Fe(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:Fe(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function Lr(i,e,t={}){const s=x.BizServiceEnum[i.action];return Ut[s](i,e,t)}async function _r(i,e,{body:t={},query:s={}}={},n={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:e,modelKey:i,modelCategory:x.EntityModelCategoryEnum.ENTITY},s,t,n)}class de{static instance;mask;container;spinner;constructor(){if(de.instance)return de.instance;de.instance=this,this.createLoadingElement(),this.initStyle()}createLoadingElement(){this.mask=document.createElement("div"),this.mask.id="gct-global-loading-mask",this.container=document.createElement("div"),this.container.id="gct-global-loading-container",this.spinner=document.createElement("div"),this.spinner.id="gct-global-loading-spinner",this.container.appendChild(this.spinner),this.mask.appendChild(this.container),document.body.appendChild(this.mask)}initStyle(){Object.assign(this.mask.style,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(255, 255, 255, 0.5)",zIndex:9999,display:"none",justifyContent:"center",alignItems:"center"}),Object.assign(this.container.style,{display:"flex",flexDirection:"column",alignItems:"center",width:"43px",height:"43px",backgroundColor:"transparent",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.15)"}),Object.assign(this.spinner.style,{display:"grid",width:"43px",height:"43px",gridTemplateColumns:"repeat(2, 1fr)",gridTemplateRows:"repeat(2, 1fr)",gap:"3px"});const t=getComputedStyle(document.documentElement).getPropertyValue("--gct-color-primary").trim();[{id:"gct-global-loading-item_1",delay:"0s"},{id:"gct-global-loading-item_2",delay:"0.25s"},{id:"gct-global-loading-item_3",delay:"0.75s"},{id:"gct-global-loading-item_4",delay:"0.5s"}].forEach(r=>{const a=document.createElement("div");a.id=r.id,Object.assign(a.style,{backgroundColor:t,opacity:.2,animation:"globalLoading 1s infinite",animationDelay:r.delay}),this.spinner.appendChild(a)});const n=document.createElement("style");n.textContent=`
10
- @keyframes globalLoading {
11
- 0% {
12
- opacity: 1;
13
- }
14
- 100% {
15
- opacity: 0.2;
16
- }
17
- }`,document.head.appendChild(n)}show(){this.mask.style.display="flex",document.body.style.overflow="hidden"}hide(){this.mask.style.display="none",document.body.style.overflow=""}}const Ur=new de;class zr{isHandle=!1;buttonConfig={};fieldConfig={};processId="";dataId="";taskId;processInstanceId;refFormId;examineAndApproveState=x.ExamineAndApproveStateEnum.MY_CUSTOM;fieldStatus="";viewPageKey;isviewPage;isAPPviewPage;nonRelatedPerson=!1;constructor({taskId:e,processInstanceId:t,examineAndApproveState:s=x.ExamineAndApproveStateEnum.MY_CUSTOM,refFormId:n}){this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=s,this.refFormId=n}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_AGENT){await this.getDataInfo();const{node:s,processDefId:n,webViewPageKey:r,mobileViewPageKey:a}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(s),this.processId=n;for(const o in this.buttonConfig)o===x.ButtonTypeEnum.Withdraw&&(this.buttonConfig[o].show=!1);this.viewPageKey=s?.webViewPageKey||r,this.isAPPviewPage=!!s?.mobileViewPageKey||!!a}if(this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_APPLICATION){await this.getDataInfo();const{node:s,processDefId:n,withdrawOp:r}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(s),this.processId=n;for(const a in this.buttonConfig)a===x.ButtonTypeEnum.End&&(this.buttonConfig[a].show=!1),a===x.ButtonTypeEnum.Withdraw&&(this.buttonConfig[a].show=!!r),a===x.ButtonTypeEnum.Resubmit&&(this.buttonConfig[a].show=!1)}if(this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_DONE){await this.getDataInfo();const{node:s,processDefId:n}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(s),this.processId=n}if(this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_CUSTOM){await this.getDataInfo();const{node:s,processDefId:n,btnList:r,webViewPageKey:a,taskId:o,initiatorNode:u}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),c=r||[];this.withdrawByNode(u),this.transformByNode(s),this.processId=n;for(const l in this.buttonConfig){const p=l;this.buttonConfig[p].show&&(this.buttonConfig[p].show=c.includes(l))}if(!s){this.nonRelatedPerson=!0;return}!c.length||s?.key==="__initiator__"&&!o?this.isviewPage=!0:this.viewPageKey=s?.webViewPageKey||a}if(this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_CUSTOM_Modal){await this.getDataInfo();const{node:s,btnList:n,taskId:r,processDefId:a,initiatorNode:o}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),u=n||[];this.withdrawByNode(o),this.transformByNode(s),this.processId=a;for(const c in this.buttonConfig){const l=c;this.buttonConfig[l].show&&(this.buttonConfig[l].show=u.includes(c))}if(!s){this.nonRelatedPerson=!0;return}(!u.length||s?.key==="__initiator__"&&!r)&&(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(n=>{const r=x.t(`sys.process.paasBpmnButtonEvent.${n.type}`);this.buttonConfig[n.type]={showModel:!1,title:x.t("sys.process.element.approval")+r,success:r+x.t("sys.success")+"!",show:n.enable,alias:n.alias,signature:!!n.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:s,fieldConfig:n}=e,r=JSON.parse(s||"[]"),a=JSON.parse(t||'{"enabled":false,"opinionType":[]}');r.forEach(o=>{const u=x.t(`sys.process.paasBpmnButtonEvent.${o.type}`);this.buttonConfig[o.type]={showModel:![x.ButtonTypeEnum.Resubmit,x.ButtonTypeEnum.Withdraw,x.ButtonTypeEnum.End].includes(o.type),title:x.t("sys.process.element.approval")+u,success:u+x.t("sys.success")+"!",show:o.enable,alias:o.alias,signature:!!o.signature,opinion:{show:a.enabled,required:Jr(a.opinionType,o.type)},user:{show:[x.ButtonTypeEnum.Reassign,x.ButtonTypeEnum.Countersign].includes(o.type),multiple:x.ButtonTypeEnum.Countersign===o.type,label:x.t(`sys.process.user.${o.type}`)}}}),this.fieldConfig=JSON.parse(n+"")}catch(t){console.log("流程信息解析失败",t)}}async getDataInfo(){const{dataId:e}=await _gct.api.apaas.pmProcessEngine.getModel({processInstanceId:this.processInstanceId});this.dataId=e}filterButton(e){return this.nonRelatedPerson?[]:this.examineAndApproveState===x.ExamineAndApproveStateEnum.MY_DONE?[]:e.filter(t=>{if(t.type===x.FormComponents.ProcessApproveButton){const s=this.buttonConfig[t.props.action],n=!!s?.show;return n&&(t.props.title=s.alias),n}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:s,examineAndApproveState:n}=this;if(s&&s[t]){const{permission:r}=s[t];switch(r){case"disabled":e.props.disabled=!0,e.props.readonly=!1;break;case"editable":e.props.disabled=!1,e.props.readonly=!1;break;case"readonly":e.props.readonly=!0;break}}else e.props.readonly=!0;!e.props.disabled&&([x.ExamineAndApproveStateEnum.MY_APPLICATION,x.ExamineAndApproveStateEnum.MY_DONE].includes(n)||this.isviewPage)&&(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:s}=this;if(s&&s[t]){const{permission:n}=s[t];n==="hidden"&&(e.props.hidden=!0)}}}function Jr(i,e){if(i.includes(x.OpinionTypeEnum.Required))return!0;if(i.includes(x.OpinionTypeEnum.Optional))return!1;if(i.includes(x.OpinionTypeEnum.ApproveRequired)||i.includes(x.OpinionTypeEnum.ApproveRequired))return e===x.ButtonTypeEnum.Approve;if(i.includes(x.OpinionTypeEnum.CountersignRequired))return e===x.ButtonTypeEnum.Countersign;if(i.includes(x.OpinionTypeEnum.ReassignRequired))return e===x.ButtonTypeEnum.Reassign;if(i.includes(x.OpinionTypeEnum.RejectRequired))return e===x.ButtonTypeEnum.Reject;if(i.includes(x.OpinionTypeEnum.RefuseRequired))return e===x.ButtonTypeEnum.Refuse}class Xr{context;searchVNodes;cssData;pageKey;exports;#e;#t;ProcessAppRoved;pageLayoutMode;constructor({js:e,css:t,pageKey:s,ContextPc:n}){this.cssData=this.#s(t),this.searchVNodes={},this.exports={},this.#t={},this.#e={},this.context=new n({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),this.#i(e),K.setContextByKey(this.context,s),this.pageKey=s}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:n}){this.ProcessAppRoved=new zr({taskId:e,processInstanceId:t,examineAndApproveState:s,refFormId:n}),await this.ProcessAppRoved.readyProcess()}#s(e,t={}){if(!e)return;const{css:s,load:n,unload:r}=Cr(e,t);return{css:s,load:n,unload:r}}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...s){const n=t[e];let r;if(n){if(Array.isArray(n))r=await Kr(n,this.context,s);else{const a=this.exports[n.name];if(!a)throw`函数${n.name}不存在`;r=await a(...s,k.toRaw(n.extraParams))}return r}}async runExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return s(...t)}catch(s){console.error(s)}}async runAsyncExportByName(e,...t){try{const s=this.exports[e];if(!s)throw`函数${e}不存在`;return await this.getReadyByFun(s),s(...t)}catch(s){console.error(s)}}#i(e){if(e)try{new Function("exports","CTX",e)(this.exports,this.context)}catch(t){console.error(t,"createFunction")}}initNode(e,t){e&&(this.#t[e]=t,this.#r(e,t))}destroyNode(e){delete this.#t[e],delete this.#e[e]}initSearchs(e,t,s){if(e)if(this.searchVNodes[e]){const n=this.searchVNodes[e].find(r=>r.comId===s);n?n.callback=t:this.searchVNodes[e].push({callback:t,comId:s})}else this.searchVNodes[e]=[{callback:t,comId:s}]}cancelInitSearchs(e,t){!e||!this.searchVNodes[e]||(this.searchVNodes[e]=this.searchVNodes[e].filter(s=>s.comId!==t),this.searchVNodes[e].length===0&&delete this.searchVNodes[e])}runTableBySearch(e,t){(this.searchVNodes[e]||[]).forEach(({callback:n})=>n(t))}#n(e,t){const s=this.#t[e];s?t(e,s):this.#e[e]?this.#e[e].push(t):this.#e[e]=[t]}#r(e,t){this.#e[e]&&this.#e[e].forEach(s=>{s(t)})}getComponent(e){const t=this.#t[e];if(t)return new Be(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=this.#t[e];return t?Promise.resolve(new Be(e,t)):new Promise((s,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);this.#n(e,a=>{clearTimeout(r),s(new Be(e,a))})})}async getReadyByFun(e){if(typeof e!="function")return Promise.reject("参数必须是函数");const s=String(e).match(/\$ref\((["'A-Za-z0-9_-]+)\)/g)?.map(n=>{const r=n.match(/\$ref\(['|"]([A-Za-z0-9_-]+)['|"]\)/)?.[1];return this.getSyncComponent(r)})||[];await Promise.all(s)}async processHandle(e,{opinion:t,reassignId:s,signature:n,countersignUserIds:r,button:a}){const{taskId:o,processInstanceId:u}=this.ProcessAppRoved,c={procInstId:u,data:e,opinion:t,button:a,countersignUserIds:r,taskId:o,signature:n,reassignId:s};await _gct.api.apaas.pmProcessEngine.postProcExecute(c)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};if(!t)return Promise.reject(x.t("sys.process.pleaseInitiateTheProcessFirst"));if(e!==t)return Promise.reject(x.t("sys.process.processInstanceMismatch"))}}class Yr{$ref;$asyncRef;$getModal;$closeModal;$customBizService=Ut;gctWidgets={};constructor({$ref:e,$asyncRef:t}){this.$asyncRef=t,this.$ref=e}$utility={_:Yt,cloneDeep:j.cloneDeep,differenceBy:j.differenceBy,dayjs:T,BigNumber:_,plus(e,t){return new _(e).plus(new _(t)).toNumber()},minus(e,t){return new _(e).minus(new _(t)).toNumber()},multipliedBy(e,t){return new _(e).multipliedBy(new _(t)).toNumber()},div(e,t){return new _(e).div(new _(t)).toNumber()},transformSourceData:bt,transformData:oe};$httpBizService=Lr;$request=_r;$loading=Ur;$getPremission(e){return K.getPremission(e)}$setPremission(e,t){K.setPremission(e,t)}$getAppGlobalVar(e){return K.getGlobalVar(e)}$setAppGlobalVar(e,t){K.setGlobalVar(e,t)}$getPageGlobalVar(e){return K.getPageGlobalVar(e)}$setPageGlobalVar(e,t){K.setPageGlobalVar(e,t)}$getPageVar(e){return K.getPageVar(e)}$setPageVar(e,t){K.setPageVar(e,t)}$getCtxById(e){return K.getContextByKey(e)}$setPropsByKey(e,t){const s=this.gctWidgets[e]?.props;if(s)for(const n in t)s[n]=t[n]}$getPropsByKey(e,t=[],s){const n=this.gctWidgets[e];if(!n)return{};const r=s||!n.props?n:n.props;return typeof t=="string"&&(t=[t]),t.reduce((a,o)=>(a[o]=r[o],a),{})}}class Be{modelKey;getValue;setValue;submit;reload;key;constructor(e,t){this.key=e;const s=t.elRef;Object.keys(s).forEach(n=>{this[n]=s[n]})}}async function Kr(i,e,t){const s=i.map(Vr.bind(e,t));await Promise.all(s)}async function Vr(i,e){const{name:t,refId:s,scopeId:n,modalTitle:r}=e,a=r?.split(".")||[];let o;if(a.length>1){const u=this.gctWidgets?.[a[0]]||{},c=[];zt(c,u),o=c.find(l=>l.id===a[1])||{}}else a.length&&(o=this.gctWidgets?.[a[0]]);t===x.INNER_EVENT.OPEN_MODAL&&await this.$getModal(s).open({title:o?.props?.title}),t===x.INNER_EVENT.CLOSE_MODAL&&(s?await this.$getModal(s).close():await this.$closeModal()),t===x.INNER_EVENT.REFRESH_TABLE&&await(await this.$getCtxById(n).$asyncRef(s)).reload(i?i[0]:null)}function zt(i,e){const t=e.children||[];for(const s of t)s.type&&s.type==x.FormComponents.CustomButton?i.push(s):s.children?.length&&zt(i,s)}function fe({expression:i="",rowData:e=null},t){if(!i||i==="true"){t(!0);return}const s=ce(i),n=s.reduce((o,u)=>{const c=u.split(".");return o[u]={formKey:c[0],itemKey:c[1]},o},{}),r=k.computed(()=>s.reduce((o,u)=>{const c=u.split("."),l=c[0]+"",p=c[1];if(p){const d=(e?e[p]:ae.value[l]?.[p])??"";o[l]?o[l][p]=d:o[l]={[p]:d}}else l.startsWith("$VAR_")||l.startsWith("$IVAR_")?o[l]=re.value[l]?.value??"":(l.startsWith("$PAGERVAR_")||l.startsWith("$IPAGERVAR_"))&&(o[l]=$.value[l]?.value??"");return o},{}));function a(o){const u={};Object.keys(n).forEach(c=>{const{formKey:l,itemKey:p}=n[c],d=p?o[l]?.[p]:o[l];u[c]=d}),me(i,u).then(t)}e&&a(r.value),Lt(r,()=>{a(r.value)},{debounce:200,immediate:!e})}async function wt({expression:i="",rowData:e=null}){if(!i||i==="true")return!0;const s=ce(i).reduce((r,a)=>{const o=a.split(".");return r[a]={formKey:o[0],itemKey:o[1]},r},{}),n={};return Object.keys(s).forEach(r=>{const{formKey:a,itemKey:o}=s[r];let u="";a.startsWith("$VAR_")?u=re.value[a]?.value??"":a.startsWith("$PAGERVAR_")?u=$.value[a]?.value??"":o?u=(e?e[o]:ae.value[a]?.[o])??"":u=(e?e[a]:ae.value[a])??"",n[r]=u}),me(i,n)}function $r(i,e){return Te(e)?i.displayType===x.DisplayType.CONFIG?k.toRef(()=>!i.hidden):jr(i):!1}function jr(i){const e=k.ref(!1);return Gr(i,t=>{e.value=!!t}),e}function Gr({displayRule:i,tableForm:e},t){if(!i)t(!0);else{const s=ce(i),n=s.reduce((a,o)=>{const u=o.split(".");return a[o]={formKey:u[0],itemKey:u[1]},a},{}),r=k.toRef(()=>s.reduce((a,o)=>{const u=o.split("."),c=u[0]+"",l=u[1]+"",p={...e,...ae.value}[c]?.[l];return a[c]?a[c][l]=p:a[c]={[l]:p},a},{}));Lt(r,()=>{Wr(r.value,n,i,a=>{t(a)})},{immediate:!0,debounce:300})}}function Wr(i,e,t,s){const n={};Object.keys(e).forEach(r=>{const{formKey:a,itemKey:o}=e[r],u=i?.[a]?.[o];n[r]=u}),me(t,n).then(s)}function Hr(i){return i.props?.displayRule&&i.props?.displayType===x.DisplayType.RULE?$r(i.props,i.id):We(i)}function We(i,e){if(!i.id)return!1;if(!Te(i.id))return i.props.hidden=!0,!1;const t=k.inject("useProcessFieldEvent",void 0);if(t)return t.useFieldToShow(i),!i.props.hidden;const{displayType:s,displayRule:n}=i.props||{},r=i.props.componentDependency?.configDependency||{},{value:a,expression:o}=r[x.Dependency_ENUM.HIDDEN]||{};return a&&o?(i.props.hidden=!0,fe({expression:o,rowData:e},u=>{i.props.hidden=!!u})):a?i.props.hidden=!0:s===x.DisplayType.RULE&&n&&(i.props.hidden=!0,fe({expression:n,rowData:e},u=>{i.props.hidden=!u})),k.toRef(()=>!i.props.hidden)}async function qr(i,e){if(!i.id)return!1;if(!Te(i.id))return i.props.hidden=!0,!1;const t=k.inject("useProcessFieldEvent",void 0);if(t)return t.useFieldToShow(i),!i.props.hidden;const{displayType:s,displayRule:n}=i.props||{},r=i.props.componentDependency?.configDependency||{},{value:a,expression:o}=r[x.Dependency_ENUM.HIDDEN]||{};return a&&o?(i.props.hidden=!0,i.props.hidden=!!await wt({expression:o,rowData:e})):a?i.props.hidden=!0:s===x.DisplayType.RULE&&n&&(i.props.hidden=!0,i.props.hidden=!!await wt({expression:n,rowData:e})),!i.props.hidden}function Qr(i,e){return i.forEach(t=>{We(t,e)}),k.toRef(()=>i.filter(t=>!t.props.hidden))}function Zr(i,e){const t=i.props.componentDependency?.configDependency||{},{value:s,expression:n}=t[x.Dependency_ENUM.HIDDEN]||{};s&&n&&fe({expression:n},r=>{e(r)}),e(i.props.hidden)}function ea(i){const e=i.props.componentDependency?.configDependency||{},{value:t,expression:s}=e[x.Dependency_ENUM.HIDDEN]||{};t&&s&&fe({expression:s},a=>{i.props.hidden=!!a});const{value:n,expression:r}=e[x.Dependency_ENUM.REQUIRED]||{};n&&r&&fe({expression:r},a=>{i.props.required=!!a})}function ta(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new Kt}exports.Context=Yr;exports.Events=Xr;exports.FieldSchema=kt;exports.GctComponent=Be;exports.Globals=K;exports.addDataByForm=Wt;exports.calculate=me;exports.dependencyToShow=We;exports.dependencyToShowSync=qr;exports.formMap=ae;exports.getPageTitle=Rr;exports.getPremission=Te;exports.getRefInfoId=Br;exports.globalVarCaches=re;exports.identify=ce;exports.initFieldWidgetRuntime=Gt;exports.onInit=ta;exports.pageDataforJson=q;exports.pageGlobaVariables=$;exports.setDataByForm=Ht;exports.setFormData=Or;exports.tableWidgetByDept=ea;exports.tableWidgetToShow=Zr;exports.transSelectData=vt;exports.transformData=oe;exports.transformDataToDict=qt;exports.transformPropsField=$t;exports.transformSourceData=bt;exports.useDependencyToShow=Hr;exports.useDependencyToShowList=Qr;exports.useStyle=jt;