minidev 0.0.1

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 (33) hide show
  1. package/README.md +39 -0
  2. package/assets/builder-debug-utils/CHANGELOG.md +263 -0
  3. package/assets/builder-debug-utils/README.md +55 -0
  4. package/assets/builder-debug-utils/dist/index.js +1 -0
  5. package/assets/builder-debug-utils/lib/compose.d.ts +2 -0
  6. package/assets/builder-debug-utils/lib/compose.js +81 -0
  7. package/assets/builder-debug-utils/lib/config.d.ts +3 -0
  8. package/assets/builder-debug-utils/lib/config.js +18 -0
  9. package/assets/builder-debug-utils/lib/context.d.ts +14 -0
  10. package/assets/builder-debug-utils/lib/context.js +31 -0
  11. package/assets/builder-debug-utils/lib/index.d.ts +3 -0
  12. package/assets/builder-debug-utils/lib/index.js +17 -0
  13. package/assets/builder-debug-utils/lib/interface.d.ts +86 -0
  14. package/assets/builder-debug-utils/lib/interface.js +15 -0
  15. package/assets/builder-debug-utils/lib/sdk.d.ts +30 -0
  16. package/assets/builder-debug-utils/lib/sdk.js +148 -0
  17. package/assets/builder-debug-utils/lib/updater.d.ts +16 -0
  18. package/assets/builder-debug-utils/lib/updater.js +137 -0
  19. package/assets/builder-debug-utils/lib/utils.d.ts +13 -0
  20. package/assets/builder-debug-utils/lib/utils.js +59 -0
  21. package/assets/builder-debug-utils/offline/assets_map +1 -0
  22. package/assets/builder-debug-utils/offline/boatman_cube +1 -0
  23. package/assets/builder-debug-utils/offline/boatman_mini +3 -0
  24. package/assets/builder-debug-utils/package.json +49 -0
  25. package/assets/builder-debug-utils/readonly/assets_map +1 -0
  26. package/assets/builder-debug-utils/readonly/boatman_cube +1 -0
  27. package/assets/builder-debug-utils/readonly/boatman_mini +3 -0
  28. package/bin/minidev.js +4 -0
  29. package/index.d.ts +5500 -0
  30. package/lib/index.js +2 -0
  31. package/lib/index.js.LICENSE.txt +36 -0
  32. package/package.json +36 -0
  33. package/scripts/post-install.js +6 -0
@@ -0,0 +1,3 @@
1
+ !function(){"use strict";var EWorkerAppEvent,EData,EDataEvent,EStorage,EStorageEvent,EAppLog,EAppLogEvent,RuntimeProtocol,EChromeNetworkProtocol,EBugmePanelId;!function(e){e.PageResume="pageResume",e.PagePause="pagePause",e.DebugPanelClick="tinyRemoteDebugPanelButtonClick",e.DebugConsole="onTinyDebugConsole",e.DebugNetworkRequest="tinyAppRemoteDebug_network_request",e.DebugNetworkResponse="tinyAppRemoteDebug_network_response",e.DebugNetworkError="tinyAppRemoteDebug_network_error",e.DebugStorageChanged="tinyAppRemoteDebug_storage",e.MessageFromVConsole="onMessageFromVConsole"}(EWorkerAppEvent||(EWorkerAppEvent={})),function(e){e.GetPagesData="Tiny.Data.getPageData",e.SetPageData="Tiny.Data.setPageData"}(EData||(EData={})),function(e){e.DataChanged="Tiny.Data.dataChanged"}(EDataEvent||(EDataEvent={})),function(e){e.GetStorageInfo="Tiny.Storage.getStorageInfo",e.ClearStorage="Tiny.Storage.clearStorage",e.RemoveStorage="Tiny.Storage.removeStorage",e.SetStorage="Tiny.Storage.setStorage"}(EStorage||(EStorage={})),function(e){e.StorageChanged="Tiny.Storage.storageChanged"}(EStorageEvent||(EStorageEvent={})),function(e){e.Enable="MiniAppLog.enable"}(EAppLog||(EAppLog={})),function(e){e.ApiSyncCall="MiniAppLog.onApiSyncCall",e.ApiSyncCallback="MiniAppLog.onApiSyncCallback",e.ApiCall="MiniAppLog.onApiCall",e.ApiCallback="MiniAppLog.onApiCallback",e.SetData="MiniAppLog.onSetData",e.SetDataCallback="MiniAppLog.onSetDataCallback",e.ShareAppMessage="MiniAppLog.onShareAppMessage"}(EAppLogEvent||(EAppLogEvent={})),function(e){e.consoleAPICalled="Runtime.consoleAPICalled",e.executionContextDestroyed="Runtime.executionContextDestroyed",e.executionContextsCleared="Runtime.executionContextsCleared",e.executionContextCreated="Runtime.executionContextCreated"}(RuntimeProtocol||(RuntimeProtocol={})),function(e){e.RequestWillBeSent="Network.requestWillBeSent",e.ResponseReceived="Network.responseReceived",e.LoadingFinished="Network.loadingFinished",e.LoadingFailed="Networkw.loadingFailed",e.GetResponseBody="Network.getResponseBody"}(EChromeNetworkProtocol||(EChromeNetworkProtocol={})),function(e){e.Data="data",e.Storage="storage",e.AppLog="applog"}(EBugmePanelId||(EBugmePanelId={}));var counter=Date.now()%1e9;function WeakSet$1(e){this.name="__st"+(1e9*Math.random()>>>0)+counter+++"__",e&&e.forEach&&e.forEach(this.add,this)}var proto=WeakSet$1.prototype;proto.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},proto.delete=function(e){return!!e[this.name]&&(e[this.name]=void 0,!0)},proto.has=function(e){return!!e[this.name]};var weakset=WeakSet$1,workerGlobal=self;function noop(){}var DEBUG_TAG="[DEBUG]";function error(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,[DEBUG_TAG].concat(e))}var debug=noop,originImportScripts=workerGlobal.importScripts,isAppXImportHooked=!1,appxLoadedCallbacks=[];function runAfterAppx(e){void 0!==workerGlobal.AFAppX?e():(appxLoadedCallbacks.push(e),isAppXImportHooked||(isAppXImportHooked=!0,workerGlobal.importScripts=function(e){originImportScripts(e),/af-appx\.worker\.min\.js$/.test(e)&&(appxLoadedCallbacks.forEach((function(e){return e()})),appxLoadedCallbacks=[])}))}function runAfterAppXBridgeReady(e){if("undefined"==typeof AFAppX&&(AFAppX=workerGlobal.AFAppX),"undefined"==typeof $AppxFramework)e();else if(AFAppX.Plugin){var t=AFAppX.Plugin;AFAppX.Plugin=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var r=n[0];if("object"==typeof r&&r.run){var a=r.run;r.run=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(r,t)}}return t.apply(AFAppX,n)}}else if($AppxFramework.bootstrapInAppContextByProtocol){var n=$AppxFramework.bootstrapInAppContextByProtocol;$AppxFramework.bootstrapInAppContextByProtocol=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=t[0];if("object"==typeof r){var a=r.callback;if(a&&(r.callback=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),a.apply(this,t)}),r.pageInfo){var i=r.pageInfo.init;i&&(r.pageInfo.init=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e(),i.apply(this,t)})}}return n.apply($AppxFramework,t)}}}function getStartupParams(){return workerGlobal.__appxStartupParams&&"appId"in workerGlobal.__appxStartupParams?workerGlobal.__appxStartupParams:workerGlobal.AFAppX&&workerGlobal.AFAppX.bridge&&workerGlobal.AFAppX.bridge.callSync&&workerGlobal.AFAppX.bridge.callSync("getStartupParams")||{}}function guardSingleMsgSize(e){var t="string"==typeof e?e:JSON.stringify(e);return t.length>5e6?void debug("abort send websocket message due to size:",t.length):t}function createWeakSet(){return"undefined"==typeof WeakSet?new weakset:new WeakSet}var getCircularReplacer=function(){var e=createWeakSet();return function(t,n){if("object"==typeof n&&null!==n)try{if(e.has(n))return;e.add(n)}catch(e){console.error(e)}return n}};function circularJSONStringify(e){return JSON.stringify(e,getCircularReplacer())}function throttle(e,t,n,o,r){var a,i,s=null,c=0;r||(r={});var p=function(){c=!1===r.leading?0:Date.now(),s=null,i=e.apply(null,a),a=null};return function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var g=Date.now();c||!1!==r.leading||(c=g);var d=t-(g-c);return a=u,d<=0||d>t?(o(s),s=null,c=g,i=e.apply(null,a),a=null):s||!1===r.trailing||(s=n(p,d)),i}}var weakElementKey="__weak_set_key__yek_tes_kaew__",weakSetKey=1,WeakSetKlass;function getWeakSetPolyfillConstructor(){return function(){function e(){this.elementKey=weakElementKey+weakSetKey++}return e.prototype.has=function(e){return 1===e[this.elementKey]},e.prototype.add=function(e){return e[this.elementKey]=1,this},e.prototype.delete=function(e){e[this.elementKey]=null},e}()}function getWeakMapConstructorMayBePolyfill(){var e="undefined"!=typeof WeakSet;WeakSetKlass=e?WeakSet:getWeakSetPolyfillConstructor()}function createWeakSet$1(){return WeakSetKlass||getWeakMapConstructorMayBePolyfill(),new WeakSetKlass}var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},InterceptContext=function(){function e(e,t){var n=this;this.interceptors=e,this.callback=t,this.nextRequestId=1e5,this.notifyDataChange=throttle((function(){n.callback({ext:{origin:"data"},method:"Tiny.Data.dataChanged"})}),300,setTimeout,clearTimeout)}return e.prototype.getNextRequestId=function(){return++this.nextRequestId},e}(),getCircularReplacer$1=function(){var e=createWeakSet$1();return function(t,n){if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}};function circularJSONStringify$1(e){return JSON.stringify(e,getCircularReplacer$1())}var precisionTimestampBasis=0;function resetPrecisionTimestampBasis(){precisionTimestampBasis=1e3*Date.now()-getPrecisionTimestamp()}var getPrecisionTimestamp="object"==typeof performance&&performance&&"function"==typeof performance.now?function(){return 1e3*performance.now()+precisionTimestampBasis}:function(){return 1e3*Date.now()};function interceptLifecycle(e){e.interceptors.appLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var o={aTime:getPrecisionTimestamp()/1e3,args:n,context:circularJSONStringify$1(normalizeAppLifecycleManagerThisContext(t))};onAppLifecycle(e,o)})),e.interceptors.pageLifecycleManagerInterceptor.before("performLifeHook",(function(t,n){var o={aTime:getPrecisionTimestamp()/1e3,args:n,context:circularJSONStringify$1(normalizePageLifecycleManagerThisContext(t))};onPageLifecycle(e,o)}))}function onAppLifecycle(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog."+t.args[0],params:t};e.callback(n)}catch(e){}}function normalizeAppLifecycleManagerThisContext(e){var t=e.app;return{app:{appInstanceId:t.appInstanceId,initTime:t.initTime,launchOptions:t.getLaunchOptions(),launchTime:t.launchTime},state:e.state}}function onPageLifecycle(e,t){try{var n=getLifecycleName(t.args[0]);if(!n)return;var o={ext:{origin:"applog"},method:"MiniAppLog."+n,params:t};e.callback(o),"onPageShow"===n&&e.notifyDataChange()}catch(e){}}function getLifecycleName(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function normalizePageLifecycleManagerThisContext(e){var t=e.page;return{page:{initTime:t.initTime,loadTime:t.loadTime,pageId:t.pageId,pagePath:t.pagePath,plugin:t.plugin},state:e.state}}function interceptJSAPI(e){e.interceptors.bridgeSyncCallContextMethodInterceptor.all("invoke",(function(t,n){var o=e.getNextRequestId(),r=getPrecisionTimestamp()/1e3;return onApiSyncCall(e,{context:t,args:n,reqId:o,aTime:r}),[[o,r],n]}),(function(t,n,o,r){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onApiSyncCallback(e,{context:t,args:c,reqId:i,result:o,bTime:p,aTime:s})})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("invoke",(function(t,n){var o=e.getNextRequestId(),r=getPrecisionTimestamp()/1e3;return t.__reqId=o,onApiCall(e,{context:t,args:n,reqId:o,aTime:r}),"rpc"===t.apiName&&(t.option.getResponse||(t.$$rpcGetResponseToTrue=!0,t.option=__assign(__assign({},t.option),{getResponse:!0}))),n})),e.interceptors.bridgeAsyncCallContextMethodInterceptor.before("dispatchResultCallback",(function(t,n){var o=t.__reqId,r=getPrecisionTimestamp()/1e3;return onApiCallback(e,{context:t,args:n,reqId:o,bTime:r}),"rpc"===t.apiName&&t.$$rpcGetResponseToTrue&&void 0!==n[0].resData?[n[0].resData]:n}))}function onApiSyncCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCallback",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function onApiSyncCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiSyncCall",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function onApiCall(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCall",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function onApiCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onApiCallback",params:minimizeApiHookInfo(t)};e.callback(n)}catch(e){}}function minimizeApiHookInfo(e){if(e.context){var t=e.context,n=t.apiName,o=t.extraInfo,r=t.isMiniExtension,a=t.option,i=t.startTime,s=t.taskId,c=t.__reqId;return __assign(__assign({},e),{context:{__reqId:c,apiName:n,extraInfo:o,isMiniExtension:r,option:a,startTime:i,taskId:s}})}return e}var originalError=console.error;function interceptError(e){e.interceptors.appBaseInstanceInterceptor.after("reportError",(function(e,t){t[0];onError({code:t[1],formatted:t[2]})}))}function onError(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(originalError.bind(console,t),0)}function interceptSetData(e){e.interceptors.pageFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var o=e.getNextRequestId(),r=getPrecisionTimestamp()/1e3,a={aTime:r,args:n,context:circularJSONStringify$1(normalizePageLogicInstanceThisContext(t)),reqId:o};return onSetData(e,a),[[o,r],n]}),(function(t,n,o,r){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify$1(normalizePageLogicInstanceThisContext(t)),reqId:i})})),e.interceptors.componentFlexibleLogicInstanceMethodInterceptor.all("setData",(function(t,n){var o=e.getNextRequestId(),r=getPrecisionTimestamp()/1e3;return onSetData(e,{aTime:r,args:n,context:circularJSONStringify$1(normalizeComponentLogicInstanceThisContext(t)),reqId:o}),[[o,r],n]}),(function(t,n,o,r){var a=n[0],i=a[0],s=a[1],c=n[1],p=getPrecisionTimestamp()/1e3;onSetDataCallback(e,{aTime:s,args:c,bTime:p,context:circularJSONStringify$1(normalizeComponentLogicInstanceThisContext(t)),reqId:i})}))}function onSetData(e,t){try{e.notifyDataChange();var n={ext:{origin:"applog"},method:"MiniAppLog.onSetData",params:minimizeSetDataInfo(t)};e.callback(n)}catch(e){}}function onSetDataCallback(e,t){try{var n={ext:{origin:"applog"},method:"MiniAppLog.onSetDataCallback",params:t};e.callback(n)}catch(e){}}function minimizeSetDataInfo(e){return e.context?e:{componentIs:e.component?e.component.is:void 0,isPage:e.isPage,option:e.options,pagePath:e.isPage?e.page.route:e.component.$page.route}}function normalizePageLogicInstanceThisContext(e){var t=e.page;return{page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:e.pageId,pagePath:e.pagePath}}function normalizeComponentLogicInstanceThisContext(e){var t=e.page;return{componentPath:e.componentPath,page:{appInstanceId:t.appInstanceId,initTime:t.initTime,loadTime:t.loadTime},pageId:t.pageId,pagePath:t.pagePath}}function setup(e,t,n){resetPrecisionTimestampBasis();var o=new InterceptContext(t,n);interceptSetData(o),interceptLifecycle(o),interceptJSAPI(o),interceptError(o)}var AgentContext=function(){this.channelConfigKey="0",this.silentMode=!1,this.userAgent="undefined"!=typeof navigator?navigator.swuserAgent||navigator.userAgent:"",this.isIOS=/iPhone|iPad|iOS/i.test(this.userAgent),this.isLyra=/LyraVM/i.test(this.userAgent),this.startupParams=getStartupParams(),this.channelId=this.startupParams.channelId,this.isLyra&&(this.silentMode=!0),this.startupParams.remoteCh&&(this.channelConfigKey=String(this.startupParams.remoteCh))},NetworkCollection=function(){function e(){this.records=new Map}return e.prototype.setRequest=function(e,t){this.records.set(e,__assign(__assign({},this.records.get(e)||{}),t))},e.prototype.getRequest=function(e){return this.records.get(e)},e.prototype.removeRequest=function(e){this.records.has(e)&&this.records.delete(e)},e}();function createProtocol4RequestWillBeSent(e){var t=(e.method||"GET").toUpperCase(),n=mapValueToString(e.headers),o=getTimestamp();return{method:EChromeNetworkProtocol.RequestWillBeSent,params:{documentURL:"",loaderId:"",requestId:e.requestId,request:{method:t,url:e.url,headers:n,postData:e.postBody,mixedContentType:"none",initialPriority:"High",isLinkPreload:!1,referrerPolicy:"origin"},wallTime:o,initiator:{type:"script"},timestamp:o,type:"XHR"}}}function createProtocol4ResponseReceived(e,t){var n=e.profile,o=e.headers,r=getTimestamp(),a=r-(n?n.totalTime-n.Waiting-n.domainLookup-n.connect-n.SSLconnection:0)/1e3;return{method:EChromeNetworkProtocol.ResponseReceived,params:{requestId:e.requestId,loaderId:"",type:"XHR",timestamp:a,response:{url:t.url||"",status:Number(e.status),headers:mapValueToString(o),requestHeaders:t.requestHeaders,connectionReused:!1,connectionId:1e3,encodedDataLength:0,securityState:"unknown",statusText:"",protocol:"",mimeType:o["Content-Type"]||o["content-type"],timing:n?createResourceTiming(n,r-n.totalTime/1e3):void 0}}}}function createProtocol4LoadingFinished(e){return{method:EChromeNetworkProtocol.LoadingFinished,params:{requestId:e.requestId,timestamp:getTimestamp(),encodedDataLength:0}}}function createProtocol4LoadingFailed(e){return{method:EChromeNetworkProtocol.LoadingFailed,params:{canceled:!1,errorText:e.errorMsg||"",requestId:e.requestId,timestamp:getTimestamp(),type:"XHR"}}}function mapValueToString(e){if(!e||"object"!=typeof e)return{};var t={};return Object.keys(e).forEach((function(n){t[n]=""+e[n]})),t}function getTimestamp(){return Date.now()/1e3}function createResourceTiming(e,t){var n=e.domainLookup,o=e.connect,r=e.SSLconnection,a=n+o+r;return{requestTime:t,proxyStart:-1,proxyEnd:-1,dnsStart:n?1e-5:0,dnsEnd:n,connectStart:n,connectEnd:a,sslStart:a-r,sslEnd:a,workerStart:-1,workerReady:-1,sendStart:-1,sendEnd:-1,pushStart:0,pushEnd:0,workerFetchStart:-1,workerRespondWithSettled:-1,receiveHeadersEnd:a+e.Waiting}}var MAX_QUEUE_SIZE=1e8,MessageQueue=function(){function e(e){void 0===e&&(e=[]),this._messageQueue=e,this._queueSize=0,this.isApplogEnabled=!1}return e.prototype.push=function(e){this._queueSize;var t=guardSingleMsgSize(e);null!=t&&(this._messageQueue.push(t),this._queueSize+=t.length)},e.prototype.sendQueuedMessages=function(){if(0!==this._messageQueue.length){var e=getInjector().getWorkerSocket();e&&(this._messageQueue.forEach((function(t){return e.send(t)})),this._messageQueue=[],this._queueSize=0)}},e.prototype.setApplogEnabled=function(e){this.isApplogEnabled=e},e}(),globalInjector,Injector=function(){function e(){}return e.prototype.getAgentContext=function(){return this.agentContext||(this.agentContext=new AgentContext),this.agentContext},e.prototype.setWorkerSocket=function(e){this.workerSocket=e},e.prototype.getWorkerSocket=function(){return this.workerSocket},e.prototype.getNetworkRecorder=function(){return this.networkRecorder||(this.networkRecorder=new NetworkCollection),this.networkRecorder},e.prototype.getMessageQueue=function(){return null==this.messageQueue&&(this.messageQueue=new MessageQueue),this.messageQueue},e.prototype.setRuntime=function(e){this.runtime=e},e.prototype.getRuntime=function(){return this.runtime},e}();function getInjector(){return globalInjector||(globalInjector=new Injector),globalInjector}function sendOrQueueApplogMsg(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify(e)):n.push(circularJSONStringify(e))}catch(e){}}function getHookFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}var channelDomainConfig={0:{openchannel:"openchannel.alipay.com",hpmweb:"hpmweb.alipay.com"},1:{openchannel:"miniprogram.alipay.com",hpmweb:"hpmweb.alipay.com"},2:{openchannel:"openchannel-pre.alipay.com",hpmweb:"hpmweb-pre.alipay.com"}};function throttle$1(e,t,n,o,r){var a,i,s=null,c=0;r||(r={});var p=function(){c=!1===r.leading?0:Date.now(),s=null,i=e.apply(null,a),a=null};return function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var g=Date.now();c||!1!==r.leading||(c=g);var d=t-(g-c);return a=u,d<=0||d>t?(o(s),s=null,c=g,i=e.apply(null,a),a=null):s||!1===r.trailing||(s=n(p,d)),i}}function debounce(e,t,n,o){var r;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];o(r),r=n((function(){e.apply(null,a)}),t)}}function compareVersion(e,t){if(e&&t){for(var n=stringToIntArraySplitBy(e,"."),o=stringToIntArraySplitBy(t,"."),r=0,a=0,i=void 0,s=void 0;a<n.length;a++){if((i=o[a]||0)>(s=n[a]||0)){r=-1;break}if(i<s){r=1;break}}return r}return 0}function stringToIntArraySplitBy(e,t){for(var n=[],o=0,r=e.split(t);o<r.length;o++){var a=r[o];n.push(parseInt(a,10))}return n}var WebSocketBaseImpl=function(){function e(e){this.url="",this.opened=!1,e&&(this.url=e),this.onSocketError=this.onSocketError.bind(this),this.onSocketClose=this.onSocketClose.bind(this),this.onSocketMessage=this.onSocketMessage.bind(this),this.onSocketOpen=this.onSocketOpen.bind(this)}return Object.defineProperty(e.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),e.prototype.setUrl=function(e){this.url=e},e}(),internalWebSocket;"undefined"!=typeof WebSocket&&WebSocket.OPEN&&(internalWebSocket=WebSocket);var WebSocketBrowserImpl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.messageBeforeSocketOpen=[],t}return __extends(t,e),t.prototype.open=function(){var e=this;if(!this.url)throw new Error("WebSocket url required");this.socket=new internalWebSocket(this.url),this.socket.onopen=this.onSocketOpen,this.socket.onmessage=function(t){"string"==typeof t.data?e.onSocketMessage(t.data):console.warn("[DEBUG] invalid message",t.data)},this.socket.onclose=this.onSocketClose,this.socket.onerror=this.onSocketError},t.prototype.close=function(){this.socket&&this.socket.close()},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>5e6||(this.opened?this.socket.send(t):this.messageBeforeSocketOpen.push(t))},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){var e=this;this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[])},t.prototype.onSocketClose=function(){this.opened=!1,console.log("[DEBUG] connection closed")},t.prototype.onSocketError=function(e){console.error("[DEBUG] connection onerror",e)},t}(WebSocketBaseImpl);function getUserAgent(){return"undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||""}function getAriverVersion(e){var t=e.match(/Ariver\/(\d+\.\d+\.\d+)/);if(t)return t[1]}var WebSocketNativeImpl=function(e){function t(t){var n=e.call(this,t)||this;n.messageBeforeSocketOpen=[],n.useFromRemoteDebugFlag=!1;var o=getAriverVersion(getUserAgent());return o&&compareVersion(o,"1.1.0")>=0&&(n.useFromRemoteDebugFlag=!0),n}return __extends(t,e),t.prototype.open=function(){var e=this;this.socketTask=AFAppX.bridge.connectSocket({fromRemoteDebug:this.useFromRemoteDebugFlag,url:this.url,multiple:!0,fail:function(t){e.onSocketError(t)}}),this.socketTask.onOpen((function(){e.handleSocketOpen()})),this.socketTask.onError((function(t){e.onSocketError(t.data)})),this.socketTask.onClose((function(){e.opened=!1,e.onSocketClose()})),this.socketTask.onMessage((function(t){e.opened||e.handleSocketOpen(),e.onSocketMessage(t.data.data)}))},t.prototype.sendSocketMessage=function(e){var t="string"==typeof e?e:JSON.stringify(e);t.length>5e6||(this.opened?this.socketTask.send({fromRemoteDebug:this.useFromRemoteDebugFlag,data:t,isBuffer:!1}):this.messageBeforeSocketOpen.push(t))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.onSocketMessage=function(e){},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(e){},t.prototype.onSocketClose=function(){},t.prototype.handleSocketOpen=function(){var e=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(t){e.sendSocketMessage(t)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(WebSocketBaseImpl),throttledEmitDataChangedEvent=throttle$1((function(){var e=getInjector().getWorkerSocket();e&&e.send({method:EDataEvent.DataChanged,ext:{origin:EBugmePanelId.Data}})}),300,setTimeout,clearTimeout,{leading:!1});function getFn(e){if(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]&&"function"==typeof workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e])return workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__[e]}function onErrorHook(e){var t=new Error(e.formatted.message);t.stack=e.formatted.stack,setTimeout(console.error.bind(console,t))}function registerLegacyAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={});var e={onSetData:getFn("onSetData"),onSetDataCallback:getFn("onSetDataCallback"),onApiSyncCall:getFn("onApiSyncCall"),onApiSyncCallback:getFn("onApiSyncCallback"),onApiCall:getFn("onApiCall"),onApiCallback:getFn("onApiCallback"),onError:getFn("onError")};workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetData=function(t){try{if(e.onSetData)try{e.onSetData.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}throttledEmitDataChangedEvent(),sendOrQueueApplogMsg$1({method:EAppLogEvent.SetData,params:minimizeSetDataInfo$1(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onSetDataCallback=function(t){try{if(e.onSetDataCallback)try{e.onSetDataCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:EAppLogEvent.SetDataCallback,params:t,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCall=function(t){try{if(e.onApiSyncCall)try{e.onApiSyncCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:EAppLogEvent.ApiSyncCall,params:minimizeApiHookInfo$1(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiSyncCallback=function(t){try{if(e.onApiSyncCallback)try{e.onApiSyncCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:EAppLogEvent.ApiSyncCallback,params:minimizeApiHookInfo$1(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCall=function(t){try{if(e.onApiCall)try{e.onApiCall.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:EAppLogEvent.ApiCall,params:minimizeApiHookInfo$1(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onApiCallback=function(t){try{if(e.onApiCallback)try{e.onApiCallback.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:EAppLogEvent.ApiCallback,params:minimizeApiHookInfo$1(t),ext:{origin:EBugmePanelId.AppLog}})}catch(e){}},workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.onError=function(t){try{if(e.onError)try{e.onError.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,t)}catch(e){}onErrorHook(t)}catch(e){}},registerV1PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2PageLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV1AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e),registerV2AppLifecycleHooks(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}function getLifecycleName$1(e){var t;switch(e){case 0:t="onPageLoad";break;case 2:t="onPageReady";break;case 1:t="onPageShow";break;case 3:t="onPageHide";break;case 4:t="onPageUnload"}return t}function registerV1PageLifecycleHooks(e,t){for(var n=["onPageLoad","onPageShow","onPageHide","onPageReady","onPageUnload","onPageUpdate"],o=0,r=n;o<r.length;o++){t[c=r[o]]=getFn(c)}for(var a=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}var o=e.context?e:__assign({route:e.page.route},e);sendOrQueueApplogMsg$1({method:"MiniAppLog."+n,params:minimizePageLifecycleInfo1(o),ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}function registerV2PageLifecycleHooks(e,t){t.onPageLifecycle=getFn("onPageLifecycle"),e.onPageLifecycle=function(e){try{if(t.onPageLifecycle)try{t.onPageLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}var n=getLifecycleName$1(e.args[0]);if(!n)return;sendOrQueueApplogMsg$1({method:"MiniAppLog."+n,params:e,ext:{origin:EBugmePanelId.AppLog}}),"onPageShow"===n&&throttledEmitDataChangedEvent()}catch(e){}}}function registerV1AppLifecycleHooks(e,t){for(var n=["onAppLaunch","onAppShow","onAppHide","onAppError","onAppUnhandledRejection"],o=0,r=n;o<r.length;o++){t[c=r[o]]=getFn(c)}for(var a=function(n){e[n]=function(e){try{if(t[n])try{t[n].call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:"MiniAppLog."+n,params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}},i=0,s=n;i<s.length;i++){var c;a(c=s[i])}}function registerV2AppLifecycleHooks(e,t){t.onAppLifecycle=getFn("onAppLifecycle"),e.onAppLifecycle=function(e){try{if(t.onAppLifecycle)try{t.onAppLifecycle.call(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__,e)}catch(e){debug(e)}sendOrQueueApplogMsg$1({method:"MiniAppLog."+e.args[0],params:e,ext:{origin:EBugmePanelId.AppLog}})}catch(e){}}}function sendOrQueueApplogMsg$1(e){try{var t=getInjector().getWorkerSocket(),n=getInjector().getMessageQueue();t&&n.isApplogEnabled?t.send(circularJSONStringify(e)):n.push(circularJSONStringify(e))}catch(e){}}function minimizeApiHookInfo$1(e){if(e.context){var t=e.context;return __assign(__assign({},e),{context:pick(t,["apiName","extraInfo","isMiniExtension","option","startTime","taskId","__reqId"])})}return e}function minimizeSetDataInfo$1(e){return e.context?e:{pagePath:e.isPage?e.page.route:e.component.$page.route,isPage:e.isPage,option:e.options,componentIs:e.component?e.component.is:void 0}}function minimizePageLifecycleInfo1(e){return __assign(__assign({},e),{page:pick(e.page,["$id","$page","$viewId","data"])})}function pick(e,t){var n={};return t.forEach((function(t){n[t]=e[t]})),n}function registerAppxHook(){null==workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__&&(workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__={}),registerLegacyAppxHook();var e=getHookFn("setup");workerGlobal.__APPX_DEVTOOLS_GLOBAL_HOOK__.setup=function(t,n){if(e&&"function"==typeof e)try{e(t,n)}catch(e){}getInjector().setRuntime(t),setup(t,n,(function(e){if("string"==typeof e.method&&e.method.includes("MiniAppLog"))sendOrQueueApplogMsg(e);else{var t=getInjector().getWorkerSocket();t&&t.send(e)}}))}}function getObjectOwnPropertyDescriptors(e){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(e):Object.getOwnPropertyNames(e).reduce((function(t,n){return t[n]=Object.getOwnPropertyDescriptor(e,n),t}),Object.create(null))}function isError(e){return"[object Error]"===Object.prototype.toString.call(e)||e instanceof Error}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)||e instanceof RegExp}function isPromise(e){return"[object Promise]"===Object.prototype.toString.call(e)||e instanceof Promise}var ObjectMapper=function(){function e(e){this.objectStore=e}return e.prototype.mapFrom=function(e,t){var n=this;return Array.from(e).map((function(e){return n.mapFromOne(e,t)}))},e.prototype.mapFromOne=function(e,t){switch(typeof e){case"string":return this.mapString(e);case"number":return this.mapNumber(e);case"object":return Array.isArray(e)?this.mapArray(e,"table"===t):null===e?this.mapNull():this.mapObject(e,"table"===t);case"function":return this.mapFunction(e);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(e);default:return{type:typeof e,value:e}}},e.prototype.mapString=function(e){return{type:"string",value:e}},e.prototype.mapNumber=function(e){return{type:"number",value:e,description:String(e)}},e.prototype.mapBoolean=function(e){return{type:"boolean",value:e}},e.prototype.mapFunction=function(e){var t=this.objectStore.save(e);return{type:"function",className:"Function",description:e.toString(),objectId:t}},e.prototype.mapUndef=function(){return{type:"undefined"}},e.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},e.prototype.mapObject=function(e,t){var n,o,r=this,a=getObjectOwnPropertyDescriptors(e),i=Object.keys(a),s=this.objectStore.save(e),c=e.constructor?e.constructor.name:"Object",p=i.length>5&&!t,u={type:"object",className:c,description:c,objectId:s,preview:{type:"object",description:c,overflow:p,properties:(p?i.slice(0,5):i).map((function(e){return r.getPropertyPreview4ObjectProperty(e,a[e],t)})).filter(Boolean)}};return isError(e)?(n="error",-1===(o=e.stack||"").indexOf(e.name)&&(o=e.toString()+"\n"+o)):isDate(e)?(n="date",o=e.toString()):isRegExp(e)?(n="regexp",o=e.toString()):isPromise(e)&&(n="promise",o="Promise"),n&&(u.subtype=n,u.preview&&(u.preview.subtype=n)),o&&(u.description=o,u.preview&&(u.preview.description=o)),u},e.prototype.mapArray=function(e,t){var n=this,o=e.length>100&&!t,r="Array("+e.length+")";return{type:"object",subtype:"array",className:"Array",description:r,objectId:this.objectStore.save(e),preview:{type:"object",subtype:"array",description:r,overflow:o,properties:(o?e.slice(0,100):e).map((function(e,o){return n.getPropertyPreview4ArrayProperty(o,e,t)}))}}},e.prototype.getPropertyPreview4ArrayProperty=function(e,t,n){return this.getPropertyPreview4AnyValue(String(e),t,n)},e.prototype.getPropertyPreview4ObjectProperty=function(e,t,n){return t.get?{name:e,type:"accessor"}:t.set?void 0:this.getPropertyPreview4AnyValue(e,t.value,n)},e.prototype.getPropertyPreview4AnyValue=function(e,t,n){switch(void 0===n&&(n=!1),typeof t){case"object":if(Array.isArray(t)){var o={name:e,type:"object",subtype:"array",value:"Array("+t.length+")"};return n&&(o.valuePreview=this.getValuePreview4TableArray(t)),o}if(null===t)return{name:e,type:"object",subtype:"null",value:"null"};o={name:e,type:"object",value:t.constructor?t.constructor.name:"Object"};return n&&(o.valuePreview=this.getValuePreview4TableObject(t)),o;case"function":return{type:"function",value:"",name:e};default:return{name:e,type:typeof t,value:String(t)}}},e.prototype.getValuePreview4TableArray=function(e){var t=this;return{type:"object",subtype:"array",description:"Array("+e.length+")",overflow:!1,properties:e.map((function(e,n){return t.getPropertyPreview4AnyValue(String(n),e)}))}},e.prototype.getValuePreview4TableObject=function(e){var t=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(e).map((function(n){return t.getPropertyPreview4AnyValue(n,e[n])}))}},e}(),ExtractStackLine=function(){function e(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return e.prototype.testType1=function(e){return this.e1.test(e)},e.prototype.testType2=function(e){return this.e2.test(e)},e.prototype.extractType1=function(e){var t=e.match(this.e1);return null==t?null:{functionName:t[1],url:t[2].slice(1),lineNumber:Number(t[3]),columnNumber:Number(t[4])}},e.prototype.extractType2=function(e){var t=e.match(this.e2);return null==t?null:{functionName:"",url:t[1].slice(1),lineNumber:Number(t[2]),columnNumber:Number(t[3])}},e}(),CallFramesMapper=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.mapFrom=function(e){var t=this;return e.split("\n").slice(2).map((function(e,n){return t.testType1(e)?t.extractType1(e):t.testType2(e)?t.extractType2(e):void 0})).filter((function(e){return null!=e}))},t}(ExtractStackLine),executionContextId=1,injectedScriptId=1,ObjectStore=function(){function e(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return e.prototype.save=function(e){if(this.object2Id.has(e))return this.object2Id.get(e);var t=this.getNextObjectId();return this.id2Object.set(t,e),this.object2Id.set(e,t),t},e.prototype.query=function(e){return this.id2Object.get(e)},e.prototype.clear=function(e){var t=this.id2Object.get(e);t&&(this.id2Object.delete(e),this.object2Id.delete(t))},e.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},e.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":'+injectedScriptId+',"id":'+this.id+"}"},e}(),GetPropertiesHandler=function(){function e(e,t){this.objectStore=e,this.objectMapper=t}return e.prototype.handle=function(e){var t=this.objectStore.query(e.objectId);return t?{result:this.mapObject(t,Boolean(e.ownProperties),Boolean(e.accessorPropertiesOnly))}:{result:[]}},e.prototype.mapObject=function(e,t,n){var o=this;if(t){var r=getObjectOwnPropertyDescriptors(e),a=Object.keys(r).filter((function(e){return!(n&&!r[e].get&&!r[e].set)})).map((function(e){return o.mapResultOne(e,r[e],!0)}));return e.__proto__&&a.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:e.__proto__},!0)),a}for(var i=[],s={},c=e,p=!1,u=!0,l=function(){var e=getObjectOwnPropertyDescriptors(c);if(Object.keys(e).forEach((function(t){if(!s[t]){s[t]=!0;var r=e[t];(!n||r.get||r.set)&&i.push(o.mapResultOne(t,r,u))}})),!p){var t=Object.getOwnPropertyDescriptor(c,"__proto__");t&&(p=!0,i.push(g.mapResultOne("__proto__",t,u)))}c=c.__proto__,u=!1},g=this;c;)l();return i},e.prototype.mapResultOne=function(e,t,n){var o={writable:t.writable,configurable:Boolean(t.configurable),enumerable:Boolean(t.enumerable),isOwn:n,name:String(e)};return"value"in t&&(o.value=this.objectMapper.mapFromOne(t.value)),t.get&&(o.get=this.objectMapper.mapFromOne(t.get)),t.set&&(o.set=this.objectMapper.mapFromOne(t.set)),o},e}(),RemoteObjectParser=function(){function e(){this.objectStore=new ObjectStore,this.objectMapper=new ObjectMapper(this.objectStore),this.callFramesMapper=new CallFramesMapper,this.getPropertiesHandler=new GetPropertiesHandler(this.objectStore,this.objectMapper)}return e.prototype.parseObject=function(e,t){return this.objectMapper.mapFromOne(e,t)},e.prototype.getProperties=function(e){return this.getPropertiesHandler.handle(e)},e.prototype.getObjectById=function(e){return this.objectStore.query(e)},e.prototype.consoleAPICalled=function(e,t,n){var o=e;return"warn"===e&&(o="warning"),{method:"Runtime.consoleAPICalled",params:{type:o,args:this.objectMapper.mapFrom(n,e),executionContextId:executionContextId,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(t)}}}},e}(),globalConsoleOverrider;function initConsoleOverrider(){"boolean"==typeof __BUGME_CONSOLE_ENABLE__&&__BUGME_CONSOLE_ENABLE__&&(globalConsoleOverrider=new ConsoleOverrider).overrideConsole()}function getConsoleOverrider(){return globalConsoleOverrider}var ConsoleOverrider=function(){function e(){this.executionContextId=1,this.messageBeforeAgentInit=[],this.webSocketCheckingLoop=!1,this.parser=new RemoteObjectParser,this.createExecutionContext()}return e.prototype.createExecutionContext=function(){this.sendMesasge({method:RuntimeProtocol.executionContextsCleared,params:{}}),this.sendMesasge({method:RuntimeProtocol.executionContextCreated,params:{context:{id:this.executionContextId,origin:"app://",name:"app"}}})},e.prototype.overrideConsole=function(){var e=this;Object.defineProperties(console,["debug","log","info","warn","error","table"].reduce((function(t,n){var o=console[n].bind(console);return t[n]={value:function(){var t=arguments;if(t.length){try{var r=/^(\[framework\]|dispatchEvent|onMessage push|unsupported protocol)/;if("string"==typeof t[0]&&r.test(t[0]))return o.apply(null,t);var a=new Error;a.stack&&e.sendMesasge(e.parser.consoleAPICalled(n,a.stack,t))}catch(e){}return o.apply(null,t)}}},t}),{}))},e.prototype.sendMesasge=function(e){var t=getInjector().getWorkerSocket();t?(this.flushPendingMessasges(),t.sendAfterReceivingMessage(e)):(this.messageBeforeAgentInit.push(e),this.checkWebSocketReady())},e.prototype.flushPendingMessasges=function(){if(this.messageBeforeAgentInit.length){var e=getInjector().getWorkerSocket();e&&(this.messageBeforeAgentInit.forEach((function(t){e.sendAfterReceivingMessage(t)})),this.messageBeforeAgentInit=[])}},e.prototype.checkWebSocketReady=function(){var e=this;if(!this.webSocketCheckingLoop){this.webSocketCheckingLoop=!0;var t=setInterval((function(){getInjector().getWorkerSocket()&&(clearInterval(t),e.flushPendingMessasges())}),1e3)}},e}(),requirePluginName="requirePlugin",EPanelStatus;function hookRequirePlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal,requirePluginName);t&&!t.configurable||(t&&(e=workerGlobal.requirePlugin),Object.defineProperty(workerGlobal,requirePluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var o=Date.now();sendOrQueueApplogMsg({method:EAppLogEvent.ApiSyncCall,params:{aTime:o,context:{apiName:requirePluginName,option:{arguments:t}}},ext:{origin:EBugmePanelId.AppLog}});try{var r=e.apply(void 0,t);return sendOrQueueApplogMsg({method:EAppLogEvent.ApiSyncCallback,params:{args:r?void 0:[{error:1,errorMessage:"未找到对应插件"}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),r}catch(e){throw sendOrQueueApplogMsg({method:EAppLogEvent.ApiSyncCallback,params:{args:[{error:2,errorMessage:e.message}],bTime:Date.now()===o?o+.01:Date.now(),context:{apiName:requirePluginName}},ext:{origin:EBugmePanelId.AppLog}}),e}}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function updateDebugPanel(e){if(getInjector().getAgentContext().silentMode)return!1;var t="";switch(e){case EPanelStatus.Connecting:t="准备中";break;case EPanelStatus.Connected:t="已连接";break;case EPanelStatus.Disconnected:t="已断开"}AFAppX.bridge.call("showRemoteDebugPanel",{status:e,text:"真机调试"+t,buttonTitle:"退出"})}function enable(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getResponseBody(e){var t=e.params.requestId,n=getInjector(),o=n.getNetworkRecorder(),r=o.getRequest(t);r?n.getWorkerSocket().send({id:e.id,result:{base64Encoded:r.isBase64Body,body:r.responseBody}}):n.getWorkerSocket().send({id:e.id,result:{}}),o.removeRequest(t)}!function(e){e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected"}(EPanelStatus||(EPanelStatus={}));var network=Object.freeze({__proto__:null,enable:enable,getResponseBody:getResponseBody});function enable$1(e){getInjector().getWorkerSocket().send({id:e.id,result:{}});var t=getConsoleOverrider();t&&t.createExecutionContext()}function getProperties(e){var t=getConsoleOverrider();t&&getInjector().getWorkerSocket().send({id:e.id,result:t.parser.getProperties(e.params)})}function compileScript(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var evalFunc="function"==typeof __eval?__eval:"function"==typeof eval?eval:function(){};function evaluate(payload){var consoleOverrider=getConsoleOverrider();if(consoleOverrider){var parser=consoleOverrider.parser;"function"!=typeof eval&&(workerGlobal.eval=evalFunc);try{var returnValue=function(){return eval(payload.params.expression)}();getInjector().getWorkerSocket().send({id:payload.id,result:{result:parser.parseObject(returnValue)}})}catch(e){e.stack=e.name+": "+e.message,getInjector().getWorkerSocket().send({id:payload.id,result:{exceptionDetails:{columnNumber:20,exception:parser.parseObject(e),exceptionId:1,lineNumber:0,text:"Uncaught"},result:parser.parseObject(e)}})}}}var runtime=Object.freeze({__proto__:null,enable:enable$1,getProperties:getProperties,compileScript:compileScript,evaluate:evaluate});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var stringify_1=createCommonjsModule((function(e,t){function n(e,t){var n=[],o=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]"}),function(r,a){if(n.length>0){var i=n.indexOf(this);~i?n.splice(i+1):n.push(this),~i?o.splice(i,1/0,r):o.push(r),~n.indexOf(a)&&(a=t.call(this,r,a))}else n.push(a);return null==e?a:e.call(this,r,a)}}(e.exports=function(e,t,o,r){return JSON.stringify(e,n(t,r),o)}).getSerialize=n})),stringify_2=stringify_1.getSerialize,sharedGetCurrentPages;function callGetCurrentPages(){return sharedGetCurrentPages?sharedGetCurrentPages():workerGlobal.getCurrentPages?(sharedGetCurrentPages=workerGlobal.getCurrentPages)():workerGlobal.AFAppX&&AFAppX.getCurrentPages?(sharedGetCurrentPages=AFAppX.getCurrentPages)():[]}function getPagesData(e){var t;var n=getInjector().getRuntime();t=null==n?callGetCurrentPages().filter(Boolean).map((function(e){return{viewId:e.$viewId,data:stringify_1(e.data),route:e.route}})):n.getNav().currentStack.map((function(e){var t=e.getPageLogicInstance().publicInstance;return{viewId:t.$viewId,data:stringify_1(t.data),route:t.route}})),getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{data:t}})}function setPageData(e){var t,n=e.params,o=void 0===n?{}:n,r=o.viewId,a=o.data;var i=getInjector().getRuntime();(t=null==i?callGetCurrentPages().filter((function(e){return e&&""+e.$viewId===r}))[0]:i.getNav().currentStack.map((function(e){return e.getPageLogicInstance().publicInstance})).filter((function(e){return e&&""+e.$viewId===r}))[0])&&a&&t.setData(a)}var data=Object.freeze({__proto__:null,getPagesData:getPagesData,setPageData:setPageData});function getStorageInfo(e){var t=AFAppX.bridge.getStorageInfoSync(),n=t.keys.map((function(e){var t=AFAppX.bridge.getStorageSync({key:e}).data;return{key:e,value:t,type:typeof t}}));getInjector().getWorkerSocket().send({id:e.id,ext:e.ext,result:{currentSize:t.currentSize,limitSize:t.limitSize,data:n}})}function clearStorage(e){AFAppX.bridge.clearStorageSync()}function removeStorage(e){var t=e.params,n=void 0===t?{}:t;n.key&&AFAppX.bridge.removeStorageSync({key:n.key})}function setStorage(e){var t=e.params,n=void 0===t?{}:t;n.key&&AFAppX.bridge.setStorageSync({key:n.key,data:n.value})}var storage=Object.freeze({__proto__:null,getStorageInfo:getStorageInfo,clearStorage:clearStorage,removeStorage:removeStorage,setStorage:setStorage});function enable$2(){var e=getInjector().getMessageQueue();e.setApplogEnabled(!0),e.sendQueuedMessages()}var applog=Object.freeze({__proto__:null,enable:enable$2});function ping(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}function getSystemInfo(e){var t=AFAppX.bridge.getSystemInfoSync(),n={userAgent:getInjector().getAgentContext().userAgent,sdkVersion:AFAppX.bridge.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system};getInjector().getWorkerSocket().send({id:e.id,result:n})}function getStartupParams$1(e){var t=getStartupParams();getInjector().getWorkerSocket().send({id:e.id,result:t})}var index=Object.freeze({__proto__:null,Data:data,Storage:storage,Applog:applog,ping:ping,getSystemInfo:getSystemInfo,getStartupParams:getStartupParams$1});function getResourceTree(e){getInjector().getWorkerSocket().send({id:e.id,result:{}})}var page=Object.freeze({__proto__:null,getResourceTree:getResourceTree}),protoHandler=Object.freeze({__proto__:null,Network:network,Runtime:runtime,Tiny:index,Page:page}),isWebPlatform=!1;if("undefined"!=typeof WebSocket&&WebSocket.OPEN){isWebPlatform=!0;try{delete workerGlobal.WebSocket}catch(e){}}var BaseImpl=isWebPlatform?WebSocketBrowserImpl:WebSocketNativeImpl,WorkerSocket=function(e){function t(t){var n=e.call(this,t)||this;return n.isMessageReceived=!1,n.isSocketOpenedOnce=!1,n.messageBeforeReceived=[],updateDebugPanel(EPanelStatus.Connecting),n}return __extends(t,e),t.prototype.send=function(e){return this.sendSocketMessage(e)},t.prototype.sendAfterReceivingMessage=function(e){this.isMessageReceived?this.send(e):this.messageBeforeReceived.push("string"==typeof e?e:JSON.stringify(e))},t.prototype.exitDebug=function(){updateDebugPanel(EPanelStatus.Disconnected),this.close(),!isWebPlatform&&getInjector().getAgentContext().isIOS&&[1,2].forEach((function(e){AFAppX.bridge.call("closeSocket",{socketTaskId:e})}))},t.prototype.onSocketOpen=function(){e.prototype.onSocketOpen.call(this),this.isSocketOpenedOnce=!0,this.send({method:EAppLog.Enable,params:{},ext:{origin:EBugmePanelId.AppLog}}),throttledEmitDataChangedEvent()},t.prototype.onSocketClose=function(){e.prototype.onSocketClose.call(this)},t.prototype.onSocketError=function(e){if(!this.isSocketOpenedOnce&&!getInjector().getAgentContext().silentMode){updateDebugPanel(EPanelStatus.Disconnected);var t=e?e.errorMessage||e.message:"closed";AFAppX.bridge.showToast({content:"本次真机调试已结束,请重新生成调试版本 ("+t+")",duration:2e3,success:function(){}})}},t.prototype.onSocketMessage=function(e){var t,n=this;this.isMessageReceived||(this.isMessageReceived=!0,this.messageBeforeReceived.forEach((function(e){n.send(e)})),this.messageBeforeReceived=[]);try{t=JSON.parse(e)}catch(t){return void("CLIENT:JOIN"===e?updateDebugPanel(EPanelStatus.Connected):"CLIENT:LEAVE"===e&&this.exitDebug())}var o=getProtocolHandler(t.method);o?o(t):this.send({id:t.id,error:{code:-32e3,message:"unsupported"}})},t}(BaseImpl);function getProtocolHandler(e){if(e){for(var t=e.split("."),n=protoHandler,o=0,r=t;o<r.length;o++){if(!(n=n[r[o]]))break}return n}}var ignoreDomain=/\/(tyro\/agent|bugme\/channel\/paused)$/,DebugEventListener=function(){function e(){this.isIOS=getInjector().getAgentContext().isIOS,this.isLyra=getInjector().getAgentContext().isLyra}return e.prototype.setup=function(){this.isLyra||this.isIOS?this.listenDebugEvent4IOS():this.listenDebugEvent()},e.prototype.onNetworkRequest=function(e){if(!ignoreDomain.test(e.url)){var t=createProtocol4RequestWillBeSent(e),n=getInjector();n.getWorkerSocket().send(t),n.getNetworkRecorder().setRequest(e.requestId,{method:t.params.request.method,requestHeaders:t.params.request.headers,url:e.url})}},e.prototype.onNetworkResponse=function(e){if(!ignoreDomain.test(e.url)){var t=getInjector(),n=t.getNetworkRecorder().getRequest(e.requestId)||{};t.getWorkerSocket().send(createProtocol4ResponseReceived(e,n)),t.getWorkerSocket().send(createProtocol4LoadingFinished(e)),t.getNetworkRecorder().setRequest(e.requestId,{responseBody:e.body,isBase64Body:!1})}},e.prototype.onNetworkError=function(e){ignoreDomain.test(e.url)||getInjector().getWorkerSocket().send(createProtocol4LoadingFailed(e))},e.prototype.onStorageChanged=function(e){var t={};Object.keys(e.data).forEach((function(n){try{t[n]=JSON.parse(e.data[n]).APDataStorage}catch(e){}})),getInjector().getWorkerSocket().send({method:EStorageEvent.StorageChanged,params:{data:t},ext:{origin:EBugmePanelId.Storage}})},e.prototype.listenDebugEvent4IOS=function(){var e=this,t=AFAppX.bridge;t.on(EWorkerAppEvent.DebugNetworkRequest,(function(t){e.onNetworkRequest(t.data)})),t.on(EWorkerAppEvent.DebugNetworkResponse,(function(t){e.onNetworkResponse(t.data)})),t.on(EWorkerAppEvent.DebugNetworkError,(function(t){e.onNetworkError(t.data)})),t.on(EWorkerAppEvent.DebugStorageChanged,(function(t){e.onStorageChanged(t.data)}))},e.prototype.listenDebugEvent=function(){var e=this;AFAppX.bridge.on(EWorkerAppEvent.DebugConsole,(function(t){var n,o=t.data,r=o.type,a=o.content;try{n=JSON.parse(a)}catch(e){return}switch(r){case EWorkerAppEvent.DebugNetworkRequest:e.onNetworkRequest(n);break;case EWorkerAppEvent.DebugNetworkResponse:e.onNetworkResponse(n);break;case EWorkerAppEvent.DebugNetworkError:e.onNetworkError(n);break;case EWorkerAppEvent.DebugStorageChanged:e.onStorageChanged(n)}}))},e}(),WorkerListener=function(){function e(){this.inited=!1}return e.prototype.setup=function(){if(this.inited)return!1;var e=AFAppX.bridge;if(/^1\./.test(e.SDKVersion)){var t=debounce(this.onPageResumeOrPause.bind(this),300,setTimeout,clearTimeout);e.on(EWorkerAppEvent.PageResume,t),e.on(EWorkerAppEvent.PagePause,t)}e.on(EWorkerAppEvent.DebugPanelClick,this.onDebugPanelClick),this.debugEventListener=new DebugEventListener,this.debugEventListener.setup(),this.inited=!0},e.prototype.onPageResumeOrPause=function(){throttledEmitDataChangedEvent()},e.prototype.onDebugPanelClick=function(){var e=getInjector().getWorkerSocket();e&&e.exitDebug()},e}(),globalListener;function getGlobalWorkerEventListener(){return globalListener||(globalListener=new WorkerListener),globalListener}function getChannelUrl(){if("string"==typeof __BUGME_EXTERNAL_WORKER_URL__&&__BUGME_EXTERNAL_WORKER_URL__)return __BUGME_EXTERNAL_WORKER_URL__;var e=getInjector().getAgentContext(),t=e.channelId,n=e.channelConfigKey;return"wss://"+(channelDomainConfig[n]||channelDomainConfig[0]).hpmweb+"/bugme/client_w/"+t}var DebugAgent=function(){function e(){}return e.prototype.init=function(){getGlobalWorkerEventListener().setup(),this.makeConnection(),this.printSDKVersion()},e.prototype.makeConnection=function(){var e=getInjector(),t=getChannelUrl(),n=new WorkerSocket(t);e.setWorkerSocket(n),e.getAgentContext().isIOS?n.open():setTimeout((function(){n.open()}),1200)},e.prototype.printSDKVersion=function(){var e=AFAppX.bridge.SDKVersion;/^2\./.test(e)&&setTimeout(console.log.bind(console,"SDKVersion: "+e))},e}(),globalAgent;function getAgent(){return globalAgent||(globalAgent=new DebugAgent),globalAgent}var LOG_STYLE="color: #3D80F3; font-weight: bold;";function printStaticPlugins(){var e=getStartupParams().__appxPluginsExtra||{},t=Object.keys(e).map((function(t){return{plugin_id:t,deploy_version:e[t].version}}));t.length&&(console.log("%c--- Static Plugin List ---",LOG_STYLE),console.table(t))}var loadPluginName="loadPlugin";function hookLoadPlugin(){var e,t=Object.getOwnPropertyDescriptor(workerGlobal.my,loadPluginName);t&&!t.configurable||(t&&(e=workerGlobal.my.loadPlugin),Object.defineProperty(workerGlobal.my,loadPluginName,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("object"==typeof t[0]){var o=t[0].success;t[0].success=function(){printDynamicPlugin(t[0].plugin),void 0!==o&&o.apply(this,arguments)}}return e.apply(void 0,t)}},set:function(t){e=t},enumerable:!0,configurable:!0}))}function printDynamicPlugin(e){var t=e.split("@")[0],n=getInjector().getRuntime().getMiniExtensionManager().extensionVersions;setTimeout((function(){console.log("%c--- Loaded Dynamic Plugin ---",LOG_STYLE),console.table([{plugin_id:t,deploy_version:n.get(t)}])}),100)}function setupPluginInfo(){console.log("%cTip: you can type `printPlugins()` anytime to print loaded plugins info","color: #3D80F3;"),hookLoadPlugin(),printStaticPlugins(),workerGlobal.printPlugins=printPlugins}function isUsePlugin(){var e=getInjector().getRuntime();if(void 0===e)return!1;var t=e.getMeta().meta;return"object"==typeof t.plugins&&0!==Object.keys(t.plugins).length||t.useDynamicPlugins}function printPlugins(){var e;printStaticPlugins();var t=(null===(e=getStartupParams())||void 0===e?void 0:e.__appxPluginsExtra)||{},n=getInjector().getRuntime().getMiniExtensionManager().extensionVersions,o=[];n.forEach((function(e,r){void 0===t[r]&&o.push({plugin_id:r,deploy_version:n.get(r)})})),console.log("%c--- Loaded Dynamic Plugin List ---",LOG_STYLE),console.table(o)}function main(){try{registerAppxHook(),initConsoleOverrider(),hookRequirePlugin()}catch(e){error("sync task error",e)}runAfterAppx((function(){runAfterAppXBridgeReady((function(){try{getAgent().init(),isUsePlugin()&&setupPluginInfo()}catch(e){error("init agent error",e)}}))}))}var inPluginWorker="object"==typeof AFAppX&&AFAppX.Plugin;if(!workerGlobal.__BUGME_ON__&&!inPluginWorker){workerGlobal.__BUGME_ON__=!0;try{main()}catch(e){error("init error",e)}}}();
2
+
3
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).boatman={})}(this,(function(t){var e,i,n,r,s,o,a,u,c;!function(t){t.enable="Debugger.enable",t.disable="Debugger.disable",t.evaluateOnCallFrame="Debugger.evaluateOnCallFrame",t.getPossibleBreakpoints="Debugger.getPossibleBreakpoints",t.pause="Debugger.pause",t.removeBreakpoint="Debugger.removeBreakpoint",t.resume="Debugger.resume",t.setBreakpointByUrl="Debugger.setBreakpointByUrl",t.setBreakpointsActive="Debugger.setBreakpointsActive",t.stepInto="Debugger.stepInto",t.stepOver="Debugger.stepOver",t.stepOut="Debugger.stepOut",t.getScriptSource="Debugger.getScriptSource",t.setPauseOnExceptions="Debugger.setPauseOnExceptions",t.setSkipAllPauses="Debugger.setSkipAllPauses"}(e||(e={})),function(t){t.paused="Debugger.paused",t.resumed="Debugger.resumed",t.scriptParsed="Debugger.scriptParsed"}(i||(i={})),function(t){t.enable="Runtime.enable",t.disable="Runtime.disable",t.evaluate="Runtime.evaluate",t.compileScript="Runtime.compileScript",t.getProperties="Runtime.getProperties",t.callFunctionOn="Runtime.callFunctionOn",t.releaseObjectGroup="Runtime.releaseObjectGroup",t.globalLexicalScopeNames="Runtime.globalLexicalScopeNames"}(n||(n={})),function(t){t.executionContextCreated="Runtime.executionContextCreated",t.consoleAPICalled="Runtime.consoleAPICalled",t.exceptionThrown="Runtime.exceptionThrown"}(r||(r={})),function(t){t.enable="Page.enable",t.getResourceTree="Page.getResourceTree"}(s||(s={})),function(t){t.setAutoAttach="Target.setAutoAttach"}(o||(o={})),function(t){t.targetCreated="Target.targetCreated",t.targetDestroyed="Target.targetDestroyed",t.targetInfoChanged="Target.targetInfoChanged",t.attachedToTarget="Target.attachedToTarget"}(a||(a={})),function(t){t[t.NormalError=-32e3]="NormalError"}(u||(u={})),function(t){t.Other="other",t.Exception="exception"}(c||(c={}));var h=Object.defineProperty.bind(Object),l=Object.defineProperties.bind(Object),p=Object.getOwnPropertyDescriptor.bind(Object),d=Object.freeze.bind(Object),f=Object.keys.bind(Object),m=Object.prototype.hasOwnProperty;function D(t,e){return m.call(t,e)}Object.assign.bind(Object);var y=Object.getOwnPropertyNames.bind(Object),x=Object.create.bind(Object);Object.setPrototypeOf&&Object.setPrototypeOf.bind(Object);Object.getPrototypeOf&&Object.getPrototypeOf.bind(Object);var v="object"==typeof console,g=(v&&console.log&&console.log.bind(console),v&&console.warn?console.warn.bind(console):function(){}),C=v&&console.error?console.error.bind(console):function(){},b=p(D,"name").configurable;function E(t,e,i){h(t,e,{value:i,writable:!0,enumerable:!1,configurable:!0})}function F(t,e){return t[e]}var A=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(76===t.type&&0===t.body.length){for(var i=[],n=this.leading.length-1;n>=0;--n){var r=this.leading[n];e.end.offset>=r.start&&(i.unshift(r.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}i.length&&(t.innerComments=i)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var n=this.trailing[i];n.start>=t.end.offset&&e.unshift(n.comment)}return this.trailing.length=0,e}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=t.end.offset&&(e=r.node.trailingComments,delete r.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,i=[];this.stack.length>0;){if(!((s=this.stack[this.stack.length-1])&&s.start>=t.start.offset))break;e=s.node,this.stack.pop()}if(e){for(var n=(e.leadingComments?e.leadingComments.length:0)-1;n>=0;--n){var r=e.leadingComments[n];r.range[1]<=t.start.offset&&(i.unshift(r),e.leadingComments.splice(n,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,i}for(n=this.leading.length-1;n>=0;--n){var s;(s=this.leading[n]).start<=t.start.offset&&(i.unshift(s.comment),this.leading.splice(n,1))}return i},t.prototype.visitNode=function(t,e){if(!(67===t.type&&t.body.length>0)){this.insertInnerComments(t,e);var i=this.findTrailingComments(e),n=this.findLeadingComments(e);n.length>0&&(t.leadingComments=n),i.length>0&&(t.trailingComments=i),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var i="L"===t.type[0]?"Line":"Block",n={type:i,value:t.value};if(t.range&&(n.range=t.range),t.loc&&(n.loc=t.loc),this.comments.push(n),this.attach){var r={comment:{type:i,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(r.comment.loc=t.loc),t.type=i,this.leading.push(r),this.trailing.push(r)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();function w(t,e){if(!t)throw new Error("ASSERT: "+e)}var k=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.createError=function(t,e,i,n){var r="Line "+e+": "+n,s=this.constructError(r,i);return s.index=t,s.lineNumber=e,s.description=n,s},t.prototype.throwError=function(t,e,i,n){throw this.createError(t,e,i,n)},t.prototype.tolerateError=function(t,e,i,n){var r=this.createError(t,e,i,n);if(!this.tolerant)throw r;this.recordError(r)},t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.constructError=function(t,e){var i=new Error(t);return i.stack=i.toString(),i},t}(),S="Unexpected token",B="Getter must not have any formal parameters",T="Setter must have exactly one formal parameter",N="Setter function argument must not be a rest parameter",P="Class constructor may not be an async method",I="Class constructor may not be an accessor",O="Missing initializer in %0 declaration",j="Unexpected token =",M="Unexpected token =",U="Duplicate binding %0",z="A class may only have one constructor",R="Duplicate __proto__ fields are not allowed in object literals",_="%0 loop variable declaration may not have an initializer",L="Generator declarations are not allowed in legacy contexts",K="Illegal break statement",G="Illegal continue statement",H="Unexpected token",W="Unexpected token",q="Illegal 'use strict' directive in function with non-simple parameter list",V="Illegal return statement",Y="Keyword must not contain escaped characters",J="Invalid hexadecimal escape sequence",$="Invalid left-hand side in assignment",X="Invalid left-hand side in for-in",Q="Invalid left-hand side in for-loop",Z="Unexpected token",tt="Invalid regular expression",et="Invalid Unicode escape sequence",it="let is disallowed as a lexically bound name",nt="Unexpected token",rt="More than one default clause in switch statement",st="Illegal newline after throw",ot="Unexpected token",at="Missing catch or finally after try",ut="Rest parameter must be last formal parameter",ct="Unexpected token",ht="%0 '%1' has already been declared",lt="Classes may not have static property named prototype",pt="Catch variable may not be eval or arguments in strict mode",dt="Delete of an unqualified identifier in strict mode.",ft="In strict mode code, functions can only be declared at top level or inside a block",mt="Function name may not be eval or arguments in strict mode",Dt="Assignment to eval or arguments is not allowed in strict mode",yt="Postfix increment/decrement may not have eval or arguments operand in strict mode",xt="Prefix increment/decrement may not have eval or arguments operand in strict mode",vt="Strict mode code may not include a with statement",gt="Octal literals are not allowed in strict mode.",Ct="Strict mode function may not have duplicate parameter names",bt="Parameter name eval or arguments is not allowed in strict mode",Et="Use of future reserved word in strict mode",Ft="Variable name may not be eval or arguments in strict mode",At="Octal literals are not allowed in template strings.",wt="\\8 and \\9 are not allowed in template strings.",kt="Unexpected end of input",St="Unexpected identifier",Bt="Unexpected number",Tt="Unexpected reserved word",Nt="Unexpected string",Pt="Unexpected quasi %0",It="Unexpected token %0",Ot="Unexpected token ILLEGAL",jt="Undefined label '%0'",Mt="Invalid regular expression: missing /",Ut=function(t){this.type=30,this.elements=t},zt=function(t){this.type=60,this.elements=t},Rt=function(t,e,i){this.type=31,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=i,this.async=!1},_t={"=":1,"+=":2,"-=":3,"*=":4,"/=":5,"%=":6,"**=":7,"<<=":8,">>=":9,">>>=":10,"|=":11,"^=":12,"&=":13},Lt=function(t,e,i){this.type=32,this.operator=_t[t],this.left=e,this.right=i},Kt=function(t,e){this.type=61,this.left=t,this.right=e},Gt=function(t,e,i){this.type=31,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=i,this.async=!0},Ht=function(t,e,i){this.type=63,this.id=t,this.params=e,this.body=i,this.generator=!1,this.expression=!1,this.async=!0},Wt=function(t,e,i){this.type=36,this.id=t,this.params=e,this.body=i,this.generator=!1,this.expression=!1,this.async=!0},qt=function(t){this.type=93,this.argument=t},Vt={"==":1,"!=":2,"===":3,"!==":4,"<":5,"<=":6,">":7,">=":8,"<<":9,">>":10,">>>":11,"+":12,"-":13,"*":14,"**":15,"/":16,"%":17,"|":18,"^":19,"&":20,in:21,instanceof:22,"||":1,"&&":2},Yt=function(t,e,i){var n="||"===t||"&&"===t||"??"===t;this.type=n?38:33,this.operator=Vt[t],this.left=e,this.right=i},Jt=function(t){this.type=76,this.body=t},$t=function(t){this.type=1,this.label=t},Xt=function(t,e){this.type=34,this.callee=t,this.arguments=e},Qt=function(t,e){this.type=62,this.param=t,this.body=e},Zt=function(t){this.type=88,this.body=t},te=function(t,e,i){this.type=86,this.id=t,this.superClass=e,this.body=i},ee=function(t,e,i){this.type=94,this.id=t,this.superClass=e,this.body=i},ie=function(t,e){this.type=39,this.computed=!0,this.object=t,this.property=e},ne=function(t,e,i){this.type=35,this.test=t,this.consequent=e,this.alternate=i},re=function(t){this.type=2,this.label=t},se=function(){this.type=3},oe=function(t,e){this.type=5,this.expression=t,this.directive=e},ae=function(t,e){this.type=4,this.body=t,this.test=e},ue=function(){this.type=75},ce=function(t){this.type=82,this.source=t},he=function(t){this.type=83,this.declaration=t},le=function(t,e,i){this.type=84,this.declaration=t,this.specifiers=e,this.source=i},pe=function(t,e){this.type=85,this.exported=e,this.local=t},de=function(t){this.type=5,this.expression=t},fe=function(t,e,i){this.type=6,this.left=t,this.right=e,this.body=i,this.each=!1},me=function(t,e,i,n){this.type=7,this.await=n,this.left=t,this.right=e,this.body=i},De=function(t,e,i,n){this.type=8,this.init=t,this.test=e,this.update=i,this.body=n},ye=function(t,e,i,n){this.type=63,this.id=t,this.params=e,this.body=i,this.generator=n,this.expression=!1,this.async=!1},xe=function(t,e,i,n){this.type=36,this.id=t,this.params=e,this.body=i,this.generator=n,this.expression=!1,this.async=!1},ve=function(t){this.type=64,this.name=t},ge=function(t,e,i){this.type=9,this.test=t,this.consequent=e,this.alternate=i},Ce=function(){this.type=77},be=function(t,e){this.type=78,this.specifiers=t,this.source=e},Ee=function(t){this.type=79,this.local=t},Fe=function(t){this.type=80,this.local=t},Ae=function(t,e){this.type=81,this.local=t,this.imported=e},we=function(t,e){this.type=10,this.label=t,this.body=e},ke=function(t,e){this.type=65,this.value=t,this.raw=e},Se=function(t,e){this.type=89,this.meta=t,this.property=e},Be=function(t,e,i,n,r){this.type=95,this.key=t,this.computed=e,this.value=i,this.kind=n,this.static=r},Te=function(t){this.type=67,this.body=t,this.sourceType="module"},Ne=function(t,e){this.type=40,this.callee=t,this.arguments=e},Pe=function(t){this.type=41,this.properties=t},Ie=function(t){this.type=66,this.properties=t},Oe=function(t,e,i,n,r,s){this.type=68,this.key=e,this.computed=i,this.value=n,this.kind=t,this.method=r,this.shorthand=s},je=function(t,e,i,n){this.type=65,this.value=t,this.raw=e,this.regex={pattern:i,flags:n}},Me=function(t){this.type=69,this.argument=t},Ue=function(t){this.type=11,this.argument=t},ze=function(t){this.type=67,this.body=t,this.sourceType="script"},Re=function(t){this.type=37,this.expressions=t},_e=function(t){this.type=70,this.argument=t},Le=function(t,e){this.type=39,this.computed=!1,this.object=t,this.property=e},Ke=function(){this.type=87},Ge=function(t,e){this.type=71,this.test=t,this.consequent=e},He=function(t,e){this.type=12,this.discriminant=t,this.cases=e},We=function(t,e){this.type=42,this.tag=t,this.quasi=e},qe=function(t,e){this.type=72,this.value=t,this.tail=e},Ve=function(t,e){this.type=73,this.quasis=t,this.expressions=e},Ye=function(){this.type=43},Je=function(t){this.type=13,this.argument=t},$e=function(t,e,i){this.type=14,this.block=t,this.handler=e,this.finalizer=i},Xe={"+":1,"-":2,"!":3,"~":4,void:5,typeof:6,delete:7},Qe=function(t,e){this.type=44,this.operator=Xe[t],this.argument=e,this.prefix=!0},Ze={"++":1,"--":2},ti=function(t,e,i){this.type=45,this.operator=Ze[t],this.argument=e,this.prefix=i},ei={var:1,let:2,const:3},ii=function(t,e){this.type=17,this.declarations=t,this.kind=ei[e]},ni=function(t,e){this.type=74,this.id=t,this.init=e},ri=function(t,e){this.type=15,this.test=t,this.body=e},si=function(t,e){this.type=16,this.object=t,this.body=e},oi=function(t,e){this.type=92,this.argument=t,this.delegate=e},ai={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]/},ui={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&ai.NonAsciiIdentifierStart.test(ui.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&ai.NonAsciiIdentifierPart.test(ui.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isDecimalDigitChar:function(t){return 1===t.length&&ui.isDecimalDigit(t.charCodeAt(0))},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}};function ci(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function hi(t){return"01234567".indexOf(t)}var li=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.isModule=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart,curlyStack:this.curlyStack.slice()}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart,this.curlyStack=t.curlyStack},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=Ot),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=Ot),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,i,n=[];for(this.trackComment&&(n=[],e=this.index-t,i={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(++this.index,ui.isLineTerminator(r)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:i};n.push(s)}return 13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,n}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};s={multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:i};n.push(s)}return n},t.prototype.skipMultiLineComment=function(){var t,e,i=[];for(this.trackComment&&(i=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(ui.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};var r={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e};i.push(r)}return i}++this.index}else++this.index}if(this.trackComment){e.end={line:this.lineNumber,column:this.index-this.lineStart};r={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e};i.push(r)}return this.tolerateUnexpectedToken(),i},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var i=this.source.charCodeAt(this.index);if(ui.isWhiteSpace(i))++this.index;else if(ui.isLineTerminator(i))++this.index,13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===i)if(47===(i=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(n)),e=!0}else{if(42!==i)break;this.index+=2;n=this.skipMultiLineComment();this.trackComment&&(t=t.concat(n))}else if(e&&45===i){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;n=this.skipSingleLineComment(3);this.trackComment&&(t=t.concat(n))}else{if(60!==i||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;n=this.skipSingleLineComment(4);this.trackComment&&(t=t.concat(n))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var i=this.source.charCodeAt(t+1);if(i>=56320&&i<=57343)e=1024*(e-55296)+i-56320+65536}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,i=0,n=0;n<e;++n){if(this.eof()||!ui.isHexDigit(this.source.charCodeAt(this.index)))return null;i=16*i+ci(this.source[this.index++])}return String.fromCharCode(i)},t.prototype.tryToScanUnicodeCodePointEscape=function(){var t=this.source[this.index],e=0;if("}"===t)return null;for(;!this.eof()&&(t=this.source[this.index++],ui.isHexDigit(t.charCodeAt(0)));)e=16*e+ci(t);return e>1114111||"}"!==t?null:ui.fromCodePoint(e)},t.prototype.scanUnicodeCodePointEscape=function(){var t=this.tryToScanUnicodeCodePointEscape();return null===t?this.throwUnexpectedToken():t},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!ui.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),i=ui.fromCodePoint(e);for(this.index+=i.length,92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&ui.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),i=t);!this.eof()&&(e=this.codePointAt(this.index),ui.isIdentifierPart(e));)i+=t=ui.fromCodePoint(e),this.index+=t.length,92===e&&(i=i.substr(0,i.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&ui.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),i+=t);return i},t.prototype.octalToDecimal=function(t){var e="0"!==t,i=hi(t);return!this.eof()&&ui.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,i=8*i+hi(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&ui.isOctalDigit(this.source.charCodeAt(this.index))&&(i=8*i+hi(this.source[this.index++]))),{code:i,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,i=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!==(t=1===i.length?3:this.isKeyword(i)?4:"null"===i?5:"true"===i||"false"===i?1:3)&&e+i.length!==this.index){var n=this.index;this.index=e,this.tolerateUnexpectedToken(Y),this.index=n}return{type:t,value:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"~":++this.index;break;default:">>>="===(e=this.source.substr(this.index,4))?this.index+=4:"==="===(e=e.substr(0,3))||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:"&&"===(e=e.substr(0,2))||"||"===e||"??"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:(e=this.source[this.index],"<>=!+-*%&|?^/".indexOf(e)>=0&&++this.index)}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&ui.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),ui.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,i="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)i+=this.source[this.index++];return 0===i.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(ui.isIdentifierStart(e)||ui.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(i,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var i="",n=!1;for(ui.isOctalDigit(t.charCodeAt(0))?(n=!0,i="0"+this.source[this.index++]):++this.index;!this.eof()&&ui.isOctalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];return n||0!==i.length||this.throwUnexpectedToken(),(ui.isIdentifierStart(this.source.charCodeAt(this.index))||ui.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(i,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t<this.length;++t){var e=this.source[t];if("8"===e||"9"===e)return!1;if(!ui.isOctalDigit(e.charCodeAt(0)))return!0}return!0},t.prototype.scanNumericLiteral=function(){var t=this.index,e=this.source[t];w(ui.isDecimalDigit(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point");var i="";if("."!==e){if(i=this.source[this.index++],e=this.source[this.index],"0"===i){if("x"===e||"X"===e)return++this.index,this.scanHexLiteral(t);if("b"===e||"B"===e)return++this.index,this.scanBinaryLiteral(t);if("o"===e||"O"===e)return this.scanOctalLiteral(e,t);if(e&&ui.isOctalDigit(e.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(e,t)}for(;ui.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];e=this.source[this.index]}if("."===e){for(i+=this.source[this.index++];ui.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];e=this.source[this.index]}if("e"===e||"E"===e)if(i+=this.source[this.index++],"+"!==(e=this.source[this.index])&&"-"!==e||(i+=this.source[this.index++]),ui.isDecimalDigit(this.source.charCodeAt(this.index)))for(;ui.isDecimalDigit(this.source.charCodeAt(this.index));)i+=this.source[this.index++];else this.throwUnexpectedToken();return ui.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanStringLiteral=function(){var t=this.index,e=this.source[t];w("'"===e||'"'===e,"String literal must starts with a quote"),++this.index;for(var i=!1,n="";!this.eof();){var r=this.source[this.index++];if(r===e){e="";break}if("\\"===r)if((r=this.source[this.index++])&&ui.isLineTerminator(r.charCodeAt(0)))++this.lineNumber,"\r"===r&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(r){case"u":if("{"===this.source[this.index])++this.index,n+=this.scanUnicodeCodePointEscape();else{var s=this.scanHexEscape(r);null===s&&this.throwUnexpectedToken(),n+=s}break;case"x":var o=this.scanHexEscape(r);null===o&&this.throwUnexpectedToken(J),n+=o;break;case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";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&&ui.isOctalDigit(r.charCodeAt(0))){var a=this.octalToDecimal(r);i=a.octal||i,n+=String.fromCharCode(a.code)}else n+=r}else{if(ui.isLineTerminator(r.charCodeAt(0)))break;n+=r}}return""!==e&&(this.index=t,this.throwUnexpectedToken()),{type:8,value:n,octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanTemplate=function(){var t="",e=!1,i=this.index,n="`"===this.source[i],r=!1,s=null,o=2;for(++this.index;!this.eof();){var a=this.source[this.index++];if("`"===a){o=1,r=!0,e=!0;break}if("$"===a){if("{"===this.source[this.index]){this.curlyStack.push("${"),++this.index,e=!0;break}t+=a}else{if(null!==s)continue;if("\\"===a)if(a=this.source[this.index++],ui.isLineTerminator(a.charCodeAt(0)))++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index;else switch(a){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":if("{"===this.source[this.index]){++this.index;var u=this.tryToScanUnicodeCodePointEscape();null===u?s="u":t+=u}else{var c=this.scanHexEscape(a);null===c?s="u":t+=c}break;case"x":var h=this.scanHexEscape(a);null===h?s="x":t+=h;break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:"0"===a?ui.isDecimalDigit(this.source.charCodeAt(this.index))?s="0":t+="\0":ui.isDecimalDigitChar(a)?s=a:t+=a}else ui.isLineTerminator(a.charCodeAt(0))?(++this.lineNumber,"\r"===a&&"\n"===this.source[this.index]&&++this.index,this.lineStart=this.index,t+="\n"):t+=a}}return e||this.throwUnexpectedToken(),n||this.curlyStack.pop(),{type:10,value:this.source.slice(i+1,this.index-o),cooked:null===s?t:null,head:n,tail:r,notEscapeSequenceHead:s,lineNumber:this.lineNumber,lineStart:this.lineStart,start:i,end:this.index}},t.prototype.testRegExp=function(t,e){var i=this,n=t;e.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(t,e,n){var r=parseInt(e||n,16);return r>1114111&&i.throwUnexpectedToken(tt),r<=65535?String.fromCharCode(r):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(t){this.throwUnexpectedToken(tt)}try{return new RegExp(t,e)}catch(t){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];w("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],i=!1,n=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],ui.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(Mt),e+=t;else if(ui.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(Mt);else if(i)"]"===t&&(i=!1);else{if("/"===t){n=!0;break}"["===t&&(i=!0)}return n||this.throwUnexpectedToken(Mt),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!ui.isIdentifierPart(e.charCodeAt(0)))break;if(++this.index,"\\"!==e||this.eof())t+=e,e;else if("u"===(e=this.source[this.index])){++this.index;var i=this.index,n=this.scanHexEscape("u");if(null!==n)for(t+=n,"\\u";i<this.index;++i)this.source[i];else this.index=i,t+="u","\\u";this.tolerateUnexpectedToken()}else"\\",this.tolerateUnexpectedToken()}return t},t.prototype.scanRegExp=function(){var t=this.index,e=this.scanRegExpBody(),i=this.scanRegExpFlags();return{type:9,value:"",pattern:e,flags:i,regex:this.testRegExp(e,i),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var t=this.source.charCodeAt(this.index);return ui.isIdentifierStart(t)?this.scanIdentifier():40===t||41===t||59===t?this.scanPunctuator():39===t||34===t?this.scanStringLiteral():46===t?ui.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():ui.isDecimalDigit(t)?this.scanNumericLiteral():96===t||125===t&&"${"===this.curlyStack[this.curlyStack.length-1]?this.scanTemplate():t>=55296&&t<57343&&ui.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}(),pi={1:"Boolean",2:"<end>",3:"Identifier",4:"Keyword",5:"Null",6:"Numeric",7:"Punctuator",8:"String",9:"RegularExpression",10:"Template"},di="ArrowParameterPlaceHolder",fi=function(){function t(t,e,i){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=i,this.errorHandler=new k,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new li(t,this.errorHandler),this.scanner.trackComment=this.config.comment,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,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},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}}return t.prototype.throwError=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=e.slice(),r=t.replace(/%(\d)/g,(function(t,e){return w(e<n.length,"Message reference must be in range"),n[e]})),s=this.lastMarker.index,o=this.lastMarker.line,a=this.lastMarker.column+1;throw this.errorHandler.createError(s,o,a,r)},t.prototype.tolerateError=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=e.slice(),r=t.replace(/%(\d)/g,(function(t,e){return w(e<n.length,"Message reference must be in range"),n[e]})),s=this.lastMarker.index,o=this.scanner.lineNumber,a=this.lastMarker.column+1;this.errorHandler.tolerateError(s,o,a,r)},t.prototype.unexpectedTokenError=function(t,e){var i,n=e||It;if(t?(e||(n=2===t.type?kt:3===t.type?St:6===t.type?Bt:8===t.type?Nt:10===t.type?Pt:It,4===t.type&&(this.scanner.isFutureReservedWord(t.value)?n=Tt:this.context.strict&&this.scanner.isStrictModeReservedWord(t.value)&&(n=Et))),i=t.value):i="ILLEGAL",n=n.replace("%0",i),t&&"number"==typeof t.lineNumber){var r=t.start,s=t.lineNumber,o=this.lastMarker.index-this.lastMarker.column,a=t.start-o+1;return this.errorHandler.createError(r,s,a,n)}r=this.lastMarker.index,s=this.lastMarker.line,a=this.lastMarker.column+1;return this.errorHandler.createError(r,s,a,n)},t.prototype.throwUnexpectedToken=function(t,e){throw this.unexpectedTokenError(t,e)},t.prototype.tolerateUnexpectedToken=function(t,e){this.errorHandler.tolerate(this.unexpectedTokenError(t,e))},t.prototype.collectComments=function(){if(this.config.comment){var t=this.scanner.scanComments();if(t.length>0&&this.delegate)for(var e=0;e<t.length;++e){var i=t[e],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);var 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)}}else this.scanner.scanComments()},t.prototype.getTokenRaw=function(t){return this.scanner.source.slice(t.start,t.end)},t.prototype.convertToken=function(t){var e={type:pi[t.type],value:this.getTokenRaw(t)};if(this.config.range&&(e.range=[t.start,t.end]),this.config.loc&&(e.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),9===t.type){var i=t.pattern,n=t.flags;e.regex={pattern:i,flags:n}}return e},t.prototype.nextToken=function(){var t=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);var e=this.scanner.lex();return this.hasLineTerminator=t.lineNumber!==e.lineNumber,e&&this.context.strict&&3===e.type&&this.scanner.isStrictModeReservedWord(e.value)&&(e.type=4),this.lookahead=e,this.config.tokens&&2!==e.type&&this.tokens.push(this.convertToken(e)),t},t.prototype.nextRegexToken=function(){this.collectComments();var t=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(t))),this.lookahead=t,this.nextToken(),t},t.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},t.prototype.startNode=function(t,e){void 0===e&&(e=0);var i=t.start-t.lineStart,n=t.lineNumber;return i<0&&(i+=e,n--),{index:t.start,line:n,column:i}},t.prototype.finalize=function(t,e){if(this.config.range&&(e.range=[t.index,this.lastMarker.index]),this.config.loc&&(e.loc={start:{line:t.line,column:t.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(e.loc.source=this.config.source)),this.delegate){var i={start:{line:t.line,column:t.column,offset:t.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(e,i)}return e},t.prototype.expect=function(t){var e=this.nextToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var t=this.lookahead;7===t.type&&","===t.value?this.nextToken():7===t.type&&";"===t.value?(this.nextToken(),this.tolerateUnexpectedToken(t)):this.tolerateUnexpectedToken(t,It)}else this.expect(",")},t.prototype.expectKeyword=function(t){var e=this.nextToken();4===e.type&&e.value===t||this.throwUnexpectedToken(e)},t.prototype.match=function(t){return 7===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchKeyword=function(t){return 4===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchContextualKeyword=function(t){return 3===this.lookahead.type&&this.lookahead.value===t},t.prototype.matchAssign=function(){if(7!==this.lookahead.type)return!1;var t=this.lookahead.value;return"="===t||"*="===t||"**="===t||"/="===t||"%="===t||"+="===t||"-="===t||"<<="===t||">>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,i=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=i,this.context.firstCoverInitializedNameError=n,r},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,i=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&i,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,r},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,i,n=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(n,new ve(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,gt),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),i=this.getTokenRaw(e),t=this.finalize(n,new ke(e.value,i));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),i=this.getTokenRaw(e),t=this.finalize(n,new ke("true"===e.value,i));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),i=this.getTokenRaw(e),t=this.finalize(n,new ke(null,i));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,e=this.nextRegexToken(),i=this.getTokenRaw(e),t=this.finalize(n,new je(e.regex,i,e.pattern,e.flags));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(n,new ve(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(n,new Ye)):t=this.matchKeyword("class")?this.parseClassExpression():this.matchImportCall()?this.parseImportCall():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new _e(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var i=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(i)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new Ut(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,i=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=i,n},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=e,this.finalize(t,new xe(null,i.params,n,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,i=this.context.await;this.context.allowYield=!1,this.context.await=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=e,this.context.await=i,this.finalize(t,new Wt(null,n.params,r))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),i=this.nextToken();switch(i.type){case 8:case 6:this.context.strict&&i.octal&&this.tolerateUnexpectedToken(i,gt);var n=this.getTokenRaw(i);t=this.finalize(e,new ke(i.value,n));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new ve(i.value));break;case 7:"["===i.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(i);break;default:t=this.throwUnexpectedToken(i)}return t},t.prototype.isPropertyKey=function(t,e){return 64===t.type&&t.name===e||65===t.type&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,i=this.createNode(),n=this.lookahead,r=null,s=null,o=!1,a=!1,u=!1,c=!1;if(3===n.type){var h=n.value;this.nextToken(),o=this.match("["),r=(c=!(this.hasLineTerminator||"async"!==h||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(i,new ve(h))}else this.match("*")?this.nextToken():(o=this.match("["),r=this.parseObjectPropertyKey());var l=this.qualifiedPropertyName(this.lookahead);if(3===n.type&&!c&&"get"===n.value&&l)e="get",o=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===n.type&&!c&&"set"===n.value&&l)e="set",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===n.type&&"*"===n.value&&l)e="init",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),a=!0;else if(r||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!c)!o&&this.isPropertyKey(r,"__proto__")&&(t.value&&this.tolerateError(R),t.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0;else if(3===n.type){h=this.finalize(i,new ve(n.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var p=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(i,new Kt(h,p))}else u=!0,s=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(i,new Oe(e,r,o,s,a,u))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],i={value:!1};!this.match("}");)e.push(this.match("...")?this.parseSpreadElement():this.parseObjectProperty(i)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new Pe(e))},t.prototype.throwTemplateLiteralEarlyErrors=function(t){switch(t.notEscapeSequenceHead){case"u":return this.throwUnexpectedToken(t,et);case"x":return this.throwUnexpectedToken(t,J);case"8":case"9":return this.throwUnexpectedToken(t,wt);default:return this.throwUnexpectedToken(t,At)}},t.prototype.parseTemplateHead=function(t){w(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),i=this.nextToken();t.isTagged||null===i.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(i);var n=i.value,r=i.cooked;return this.finalize(e,new qe({raw:n,cooked:r},i.tail))},t.prototype.parseTemplateElement=function(t){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),i=this.nextToken();t.isTagged||null===i.notEscapeSequenceHead||this.throwTemplateLiteralEarlyErrors(i);var n=i.value,r=i.cooked;return this.finalize(e,new qe({raw:n,cooked:r},i.tail))},t.prototype.parseTemplateLiteral=function(t){var e=this.createNode(),i=[],n=[],r=this.parseTemplateHead(t);for(n.push(r);!r.tail;)i.push(this.parseExpression()),r=this.parseTemplateElement(t),n.push(r);return this.finalize(e,new Ve(n,i))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case 64:case 39:case 69:case 61:break;case 70:t.type=69,this.reinterpretExpressionAsPattern(t.argument);break;case 30:t.type=60;for(var e=0;e<t.elements.length;e++)null!==t.elements[e]&&this.reinterpretExpressionAsPattern(t.elements[e]);break;case 41:t.type=66;for(e=0;e<t.properties.length;e++){var i=t.properties[e];this.reinterpretExpressionAsPattern(70===i.type?i:i.value)}break;case 32:t.type=61,delete t.operator,this.reinterpretExpressionAsPattern(t.left)}},t.prototype.parseGroupExpression=function(){var t;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),t={type:di,params:[],async:!1};else{var e=this.lookahead,i=[];if(this.match("..."))t=this.parseRestElement(i),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:di,params:[t],async:!1};else{var n=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);n=!0,t={type:di,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(s=0;s<r.length;s++)this.reinterpretExpressionAsPattern(r[s]);n=!0,t={type:di,params:r,async:!1}}else r.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(n)break}n||(t=this.finalize(this.startNode(e),new Re(r)))}if(!n){if(this.expect(")"),this.match("=>")&&(64===t.type&&"yield"===t.name&&(n=!0,t={type:di,params:[t],async:!1}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),37===t.type)for(s=0;s<t.expressions.length;s++)this.reinterpretExpressionAsPattern(t.expressions[s]);else this.reinterpretExpressionAsPattern(t);var o=37===t.type?t.expressions:[t];t={type:di,params:o,async:!1}}this.context.isBindingElement=!1}}}return t},t.prototype.parseArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.isIdentifierName=function(t){return 3===t.type||4===t.type||1===t.type||5===t.type},t.prototype.parseIdentifierName=function(){var t=this.createNode(),e=this.nextToken();return this.isIdentifierName(e)||this.throwUnexpectedToken(e),this.finalize(t,new ve(e.value))},t.prototype.parseNewExpression=function(){var t,e=this.createNode(),i=this.parseIdentifierName();if(w("new"===i.name,"New expression must start with `new`"),this.match("."))if(this.nextToken(),3===this.lookahead.type&&this.context.inFunctionBody&&"target"===this.lookahead.value){var n=this.parseIdentifierName();t=new Se(i,n)}else this.throwUnexpectedToken(this.lookahead);else if(this.matchKeyword("import"))this.throwUnexpectedToken(this.lookahead);else{var r=this.isolateCoverGrammar(this.parseLeftHandSideExpression),s=this.match("(")?this.parseArguments():[];t=new Ne(r,s),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(e,t)},t.prototype.parseAsyncArgument=function(){var t=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,t},t.prototype.parseAsyncArguments=function(){this.expect("(");var t=[];if(!this.match(")"))for(;;){var e=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(t.push(e),this.match(")"))break;if(this.expectCommaSeparator(),this.match(")"))break}return this.expect(")"),t},t.prototype.matchImportCall=function(){var t=this.matchKeyword("import");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();this.scanner.restoreState(e),t=7===i.type&&"("===i.value}return t},t.prototype.parseImportCall=function(){var t=this.createNode();return this.expectKeyword("import"),this.finalize(t,new Ce)},t.prototype.parseLeftHandSideExpressionAllowCall=function(){var t,e=this.lookahead,i=this.matchContextualKeyword("async"),n=this.context.allowIn;for(this.context.allowIn=!0,this.matchKeyword("super")&&this.context.inFunctionBody?(t=this.createNode(),this.nextToken(),t=this.finalize(t,new Ke),this.match("(")||this.match(".")||this.match("[")||this.throwUnexpectedToken(this.lookahead)):t=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var r=this.parseIdentifierName();t=this.finalize(this.startNode(e),new Le(t,r))}else if(this.match("(")){var s=i&&e.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var o=s?this.parseAsyncArguments():this.parseArguments();if(77===t.type&&1!==o.length&&this.tolerateError(S),t=this.finalize(this.startNode(e),new Xt(t,o)),s&&this.match("=>")){for(var a=0;a<o.length;++a)this.reinterpretExpressionAsPattern(o[a]);t={type:di,params:o,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");r=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),t=this.finalize(this.startNode(e),new ie(t,r))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var u=this.parseTemplateLiteral({isTagged:!0});t=this.finalize(this.startNode(e),new We(t,u))}return this.context.allowIn=n,t},t.prototype.parseSuper=function(){var t=this.createNode();return this.expectKeyword("super"),this.match("[")||this.match(".")||this.throwUnexpectedToken(this.lookahead),this.finalize(t,new Ke)},t.prototype.parseLeftHandSideExpression=function(){w(this.context.allowIn,"callee of new expression always allow in keyword.");for(var t=this.startNode(this.lookahead),e=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var i=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),e=this.finalize(t,new ie(e,i))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");i=this.parseIdentifierName();e=this.finalize(t,new Le(e,i))}else{if(10!==this.lookahead.type||!this.lookahead.head)break;var n=this.parseTemplateLiteral({isTagged:!0});e=this.finalize(t,new We(e,n))}return e},t.prototype.parseUpdateExpression=function(){var t,e=this.lookahead;if(this.match("++")||this.match("--")){var i=this.startNode(e),n=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&64===t.type&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(xt),this.context.isAssignmentTarget||this.tolerateError($);var r=!0;t=this.finalize(i,new ti(n.value,t,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(t=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&7===this.lookahead.type&&(this.match("++")||this.match("--"))){this.context.strict&&64===t.type&&this.scanner.isRestrictedWord(t.name)&&this.tolerateError(yt),this.context.isAssignmentTarget||this.tolerateError($),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var s=this.nextToken().value;r=!1;t=this.finalize(this.startNode(e),new ti(s,t,r))}return t},t.prototype.parseAwaitExpression=function(){var t=this.createNode();this.nextToken();var e=this.parseUnaryExpression();return this.finalize(t,new qt(e))},t.prototype.parseUnaryExpression=function(){var t;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var e=this.startNode(this.lookahead),i=this.nextToken();t=this.inheritCoverGrammar(this.parseUnaryExpression),t=this.finalize(e,new Qe(i.value,t)),this.context.strict&&"delete"===t.operator&&64===t.argument.type&&this.tolerateError(dt),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else t=this.context.await&&this.matchContextualKeyword("await")?this.parseAwaitExpression():this.parseUpdateExpression();return t},t.prototype.parseExponentiationExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseUnaryExpression);if(44!==e.type&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e,n=this.isolateCoverGrammar(this.parseExponentiationExpression);e=this.finalize(this.startNode(t),new Yt("**",i,n))}return e},t.prototype.binaryPrecedence=function(t){var e=t.value;return 7===t.type?this.operatorPrecedence[e]||0:4===t.type&&("instanceof"===e||this.context.allowIn&&"in"===e)?12:0},t.prototype.parseBinaryExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseExponentiationExpression),i=!0,n=!0,r=function(t){"&&"!==t.value&&"||"!==t.value||(n=!1),"??"===t.value&&(i=!1)},s=this.lookahead,o=this.binaryPrecedence(s);if(o>0){r(s),this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var a=[t,this.lookahead],u=e,c=this.isolateCoverGrammar(this.parseExponentiationExpression),h=[u,s.value,c],l=[o];!((o=this.binaryPrecedence(this.lookahead))<=0);){for((i||"&&"!==this.lookahead.value&&"||"!==this.lookahead.value)&&(n||"??"!==this.lookahead.value)||this.throwUnexpectedToken(this.lookahead),r(this.lookahead);h.length>2&&o<=l[l.length-1];){c=h.pop();var p=h.pop();l.pop(),u=h.pop(),a.pop();var d=a[a.length-1],f=this.startNode(d,d.lineStart);h.push(this.finalize(f,new Yt(p,u,c)))}h.push(this.nextToken().value),l.push(o),a.push(this.lookahead),h.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var m=h.length-1;e=h[m];for(var D=a.pop();m>1;){d=a.pop();var y=D&&D.lineStart;f=this.startNode(d,y),p=h[m-1];e=this.finalize(f,new Yt(p,h[m-2],e)),m-=2,D=d}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var i=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=i,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new ne(e,n,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case 64:this.validateParam(t,e,e.name);break;case 69:this.checkPatternParam(t,e.argument);break;case 61:this.checkPatternParam(t,e.left);break;case 60:for(var i=0;i<e.elements.length;i++)null!==e.elements[i]&&this.checkPatternParam(t,e.elements[i]);break;case 66:for(i=0;i<e.properties.length;i++){var n=e.properties[i];this.checkPatternParam(t,69===n.type?n:n.value)}}t.simple=t.simple&&e instanceof ve},t.prototype.reinterpretAsCoverFormalsList=function(t){var e=[t],i={simple:!0,paramSet:{}},n=!1;switch(t.type){case 64:break;case di:e=t.params,n=t.async;break;default:return null}for(var r=0;r<e.length;++r){61===(s=e[r]).type?92===s.right.type&&(s.right.argument&&this.throwUnexpectedToken(this.lookahead),s.right.type=64,s.right.name="yield",delete s.right.argument,delete s.right.delegate):n&&64===s.type&&"await"===s.name&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(i,s),e[r]=s}if(this.context.strict||!this.context.allowYield)for(r=0;r<e.length;++r){var s;92===(s=e[r]).type&&this.throwUnexpectedToken(this.lookahead)}if(i.message===Ct){var o=this.context.strict?i.stricted:i.firstRestricted;this.throwUnexpectedToken(o,i.message)}return{simple:i.simple,params:e,stricted:i.stricted,firstRestricted:i.firstRestricted,message:i.message}},t.prototype.parseAssignmentExpression=function(){var t;if(!this.context.allowYield&&this.matchKeyword("yield"))t=this.parseYieldExpression();else{var e=this.lookahead,i=e;if(t=this.parseConditionalExpression(),3===i.type&&i.lineNumber===this.lookahead.lineNumber&&"async"===i.value&&(3===this.lookahead.type||this.matchKeyword("yield"))){var n=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(n),t={type:di,params:[n],async:!0}}if(t.type===di||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t.async,s=this.reinterpretAsCoverFormalsList(t);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,a=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var u=this.context.allowYield,c=this.context.await;this.context.allowYield=!0,this.context.await=r;var h=this.startNode(e);this.expect("=>");var l=void 0;if(this.match("{")){var p=this.context.allowIn;this.context.allowIn=!0,l=this.parseFunctionSourceElements(),this.context.allowIn=p}else l=this.isolateCoverGrammar(this.parseAssignmentExpression);var d=76!==l.type;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),t=r?this.finalize(h,new Gt(s.params,l,d)):this.finalize(h,new Rt(s.params,l,d)),this.context.strict=o,this.context.allowStrictDirective=a,this.context.allowYield=u,this.context.await=c}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError($),this.context.strict&&64===t.type){var f=t;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(i,Dt),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(i,Et)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var m=(i=this.nextToken()).value,D=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new Lt(m,t,D)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var i=[];for(i.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),i.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new Re(i))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,H),t=this.parseExportDeclaration();break;case"import":this.matchImportCall()?t=this.parseExpressionStatement():(this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,W),t=this.parseImportDeclaration());break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new Jt(e))},t.prototype.parseLexicalBinding=function(t,e){var i=this.createNode(),n=this.parsePattern([],t);this.context.strict&&64===n.type&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(Ft);var r=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(O,"const")):(!e.inFor&&64!==n.type||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(i,new ni(n,r))},t.prototype.parseBindingList=function(t,e){for(var i=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),i.push(this.parseLexicalBinding(t,e));return i},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),i=this.nextToken().value;w("let"===i||"const"===i,"Lexical declaration must be either let or const");var n=this.parseBindingList(i,t);return this.consumeSemicolon(),this.finalize(e,new ii(n,i))},t.prototype.parseBindingRestElement=function(t,e){var i=this.createNode();this.expect("...");var n=this.parsePattern(t,e);return this.finalize(i,new Me(n))},t.prototype.parseArrayPattern=function(t,e){var i=this.createNode();this.expect("[");for(var n=[];!this.match("]");)if(this.match(","))this.nextToken(),n.push(null);else{if(this.match("...")){n.push(this.parseBindingRestElement(t,e));break}n.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(i,new zt(n))},t.prototype.parsePropertyPattern=function(t,e){var i,n,r=this.createNode(),s=!1,o=!1;if(3===this.lookahead.type){var a=this.lookahead;i=this.parseVariableIdentifier();var u=this.finalize(r,new ve(a.value));if(this.match("=")){t.push(a),o=!0,this.nextToken();var c=this.parseAssignmentExpression();n=this.finalize(this.startNode(a),new Kt(u,c))}else this.match(":")?(this.expect(":"),n=this.parsePatternWithDefault(t,e)):(t.push(a),o=!0,n=u)}else s=this.match("["),i=this.parseObjectPropertyKey(),this.expect(":"),n=this.parsePatternWithDefault(t,e);return this.finalize(r,new Oe("init",i,s,n,!1,o))},t.prototype.parseRestProperty=function(t,e){var i=this.createNode();this.expect("...");var n=this.parsePattern(t);return this.match("=")&&this.throwError(M),this.match("}")||this.throwError(ct),this.finalize(i,new Me(n))},t.prototype.parseObjectPattern=function(t,e){var i=this.createNode(),n=[];for(this.expect("{");!this.match("}");)n.push(this.match("...")?this.parseRestProperty(t,e):this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(i,new Ie(n))},t.prototype.parsePattern=function(t,e){var i;return this.match("[")?i=this.parseArrayPattern(t,e):this.match("{")?i=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,it),t.push(this.lookahead),i=this.parseVariableIdentifier(e)),i},t.prototype.parsePatternWithDefault=function(t,e){var i=this.lookahead,n=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,n=this.finalize(this.startNode(i),new Kt(n,s))}return n},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),i=this.nextToken();return 4===i.type&&"yield"===i.value?this.context.strict?this.tolerateUnexpectedToken(i,Et):this.context.allowYield||this.throwUnexpectedToken(i):3!==i.type?this.context.strict&&4===i.type&&this.scanner.isStrictModeReservedWord(i.value)?this.tolerateUnexpectedToken(i,Et):(this.context.strict||"let"!==i.value||"var"!==t)&&this.throwUnexpectedToken(i):(this.context.isModule||this.context.await)&&3===i.type&&"await"===i.value&&this.tolerateUnexpectedToken(i),this.finalize(e,new ve(i.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),i=this.parsePattern([],"var");this.context.strict&&64===i.type&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(Ft);var n=null;return this.match("=")?(this.nextToken(),n=this.isolateCoverGrammar(this.parseAssignmentExpression)):64===i.type||t.inFor||this.expect("="),this.finalize(e,new ni(i,n))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},i=[];for(i.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),i.push(this.parseVariableDeclaration(e));return i},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new ii(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new ue)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new de(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(ft),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),i=null;this.expectKeyword("if"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ue)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),i=this.parseIfClause())),this.finalize(e,new ge(n,t,i))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var i=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new ae(i,n))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ue);else{this.expect(")");var n=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=n}return this.finalize(e,new ri(i,t))},t.prototype.parseForStatement=function(){var t,e,i,n=null,r=null,s=null,o=!0,a=!1,u=this.createNode();if(this.expectKeyword("for"),this.matchContextualKeyword("await")&&(this.context.await||this.tolerateUnexpectedToken(this.lookahead),a=!0,this.nextToken()),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){n=this.createNode(),this.nextToken();var c=this.context.allowIn;this.context.allowIn=!1;var h=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=c,!a&&1===h.length&&this.matchKeyword("in")){var l=h[0];l.init&&(60===l.id.type||66===l.id.type||this.context.strict)&&this.tolerateError(_,"for-in"),n=this.finalize(n,new ii(h,"var")),this.nextToken(),t=n,e=this.parseExpression(),n=null}else 1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new ii(h,"var")),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,o=!1):(n=this.finalize(n,new ii(h,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){n=this.createNode();var p=this.nextToken().value;if(this.context.strict||"in"!==this.lookahead.value){c=this.context.allowIn;this.context.allowIn=!1;h=this.parseBindingList(p,{inFor:!0});this.context.allowIn=c,1===h.length&&null===h[0].init&&this.matchKeyword("in")?(n=this.finalize(n,new ii(h,p)),this.nextToken(),t=n,e=this.parseExpression(),n=null):1===h.length&&null===h[0].init&&this.matchContextualKeyword("of")?(n=this.finalize(n,new ii(h,p)),this.nextToken(),t=n,e=this.parseAssignmentExpression(),n=null,o=!1):(this.consumeSemicolon(),n=this.finalize(n,new ii(h,p)))}else n=this.finalize(n,new ve(p)),this.nextToken(),t=n,e=this.parseExpression(),n=null}else{var d=this.lookahead,f=this.context.isBindingElement,m=this.context.isAssignmentTarget,D=this.context.firstCoverInitializedNameError;c=this.context.allowIn;if(this.context.allowIn=!1,n=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=c,this.matchKeyword("in"))this.context.isAssignmentTarget&&32!==n.type||this.tolerateError(X),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseExpression(),n=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&32!==n.type||this.tolerateError(Q),this.nextToken(),this.reinterpretExpressionAsPattern(n),t=n,e=this.parseAssignmentExpression(),n=null,o=!1;else{if(this.context.isBindingElement=f,this.context.isAssignmentTarget=m,this.context.firstCoverInitializedNameError=D,this.match(",")){for(var y=[n];this.match(",");)this.nextToken(),y.push(this.isolateCoverGrammar(this.parseAssignmentExpression));n=this.finalize(this.startNode(d),new Re(y))}this.expect(";")}}if(void 0===t&&(this.match(";")||(r=this.isolateCoverGrammar(this.parseExpression)),this.expect(";"),this.match(")")||(s=this.isolateCoverGrammar(this.parseExpression))),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),i=this.finalize(this.createNode(),new ue);else{this.expect(")");var x=this.context.inIteration;this.context.inIteration=!0,i=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=x}return void 0===t?this.finalize(u,new De(n,r,s,i)):o?this.finalize(u,new fe(t,e,i)):this.finalize(u,new me(t,e,i,a))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var i=this.parseVariableIdentifier();e=i;var n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(jt,i.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(G),this.finalize(t,new re(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var i=this.parseVariableIdentifier(),n="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,n)||this.throwError(jt,i.name),e=i}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(K),this.finalize(t,new $t(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(V);var t=this.createNode();this.expectKeyword("return");var e=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&2!==this.lookahead.type||8===this.lookahead.type||10===this.lookahead.type?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(t,new Ue(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(vt);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new ue)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new si(i,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var i=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)i.push(this.parseStatementListItem());return this.finalize(e,new Ge(t,i))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var i=this.context.inSwitch;this.context.inSwitch=!0;var n=[],r=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(r&&this.throwError(rt),r=!0),n.push(s)}return this.expect("}"),this.context.inSwitch=i,this.finalize(t,new He(e,n))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),i=this.parseExpression();if(64===i.type&&this.match(":")){this.nextToken();var n=i,r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(ht,"Label",n.name),this.context.labelSet[r]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var o=this.lookahead,a=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(o,ft):a.generator&&this.tolerateUnexpectedToken(o,L),s=a}else s=this.parseStatement();delete this.context.labelSet[r],t=new we(n,s)}else this.consumeSemicolon(),t=new de(i);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(st);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new Je(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],i=this.parsePattern(e),n={},r=0;r<e.length;r++){var s="$"+e[r].value;Object.prototype.hasOwnProperty.call(n,s)&&this.tolerateError(U,e[r].value),n[s]=!0}this.context.strict&&64===i.type&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(pt),this.expect(")");var o=this.parseBlock();return this.finalize(t,new Qt(i,o))},t.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},t.prototype.parseTryStatement=function(){var t=this.createNode();this.expectKeyword("try");var e=this.parseBlock(),i=this.matchKeyword("catch")?this.parseCatchClause():null,n=this.matchKeyword("finally")?this.parseFinallyClause():null;return i||n||this.throwError(at),this.finalize(t,new $e(e,i,n))},t.prototype.parseDebuggerStatement=function(){var t=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(t,new se)},t.prototype.parseStatement=function(){var t;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:t=this.parseExpressionStatement();break;case 7:var e=this.lookahead.value;t="{"===e?this.parseBlock():"("===e?this.parseExpressionStatement():";"===e?this.parseEmptyStatement():this.parseExpressionStatement();break;case 3:t=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":t=this.parseBreakStatement();break;case"continue":t=this.parseContinueStatement();break;case"debugger":t=this.parseDebuggerStatement();break;case"do":t=this.parseDoWhileStatement();break;case"for":t=this.parseForStatement();break;case"function":t=this.parseFunctionDeclaration();break;case"if":t=this.parseIfStatement();break;case"return":t=this.parseReturnStatement();break;case"switch":t=this.parseSwitchStatement();break;case"throw":t=this.parseThrowStatement();break;case"try":t=this.parseTryStatement();break;case"var":t=this.parseVariableStatement();break;case"while":t=this.parseWhileStatement();break;case"with":t=this.parseWithStatement();break;default:t=this.parseExpressionStatement()}break;default:t=this.throwUnexpectedToken(this.lookahead)}return t},t.prototype.parseFunctionSourceElements=function(){var t=this.createNode();this.expect("{");var e=this.parseDirectivePrologues(),i=this.context.labelSet,n=this.context.inIteration,r=this.context.inSwitch,s=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;2!==this.lookahead.type&&!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=i,this.context.inIteration=n,this.context.inSwitch=r,this.context.inFunctionBody=s,this.finalize(t,new Jt(e))},t.prototype.validateParam=function(t,e,i){var n="$"+i;this.context.strict?(this.scanner.isRestrictedWord(i)&&(t.stricted=e,t.message=bt),Object.prototype.hasOwnProperty.call(t.paramSet,n)&&(t.stricted=e,t.message=Ct)):t.firstRestricted||(this.scanner.isRestrictedWord(i)?(t.firstRestricted=e,t.message=bt):this.scanner.isStrictModeReservedWord(i)?(t.firstRestricted=e,t.message=Et):Object.prototype.hasOwnProperty.call(t.paramSet,n)&&(t.stricted=e,t.message=Ct)),"function"==typeof Object.defineProperty?Object.defineProperty(t.paramSet,n,{value:!0,enumerable:!0,writable:!0,configurable:!0}):t.paramSet[n]=!0},t.prototype.parseRestElement=function(t){var e=this.createNode();this.expect("...");var i=this.parsePattern(t);return this.match("=")&&this.throwError(j),this.match(")")||this.throwError(ut),this.finalize(e,new Me(i))},t.prototype.parseFormalParameter=function(t){for(var e=[],i=this.match("...")?this.parseRestElement(e):this.parsePatternWithDefault(e),n=0;n<e.length;n++)this.validateParam(t,e[n],e[n].value);t.simple=t.simple&&i instanceof ve,t.params.push(i)},t.prototype.parseFormalParameters=function(t){var e={simple:!0,params:[],firstRestricted:t};if(this.expect("("),!this.match(")"))for(e.paramSet={};2!==this.lookahead.type&&(this.parseFormalParameter(e),!this.match(")"))&&(this.expect(","),!this.match(")")););return this.expect(")"),{simple:e.simple,params:e.params,stricted:e.stricted,firstRestricted:e.firstRestricted,message:e.message}},t.prototype.matchAsyncFunction=function(){var t=this.matchContextualKeyword("async");if(t){var e=this.scanner.saveState();this.scanner.scanComments();var i=this.scanner.lex();this.scanner.restoreState(e),t=e.lineNumber===i.lineNumber&&4===i.type&&"function"===i.value}return t},t.prototype.parseFunctionDeclaration=function(t){var e=this.createNode(),i=this.matchContextualKeyword("async");i&&this.nextToken(),this.expectKeyword("function");var n,r=!i&&this.match("*");r&&this.nextToken();var s=null,o=null;if(!t||!this.match("(")){var a=this.lookahead;s=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(a.value)&&this.tolerateUnexpectedToken(a,mt):this.scanner.isRestrictedWord(a.value)?(o=a,n=mt):this.scanner.isStrictModeReservedWord(a.value)&&(o=a,n=Et)}var u=this.context.await,c=this.context.allowYield;this.context.await=i,this.context.allowYield=!r;var h=this.parseFormalParameters(o),l=h.params,p=h.stricted;o=h.firstRestricted,h.message&&(n=h.message);var d=this.context.strict,f=this.context.allowStrictDirective;this.context.allowStrictDirective=h.simple;var m=this.parseFunctionSourceElements();return this.context.strict&&o&&this.throwUnexpectedToken(o,n),this.context.strict&&p&&this.tolerateUnexpectedToken(p,n),this.context.strict=d,this.context.allowStrictDirective=f,this.context.await=u,this.context.allowYield=c,i?this.finalize(e,new Ht(s,l,m)):this.finalize(e,new ye(s,l,m,r))},t.prototype.parseFunctionExpression=function(){var t=this.createNode(),e=this.matchContextualKeyword("async");e&&this.nextToken(),this.expectKeyword("function");var i,n=!e&&this.match("*");n&&this.nextToken();var r,s=null,o=this.context.await,a=this.context.allowYield;if(this.context.await=e,this.context.allowYield=!n,!this.match("(")){var u=this.lookahead;s=this.context.strict||n||!this.matchKeyword("yield")?this.parseVariableIdentifier():this.parseIdentifierName(),this.context.strict?this.scanner.isRestrictedWord(u.value)&&this.tolerateUnexpectedToken(u,mt):this.scanner.isRestrictedWord(u.value)?(r=u,i=mt):this.scanner.isStrictModeReservedWord(u.value)&&(r=u,i=Et)}var c=this.parseFormalParameters(r),h=c.params,l=c.stricted;r=c.firstRestricted,c.message&&(i=c.message);var p=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var f=this.parseFunctionSourceElements();return this.context.strict&&r&&this.throwUnexpectedToken(r,i),this.context.strict&&l&&this.tolerateUnexpectedToken(l,i),this.context.strict=p,this.context.allowStrictDirective=d,this.context.await=o,this.context.allowYield=a,e?this.finalize(t,new Wt(s,h,f)):this.finalize(t,new xe(s,h,f,n))},t.prototype.parseDirective=function(){var t=this.lookahead,e=this.createNode(),i=this.parseExpression(),n=65===i.type?this.getTokenRaw(t).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(e,n?new oe(i,n):new de(i))},t.prototype.parseDirectivePrologues=function(){for(var t=null,e=[];;){var i=this.lookahead;if(8!==i.type)break;var n=this.parseDirective();e.push(n);var r=n.directive;if("string"!=typeof r)break;"use strict"===r?(this.context.strict=!0,t&&this.tolerateUnexpectedToken(t,gt),this.context.allowStrictDirective||this.tolerateUnexpectedToken(i,q)):!t&&i.octal&&(t=i)}return e},t.prototype.qualifiedPropertyName=function(t){switch(t.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return"["===t.value}return!1},t.prototype.parseGetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();i.params.length>0&&this.tolerateError(B);var n=this.parsePropertyMethod(i);return this.context.allowYield=e,this.finalize(t,new xe(null,i.params,n,false))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();1!==i.params.length?this.tolerateError(T):i.params[0]instanceof Me&&this.tolerateError(N);var n=this.parsePropertyMethod(i);return this.context.allowYield=e,this.finalize(t,new xe(null,i.params,n,false))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var i=this.parseFormalParameters();this.context.allowYield=!1;var n=this.parsePropertyMethod(i);return this.context.allowYield=e,this.finalize(t,new xe(null,i.params,n,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,i=!1;if(!this.hasLineTerminator){var n=this.context.allowYield;this.context.allowYield=!1,(i=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=n}return this.finalize(t,new oi(e,i))},t.prototype.parseClassElement=function(t){var e=this.lookahead,i=this.createNode(),n="",r=null,s=null,o=!1,a=!1,u=!1,c=!1;if(this.match("*"))this.nextToken();else if(o=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,u=!0,o=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var h=this.lookahead.value;":"!==h&&"("!==h&&"*"!==h&&(c=!0,e=this.lookahead,o=this.match("["),r=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,P))}var l=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&l?(n="get",o=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===e.value&&l&&(n="set",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===e.type&&"*"===e.value&&l&&(n="init",o=this.match("["),r=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),a=!0),!n&&r&&this.match("(")&&(n="init",s=c?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),a=!0),n||this.throwUnexpectedToken(this.lookahead),"init"===n&&(n="method"),o||(u&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(e,lt),!u&&this.isPropertyKey(r,"constructor")&&(("method"!==n||!a||s&&s.generator)&&this.throwUnexpectedToken(e,I),t.value?this.throwUnexpectedToken(e,z):t.value=!0,n="constructor")),this.finalize(i,new Be(r,o,s,n,u))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new Zt(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),i=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=i,this.finalize(e,new te(n,r,s))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=3===this.lookahead.type?this.parseVariableIdentifier():null,n=null;this.matchKeyword("extends")&&(this.nextToken(),n=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=e,this.finalize(t,new ee(i,n,r))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new Te(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new ze(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(Z);var e=this.nextToken(),i=this.getTokenRaw(e);return this.finalize(t,new ke(e.value,i))},t.prototype.parseImportSpecifier=function(){var t,e,i=this.createNode();return 3===this.lookahead.type?(e=t=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(e=t=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(i,new Ae(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new Ee(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(ot),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new Fe(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(W);var t,e=this.createNode();this.expectKeyword("import");var i=[];if(8===this.lookahead.type)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")){var n=this.lookahead.value?It:nt;this.throwError(n,this.lookahead.value)}this.nextToken(),t=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(e,new be(i,t))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),i=e;return this.matchContextualKeyword("as")&&(this.nextToken(),i=this.parseIdentifierName()),this.finalize(t,new pe(e,i))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(H);var t,e=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var i=this.parseFunctionDeclaration(!0);t=this.finalize(e,new he(i))}else if(this.matchKeyword("class")){i=this.parseClassDeclaration(!0);t=this.finalize(e,new he(i))}else if(this.matchContextualKeyword("async")){i=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();t=this.finalize(e,new he(i))}else{this.matchContextualKeyword("from")&&this.throwError(It,this.lookahead.value);i=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),t=this.finalize(e,new he(i))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var n=this.lookahead.value?It:nt;this.throwError(n,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new ce(r))}else if(4===this.lookahead.type){i=void 0;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 le(i,[],null))}else if(this.matchAsyncFunction()){i=this.parseFunctionDeclaration();t=this.finalize(e,new le(i,[],null))}else{var s=[],o=null,a=!1;for(this.expect("{");!this.match("}");)a=a||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),o=this.parseModuleSpecifier(),this.consumeSemicolon();else if(a){n=this.lookahead.value?It:nt;this.throwError(n,this.lookahead.value)}else this.consumeSemicolon();t=this.finalize(e,new le(null,s,o))}return t},t}(),mi=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","??","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var i=this.values[this.paren-1];e="if"===i||"while"===i||"for"===i||"with"===i;break;case"}":if(e=!0,"function"===this.values[this.curly-3])e=!!(n=this.values[this.curly-4])&&!this.beforeFunctionExpression(n);else if("function"===this.values[this.curly-4]){var n;e=!(n=this.values[this.curly-5])||!this.beforeFunctionExpression(n)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}();!function(){function t(t,e){this.errorHandler=new k,this.errorHandler.tolerant=!!e&&("boolean"==typeof e.tolerant&&e.tolerant),this.scanner=new li(t,this.errorHandler),this.scanner.trackComment=!!e&&("boolean"==typeof e.comment&&e.comment),this.trackRange=!!e&&("boolean"==typeof e.range&&e.range),this.trackLoc=!!e&&("boolean"==typeof e.loc&&e.loc),this.buffer=[],this.reader=new mi}t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e<t.length;++e){var i=t[e],n=this.scanner.source.slice(i.slice[0],i.slice[1]),r={type:i.multiLine?"BlockComment":"LineComment",value:n};this.trackRange&&(r.range=i.range),this.trackLoc&&(r.loc=i.loc),this.buffer.push(r)}if(!this.scanner.eof()){var s=void 0;this.trackLoc&&(s={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var o=void 0;if("/"===this.scanner.source[this.scanner.index]&&this.reader.isRegexStart()){var a=this.scanner.saveState();try{o=this.scanner.scanRegExp()}catch(i){this.scanner.restoreState(a),o=this.scanner.lex()}}else o=this.scanner.lex();this.reader.push(o);var u={type:pi[o.type],value:this.scanner.source.slice(o.start,o.end)};if(this.trackRange&&(u.range=[o.start,o.end]),this.trackLoc&&(s.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},u.loc=s),9===o.type){var c=o.pattern,h=o.flags;u.regex={pattern:c,flags:h}}this.buffer.push(u)}}return this.buffer.shift()}}();function Di(t,e,i){var n=null,r=function(t,e){i&&i(t,e),n&&n.visit(t,e)},s="function"==typeof i?r:null,o=!1;if(e){o="boolean"==typeof e.comment&&e.comment;var a="boolean"==typeof e.attachComment&&e.attachComment;(o||a)&&((n=new A).attach=a,e.comment=!0,s=r)}var u=!1;e&&"string"==typeof e.sourceType&&(u="module"===e.sourceType);var c=new fi(t,e,s),h=u?c.parseModule():c.parseScript();return o&&n&&(h.comments=n.comments),c.config.tokens&&(h.tokens=c.tokens),c.config.tolerant&&(h.errors=c.errorHandler.errors),h}function yi(t,e,i){var n=e||{};return n.sourceType="script",Di(t,n,i)}var xi="object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||Function("return this")();function vi(t){return t+Math.random().toString(36).substring(2)}var gi={type:"return",value:void 0},Ci={type:"continue",target:null},bi={type:"break",target:null},Ei=vi("noinit"),Fi=vi("deadzone"),Ai={notImplemented:"%0 isn't implemented",unexpectedToken:"Unexpected token",deleteUnqualified:"Delete of an unqualified identifier in strict mode",identifierDeclared:"Identifier %0 has already been declared",assignmentToConst:"Assignment to constant variable",notFunction:"%0 is not a function",convertNullToObject:"Cannot convert undefined or null to object",notDefined:"%0 is not defined",notIterable:"%0 is not iterable"},wi=function(){function t(t,e){this.kind=t,this.value=e}return t.prototype.set=function(t){return this.value=t},t.prototype.strictSet=function(t){return this.value=t},t}(),ki=function(){function t(t,e){this.value=e,this.kind=3}return t.prototype.set=function(t){throw new TypeError(Ai.assignmentToConst)},t.prototype.strictSet=function(t){throw new TypeError(Ai.assignmentToConst)},t}(),Si=function(){function t(t,e){this.globalObject=t,this.globalKey=e,this.kind=1}return Object.defineProperty(t.prototype,"value",{get:function(){return this.globalObject[this.globalKey]},enumerable:!1,configurable:!0}),t.prototype.set=function(t){return this.globalObject[this.globalKey]=t},t.prototype.strictSet=function(t){"use strict";return this.globalObject[this.globalKey]=t},t}(),Bi=function(){function t(t,e){this.object=t,this.property=e}return Object.defineProperty(t.prototype,"value",{get:function(){return this.object[this.property]},enumerable:!1,configurable:!0}),t.prototype.set=function(t){return this.object[this.property]=t},t.prototype.strictSet=function(t){"use strict";return this.object[this.property]=t},t.prototype.delete=function(){return delete this.object[this.property]},t.prototype.strictDelete=function(){"use strict";return delete this.object[this.property]},t}(),Ti=function(){function t(t){this.globalObject=t,this.propertyAccessors=Object.create(null)}return t.prototype.getProperty=function(t){var e=this.propertyAccessors[t];return e||(e=this.propertyAccessors[t]=new Bi(this.globalObject,t)),e},t.prototype.deleteProperty=function(t){return delete this.globalObject[t]},t}(),Ni=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pi=function(){function t(t,e){this.engine=t,this.strict=!1,this.isolated=!0,this.context=Object.create(null),this.parent=e,e&&e.strict&&(this.strict=!0)}return t.prototype.find=function(t){for(var e=this,i=e.parent;i;){var n=e.context[t];if(n)return n;i=(e=i).parent}return e.find(t)},t.prototype.var=function(t,e){var i=this.context,n=i[t];n?e!==Ei&&n.set(e):i[t]=new wi(1,e===Ei?void 0:e)},t.prototype.let=function(t,e){var i=this.context[t];if(i){if(i.value!==Fi)throw new SyntaxError(Ai.identifierDeclared.replace("%0",t));i.set(e)}else this.context[t]=new wi(2,e)},t.prototype.const=function(t,e){var i=this.context[t];if(i&&i.value!==Fi)throw new SyntaxError(Ai.identifierDeclared.replace("%0",t));this.context[t]=new ki(3,e)},t.prototype.func=function(t,e){var i=this.context,n=i[t];n?this.strict?n.strictSet(e):n.set(e):i[t]=new wi(1,e)},t.prototype.declare=function(t,e,i){switch(t){case 1:this.var(e,i);break;case 2:this.let(e,i);break;case 3:this.const(e,i)}},t}(),Ii=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isolated=!1,e}return Ni(e,t),e.prototype.var=function(t,e){for(var i=this;!i.isolated&&i.parent;)i=i.parent;var n=i.context,r=n[t];if(r)e!==Ei&&r.set(e);else{var s=e===Ei?void 0:e;n[t]=new wi(1,s)}},e.prototype.func=function(t,e){for(var i=this;!i.isolated&&i.parent;)i=i.parent;var n=i.context,r=n[t];r?i.strict?r.strictSet(e):r.set(e):n[t]=new wi(1,e)},e}(Pi),Oi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ji=function(t){function e(e,i,n){var r=t.call(this,e,i)||this;return r.withObject=n,r}return Oi(e,t),e.prototype.find=function(e){return this.context[e]?this.context[e]:e in this.withObject?new Bi(this.withObject,e):t.prototype.find.call(this,e)},e.prototype.var=function(e,i){e in this.withObject?this.withObject[e]=i:t.prototype.var.call(this,e,i)},e}(Ii),Mi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ui=function(t){function e(e,i){var n=t.call(this,e,null)||this;return n.engine=e,n.globalObject=i,n.objectBindings=function(t){var e=Object.create(null);return e.String={kind:1,get value(){return t.String},set:function(e){return t.String=e},strictSet:function(e){"use strict";return t.String=e}},e.Function={kind:1,get value(){return t.Function},set:function(e){return t.Function=e},strictSet:function(e){"use strict";return t.Function=e}},e.Array={kind:1,get value(){return t.Array},set:function(e){return t.Array=e},strictSet:function(e){"use strict";return t.Array=e}},e.Number={kind:1,get value(){return t.Number},set:function(e){return t.Number=e},strictSet:function(e){"use strict";return t.Number=e}},e.Object={kind:1,get value(){return t.Object},set:function(e){return t.Object=e},strictSet:function(e){"use strict";return t.Object=e}},e.setTimeout={kind:1,get value(){return t.setTimeout},set:function(e){return t.setTimeout=e},strictSet:function(e){"use strict";return t.setTimeout=e}},e.clearTimeout={kind:1,get value(){return t.clearTimeout},set:function(e){return t.clearTimeout=e},strictSet:function(e){"use strict";return t.clearTimeout=e}},e.setInterval={kind:1,get value(){return t.setInterval},set:function(e){return t.setInterval=e},strictSet:function(e){"use strict";return t.setInterval=e}},e.clearInterval={kind:1,get value(){return t.clearInterval},set:function(e){return t.clearInterval=e},strictSet:function(e){"use strict";return t.clearInterval=e}},e.console={kind:1,get value(){return t.console},set:function(e){return t.console=e},strictSet:function(e){"use strict";return t.console=e}},e}(i),n}return Mi(e,t),e.prototype.var=function(t,e){var i=this.context,n=i[t];if(n)e!==Ei&&n.set(e);else{var r=e===Ei?void 0:e,s=i.this.value,o=new Si(s,t);i[t]=o,t in s?e!==Ei&&o.set(r):h(s,t,{value:r,writable:!0,enumerable:!0,configurable:!1})}},e.prototype.func=function(t,e){var i=this.context,n=i[t];if(n)this.strict?n.strictSet(e):n.set(e);else{var r=i.this.value,s=new Si(r,t);i[t]=s,t in r?this.strict?s.strictSet(e):s.set(e):h(r,t,{value:e,writable:!0,enumerable:!0,configurable:!1})}},e.prototype.find=function(t){var e;return(e=this.context[t])?e:(e=this.objectBindings[t])||(t in this.globalObject?this.objectBindings[t]=new Si(this.globalObject,t):void 0)},e}(Pi);function zi(t,e,i){if(e.generator||e.async)throw new Error(Ai.notImplemented.replace("%0","Generator or async function"));var n,r=31===e.type,s=t.runtimeProfile,o=s.scriptId,a=function(){var n=new Pi(t,i),u=s.scriptId;s.scriptId=o,s.pushCallFrame({functionName:a.name,functionScope:n,functionNode:e}),r||(n.const("this",this),n.var("arguments",arguments));try{for(var c=e.params,h=0;h<c.length;h++){var l=c[h];n.var(l.name,arguments[h])}var p=void 0,d=e.body;if(76===d.type?(Ri(t,d,n,0),p=Xi(t,d,n,3)):(p=un(t,d,n),r&&(gi.value=p,p=gi)),s.popCallFrame(),s.scriptId=u,p===gi)return p.value}catch(e){var f=t.inspector;if(f&&!s.callExpressionStack.length){var m=F(e,"__rewrittenzxcd");m&&m.node&&(f.shouldPauseOnException(o,e,m.node,!0),f.throwException(e))}throw s.popCallFrame(),s.scriptId=u,e}},u=function(){"use strict";var n=new Pi(t,i);n.strict=!0;var a=s.scriptId;s.scriptId=o,s.pushCallFrame({functionName:u.name,functionScope:n,functionNode:e}),r||(n.const("this",this),n.const("arguments",arguments));try{for(var c=e.params,h=0;h<c.length;h++){var l=c[h];n.var(l.name,arguments[h])}var p=void 0,d=e.body;if(76===d.type?(Ri(t,d,n,0),p=Xi(t,d,n,3)):(p=un(t,d,n),r&&(gi.value=p,p=gi)),s.popCallFrame(),s.scriptId=a,p===gi)return p.value}catch(e){var f=t.inspector;if(f&&!s.callExpressionStack.length){var m=F(e,"__rewrittenzxcd");m&&m.node&&(f.shouldPauseOnException(o,e,m.node,!0),f.throwException(e))}throw s.popCallFrame(),s.scriptId=a,e}},c=e.params.length,p=i.strict||76===(n=e.body).type&&n.body.length&&"use strict"===n.body[0].directive?u:a;return b&&l(p,{name:{value:e.id&&e.id.name||"",configurable:!0},length:{value:c,configurable:!0}}),E(p,"___func_locationxasdzzy",{node:e,scriptId:t.runtimeProfile.scriptId}),h(p,"toString",{value:function(){return"function () { ... }"},writable:!0,configurable:!0}),p}function Ri(t,e,i,n){var r=e.body;if(!i.strict){var s=r[0];s&&"use strict"===s.directive&&(i.strict=!0)}for(var o=0;o<r.length;o++){var a=r[o];63===a.type?i.func(a.id.name,zi(t,a,i)):_i(t,a,i)}}function _i(t,e,i){switch(e.type){case 17:Li(t,e,i);break;case 6:case 7:17===e.left.type&&Li(t,e.left,i);case 8:8===e.type&&e.init&&17===e.init.type&&Li(t,e.init,i);case 15:case 4:_i(t,e.body,i);break;case 9:_i(t,e.consequent,i),e.alternate&&_i(t,e.alternate,i);break;case 76:for(var n=e.body,r=0;r<n.length;r++)_i(t,n[r],i);break;case 12:var s=e.cases;for(r=0;r<s.length;r++)for(var o=s[r].consequent,a=0;a<o.length;a++)_i(t,o[a],i);break;case 14:var u=e.block.body;for(r=0;r<u.length;r++)_i(t,u[r],i);var c=e.handler&&e.handler.body.body;if(c)for(r=0;r<c.length;r++)_i(t,c[r],i);var h=e.finalizer&&e.finalizer.body;if(h)for(r=0;r<h.length;r++)_i(t,h[r],i)}}function Li(t,e,i){for(var n=e.declarations,r=e.kind,s=0;s<n.length;s++){var o=n[s];1===r&&i.var(o.id.name,Ei)}}function Ki(t,e,i,n){var r=e.name;if("undefined"!==r){var s=i.find(r);if(s)return s.value;if(!n)throw new ReferenceError(Ai.notDefined.replace("%0",r))}}function Gi(t,e,i){if("undefined"!==t){var n=e.find(t);if(n)return n;if(!i)throw new ReferenceError(Ai.notDefined.replace("%0",t))}}function Hi(t,e,i,n){var r=e.init,s=r?un(t,r,i):void 0,o=e.id.name;r&&i.var(o,s),!r||36!==r.type&&31!==r.type||!b||s.name||h(s,"name",{value:o,configurable:!0})}var Wi=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,s=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},qi=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(Wi(arguments[e]));return t},Vi=Function.prototype.apply;function Yi(t,e,i,n){var r=un(t,e.object,i),s=e.computed?un(t,e.property,i):e.property.name;return 1&n?new Bi(r,s):r[s]}function Ji(t,e,i){return e.value.raw}var $i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Xi(t,e,i,n){var r=i;for(var s=e.body,o=0;o<s.length;o++){var a=un(t,s[o],r);if(a===bi||a===Ci||a===gi)return a}}function Qi(t,e,i){for(var n=e.consequent,r=0;r<n.length;r++){var s=un(t,n[r],i);if(s===bi||s===Ci||s===gi)return s}}function Zi(t,e,i){return Xi(t,e.body,i)}function tn(t,e,i,n){for(;un(t,e.test,i);){var r=un(t,e.body,i);if(r===bi){if(bi.target)return bi;break}if(r!==Ci){if(r===gi)return r}else if(Ci.target&&Ci.target!==n)return Ci}}function en(t,e,i,n){do{var r=un(t,e.body,i);if(r===bi){if(bi.target)return bi;break}if(r!==Ci){if(r===gi)return r}else if(Ci.target&&Ci.target!==n)return Ci}while(un(t,e.test,i))}function nn(t,e,i,n){var r=i;for(e.init&&un(t,e.init,r);!e.test||un(t,e.test,r);e.update&&un(t,e.update,r)){var s=i,o=e.body,a=76===o.type?Xi(t,o,s):un(t,o,s);if(a===bi){if(bi.target)return bi;break}if(a!==Ci){if(a===gi)return a}else if(Ci.target&&Ci.target!==n)return Ci}}function rn(t,e,i,n){var r=un(t,e.right,i);for(var s in r){var o=on(t,e,i,s);if(o===bi){if(bi.target)return bi;break}if(o!==Ci){if(o===gi)return o}else if(Ci.target&&Ci.target!==n)return Ci}}function sn(t,e,i,n){var r,s,o=un(t,e.right,i);try{for(var a=$i(o),u=a.next();!u.done;u=a.next()){var c=on(t,e,i,u.value);if(c===bi){if(bi.target)return bi;break}if(c!==Ci){if(c===gi)return c}else if(Ci.target&&Ci.target!==n)return Ci}}catch(t){r={error:t}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}}function on(t,e,i,n){var r=e.left,s=e.body,o=i;if(17===r.type)!function(t,e,i,n){for(var r=e.declarations,s=e.kind,o=0;o<r.length;o++){var a=r[o].id;i.declare(s,a.name,n)}}(0,r,o,n);else{if(64!==r.type)throw new SyntaxError(Ai.unexpectedToken);var a=Gi(r.name,i,i.strict?0:1);a||(a=t.globalObjectAccessor.getProperty(r.name)),i.strict?a.strictSet(n):a.set(n)}return 76===s.type?Xi(t,s,o):un(t,s,o)}var an=[null,function(t,e){return bi.target=e.label?e.label.name:null,bi},function(t,e){return Ci.target=e.label?e.label.name:null,Ci},function(t,e,i){if(!t.inspector)debugger},en,function(t,e,i){return un(t,e.expression,i)},rn,sn,nn,function(t,e,i){return un(t,e.test,i)?un(t,e.consequent,i):e.alternate?un(t,e.alternate,i):void 0},function(t,e,i){var n,r=e.label.name,s=e.body;switch(s.type){case 8:n=nn(t,s,i,r);break;case 6:n=rn(t,s,i,r);break;case 7:n=sn(t,s,i,r);break;case 4:n=en(t,s,i,r);break;case 15:n=tn(t,s,i,r);break;default:n=un(t,e.body,i)}if(n!==bi||bi.target!==r)return n},function(t,e,i){return gi.value=e.argument?un(t,e.argument,i):void 0,gi},function(t,e,i){for(var n=un(t,e.discriminant,i),r=!1,s=-1,o=e.cases,a=o.length,u=0;u<a;u++){var c=o[u];if(r||(c.test?un(t,c.test,i)===n&&(r=!0):s=u),r){var h=Qi(t,c,i);if(h===bi){if(bi.target)return bi;break}if(h===Ci||h===gi)return h}!r&&u===a-1&&s>-1&&(u=s-1,r=!0)}},function(t,e,i){throw un(t,e.argument,i)},function(t,e,i){try{return Xi(t,e.block,i)}catch(o){if(e.handler){var n=new Ii(t,i),r=e.handler.param;if(r){var s=r.name;n.let(s,o)}return Zi(t,e.handler,n)}throw o}finally{if(e.finalizer){var o=Xi(t,e.finalizer,i);if(o===bi||o===Ci||o===gi)return o}}},tn,function(t,e,i){var n=un(t,e.object,i);if(null==n)throw new TypeError(Ai.convertNullToObject);var r=new ji(t,i,Object(n)),s=e.body;return 76===s.type?(Ri(t,s,r),Xi(t,s,r)):un(t,s,r)},function(t,e,i){for(var n=e.declarations,r=e.kind,s=0;s<n.length;s++)Hi(t,n[s],i,r)},null,null,null,null,null,null,null,null,null,null,null,null,function(t,e,i){for(var n=e.elements,r=n.length,s=new Array(r),o=0;o<r;o++){var a;null!==(a=n[o])&&(s[o]=un(t,a,i))}return s},function(t,e,i){return zi(t,e,i)},function(t,e,i){var n,r=e.left;switch(r.type){case 64:(n=Gi(r.name,i,i.strict?0:1))||(n=t.globalObjectAccessor.getProperty(r.name));break;case 39:n=Yi(t,r,i,1);break;default:throw new SyntaxError(Ai.unexpectedToken)}var s=un(t,e.right,i);switch(e.operator){case 1:return i.strict?n.strictSet(s):n.set(s),n.value;case 2:return i.strict?n.strictSet(n.value+s):n.set(n.value+s),n.value;case 3:return i.strict?n.strictSet(n.value-s):n.set(n.value-s),n.value;case 4:return i.strict?n.strictSet(n.value*s):n.set(n.value*s),n.value;case 5:return i.strict?n.strictSet(n.value/s):n.set(n.value/s),n.value;case 6:return i.strict?n.strictSet(n.value%s):n.set(n.value%s),n.value;case 13:return i.strict?n.strictSet(n.value&s):n.set(n.value&s),n.value;case 11:return i.strict?n.strictSet(n.value|s):n.set(n.value|s),n.value;case 12:return i.strict?n.strictSet(n.value^s):n.set(n.value^s),n.value;case 8:return i.strict?n.strictSet(n.value<<s):n.set(n.value<<s),n.value;case 9:return i.strict?n.strictSet(n.value>>s):n.set(n.value>>s),n.value;case 10:return i.strict?n.strictSet(n.value>>>s):n.set(n.value>>>s),n.value;case 7:return i.strict?n.strictSet(Math.pow(n.value,s)):n.set(Math.pow(n.value,s)),n.value;default:throw new SyntaxError(Ai.unexpectedToken)}},function(t,e,i){var n=un(t,e.left,i),r=un(t,e.right,i);switch(e.operator){case 1:return n==r;case 2:return n!=r;case 3:return n===r;case 4:return n!==r;case 5:return n<r;case 6:return n<=r;case 7:return n>r;case 8:return n>=r;case 12:return n+r;case 13:return n-r;case 14:return n*r;case 16:return n/r;case 17:return n%r;case 22:return n instanceof r;case 18:return n|r;case 19:return n^r;case 20:return n&r;case 9:return n<<r;case 10:return n>>r;case 21:return n in r;case 11:return n>>>r;case 15:return Math.pow(n,r);default:throw new SyntaxError(Ai.unexpectedToken)}},function(t,e,i){var n,r,s=e.callee;if(39===s.type){r=un(t,s.object,i);var o=s.computed?un(t,s.property,i):s.property.name;if("function"!=typeof(n=r[o]))throw new TypeError(Ai.notFunction.replace("%0",o))}else if("function"!=typeof(n=un(t,s,i))){var a;if(64===s.type)a=s.name;else try{a=JSON.stringify(n)}catch(t){a=""+n}throw new TypeError(Ai.notFunction.replace("%0",a))}for(var u=e.arguments,c=u.length,h=new Array(c),l=0;l<c;l++)h[l]=un(t,u[l],i);var p=t.runtimeProfile;p.pushCallExpression(e);try{var d=Vi.call(n,r,h);return p.popCallExpression(),d}catch(t){throw p.popCallExpression(),t}},function(t,e,i){return un(t,e.test,i)?un(t,e.consequent,i):un(t,e.alternate,i)},function(t,e,i){if(e.id&&e.id.name){var n=new Ii(t,i),r=zi(t,e,n);return n.const(e.id.name,r),r}return zi(t,e,i)},function(t,e,i){for(var n,r=e.expressions,s=0;s<r.length;s++)n=un(t,r[s],i);return n},function(t,e,i){switch(e.operator){case 1:return un(t,e.left,i)||un(t,e.right,i);case 2:return un(t,e.left,i)&&un(t,e.right,i);default:throw new SyntaxError(Ai.unexpectedToken)}},Yi,function(t,e,i){for(var n=e.callee,r=un(t,n,i),s=e.arguments,o=e.arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=un(t,s[u],i);var c=t.runtimeProfile;c.pushCallExpression(e);try{var h=void 0;switch(a.length){case 0:h=new r;break;case 1:h=new r(a[0]);break;case 2:h=new r(a[0],a[1]);break;case 3:h=new r(a[0],a[1],a[2]);break;default:h=new(r.bind.apply(r,qi([void 0],a)))}return c.popCallExpression(),h}catch(t){throw 64===n.type&&(t.message=t.message.replace(/\bconstruct\$0\b/g,n.name)),c.popCallExpression(),t}},function(t,e,i){for(var n={},r=e.properties,s=0;s<r.length;s++){0;var o=r[s],a=o.key,u=void 0;u=64===a.type?a.name:a.value+"";var c=o.value,l=un(t,c,i);36!==c.type&&31!==c.type||b&&h(l,"name",{value:u,configurable:!0});var d=o.kind;if("init"===d)n[u]=l;else if("get"===d){var f=p(n,u);h(n,u,{get:l,set:f&&f.set,enumerable:!0,configurable:!0})}else{f=p(n,u);h(n,u,{get:f&&f.get,set:l,enumerable:!0,configurable:!0})}}return n},function(t,e,i){var n=un(t,e.tag,i),r=e.quasi.quasis,s=r.map((function(t){return t.value.cooked})),o=r.map((function(t){return t.value.raw}));h(s,"raw",{value:d(o)});var a=e.quasi.expressions,u=[];if(a)for(var c=0;c<a.length;c++)u.push(un(t,a[c],i));return n.apply(void 0,qi([d(s)],u))},function(t,e,i){return i.find("this").value},function(t,e,i){var n=e.argument;switch(e.operator){case 3:return!un(t,n,i);case 6:return 64===n.type?typeof Ki(0,n,i,1):typeof un(t,n,i);case 7:if(39===n.type){var r=Yi(t,n,i,1);return i.strict?r.strictDelete():r.delete()}if(64===n.type){if(i.strict)throw new SyntaxError(Ai.deleteUnqualified);for(var s=i,o=n.name;s&&!s.context[o];)s=s.parent;if(s){if(s.parent||1!==s.context[o].kind)return!1;var a=t.globalObjectAccessor.deleteProperty(o);return a&&delete s.context[o],a}return t.globalObjectAccessor.deleteProperty(o)}return un(t,n,i),!0;case 1:return+un(t,n,i);case 2:return-un(t,n,i);case 4:return~un(t,n,i);case 5:return void un(t,n,i);default:throw new SyntaxError(Ai.unexpectedToken)}},function(t,e,i){var n,r=e.argument;switch(r.type){case 64:n=Gi(r.name,i,0);break;case 39:n=Yi(t,r,i,1);break;default:throw new SyntaxError(Ai.unexpectedToken)}var s,o=n.value;switch(e.operator){case 1:return s=o++,i.strict?n.strictSet(o):n.set(o),e.prefix?o:s;case 2:return s=o--,i.strict?n.strictSet(o):n.set(o),e.prefix?o:s;default:throw new SyntaxError(Ai.unexpectedToken)}},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,Zi,function(){},Ki,function(t,e,i){return e.value},null,function(t,e,i){Ri(t,e,i);var n=t.runtimeProfile;n.pushCallFrame({functionName:"",functionNode:e,functionScope:i});try{for(var r=void 0,s=e.body,o=0;o<s.length;o++)r=un(t,s[o],i);return n.popCallFrame(),r}catch(t){throw n.popCallFrame(),t}},null,null,null,Qi,Ji,function(t,e,i){for(var n,r,s=e.quasis.slice(),o=e.expressions.slice(),a="";n=s.shift();)a+=Ji(t,n,i),(r=o.shift())&&(a+=un(t,r,i));return a},Hi,function(){},Xi];function un(t,e,i){var n=e.type;if(65===n)return e.value;var r=t.inspector;r&&r.hitBreakpoint(t.runtimeProfile.scriptId,e);try{var s=an[n];if(s)return s(t,e,i,0);throw new Error(Ai.unexpectedToken+"("+n+")")}catch(i){var o=t.runtimeProfile;throw o.rewriteErrorStack(o.scriptId,i,e),r&&r.shouldPauseOnException(o.scriptId,i,e,!1),i}}var cn=function(){return(cn=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hn=function(){function t(){this.callFrameCountId=1,this.scriptCountId=1,this.exceptionId=1,this.callFrames=[],this.callExpressionStack=[],this.scriptId="1",this.scriptMap={}}return t.prototype.getNextScriptId=function(){return""+this.scriptCountId++},t.prototype.getNextExceptionId=function(){return this.exceptionId++},t.prototype.pushCallFrame=function(t){this.callFrames.push(cn(cn({},t),{scriptId:this.scriptId,callFrameId:"10000.1."+this.callFrameCountId++,callExpressionNode:this.getCurrentCallExpression()}))},t.prototype.popCallFrame=function(){this.callFrames.pop()},t.prototype.pushCallExpression=function(t){this.callExpressionStack.push(t)},t.prototype.popCallExpression=function(){this.callExpressionStack.pop()},t.prototype.getCurrentCallExpression=function(){return this.callExpressionStack[this.callExpressionStack.length-1]},t.prototype.rewriteErrorStack=function(t,e,i){var n=this;if(e instanceof Error&&!F(e,"__rewrittenzxcd")){var r=this.scriptMap[t]?this.scriptMap[t].url:"",s=this.callFrames.map((function(t,e){var s,o,a=n.callFrames[e+1];if(a?a.callExpressionNode&&(s=a.callExpressionNode.loc.start.line,o=a.callExpressionNode.loc.start.column+1):(s=i.loc.start.line,o=i.loc.start.column+1),void 0===s)return" at <anonymous>";var u=(r&&"anonymous"!==r?r:"<anonymous>")+":"+s+":"+o;return t.functionName?" at "+t.functionName+" ("+u+")":" at "+u})).reverse().join("\n");e.stack=e.name+": "+e.message+"\n"+s,E(e,"__rewrittenzxcd",{id:this.getNextExceptionId(),node:i})}},t}(),ln=function(){function t(t){if(void 0===t&&(t={}),this.options=t,this.runtimeProfile=new hn,t.sandbox){var e=t.sandboxGlobalObjectCreator?t.sandboxGlobalObjectCreator():(n={},["Object","Function","Array","Number","Boolean","String","RegExp","Promise","Date","Map","Set","WeakMap","WeakSet","NaN","JSON","Math","eval","isFinite","isNaN","clearTimeout","setTimeout","clearInterval","setInterval","console","Error","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","parseFloat","parseInt","Symbol","Infinity"].forEach((function(t){void 0!==xi[t]&&(n[t]=xi[t])})),n);this.globalObjectAccessor=new Ti(e),(i=new Ui(this,e)).const("this",e),i.var("self",e),i.const("exports",this.exports={}),this.globalScope=i}else{var i;this.globalObjectAccessor=new Ti(xi),(i=new Ui(this,xi)).const("this",xi),i.var("self",xi),this.globalScope=i}var n}return t.prototype.import=function(t){if("object"==typeof t){var e=this.globalScope.context;y(t).forEach((function(i){e[i]=new wi(1,t[i])}))}},t.prototype.run=function(t,e){var i=yi(t,{loc:!0}),n=this.runtimeProfile,r=n.scriptId,s=n.getNextScriptId(),o=e||"anonymous";n.scriptId=s,n.scriptMap[s]={scriptId:s,url:o},this.inspector&&this.inspector.evaluateScript(n.scriptId,t,i,o);try{var a=un(this,i,this.globalScope);return n.scriptId=r,a}catch(t){if(n.scriptId=r,this.inspector){var u=F(t,"__rewrittenzxcd");u&&u.node&&(this.inspector.shouldPauseOnException(s,t,u.node,!0),this.inspector.throwException(t))}throw t}},t.prototype.evaluate=function(t,e){var i=yi(t,{loc:!0}),n=this.runtimeProfile,r=n.scriptId;n.scriptId=n.getNextScriptId(),this.inspector&&this.inspector.evaluateScript(n.scriptId,t,i,"");var s=e||this.globalScope;try{var o=un(this,i,s);return n.scriptId=r,o}catch(t){throw n.scriptId=r,t}},t.prototype.setInspector=function(t){this.inspector=t,t.setEngine(this),t.connect()},t.prototype.getRuntimeStatus=function(){var t=this.runtimeProfile;return{scriptId:t.scriptId,scriptMap:t.scriptMap,callFrames:t.callFrames,callExpressionNode:t.getCurrentCallExpression()}},t.prototype.getHostGlobalObject=function(){return xi},t}();var pn,dn,fn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function mn(t,e,i){i(t,e)}function Dn(){}!function(t){t.Statement="Statement",t.Expression="Expression",t.MemberPattern="MemberPattern",t.VariablePattern="VariablePattern",t.Class="Class",t.ForInit="ForInit",t.Function="Function",t.Pattern="Pattern"}(dn||(dn={}));var yn=((pn={Statement:mn,Expression:mn,MemberPattern:mn,VariablePattern:Dn,Class:function(t,e,i){t.id&&i(t.id,e,dn.Pattern),t.superClass&&i(t.superClass,e,dn.Expression),i(t.body,e)},ForInit:function(t,e,i){17===t.type?i(t,e):i(t,e,dn.Expression)},Function:function(t,e,i){var n,r;"id"in t&&t.id&&i(t.id,e,dn.Pattern);try{for(var s=fn(t.params),o=s.next();!o.done;o=s.next()){i(o.value,e,dn.Pattern)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}i(t.body,e,"expression"in t&&t.expression?dn.Expression:dn.Statement)},Pattern:function(t,e,i){64===t.type?i(t,e,dn.VariablePattern):39===t.type?i(t,e,dn.MemberPattern):i(t,e)}})[75]=Dn,pn[1]=Dn,pn[2]=Dn,pn[3]=Dn,pn[72]=Dn,pn[43]=Dn,pn[87]=Dn,pn[89]=Dn,pn[81]=Dn,pn[79]=Dn,pn[80]=Dn,pn[64]=Dn,pn[65]=Dn,pn[76]=function(t,e,i){var n,r;try{for(var s=fn(t.body),o=s.next();!o.done;o=s.next()){i(o.value,e,dn.Statement)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[5]=function(t,e,i){i(t.expression,e,dn.Expression)},pn[9]=function(t,e,i){i(t.test,e,dn.Expression),i(t.consequent,e,dn.Statement),t.alternate&&i(t.alternate,e,dn.Statement)},pn[10]=function(t,e,i){i(t.body,e,dn.Statement)},pn[16]=function(t,e,i){i(t.object,e,dn.Expression),i(t.body,e,dn.Statement)},pn[12]=function(t,e,i){var n,r,s,o;i(t.discriminant,e,dn.Expression);try{for(var a=fn(t.cases),u=a.next();!u.done;u=a.next()){var c=u.value;c.test&&i(c.test,e,dn.Expression);try{for(var h=(s=void 0,fn(c.consequent)),l=h.next();!l.done;l=h.next()){i(l.value,e,dn.Statement)}}catch(t){s={error:t}}finally{try{l&&!l.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},pn[71]=function(t,e,i){var n,r;t.test&&i(t.test,e,dn.Expression);try{for(var s=fn(t.consequent),o=s.next();!o.done;o=s.next()){i(o.value,e,dn.Statement)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[11]=function(t,e,i){t.argument&&i(t.argument,e,dn.Expression)},pn[13]=function(t,e,i){i(t.argument,e,dn.Expression)},pn[14]=function(t,e,i){i(t.block,e,dn.Statement),t.handler&&i(t.handler,e),t.finalizer&&i(t.finalizer,e,dn.Statement)},pn[62]=function(t,e,i){t.param&&i(t.param,e,dn.Pattern),i(t.body,e,dn.Statement)},pn[15]=function(t,e,i){i(t.test,e,dn.Expression),i(t.body,e,dn.Statement)},pn[8]=function(t,e,i){t.init&&i(t.init,e,dn.ForInit),t.test&&i(t.test,e,dn.Expression),t.update&&i(t.update,e,dn.Expression),i(t.body,e,dn.Statement)},pn[6]=function(t,e,i){i(t.left,e,dn.ForInit),i(t.right,e,dn.Expression),i(t.body,e,dn.Statement)},pn[63]=function(t,e,i){i(t,e,dn.Function)},pn[17]=function(t,e,i){var n,r;try{for(var s=fn(t.declarations),o=s.next();!o.done;o=s.next()){i(o.value,e)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[74]=function(t,e,i){i(t.id,e,dn.Pattern),t.init&&i(t.init,e,dn.Expression)},pn[69]=function(t,e,i){i(t.argument,e,dn.Pattern)},pn[60]=function(t,e,i){var n,r;try{for(var s=fn(t.elements),o=s.next();!o.done;o=s.next()){var a=o.value;a&&i(a,e,dn.Pattern)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[66]=function(t,e,i){var n,r;try{for(var s=fn(t.properties),o=s.next();!o.done;o=s.next()){var a=o.value;68===a.type?(a.computed&&i(a.key,e,dn.Expression),i(a.value,e,dn.Pattern)):69===a.type&&i(a.argument,e,dn.Pattern)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[30]=function(t,e,i){var n,r;try{for(var s=fn(t.elements),o=s.next();!o.done;o=s.next()){var a=o.value;a&&i(a,e,dn.Expression)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[41]=function(t,e,i){var n,r;try{for(var s=fn(t.properties),o=s.next();!o.done;o=s.next()){i(o.value,e)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[37]=function(t,e,i){var n,r;try{for(var s=fn(t.expressions),o=s.next();!o.done;o=s.next()){i(o.value,e,dn.Expression)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[73]=function(t,e,i){var n,r,s,o;try{for(var a=fn(t.quasis),u=a.next();!u.done;u=a.next()){i(u.value,e)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}try{for(var c=fn(t.expressions),h=c.next();!h.done;h=c.next()){i(h.value,e,dn.Expression)}}catch(t){s={error:t}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}},pn[44]=function(t,e,i){i(t.argument,e,dn.Expression)},pn[33]=function(t,e,i){i(t.left,e,dn.Expression),i(t.right,e,dn.Expression)},pn[32]=function(t,e,i){i(t.left,e,dn.Pattern),i(t.right,e,dn.Expression)},pn[35]=function(t,e,i){i(t.test,e,dn.Expression),i(t.consequent,e,dn.Expression),i(t.alternate,e,dn.Expression)},pn[40]=function(t,e,i){var n,r;if(i(t.callee,e,dn.Expression),t.arguments)try{for(var s=fn(t.arguments),o=s.next();!o.done;o=s.next()){i(o.value,e,dn.Expression)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[39]=function(t,e,i){i(t.object,e,dn.Expression),t.computed&&i(t.property,e,dn.Expression)},pn[84]=function(t,e,i){t.declaration&&i(t.declaration,e,84===t.type||t.declaration&&"id"in t.declaration&&t.declaration.id?dn.Statement:dn.Expression),t.source&&i(t.source,e,dn.Expression)},pn[82]=function(t,e,i){t.exported&&i(t.exported,e),i(t.source,e,dn.Expression)},pn[78]=function(t,e,i){var n,r;try{for(var s=fn(t.specifiers),o=s.next();!o.done;o=s.next()){i(o.value,e)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}i(t.source,e,dn.Expression)},pn[90]=function(t,e,i){i(t.source,e,dn.Expression)},pn[42]=function(t,e,i){i(t.tag,e,dn.Expression),i(t.quasi,e,dn.Expression)},pn[86]=function(t,e,i){i(t,e,dn.Class)},pn[88]=function(t,e,i){var n,r;try{for(var s=fn(t.body),o=s.next();!o.done;o=s.next()){i(o.value,e)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},pn[95]=function(t,e,i){t.computed&&i(t.key,e,dn.Expression),i(t.value,e,dn.Expression)},pn);yn[67]=yn[76],yn[91]=yn[5],yn[92]=yn[93]=yn[11],yn[70]=yn[13],yn[4]=yn[15],yn[7]=yn[6],yn[36]=yn[31]=yn[63],yn[45]=yn[44],yn[38]=yn[33],yn[61]=yn[32],yn[34]=yn[40],yn[83]=yn[84],yn[94]=yn[86],yn[68]=yn[95];function xn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]}function vn(t){return!!F(t,"__can_breakpointasxu")||t.type<30}function gn(t,e,i,n){var r,s,o=i||{lineNumber:e.lineNumber+1,columnNumber:0},a=[];return r=t.ast,s=function(t,i){if(t.loc){var r={startLineNumber:t.loc.start.line-1,startColumnNumber:t.loc.start.column,endLineNumber:t.loc.end.line-1,endColumnNumber:t.loc.end.column};return r.endLineNumber<e.lineNumber||r.startLineNumber>o.lineNumber||r.endLineNumber===e.lineNumber&&r.endColumnNumber<=e.columnNumber||r.startLineNumber===o.lineNumber&&r.startColumnNumber>=o.columnNumber?(a.length&&(i.found=!0),!1):(37===t.type&&t.expressions.forEach((function(t,e){e&&t.type<60&&E(t,"__can_breakpointasxu",!0)})),r.startLineNumber>e.lineNumber||r.startLineNumber===e.lineNumber&&r.startColumnNumber>=e.columnNumber?(vn(t)&&-1===a.indexOf(t)&&a.push(t),!(n&&n.limit&&a.length>=n.limit&&(i.found=!0,1))):!a.length||(i.found=!0,!1))}},function t(e,i,n){!i.found&&s(e,i)&&yn[n||e.type](e,i,t)}(r,{found:!1}),a}var Cn=["debug","log","info","warn","error","table"];function bn(t,e,i){var n=i.getRemoteObjectParser(),s=i.getSessionState(),o=i.getEngine().getRuntimeStatus(),a=o.scriptMap[o.scriptId],u=o.callExpressionNode,c=[];return a&&u&&(c=o.callFrames.map((function(t,e){var i=o.callFrames[e+1];return i?{functionName:t.functionName,scriptId:a.scriptId,url:a.url,lineNumber:i.functionNode.loc.start.line-1,columnNumber:i.functionNode.loc.start.column}:{functionName:t.functionName,scriptId:a.scriptId,url:a.url,lineNumber:u.loc.start.line-1,columnNumber:u.loc.start.column}})).reverse()),{method:r.consoleAPICalled,params:{type:"warn"===t?"warning":t,args:Array.from(e).map((function(e){return n.parseObject(e,t)})),executionContextId:s.executionContextId,timestamp:Date.now(),stackTrace:{callFrames:c}}}}function En(t,e){var i=e.getProtocolConnection(),n="object"==typeof console&&console[t]?console[t].bind(console):function(){};function r(){var r=arguments;if(r.length){try{var s=/^(\[framework\]|dispatchEvent|onMessage push)/;if("string"==typeof r[0]&&s.test(r[0]))return n.apply(null,r);i.sendAfterRuntimeEnabled(bn(t,r,e))}catch(e){xn("console."+t+" error",e)}return n.apply(null,r)}}return h(r,"toString",{value:function(){return"function "+t+"() { [native code] }"},writable:!0,configurable:!0}),r}function Fn(t,e){e||(e="object"==typeof console?console:null);var i={};return Cn.forEach((function(e){i[e]={configurable:!0,enumerable:!0,writable:!0,value:En(e,t)}})),x(e,i)}function An(t){return Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors(t):Object.getOwnPropertyNames(t).reduce((function(e,i){return e[i]=Object.getOwnPropertyDescriptor(t,i),e}),Object.create(null))}var wn=function(){function t(t){this.objectStore=t}return t.prototype.mapFrom=function(t,e){var i=this;return Array.from(t).map((function(t){return i.mapFromOne(t,e)}))},t.prototype.mapFromOne=function(t,e){switch(typeof t){case"string":return this.mapString(t);case"number":return this.mapNumber(t);case"object":return Array.isArray(t)?this.mapArray(t,"table"===e):null===t?this.mapNull():this.mapObject(t,"table"===e);case"function":return this.mapFunction(t);case"undefined":return this.mapUndef();case"boolean":return this.mapBoolean(t);default:return{type:typeof t,value:t}}},t.prototype.mapString=function(t){return{type:"string",value:t}},t.prototype.mapNumber=function(t){return{type:"number",value:t,description:String(t)}},t.prototype.mapBoolean=function(t){return{type:"boolean",value:t}},t.prototype.mapFunction=function(t){var e=this.objectStore.save(t);return{type:"function",className:"Function",description:t.toString(),objectId:e}},t.prototype.mapUndef=function(){return{type:"undefined"}},t.prototype.mapNull=function(){return{type:"object",subtype:"null",value:null}},t.prototype.mapObject=function(t,e){var i,n,r=this,s=An(t),o=Object.keys(s),a=this.objectStore.save(t),u=t.constructor?t.constructor.name:"Object",c=o.length>5&&!e,h={type:"object",className:u,description:u,objectId:a,preview:{type:"object",description:u,overflow:c,properties:(c?o.slice(0,5):o).map((function(t){return r.getPropertyPreview4ObjectProperty(t,s[t],e)})).filter(Boolean)}};return t instanceof Error?(i="error",n=t.stack):t instanceof Date?(i="date",n=t.toString()):t instanceof RegExp?(i="regexp",n=t.toString()):t instanceof Promise&&(i="promise",n="Promise"),i&&(h.subtype=i,h.preview&&(h.preview.subtype=i)),n&&(h.description=n,h.preview&&(h.preview.description=n)),h},t.prototype.mapArray=function(t,e){var i=this,n=t.length>100&&!e,r="Array("+t.length+")";return{type:"object",subtype:"array",className:"Array",description:r,objectId:this.objectStore.save(t),preview:{type:"object",subtype:"array",description:r,overflow:n,properties:(n?t.slice(0,100):t).map((function(t,n){return i.getPropertyPreview4ArrayProperty(n,t,e)}))}}},t.prototype.getPropertyPreview4ArrayProperty=function(t,e,i){return this.getPropertyPreview4AnyValue(String(t),e,i)},t.prototype.getPropertyPreview4ObjectProperty=function(t,e,i){return e.get?{name:t,type:"accessor"}:e.set?void 0:this.getPropertyPreview4AnyValue(t,e.value,i)},t.prototype.getPropertyPreview4AnyValue=function(t,e,i){switch(void 0===i&&(i=!1),typeof e){case"object":if(Array.isArray(e)){var n={name:t,type:"object",subtype:"array",value:"Array("+e.length+")"};return i&&(n.valuePreview=this.getValuePreview4TableArray(e)),n}if(null===e)return{name:t,type:"object",subtype:"null",value:"null"};n={name:t,type:"object",value:e.constructor?e.constructor.name:"Object"};return i&&(n.valuePreview=this.getValuePreview4TableObject(e)),n;case"function":return{type:"function",value:"",name:t};default:return{name:t,type:typeof e,value:String(e)}}},t.prototype.getValuePreview4TableArray=function(t){var e=this;return{type:"object",subtype:"array",description:"Array("+t.length+")",overflow:!1,properties:t.map((function(t,i){return e.getPropertyPreview4AnyValue(String(i),t)}))}},t.prototype.getValuePreview4TableObject=function(t){var e=this;return{type:"object",description:"Object",overflow:!1,properties:Object.keys(t).map((function(i){return e.getPropertyPreview4AnyValue(i,t[i])}))}},t}(),kn=function(t,e){return(kn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};var Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function i(){this.constructor=t}kn(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),e.prototype.mapFrom=function(t){var e=this;return t.split("\n").slice(2).map((function(t,i){return e.testType1(t)?e.extractType1(t):e.testType2(t)?e.extractType2(t):void 0})).filter((function(t){return null!=t}))},e}(function(){function t(){this.e1=/\s*at\s(\S+)\s(\S+)\:(\d+)\:(\d+)\)/,this.e2=/\s*at\s(\S+)\:(\d+)\:(\d+)/}return t.prototype.testType1=function(t){return this.e1.test(t)},t.prototype.testType2=function(t){return this.e2.test(t)},t.prototype.extractType1=function(t){var e=t.match(this.e1);return null==e?null:{functionName:e[1],url:e[2].slice(1),lineNumber:Number(e[3]),columnNumber:Number(e[4])}},t.prototype.extractType2=function(t){var e=t.match(this.e2);return null==e?null:{functionName:"",url:e[1].slice(1),lineNumber:Number(e[2]),columnNumber:Number(e[3])}},t}()),Bn=function(){function t(){this.id=0,this.id2Object=new Map,this.object2Id=new Map}return t.prototype.save=function(t){if(this.object2Id.has(t))return this.object2Id.get(t);var e=this.getNextObjectId();return this.id2Object.set(e,t),this.object2Id.set(t,e),e},t.prototype.query=function(t){return this.id2Object.get(t)},t.prototype.clear=function(t){var e=this.id2Object.get(t);e&&(this.id2Object.delete(t),this.object2Id.delete(e))},t.prototype.clearAll=function(){this.id2Object.clear(),this.object2Id.clear()},t.prototype.getNextObjectId=function(){return this.id++,'{"injectedScriptId":1,"id":'+this.id+"}"},t}(),Tn=function(){function t(t,e){this.objectStore=t,this.objectMapper=e}return t.prototype.handle=function(t){var e=this.objectStore.query(t.objectId);return e?{result:this.mapObject(e,Boolean(t.ownProperties),Boolean(t.accessorPropertiesOnly))}:{result:[]}},t.prototype.mapObject=function(t,e,i){var n=this;if(e){var r=An(t),s=Object.keys(r).filter((function(t){return!(i&&!r[t].get&&!r[t].set)})).map((function(t){return n.mapResultOne(t,r[t],!0)}));return t.__proto__&&s.push(this.mapResultOne("__proto__",{configurable:!0,enumerable:!1,writable:!0,value:t.__proto__},!0)),s}for(var o=[],a={},u=t,c=!1,h=!0,l=function(){var t=An(u);if(Object.keys(t).forEach((function(e){if(!a[e]){a[e]=!0;var r=t[e];(!i||r.get||r.set)&&o.push(n.mapResultOne(e,r,h))}})),!c){var e=Object.getOwnPropertyDescriptor(u,"__proto__");e&&(c=!0,o.push(p.mapResultOne("__proto__",e,h)))}u=u.__proto__,h=!1},p=this;u;)l();return o},t.prototype.mapResultOne=function(t,e,i){var n={writable:e.writable,configurable:Boolean(e.configurable),enumerable:Boolean(e.enumerable),isOwn:i,name:String(t)};return"value"in e&&(n.value=this.objectMapper.mapFromOne(e.value)),e.get&&(n.get=this.objectMapper.mapFromOne(e.get)),e.set&&(n.set=this.objectMapper.mapFromOne(e.set)),n},t}(),Nn=function(){function t(){this.objectStore=new Bn,this.objectMapper=new wn(this.objectStore),this.callFramesMapper=new Sn,this.getPropertiesHandler=new Tn(this.objectStore,this.objectMapper)}return t.prototype.parseObject=function(t,e){return this.objectMapper.mapFromOne(t,e)},t.prototype.getProperties=function(t){return this.getPropertiesHandler.handle(t)},t.prototype.getObjectById=function(t){return this.objectStore.query(t)},t.prototype.consoleAPICalled=function(t,e,i){var n=t;return"warn"===t&&(n="warning"),{method:"Runtime.consoleAPICalled",params:{type:n,args:this.objectMapper.mapFrom(i,t),executionContextId:1,timestamp:Date.now(),stackTrace:{callFrames:this.callFramesMapper.mapFrom(e)}}}},t}(),Pn=function(){function t(t,e,i){this.manager=t,this.targetNode=i,this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber||0,this.scriptId=e.scriptId,this.id=this.scriptId+":"+this.lineNumber+":"+this.columnNumber,this.condition=e.condition,E(i,"__breakpointzxfg",this.id)}return t.prototype.destroy=function(){E(this.targetNode,"__breakpointzxfg",void 0),delete this.manager.id2BreakpointMap[this.id]},t}();function In(t,e,i){i(null,{});var n=t.getProtocolConnection();n.protocolDebuggerEnabled||(n.protocolDebuggerEnabled=!0,t.getScriptManager().emitAllScriptParsedEvents())}var On=Object.freeze({__proto__:null,enable:In,disable:function(t,e,i){t.getProtocolConnection().protocolDebuggerEnabled=!1,i(null,{})},setBreakpointsActive:function(t,e,i){var n=t.getBreakpointManager();e.active?(n.activate(),n.isActive4UserManual=!0):(n.inactivate(),n.isActive4UserManual=!1),i(null,{})},getPossibleBreakpoints:function(t,e,i){var n=e.start.scriptId,r=t.getScriptManager().getScript(n);if(r){var s=[];gn(r,e.start,e.end).forEach((function(t){s.push({columnNumber:t.loc.start.column,lineNumber:t.loc.start.line-1,scriptId:n})})),i(null,{locations:s})}else i(u.NormalError)},setBreakpointByUrl:function(t,e,i){var n,r=t.getScriptManager();if(e.url?n=r.getScriptByUrl(e.url):e.scriptHash&&(n=r.getScriptByHash(e.scriptHash)),n){for(var s,o=0;!s&&o<20;)s=gn(n,{lineNumber:e.lineNumber+o,columnNumber:e.columnNumber||0},null,{limit:1})[0],o+=1;if(!s)return i(u.NormalError),void g("[DEBUG] no breakpoint was found from line "+e.lineNumber+" to "+(e.lineNumber+o));var a=t.getBreakpointManager().setBreakpoint({scriptId:n.scriptId,lineNumber:s.loc.start.line-1,columnNumber:s.loc.start.column,condition:e.condition},s);i(null,{breakpointId:a.id,locations:[{scriptId:a.scriptId,lineNumber:a.lineNumber,columnNumber:a.columnNumber}]})}else i(u.NormalError)},removeBreakpoint:function(t,e,i){var n=e.breakpointId;n&&t.getBreakpointManager().removeBreakpoint(n),i(null,{})},resume:function(t,e,i){i(null,{})},pause:function(t,e,i){t.getBreakpointManager().pauseOnNextStatement=!0,i(null,{})},stepInto:function(t,e,i){t.getBreakpointManager().stepAction=3,i(null,{})},stepOut:function(t,e,i){t.getBreakpointManager().stepAction=1,i(null,{})},stepOver:function(t,e,i){t.getBreakpointManager().stepAction=2,i(null,{})},getScriptSource:function(t,e,i){var n=t.getScriptManager().getScript(e.scriptId);n?i(null,{scriptSource:n.source}):i(u.NormalError)},evaluateOnCallFrame:function(t,e,i){var n,r=e.callFrameId;if(t.getEngine().getRuntimeStatus().callFrames.some((function(t){if(t.callFrameId===r)return n=t,!0})),n){var s=t.getRemoteObjectParser();try{var o=t.getEngine().evaluate(e.expression,n.functionScope);i(null,{result:s.parseObject(o)})}catch(t){var a=F(t,"__rewrittenzxcd");i(null,{exceptionDetails:{columnNumber:20,exception:s.parseObject(t),exceptionId:a?a.id:100,lineNumber:0,text:"Uncaught"},result:s.parseObject(t)})}}else i(u.NormalError)},setPauseOnExceptions:function(t,e,i){switch(e.state){case"all":t.getBreakpointManager().pauseOnExceptionsState=2;break;case"uncaught":t.getBreakpointManager().pauseOnExceptionsState=1;break;case"none":t.getBreakpointManager().pauseOnExceptionsState=0}i(null,{})},setSkipAllPauses:function(t,e,i){i(null,{})}});function jn(t,e,i){i(null,{});var n=t.getSessionState(),s=n.executionContextId,o=n.executionContextName,a=t.getProtocolConnection();a.protocolRuntimeEnabled=!0,a.send({method:r.executionContextCreated,params:{context:{id:s,origin:"app://",name:o}}}),a.protocolPageEnabled||a.send({id:2,result:{}}),a.protocolPageGetResourceTree||a.send({id:3,result:{}}),a.onRuntimeEnabled()}var Mn=Object.freeze({__proto__:null,enable:jn,disable:function(t,e,i){t.getProtocolConnection().protocolRuntimeEnabled=!1,i(null,{})},getProperties:function(t,e,i){var n={result:t.getRemoteObjectParser().getProperties(e).result},r=t.getRemoteObjectParser().getObjectById(e.objectId);if("function"==typeof r){var s=F(r,"___func_locationxasdzzy");if(s){var o=s.node,a=s.scriptId,u=o.id;n.internalProperties=[{name:"[[FunctionLocation]]",value:{type:"object",description:"Object",subtype:"internal#location",value:{scriptId:a,lineNumber:(u?u.loc.start.line:o.loc.start.line)-1,columnNumber:u?u.loc.start.column:o.loc.start.column}}}]}}i(null,n)},callFunctionOn:function(t,e,i){var n=t.getRemoteObjectParser();if(e.functionDeclaration){var r=e.objectId?n.getObjectById(e.objectId):null;if(r){if(0===e.functionDeclaration.indexOf("function invokeGetter(arrayStr)"))try{var s=JSON.parse(e.arguments[0].value),o=r;return s.forEach((function(t){o=o[t]})),void i(null,{result:n.parseObject(o)})}catch(t){!function(t){i(null,{exceptionDetails:{columnNumber:20,exception:n.parseObject(t),exceptionId:100,lineNumber:0,text:"Uncaught"},result:n.parseObject(t)})}(t)}}}},evaluate:function(t,e,i){var n=e.disableBreaks||e.throwOnSideEffect,r=t.getRemoteObjectParser(),s=t.getBreakpointManager();try{var o=n?s.evaluateWithoutBreakpoint(e.expression):t.getEngine().evaluate(e.expression);i(null,{result:r.parseObject(o)})}catch(t){var a=F(t,"__rewrittenzxcd");i(null,{exceptionDetails:{columnNumber:20,exception:r.parseObject(t),exceptionId:a?a.id:100,lineNumber:0,text:"Uncaught"},result:r.parseObject(t)})}},compileScript:function(t,e,i){i(null,{})},releaseObjectGroup:function(t,e,i){i(null,{})},globalLexicalScopeNames:function(t,e,i){i(null,{names:[]})}});var Un=Object.freeze({__proto__:null,enable:function(t,e,i){t.getProtocolConnection().protocolPageEnabled=!0,i(null,{})},getResourceTree:function(t,e,i){t.getProtocolConnection().protocolPageGetResourceTree=!0,i(null,{})}}),zn=Object.freeze({__proto__:null,Debugger:On,Runtime:Mn,Page:Un}),Rn="https://hpmweb.alipay.com",_n="wss://hpmweb.alipay.com",Ln=function(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},Kn=function(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},Gn=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hn=function(){function t(t){this.container=t,this.messagesBeforeRuntimeEnabled=[],this.messagesBeforeWebsocketOpened=[],this.protocolPageEnabled=!1,this.protocolPageGetResourceTree=!1,this.protocolRuntimeEnabled=!1,this.protocolDebuggerEnabled=!1}return Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakpointManager",{get:function(){return this.container.getBreakpointManager()},enumerable:!1,configurable:!0}),t.prototype.open=function(){return Ln(this,void 0,void 0,(function(){var t,e,i=this;return Kn(this,(function(n){switch(n.label){case 0:return[4,this.sessionState.resolveChannelId()];case 1:return t=n.sent(),e=_n+"/bugme/client_w/"+t,this.ws=new(this.container.getWebSocketClientImpl()),this.ws.setUrl(e),this.ws.setSocketMessageHandler(this.onSocketMessage.bind(this)),this.ws.open(),this.messagesBeforeWebsocketOpened.length&&(this.messagesBeforeWebsocketOpened.forEach((function(t){i.ws.sendSocketMessage(t)})),this.messagesBeforeWebsocketOpened=[]),[2]}}))}))},t.prototype.send=function(t){this.ws?this.ws.sendSocketMessage(t):this.messagesBeforeWebsocketOpened.push(t)},t.prototype.sendAfterRuntimeEnabled=function(t){this.protocolRuntimeEnabled?this.send(t):this.messagesBeforeRuntimeEnabled.push(t)},t.prototype.onRuntimeEnabled=function(){var t=this;this.messagesBeforeRuntimeEnabled.length&&(this.messagesBeforeRuntimeEnabled.forEach((function(e){t.send(e)})),this.messagesBeforeRuntimeEnabled=[])},t.prototype.onFrontendJoin=function(){this.breakpointManager.activate()},t.prototype.onFrontendLeave=function(){this.breakpointManager.inactivate(),this.protocolPageEnabled=!1,this.protocolPageGetResourceTree=!1,this.protocolRuntimeEnabled=!1,this.protocolDebuggerEnabled=!1},t.prototype.onSocketMessage=function(t){var e,i=this;try{e=JSON.parse(t)}catch(e){return void("CLIENT:JOIN"===t?this.onFrontendJoin():"CLIENT:LEAVE"===t&&this.onFrontendLeave())}var n=Wn(e.method);n&&n(this.container,e.params,(function(t,n){t?i.ws.sendSocketMessage({id:e.id,error:{code:t,message:""}}):i.ws.sendSocketMessage({id:e.id,result:n})}))},t}();function Wn(t){var e,i,n=t.split("."),r=zn;try{for(var s=Gn(n),o=s.next();!o.done;o=s.next()){if(!(r=r[o.value]))break}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return r}var qn=function(){return(qn=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Vn=function(){function t(t){this.container=t,this.id2BreakpointMap={},this.isActive=!1,this.isActive4UserManual=!0,this.pauseOnExceptionsState=0,this.pauseOnNextStatement=!1,this.stepAction=0,this.breakpointCallStackDepth=0}return Object.defineProperty(t.prototype,"remoteObjectParser",{get:function(){return this.container.getRemoteObjectParser()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),t.prototype.activate=function(){this.isActive=!0},t.prototype.inactivate=function(){this.isActive=!1},t.prototype.get=function(t){return this.id2BreakpointMap[t]},t.prototype.setBreakpoint=function(t,e){var i=new Pn(this,t,e);return this.id2BreakpointMap[i.id]=i,i},t.prototype.removeBreakpoint=function(t){var e=this.id2BreakpointMap[t];e&&e.destroy()},t.prototype.pauseOnBreakpoint=function(t){this.handlePaused({method:i.paused,params:{callFrames:this.getBreakpointCallFrames(t),reason:c.Other,hitBreakpoints:[t.id]}})},t.prototype.pauseOnException=function(t,e,n,r){this.handlePaused({method:i.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:n.loc.start.line-1,columnNumber:n.loc.start.column}),data:qn(qn({},this.remoteObjectParser.parseObject(e)),{uncaught:r}),reason:c.Exception,hitBreakpoints:[]}})},t.prototype.pauseOnNode=function(t,e){this.handlePaused({method:i.paused,params:{callFrames:this.getBreakpointCallFrames({scriptId:t,lineNumber:e.loc.start.line-1,columnNumber:e.loc.start.column}),reason:c.Other,hitBreakpoints:[]}})},t.prototype.evaluateWithoutBreakpoint=function(t,e){var i=this.isActive;i&&this.inactivate();try{return this.container.getEngine().evaluate(t,e)}finally{i&&this.activate()}},t.prototype.getBreakpointCallFrames=function(t){var e,i=this,n=[],r=this.container.getEngine(),s=r.getRuntimeStatus().callFrames;return s.forEach((function(o,a){var u=o.functionNode,c=o.functionScope,h=s[a+1],l={lineNumber:h?h.callExpressionNode.loc.start.line-1:t.lineNumber,columnNumber:h?h.callExpressionNode.loc.start.column:t.columnNumber,scriptId:o.scriptId},p=x(null);f(c.context).forEach((function(t){"this"!==t&&(p[t]=c.context[t].value)}));var d=i.remoteObjectParser.parseObject(p),m=i.remoteObjectParser.parseObject(c.find("this").value);e||(e=i.remoteObjectParser.parseObject(r.globalObjectAccessor.globalObject));var D={callFrameId:o.callFrameId,functionName:o.functionName||"(anonymous)",functionLocation:{columnNumber:u.loc.start.column,lineNumber:u.loc.start.line-1,scriptId:o.scriptId},location:l,scopeChain:[{type:"local",object:d},{type:"global",object:e}],this:m,url:"https://gw.alipayobjects.com"};n.unshift(D)})),n},t.prototype.handlePaused=function(t){if(this.sessionState.channelId){this.isActive=!1,this.breakpointCallStackDepth=this.container.getEngine().getRuntimeStatus().callFrames.length,this.container.getPausedCoverView().show();var e=this.protocolConnection.messagesBeforeWebsocketOpened.length?this.protocolConnection.messagesBeforeWebsocketOpened.concat([t]):[t];this.protocolConnection.messagesBeforeWebsocketOpened=[],this.handleSyncRequest(e),this.container.getPausedCoverView().hide(),this.protocolConnection.send({method:i.resumed}),this.isActive4UserManual&&(this.isActive=!0)}else xn("skip breakpoint due to lacking of channelId")},t.prototype.handleSyncRequest=function(t){var i=this,n=Date.now(),r=this.container.getHttpClient().syncRequest({url:Rn+"/bugme/channel/paused",method:"POST",headers:{"content-type":"application/json;charset=UTF-8","channel-id":this.sessionState.channelId},body:t});if(xn("syncRequest response",r),r.error){if(Date.now()-n>=1e4)return this.handleSyncRequest(t);C("[DEBUG]",r.errorMessage)}else if(200===r.status){var s=void 0;if(r.data)try{s=JSON.parse(r.data)}catch(t){}var o=function(t){return t===e.resume||t===e.stepOver||t===e.stepInto||t===e.stepOut};if(s){var a=[],u=!1;Array.isArray(s)?s.forEach((function(t){o(t.method)&&(u=!0),a.push(i.handleProtocolResponse(t))})):s.method&&(u=o(s.method),a.push(this.handleProtocolResponse(s))),a.length&&(u?a.forEach((function(t){i.protocolConnection.send(t)})):this.handleSyncRequest(1===a.length?a[0]:a))}}else C("[DEBUG] breakpoint error "+JSON.stringify(r))},t.prototype.handleProtocolResponse=function(t){var e={id:t.id,result:{}},i=Wn(t.method);return i&&i(this.container,t.params,(function(i,n){e=i?{id:t.id,error:{code:i,message:""}}:{id:t.id,result:n}})),e},t}(),Yn=/\/\/# sourceMappingURL=(\S+)\s*$/,Jn=function(){function t(t){this.container=t,this.id2ScriptMap={},this.url2ScriptIdMap={}}return Object.defineProperty(t.prototype,"protocolConnection",{get:function(){return this.container.getProtocolConnection()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionState",{get:function(){return this.container.getSessionState()},enumerable:!1,configurable:!0}),t.prototype.getScript=function(t){return this.id2ScriptMap[t]},t.prototype.getScriptByUrl=function(t){var e=this.url2ScriptIdMap[t];if(e)return this.getScript(e)},t.prototype.getScriptByHash=function(t){var e=t.substring(4);if(e)return this.getScript(e)},t.prototype.addScript=function(t,e,i,n){var r="",s=e,o=e.match(Yn);o&&(r=o[1],s=e.substring(0,o.index)),this.id2ScriptMap[t]={scriptId:t,scriptHash:"hash"+t,source:s,ast:i,url:n||"",sourceMapURL:r},n&&(this.url2ScriptIdMap[n]=t),this.protocolConnection.protocolDebuggerEnabled&&this.emitScriptParsedEvent(t)},t.prototype.emitAllScriptParsedEvents=function(){var t=this;Object.keys(this.id2ScriptMap).forEach((function(e){t.id2ScriptMap[e].url&&t.emitScriptParsedEvent(e)}))},t.prototype.emitScriptParsedEvent=function(t){var e=this.id2ScriptMap[t];e&&this.container.getProtocolConnection().send({method:i.scriptParsed,params:{endColumn:0,endLine:2,executionContextId:this.sessionState.executionContextId,hasSourceURL:!1,hash:e.scriptHash,isLiveEdit:!1,isModule:!1,length:0,scriptId:t,scriptLanguage:"JavaScript",sourceMapURL:e.sourceMapURL,startColumn:0,startLine:0,url:e.url||""}})},t}(),$n=function(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},Xn=function(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},Qn=function(){function t(t,e){this.providerCtor=t,this.executionContextId=1,this.executionContextName="app",e.executionContextId&&(this.executionContextId=e.executionContextId),e.executionContextName&&(this.executionContextName=e.executionContextName),e.channelId&&(this._channelId=e.channelId)}return Object.defineProperty(t.prototype,"stateProvider",{get:function(){return this._stateProvider||(this._stateProvider=new this.providerCtor),this._stateProvider},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"channelId",{get:function(){return this._channelId?"boat_"+this._channelId:""},enumerable:!1,configurable:!0}),t.prototype.resolveExternalStateOnStart=function(){return $n(this,void 0,void 0,(function(){return Xn(this,(function(t){return[2,Promise.all([this.resolveChannelId()])]}))}))},t.prototype.resolveChannelId=function(){return $n(this,void 0,void 0,(function(){var t;return Xn(this,(function(e){switch(e.label){case 0:return this._channelId||(this._channelId=this.stateProvider.getChannelIdSync()),this._channelId||!this.stateProvider.getChannelId?[3,2]:(t=this,[4,this.stateProvider.getChannelId()]);case 1:t._channelId=e.sent(),e.label=2;case 2:return[2,this.channelId]}}))}))},t}(),Zn=function(){function t(t){this.userConfig=t}return t.prototype.getUserConfig=function(){return this.userConfig},t.prototype.getRemoteObjectParser=function(){return this.remoteObjectParser||(this.remoteObjectParser=new Nn),this.remoteObjectParser},t.prototype.getSessionState=function(){return this.sessionState||(this.sessionState=new Qn(this.stateProviderImpl,this.userConfig)),this.sessionState},t.prototype.getScriptManager=function(){return this.scriptManager||(this.scriptManager=new Jn(this)),this.scriptManager},t.prototype.getBreakpointManager=function(){return this.breakpointManager||(this.breakpointManager=new Vn(this)),this.breakpointManager},t.prototype.getProtocolConnection=function(){return this.protocolConnection||(this.protocolConnection=new Hn(this)),this.protocolConnection},t.prototype.setHttpClientImpl=function(t){this.httpClientImpl=t},t.prototype.getHttpClient=function(){return this.httpClientInstance||(this.httpClientInstance=new this.httpClientImpl),this.httpClientInstance},t.prototype.setWebSocketClientImpl=function(t){this.websocketClientImpl=t},t.prototype.getWebSocketClientImpl=function(){return this.websocketClientImpl},t.prototype.setPausedCoverViewImpl=function(t){this.pausedCoverViewImpl=t},t.prototype.getPausedCoverView=function(){return this.pausedCoverViewInstance||(this.pausedCoverViewInstance=new this.pausedCoverViewImpl),this.pausedCoverViewInstance},t.prototype.setEngineInstance=function(t){this.engine=t},t.prototype.getEngine=function(){return this.engine},t.prototype.setStateProviderImpl=function(t){this.stateProviderImpl=t},t}(),tr=function(){function t(t){if(this.options=t,this.container=new Zn(t),t.provider){var e=t.provider,i=e.httpClient,n=e.websocketClient,r=e.pausedCoverView,s=e.stateProvider;i?this.container.setHttpClientImpl(i):er("no provider.httpClient"),n?this.container.setWebSocketClientImpl(n):er("no provider.websocketClient"),r?this.container.setPausedCoverViewImpl(r):er("no provider.pausedCoverView"),s?this.container.setStateProviderImpl(s):er("no provider.stateProvider")}else er("no provider option");var o;this.breakpointManager=this.container.getBreakpointManager(),!1===t.console||t.consoleIsolation||(o=this.container,Cn.forEach((function(t){var e=p(console,t);e&&e.configurable&&(e.value=En(t,o),h(console,t,e))}))),t.stopAtEntry&&(jn(this.container,0,(function(){})),In(this.container,0,(function(){})),this.breakpointManager.activate(),this.breakpointManager.pauseOnNextStatement=!0),this.container.getSessionState().resolveExternalStateOnStart()}return t.prototype.setEngine=function(t){this.container.setEngineInstance(t),!1!==this.options.console&&this.options.consoleIsolation&&t.import({console:Fn(this.container)}),this.hookPromiseRejectionCallback(t)},t.prototype.connect=function(){try{this.container.getProtocolConnection().open()}catch(t){C(t)}},t.prototype.evaluateScript=function(t,e,i,n){this.container.getScriptManager().addScript(t,e,i,n)},t.prototype.hitBreakpoint=function(t,e){var i=this.breakpointManager;if(!i.isActive)return!1;var n=e.type;if(3===n)return this.pauseOnNode(t,e),!0;var r=F(e,"__breakpointzxfg");if(r){var s=i.get(r);if(s){if(xn("hit breakpoint",e.type,e),!s.condition)return i.pauseOnBreakpoint(s),!0;try{var o=this.container.getEngine().getRuntimeStatus().callFrames;if(i.evaluateWithoutBreakpoint(s.condition,o[o.length-1].functionScope))return i.pauseOnBreakpoint(s),!0}catch(t){}}}if(0!==i.stepAction&&vn(e)){switch(i.stepAction){case 3:return i.stepAction=0,this.pauseOnNode(t,e),!0;case 2:if(this.container.getEngine().getRuntimeStatus().callFrames.length<=i.breakpointCallStackDepth)return i.stepAction=0,this.pauseOnNode(t,e),!0;break;case 1:if(this.container.getEngine().getRuntimeStatus().callFrames.length<i.breakpointCallStackDepth)return i.stepAction=0,this.pauseOnNode(t,e),!0}return!1}return!(!i.pauseOnNextStatement||67===n)&&(i.pauseOnNextStatement=!1,this.pauseOnNode(t,e),!0)},t.prototype.shouldPauseOnException=function(t,e,i,n){var r=this.breakpointManager;if(r.isActive&&!F(e,"__pausedvxzg")){var s=r.pauseOnExceptionsState;2===s?(r.pauseOnException(t,e,i,n),E(e,"__pausedvxzg",1)):1===s&&n&&(r.pauseOnException(t,e,i,!0),E(e,"__pausedvxzg",1))}},t.prototype.pauseOnNode=function(t,e){var i=this.breakpointManager;i.isActive&&i.pauseOnNode(t,e)},t.prototype.throwException=function(t){var e=F(t,"__rewrittenzxcd");this.container.getProtocolConnection().send({method:r.exceptionThrown,params:{exceptionDetails:{columnNumber:20,exception:this.container.getRemoteObjectParser().parseObject(t),exceptionId:e?e.id:100,lineNumber:0,text:"Uncaught"},timestamp:Date.now()}})},t.prototype.hookPromiseRejectionCallback=function(t){var e=t.getHostGlobalObject(),i=e.onunhandledrejection,n=function(t){"function"==typeof i&&i.call(this,t),t&&t.reason&&C(t.reason)},r=p(e,"onunhandledrejection");r&&!r.configurable||h(e,"onunhandledrejection",{get:function(){return n},set:function(t){"function"==typeof t&&(i=t,r&&r.set&&r.set.call(this,t))},enumerable:!0,configurable:!0})},t}();function er(t){throw new Error("Failed to construct 'BoatmanInspector': "+t)}var ir,nr=self,rr=nr.importScripts,sr=nr.AlipayJSBridge,or=3e3;function ar(t,e){var i,n=function(t){return"https://alipay.kylinbridge/?data="+encodeURIComponent(t)}(function(t,e,i){var n="_sw_jsonp_"+ ++or;nr[n]=function(t){nr[n]=null,i(t)};var r={action:t,callback:n,data:e};return JSON.stringify(r)}(t,e,(function(t){i=t})));try{rr(n)}catch(t){}return"string"==typeof i?function(t){try{return JSON.parse(t)}catch(t){}}(i):i}"object"==typeof sr&&(ir={call:function(t,e,i){sr.call(t,e,i)},callSync:function(t,e){return sr.callSync?sr.callSync(t,e):ar(t,e)}});var ur,cr,hr=function(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},lr=function(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},pr=!1,dr=[];var fr,mr=new Promise((function(t){cr=t}));"object"==typeof my?(ur=my,cr()):"object"==typeof AFAppX&&"object"==typeof AFAppX.bridge?(ur=AFAppX.bridge,cr()):(fr=function(){ur=AFAppX.bridge,cr()},"undefined"!=typeof AFAppX?fr():(dr.push(fr),pr||(pr=!0,nr.importScripts=function(t){rr(t),/af-appx\.worker\.min\.js$/.test(t)&&(dr.forEach((function(t){return t()})),dr=[])})));var Dr=!1;function yr(){return hr(this,void 0,void 0,(function(){return lr(this,(function(t){switch(t.label){case 0:return Dr?[3,2]:[4,mr];case 1:return t.sent(),[2,new Promise((function(t){var e=function(){ur.call("getStartupParams"),Dr=!0,t()};try{e()}catch(t){setTimeout(e,600)}}))];case 2:return[2]}}))}))}var xr=function(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},vr=function(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},gr={callSync:function(t,e){return ir?ir.callSync(t,e):ur?ur.callSync(t,e):void 0},showRemoteDebugMask:function(t){return ir?ir.call("showRemoteDebugMask",t,(function(){})):ur?ur.call("showRemoteDebugMask",t):void 0},getStartupParams:function(){return xr(this,void 0,void 0,(function(){return vr(this,(function(t){switch(t.label){case 0:return[4,yr()];case 1:return t.sent(),[2,new Promise((function(t){ur.call("getStartupParams",{success:function(e){t(e)}})}))]}}))}))},connectSocket:function(t){return ur.connectSocket(t)}},Cr=1e3,br=function(){function t(){}return t.prototype.syncRequest=function(t){var e=gr.callSync("tyroRequest",{url:t.url,method:t.method||"GET",headers:t.headers,timeout:6e5,blockTimeout:6e5,requestTaskId:Cr++,data:"string"==typeof t.body?t.body:JSON.stringify(t.body)});return e?e.error?{result:e.error,errorMessage:e.errorMessage}:{status:e.status,data:e.data}:{error:1,errorMessage:"unknown"}},t}(),Er=function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Fr(t,e){var i,n,r=[],s=t.split(e);try{for(var o=Er(s),a=o.next();!a.done;a=o.next()){var u=a.value;r.push(parseInt(u,10))}}catch(t){i={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return r}var Ar=function(){function t(t){this.messageBeforeSocketOpen=[],this.url="",this.opened=!1,this.useFromRemoteDebugFlag=!1,t&&(this.url=t);var e=function(t){var e=t.match(/Ariver\/(\d+\.\d+\.\d+)/);if(e)return e[1]}("undefined"!=typeof navigator&&(navigator.swuserAgent||navigator.userAgent)||"");e&&function(t,e){if(t&&e){for(var i=Fr(t,"."),n=Fr(e,"."),r=0,s=0,o=void 0,a=void 0;s<i.length;s++){if((o=n[s]||0)>(a=i[s]||0)){r=-1;break}if(o<a){r=1;break}}return r}return 0}(e,"1.1.0")>=0&&(this.useFromRemoteDebugFlag=!0)}return Object.defineProperty(t.prototype,"isSocketOpened",{get:function(){return this.opened},enumerable:!1,configurable:!0}),t.prototype.getUrl=function(){return this.url},t.prototype.setUrl=function(t){this.url=t},t.prototype.open=function(){var t=this;setTimeout((function(){xn("call connection open"),t.socketTask=gr.connectSocket({url:t.url,multiple:!0,fromRemoteDebug:t.useFromRemoteDebugFlag,fail:function(e){t.onSocketError(e)}}),t.socketTask.onOpen((function(){t.handleSocketOpen()})),t.socketTask.onError((function(e){t.onSocketError(e.data)})),t.socketTask.onClose((function(){t.opened=!1,t.onSocketClose()})),t.socketTask.onMessage((function(e){t.opened||t.handleSocketOpen(),t.onSocketMessage(e.data.data)}))}),1500)},t.prototype.sendSocketMessage=function(t){var e="string"==typeof t?t:JSON.stringify(t);e.length>2e7||(this.opened?this.socketTask.send({data:e,isBuffer:!1,fromRemoteDebug:this.useFromRemoteDebugFlag}):this.messageBeforeSocketOpen.push(e))},t.prototype.close=function(){this.opened&&this.socketTask.close({fromRemoteDebug:this.useFromRemoteDebugFlag})},t.prototype.setSocketMessageHandler=function(t){this.externalMessageHandler=t},t.prototype.onSocketMessage=function(t){this.externalMessageHandler&&this.externalMessageHandler(t)},t.prototype.onSocketOpen=function(){},t.prototype.onSocketError=function(t){},t.prototype.onSocketClose=function(){},t.prototype.handleSocketOpen=function(){var t=this;this.opened||(this.opened=!0,this.messageBeforeSocketOpen.length&&(this.messageBeforeSocketOpen.forEach((function(e){t.sendSocketMessage(e)})),this.messageBeforeSocketOpen=[]),this.onSocketOpen())},t}(),wr=function(){function t(){this.pausedMessage="断点命中"}return t.prototype.setPausedMessage=function(t){this.pausedMessage=t},t.prototype.show=function(){gr.showRemoteDebugMask({text:" ",buttonTitle:this.pausedMessage,hide:!1})},t.prototype.hide=function(){gr.showRemoteDebugMask({hide:!0})},t}(),kr=function(t,e,i,n){return new(i||(i=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}u((n=n.apply(t,e||[])).next())}))},Sr=function(t,e){var i,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};function Br(){return kr(this,void 0,void 0,(function(){return Sr(this,(function(t){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.appId?[2,__appxStartupParams]:[2,gr.getStartupParams()]}))}))}var Tr,Nr=function(){function t(){}return t.prototype.getChannelId=function(){return kr(this,void 0,void 0,(function(){return Sr(this,(function(t){switch(t.label){case 0:return[4,Br()];case 1:return[2,t.sent().channelId]}}))}))},t.prototype.getChannelIdSync=function(){return"undefined"!=typeof __appxStartupParams&&__appxStartupParams.channelId?__appxStartupParams.channelId:""},t}(),Pr=0;t.boot=function(t,e,i){if(void 0===i&&(i={}),Pr++,!Tr){var n=new tr({stopAtEntry:i.stopAtEntry,provider:{httpClient:br,websocketClient:Ar,stateProvider:Nr,pausedCoverView:wr}});(Tr=new ln).setInspector(n)}Tr.run(t,e),1===Pr&&Tr.evaluate('console.warn("帮助提示:真机调试模式下小程序运行性能与真实性能有偏差,如需观察性能表现请使用真机预览")')},Object.defineProperty(t,"__esModule",{value:!0})}));