@gct-paas/render 0.1.4-dev.10

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 (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1 -0
  4. package/dist/index.esm.min.mjs +7825 -0
  5. package/dist/index.min.cjs +17 -0
  6. package/dist/index.system.min.js +17 -0
  7. package/es/Event/Dependency/controller.d.ts +13 -0
  8. package/es/Event/Dependency/controller.mjs +97 -0
  9. package/es/Event/Dependency/displayRule.d.ts +19 -0
  10. package/es/Event/Dependency/displayRule.mjs +76 -0
  11. package/es/Event/Dependency/useDependency.d.ts +7 -0
  12. package/es/Event/Dependency/useDependencyToShow.d.ts +10 -0
  13. package/es/Event/Dependency/useDependencyToShow.mjs +109 -0
  14. package/es/Event/baseEvent.d.ts +155 -0
  15. package/es/Event/baseEvent.mjs +430 -0
  16. package/es/Event/bizServiceRequest.d.ts +26 -0
  17. package/es/Event/bizServiceRequest.mjs +47 -0
  18. package/es/Event/eventType.d.ts +20 -0
  19. package/es/Event/index.d.ts +4 -0
  20. package/es/Event/utils/appRedis.d.ts +29 -0
  21. package/es/Event/utils/appRedis.mjs +50 -0
  22. package/es/Event/utils/globalLoading.d.ts +13 -0
  23. package/es/Event/utils/globalLoading.mjs +103 -0
  24. package/es/Event/utils/processRovedInfo.d.ts +100 -0
  25. package/es/Event/utils/processRovedInfo.mjs +297 -0
  26. package/es/Event/utils/runGlobalByPage.d.ts +333 -0
  27. package/es/Event/utils/runGlobalByPage.mjs +306 -0
  28. package/es/Event/utils/verificationVar.d.ts +2 -0
  29. package/es/Event/utils/verificationVar.mjs +42 -0
  30. package/es/enums/index.d.ts +14 -0
  31. package/es/enums/index.mjs +6 -0
  32. package/es/hooks/useStorageRef.d.ts +9 -0
  33. package/es/hooks/useStorageRef.mjs +33 -0
  34. package/es/index.d.ts +3 -0
  35. package/es/index.mjs +23 -0
  36. package/es/register/index.d.ts +1 -0
  37. package/es/register/render-register/render-register.d.ts +54 -0
  38. package/es/register/render-register/render-register.mjs +59 -0
  39. package/es/types/index.d.ts +7 -0
  40. package/es/utils/cacheAdapter.d.ts +7 -0
  41. package/es/utils/cacheAdapter.mjs +57 -0
  42. package/es/utils/expression/index.d.ts +6 -0
  43. package/es/utils/expression/index.mjs +133 -0
  44. package/es/utils/expression/regularExpression/methods.d.ts +77 -0
  45. package/es/utils/expression/regularExpression/methods.mjs +729 -0
  46. package/es/utils/field-attrs/basicAttrs.d.ts +12 -0
  47. package/es/utils/field-attrs/basicAttrs.mjs +82 -0
  48. package/es/utils/field-attrs/index.d.ts +6 -0
  49. package/es/utils/field-attrs/index.mjs +15 -0
  50. package/es/utils/get-ref-data.d.ts +1 -0
  51. package/es/utils/get-ref-data.mjs +62 -0
  52. package/es/utils/getFieldSchema.d.ts +26 -0
  53. package/es/utils/getFieldSchema.mjs +83 -0
  54. package/es/utils/index.d.ts +6 -0
  55. package/es/utils/model-transformer.d.ts +46 -0
  56. package/es/utils/model-transformer.mjs +77 -0
  57. package/es/utils/useStyle.d.ts +21 -0
  58. package/es/utils/useStyle.mjs +17 -0
  59. package/package.json +72 -0
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@gct-paas/core"),Z=require("lodash-es"),U=require("dayjs"),M=require("vue"),Di=require("qs");function Ci(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const xi=Ci(Z);class gi{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 Ai={[o.FIELD_TYPE.TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.FIELD_TYPE.LONG_TEXT]:{attrsTransform:[{from:"specificConfig.minValue",to:"minlength"},{from:"specificConfig.maxValue",to:"maxlength"}]},[o.FIELD_TYPE.INTEGER]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.FIELD_TYPE.LONG]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.FIELD_TYPE.DOUBLE]:{attrsTransform:[{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]},[o.FIELD_TYPE.DECIMAL]:{attrsTransform:[{from:"specificConfig.digits",to:"precision"},{from:"specificConfig.minValue",to:"minValue"},{from:"specificConfig.maxValue",to:"maxValue"}]}},Si=(s,e)=>{const{attrsTransform:t=[]}=Ai[s]??{};return t.reduce((n,r)=>{const a=Z.get(e,r.from);return n[r.to]=a,n},{})};o.BuiltinType.MODAL_BODY;o.BuiltinType.MODAL_FOOTER;o.Platform.WEB,o.BuiltinType.MODAL;o.PropGroup.BASIC,o.PropGroup.MODAL,o.PropGroup.MODAL,o.PropGroup.MODALTITLECONFIG,o.PropGroup.MODALTITLECONFIG,o.PropGroup.MODAL,o.PropGroup.BUTTON;o.StyleGroup.BACKGROUND,o.StyleGroup.MARGIN;function ye(s){return Object.prototype.hasOwnProperty.call(s.props,"model")?!s.props.model:Object.prototype.hasOwnProperty.call(s.props,"refForm")?!s.props.refForm:!1}o.TextDecoration.NONE,o.TextDecoration.NONE,o.TagTypeEnum.RADIUS,o.BorderStyle.NONE,o.BorderStyle.NONE,o.BorderStyle.NONE,o.BorderStyle.NONE,o.BorderStyle.NONE;const yi=[o.FIELD_TYPE.TEXT,o.FIELD_TYPE.LONG_TEXT,o.FIELD_TYPE.INTEGER,o.FIELD_TYPE.LONG,o.FIELD_TYPE.DOUBLE,o.FIELD_TYPE.DECIMAL,o.FIELD_TYPE.BOOLEAN,o.FIELD_TYPE.DATE,o.FIELD_TYPE.TIME,o.FIELD_TYPE.DATE_TIME,o.FIELD_TYPE.USER,o.FIELD_TYPE.USER_MULTI,o.FIELD_TYPE.SERIAL];o.FIELD_TYPE.PRIMARY_KEY+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.TEXT+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.IEQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.INE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.ILIKE,o.SEARCH_SERVICE.NOTLIKE,o.SEARCH_SERVICE.NOTILIKE,o.SEARCH_SERVICE.LEFTLIKE,o.SEARCH_SERVICE.ILEFTLIKE,o.SEARCH_SERVICE.RIGHTLIKE,o.SEARCH_SERVICE.IRIGHTLIKE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.LIKE,o.FIELD_TYPE.LONG_TEXT+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.IEQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.INE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.ILIKE,o.SEARCH_SERVICE.NOTLIKE,o.SEARCH_SERVICE.NOTILIKE,o.SEARCH_SERVICE.LEFTLIKE,o.SEARCH_SERVICE.ILEFTLIKE,o.SEARCH_SERVICE.RIGHTLIKE,o.SEARCH_SERVICE.IRIGHTLIKE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.LIKE,o.FIELD_TYPE.SERIAL+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.IEQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.INE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.ILIKE,o.SEARCH_SERVICE.NOTLIKE,o.SEARCH_SERVICE.NOTILIKE,o.SEARCH_SERVICE.LEFTLIKE,o.SEARCH_SERVICE.ILEFTLIKE,o.SEARCH_SERVICE.RIGHTLIKE,o.SEARCH_SERVICE.IRIGHTLIKE,o.SEARCH_SERVICE.LIKE,o.SEARCH_SERVICE.LIKE,o.FIELD_TYPE.INTEGER+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.LONG+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.DECIMAL+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.DOUBLE+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.BOOLEAN+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.DATE+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.TIME+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.DATE_TIME+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.GT,o.SEARCH_SERVICE.GE,o.SEARCH_SERVICE.LT,o.SEARCH_SERVICE.LE,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.ENUM+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.ENUM_MULTI+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.FIELD_TYPE.OPTION+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.OPTION_MULTI+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.FIELD_TYPE.USER+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.USER_MULTI+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.FIELD_TYPE.ORG+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.ORG_MULTI+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.FIELD_TYPE.REF_MULTI+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.FIELD_TYPE.ASSOCIATED_PRIMARY_KEY+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.REF+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.RDO_REF+"",o.SEARCH_SERVICE.VERSIONEQ,o.SEARCH_SERVICE.VERSIONNE,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONNOTIN,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.FIELD_TYPE.E_DHR_TEMPLATE+"",o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.FIELD_TYPE.ONLINE_FORM_TEMPLATE+"",o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.FIELD_TYPE.TRANSACTION+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.PRINTER+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.LABEL_TEMPLATE_REF+"",o.SEARCH_SERVICE.VERSIONEQ,o.SEARCH_SERVICE.VERSIONNE,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONNOTIN,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.VERSIONIN,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.MESSAGE_TMPL+"",o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.NE,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.NOTIN,o.SEARCH_SERVICE.EQ,o.SEARCH_SERVICE.EQ,o.FIELD_TYPE.RANGE_USER+"",o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINALL,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.CONTAINANY,o.SEARCH_SERVICE.ISNULL,o.SEARCH_SERVICE.ISNOTNULL,o.SEARCH_SERVICE.RANGE,o.SEARCH_SERVICE.ORANGE,o.SEARCH_SERVICE.RORANGE,o.SEARCH_SERVICE.LORANGE,o.FIELD_TYPE.Biz_Process+"",o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.IN,o.SEARCH_SERVICE.IN;o.Dependency_ENUM.HIDDEN+"",o.Dependency_ENUM.READONLY+"",o.Dependency_ENUM.DISABLED+"",o.Dependency_ENUM.REQUIRED+"",o.Dependency_ENUM.ASSIGNMENT+"",o.ASSIGNMENTSTRATEGY_ENUM.alwaysCover;const Fi=[o.FIELD_TYPE.TEXT,o.FIELD_TYPE.LONG_TEXT,o.FIELD_TYPE.INTEGER,o.FIELD_TYPE.LONG,o.FIELD_TYPE.DOUBLE,o.FIELD_TYPE.DECIMAL,o.FIELD_TYPE.BOOLEAN,o.FIELD_TYPE.DATE,o.FIELD_TYPE.DATE_TIME,o.FIELD_TYPE.MASTERSLAVE];o.PropGroup.COMPONENTDEPENDENCY,o.PropGroup.FIELD_CONFIG,o.PropGroup.FIELD_CONFIG;o.ButtonStyle.ORDINARY,o.ButtonType.PRIMARY,o.ButtonSize.DEFAULT;o.PropGroup.BASIC,o.PropGroup.BUTTON,o.PropGroup.BUTTON,o.PropGroup.BUTTON,Object.values(o.ButtonSize).map(s=>({value:s,label:"sys.pageDesigner."+s}));o.PropGroup.PERMISSION;o.ButtonColorTheme.DEFAULT,o.ButtonColorType.DEFAULT,o.ButtonStyle.ORDINARY;o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle,Object.values(o.ButtonSize).map(s=>({value:s,label:"sys.pageDesigner."+s})),o.PropGroup.ButtonStyle,o.PropGroup.ButtonStyle;o.StyleGroup.LAYOUT,o.StyleGroup.MARGIN;function Ii(s){return s+"px"}function ie(s){return Z.isEmpty(s)?"":`${s}px !important`}function ei(s){return Z.isEmpty(s)?"":`${s} !important`}function Ue(s){return!s||Z.isEmpty(s.borderWidth)?"":`${s.borderWidth}px ${s.borderStyle||"solid"} ${s.borderColor||"transparent"} !important`}const wi={fontAttrs:["fontWeight","fontSize","color","textDecorationLine","textAlign"],mapAttrs:{bold:{attr:"fontWeight",callback:s=>s?700:400},italic:{attr:"fontStyle",callback:s=>s?"italic":"normal"},textDecoration:{attr:"textDecorationLine"},fontSize:{attr:"fontSize",callback:s=>s?Ii(s):""},align:{attr:"textAlign"}}};function It(s,e=wi){if(!s)return{};const t={};return Object.assign(t,Z.pick(s,e.fontAttrs)),typeof e.mapAttrs=="object"&&Object.keys(e.mapAttrs).forEach(i=>{const{attr:n,callback:r}=e.mapAttrs[i];t[n]=typeof r=="function"?r(s[i]):s[i]}),t}function Ti(s={}){const e={};for(const t in s)e[t]=ki(t,s[t]);return e}const bi=["opacity","zIndex","fontWeight","lineHeight","letterSpacing","wordSpacing","textAlign","textDecoration","textTransform","fontStyle","textDecorationLine"];function ki(s,e){return Z.isNil(e)||Z.isEmpty(e)?"":bi.includes(s)?e+" !important":e+"px !important"}function Ri(s){return{position:ei(s.position),top:ie(s.top),left:ie(s.left),right:ie(s.right),bottom:ie(s.bottom),width:ie(s.width),height:ie(s.height)}}function vi(s){return{backgroundColor:ei(s.backgroundColor),marginTop:ie(s.marginTop),marginRight:ie(s.marginRight),marginBottom:ie(s.marginBottom),marginLeft:ie(s.marginLeft),paddingTop:ie(s.paddingTop),paddingRight:ie(s.paddingRight),paddingBottom:ie(s.paddingBottom),paddingLeft:ie(s.paddingLeft)}}function Ni(s){return{borderLeft:Ue(s.borderLeft),borderRight:Ue(s.borderRight),borderBottom:Ue(s.borderBottom),borderTop:Ue(s.borderTop),borderTopRightRadius:ie(s.borderTopRightRadius),borderTopLeftRadius:ie(s.borderTopLeftRadius),borderBottomRightRadius:ie(s.borderBottomRightRadius),borderBottomLeftRadius:ie(s.borderBottomLeftRadius)}}function Bi(s,e=[]){const t={...Ri(s),...vi(s),...Ni(s)};return e.forEach(i=>{delete t[i]}),Object.keys(t).forEach(i=>{const n=t[i];(Z.isNil(n)||Z.isEmpty(n))&&delete t[i]}),t}function _i(s){const{style:e={},ignoringStyle:t=[]}=s||{},i=Ti(e),n=Bi(e,t),r=It(e.labelFont),a=It(e.contentFont);return{wrapperStyle:n,wStyle:i,labelFont:r,contentFont:a}}class ti{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 i=(async()=>{const n=await _gct.api.apaas.modelMeta.getDetail({modelKey:e});this.modelData.set(e,n);const r=!!n?.fieldMetaList&&n.fieldMetaList.reduce((a,l)=>(l.key&&(a[l.key]=l),a),{});r&&this.FiledData.set(e,r)})();this.responsePromise.set(e,i)}return this.responsePromise.get(e)}static async getConfigByField(e,t,i=!0){return await this.getMap(e,i),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 Pi(s,e=!1){const{modelKey:t,field:i,isCustomField:n,fieldName:r,readonly:a,fieldType:l}=s.props;if(!s.isField&&!e||i==="table_name_")return{};let p;if(n?p={name:r,type:""}:t&&(p=await ti.getConfigByField(t,i)),!n&&(!p||p.type!==l))throw new Error("该字段可能已经被删除");if(!p)return{};const{required:x,specificConfig:A}=p;return s.props.fieldRequired=!!x,x&&!a&&(s.props.required=!0),A?.digits!==void 0&&(s.props.precision=A.digits),p}function ii(s,e){return s?.map(i=>ve(i,e))||[]}function ve(s={},e={}){const t=Z.cloneDeep(s);t._X_ROW_KEY=void 0;const i=Object.keys(e??{})?.length?Object.keys(t).reduce((n,r)=>{const a=e[r],l=t[r];if(a&&l)try{const p=(l+"").split(",").map(x=>a[x]);n[r]={[l+""]:p}}catch{}return n},{}):t._DICT||{};return{...t,_DICT:i,_OPCT:t.__FOREIGN__&&typeof t.__FOREIGN__=="object"?ve(t.__FOREIGN__,e):{}}}function Oi(s,e,t){if(typeof e!="object")return;const i=ve(e,t);Z.merge(s,i)}function Li(s,e,t){if(typeof e!="object")return;for(const n in s)n!=="_OPCT"&&n!=="_NOSUBMIT"&&delete s[n];const i=ve(e,t);i._X_ROW_KEY=e._X_ROW_KEY,Z.merge(s,i)}function si(s,e={},t={}){const i=Z.cloneDeep(e.__FOREIGN__||e),n={_DICT:{}};return Object.keys(i).forEach(r=>{const a=`${s}.${r}`,l=t[r],p=i[r];if(l&&p)try{const x=(p+"").split(",").map(A=>l[A]);n._DICT[a]={[p+""]:x}}catch{}n[a]=p}),{...i,_OPCT:n}}function Mi(s={},e={}){const t=Z.cloneDeep(s);return Object.keys(e??{})?.length?Object.keys(t).reduce((i,n)=>{const r=e[n]||{},a=t[n];try{i[n]=(a+"").split(",").map(l=>r[l]).join(",")}catch{i[n]=a}return i},{}):t}function Ne(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var qe={exports:{}},Vi=qe.exports,wt;function Hi(){return wt||(wt=1,(function(s,e){(function(t,i){s.exports=i()})(Vi,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,l){var p=a.prototype;l.utc=function(k){var P={date:k,utc:!0,args:arguments};return new a(P)},p.utc=function(k){var P=l(this.toDate(),{locale:this.$L,utc:!0});return k?P.add(this.utcOffset(),t):P},p.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var x=p.parse;p.parse=function(k){k.utc&&(this.$u=!0),this.$utils().u(k.$offset)||(this.$offset=k.$offset),x.call(this,k)};var A=p.init;p.init=function(){if(this.$u){var k=this.$d;this.$y=k.getUTCFullYear(),this.$M=k.getUTCMonth(),this.$D=k.getUTCDate(),this.$W=k.getUTCDay(),this.$H=k.getUTCHours(),this.$m=k.getUTCMinutes(),this.$s=k.getUTCSeconds(),this.$ms=k.getUTCMilliseconds()}else A.call(this)};var y=p.utcOffset;p.utcOffset=function(k,P){var w=this.$utils().u;if(w(k))return this.$u?0:w(this.$offset)?y.call(this):this.$offset;if(typeof k=="string"&&(k=(function(N){N===void 0&&(N="");var v=N.match(i);if(!v)return null;var B=(""+v[0]).match(n)||["-",0,0],u=B[0],c=60*+B[1]+ +B[2];return c===0?0:u==="+"?c:-c})(k),k===null))return this;var G=Math.abs(k)<=16?60*k:k;if(G===0)return this.utc(P);var X=this.clone();if(P)return X.$offset=G,X.$u=!1,X;var ee=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(X=this.local().add(G+ee,t)).$offset=G,X.$x.$localOffset=ee,X};var F=p.format;p.format=function(k){var P=k||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return F.call(this,P)},p.valueOf=function(){var k=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*k},p.isUTC=function(){return!!this.$u},p.toISOString=function(){return this.toDate().toISOString()},p.toString=function(){return this.toDate().toUTCString()};var R=p.toDate;p.toDate=function(k){return k==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():R.call(this)};var _=p.diff;p.diff=function(k,P,w){if(k&&this.$u===k.$u)return _.call(this,k,P,w);var G=this.local(),X=l(k).local();return _.call(G,X,P,w)}}}))})(qe)),qe.exports}var Ui=Hi();const zi=Ne(Ui);var Qe={exports:{}},Yi=Qe.exports,Tt;function Gi(){return Tt||(Tt=1,(function(s,e){(function(t,i){s.exports=i()})(Yi,(function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(n,r,a){var l,p=function(F,R,_){_===void 0&&(_={});var k=new Date(F),P=(function(w,G){G===void 0&&(G={});var X=G.timeZoneName||"short",ee=w+"|"+X,N=i[ee];return N||(N=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:X}),i[ee]=N),N})(R,_);return P.formatToParts(k)},x=function(F,R){for(var _=p(F,R),k=[],P=0;P<_.length;P+=1){var w=_[P],G=w.type,X=w.value,ee=t[G];ee>=0&&(k[ee]=parseInt(X,10))}var N=k[3],v=N===24?0:N,B=k[0]+"-"+k[1]+"-"+k[2]+" "+v+":"+k[4]+":"+k[5]+":000",u=+F;return(a.utc(B).valueOf()-(u-=u%1e3))/6e4},A=r.prototype;A.tz=function(F,R){F===void 0&&(F=l);var _,k=this.utcOffset(),P=this.toDate(),w=P.toLocaleString("en-US",{timeZone:F}),G=Math.round((P-new Date(w))/1e3/60),X=15*-Math.round(P.getTimezoneOffset()/15)-G;if(!Number(X))_=this.utcOffset(0,R);else if(_=a(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(X,!0),R){var ee=_.utcOffset();_=_.add(k-ee,"minute")}return _.$x.$timezone=F,_},A.offsetName=function(F){var R=this.$x.$timezone||a.tz.guess(),_=p(this.valueOf(),R,{timeZoneName:F}).find((function(k){return k.type.toLowerCase()==="timezonename"}));return _&&_.value};var y=A.startOf;A.startOf=function(F,R){if(!this.$x||!this.$x.$timezone)return y.call(this,F,R);var _=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return y.call(_,F,R).tz(this.$x.$timezone,!0)},a.tz=function(F,R,_){var k=_&&R,P=_||R||l,w=x(+a(),P);if(typeof F!="string")return a(F).tz(P);var G=(function(v,B,u){var c=v-60*B*1e3,h=x(c,u);if(B===h)return[c,B];var C=x(c-=60*(h-B)*1e3,u);return h===C?[c,h]:[v-60*Math.min(h,C)*1e3,Math.max(h,C)]})(a.utc(F,k).valueOf(),w,P),X=G[0],ee=G[1],N=a(X).utcOffset(ee);return N.$x.$timezone=P,N},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(F){l=F}}}))})(Qe)),Qe.exports}var Xi=Gi();const Ki=Ne(Xi);var Ze={exports:{}},Ji=Ze.exports,bt;function $i(){return bt||(bt=1,(function(s,e){(function(t,i){s.exports=i()})(Ji,(function(){var t="month",i="quarter";return function(n,r){var a=r.prototype;a.quarter=function(x){return this.$utils().u(x)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(x-1))};var l=a.add;a.add=function(x,A){return x=Number(x),this.$utils().p(A)===i?this.add(3*x,t):l.bind(this)(x,A)};var p=a.startOf;a.startOf=function(x,A){var y=this.$utils(),F=!!y.u(A)||A;if(y.p(x)===i){var R=this.quarter()-1;return F?this.month(3*R).startOf(t).startOf("day"):this.month(3*R+2).endOf(t).endOf("day")}return p.bind(this)(x,A)}}}))})(Ze)),Ze.exports}var Wi=$i();const ji=Ne(Wi);var et={exports:{}},qi=et.exports,kt;function Qi(){return kt||(kt=1,(function(s,e){(function(t,i){s.exports=i()})(qi,(function(){return function(t,i){i.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}}))})(et)),et.exports}var Zi=Qi();const es=Ne(Zi);var tt={exports:{}},ts=tt.exports,Rt;function is(){return Rt||(Rt=1,(function(s,e){(function(t,i){s.exports=i()})(ts,(function(){var t="day";return function(i,n,r){var a=function(x){return x.add(4-x.isoWeekday(),t)},l=n.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(x){if(!this.$utils().u(x))return this.add(7*(x-this.isoWeek()),t);var A,y,F,R,_=a(this),k=(A=this.isoWeekYear(),y=this.$u,F=(y?r.utc:r)().year(A).startOf("year"),R=4-F.isoWeekday(),F.isoWeekday()>4&&(R+=7),F.add(R,t));return _.diff(k,"week")+1},l.isoWeekday=function(x){return this.$utils().u(x)?this.day()||7:this.day(this.day()%7?x:x-7)};var p=l.startOf;l.startOf=function(x,A){var y=this.$utils(),F=!!y.u(A)||A;return y.p(x)==="isoweek"?F?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):p.bind(this)(x,A)}}}))})(tt)),tt.exports}var ss=is();const ns=Ne(ss);var $=ni(),rs=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ot=Math.ceil,me=Math.floor,ae="[BigNumber Error] ",pe=1e14,H=14,vt=9007199254740991,at=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ge=1e7,te=1e9;function ni(s){var e,t,i,n=w.prototype={constructor:w,toString:null,valueOf:null},r=new w(1),a=20,l=4,p=-7,x=21,A=-1e7,y=1e7,F=!1,R=1,_=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},P="0123456789abcdefghijklmnopqrstuvwxyz";function w(u,c){var h,C,m,E,D,d,f,I,g=this;if(!(g instanceof w))return new w(u,c);if(I=typeof u,c==null){if(X(u)){g.s=u.s,!u.c||u.e>y?g.c=g.e=null:u.e<A?g.c=[g.e=0]:(g.e=u.e,g.c=u.c.slice());return}if(I=="number"){if(u*0!=0){g.s=isNaN(u)?null:u<0?-1:1,g.c=g.e=null;return}if(g.s=1/u<0?(u=-u,-1):1,u===~~u){for(E=0,D=u;D>=10;D/=10,E++);E>y?g.c=g.e=null:(g.e=E,g.c=[u]);return}f=String(u)}else{if(I=="string"){if(f=u,!rs.test(f))return i(g,f)}else if(I=="bigint")f=String(u);else throw Error(ae+"Invalid argument: "+u);g.s=f.charCodeAt(0)==45?(f=f.slice(1),-1):1}(E=f.indexOf("."))>-1&&(f=f.replace(".","")),(D=f.search(/e/i))>0?(E<0&&(E=D),E+=+f.slice(D+1),f=f.substring(0,D)):E<0&&(E=f.length)}else{if(I!="string")throw Error(ae+"String expected: "+u);for(W(c,2,P.length,"Base"),f=u,g.s=f.charCodeAt(0)===45?(f=f.slice(1),-1):1,h=P.slice(0,c),E=D=0,d=f.length;D<d;D++)if(h.indexOf(C=f.charAt(D))<0){if(C=="."){if(D>E){E=d;continue}}else if(!m&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){m=!0,D=-1,E=0;continue}return i(g,u,c)}f=t(f,c,10,g.s),(E=f.indexOf("."))>-1?f=f.replace(".",""):E=f.length}for(D=0;f.charCodeAt(D)===48;D++);for(d=f.length;f.charCodeAt(--d)===48;);if(f=f.slice(D,++d))if(d-=D,E=E-D-1,E>y)g.c=g.e=null;else if(E<A)g.c=[g.e=0];else{if(g.e=E,g.c=[],D=(E+1)%H,E<0&&(D+=H),D<d){for(D&&g.c.push(+f.slice(0,D)),d-=H;D<d;)g.c.push(+f.slice(D,D+=H));D=H-(f=f.slice(D)).length}else D-=d;for(;D--;f+="0");g.c.push(+f)}else g.c=[g.e=0]}w.clone=ni,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(u){var c,h;if(u!=null)if(typeof u=="object"){if(u.hasOwnProperty(c="DECIMAL_PLACES")&&(h=u[c],W(h,0,te,c),a=h),u.hasOwnProperty(c="ROUNDING_MODE")&&(h=u[c],W(h,0,8,c),l=h),u.hasOwnProperty(c="EXPONENTIAL_AT")&&(h=u[c],h&&h.pop?(W(h[0],-te,0,c),W(h[1],0,te,c),p=h[0],x=h[1]):(W(h,-te,te,c),p=-(x=h<0?-h:h))),u.hasOwnProperty(c="RANGE"))if(h=u[c],h&&h.pop)W(h[0],-te,-1,c),W(h[1],1,te,c),A=h[0],y=h[1];else if(W(h,-te,te,c),h)A=-(y=h<0?-h:h);else throw Error(ae+c+" cannot be zero: "+h);if(u.hasOwnProperty(c="CRYPTO"))if(h=u[c],h===!!h)if(h)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))F=h;else throw F=!h,Error(ae+"crypto unavailable");else F=h;else throw Error(ae+c+" not true or false: "+h);if(u.hasOwnProperty(c="MODULO_MODE")&&(h=u[c],W(h,0,9,c),R=h),u.hasOwnProperty(c="POW_PRECISION")&&(h=u[c],W(h,0,te,c),_=h),u.hasOwnProperty(c="FORMAT"))if(h=u[c],typeof h=="object")k=h;else throw Error(ae+c+" not an object: "+h);if(u.hasOwnProperty(c="ALPHABET"))if(h=u[c],typeof h=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(h))P=h;else throw Error(ae+c+" invalid: "+h)}else throw Error(ae+"Object expected: "+u);return{DECIMAL_PLACES:a,ROUNDING_MODE:l,EXPONENTIAL_AT:[p,x],RANGE:[A,y],CRYPTO:F,MODULO_MODE:R,POW_PRECISION:_,FORMAT:k,ALPHABET:P}},w.isBigNumber=function(u){if(!X(u))return!1;var c,h,C=u.c,m=u.e,E=u.s;if({}.toString.call(C)!="[object Array]")return C===null&&m===null&&(E===null||E===1||E===-1);if(E!==1&&E!==-1||m<-te||m>te||m!==me(m))return!1;if(C[0]===0)return m===0&&C.length===1;if(c=(m+1)%H,c<1&&(c+=H),String(C[0]).length!==c)return!1;for(c=0;c<C.length;c++)if(h=C[c],h<0||h>=pe||h!==me(h))return!1;return h!==0},w.maximum=w.max=function(){return ee(arguments,-1)},w.minimum=w.min=function(){return ee(arguments,1)},w.random=(function(){var u=9007199254740992,c=Math.random()*u&2097151?function(){return me(Math.random()*u)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(h){var C,m,E,D,d,f=0,I=[],g=new w(r);if(h==null?h=a:W(h,0,te),D=ot(h/H),F)if(crypto.getRandomValues){for(C=crypto.getRandomValues(new Uint32Array(D*=2));f<D;)d=C[f]*131072+(C[f+1]>>>11),d>=9e15?(m=crypto.getRandomValues(new Uint32Array(2)),C[f]=m[0],C[f+1]=m[1]):(I.push(d%1e14),f+=2);f=D/2}else if(crypto.randomBytes){for(C=crypto.randomBytes(D*=7);f<D;)d=(C[f]&31)*281474976710656+C[f+1]*1099511627776+C[f+2]*4294967296+C[f+3]*16777216+(C[f+4]<<16)+(C[f+5]<<8)+C[f+6],d>=9e15?crypto.randomBytes(7).copy(C,f):(I.push(d%1e14),f+=7);f=D/7}else throw F=!1,Error(ae+"crypto unavailable");if(!F)for(;f<D;)d=c(),d<9e15&&(I[f++]=d%1e14);for(D=I[--f],h%=H,D&&h&&(d=at[H-h],I[f]=me(D/d)*d);I[f]===0;I.pop(),f--);if(f<0)I=[E=0];else{for(E=-1;I[0]===0;I.splice(0,1),E-=H);for(f=1,d=I[0];d>=10;d/=10,f++);f<H&&(E-=H-f)}return g.e=E,g.c=I,g}})(),w.sum=function(){for(var u=1,c=arguments,h=new w(c[0]);u<c.length;)h=h.plus(c[u++]);return h},t=(function(){var u="0123456789";function c(h,C,m,E){for(var D,d=[0],f,I=0,g=h.length;I<g;){for(f=d.length;f--;d[f]*=C);for(d[0]+=E.indexOf(h.charAt(I++)),D=0;D<d.length;D++)d[D]>m-1&&(d[D+1]==null&&(d[D+1]=0),d[D+1]+=d[D]/m|0,d[D]%=m)}return d.reverse()}return function(h,C,m,E,D){var d,f,I,g,b,O,V,Y,J=h.indexOf("."),j=a,z=l;for(J>=0&&(g=_,_=0,h=h.replace(".",""),Y=new w(C),O=Y.pow(h.length-J),_=g,Y.c=c(Ae(fe(O.c),O.e,"0"),10,m,u),Y.e=Y.c.length),V=c(h,C,m,D?(d=P,u):(d=u,P)),I=g=V.length;V[--g]==0;V.pop());if(!V[0])return d.charAt(0);if(J<0?--I:(O.c=V,O.e=I,O.s=E,O=e(O,Y,j,z,m),V=O.c,b=O.r,I=O.e),f=I+j+1,J=V[f],g=m/2,b=b||f<0||V[f+1]!=null,b=z<4?(J!=null||b)&&(z==0||z==(O.s<0?3:2)):J>g||J==g&&(z==4||b||z==6&&V[f-1]&1||z==(O.s<0?8:7)),f<1||!V[0])h=b?Ae(d.charAt(1),-j,d.charAt(0)):d.charAt(0);else{if(V.length=f,b)for(--m;++V[--f]>m;)V[f]=0,f||(++I,V=[1].concat(V));for(g=V.length;!V[--g];);for(J=0,h="";J<=g;h+=d.charAt(V[J++]));h=Ae(h,I,d.charAt(0))}return h}})(),e=(function(){function u(C,m,E){var D,d,f,I,g=0,b=C.length,O=m%ge,V=m/ge|0;for(C=C.slice();b--;)f=C[b]%ge,I=C[b]/ge|0,D=V*f+I*O,d=O*f+D%ge*ge+g,g=(d/E|0)+(D/ge|0)+V*I,C[b]=d%E;return g&&(C=[g].concat(C)),C}function c(C,m,E,D){var d,f;if(E!=D)f=E>D?1:-1;else for(d=f=0;d<E;d++)if(C[d]!=m[d]){f=C[d]>m[d]?1:-1;break}return f}function h(C,m,E,D){for(var d=0;E--;)C[E]-=d,d=C[E]<m[E]?1:0,C[E]=d*D+C[E]-m[E];for(;!C[0]&&C.length>1;C.splice(0,1));}return function(C,m,E,D,d){var f,I,g,b,O,V,Y,J,j,z,K,se,He,nt,rt,Ee,_e,ce=C.s==m.s?1:-1,re=C.c,q=m.c;if(!re||!re[0]||!q||!q[0])return new w(!C.s||!m.s||(re?q&&re[0]==q[0]:!q)?NaN:re&&re[0]==0||!q?ce*0:ce/0);for(J=new w(ce),j=J.c=[],I=C.e-m.e,ce=E+I+1,d||(d=pe,I=le(C.e/H)-le(m.e/H),ce=ce/H|0),g=0;q[g]==(re[g]||0);g++);if(q[g]>(re[g]||0)&&I--,ce<0)j.push(1),b=!0;else{for(nt=re.length,Ee=q.length,g=0,ce+=2,O=me(d/(q[0]+1)),O>1&&(q=u(q,O,d),re=u(re,O,d),Ee=q.length,nt=re.length),He=Ee,z=re.slice(0,Ee),K=z.length;K<Ee;z[K++]=0);_e=q.slice(),_e=[0].concat(_e),rt=q[0],q[1]>=d/2&&rt++;do{if(O=0,f=c(q,z,Ee,K),f<0){if(se=z[0],Ee!=K&&(se=se*d+(z[1]||0)),O=me(se/rt),O>1)for(O>=d&&(O=d-1),V=u(q,O,d),Y=V.length,K=z.length;c(V,z,Y,K)==1;)O--,h(V,Ee<Y?_e:q,Y,d),Y=V.length,f=1;else O==0&&(f=O=1),V=q.slice(),Y=V.length;if(Y<K&&(V=[0].concat(V)),h(z,V,K,d),K=z.length,f==-1)for(;c(q,z,Ee,K)<1;)O++,h(z,Ee<K?_e:q,K,d),K=z.length}else f===0&&(O++,z=[0]);j[g++]=O,z[0]?z[K++]=re[He]||0:(z=[re[He]],K=1)}while((He++<nt||z[0]!=null)&&ce--);b=z[0]!=null,j[0]||j.splice(0,1)}if(d==pe){for(g=1,ce=j[0];ce>=10;ce/=10,g++);v(J,E+(J.e=g+I*H-1)+1,D,b)}else J.e=I,J.r=+b;return J}})();function G(u,c,h,C){var m,E,D,d,f;if(h==null?h=l:W(h,0,8),!u.c)return u.toString();if(m=u.c[0],D=u.e,c==null)f=fe(u.c),f=C==1||C==2&&(D<=p||D>=x)?Ye(f,D):Ae(f,D,"0");else if(u=v(new w(u),c,h),E=u.e,f=fe(u.c),d=f.length,C==1||C==2&&(c<=E||E<=p)){for(;d<c;f+="0",d++);f=Ye(f,E)}else if(c-=D+(C===2&&E>D),f=Ae(f,E,"0"),E+1>d){if(--c>0)for(f+=".";c--;f+="0");}else if(c+=E-d,c>0)for(E+1==d&&(f+=".");c--;f+="0");return u.s<0&&m?"-"+f:f}function X(u){return u instanceof w||!!u&&u._isBigNumber===!0}function ee(u,c){for(var h,C,m=1,E=new w(u[0]);m<u.length;m++)C=new w(u[m]),(!C.s||(h=Fe(E,C))===c||h===0&&E.s===c)&&(E=C);return E}function N(u,c,h){for(var C=1,m=c.length;!c[--m];c.pop());for(m=c[0];m>=10;m/=10,C++);return(h=C+h*H-1)>y?u.c=u.e=null:h<A?u.c=[u.e=0]:(u.e=h,u.c=c),u}i=(function(){var u=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,h=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(E,D,d){var f,I=D.replace(m,"");if(C.test(I)){E.s=isNaN(I)?null:I<0?-1:1,E.c=E.e=null;return}if(I=I.replace(u,function(g,b,O){return f=(O=O.toLowerCase())=="x"?16:O=="b"?2:8,!d||d==f?b:g}),d&&(f=d,I=I.replace(c,"$1").replace(h,"0.$1")),D!=I)return new w(I,f);throw Error(ae+"Not a"+(d?" base "+d:"")+" number: "+D)}})();function v(u,c,h,C){var m,E,D,d,f,I,g,b=u.c,O=at;if(b){e:{for(m=1,d=b[0];d>=10;d/=10,m++);if(E=c-m,E<0)E+=H,D=c,f=b[I=0],g=me(f/O[m-D-1]%10);else if(I=ot((E+1)/H),I>=b.length)if(C){for(;b.length<=I;b.push(0));f=g=0,m=1,E%=H,D=E-H+1}else break e;else{for(f=d=b[I],m=1;d>=10;d/=10,m++);E%=H,D=E-H+m,g=D<0?0:me(f/O[m-D-1]%10)}if(C=C||c<0||b[I+1]!=null||(D<0?f:f%O[m-D-1]),C=h<4?(g||C)&&(h==0||h==(u.s<0?3:2)):g>5||g==5&&(h==4||C||h==6&&(E>0?D>0?f/O[m-D]:0:b[I-1])%10&1||h==(u.s<0?8:7)),c<1||!b[0])return b.length=0,C?(c-=u.e+1,b[0]=O[(H-c%H)%H],u.e=-c||0):b[0]=u.e=0,u;if(E==0?(b.length=I,d=1,I--):(b.length=I+1,d=O[H-E],b[I]=D>0?me(f/O[m-D]%O[D])*d:0),C)for(;;)if(I==0){for(E=1,D=b[0];D>=10;D/=10,E++);for(D=b[0]+=d,d=1;D>=10;D/=10,d++);E!=d&&(u.e++,b[0]==pe&&(b[0]=1));break}else{if(b[I]+=d,b[I]!=pe)break;b[I--]=0,d=1}for(E=b.length;b[--E]===0;b.pop());}u.e>y?u.c=u.e=null:u.e<A&&(u.c=[u.e=0])}return u}function B(u){var c,h=u.e;return h===null?u.toString():(c=fe(u.c),c=h<=p||h>=x?Ye(c,h):Ae(c,h,"0"),u.s<0?"-"+c:c)}return n.absoluteValue=n.abs=function(){var u=new w(this);return u.s<0&&(u.s=1),u},n.comparedTo=function(u,c){return Fe(this,new w(u,c))},n.decimalPlaces=n.dp=function(u,c){var h,C,m,E=this;if(u!=null)return W(u,0,te),c==null?c=l:W(c,0,8),v(new w(E),u+E.e+1,c);if(!(h=E.c))return null;if(C=((m=h.length-1)-le(this.e/H))*H,m=h[m])for(;m%10==0;m/=10,C--);return C<0&&(C=0),C},n.dividedBy=n.div=function(u,c){return e(this,new w(u,c),a,l)},n.dividedToIntegerBy=n.idiv=function(u,c){return e(this,new w(u,c),0,1)},n.exponentiatedBy=n.pow=function(u,c){var h,C,m,E,D,d,f,I,g,b=this;if(u=new w(u),u.c&&!u.isInteger())throw Error(ae+"Exponent not an integer: "+B(u));if(c!=null&&(c=new w(c)),d=u.e>14,!b.c||!b.c[0]||b.c[0]==1&&!b.e&&b.c.length==1||!u.c||!u.c[0])return g=new w(Math.pow(+B(b),d?u.s*(2-ze(u)):+B(u))),c?g.mod(c):g;if(f=u.s<0,c){if(c.c?!c.c[0]:!c.s)return new w(NaN);C=!f&&b.isInteger()&&c.isInteger(),C&&(b=b.mod(c))}else{if(u.e>9&&(b.e>0||b.e<-1||(b.e==0?b.c[0]>1||d&&b.c[1]>=24e7:b.c[0]<8e13||d&&b.c[0]<=9999975e7)))return E=b.s<0&&ze(u)?-0:0,b.e>-1&&(E=1/E),new w(f?1/E:E);_&&(E=ot(_/H+2))}for(d?(h=new w(.5),f&&(u.s=1),I=ze(u)):(m=Math.abs(+B(u)),I=m%2),g=new w(r);;){if(I){if(g=g.times(b),!g.c)break;E?g.c.length>E&&(g.c.length=E):C&&(g=g.mod(c))}if(m){if(m=me(m/2),m===0)break;I=m%2}else if(u=u.times(h),v(u,u.e+1,1),u.e>14)I=ze(u);else{if(m=+B(u),m===0)break;I=m%2}b=b.times(b),E?b.c&&b.c.length>E&&(b.c.length=E):C&&(b=b.mod(c))}return C?g:(f&&(g=r.div(g)),c?g.mod(c):E?v(g,_,l,D):g)},n.integerValue=function(u){var c=new w(this);return u==null?u=l:W(u,0,8),v(c,c.e+1,u)},n.isEqualTo=n.eq=function(u,c){return Fe(this,new w(u,c))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(u,c){return Fe(this,new w(u,c))>0},n.isGreaterThanOrEqualTo=n.gte=function(u,c){return(c=Fe(this,new w(u,c)))===1||c===0},n.isInteger=function(){return!!this.c&&le(this.e/H)>this.c.length-2},n.isLessThan=n.lt=function(u,c){return Fe(this,new w(u,c))<0},n.isLessThanOrEqualTo=n.lte=function(u,c){return(c=Fe(this,new w(u,c)))===-1||c===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(u,c){var h,C,m,E,D=this,d=D.s;if(u=new w(u,c),c=u.s,!d||!c)return new w(NaN);if(d!=c)return u.s=-c,D.plus(u);var f=D.e/H,I=u.e/H,g=D.c,b=u.c;if(!f||!I){if(!g||!b)return g?(u.s=-c,u):new w(b?D:NaN);if(!g[0]||!b[0])return b[0]?(u.s=-c,u):new w(g[0]?D:l==3?-0:0)}if(f=le(f),I=le(I),g=g.slice(),d=f-I){for((E=d<0)?(d=-d,m=g):(I=f,m=b),m.reverse(),c=d;c--;m.push(0));m.reverse()}else for(C=(E=(d=g.length)<(c=b.length))?d:c,d=c=0;c<C;c++)if(g[c]!=b[c]){E=g[c]<b[c];break}if(E&&(m=g,g=b,b=m,u.s=-u.s),c=(C=b.length)-(h=g.length),c>0)for(;c--;g[h++]=0);for(c=pe-1;C>d;){if(g[--C]<b[C]){for(h=C;h&&!g[--h];g[h]=c);--g[h],g[C]+=pe}g[C]-=b[C]}for(;g[0]==0;g.splice(0,1),--I);return g[0]?N(u,g,I):(u.s=l==3?-1:1,u.c=[u.e=0],u)},n.modulo=n.mod=function(u,c){var h,C,m=this;return u=new w(u,c),!m.c||!u.s||u.c&&!u.c[0]?new w(NaN):!u.c||m.c&&!m.c[0]?new w(m):(R==9?(C=u.s,u.s=1,h=e(m,u,0,3),u.s=C,h.s*=C):h=e(m,u,0,R),u=m.minus(h.times(u)),!u.c[0]&&R==1&&(u.s=m.s),u)},n.multipliedBy=n.times=function(u,c){var h,C,m,E,D,d,f,I,g,b,O,V,Y,J,j,z=this,K=z.c,se=(u=new w(u,c)).c;if(!K||!se||!K[0]||!se[0])return!z.s||!u.s||K&&!K[0]&&!se||se&&!se[0]&&!K?u.c=u.e=u.s=null:(u.s*=z.s,!K||!se?u.c=u.e=null:(u.c=[0],u.e=0)),u;for(C=le(z.e/H)+le(u.e/H),u.s*=z.s,f=K.length,b=se.length,f<b&&(Y=K,K=se,se=Y,m=f,f=b,b=m),m=f+b,Y=[];m--;Y.push(0));for(J=pe,j=ge,m=b;--m>=0;){for(h=0,O=se[m]%j,V=se[m]/j|0,D=f,E=m+D;E>m;)I=K[--D]%j,g=K[D]/j|0,d=V*I+g*O,I=O*I+d%j*j+Y[E]+h,h=(I/J|0)+(d/j|0)+V*g,Y[E--]=I%J;Y[E]=h}return h?++C:Y.splice(0,1),N(u,Y,C)},n.negated=function(){var u=new w(this);return u.s=-u.s||null,u},n.plus=function(u,c){var h,C=this,m=C.s;if(u=new w(u,c),c=u.s,!m||!c)return new w(NaN);if(m!=c)return u.s=-c,C.minus(u);var E=C.e/H,D=u.e/H,d=C.c,f=u.c;if(!E||!D){if(!d||!f)return new w(m/0);if(!d[0]||!f[0])return f[0]?u:new w(d[0]?C:m*0)}if(E=le(E),D=le(D),d=d.slice(),m=E-D){for(m>0?(D=E,h=f):(m=-m,h=d),h.reverse();m--;h.push(0));h.reverse()}for(m=d.length,c=f.length,m-c<0&&(h=f,f=d,d=h,c=m),m=0;c;)m=(d[--c]=d[c]+f[c]+m)/pe|0,d[c]=pe===d[c]?0:d[c]%pe;return m&&(d=[m].concat(d),++D),N(u,d,D)},n.precision=n.sd=function(u,c){var h,C,m,E=this;if(u!=null&&u!==!!u)return W(u,1,te),c==null?c=l:W(c,0,8),v(new w(E),u,c);if(!(h=E.c))return null;if(m=h.length-1,C=m*H+1,m=h[m]){for(;m%10==0;m/=10,C--);for(m=h[0];m>=10;m/=10,C++);}return u&&E.e+1>C&&(C=E.e+1),C},n.shiftedBy=function(u){return W(u,-vt,vt),this.times("1e"+u)},n.squareRoot=n.sqrt=function(){var u,c,h,C,m,E=this,D=E.c,d=E.s,f=E.e,I=a+4,g=new w("0.5");if(d!==1||!D||!D[0])return new w(!d||d<0&&(!D||D[0])?NaN:D?E:1/0);if(d=Math.sqrt(+B(E)),d==0||d==1/0?(c=fe(D),(c.length+f)%2==0&&(c+="0"),d=Math.sqrt(+c),f=le((f+1)/2)-(f<0||f%2),d==1/0?c="5e"+f:(c=d.toExponential(),c=c.slice(0,c.indexOf("e")+1)+f),h=new w(c)):h=new w(d+""),h.c[0]){for(f=h.e,d=f+I,d<3&&(d=0);;)if(m=h,h=g.times(m.plus(e(E,m,I,1))),fe(m.c).slice(0,d)===(c=fe(h.c)).slice(0,d))if(h.e<f&&--d,c=c.slice(d-3,d+1),c=="9999"||!C&&c=="4999"){if(!C&&(v(m,m.e+a+2,0),m.times(m).eq(E))){h=m;break}I+=4,d+=4,C=1}else{(!+c||!+c.slice(1)&&c.charAt(0)=="5")&&(v(h,h.e+a+2,1),u=!h.times(h).eq(E));break}}return v(h,h.e+a+1,l,u)},n.toExponential=function(u,c){return u!=null&&(W(u,0,te),u++),G(this,u,c,1)},n.toFixed=function(u,c){return u!=null&&(W(u,0,te),u=u+this.e+1),G(this,u,c)},n.toFormat=function(u,c,h){var C,m=this;if(h==null)u!=null&&c&&typeof c=="object"?(h=c,c=null):u&&typeof u=="object"?(h=u,u=c=null):h=k;else if(typeof h!="object")throw Error(ae+"Argument not an object: "+h);if(C=m.toFixed(u,c),m.c){var E,D=C.split("."),d=+h.groupSize,f=+h.secondaryGroupSize,I=h.groupSeparator||"",g=D[0],b=D[1],O=m.s<0,V=O?g.slice(1):g,Y=V.length;if(f&&(E=d,d=f,f=E,Y-=E),d>0&&Y>0){for(E=Y%d||d,g=V.substr(0,E);E<Y;E+=d)g+=I+V.substr(E,d);f>0&&(g+=I+V.slice(E)),O&&(g="-"+g)}C=b?g+(h.decimalSeparator||"")+((f=+h.fractionGroupSize)?b.replace(new RegExp("\\d{"+f+"}\\B","g"),"$&"+(h.fractionGroupSeparator||"")):b):g}return(h.prefix||"")+C+(h.suffix||"")},n.toFraction=function(u){var c,h,C,m,E,D,d,f,I,g,b,O,V=this,Y=V.c;if(u!=null&&(d=new w(u),!d.isInteger()&&(d.c||d.s!==1)||d.lt(r)))throw Error(ae+"Argument "+(d.isInteger()?"out of range: ":"not an integer: ")+B(d));if(!Y)return new w(V);for(c=new w(r),I=h=new w(r),C=f=new w(r),O=fe(Y),E=c.e=O.length-V.e-1,c.c[0]=at[(D=E%H)<0?H+D:D],u=!u||d.comparedTo(c)>0?E>0?c:I:d,D=y,y=1/0,d=new w(O),f.c[0]=0;g=e(d,c,0,1),m=h.plus(g.times(C)),m.comparedTo(u)!=1;)h=C,C=m,I=f.plus(g.times(m=I)),f=m,c=d.minus(g.times(m=c)),d=m;return m=e(u.minus(h),C,0,1),f=f.plus(m.times(I)),h=h.plus(m.times(C)),f.s=I.s=V.s,E=E*2,b=e(I,C,E,l).minus(V).abs().comparedTo(e(f,h,E,l).minus(V).abs())<1?[I,C]:[f,h],y=D,b},n.toNumber=function(){return+B(this)},n.toObject=function(){var u=this;return{c:u.c?u.c.slice():null,e:u.e,s:u.s}},n.toPrecision=function(u,c){return u!=null&&W(u,1,te),G(this,u,c,2)},n.toString=function(u){var c,h=this,C=h.s,m=h.e;return m===null?C?(c="Infinity",C<0&&(c="-"+c)):c="NaN":(u==null?c=m<=p||m>=x?Ye(fe(h.c),m):Ae(fe(h.c),m,"0"):(W(u,2,P.length,"Base"),c=t(Ae(fe(h.c),m,"0"),10,u,C,!0)),C<0&&h.c[0]&&(c="-"+c)),c},n.valueOf=n.toJSON=function(){return B(this)},n._isBigNumber=!0,s!=null&&w.set(s),w}function le(s){var e=s|0;return s>0||s===e?e:e-1}function fe(s){for(var e,t,i=1,n=s.length,r=s[0]+"";i<n;){for(e=s[i++]+"",t=H-e.length;t--;e="0"+e);r+=e}for(n=r.length;r.charCodeAt(--n)===48;);return r.slice(0,n+1||1)}function Fe(s,e){var t,i,n=s.c,r=e.c,a=s.s,l=e.s,p=s.e,x=e.e;if(!a||!l)return null;if(t=n&&!n[0],i=r&&!r[0],t||i)return t?i?0:-l:a;if(a!=l)return a;if(t=a<0,i=p==x,!n||!r)return i?0:!n^t?1:-1;if(!i)return p>x^t?1:-1;for(l=(p=n.length)<(x=r.length)?p:x,a=0;a<l;a++)if(n[a]!=r[a])return n[a]>r[a]^t?1:-1;return p==x?0:p>x^t?1:-1}function W(s,e,t,i){if(s<e||s>t||s!==me(s))throw Error(ae+(i||"Argument")+(typeof s=="number"?s<e||s>t?" out of range: ":" not an integer: ":" not a primitive number: ")+String(s))}function ze(s){var e=s.c.length-1;return le(s.e/H)==e&&s.c[e]%2!=0}function Ye(s,e){return(s.length>1?s.charAt(0)+"."+s.slice(1):s)+(e<0?"e":"e+")+e}function Ae(s,e,t){var i,n;if(e<0){for(n=t+".";++e;n+=t);s=n+s}else if(i=s.length,++e>i){for(n=t,e-=i;--e;n+=t);s+=n}else e<i&&(s=s.slice(0,e)+"."+s.slice(e));return s}U.extend(zi);U.extend(Ki);U.extend(ji);U.extend(es);U.extend(ns);function os(s,e,t){return s?e:t}function as(s){return s==null||s===""||s===0}function us(s){return Z.isNull(s)}function cs(s){return Z.isUndefined(s)}function ls(...s){return(()=>{for(const i of s)if(!i)return!1;return!0})()}function hs(...s){return s.some(i=>i)}function ps(s,e){return Z.isEqual(s,e)}function fs(s,e){return s!==e}function ds(s,e){return typeof s=="number"&&typeof e=="number"||typeof s=="string"&&typeof e=="string"||s instanceof Date&&e instanceof Date?s<=e:!1}function ms(s,e){return typeof s=="number"&&typeof e=="number"||typeof s=="string"&&typeof e=="string"||s instanceof Date&&e instanceof Date?s<e:!1}function Es(s,e){return typeof s=="number"&&typeof e=="number"||typeof s=="string"&&typeof e=="string"||s instanceof Date&&e instanceof Date?s>=e:!1}function Ds(s,e){return typeof s=="number"&&typeof e=="number"||typeof s=="string"&&typeof e=="string"||s instanceof Date&&e instanceof Date?s>e:!1}function Cs(s){return s?.length||0}function xs(...s){return s.join("")}function gs(s="",e,t){return(()=>{const r=(e<0?[...s].reverse().join(""):s).slice(Math.abs(e+ +(e<0)),Math.abs(t)+ +(e>=0));return e<0?[...r].reverse().join(""):r})()}function As(s="",e,t){return(()=>{const r=(e<0?[...s].reverse().join(""):s).slice(Math.abs(e+ +(e<0)),Math.abs(e+ +(e<0))+Math.abs(t));return e<0?[...r].reverse().join(""):r})()}function Ss(s=""){return s.toUpperCase()}function ys(s=""){return s.toLowerCase()}function Fs(s=""){return s.trim()}function Is(s=""){return s.replace(/^\s\s*/,"")}function ws(s=""){return s.replace(/\s\s*$/,"")}function Ts(s="",e=""){return s.match(new RegExp(e,"g"))?.length||null}function bs(s="",e="",t=""){return s.replace(new RegExp(e,"g"),t)}function ks(s="",e=""){return s.includes(e)}function Rs(s="",e=""){return(()=>{const n=s.match(new RegExp(e,"g"))?.length;return n||0})()}function vs(s=""){return(()=>{const i=parseFloat(s);return isNaN(i)?null:i})()}function Ns(s="",e=""){return s.split(e)}function Bs(...s){const e=s.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?e.reduce(St,0):""}function _s(...s){return s.flat().reduce(St,0)}function Ps(s,...e){return e.reduce(wn,s)}function Os(s,...e){const t=e.flat().filter(r=>r!==""&&r!==null&&r!==void 0);return t.length?t.reduce(ri,s):""}function Ls(s,...e){return e.reduce(Tn,s)}function Ms(s,e){return(()=>{if(e<0)throw new Error("Decimal places should be non-negative.");const n=s.toString().split("."),[r,a=""]=n;if(e==0)return r;let l=a.split("");if(l.length>e)l=l.slice(0,e);else{const p=l.length;for(let x=0;x<e-p;x++)l.push("0")}return`${r}.${l.join("")}`})()}function Vs(s,e){return(()=>{if(s===null||s===""||s===void 0)return"";if(e<0)throw new Error("Decimal places should be non-negative.");const n=Math.trunc(e),r=Number(s);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 Hs(s,e){if(s===null||s===""||s===void 0)return"";if(e<0)throw new Error("Decimal places should be non-negative.");return e=e?parseInt(e+""):0,new $(s).decimalPlaces(e,$.ROUND_UP).toNumber()}function Us(...s){const e=s.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?Math.max.apply(null,e):""}function zs(s,e){return(()=>{if(e<1||e>s.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return s.sort((r,a)=>a-r)[e-1]})()}function Ys(...s){const e=s.flat().filter(n=>n!==""&&n!==null&&n!==void 0);return e.length?Math.min.apply(null,e):""}function Gs(s,e){return(()=>{if(e<1||e>s.length)throw new Error("Invalid value of n. It should be between 1 and the array length.");return s.sort((r,a)=>r-a)[e-1]})()}function Xs(...s){const e=s.flat().filter(n=>n!==""&&n!==null&&n!==void 0),t=e.length;if(!t)return"";let i=new $(0);for(const n of e)i=i.plus(n);return i.dividedBy(t).toNumber()}function Ks(s){return Math.abs.call(null,s)}function Js(s,e){return(()=>{if(s===0)throw new Error("The second value should not be zero.");const n=new $(s).mod(e).toNumber();return isNaN(n)?"":n})()}function xt(s){if(typeof s=="number")return Number.isFinite(s)?s:null;if(typeof s=="string"){const e=s.trim();if(e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}if(typeof s=="bigint"){const e=Number(s);return Number.isFinite(e)?e:null}return null}function $s(s,e){return(()=>{const n=xt(s),r=xt(e);return n===null||r===null?NaN:Math.abs(r)>1e9?r>0?1/0:0:Math.pow(n,r)})()}function Ws(s){return(()=>{const i=xt(s);return i===null?NaN:Math.sqrt(i)})()}function js(s,e){return(()=>{if(Array.isArray(s)){if(typeof e=="number")return s[e];throw new Error("For arrays, the second argument should be a number.")}else if(typeof s=="object"){if(typeof e=="string")return s[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 qs(s,e,t){return(()=>{if(Array.isArray(s))if(typeof e=="number"&&e>=0&&e<s.length)s[e]=t;else throw new Error("For arrays, the second argument (b) should be a number.");else if(typeof s=="object")if(typeof e=="string"&&s)s[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 s})()}function Qs(s,e){return(()=>{if(!e)throw new Error("For arrays, the second argument should not be null or undefined");return s.push(e),s})()}function Zs(s,e){return(()=>{if(!e)throw new Error("For arrays, the second argument should not be null or undefined");return s.unshift(e),s})()}function en(s){return s?(()=>{if(!s)throw new Error("the frist argument should not be null");const i=new Date(s*1e3),n=i.getFullYear(),r=String(i.getMonth()+1).padStart(2,"0"),a=String(i.getDate()).padStart(2,"0"),l=String(i.getHours()).padStart(2,"0"),p=String(i.getMinutes()).padStart(2,"0"),x=String(i.getSeconds()).padStart(2,"0");return`${n}-${r}-${a} ${l}:${p}:${x}`})():void 0}function tn(s){return s?U(s).unix():void 0}function sn(s,e){return s?U(s).format(e):void 0}function nn(){return U().format("YYYY-MM-DD HH:MM:ss")}function rn(){return U().format("YYYY-MM-DD")}function on(s){return U(s).year()}function an(s){return U(s).month()}function un(s){return U(s).day()}function cn(s){return U(s).hour()}function ln(s){return U(s).minute()}function hn(){return(()=>{const t=ne(U().startOf("week").toDate()),i=ne(U().endOf("week").toDate());return[t,i]})()}function pn(){return(()=>{const t=ne(U().subtract(1,"week").startOf("week").toDate()),i=ne(U().subtract(1,"week").endOf("week").toDate());return[t,i]})()}function fn(){return(()=>{const t=ne(U().startOf("month").toDate()),i=ne(U().endOf("month").toDate());return[t,i]})()}function dn(){return(()=>{const t=ne(U().subtract(1,"month").startOf("month").toDate()),i=ne(U().subtract(1,"month").endOf("month").toDate());return[t,i]})()}function mn(){return(()=>{const t=ne(U().startOf("year").toDate()),i=ne(U().endOf("year").toDate());return[t,i]})()}function En(){return(()=>{const t=ne(U().subtract(1,"year").startOf("year").toDate()),i=ne(U().subtract(1,"year").endOf("year").toDate());return[t,i]})()}function Dn(){return(()=>{const t=Math.floor((U().month()+3)/3),i=ne(U().quarter(t).startOf("quarter").toDate()),n=ne(U().quarter(t).endOf("quarter").toDate());return[i,n]})()}function Cn(){return(()=>{const t=Math.floor((U().month()+3)/3),i=ne(U().quarter(t-1).startOf("quarter").toDate()),n=ne(U().quarter(t-1).endOf("quarter").toDate());return[i,n]})()}function xn(s,e){return(()=>{const[n,r]=e;return s>=n&&s<=r})()}function gn(s,e){return(()=>{const[n,r]=e,a=U(s,"HH:mm");if(n>r){const l=U(n,"HH:mm"),p=U(r,"HH:mm").add(1,"day");return a>=l||a<=p}else return a>=U(n,"HH:mm")&&a<=U(r,"HH:mm")})()}function ne(s){return U(s).tz("America/Chicago").format("YYYY-MM-DD HH:mm:ss.SSSSSSSSS ZZ")}function An(...s){return[...s]}function Sn(...s){const e=(s.length-s.length%2)/2,t={};return Array(e).forEach(i=>{const n=s[i*2],r=s[i*2+1];t[n]=r}),t}function yn(...s){return s=s.flat().filter(t=>t!==""&&t!==null&&t!==void 0),s.length===0?"":s.map(t=>{const i=ri(t,t);return i!==""?i:new $(0).toNumber()}).reduce((t,i)=>St(t,i)||$(0).toNumber(),new $(0).toNumber())}function Fn(s){return Array.isArray(s)?s.length:""}function In(...s){const e=s.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,i=e.reduce((n,r)=>{const a=r-t;return n+a*a},0)/(e.length-1);return Math.sqrt(i)}function St(s,e){const t=new $(s).plus(new $(e)).toNumber();return isNaN(t)?"":t}function wn(s,e){const t=new $(s).minus(new $(e)).toNumber();return isNaN(t)?"":t}function ri(s,e){const t=new $(s).multipliedBy(new $(e)).toNumber();return isNaN(t)?"":t}function Tn(s,e){const t=new $(s).div(new $(e)).toNumber();return isNaN(t)?"":t}const oi=Object.freeze(Object.defineProperty({__proto__:null,ABS:Ks,ADD:_s,AND:ls,AVERAGE:Xs,CONCAT:xs,COUNT:Fn,DATE2TIMESTAMP:tn,DATEFORMAT:sn,DAY:un,DIVISION:Ls,EQ:ps,FINDSTR:ks,FIXED:Ms,GE:Es,GET:js,GT:Ds,HEADPUSH:Zs,HOUR:cn,IF:os,ISDATERANGE:xn,ISEMPTY:as,ISNULL:us,ISTIMERANGE:gn,ISUNDEFINED:cs,LARGE:zs,LASTMONTHRANGE:dn,LASTQUARTER:Cn,LASTWEEKRANGE:pn,LASTYEARRANGE:En,LE:ds,LEN:Cs,LOWER:ys,LT:ms,LTRIM:Is,MAX:Us,MIN:Ys,MINUTE:ln,MOD:Js,MONTH:an,MONTHRANGE:fn,MULTIPLICATION:Os,NE:fs,NOW:nn,OR:hs,PARSENUMBER:vs,POWER:$s,PUSH:Qs,PUT:qs,QUARTER:Dn,REDUCE:Ps,REPEAT:Ts,REPLACE:bs,ROUND:Vs,ROUNDUP:Hs,RTRIM:ws,SEARCHSTR:Rs,SEQMAP:Sn,SMALL:Gs,SPLIT:Ns,SQRT:Ws,STDEV:In,SUBSTR:As,SUBSTRING:gs,SUM:Bs,SUMSQ:yn,TIMESTAMP2DATE:en,TODAY:rn,TRIM:Fs,TUPLE:An,UPPER:Ss,WEEKRANGE:hn,YEAR:on,YEARRANGE:mn},Symbol.toStringTag,{value:"Module"}));var S;(function(s){s.AssignmentExpression="AssignmentExpression",s.AssignmentPattern="AssignmentPattern",s.ArrayExpression="ArrayExpression",s.ArrayPattern="ArrayPattern",s.ArrowFunctionExpression="ArrowFunctionExpression",s.AwaitExpression="AwaitExpression",s.BlockStatement="BlockStatement",s.BinaryExpression="BinaryExpression",s.BreakStatement="BreakStatement",s.CallExpression="CallExpression",s.CatchClause="CatchClause",s.ChainExpression="ChainExpression",s.ClassBody="ClassBody",s.ClassDeclaration="ClassDeclaration",s.ClassExpression="ClassExpression",s.ConditionalExpression="ConditionalExpression",s.ContinueStatement="ContinueStatement",s.Decorator="Decorator",s.DoWhileStatement="DoWhileStatement",s.DebuggerStatement="DebuggerStatement",s.EmptyStatement="EmptyStatement",s.ExportAllDeclaration="ExportAllDeclaration",s.ExportDefaultDeclaration="ExportDefaultDeclaration",s.ExportNamedDeclaration="ExportNamedDeclaration",s.ExportSpecifier="ExportSpecifier",s.ExpressionStatement="ExpressionStatement",s.ForStatement="ForStatement",s.ForOfStatement="ForOfStatement",s.ForInStatement="ForInStatement",s.FunctionDeclaration="FunctionDeclaration",s.FunctionExpression="FunctionExpression",s.Identifier="Identifier",s.IfStatement="IfStatement",s.ImportAttribute="ImportAttribute",s.ImportExpression="ImportExpression",s.ImportDeclaration="ImportDeclaration",s.ImportDefaultSpecifier="ImportDefaultSpecifier",s.ImportNamespaceSpecifier="ImportNamespaceSpecifier",s.ImportSpecifier="ImportSpecifier",s.Literal="Literal",s.LabeledStatement="LabeledStatement",s.LogicalExpression="LogicalExpression",s.MemberExpression="MemberExpression",s.MetaProperty="MetaProperty",s.MethodDefinition="MethodDefinition",s.NewExpression="NewExpression",s.ObjectExpression="ObjectExpression",s.ObjectPattern="ObjectPattern",s.Program="Program",s.Property="Property",s.PrivateIdentifier="PrivateIdentifier",s.RestElement="RestElement",s.ReturnStatement="ReturnStatement",s.SequenceExpression="SequenceExpression",s.SpreadElement="SpreadElement",s.StaticBlock="StaticBlock",s.Super="Super",s.SwitchCase="SwitchCase",s.SwitchStatement="SwitchStatement",s.TaggedTemplateExpression="TaggedTemplateExpression",s.TemplateElement="TemplateElement",s.TemplateLiteral="TemplateLiteral",s.ThisExpression="ThisExpression",s.ThrowStatement="ThrowStatement",s.TryStatement="TryStatement",s.UnaryExpression="UnaryExpression",s.UpdateExpression="UpdateExpression",s.VariableDeclaration="VariableDeclaration",s.VariableDeclarator="VariableDeclarator",s.WhileStatement="WhileStatement",s.WithStatement="WithStatement",s.YieldExpression="YieldExpression"})(S||(S={}));class bn{constructor(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}insertInnerComments(e,t){if(e.type===S.BlockStatement&&e.body.length===0){const i=[];for(let n=this.leading.length-1;n>=0;--n){const r=this.leading[n];t.end.offset>=r.start&&(i.unshift(r.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}i.length&&(e.innerComments=i)}}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 i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){const n=i.node.trailingComments[0];n&&n.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t}findLeadingComments(e){const t=[];let i;for(;this.stack.length>0;){const n=this.stack[this.stack.length-1];if(n&&n.start>=e.start.offset)i=n.node,this.stack.pop();else break}if(i){const n=i.leadingComments?i.leadingComments.length:0;for(let r=n-1;r>=0;--r){const a=i.leadingComments[r];a.range[1]<=e.start.offset&&(t.unshift(a),i.leadingComments.splice(r,1))}return i.leadingComments&&i.leadingComments.length===0&&delete i.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===S.Program&&e.body.length>0)return;this.insertInnerComments(e,t);const i=this.findTrailingComments(t),n=this.findLeadingComments(t);n.length>0&&(e.leadingComments=n),i.length>0&&(e.trailingComments=i),this.stack.push({node:e,start:t.start.offset})}visitComment(e,t){const i=e.type[0]==="L"?"Line":"Block",n={type:i,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:i,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=i,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]/},L={fromCodePoint(s){return s<65536?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10))+String.fromCharCode(56320+(s-65536&1023))},isStringWellFormedUnicode(s){for(let e=0;e<s.length;e++){let t=s.charCodeAt(e);if(t>=55296&&t<=56319){if(e===s.length-1||(e++,t=s.charCodeAt(e),t<56320&&t>57343))return!1}else if(t>=56320&&t<=57343)return!1}return!0},isWhiteSpace(s){return s===32||s===9||s===11||s===12||s===160||s>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(s)>=0},isLineTerminator(s){return s===10||s===13||s===8232||s===8233},isIdentifierStart(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s===92||s>=128&&Nt.NonAsciiIdentifierStart.test(L.fromCodePoint(s))},isIdentifierPart(s){return s===36||s===95||s>=65&&s<=90||s>=97&&s<=122||s>=48&&s<=57||s===92||s>=128&&Nt.NonAsciiIdentifierPart.test(L.fromCodePoint(s))},isDecimalDigit(s){return s>=48&&s<=57},isDecimalDigitChar(s){return s.length===1&&L.isDecimalDigit(s.charCodeAt(0))},isHexDigit(s){return s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102},isHexDigitChar(s){return s.length===1&&L.isHexDigit(s.charCodeAt(0))},isOctalDigit(s){return s>=48&&s<=55},isOctalDigitChar(s){return s.length===1&&L.isOctalDigit(s.charCodeAt(0))}};var Q;(function(s){s.JSXAttribute="JSXAttribute",s.JSXClosingElement="JSXClosingElement",s.JSXClosingFragment="JSXClosingFragment",s.JSXElement="JSXElement",s.JSXEmptyExpression="JSXEmptyExpression",s.JSXExpressionContainer="JSXExpressionContainer",s.JSXIdentifier="JSXIdentifier",s.JSXMemberExpression="JSXMemberExpression",s.JSXNamespacedName="JSXNamespacedName",s.JSXOpeningElement="JSXOpeningElement",s.JSXOpeningFragment="JSXOpeningFragment",s.JSXSpreadAttribute="JSXSpreadAttribute",s.JSXText="JSXText"})(Q||(Q={}));class kn{constructor(e){this.type=Q.JSXClosingElement,this.name=e}}class Rn{constructor(){this.type=Q.JSXClosingFragment}}class ut{constructor(e,t,i){this.type=Q.JSXElement,this.openingElement=e,this.children=t,this.closingElement=i}}class vn{constructor(){this.type=Q.JSXEmptyExpression}}class Bt{constructor(e){this.type=Q.JSXExpressionContainer,this.expression=e}}class Nn{constructor(e){this.type=Q.JSXIdentifier,this.name=e}}class Bn{constructor(e,t){this.type=Q.JSXMemberExpression,this.object=e,this.property=t}}class _n{constructor(e,t){this.type=Q.JSXAttribute,this.name=e,this.value=t}}class _t{constructor(e,t){this.type=Q.JSXNamespacedName,this.namespace=e,this.name=t}}class Pt{constructor(e,t,i){this.type=Q.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=i}}class Pn{constructor(e){this.type=Q.JSXOpeningFragment,this.selfClosing=e}}class On{constructor(e){this.type=Q.JSXSpreadAttribute,this.argument=e}}class Ln{constructor(e,t){this.type=Q.JSXText,this.value=e,this.raw=t}}class Mn{constructor(e){this.type=S.ArrayExpression,this.elements=e}}class Vn{constructor(e){this.type=S.ArrayPattern,this.elements=e}}class Hn{constructor(e,t,i,n){this.type=S.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=i,this.async=n}}class Un{constructor(e,t,i){this.type=S.AssignmentExpression,this.operator=e,this.left=t,this.right=i}}class ct{constructor(e,t){this.type=S.AssignmentPattern,this.left=e,this.right=t}}class zn{constructor(e,t,i,n){this.type=S.FunctionDeclaration,this.id=e,this.params=t,this.body=i,this.generator=n,this.expression=!1,this.async=!0}}class Yn{constructor(e){this.type=S.AwaitExpression,this.argument=e}}class Ot{constructor(e,t,i){this.type=S.Literal,this.value=e,this.raw=t,this.bigint=i}}class lt{constructor(e,t,i){this.type=S.BinaryExpression,this.operator=e,this.left=t,this.right=i}}class Lt{constructor(e){this.type=S.BlockStatement,this.body=e}}class Gn{constructor(e){this.type=S.BreakStatement,this.label=e}}class Xn{constructor(e,t,i){this.type=S.CallExpression,this.callee=e,this.arguments=t,this.optional=i}}class Kn{constructor(e,t){this.type=S.CatchClause,this.param=e,this.body=t}}class Mt{constructor(e){this.type=S.ChainExpression,this.expression=e}}class Jn{constructor(e){this.type=S.ClassBody,this.body=e}}class $n{constructor(e,t,i,n){this.type=S.ClassDeclaration,this.id=e,this.superClass=t,this.body=i,this.decorators=n}}class Wn{constructor(e,t,i,n){this.type=S.ClassExpression,this.id=e,this.superClass=t,this.body=i,this.decorators=n}}class jn{constructor(e,t,i){this.type=S.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=i}}class qn{constructor(e){this.type=S.ContinueStatement,this.label=e}}class Qn{constructor(){this.type=S.DebuggerStatement}}class Zn{constructor(e){this.type=S.Decorator,this.expression=e}}class er{constructor(e,t){this.type=S.ExpressionStatement,this.expression=e,this.directive=t}}class tr{constructor(e,t){this.type=S.DoWhileStatement,this.body=e,this.test=t}}class Pe{constructor(){this.type=S.EmptyStatement}}class ir{constructor(e,t,i){this.type=S.ExportAllDeclaration,this.source=e,this.exported=t,this.assertions=i}}class Ge{constructor(e){this.type=S.ExportDefaultDeclaration,this.declaration=e}}class ht{constructor(e,t,i,n){this.type=S.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=i,this.assertions=n}}class sr{constructor(e,t){this.type=S.ExportSpecifier,this.exported=t,this.local=e}}class pt{constructor(e){this.type=S.ExpressionStatement,this.expression=e}}class nr{constructor(e,t,i){this.type=S.ForInStatement,this.left=e,this.right=t,this.body=i,this.each=!1}}class rr{constructor(e,t,i,n){this.type=S.ForOfStatement,this.await=n,this.left=e,this.right=t,this.body=i}}class or{constructor(e,t,i,n){this.type=S.ForStatement,this.init=e,this.test=t,this.update=i,this.body=n}}class ar{constructor(e,t,i,n){this.type=S.FunctionDeclaration,this.id=e,this.params=t,this.body=i,this.generator=n,this.expression=!1,this.async=!1}}class we{constructor(e,t,i,n,r){this.type=S.FunctionExpression,this.id=e,this.params=t,this.body=i,this.generator=n,this.expression=!1,this.async=r}}class de{constructor(e){this.type=S.Identifier,this.name=e}}class ur{constructor(e,t,i){this.type=S.IfStatement,this.test=e,this.consequent=t,this.alternate=i}}class cr{constructor(e,t){this.type=S.ImportAttribute,this.key=e,this.value=t}}class lr{constructor(e,t){this.type=S.ImportExpression,this.source=e,this.attributes=t}}class hr{constructor(e,t,i){this.type=S.ImportDeclaration,this.specifiers=e,this.source=t,this.assertions=i}}class pr{constructor(e){this.type=S.ImportDefaultSpecifier,this.local=e}}class fr{constructor(e){this.type=S.ImportNamespaceSpecifier,this.local=e}}class dr{constructor(e,t){this.type=S.ImportSpecifier,this.local=e,this.imported=t}}class mr{constructor(e,t){this.type=S.LabeledStatement,this.label=e,this.body=t}}class Ie{constructor(e,t){this.type=S.Literal,this.value=e,this.raw=t}}class Vt{constructor(e,t,i){this.type=S.LogicalExpression,this.operator=e,this.left=t,this.right=i}}class Xe{constructor(e,t,i,n){this.type=S.MemberExpression,this.computed=e,this.object=t,this.property=i,this.optional=n}}class Ht{constructor(e,t){this.type=S.MetaProperty,this.meta=e,this.property=t}}class Er{constructor(e,t,i,n,r,a){this.type=S.MethodDefinition,this.key=e,this.computed=t,this.value=i,this.kind=n,this.static=r,this.decorators=a}}class Dr{constructor(e){this.type=S.Program,this.body=e,this.sourceType="module"}}class Cr{constructor(e,t){this.type=S.NewExpression,this.callee=e,this.arguments=t}}class xr{constructor(e){this.type=S.ObjectExpression,this.properties=e}}class gr{constructor(e){this.type=S.ObjectPattern,this.properties=e}}class Ke{constructor(e){this.type=S.PrivateIdentifier,this.name=e}}class Ut{constructor(e,t,i,n,r,a){this.type=S.Property,this.key=t,this.computed=i,this.value=n,this.kind=e,this.method=r,this.shorthand=a}}class Ar{constructor(e,t,i,n,r){this.type=S.Property,this.key=e,this.computed=t,this.value=i,this.static=n,this.decorators=r}}class Sr{constructor(e,t,i,n){this.type=S.Literal,this.value=e,this.raw=t,this.regex={pattern:i,flags:n}}}class Je{constructor(e){this.type=S.RestElement,this.argument=e}}class yr{constructor(e){this.type=S.ReturnStatement,this.argument=e}}class Fr{constructor(e){this.type=S.Program,this.body=e,this.sourceType="script"}}class ft{constructor(e){this.type=S.SequenceExpression,this.expressions=e}}class Ir{constructor(e){this.type=S.SpreadElement,this.argument=e}}class wr{constructor(e){this.type=S.StaticBlock,this.body=e}}class zt{constructor(){this.type=S.Super}}class Tr{constructor(e,t){this.type=S.SwitchCase,this.test=e,this.consequent=t}}class br{constructor(e,t){this.type=S.SwitchStatement,this.discriminant=e,this.cases=t}}class Yt{constructor(e,t){this.type=S.TaggedTemplateExpression,this.tag=e,this.quasi=t}}class Gt{constructor(e,t){this.type=S.TemplateElement,this.value=e,this.tail=t}}class kr{constructor(e,t){this.type=S.TemplateLiteral,this.quasis=e,this.expressions=t}}class Rr{constructor(){this.type=S.ThisExpression}}class vr{constructor(e){this.type=S.ThrowStatement,this.argument=e}}class Nr{constructor(e,t,i){this.type=S.TryStatement,this.block=e,this.handler=t,this.finalizer=i}}class Br{constructor(e,t){this.type=S.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}}class Xt{constructor(e,t,i){this.type=S.UpdateExpression,this.operator=e,this.argument=t,this.prefix=i}}class Se{constructor(e,t){this.type=S.VariableDeclaration,this.declarations=e,this.kind=t}}class Kt{constructor(e,t){this.type=S.VariableDeclarator,this.id=e,this.init=t}}class _r{constructor(e,t){this.type=S.WhileStatement,this.test=e,this.body=t}}class Pr{constructor(e,t){this.type=S.WithStatement,this.object=e,this.body=t}}class Or{constructor(e,t){this.type=S.YieldExpression,this.argument=e,this.delegate=t}}function xe(s,e){if(!s)throw new Error("ASSERT: "+e)}class Lr{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 i=new Error(e);try{throw i}catch(n){Object.create&&Object.defineProperty&&(i=Object.create(n),Object.defineProperty(i,"column",{value:t}))}return i}createError(e,t,i,n){const r="Line "+t+": "+n,a=this.constructError(r,i);return a.index=e,a.lineNumber=t,a.description=n,a}throwError(e,t,i,n){throw this.createError(e,t,i,n)}tolerateError(e,t,i,n){const r=this.createError(e,t,i,n);if(this.tolerant)this.recordError(r);else throw r}}const T={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 Jt(s){return"0123456789abcdef".indexOf(s.toLowerCase())}function dt(s){return"01234567".indexOf(s)}class Mr{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=T.UnexpectedTokenIllegal){return this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}tolerateUnexpectedToken(e=T.UnexpectedTokenIllegal){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)}skipSingleLineComment(e){let t=[],i,n;for(this.trackComment&&(t=[],i=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,L.isLineTerminator(r)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};const a={multiLine:!1,slice:[i+e,this.index-1],range:[i,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:[i+e,this.index],range:[i,this.index],loc:n};t.push(r)}return t}skipMultiLineComment(){let e=[],t,i;for(this.trackComment&&(e=[],t=this.index-2,i={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){const n=this.source.charCodeAt(this.index);if(L.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){i.end={line:this.lineNumber,column:this.index-this.lineStart};const r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:i};e.push(r)}return e}++this.index}else++this.index}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};const n={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:i};e.push(n)}return this.tolerateUnexpectedToken(),e}scanComments(){let e;this.trackComment&&(e=[]);let t=this.index===0;for(;!this.eof();){let i=this.source.charCodeAt(this.index);if(L.isWhiteSpace(i))++this.index;else if(L.isLineTerminator(i))++this.index,i===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(i===47)if(i=this.source.charCodeAt(this.index+1),i===47){this.index+=2;const n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else if(i===42){this.index+=2;const n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else break;else if(t&&i===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(i===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 i=this.source.charCodeAt(e+1);i>=56320&&i<=57343&&(t=(t-55296)*1024+i-56320+65536)}return t}scanHexEscape(e){const t=e==="u"?4:2;let i=0;for(let n=0;n<t;++n)if(!this.eof()&&L.isHexDigit(this.source.charCodeAt(this.index)))i=i*16+Jt(this.source[this.index++]);else return null;return String.fromCharCode(i)}tryToScanUnicodeCodePointEscape(){let e=this.source[this.index],t=0;if(e==="}")return null;for(;!this.eof()&&(e=this.source[this.index++],!!L.isHexDigit(e.charCodeAt(0)));)t=t*16+Jt(e);return t>1114111||e!=="}"?null:L.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(L.isIdentifierPart(t))++this.index;else break}return this.source.slice(e,this.index)}getComplexIdentifier(){let e=this.codePointAt(this.index),t=L.fromCodePoint(e);this.index+=t.length;let i;for(e===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,i=this.scanUnicodeCodePointEscape()):(i=this.scanHexEscape("u"),(i===null||i==="\\"||!L.isIdentifierStart(i.charCodeAt(0)))&&this.throwUnexpectedToken()),t=i);!this.eof()&&(e=this.codePointAt(this.index),!!L.isIdentifierPart(e));)i=L.fromCodePoint(e),t+=i,this.index+=i.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,i=this.scanUnicodeCodePointEscape()):(i=this.scanHexEscape("u"),(i===null||i==="\\"||!L.isIdentifierPart(i.charCodeAt(0)))&&this.throwUnexpectedToken()),t+=i);return t}octalToDecimal(e){let t=e!=="0",i=dt(e);return!this.eof()&&L.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,i=i*8+dt(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&L.isOctalDigit(this.source.charCodeAt(this.index))&&(i=i*8+dt(this.source[this.index++]))),{code:i,octal:t}}scanIdentifier(){let e;const t=this.index,i=this.source.charCodeAt(t)===92,n=i?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(T.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index,escaped:i}}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(L.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}):(L.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,i=this.scanLiteralPart(n=>n==="0"||n==="1");return i.length===0&&this.throwUnexpectedToken(),this.source[this.index]==="n"?(this.index++,{type:6,value:BigInt("0b"+i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}):(this.eof()||(t=this.source.charCodeAt(this.index),(L.isIdentifierStart(t)||L.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(i,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index})}scanOctalLiteral(e,t){let i="",n=!1;return L.isOctalDigit(e.charCodeAt(0))?(n=!0,i="0"+this.source[this.index++]):++this.index,i+=this.scanLiteralPart(L.isOctalDigitChar),!n&&i.length===0&&this.throwUnexpectedToken(),this.source[this.index]==="n"?(this.index++,{type:6,value:BigInt("0o"+i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}):((L.isIdentifierStart(this.source.charCodeAt(this.index))||L.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(i,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(!L.isOctalDigit(t.charCodeAt(0)))return!0}return!0}scanLiteralPart(e){let t="";for(this.source[this.index]==="_"&&this.throwUnexpectedToken(T.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(T.NumericSeperatorOneUnderscore);return this.source[this.index-1]==="_"&&this.throwUnexpectedToken(T.NumericSeperatorNotAllowedHere),t}scanNumericLiteral(){const e=this.index;let t=this.source[e];xe(L.isDecimalDigit(t.charCodeAt(0))||t===".","Numeric literal must start with a decimal digit or a decimal point");let i="";if(t!=="."){if(i=this.source[this.index++],t=this.source[this.index],i==="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&&L.isOctalDigit(t.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(t,e)}this.index--,i=this.scanLiteralPart(L.isDecimalDigitChar),t=this.source[this.index]}if(t==="."&&(i+=this.source[this.index++],i+=this.scanLiteralPart(L.isDecimalDigitChar),t=this.source[this.index]),t==="e"||t==="E")i+=this.source[this.index++],t=this.source[this.index],(t==="+"||t==="-")&&(i+=this.source[this.index++]),L.isDecimalDigit(this.source.charCodeAt(this.index))?i+=this.scanLiteralPart(L.isDecimalDigitChar):this.throwUnexpectedToken();else if(t==="n")return i.length>1&&i[0]==="0"&&this.throwUnexpectedToken(),this.index++,{type:6,value:BigInt(i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index};return L.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanStringLiteral(){const e=this.index;let t=this.source[e];xe(t==="'"||t==='"',"String literal must starts with a quote"),++this.index;let i=!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||!L.isLineTerminator(r.charCodeAt(0)))switch(r){case"u":if(this.source[this.index]==="{")++this.index,n+=this.scanUnicodeCodePointEscape();else{const l=this.scanHexEscape(r);l===null&&this.throwUnexpectedToken(),n+=l}break;case"x":const a=this.scanHexEscape(r);a===null&&this.throwUnexpectedToken(T.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&&L.isOctalDigit(r.charCodeAt(0))){const l=this.octalToDecimal(r);i=l.octal||i,n+=String.fromCharCode(l.code)}else n+=r;break}else++this.lineNumber,r==="\r"&&this.source[this.index]===`
3
+ `&&++this.index,this.lineStart=this.index;else{if(L.isLineTerminator(r.charCodeAt(0)))break;n+=r}}return t!==""&&(this.index=e,this.throwUnexpectedToken()),{type:8,value:n,octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}}scanTemplate(){let e="",t=!1;const i=this.index,n=this.source[i]==="`";let r=!1,a=null,l=2;for(++this.index;!this.eof();){let p=this.source[this.index++];if(p==="`"){l=1,r=!0,t=!0;break}else if(p==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,t=!0;break}e+=p}else{if(a!==null)continue;if(p==="\\")if(p=this.source[this.index++],L.isLineTerminator(p.charCodeAt(0)))++this.lineNumber,p==="\r"&&this.source[this.index]===`
4
+ `&&++this.index,this.lineStart=this.index;else switch(p){case"n":e+=`
5
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"u":if(this.source[this.index]==="{"){++this.index;const A=this.tryToScanUnicodeCodePointEscape();A===null?a="u":e+=A}else{const A=this.scanHexEscape(p);A===null?a="u":e+=A}break;case"x":const x=this.scanHexEscape(p);x===null?a="x":e+=x;break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:p==="0"?L.isDecimalDigit(this.source.charCodeAt(this.index))?a="0":e+="\0":L.isDecimalDigitChar(p)?a=p:e+=p;break}else L.isLineTerminator(p.charCodeAt(0))?(++this.lineNumber,p==="\r"&&this.source[this.index]===`
6
+ `&&++this.index,this.lineStart=this.index,e+=`
7
+ `):e+=p}}return t||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:10,value:this.source.slice(i+1,this.index-l),cooked:a===null?e:null,head:n,tail:r,notEscapeSequenceHead:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,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,l)=>{const p=parseInt(a||l,16);return p>1114111&&this.throwUnexpectedToken(T.InvalidRegExp),p<=65535?String.fromCharCode(p):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch{this.throwUnexpectedToken(T.InvalidRegExp)}try{return new RegExp(e,t)}catch{return null}}scanRegExpBody(){let e=this.source[this.index];xe(e==="/","Regular expression literal must start with a slash");let t=this.source[this.index++],i=!1,n=!1;for(;!this.eof();)if(e=this.source[this.index++],t+=e,e==="\\")e=this.source[this.index++],L.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(T.UnterminatedRegExp),t+=e;else if(L.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(T.UnterminatedRegExp);else if(i)e==="]"&&(i=!1);else if(e==="/"){n=!0;break}else e==="["&&(i=!0);return n||this.throwUnexpectedToken(T.UnterminatedRegExp),t.substr(1,t.length-2)}scanRegExpFlags(){let e="",t="";for(;!this.eof();){let i=this.source[this.index];if(!L.isIdentifierPart(i.charCodeAt(0)))break;if(++this.index,i==="\\"&&!this.eof())if(i=this.source[this.index],i==="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+=i,e+=i}return t}scanRegExp(){const e=this.index,t=this.scanRegExpBody(),i=this.scanRegExpFlags(),n=this.testRegExp(t,i);return{type:9,value:"",pattern:t,flags:i,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 L.isIdentifierStart(e)?this.scanIdentifier():e===40||e===41||e===59?this.scanPunctuator():e===39||e===34?this.scanStringLiteral():e===46?L.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():L.isDecimalDigit(e)?this.scanNumericLiteral():e===96||e===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():e>=55296&&e<57343&&L.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()}}const ue={};ue[1]="Boolean";ue[2]="<end>";ue[3]="Identifier";ue[4]="Keyword";ue[5]="Null";ue[6]="Numeric";ue[7]="Punctuator";ue[8]="String";ue[9]="RegularExpression";ue[10]="Template";const De="ArrowParameterPlaceHolder";class ai{constructor(e,t={},i){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=i,this.errorHandler=new Lr,this.errorHandler.tolerant=this.config.tolerant==!0,this.scanner=new Mr(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 i=t.slice(),n=e.replace(/%(\d)/g,(p,x)=>(xe(x<i.length,"Message reference must be in range"),i[x])),r=this.lastMarker.index,a=this.lastMarker.line,l=this.lastMarker.column+1;throw this.errorHandler.createError(r,a,l,n)}tolerateError(e,...t){const i=t.slice(),n=e.replace(/%(\d)/g,(p,x)=>(xe(x<i.length,"Message reference must be in range"),i[x])),r=this.lastMarker.index,a=this.scanner.lineNumber,l=this.lastMarker.column+1;this.errorHandler.tolerateError(r,a,l,n)}unexpectedTokenError(e,t){let i=t||T.UnexpectedToken,n;if(e?(t||(i=e.type===2?T.UnexpectedEOS:e.type===3?T.UnexpectedIdentifier:e.type===6?T.UnexpectedNumber:e.type===8?T.UnexpectedString:e.type===10?T.UnexpectedTemplate:T.UnexpectedToken,e.type===4&&(this.scanner.isFutureReservedWord(e.value)?i=T.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(e.value)&&(i=T.StrictReservedWord))),n=e.value):n="ILLEGAL",i=i.replace("%0",n),e&&typeof e.lineNumber=="number"){const r=e.start,a=e.lineNumber,l=this.lastMarker.index-this.lastMarker.column,p=e.start-l+1;return this.errorHandler.createError(r,a,p,i)}else{const r=this.lastMarker.index,a=this.lastMarker.line,l=this.lastMarker.column+1;return this.errorHandler.createError(r,a,l,i)}}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(T.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 i=e[t],n={type:i.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(i.slice[0],i.slice[1])};this.config.range&&(n.range=i.range),this.config.loc&&(n.loc=i.loc);const r={start:{line:i.loc.start.line,column:i.loc.start.column,offset:i.range[0]},end:{line:i.loc.end.line,column:i.loc.end.column,offset:i.range[1]}};this.delegate(n,r)}}}getTokenRaw(e){return this.scanner.source.slice(e.start,e.end)}convertToken(e){const t={type:ue[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 i=e.pattern,n=e.flags;t.regex={pattern:i,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 i=e.start-e.lineStart,n=e.lineNumber;return i<0&&(i+=t,n--),{index:e.start,line:n,column:i}}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 i={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,i)}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,T.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,i=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=i,this.context.firstCoverInitializedNameError=n,r}inheritCoverGrammar(e){const t=this.context.isBindingElement,i=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&&i,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,i,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 de(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,T.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,i=this.nextToken(),n=this.getTokenRaw(i),typeof i.value=="bigint"?t=this.finalize(e,new Ot(i.value,n,i.value.toString())):t=this.finalize(e,new Ie(i.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,i=this.nextToken(),n=this.getTokenRaw(i),t=this.finalize(e,new Ie(i.value==="true",n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,i=this.nextToken(),n=this.getTokenRaw(i),t=this.finalize(e,new Ie(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,i=this.nextRegexToken(),n=this.getTokenRaw(i),t=this.finalize(e,new Sr(i.regex,n,i.pattern,i.flags));break;case"#":this.nextToken(),t=this.finalize(e,new Ke(this.nextToken().value));break;case"@":let r=this.parseDecorators();this.context.decorators=r,this.parsePrimaryExpression(),this.context.decorators=null,t=this.finalize(e,new Ke(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 de(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 Rr)):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,T.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 Ir(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 i=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(i)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new Mn(t))}parsePropertyMethod(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const t=this.context.strict,i=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=i,n}parsePropertyMethodFunction(e){const t=this.createNode(),i=this.context.allowYield;this.context.allowYield=!0;const n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=i,this.finalize(t,new we(null,n.params,r,e,!1))}parsePropertyMethodAsyncFunction(e){const t=this.createNode(),i=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=i,this.context.isAsync=n,this.finalize(t,new we(null,r.params,a,e,!0))}parseObjectPropertyKey(e=!1){const t=this.createNode(),i=this.nextToken();let n;switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,T.StrictOctalLiteral);const r=this.getTokenRaw(i);typeof i.value=="bigint"?n=this.finalize(t,new Ot(i.value,r,i.value.toString())):n=this.finalize(t,new Ie(i.value,r));break;case 3:case 1:case 5:case 4:n=this.finalize(t,e?new Ke(i.value):new de(i.value));break;case 7:i.value==="["?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):n=this.throwUnexpectedToken(i);break;default:n=this.throwUnexpectedToken(i)}return n}isPropertyKey(e,t){return e.type===S.Identifier&&e.name===t||e.type===S.Literal&&e.value===t}parseObjectProperty(e){const t=this.createNode(),i=this.lookahead;let n,r=null,a=null,l=!1,p=!1,x=!1,A=!1,y=!1;if(i.type===3){const R=i.value;this.nextToken(),l=this.match("["),A=!this.hasLineTerminator&&R==="async"&&!this.match(":")&&!this.match("(")&&!this.match(","),y=this.match("*"),y&&this.nextToken(),r=A?this.parseObjectPropertyKey():this.finalize(t,new de(R))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());const F=this.qualifiedPropertyName(this.lookahead);if(i.type===3&&!A&&i.value==="get"&&F)n="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(i.type===3&&!A&&i.value==="set"&&F)n="set",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(i.type===7&&i.value==="*"&&F)n="init",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(!1),p=!0;else if(r||this.throwUnexpectedToken(this.lookahead),n="init",this.match(":")&&!A)!l&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(T.DuplicateProtoProperty),e.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=A?this.parsePropertyMethodAsyncFunction(y):this.parsePropertyMethodFunction(y),p=!0;else if(i.type===3){const R=this.finalize(t,new de(i.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),x=!0;const _=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(t,new ct(R,_))}else x=!0,a=R}else this.throwUnexpectedToken(this.nextToken());return this.finalize(t,new Ut(n,r,l,a,p,x))}parseObjectInitializer(){const e=this.createNode();this.expect("{");const t=[],i={value:!1};for(;!this.match("}");){const n=this.match("...")?this.parseSpreadElement():this.parseObjectProperty(i);t.push(n),!this.match("}")&&(!n.method||this.match(","))&&this.expectCommaSeparator()}return this.expect("}"),this.finalize(e,new xr(t))}throwTemplateLiteralEarlyErrors(e){switch(e.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(e,T.InvalidUnicodeEscapeSequence);case"x":return this.throwUnexpectedToken(e,T.InvalidHexEscapeSequence);case"8":case"9":return this.throwUnexpectedToken(e,T.TemplateEscape89);default:return this.throwUnexpectedToken(e,T.TemplateOctalLiteral)}}parseTemplateHead(e){xe(this.lookahead.head,"Template literal must start with a template head");const t=this.createNode(),i=this.nextToken();!e.isTagged&&i.notEscapeSequenceHead!==null&&this.throwTemplateLiteralEarlyErrors(i);const n=i.value,r=i.cooked;return this.finalize(t,new Gt({raw:n,cooked:r},i.tail))}parseTemplateElement(e){this.lookahead.type!==10&&this.throwUnexpectedToken();const t=this.createNode(),i=this.nextToken();!e.isTagged&&i.notEscapeSequenceHead!==null&&this.throwTemplateLiteralEarlyErrors(i);const n=i.value,r=i.cooked;return this.finalize(t,new Gt({raw:n,cooked:r},i.tail))}parseTemplateLiteral(e){const t=this.createNode(),i=[],n=[];let r=this.parseTemplateHead(e);for(n.push(r);!r.tail;)i.push(this.parseExpression()),r=this.parseTemplateElement(e),n.push(r);return this.finalize(t,new kr(n,i))}reinterpretExpressionAsPattern(e){switch(e.type){case S.Identifier:case S.MemberExpression:case S.RestElement:case S.AssignmentPattern:break;case S.SpreadElement:e.type=S.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case S.ArrayExpression:e.type=S.ArrayPattern;for(let t=0;t<e.elements.length;t++)e.elements[t]!==null&&this.reinterpretExpressionAsPattern(e.elements[t]);break;case S.ObjectExpression:e.type=S.ObjectPattern;for(let t=0;t<e.properties.length;t++){const i=e.properties[t];this.reinterpretExpressionAsPattern(i.type===S.SpreadElement?i:i.value)}break;case S.AssignmentExpression:e.type=S.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:De,params:[],async:!1};else{const t=this.lookahead,i=[];if(this.match("..."))e=this.parseRestElement(i),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:De,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:De,params:r,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),r.push(this.parseRestElement(i)),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:De,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(e=this.finalize(this.startNode(t),new ft(r)))}if(!n){if(this.expect(")"),this.match("=>")&&(e.type===S.Identifier&&e.name==="yield"&&(n=!0,e={type:De,params:[e],async:!1}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===S.SequenceExpression)for(let a=0;a<e.expressions.length;a++)this.reinterpretExpressionAsPattern(e.expressions[a]);else this.reinterpretExpressionAsPattern(e);const r=e.type===S.SequenceExpression?e.expressions:[e];e={type:De,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,i=this.createNode(),n=this.nextToken();return n.value==="#"&&e&&(n=this.nextToken(),t=!0),this.isIdentifierName(n)||this.throwUnexpectedToken(n),this.finalize(i,t?new Ke(n.value):new de(n.value))}parseNewExpression(){const e=this.createNode(),t=this.parseIdentifierName();xe(t.name==="new","New expression must start with `new`");let i;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){const n=this.parseIdentifierName();i=new Ht(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():[];i=new Cr(n,r),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,i)}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 i=this.scanner.lex();this.scanner.restoreState(t),e=i.type===7&&i.value==="("}return e}parseImportCall(){const e=this.createNode();this.expectKeyword("import"),this.expect("(");const t=this.parseAssignmentExpression();let i=null;return this.match(",")&&(this.nextToken(),i=this.parseObjectInitializer()),!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new lr(t,i))}matchImportMeta(){let e=this.matchKeyword("import");if(e){const t=this.scanner.saveState();this.scanner.scanComments();const i=this.scanner.lex();if(i.type===7&&i.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,T.InvalidEscapedReservedWord)}else e=!1;this.scanner.restoreState(t)}return e}parseImportMeta(){const e=this.createNode(),t=this.parseIdentifierName();this.expect(".");const i=this.parseIdentifierName();return this.context.isAssignmentTarget=!1,this.finalize(e,new Ht(t,i))}parseLeftHandSideExpressionAllowCall(){const e=this.lookahead,t=this.matchContextualKeyword("async"),i=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 zt),!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(T.UnexpectedSuper);let a=!1;for(;;){let l=!1;if(this.match("?.")&&(l=!0,a=!0,this.expect("?.")),this.match("(")){const p=t&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;const x=p?this.parseAsyncArguments():this.parseArguments();if(n.type===S.ImportExpression&&x.length!==1&&this.tolerateError(T.BadImportCallArity),n=this.finalize(this.startNode(e),new Xn(n,x,l)),p&&this.match("=>")){for(let A=0;A<x.length;++A)this.reinterpretExpressionAsPattern(x[A]);n={type:De,params:x,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!l,this.expect("[");const p=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),n=this.finalize(this.startNode(e),new Xe(!0,n,p,l))}else if(this.lookahead.type===10&&this.lookahead.head){l&&this.throwUnexpectedToken(this.lookahead),a&&this.throwError(T.InvalidTaggedTemplateOnOptionalChain);const p=this.parseTemplateLiteral({isTagged:!0});n=this.finalize(this.startNode(e),new Yt(n,p))}else if(this.match(".")||l){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!l,l||this.expect(".");const p=this.parseIdentifierName(!0);n=this.finalize(this.startNode(e),new Xe(!1,n,p,l))}else break}return this.context.allowIn=i,a?new Mt(n):n}parseSuper(){const e=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(e,new zt)}parseLeftHandSideExpression(){xe(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),i=!1;for(;;){let n=!1;if(this.match("?.")&&(n=!0,i=!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 Xe(!0,t,r,n))}else if(this.lookahead.type===10&&this.lookahead.head){n&&this.throwUnexpectedToken(this.lookahead),i&&this.throwError(T.InvalidTaggedTemplateOnOptionalChain);const r=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(e,new Yt(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 Xe(!1,t,r,n))}else break}return i?new Mt(t):t}parseUpdateExpression(){let e;const t=this.lookahead;if(this.match("++")||this.match("--")){const i=this.startNode(t),n=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&e.type===S.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(T.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(T.InvalidLHSInAssignment);const r=!0;e=this.finalize(i,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===S.Identifier&&this.scanner.isRestrictedWord(e.name)&&this.tolerateError(T.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(T.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const i=this.nextToken().value,n=!1;e=this.finalize(this.startNode(t),new Xt(i,e,n))}return e}parseAwaitExpression(){const e=this.createNode();this.nextToken();const t=this.parseUnaryExpression();return this.finalize(e,new Yn(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),i=this.nextToken();e=this.inheritCoverGrammar(this.parseUnaryExpression),e=this.finalize(t,new Br(i.value,e)),this.context.strict&&e.operator==="delete"&&e.argument.type===S.Identifier&&this.tolerateError(T.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 i=this.inheritCoverGrammar(this.parseUnaryExpression);if((i.type!==S.UnaryExpression||t)&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const r=i,a=this.isolateCoverGrammar(this.parseExponentiationExpression);i=this.finalize(this.startNode(e),new lt("**",r,a))}return i}binaryPrecedence(e){const t=e.value;let i;return e.type===7?i=this.operatorPrecedence[t]||0:e.type===4?i=t==="instanceof"||this.context.allowIn&&t==="in"?12:0:i=0,i}parseBinaryExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseExponentiationExpression),i=!0,n=!0;const r=p=>{(p.value==="&&"||p.value==="||")&&(n=!1),p.value==="??"&&(i=!1)},a=this.lookahead;let l=this.binaryPrecedence(a);if(l>0){r(a),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;const p=[e,this.lookahead];let x=t,A=this.isolateCoverGrammar(this.parseExponentiationExpression);const y=[x,a.value,A],F=[l];for(;l=this.binaryPrecedence(this.lookahead),!(l<=0);){for((!i&&(this.lookahead.value==="&&"||this.lookahead.value==="||")||!n&&this.lookahead.value==="??")&&this.throwUnexpectedToken(this.lookahead),r(this.lookahead);y.length>2&&l<=F[F.length-1];){A=y.pop();const k=y.pop();F.pop(),x=y.pop(),p.pop();const P=p[p.length-1],w=this.startNode(P,P.lineStart),G=k==="||"||k==="&&"||k==="??";y.push(this.finalize(w,G?new Vt(k,x,A):new lt(k,x,A)))}y.push(this.nextToken().value),F.push(l),p.push(this.lookahead),y.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}let R=y.length-1;t=y[R];let _=p.pop();for(;R>1;){const k=p.pop(),P=_&&_.lineStart,w=this.startNode(k,P),G=y[R-1],X=G==="||"||G==="&&"||G==="??";t=this.finalize(w,X?new Vt(G,y[R-2],t):new lt(G,y[R-2],t)),R-=2,_=k}}return t}parseConditionalExpression(){const e=this.lookahead;let t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();const i=this.context.allowIn;this.context.allowIn=!0;const n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i,this.expect(":");const r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new jn(t,n,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t}checkPatternParam(e,t){switch(t.type){case S.Identifier:this.validateParam(e,t,t.name);break;case S.RestElement:this.checkPatternParam(e,t.argument);break;case S.AssignmentPattern:this.checkPatternParam(e,t.left);break;case S.ArrayPattern:for(let i=0;i<t.elements.length;i++)t.elements[i]!==null&&this.checkPatternParam(e,t.elements[i]);break;case S.ObjectPattern:for(let i=0;i<t.properties.length;i++){const n=t.properties[i];this.checkPatternParam(e,n.type===S.RestElement?n:n.value)}break}e.simple=e.simple&&t instanceof de}reinterpretAsCoverFormalsList(e){let t=[e];const i={simple:!0,paramSet:{}};let n=!1;switch(e.type){case S.Identifier:break;case De:t=e.params,n=e.async;break;default:return null}for(let r=0;r<t.length;++r){const a=t[r];a.type===S.AssignmentPattern?a.right.type===S.YieldExpression&&(a.right.argument&&this.throwUnexpectedToken(this.lookahead),a.right.type=S.Identifier,a.right.name="yield",delete a.right.argument,delete a.right.delegate):n&&a.type===S.Identifier&&a.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(i,a),t[r]=a}if(this.context.strict||!this.context.allowYield)for(let r=0;r<t.length;++r)t[r].type===S.YieldExpression&&this.throwUnexpectedToken(this.lookahead);if(i.hasDuplicateParameterNames){const r=this.context.strict?i.stricted:i.firstRestricted;this.throwUnexpectedToken(r,T.DuplicateParameter)}return{simple:i.simple,params:t,stricted:i.stricted,firstRestricted:i.firstRestricted,message:i.message}}parseAssignmentExpression(){let e;if(!this.context.allowYield&&this.matchKeyword("yield"))e=this.parseYieldExpression();else{const t=this.lookahead;let i=t;if(e=this.parseConditionalExpression(),i.type===3&&i.lineNumber===this.lookahead.lineNumber&&i.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){const n=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(n),e={type:De,params:[n],async:!0}}if(e.type===De||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,l=this.context.allowStrictDirective;this.context.allowStrictDirective=r.simple;const p=this.context.allowYield,x=this.context.isAsync;this.context.allowYield=!0,this.context.isAsync=n;const A=this.startNode(t);this.expect("=>");let y;if(this.match("{")){const R=this.context.allowIn;this.context.allowIn=!0,y=this.parseFunctionSourceElements(),this.context.allowIn=R}else y=this.isolateCoverGrammar(this.parseAssignmentExpression);const F=y.type!==S.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(A,new Hn(r.params,y,F,n)),this.context.strict=a,this.context.allowStrictDirective=l,this.context.allowYield=p,this.context.isAsync=x}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(T.InvalidLHSInAssignment),this.context.strict&&e.type===S.Identifier){const a=e;this.scanner.isRestrictedWord(a.name)&&this.tolerateUnexpectedToken(i,T.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(a.name)&&this.tolerateUnexpectedToken(i,T.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),i=this.nextToken();const n=i.value,r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new Un(n,e,r)),this.context.firstCoverInitializedNameError=null}}return e}parseExpression(){const e=this.lookahead;let t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){const i=[];for(i.push(t);this.lookahead.type!==2&&this.match(",");)this.nextToken(),i.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new ft(i))}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,T.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.matchImportCall()?e=this.parseExpressionStatement():this.matchImportMeta()?e=this.parseStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,T.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 Lt(t))}parseLexicalBinding(e,t){const i=this.createNode(),n=[],r=this.parsePattern(n,e);this.context.strict&&r.type===S.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(T.StrictVarName);let a=null;return e==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),a=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(T.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==S.Identifier||this.match("="))&&(this.expect("="),a=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(i,new Kt(r,a))}parseBindingList(e,t){const i=[this.parseLexicalBinding(e,t)];for(;this.match(",");)this.nextToken(),i.push(this.parseLexicalBinding(e,t));return i}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(),i=this.nextToken().value;xe(i==="let"||i==="const","Lexical declaration must be either let or const");const n=this.parseBindingList(i,e);return this.consumeSemicolon(),this.finalize(t,new Se(n,i))}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 i=this.createNode();this.expect("...");const n=this.parsePattern(e,t);return this.finalize(i,new Je(n))}parseArrayPattern(e,t){const i=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(i,new Vn(n))}parsePropertyPattern(e,t){const i=this.createNode();let n=!1,r=!1;const a=!1;let l,p;if(this.lookahead.type===3){const x=this.lookahead;l=this.parseVariableIdentifier();const A=this.finalize(i,new de(x.value));if(this.match("=")){e.push(x),r=!0,this.nextToken();const y=this.parseAssignmentExpression();p=this.finalize(this.startNode(x),new ct(A,y))}else this.match(":")?(this.expect(":"),p=this.parsePatternWithDefault(e,t)):(e.push(x),r=!0,p=A)}else n=this.match("["),l=this.parseObjectPropertyKey(),this.expect(":"),p=this.parsePatternWithDefault(e,t);return this.finalize(i,new Ut("init",l,n,p,a,r))}parseRestProperty(e){const t=this.createNode();this.expect("...");const i=this.parsePattern(e);return this.match("=")&&this.throwError(T.DefaultRestProperty),this.match("}")||this.throwError(T.PropertyAfterRestProperty),this.finalize(t,new Je(i))}parseObjectPattern(e,t){const i=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(i,new gr(n))}parsePattern(e,t){let i;return this.match("[")?i=this.parseArrayPattern(e,t):this.match("{")?i=this.parseObjectPattern(e,t):(this.matchKeyword("let")&&(t==="const"||t==="let")&&this.tolerateUnexpectedToken(this.lookahead,T.LetInLexicalBinding),e.push(this.lookahead),i=this.parseVariableIdentifier(t)),i}parsePatternWithDefault(e,t){const i=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(i),new ct(n,a))}return n}parseVariableIdentifier(e){const t=this.createNode(),i=this.nextToken();return i.type===4&&i.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(i,T.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(i):i.type!==3?this.context.strict&&i.type===4&&this.scanner.isStrictModeReservedWord(i.value)?this.tolerateUnexpectedToken(i,T.StrictReservedWord):(this.context.strict||i.value!=="let"||e!=="var")&&this.throwUnexpectedToken(i):(this.context.isModule||this.context.isAsync)&&i.type===3&&i.value==="await"&&this.tolerateUnexpectedToken(i),this.finalize(t,new de(i.value))}parseVariableDeclaration(e){const t=this.createNode(),i=[],n=this.parsePattern(i,"var");this.context.strict&&n.type===S.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(T.StrictVarName);let r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type!==S.Identifier&&!e.inFor&&this.expect("="),this.finalize(t,new Kt(n,r))}parseVariableDeclarationList(e){const t={inFor:e.inFor},i=[];for(i.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),i.push(this.parseVariableDeclaration(t));return i}parseVariableStatement(){const e=this.createNode();this.expectKeyword("var");const t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new Se(t,"var"))}parseEmptyStatement(){const e=this.createNode();return this.expect(";"),this.finalize(e,new Pe)}parseExpressionStatement(){const e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new pt(t))}parseIfClause(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(T.StrictFunction),this.parseStatement()}parseIfStatement(){const e=this.createNode();let t,i=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 Pe)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),i=this.parseIfClause())),this.finalize(e,new ur(n,t,i))}parseDoWhileStatement(){const e=this.createNode();this.expectKeyword("do"),this.tolerateInvalidLoopStatement();const t=this.context.inIteration;this.context.inIteration=!0;const i=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 tr(i,n))}parseWhileStatement(){const e=this.createNode();let t;this.expectKeyword("while"),this.expect("(");const i=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new Pe);else{this.expect(")");const n=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=n}return this.finalize(e,new _r(i,t))}parseForStatement(){let e=null,t=null,i=null,n=!0,r,a,l=!1;const p=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.isAsync||this.tolerateUnexpectedToken(this.lookahead),l=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){e=this.createNode(),this.nextToken();const A=this.context.allowIn;this.context.allowIn=!1;const y=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=A,!l&&y.length===1&&this.matchKeyword("in")){const F=y[0];F.init&&(F.id.type===S.ArrayPattern||F.id.type===S.ObjectPattern||this.context.strict)&&this.tolerateError(T.ForInOfLoopInitializer,"for-in"),e=this.finalize(e,new Se(y,"var")),this.nextToken(),r=e,a=this.parseExpression(),e=null}else y.length===1&&y[0].init===null&&this.matchContextualKeyword("of")?(e=this.finalize(e,new Se(y,"var")),this.nextToken(),r=e,a=this.parseAssignmentExpression(),e=null,n=!1):(e=this.finalize(e,new Se(y,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){e=this.createNode();const A=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")e=this.finalize(e,new de(A)),this.nextToken(),r=e,a=this.parseExpression(),e=null;else{const y=this.context.allowIn;this.context.allowIn=!1;const F=this.parseBindingList(A,{inFor:!0});this.context.allowIn=y,F.length===1&&F[0].init===null&&this.matchKeyword("in")?(e=this.finalize(e,new Se(F,A)),this.nextToken(),r=e,a=this.parseExpression(),e=null):F.length===1&&F[0].init===null&&this.matchContextualKeyword("of")?(e=this.finalize(e,new Se(F,A)),this.nextToken(),r=e,a=this.parseAssignmentExpression(),e=null,n=!1):(this.consumeSemicolon(),e=this.finalize(e,new Se(F,A)))}}else{const A=this.lookahead,y=this.context.isBindingElement,F=this.context.isAssignmentTarget,R=this.context.firstCoverInitializedNameError,_=this.context.allowIn;if(this.context.allowIn=!1,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=_,this.matchKeyword("in"))(!this.context.isAssignmentTarget||e.type===S.AssignmentExpression)&&this.tolerateError(T.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(e),r=e,a=this.parseExpression(),e=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||e.type===S.AssignmentExpression)&&this.tolerateError(T.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(e),r=e,a=this.parseAssignmentExpression(),e=null,n=!1;else{if(this.context.isBindingElement=y,this.context.isAssignmentTarget=F,this.context.firstCoverInitializedNameError=R,this.match(",")){const k=[e];for(;this.match(",");)this.nextToken(),k.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(A),new ft(k))}this.expect(";")}}typeof r>"u"&&(this.match(";")||(t=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(i=this.isolateCoverGrammar(this.parseExpression)));let x;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),x=this.finalize(this.createNode(),new Pe);else{this.expect(")"),this.tolerateInvalidLoopStatement();const A=this.context.inIteration;this.context.inIteration=!0,x=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=A}return typeof r>"u"?this.finalize(p,new or(e,t,i,x)):n?this.finalize(p,new nr(r,a,x)):this.finalize(p,new rr(r,a,x,l))}parseContinueStatement(){const e=this.createNode();this.expectKeyword("continue");let t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){const i=this.parseVariableIdentifier();t=i;const n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(T.UnknownLabel,i.name)}return this.consumeSemicolon(),t===null&&!this.context.inIteration&&this.throwError(T.IllegalContinue),this.finalize(e,new qn(t))}parseBreakStatement(){const e=this.createNode();this.expectKeyword("break");let t=null;if(this.lookahead.type===3&&!this.hasLineTerminator){const i=this.parseVariableIdentifier(),n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(T.UnknownLabel,i.name),t=i}return this.consumeSemicolon(),t===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(T.IllegalBreak),this.finalize(e,new Gn(t))}parseReturnStatement(){this.context.inFunctionBody||this.tolerateError(T.IllegalReturn);const e=this.createNode();this.expectKeyword("return");const i=!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 yr(i))}parseWithStatement(){this.context.strict&&this.tolerateError(T.StrictModeWith);const e=this.createNode();let t;this.expectKeyword("with"),this.expect("(");const i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new Pe)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new Pr(i,t))}parseSwitchCase(){const e=this.createNode();let t;this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");const i=[];for(;!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)i.push(this.parseStatementListItem());return this.finalize(e,new Tr(t,i))}parseSwitchStatement(){const e=this.createNode();this.expectKeyword("switch"),this.expect("(");const t=this.parseExpression();this.expect(")");const i=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(T.MultipleDefaultsInSwitch),r=!0),n.push(a)}return this.expect("}"),this.context.inSwitch=i,this.finalize(e,new br(t,n))}parseLabelledStatement(){const e=this.createNode(),t=this.parseExpression();let i;if(t.type===S.Identifier&&this.match(":")){this.nextToken();const n=t,r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(T.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 l=this.lookahead,p=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(l,T.StrictFunction):p.generator&&this.tolerateUnexpectedToken(l,T.GeneratorInLegacyContext),a=p}else a=this.parseStatement();delete this.context.labelSet[r],i=new mr(n,a)}else this.consumeSemicolon(),i=new pt(t);return this.finalize(e,i)}parseThrowStatement(){const e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(T.NewlineAfterThrow);const t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new vr(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 l="$"+n[a].value;Object.prototype.hasOwnProperty.call(r,l)&&this.tolerateError(T.DuplicateBinding,n[a].value),r[l]=!0}this.context.strict&&t.type===S.Identifier&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(T.StrictCatchVariable),this.expect(")")}const i=this.parseBlock();return this.finalize(e,new Kn(t,i))}parseFinallyClause(){return this.expectKeyword("finally"),this.parseBlock()}parseTryStatement(){const e=this.createNode();this.expectKeyword("try");const t=this.parseBlock(),i=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return!i&&!n&&this.throwError(T.NoCatchOrFinally),this.finalize(e,new Nr(t,i,n))}parseDebuggerStatement(){const e=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(e,new Qn)}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(),i=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=i,this.context.inIteration=n,this.context.inSwitch=r,this.context.inFunctionBody=a,this.finalize(e,new Lt(t))}validateParam(e,t,i){const n="$"+i;this.context.strict?(this.scanner.isRestrictedWord(i)&&(e.stricted=t,e.message=T.StrictParamName),Object.prototype.hasOwnProperty.call(e.paramSet,n)&&(e.stricted=t,e.hasDuplicateParameterNames=!0)):e.firstRestricted||(this.scanner.isRestrictedWord(i)?(e.firstRestricted=t,e.message=T.StrictParamName):this.scanner.isStrictModeReservedWord(i)?(e.firstRestricted=t,e.message=T.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 i=this.parsePattern(e);return this.match("=")&&this.throwError(T.DefaultRestParameter),this.match(")")||this.throwError(T.ParameterAfterRestParameter),this.finalize(t,new Je(i))}parseFormalParameter(e){const t=[],i=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&&i instanceof de,e.params.push(i)}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(T.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 i=this.scanner.lex();this.scanner.restoreState(t),e=t.lineNumber===i.lineNumber&&i.type===4&&i.value==="function"}return e}parseFunctionDeclaration(e){const t=this.createNode(),i=this.matchContextualKeyword("async");i&&(this.context.inIteration&&this.tolerateError(T.AsyncFunctionInSingleStatementContext),this.nextToken()),this.expectKeyword("function");const n=this.match("*");n&&this.nextToken();let r,a=null,l=null;if(!e||!this.match("(")){const P=this.lookahead;a=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(P.value)&&this.tolerateUnexpectedToken(P,T.StrictFunctionName):this.scanner.isRestrictedWord(P.value)?(l=P,r=T.StrictFunctionName):this.scanner.isStrictModeReservedWord(P.value)&&(l=P,r=T.StrictReservedWord)}const p=this.context.isAsync,x=this.context.allowYield;this.context.isAsync=i,this.context.allowYield=!n;const A=this.parseFormalParameters(l),y=A.params,F=A.stricted;l=A.firstRestricted,A.message&&(r=A.message);const R=this.context.strict,_=this.context.allowStrictDirective;this.context.allowStrictDirective=A.simple;const k=this.parseFunctionSourceElements();return this.context.strict&&l&&this.throwUnexpectedToken(l,r),this.context.strict&&F&&this.tolerateUnexpectedToken(F,r),this.context.strict=R,this.context.allowStrictDirective=_,this.context.isAsync=p,this.context.allowYield=x,i?this.finalize(t,new zn(a,y,k,n)):this.finalize(t,new ar(a,y,k,n))}parseFunctionExpression(){const e=this.createNode(),t=this.matchContextualKeyword("async");t&&this.nextToken(),this.expectKeyword("function");const i=this.match("*");i&&this.nextToken();let n,r=null,a;const l=this.context.isAsync,p=this.context.allowYield;if(this.context.isAsync=t,this.context.allowYield=!i,!this.match("(")){const k=this.lookahead;r=!this.context.strict&&!i&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(k.value)&&this.tolerateUnexpectedToken(k,T.StrictFunctionName):this.scanner.isRestrictedWord(k.value)?(a=k,n=T.StrictFunctionName):this.scanner.isStrictModeReservedWord(k.value)&&(a=k,n=T.StrictReservedWord)}const x=this.parseFormalParameters(a),A=x.params,y=x.stricted;a=x.firstRestricted,x.message&&(n=x.message);const F=this.context.strict,R=this.context.allowStrictDirective;this.context.allowStrictDirective=x.simple;const _=this.parseFunctionSourceElements();return this.context.strict&&a&&this.throwUnexpectedToken(a,n),this.context.strict&&y&&this.tolerateUnexpectedToken(y,n),this.context.strict=F,this.context.allowStrictDirective=R,this.context.isAsync=l,this.context.allowYield=p,this.finalize(e,new we(r,A,_,i,t))}parseDirective(){const e=this.lookahead,t=this.createNode(),i=this.parseExpression(),n=i.type===S.Literal?this.getTokenRaw(e).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(t,n?new er(i,n):new pt(i))}parseDirectivePrologues(){let e=null;const t=[];for(;;){const i=this.lookahead;if(i.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,T.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(i,T.IllegalLanguageModeDirective)):!e&&i.octal&&(e=i)}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,i=this.context.allowYield;this.context.allowYield=!t;const n=this.parseFormalParameters();n.params.length>0&&this.tolerateError(T.BadGetterArity);const r=this.parsePropertyMethod(n);return this.context.allowYield=i,this.finalize(e,new we(null,n.params,r,t,!1))}parseSetterMethod(){const e=this.createNode(),t=!1,i=this.context.allowYield;this.context.allowYield=!t;const n=this.parseFormalParameters();n.params.length!==1?this.tolerateError(T.BadSetterArity):n.params[0]instanceof Je&&this.tolerateError(T.BadSetterRestParameter);const r=this.parsePropertyMethod(n);return this.context.allowYield=i,this.finalize(e,new we(null,n.params,r,t,!1))}parseGeneratorMethod(e){const t=this.createNode(),i=!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 we(null,r.params,a,i,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,i=!1;if(!this.hasLineTerminator){const n=this.context.allowYield;this.context.allowYield=!1,i=this.match("*"),i?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(e,new Or(t,i))}parseStaticBlock(){const e=this.createNode();this.expect("{");const t=[];for(;!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new wr(t))}parseDecorator(){const e=this.createNode();this.expect("@");const t=this.context.strict,i=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=i,this.context.isAsync=n,this.match(";")&&this.throwError(T.NoSemicolonAfterDecorator),this.finalize(e,new Zn(r))}parseDecorators(){let e=null;for(;this.match("@");)e==null&&(e=[]),e.push(this.parseDecorator());return e}parseClassElement(e){let t=this.lookahead;const i=this.createNode(),n=this.context.inConstructor;let r="",a=null,l=null,p=!1,x=!1,A=!1,y=!1,F=!1,R=!1;const _=this.parseDecorators();if(_&&(t=this.lookahead),this.match("*"))this.nextToken();else{p=this.match("["),this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(R);const P=a;if(this.context.inConstructor=t.type===3&&t.value==="constructor",P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,A=!0,p=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead)):(this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(R))),P.name==="static"&&this.match("{"))return this.parseStaticBlock();if(t.type===3&&!this.hasLineTerminator&&t.value==="async"){const w=this.lookahead.value;w!==":"&&w!=="("&&(y=!0,F=this.match("*"),F&&this.nextToken(),t=this.lookahead,p=this.match("["),this.match("*")?(this.nextToken(),this.match("#")&&(R=!0,this.nextToken())):(this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead),a=this.parseObjectPropertyKey(R)),t.type===3&&t.value==="constructor"&&!A&&this.tolerateUnexpectedToken(t,T.ConstructorIsAsync))}}t.type===3&&t.value==="constructor"&&R&&this.tolerateUnexpectedToken(t,T.ConstructorIsPrivate);const k=this.qualifiedPropertyName(this.lookahead);if(t.type===3||t.type===8?t.value==="get"&&k?(r="get",this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead),p=this.match("["),a=this.parseObjectPropertyKey(R),this.context.allowYield=!1,l=this.parseGetterMethod()):t.value==="set"&&k?(r="set",this.match("#")&&(R=!0,this.nextToken(),t=this.lookahead),p=this.match("["),a=this.parseObjectPropertyKey(R),l=this.parseSetterMethod()):this.match("(")||(r="property",p=!1,this.match("=")&&(this.nextToken(),l=this.isolateCoverGrammar(this.parseAssignmentExpression))):t.type===7&&t.value==="*"&&k?(r="init",p=this.match("["),a=this.parseObjectPropertyKey(R),l=this.parseGeneratorMethod(y),x=!0):t.type===7&&t.value==="["&&!this.match("(")&&(r="property",p=!0,this.match("=")&&(this.nextToken(),l=this.isolateCoverGrammar(this.parseAssignmentExpression))),!r&&a&&this.match("(")){const P=this.context.inClassConstructor;this.context.inClassConstructor=t.value==="constructor",r="init",l=y?this.parsePropertyMethodAsyncFunction(F):this.parsePropertyMethodFunction(F),this.context.inClassConstructor=P,x=!0}return r||this.throwUnexpectedToken(this.lookahead),r==="init"&&(r="method"),p||(A&&this.isPropertyKey(a,"prototype")&&this.throwUnexpectedToken(t,T.StaticPrototype),!A&&this.isPropertyKey(a,"constructor")&&((r!=="method"||!x||l&&l.generator)&&this.throwUnexpectedToken(t,T.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,T.DuplicateConstructor):e.value=!0,r="constructor")),this.context.inConstructor=n,r==="property"?(this.consumeSemicolon(),this.finalize(i,new Ar(a,p,l,A,_))):this.finalize(i,new Er(a,p,l,r,A,_))}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 Jn(t))}parseClassDeclaration(e){const t=this.createNode(),i=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 l=this.parseClassBody();return this.context.allowSuper=n,this.context.strict=i,this.finalize(t,new $n(r,a,l,this.context.decorators))}parseClassExpression(){const e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");const i=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 Wn(i,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 Dr(t))}parseScript(){const e=this.createNode(),t=this.parseDirectivePrologues();for(;this.lookahead.type!==2;)t.push(this.parseStatementListItem());return this.finalize(e,new Fr(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 i=this.nextToken(),n=this.getTokenRaw(i),r=this.finalize(e,new Ie(i.value,n));return this.finalize(e,new cr(t,r))}parseModuleSpecifier(){const e=this.createNode();this.lookahead.type!==8&&this.throwError(T.InvalidModuleSpecifier);const t=this.nextToken(),i=this.getTokenRaw(t);return L.isStringWellFormedUnicode(t.value)||this.throwError(T.InvalidModuleSpecifier),this.finalize(e,new Ie(t.value,i))}parseImportSpecifier(){const e=this.createNode();let t,i;return this.lookahead.type===3?(t=this.parseVariableIdentifier(),i=t,this.matchContextualKeyword("as")&&(this.nextToken(),i=this.parseVariableIdentifier())):(t=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName(),i=t,this.matchContextualKeyword("as")?(this.nextToken(),i=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(e,new dr(i,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 pr(t))}parseImportNamespaceSpecifier(){const e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(T.NoAsAfterImportNamespace),this.lookahead.escaped&&this.throwError(T.NoAsAndFromEscapeSequences),this.nextToken();const t=this.parseIdentifierName();return this.finalize(e,new fr(t))}parseImportDeclaration(){this.context.inFunctionBody&&this.throwError(T.IllegalImportDeclaration);const e=this.createNode();this.expectKeyword("import");let t,i=[];if(this.lookahead.type===8)t=this.parseModuleSpecifier();else{if(this.match("{")?i=i.concat(this.parseNamedImports()):this.match("*")?i.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(i.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?i.push(this.parseImportNamespaceSpecifier()):this.match("{")?i=i.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){const r=this.lookahead.value?T.UnexpectedToken:T.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}const n=this.parseImportAttributes();return this.consumeSemicolon(),this.finalize(e,new hr(i,t,n))}parseExportSpecifier(){const e=this.createNode(),t=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName();let i=t;return this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(T.NoAsAndFromEscapeSequences),this.nextToken(),i=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName()),this.finalize(e,new sr(t,i))}parseExportDeclaration(){this.context.inFunctionBody&&this.throwError(T.IllegalExportDeclaration);const e=this.createNode();this.expectKeyword("export");let t;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){const i=this.parseFunctionDeclaration(!0);t=this.finalize(e,new Ge(i))}else if(this.matchKeyword("class")){const i=this.parseClassDeclaration(!0);t=this.finalize(e,new Ge(i))}else if(this.matchContextualKeyword("async")){const i=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new Ge(i))}else{this.matchContextualKeyword("from")&&this.throwError(T.UnexpectedToken,this.lookahead.value);const i=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new Ge(i))}else if(this.match("*")){this.nextToken();let i=null;if(this.matchContextualKeyword("as")&&(this.lookahead.escaped&&this.throwError(T.NoAsAndFromEscapeSequences),this.nextToken(),i=this.lookahead.type==8?this.parseModuleSpecifier():this.parseIdentifierName()),!this.matchContextualKeyword("from")){const a=this.lookahead.value?T.UnexpectedToken:T.MissingFromClause;this.throwError(a,this.lookahead.value)}this.lookahead.escaped&&this.throwError(T.NoAsAndFromEscapeSequences),this.nextToken();const n=this.parseModuleSpecifier(),r=this.parseImportAttributes();this.consumeSemicolon(),t=this.finalize(e,new ir(n,i,r))}else if(this.lookahead.type===4){let i;switch(this.lookahead.value){case"let":case"const":i=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":i=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new ht(i,[],null,null))}else if(this.matchAsyncFunction()){const i=this.parseFunctionDeclaration();t=this.finalize(e,new ht(i,[],null,null))}else{const i=[];let n=null,r=!1,a=null;for(this.expect("{");!this.match("}");)r=r||this.matchKeyword("default"),i.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.lookahead.escaped&&this.throwError(T.NoAsAndFromEscapeSequences),this.nextToken(),n=this.parseModuleSpecifier(),a=this.parseImportAttributes(),this.consumeSemicolon();else if(r){const l=this.lookahead.value?T.UnexpectedToken:T.MissingFromClause;this.throwError(l,this.lookahead.value)}else a=this.parseImportAttributes(),this.consumeSemicolon();t=this.finalize(e,new ht(null,i,n,a))}return t}}const $t={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:"⟩"};ue[100]="JSXIdentifier";ue[101]="JSXText";function Te(s){let e;switch(s.type){case Q.JSXIdentifier:e=s.name;break;case Q.JSXNamespacedName:const i=s;e=Te(i.namespace)+":"+Te(i.name);break;case Q.JSXMemberExpression:const n=s;e=Te(n.object)+"."+Te(n.property);break}return e}class Vr extends ai{constructor(e,t,i){super(e,t,i)}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="&",i=!0,n=!1,r=!1,a=!1;for(;!this.scanner.eof()&&i&&!n;){const l=this.scanner.source[this.scanner.index];if(l===e)break;if(n=l===";",t+=l,++this.scanner.index,!n)switch(t.length){case 2:r=l==="#";break;case 3:r&&(a=l==="x",i=a||L.isDecimalDigit(l.charCodeAt(0)),r=r&&!a);break;default:i=i&&!(r&&!L.isDecimalDigit(l.charCodeAt(0))),i=i&&!(a&&!L.isHexDigit(l.charCodeAt(0)));break}}if(i&&n&&t.length>2){const l=t.substr(1,t.length-2);r&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):!r&&!a&&$t[l]&&(t=$t[l])}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,i=this.scanner.source[this.scanner.index++];let n="";for(;!this.scanner.eof();){const r=this.scanner.source[this.scanner.index++];if(r===i)break;r==="&"?n+=this.scanXHTMLEntity(i):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),i=this.scanner.source.charCodeAt(this.scanner.index+2),n=t===46&&i===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(L.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(L.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,L.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 i={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(i)),i}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 Nn(t.value))}parseJSXElementName(){const e=this.createJSXNode();let t=this.parseJSXIdentifier();if(this.matchJSX(":")){const i=t;this.expectJSX(":");const n=this.parseJSXIdentifier();t=this.finalize(e,new _t(i,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){const i=t;this.expectJSX(".");const n=this.parseJSXIdentifier();t=this.finalize(e,new Bn(i,n))}return t}parseJSXAttributeName(){const e=this.createJSXNode();let t;const i=this.parseJSXIdentifier();if(this.matchJSX(":")){const n=i;this.expectJSX(":");const r=this.parseJSXIdentifier();t=this.finalize(e,new _t(n,r))}else t=i;return t}parseJSXStringLiteralAttribute(){const e=this.createJSXNode(),t=this.nextJSXToken();t.type!==8&&this.throwUnexpectedToken(t);const i=this.getTokenRaw(t);return this.finalize(e,new Ie(t.value,i))}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 Bt(t))}parseJSXAttributeValue(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()}parseJSXNameValueAttribute(){const e=this.createJSXNode(),t=this.parseJSXAttributeName();let i=null;return this.matchJSX("=")&&(this.expectJSX("="),i=this.parseJSXAttributeValue()),this.finalize(e,new _n(t,i))}parseJSXSpreadAttribute(){const e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();const t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new On(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 Pn(!1));const t=this.parseJSXElementName(),i=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new Pt(t,n,i))}parseJSXBoundaryElement(){const e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){if(this.expectJSX("/"),this.matchJSX(">"))return this.expectJSX(">"),this.finalize(e,new Rn);const r=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new kn(r))}const t=this.parseJSXElementName(),i=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new Pt(t,n,i))}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 vn)}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 Bt(t))}parseJSXChildren(){const e=[];for(;!this.scanner.eof();){const t=this.createJSXChildNode(),i=this.nextJSXText();if(i.start<i.end){const n=this.getTokenRaw(i),r=this.finalize(t,new Ln(i.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 i=this.createJSXChildNode(),n=this.parseJSXBoundaryElement();if(n.type===Q.JSXOpeningElement){const r=n;if(r.selfClosing){const a=this.finalize(i,new ut(r,[],null));e.children.push(a)}else t.push(e),e={node:i,opening:r,closing:null,children:[]}}if(n.type===Q.JSXClosingElement){e.closing=n;const r=Te(e.opening.name),a=Te(e.closing.name);if(r!==a&&this.tolerateError("Expected corresponding JSX closing tag for %0",r),t.length>0){const l=this.finalize(e.node,new ut(e.opening,e.children,e.closing));e=t[t.length-1],e.children.push(l),t.pop()}else break}if(n.type===Q.JSXClosingFragment)if(e.closing=n,e.opening.type!==Q.JSXOpeningFragment)this.tolerateError("Expected corresponding JSX closing tag for jsx fragment");else break}return e}parseJSXElement(){const e=this.createJSXNode(),t=this.parseJSXOpeningElement();let i=[],n=null;if(!t.selfClosing){const r=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:i});i=r.children,n=r.closing}return this.finalize(e,new ut(t,i,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 ui(s,e,t){let i=null;const n=(y,F)=>{t&&t(y,F),i&&i.visit(y,F)};let r=typeof t=="function"?n:null,a=!1;if(e){a=typeof e.comment=="boolean"&&e.comment;const y=typeof e.attachComment=="boolean"&&e.attachComment;(a||y)&&(i=new bn,i.attach=y,e.comment=!0,r=n)}let l=!1;e&&typeof e.sourceType=="string"&&(l=e.sourceType==="module");let p;e&&typeof e.jsx=="boolean"&&e.jsx?p=new Vr(s,e,r):p=new ai(s,e,r);const A=l?p.parseModule():p.parseScript();return a&&i&&(A.comments=i.comments),p.config.tokens&&(A.tokens=p.tokens),p.config.tolerant&&(A.errors=p.errorHandler.errors),A}var mt={},Wt;function Hr(){return Wt||(Wt=1,(function(s){(function e(t){var i,n,r,a,l,p;function x(N){var v={},B,u;for(B in N)N.hasOwnProperty(B)&&(u=N[B],typeof u=="object"&&u!==null?v[B]=x(u):v[B]=u);return v}function A(N,v){var B,u,c,h;for(u=N.length,c=0;u;)B=u>>>1,h=c+B,v(N[h])?u=B:(c=h+1,u-=B+1);return c}i={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={},l={},p={},n={Break:a,Skip:l,Remove:p};function y(N,v){this.parent=N,this.key=v}y.prototype.replace=function(v){this.parent[this.key]=v},y.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function F(N,v,B,u){this.node=N,this.path=v,this.wrap=B,this.ref=u}function R(){}R.prototype.path=function(){var v,B,u,c,h,C;function m(E,D){if(Array.isArray(D))for(u=0,c=D.length;u<c;++u)E.push(D[u]);else E.push(D)}if(!this.__current.path)return null;for(h=[],v=2,B=this.__leavelist.length;v<B;++v)C=this.__leavelist[v],m(h,C.path);return m(h,this.__current.path),h},R.prototype.type=function(){var N=this.current();return N.type||this.__current.wrap},R.prototype.parents=function(){var v,B,u;for(u=[],v=1,B=this.__leavelist.length;v<B;++v)u.push(this.__leavelist[v].node);return u},R.prototype.current=function(){return this.__current.node},R.prototype.__execute=function(v,B){var u,c;return c=void 0,u=this.__current,this.__current=B,this.__state=null,v&&(c=v.call(this,B.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=u,c},R.prototype.notify=function(v){this.__state=v},R.prototype.skip=function(){this.notify(l)},R.prototype.break=function(){this.notify(a)},R.prototype.remove=function(){this.notify(p)},R.prototype.__initialize=function(N,v){this.visitor=v,this.root=N,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,v.fallback==="iteration"?this.__fallback=Object.keys:typeof v.fallback=="function"&&(this.__fallback=v.fallback),this.__keys=r,v.keys&&(this.__keys=Object.assign(Object.create(this.__keys),v.keys))};function _(N){return N==null?!1:typeof N=="object"&&typeof N.type=="string"}function k(N,v){return(N===i.ObjectExpression||N===i.ObjectPattern)&&v==="properties"}function P(N,v){for(var B=N.length-1;B>=0;--B)if(N[B].node===v)return!0;return!1}R.prototype.traverse=function(v,B){var u,c,h,C,m,E,D,d,f,I,g,b;for(this.__initialize(v,B),b={},u=this.__worklist,c=this.__leavelist,u.push(new F(v,null,null,null)),c.push(new F(null,null,null,null));u.length;){if(h=u.pop(),h===b){if(h=c.pop(),E=this.__execute(B.leave,h),this.__state===a||E===a)return;continue}if(h.node){if(E=this.__execute(B.enter,h),this.__state===a||E===a)return;if(u.push(b),c.push(h),this.__state===l||E===l)continue;if(C=h.node,m=C.type||h.wrap,I=this.__keys[m],!I)if(this.__fallback)I=this.__fallback(C);else throw new Error("Unknown node type "+m+".");for(d=I.length;(d-=1)>=0;)if(D=I[d],g=C[D],!!g){if(Array.isArray(g)){for(f=g.length;(f-=1)>=0;)if(g[f]&&!P(c,g[f])){if(k(m,I[d]))h=new F(g[f],[D,f],"Property",null);else if(_(g[f]))h=new F(g[f],[D,f],null,null);else continue;u.push(h)}}else if(_(g)){if(P(c,g))continue;u.push(new F(g,D,null,null))}}}}},R.prototype.replace=function(v,B){var u,c,h,C,m,E,D,d,f,I,g,b,O;function V(Y){var J,j,z,K;if(Y.ref.remove()){for(j=Y.ref.key,K=Y.ref.parent,J=u.length;J--;)if(z=u[J],z.ref&&z.ref.parent===K){if(z.ref.key<j)break;--z.ref.key}}}for(this.__initialize(v,B),g={},u=this.__worklist,c=this.__leavelist,b={root:v},E=new F(v,null,null,new y(b,"root")),u.push(E),c.push(E);u.length;){if(E=u.pop(),E===g){if(E=c.pop(),m=this.__execute(B.leave,E),m!==void 0&&m!==a&&m!==l&&m!==p&&E.ref.replace(m),(this.__state===p||m===p)&&V(E),this.__state===a||m===a)return b.root;continue}if(m=this.__execute(B.enter,E),m!==void 0&&m!==a&&m!==l&&m!==p&&(E.ref.replace(m),E.node=m),(this.__state===p||m===p)&&(V(E),E.node=null),this.__state===a||m===a)return b.root;if(h=E.node,!!h&&(u.push(g),c.push(E),!(this.__state===l||m===l))){if(C=h.type||E.wrap,f=this.__keys[C],!f)if(this.__fallback)f=this.__fallback(h);else throw new Error("Unknown node type "+C+".");for(D=f.length;(D-=1)>=0;)if(O=f[D],I=h[O],!!I)if(Array.isArray(I)){for(d=I.length;(d-=1)>=0;)if(I[d]){if(k(C,f[D]))E=new F(I[d],[O,d],"Property",new y(I,d));else if(_(I[d]))E=new F(I[d],[O,d],null,new y(I,d));else continue;u.push(E)}}else _(I)&&u.push(new F(I,O,null,new y(h,O)))}}return b.root};function w(N,v){var B=new R;return B.traverse(N,v)}function G(N,v){var B=new R;return B.replace(N,v)}function X(N,v){var B;return B=A(v,function(c){return c.range[0]>N.range[0]}),N.extendedRange=[N.range[0],N.range[1]],B!==v.length&&(N.extendedRange[1]=v[B].range[0]),B-=1,B>=0&&(N.extendedRange[0]=v[B].range[1]),N}function ee(N,v,B){var u=[],c,h,C,m;if(!N.range)throw new Error("attachComments needs range information");if(!B.length){if(v.length){for(C=0,h=v.length;C<h;C+=1)c=x(v[C]),c.extendedRange=[0,N.range[0]],u.push(c);N.leadingComments=u}return N}for(C=0,h=v.length;C<h;C+=1)u.push(X(x(v[C]),B));return m=0,w(N,{enter:function(E){for(var D;m<u.length&&(D=u[m],!(D.extendedRange[1]>E.range[0]));)D.extendedRange[1]===E.range[0]?(E.leadingComments||(E.leadingComments=[]),E.leadingComments.push(D),u.splice(m,1)):m+=1;if(m===u.length)return n.Break;if(u[m].extendedRange[0]>E.range[1])return n.Skip}}),m=0,w(N,{leave:function(E){for(var D;m<u.length&&(D=u[m],!(E.range[1]<D.extendedRange[0]));)E.range[1]===D.extendedRange[0]?(E.trailingComments||(E.trailingComments=[]),E.trailingComments.push(D),u.splice(m,1)):m+=1;if(m===u.length)return n.Break;if(u[m].extendedRange[0]>E.range[1])return n.Skip}}),N}return t.Syntax=i,t.traverse=w,t.replace=G,t.attachComments=ee,t.VisitorKeys=r,t.VisitorOption=n,t.Controller=R,t.cloneEnvironment=function(){return e({})},t})(s)})(mt)),mt}var Ur=Hr();const gt=Ne(Ur);function zr(s,e){return M.getCurrentScope()?(M.onScopeDispose(s,e),!0):!1}const ci=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yr=Object.prototype.toString,Gr=s=>Yr.call(s)==="[object Object]",At=()=>{};function Xr(...s){if(s.length!==1)return M.toRef(...s);const e=s[0];return typeof e=="function"?M.readonly(M.customRef(()=>({get:e,set:At}))):M.ref(e)}function Kr(s,e){function t(...i){return new Promise((n,r)=>{Promise.resolve(s(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(n).catch(r)})}return t}const li=s=>s();function Jr(s,e={}){let t,i,n=At;const r=p=>{clearTimeout(p),n(),n=At};let a;return p=>{const x=M.toValue(s),A=M.toValue(e.maxWait);return t&&r(t),x<=0||A!==void 0&&A<=0?(i&&(r(i),i=void 0),Promise.resolve(p())):new Promise((y,F)=>{n=e.rejectOnCancel?F:y,a=p,A&&!i&&(i=setTimeout(()=>{t&&r(t),i=void 0,y(a())},A)),t=setTimeout(()=>{i&&r(i),i=void 0,y(p())},x)})}}function $r(s=li,e={}){const{initialState:t="active"}=e,i=Xr(t==="active");function n(){i.value=!1}function r(){i.value=!0}const a=(...l)=>{i.value&&s(...l)};return{isActive:M.readonly(i),pause:n,resume:r,eventFilter:a}}function Et(s){return Array.isArray(s)?s:[s]}function Wr(s){return M.getCurrentInstance()}function hi(s,e,t={}){const{eventFilter:i=li,...n}=t;return M.watch(s,Kr(i,e),n)}function jr(s,e,t={}){const{eventFilter:i,initialState:n="active",...r}=t,{eventFilter:a,pause:l,resume:p,isActive:x}=$r(i,{initialState:n});return{stop:hi(s,e,{...r,eventFilter:a}),pause:l,resume:p,isActive:x}}function pi(s,e=!0,t){Wr()?M.onMounted(s,t):e?s():M.nextTick(s)}function fi(s,e,t={}){const{debounce:i=0,maxWait:n=void 0,...r}=t;return hi(s,e,{...r,eventFilter:Jr(i,{maxWait:n})})}function qr(s,e,t){return M.watch(s,e,{...t,immediate:!0})}const be=ci?window:void 0,Qr=ci?window.document:void 0;function Zr(s){var e;const t=M.toValue(s);return(e=t?.$el)!==null&&e!==void 0?e:t}function jt(...s){const e=(i,n,r,a)=>(i.addEventListener(n,r,a),()=>i.removeEventListener(n,r,a)),t=M.computed(()=>{const i=Et(M.toValue(s[0])).filter(n=>n!=null);return i.every(n=>typeof n!="string")?i:void 0});return qr(()=>{var i,n;return[(i=(n=t.value)===null||n===void 0?void 0:n.map(r=>Zr(r)))!==null&&i!==void 0?i:[be].filter(r=>r!=null),Et(M.toValue(t.value?s[1]:s[0])),Et(M.unref(t.value?s[2]:s[1])),M.toValue(t.value?s[3]:s[2])]},([i,n,r,a],l,p)=>{if(!i?.length||!n?.length||!r?.length)return;const x=Gr(a)?{...a}:a,A=i.flatMap(y=>n.flatMap(F=>r.map(R=>e(y,F,R,x))));p(()=>{A.forEach(y=>y())})},{flush:"post"})}const $e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},We="__vueuse_ssr_handlers__",eo=to();function to(){return We in $e||($e[We]=$e[We]||{}),$e[We]}function io(s,e){return eo[s]||e}function so(s){return s==null?"any":s instanceof Set?"set":s instanceof Map?"map":s instanceof Date?"date":typeof s=="boolean"?"boolean":typeof s=="string"?"string":typeof s=="object"?"object":Number.isNaN(s)?"any":"number"}const no={boolean:{read:s=>s==="true",write:s=>String(s)},object:{read:s=>JSON.parse(s),write:s=>JSON.stringify(s)},number:{read:s=>Number.parseFloat(s),write:s=>String(s)},any:{read:s=>s,write:s=>String(s)},string:{read:s=>s,write:s=>String(s)},map:{read:s=>new Map(JSON.parse(s)),write:s=>JSON.stringify(Array.from(s.entries()))},set:{read:s=>new Set(JSON.parse(s)),write:s=>JSON.stringify(Array.from(s))},date:{read:s=>new Date(s),write:s=>s.toISOString()}},qt="vueuse-storage";function ro(s,e,t,i={}){var n;const{flush:r="pre",deep:a=!0,listenToStorageChanges:l=!0,writeDefaults:p=!0,mergeDefaults:x=!1,shallow:A,window:y=be,eventFilter:F,onError:R=D=>{console.error(D)},initOnMounted:_}=i,k=(A?M.shallowRef:M.ref)(typeof e=="function"?e():e),P=M.computed(()=>M.toValue(s));if(!t)try{t=io("getDefaultStorage",()=>be?.localStorage)()}catch(D){R(D)}if(!t)return k;const w=M.toValue(e),G=so(w),X=(n=i.serializer)!==null&&n!==void 0?n:no[G],{pause:ee,resume:N}=jr(k,D=>h(D),{flush:r,deep:a,eventFilter:F});M.watch(P,()=>m(),{flush:r});let v=!1;const B=D=>{_&&!v||m(D)},u=D=>{_&&!v||E(D)};y&&l&&(t instanceof Storage?jt(y,"storage",B,{passive:!0}):jt(y,qt,u)),_?pi(()=>{v=!0,m()}):m();function c(D,d){if(y){const f={key:P.value,oldValue:D,newValue:d,storageArea:t};y.dispatchEvent(t instanceof Storage?new StorageEvent("storage",f):new CustomEvent(qt,{detail:f}))}}function h(D){try{const d=t.getItem(P.value);if(D==null)c(d,null),t.removeItem(P.value);else{const f=X.write(D);d!==f&&(t.setItem(P.value,f),c(d,f))}}catch(d){R(d)}}function C(D){const d=D?D.newValue:t.getItem(P.value);if(d==null)return p&&w!=null&&t.setItem(P.value,X.write(w)),w;if(!D&&x){const f=X.read(d);return typeof x=="function"?x(f,w):G==="object"&&!Array.isArray(f)?{...w,...f}:f}else return typeof d!="string"?d:X.read(d)}function m(D){if(!(D&&D.storageArea!==t)){if(D&&D.key==null){k.value=w;return}if(!(D&&D.key!==P.value)){ee();try{const d=X.write(k.value);(D===void 0||D?.newValue!==d)&&(k.value=C(D))}catch(d){R(d)}finally{D?M.nextTick(N):N()}}}}function E(D){m(D.detail)}return k}function oo(s,e,t={}){const{window:i=be}=t;return ro(s,e,i?.localStorage,t)}function yt(s,e){const i=M.shallowReactive(new Map),n=(...A)=>JSON.stringify(A),r=(A,...y)=>(i.set(A,s(...y)),i.get(A)),a=(...A)=>r(n(...A),...A),l=(...A)=>{i.delete(n(...A))},p=()=>{i.clear()},x=(...A)=>{const y=n(...A);return i.has(y)?i.get(y):r(y,...A)};return x.load=a,x.delete=l,x.clear=p,x.generateKey=n,x.cache=i,x}let ao=0;function uo(s,e={}){const t=M.shallowRef(!1),{document:i=Qr,immediate:n=!0,manual:r=!1,id:a=`vueuse_styletag_${++ao}`}=e,l=M.shallowRef(s);let p=()=>{};const x=()=>{if(!i)return;const y=i.getElementById(a)||i.createElement("style");y.isConnected||(y.id=a,e.nonce&&(y.nonce=e.nonce),e.media&&(y.media=e.media),i.head.appendChild(y)),!t.value&&(p=M.watch(l,F=>{y.textContent=F},{immediate:!0}),t.value=!0)},A=()=>{!i||!t.value||(p(),i.head.removeChild(i.getElementById(a)),t.value=!1)};return n&&!r&&pi(x),r||zr(A),{id:a,css:l,unload:A,load:x,isLoaded:M.readonly(t)}}window._METHOD_DEBUG_=oi;const Be=yt(fo),Ve=yt(po);function di(s){return s.type===S.MemberExpression?`${s.object.type===S.MemberExpression?di(s.object):s.object.name}.${s.property.name}`:s.type===S.Identifier?s.name:""}const co=Object.getPrototypeOf(async function(){}).constructor;async function lo(s){let e=[];return s.length>0&&(e=await _gct.api.apaas.systemVar.getGetVarByKeys({keys:s.join(",")})),e}const ho=yt(lo);async function po(s,e){const t=Be(s,!0),i=t.filter(F=>o.innerVarIds.includes(F)).sort(),n=t.filter(F=>F.startsWith(o.SYSTEM_VAR_PREFIX)).sort(),r=await ho([...i,...n]),a=ui(s);gt.replace(a,{enter(F){if(F.type===S.BinaryExpression){const{operator:R}=F,_=o.operator2FuncMap[R];return _?{type:S.CallExpression,arguments:[F.left,F.right],callee:{type:S.Identifier,name:_},optional:!1}:F}return F}}),gt.traverse(a,{enter:function(F){F.type===S.CallExpression&&F.callee.type===S.Identifier&&(F.callee.name=`await Methods.${F.callee.name}`)}});const l="",p={},x=[];r.forEach(F=>{x.push(`const ${F.key} = ${JSON.stringify(F.value)};`)}),Object.keys(e).map(F=>{if(F.includes(".")){const[R="",_]=F.split(".");p[R]||(x.push(`const ${R} = {};`),p[R]=!0),x.push(`${R}.${_} = ${JSON.stringify(e[F])};`)}else x.push(`const ${F} = ${JSON.stringify(e[F])};`)});const A=new co("Methods",[...x,"return new Promise(async(resolve)=>{",`const res = ${l};`,"resolve(res);","})"].join(`
9
+ `)),y=await A(oi);return console.info("【表达式】",s),console.info("【参数】",e),console.info("【执行语句】",A.toString()),console.info("【执行结果】",y),y}function fo(s,e=!1){const t=ui(s);let i=[];return gt.traverse(t,{enter:function(n){if(n.type===S.MemberExpression){const r=di(n);i.push(r),Object.assign(n,{name:r,type:S.Identifier})}else n.type===S.Identifier&&i.push(n.name);e?i=i.filter(r=>!o.functionMap[r]&&r!=="undefined"):i=i.filter(r=>!o.functionMap[r]&&r!=="undefined"&&!o.innerVarIds.includes(r)&&!r.startsWith(o.SYSTEM_VAR_PREFIX)&&!r.startsWith("undefined."))}}),[...new Set(i)]}window.gct_expression={execute:Ve,identify:Be};function mo(s,e,t=!1){if(t||s?.customApi?.value)return e(s);const i=5e3,n=typeof s=="object"?Di.stringify({...s,customApi:null}):s;let r=Dt.get(n);return r||(r=(async()=>{try{return await e(s)}catch(a){throw Dt.delete(n),a}})(),Dt.set(n,r,i),r)}class Dt{static cachedata={};static set(e,t,i){this.cachedata[e]={maxAge:i||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 Eo({ids:s,refOriginField:e,refOriginFieldType:t,model:i,foreignFields:n}){if(!s)return Promise.reject();const r=await Do({refOriginFieldType:t,modelKey:i,foreignFields:n,ids:s});if(r?.data)return si(e,r.data,r.dict)}async function Do({refOriginFieldType:s,modelKey:e,foreignFields:t,ids:i}){if(s===o.FIELD_TYPE.RDO_REF){const{data:n={},dict:r={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:e,bsKey:"rdoGetVersionByRefId",modelCategory:o.EntityModelCategoryEnum.ENTITY},{foreignFields:t},{refId:i});return{data:n,dict:r}}else{const{data:n={},dict:r={}}=await _gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:e,bsKey:"getOne",modelCategory:o.EntityModelCategoryEnum.ENTITY},{query:{"id_.eq":i},foreignFields:t},{});return{data:n,dict:r}}}const Co=s=>mo(s,Eo);var Oe=(s=>(s.SELECT_ID="$VAR_GCT_SELECT_ID",s))(Oe||{});const Qt=oo("GCT_APP_GlobalCache",{}),xo=s=>{const e=M.computed({get(){return Qt.value[s]||{}},set(i){Qt.value[s]=i}});return{selectID:M.computed({get(){return e.value[Oe.SELECT_ID]},set(i){e.value[Oe.SELECT_ID]?e.value[Oe.SELECT_ID]=i:e.value={...e.value,[Oe.SELECT_ID]:i}}}),cacheMap:e}};class Ct{static ENV;static AID;static userInfo;static runApp({userInfo:e,env:t,aid:i}){this.ENV=t,this.AID=i,this.userInfo=e}}const go=({value:s,appredis:e,key:t,type:i})=>{const n=Ct.ENV!=="dev"?e:!1,r=`${Ct.AID}_${Ct.userInfo?.userId}`,{cacheMap:a}=xo(r);return new Proxy({value:s,type:i},{get(p,x){return n&&x==="value"?a.value[t]:Reflect.get(p,x)},set(p,x,A,y){return n&&x==="value"&&(a.value[t]?a.value[t]=A:a.value={...a.value,[t]:A}),Reflect.set(p,x,A,y)}})},Ao={[o.GLOBAL_VAR_TYPE.DATE]:{callback(s){return U(s,["YYYY-MM-DD","YYYY/MM/DD"],!0).isValid()},message:"日期变量格式为YYYY-MM-DD,YYYY/MM/DD"},[o.GLOBAL_VAR_TYPE.TIME]:{callback(s){return U(s,"HH:mm:ss",!0).isValid()},message:"时间变量格式HH:mm:ss"},[o.GLOBAL_VAR_TYPE.DATETIME]:{callback(s){return U(s,["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 So(s,e){if(e===o.GLOBAL_VAR_TYPE.NULL)return!0;const{callback:t,message:i}=Ao[e]||{callback(n){return Object.prototype.toString.call(n).slice(8,-1).toLowerCase()===e}};return t(s)?Promise.resolve():Promise.reject(i)}const yo={web_module:{getPageInfo:_gct.api.apaas.webpage.getInfo},mobile_module:{getPageInfo:_gct.api.apaas.mobilePage.getInfo},pad_module:{getPageInfo:_gct.api.apaas.padPage.getInfo}},he=M.ref({}),ke=M.ref({}),Re=M.ref({});function Fo(s,e){Re.value[s]=e}const Ce=M.ref({pageStyle:{},pageConfig:{},pageName:""}),Io=M.toRef(()=>{const{title:s}=Ce.value.pageConfig||{};return s});class oe{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[i]=await _api.apaas.appGlobalSettings.getInfo({keys:e,fullInfo:!0})||[];if(i?.configJson){const n=JSON.parse(i.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?o.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 i=JSON.parse(t.configJson);ke.value[i.key]=go({value:i.defaultValue,appredis:i.appredis,key:i.key,type:i.type})}catch(i){console.error("initvars",i)}})}static async inithooks(){(await _gct.api.apaas.appGlobalSettings.getList({type:"event",fullInfo:!0})||[]).forEach(t=>{if(t.configJson)try{const i=new Function(JSON.parse(t.configJson).runJs),n=this.globalHookCaches[t.key];n&&n.push(i)}catch(i){console.error("inithooks",i)}})}static async initPermission(e){this.permissions=e||{}}static async initGlobalS(e){if(this.setModals(e.modals),e.pageVars?.forEach(t=>{he.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=ke.value[e];return t?t.value:console.warn("变量key不存在")}static async setGlobalVar(e,t){const i=ke.value[e];if(!i)return console.warn("变量key不存在");i.value=t}static getPageVar(e){const t=he.value[e];return t?t.value:console.warn("变量key不存在")}static async setPageVar(e,t){const i=he.value[e];if(!i)return console.warn("变量key不存在");await So(t,i.type),he.value[e]&&(he.value[e].value=t)}static getPageGlobalVar(e){return he.value[e]?.value}static setPageGlobalVar(e,t){he.value[e]?he.value[e].value=t:he.value[e]={value:t,type:"string"}}static async initPageByid(e,t="web_module"){this.pageID=e;const i=yo[t].getPageInfo,n=await i({id:e}),{runtimeJson:r,name:a}=n||{};if(Ce.value.pageName=a,!r)return Promise.reject();const l=JSON.parse(r);return l.widgets.filter(p=>p.type!=="bottom-button-container").length?(await this.initGlobalS(l),Ce.value.pageConfig=l.pageConfig||{},Ce.value.pageStyle=l.pageStyle||{},{res:n,data:l,name:a}):Promise.reject()}static async initHistoryByid(e){this.pageID=e;const t=await _gct.api.apaas.pageDesignerLog.getInfo({id:e}),{runtimeJson:i,name:n}=t||{};if(!i)return Promise.reject();Ce.value.pageName=n;const r=JSON.parse(i);return await this.initGlobalS(r),Ce.value.pageConfig=r.pageConfig||{},Ce.value.pageStyle=r.pageStyle||{},{res:t,data:r,name:n}}static usePageHooks(e,t,i,n){const r=M.ref(!1);return M.onMounted(async()=>{await M.nextTick();const a=t?.pageBeforeMount;if(a?.name&&await e.runExportByName(a.name,a.extraParams),n&&await n(e),r.value=!0,i.pageMounted)for(const x of this.globalHookCaches.pageMounted)await x();const{extraParams:l,name:p}=t?.pageMounted||{};p&&e.runAsyncExportByName(p,l)}),M.onBeforeUnmount(async()=>{Ce.value={};const{extraParams:a,name:l}=t?.pageDestroyed||{};if(l&&e.runExportByName(l,a),i.pageDestroyed)for(const p of this.globalHookCaches.pageDestroyed)await p()}),M.onActivated(async()=>{if(oe.setContextByKey(e.context),i.pageActivated)for(const p of this.globalHookCaches.pageActivated)await p();const{extraParams:a,name:l}=t?.pageActivated||{};l&&e.runAsyncExportByName(l,a)}),{pageload:r}}}const st=oe.getPremission.bind(oe),je=s=>(e,t={},i={},n={})=>s({modelKey:e.key,bsKey:e.action,modelCategory:e.modelCategory??o.EntityModelCategoryEnum.ENTITY},t,i,n),mi={post:je(_gct.api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey),get:je(_gct.api.apaas.modelComprehensive.getBizServiceModelCategoryModelKeyBsKey),put:je(_gct.api.apaas.modelComprehensive.putBizServiceModelCategoryModelKeyBsKey),delete:je(_gct.api.apaas.modelComprehensive.deleteBizServiceModelCategoryModelKeyBsKey)};async function wo(s,e,t={}){const i=o.BizServiceEnum[s.action];return mi[i](s,e,t)}async function To(s,e,{body:t={},query:i={}}={},n={}){return await _gct.api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey({bsKey:e,modelKey:s,modelCategory:o.EntityModelCategoryEnum.ENTITY},i,t,n)}class bo{isHandle=!1;buttonConfig={};fieldConfig={};processId="";dataId="";taskId;processInstanceId;refFormId;examineAndApproveState=o.ExamineAndApproveStateEnum.MY_CUSTOM;fieldStatus="";viewPageKey;isviewPage;isAPPviewPage;nonRelatedPerson=!1;constructor({taskId:e,processInstanceId:t,examineAndApproveState:i=o.ExamineAndApproveStateEnum.MY_CUSTOM,refFormId:n}){this.taskId=e,this.processInstanceId=t,this.examineAndApproveState=i,this.refFormId=n}async readyProcess(){const{taskId:e,processInstanceId:t}=this;if(this.examineAndApproveState===o.ExamineAndApproveStateEnum.MY_AGENT){await this.getDataInfo();const{node:i,processDefId:n,webViewPageKey:r,mobileViewPageKey:a}=await _gct.api.apaas.pmProcessEngine.getTaskExtension({taskId:e});this.transformByNode(i),this.processId=n;for(const l in this.buttonConfig)l===o.ButtonTypeEnum.Withdraw&&(this.buttonConfig[l].show=!1);this.viewPageKey=i?.webViewPageKey||r,this.isAPPviewPage=!!i?.mobileViewPageKey||!!a}if(this.examineAndApproveState===o.ExamineAndApproveStateEnum.MY_APPLICATION){await this.getDataInfo();const{node:i,processDefId:n,withdrawOp:r}=await _gct.api.apaas.pmProcessEngine.getInitialTaskExtension({processInstanceId:t})||{};this.transformByNode(i),this.processId=n;for(const a in this.buttonConfig)a===o.ButtonTypeEnum.End&&(this.buttonConfig[a].show=!1),a===o.ButtonTypeEnum.Withdraw&&(this.buttonConfig[a].show=!!r),a===o.ButtonTypeEnum.Resubmit&&(this.buttonConfig[a].show=!1)}if(this.examineAndApproveState===o.ExamineAndApproveStateEnum.MY_DONE){await this.getDataInfo();const{node:i,processDefId:n}=await _gct.api.apaas.pmProcessEngine.getHiTaskExtension({taskId:e});this.transformByNode(i),this.processId=n}if(this.examineAndApproveState===o.ExamineAndApproveStateEnum.MY_CUSTOM){await this.getDataInfo();const{node:i,processDefId:n,btnList:r,webViewPageKey:a,taskId:l,initiatorNode:p}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),x=r||[];this.withdrawByNode(p),this.transformByNode(i),this.processId=n;for(const A in this.buttonConfig){const y=A;this.buttonConfig[y].show&&(this.buttonConfig[y].show=x.includes(A))}if(!i){this.nonRelatedPerson=!0;return}!x.length||i?.key==="__initiator__"&&!l?this.isviewPage=!0:this.viewPageKey=i?.webViewPageKey||a}if(this.examineAndApproveState===o.ExamineAndApproveStateEnum.MY_CUSTOM_Modal){await this.getDataInfo();const{node:i,btnList:n,taskId:r,processDefId:a,initiatorNode:l}=await _gct.api.apaas.pmProcessEngine.getProcInstExtension({procInstId:t}),p=n||[];this.withdrawByNode(l),this.transformByNode(i),this.processId=a;for(const x in this.buttonConfig){const A=x;this.buttonConfig[A].show&&(this.buttonConfig[A].show=p.includes(x))}if(!i){this.nonRelatedPerson=!0;return}(!p.length||i?.key==="__initiator__"&&!r)&&(this.isviewPage=!0)}}withdrawByNode(e){if(!e)return;const{buttonConfig:t}=e;JSON.parse(t+"").forEach(n=>{const r=o.t(`sys.process.paasBpmnButtonEvent.${n.type}`);this.buttonConfig[n.type]={showModel:!1,title:o.t("sys.process.element.approval")+r,success:r+o.t("sys.success")+"!",show:n.enable,alias:n.alias,signature:!!n.signature,opinion:{},user:{}}})}transformByNode(e){if(e)try{const{opinionConfig:t,buttonConfig:i,fieldConfig:n}=e,r=JSON.parse(i||"[]"),a=JSON.parse(t||'{"enabled":false,"opinionType":[]}');r.forEach(l=>{const p=o.t(`sys.process.paasBpmnButtonEvent.${l.type}`);this.buttonConfig[l.type]={showModel:![o.ButtonTypeEnum.Resubmit,o.ButtonTypeEnum.Withdraw,o.ButtonTypeEnum.End].includes(l.type),title:o.t("sys.process.element.approval")+p,success:p+o.t("sys.success")+"!",show:l.enable,alias:l.alias,signature:!!l.signature,opinion:{show:a.enabled,required:ko(a.opinionType,l.type)},user:{show:[o.ButtonTypeEnum.Reassign,o.ButtonTypeEnum.Countersign].includes(l.type),multiple:o.ButtonTypeEnum.Countersign===l.type,label:o.t(`sys.process.user.${l.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===o.ExamineAndApproveStateEnum.MY_DONE?[]:e.filter(t=>{if(t.type===o.FormComponents.ProcessApproveButton){const i=this.buttonConfig[t.props.action],n=!!i?.show;return n&&(t.props.title=i.alias),n}return!0})}useFieldWidget(e){if(this.nonRelatedPerson)return;const t=e.props.field,{fieldConfig:i,examineAndApproveState:n}=this;if(i&&i[t]){const{permission:r}=i[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&&([o.ExamineAndApproveStateEnum.MY_APPLICATION,o.ExamineAndApproveStateEnum.MY_DONE].includes(n)||this.isviewPage)&&(e.props.readonly=!0)}useFieldToShow(e){const t=e.props.field,{fieldConfig:i}=this;if(i&&i[t]){const{permission:n}=i[t];n==="hidden"&&(e.props.hidden=!0)}}}function ko(s,e){if(s.includes(o.OpinionTypeEnum.Required))return!0;if(s.includes(o.OpinionTypeEnum.Optional))return!1;if(s.includes(o.OpinionTypeEnum.ApproveRequired)||s.includes(o.OpinionTypeEnum.ApproveRequired))return e===o.ButtonTypeEnum.Approve;if(s.includes(o.OpinionTypeEnum.CountersignRequired))return e===o.ButtonTypeEnum.Countersign;if(s.includes(o.OpinionTypeEnum.ReassignRequired))return e===o.ButtonTypeEnum.Reassign;if(s.includes(o.OpinionTypeEnum.RejectRequired))return e===o.ButtonTypeEnum.Reject;if(s.includes(o.OpinionTypeEnum.RefuseRequired))return e===o.ButtonTypeEnum.Refuse}class Le{static instance;mask;container;spinner;constructor(){if(Le.instance)return Le.instance;Le.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 Ro=new Le;class vo{context;searchVNodes;cssData;pageKey;exports;#e;#t;ProcessAppRoved;pageLayoutMode;constructor({js:e,css:t,pageKey:i,ContextPc:n}){this.cssData=this.#i(t),this.searchVNodes={},this.exports={},this.#t={},this.#e={},this.context=new n({$ref:this.getComponent.bind(this),$asyncRef:this.getSyncComponent.bind(this)}),this.#s(e),oe.setContextByKey(this.context,i),this.pageKey=i}async runProcessBySaskId({taskId:e,processInstanceId:t,examineAndApproveState:i,refFormId:n}){this.ProcessAppRoved=new bo({taskId:e,processInstanceId:t,examineAndApproveState:i,refFormId:n}),await this.ProcessAppRoved.readyProcess()}#i(e,t={}){if(!e)return;const{css:i,load:n,unload:r}=uo(e,t);return{css:i,load:n,unload:r}}runContext(e,t){this.context.gctWidgets[e]=t}async runEventByName(e,t={},...i){const n=t[e];let r;if(n){if(Array.isArray(n))r=await Bo(n,this.context,i);else{const a=this.exports[n.name];if(!a)throw`函数${n.name}不存在`;r=await a(...i,M.toRaw(n.extraParams))}return r}}async runExportByName(e,...t){try{const i=this.exports[e];if(!i)throw`函数${e}不存在`;return i(...t)}catch(i){console.error(i)}}async runAsyncExportByName(e,...t){try{const i=this.exports[e];if(!i)throw`函数${e}不存在`;return await this.getReadyByFun(i),i(...t)}catch(i){console.error(i)}}#s(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,i){if(e)if(this.searchVNodes[e]){const n=this.searchVNodes[e].find(r=>r.comId===i);n?n.callback=t:this.searchVNodes[e].push({callback:t,comId:i})}else this.searchVNodes[e]=[{callback:t,comId:i}]}cancelInitSearchs(e,t){!e||!this.searchVNodes[e]||(this.searchVNodes[e]=this.searchVNodes[e].filter(i=>i.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 i=this.#t[e];i?t(e,i):this.#e[e]?this.#e[e].push(t):this.#e[e]=[t]}#r(e,t){this.#e[e]&&this.#e[e].forEach(i=>{i(t)})}getComponent(e){const t=this.#t[e];if(t)return new it(e,t);console.error(e+"组件不存在或者未初始化")}getSyncComponent(e){if(!e)return Promise.reject("标识不能为空");const t=this.#t[e];return t?Promise.resolve(new it(e,t)):new Promise((i,n)=>{const r=setTimeout(()=>{n(e+"不存在或者被隐藏")},3e4);this.#n(e,a=>{clearTimeout(r),i(new it(e,a))})})}async getReadyByFun(e){if(typeof e!="function")return Promise.reject("参数必须是函数");const i=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(i)}async processHandle(e,{opinion:t,reassignId:i,signature:n,countersignUserIds:r,button:a}){const{taskId:l,processInstanceId:p}=this.ProcessAppRoved,x={procInstId:p,data:e,opinion:t,button:a,countersignUserIds:r,taskId:l,signature:n,reassignId:i};await _gct.api.apaas.pmProcessEngine.postProcExecute(x)}async checkedProcess(e){const{processId:t}=this.ProcessAppRoved||{};if(!t)return Promise.reject(o.t("sys.process.pleaseInitiateTheProcessFirst"));if(e!==t)return Promise.reject(o.t("sys.process.processInstanceMismatch"))}}class No{$ref;$asyncRef;$getModal;$closeModal;$customBizService=mi;gctWidgets={};constructor({$ref:e,$asyncRef:t}){this.$asyncRef=t,this.$ref=e}$utility={_:xi,cloneDeep:Z.cloneDeep,differenceBy:Z.differenceBy,dayjs:U,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:ii,transformData:ve};$httpBizService=wo;$request=To;$loading=Ro;$getPremission(e){return oe.getPremission(e)}$setPremission(e,t){oe.setPremission(e,t)}$getAppGlobalVar(e){return oe.getGlobalVar(e)}$setAppGlobalVar(e,t){oe.setGlobalVar(e,t)}$getPageGlobalVar(e){return oe.getPageGlobalVar(e)}$setPageGlobalVar(e,t){oe.setPageGlobalVar(e,t)}$getPageVar(e){return oe.getPageVar(e)}$setPageVar(e,t){oe.setPageVar(e,t)}$getCtxById(e){return oe.getContextByKey(e)}$setPropsByKey(e,t){const i=this.gctWidgets[e]?.props;if(i)for(const n in t)i[n]=t[n]}$getPropsByKey(e,t=[],i){const n=this.gctWidgets[e];if(!n)return{};const r=i||!n.props?n:n.props;return typeof t=="string"&&(t=[t]),t.reduce((a,l)=>(a[l]=r[l],a),{})}}class it{modelKey;getValue;setValue;submit;reload;key;constructor(e,t){this.key=e;const i=t.elRef;Object.keys(i).forEach(n=>{this[n]=i[n]})}}async function Bo(s,e,t){const i=s.map(_o.bind(e,t));await Promise.all(i)}async function _o(s,e){const{name:t,refId:i,scopeId:n,modalTitle:r}=e,a=r?.split(".")||[];let l;if(a.length>1){const p=this.gctWidgets?.[a[0]]||{},x=[];Ei(x,p),l=x.find(A=>A.id===a[1])||{}}else a.length&&(l=this.gctWidgets?.[a[0]]);t===o.INNER_EVENT.OPEN_MODAL&&await this.$getModal(i).open({title:l?.props?.title}),t===o.INNER_EVENT.CLOSE_MODAL&&(i?await this.$getModal(i).close():await this.$closeModal()),t===o.INNER_EVENT.REFRESH_TABLE&&await(await this.$getCtxById(n).$asyncRef(i)).reload(s?s[0]:null)}function Ei(s,e){const t=e.children||[];for(const i of t)i.type&&i.type==o.FormComponents.CustomButton?s.push(i):i.children?.length&&Ei(s,i)}function Me({expression:s="",rowData:e=null},t){if(!s||s==="true"){t(!0);return}const i=Be(s),n=i.reduce((l,p)=>{const x=p.split(".");return l[p]={formKey:x[0],itemKey:x[1]},l},{}),r=M.computed(()=>i.reduce((l,p)=>{const x=p.split("."),A=x[0]+"",y=x[1];if(y){const F=(e?e[y]:Re.value[A]?.[y])??"";l[A]?l[A][y]=F:l[A]={[y]:F}}else A.startsWith("$VAR_")||A.startsWith("$IVAR_")?l[A]=ke.value[A]?.value??"":(A.startsWith("$PAGERVAR_")||A.startsWith("$IPAGERVAR_"))&&(l[A]=he.value[A]?.value??"");return l},{}));function a(l){const p={};Object.keys(n).forEach(x=>{const{formKey:A,itemKey:y}=n[x],F=y?l[A]?.[y]:l[A];p[x]=F}),Ve(s,p).then(t)}e&&a(r.value),fi(r,()=>{a(r.value)},{debounce:200,immediate:!e})}async function Zt({expression:s="",rowData:e=null}){if(!s||s==="true")return!0;const i=Be(s).reduce((r,a)=>{const l=a.split(".");return r[a]={formKey:l[0],itemKey:l[1]},r},{}),n={};return Object.keys(i).forEach(r=>{const{formKey:a,itemKey:l}=i[r];let p="";a.startsWith("$VAR_")?p=ke.value[a]?.value??"":a.startsWith("$PAGERVAR_")?p=he.value[a]?.value??"":l?p=(e?e[l]:Re.value[a]?.[l])??"":p=(e?e[a]:Re.value[a])??"",n[r]=p}),Ve(s,n)}function Po(s,e){return st(e)?s.displayType===o.DisplayType.CONFIG?M.toRef(()=>!s.hidden):Oo(s):!1}function Oo(s){const e=M.ref(!1);return Lo(s,t=>{e.value=!!t}),e}function Lo({displayRule:s,tableForm:e},t){if(!s)t(!0);else{const i=Be(s),n=i.reduce((a,l)=>{const p=l.split(".");return a[l]={formKey:p[0],itemKey:p[1]},a},{}),r=M.toRef(()=>i.reduce((a,l)=>{const p=l.split("."),x=p[0]+"",A=p[1]+"",y={...e,...Re.value}[x]?.[A];return a[x]?a[x][A]=y:a[x]={[A]:y},a},{}));fi(r,()=>{Mo(r.value,n,s,a=>{t(a)})},{immediate:!0,debounce:300})}}function Mo(s,e,t,i){const n={};Object.keys(e).forEach(r=>{const{formKey:a,itemKey:l}=e[r],p=s?.[a]?.[l];n[r]=p}),Ve(t,n).then(i)}function Vo(s){return s.props?.displayRule&&s.props?.displayType===o.DisplayType.RULE?Po(s.props,s.id):Ft(s)}function Ft(s,e){if(!s.id)return!1;if(!st(s.id))return s.props.hidden=!0,!1;const t=M.inject("useProcessFieldEvent",void 0);if(t)return t.useFieldToShow(s),!s.props.hidden;const{displayType:i,displayRule:n}=s.props||{},r=s.props.componentDependency?.configDependency||{},{value:a,expression:l}=r[o.Dependency_ENUM.HIDDEN]||{};return a&&l?(s.props.hidden=!0,Me({expression:l,rowData:e},p=>{s.props.hidden=!!p})):a?s.props.hidden=!0:i===o.DisplayType.RULE&&n&&(s.props.hidden=!0,Me({expression:n,rowData:e},p=>{s.props.hidden=!p})),M.toRef(()=>!s.props.hidden)}async function Ho(s,e){if(!s.id)return!1;if(!st(s.id))return s.props.hidden=!0,!1;const t=M.inject("useProcessFieldEvent",void 0);if(t)return t.useFieldToShow(s),!s.props.hidden;const{displayType:i,displayRule:n}=s.props||{},r=s.props.componentDependency?.configDependency||{},{value:a,expression:l}=r[o.Dependency_ENUM.HIDDEN]||{};return a&&l?(s.props.hidden=!0,s.props.hidden=!!await Zt({expression:l,rowData:e})):a?s.props.hidden=!0:i===o.DisplayType.RULE&&n&&(s.props.hidden=!0,s.props.hidden=!!await Zt({expression:n,rowData:e})),!s.props.hidden}function Uo(s,e){return s.forEach(t=>{Ft(t,e)}),M.toRef(()=>s.filter(t=>!t.props.hidden))}function zo(s,e){const t=s.props.componentDependency?.configDependency||{},{value:i,expression:n}=t[o.Dependency_ENUM.HIDDEN]||{};i&&n&&Me({expression:n},r=>{e(r)}),e(s.props.hidden)}function Yo(s){const e=s.props.componentDependency?.configDependency||{},{value:t,expression:i}=e[o.Dependency_ENUM.HIDDEN]||{};t&&i&&Me({expression:i},a=>{s.props.hidden=!!a});const{value:n,expression:r}=e[o.Dependency_ENUM.REQUIRED]||{};n&&r&&Me({expression:r},a=>{s.props.required=!!a})}function Go(){_gct.register.render?console.warn("渲染注册已存在,可能存在重复注册问题,请检查是否有重复引入渲染包的情况"):_gct.register.render=new gi}exports.Context=No;exports.Events=vo;exports.FieldSchema=ti;exports.GctComponent=it;exports.Globals=oe;exports.addDataByForm=Oi;exports.calculate=Ve;exports.dependencyToShow=Ft;exports.dependencyToShowSync=Ho;exports.formMap=Re;exports.getPageTitle=Io;exports.getPremission=st;exports.getRefInfoId=Co;exports.globalVarCaches=ke;exports.identify=Be;exports.initFieldWidgetRuntime=Pi;exports.onInit=Go;exports.pageDataforJson=Ce;exports.pageGlobaVariables=he;exports.setDataByForm=Li;exports.setFormData=Fo;exports.tableWidgetByDept=Yo;exports.tableWidgetToShow=zo;exports.transSelectData=si;exports.transformData=ve;exports.transformDataToDict=Mi;exports.transformPropsField=Si;exports.transformSourceData=ii;exports.useDependencyToShow=Vo;exports.useDependencyToShowList=Uo;exports.useStyle=_i;