mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-12 22:00:02 -04:00
30 lines
190 KiB
JavaScript
30 lines
190 KiB
JavaScript
"use strict";(()=>{var Bi=Object.create;var ye=Object.defineProperty;var Vi=Object.getOwnPropertyDescriptor;var Mi=Object.getOwnPropertyNames;var ji=Object.getPrototypeOf,Ui=Object.prototype.hasOwnProperty;var Fi=(e,t,i)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Ut=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ge=(e,t)=>{for(var i in t)ye(e,i,{get:t[i],enumerable:!0})},$i=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Mi(t))!Ui.call(e,r)&&r!==i&&ye(e,r,{get:()=>t[r],enumerable:!(s=Vi(t,r))||s.enumerable});return e};var Te=(e,t,i)=>(i=e!=null?Bi(ji(e)):{},$i(t||!e||!e.__esModule?ye(i,"default",{value:e,enumerable:!0}):i,e));var Re=(e,t,i)=>(Fi(e,typeof t!="symbol"?t+"":t,i),i);var Le=Ut((ir,$t)=>{"use strict";function F(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Ft(e,t){for(var i="",s=0,r=-1,n=0,l,o=0;o<=e.length;++o){if(o<e.length)l=e.charCodeAt(o);else{if(l===47)break;l=47}if(l===47){if(!(r===o-1||n===1))if(r!==o-1&&n===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var c=i.lastIndexOf("/");if(c!==i.length-1){c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf("/")),r=o,n=0;continue}}else if(i.length===2||i.length===1){i="",s=0,r=o,n=0;continue}}t&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+e.slice(r+1,o):i=e.slice(r+1,o),s=o-r-1;r=o,n=0}else l===46&&n!==-1?++n:n=-1}return i}function Wi(e,t){var i=t.dir||t.root,s=t.base||(t.name||"")+(t.ext||"");return i?i===t.root?i+s:i+e+s:s}var K={resolve:function(){for(var t="",i=!1,s,r=arguments.length-1;r>=-1&&!i;r--){var n;r>=0?n=arguments[r]:(s===void 0&&(s=process.cwd()),n=s),F(n),n.length!==0&&(t=n+"/"+t,i=n.charCodeAt(0)===47)}return t=Ft(t,!i),i?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(F(t),t.length===0)return".";var i=t.charCodeAt(0)===47,s=t.charCodeAt(t.length-1)===47;return t=Ft(t,!i),t.length===0&&!i&&(t="."),t.length>0&&s&&(t+="/"),i?"/"+t:t},isAbsolute:function(t){return F(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,i=0;i<arguments.length;++i){var s=arguments[i];F(s),s.length>0&&(t===void 0?t=s:t+="/"+s)}return t===void 0?".":K.normalize(t)},relative:function(t,i){if(F(t),F(i),t===i||(t=K.resolve(t),i=K.resolve(i),t===i))return"";for(var s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var r=t.length,n=r-s,l=1;l<i.length&&i.charCodeAt(l)===47;++l);for(var o=i.length,c=o-l,h=n<c?n:c,u=-1,f=0;f<=h;++f){if(f===h){if(c>h){if(i.charCodeAt(l+f)===47)return i.slice(l+f+1);if(f===0)return i.slice(l+f)}else n>h&&(t.charCodeAt(s+f)===47?u=f:f===0&&(u=0));break}var x=t.charCodeAt(s+f),v=i.charCodeAt(l+f);if(x!==v)break;x===47&&(u=f)}var y="";for(f=s+u+1;f<=r;++f)(f===r||t.charCodeAt(f)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+i.slice(l+u):(l+=u,i.charCodeAt(l)===47&&++l,i.slice(l))},_makeLong:function(t){return t},dirname:function(t){if(F(t),t.length===0)return".";for(var i=t.charCodeAt(0),s=i===47,r=-1,n=!0,l=t.length-1;l>=1;--l)if(i=t.charCodeAt(l),i===47){if(!n){r=l;break}}else n=!1;return r===-1?s?"/":".":s&&r===1?"//":t.slice(0,r)},basename:function(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');F(t);var s=0,r=-1,n=!0,l;if(i!==void 0&&i.length>0&&i.length<=t.length){if(i.length===t.length&&i===t)return"";var o=i.length-1,c=-1;for(l=t.length-1;l>=0;--l){var h=t.charCodeAt(l);if(h===47){if(!n){s=l+1;break}}else c===-1&&(n=!1,c=l+1),o>=0&&(h===i.charCodeAt(o)?--o===-1&&(r=l):(o=-1,r=c))}return s===r?r=c:r===-1&&(r=t.length),t.slice(s,r)}else{for(l=t.length-1;l>=0;--l)if(t.charCodeAt(l)===47){if(!n){s=l+1;break}}else r===-1&&(n=!1,r=l+1);return r===-1?"":t.slice(s,r)}},extname:function(t){F(t);for(var i=-1,s=0,r=-1,n=!0,l=0,o=t.length-1;o>=0;--o){var c=t.charCodeAt(o);if(c===47){if(!n){s=o+1;break}continue}r===-1&&(n=!1,r=o+1),c===46?i===-1?i=o:l!==1&&(l=1):i!==-1&&(l=-1)}return i===-1||r===-1||l===0||l===1&&i===r-1&&i===s+1?"":t.slice(i,r)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return Wi("/",t)},parse:function(t){F(t);var i={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return i;var s=t.charCodeAt(0),r=s===47,n;r?(i.root="/",n=1):n=0;for(var l=-1,o=0,c=-1,h=!0,u=t.length-1,f=0;u>=n;--u){if(s=t.charCodeAt(u),s===47){if(!h){o=u+1;break}continue}c===-1&&(h=!1,c=u+1),s===46?l===-1?l=u:f!==1&&(f=1):l!==-1&&(f=-1)}return l===-1||c===-1||f===0||f===1&&l===c-1&&l===o+1?c!==-1&&(o===0&&r?i.base=i.name=t.slice(1,c):i.base=i.name=t.slice(o,c)):(o===0&&r?(i.name=t.slice(1,l),i.base=t.slice(1,c)):(i.name=t.slice(o,l),i.base=t.slice(o,c)),i.ext=t.slice(l,c)),o>0?i.dir=t.slice(0,o-1):r&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};K.posix=K;$t.exports=K});var pi=Ut((qr,re)=>{"use strict";var Q={decodeValues:!0,map:!1,silent:!1};function Je(e){return typeof e=="string"&&!!e.trim()}function et(e,t){var i=e.split(";").filter(Je),s=i.shift(),r=Ds(s),n=r.name,l=r.value;t=t?Object.assign({},Q,t):Q;try{l=t.decodeValues?decodeURIComponent(l):l}catch(c){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+l+"'. Set options.decodeValues to false to disable this feature.",c)}var o={name:n,value:l};return i.forEach(function(c){var h=c.split("="),u=h.shift().trimLeft().toLowerCase(),f=h.join("=");u==="expires"?o.expires=new Date(f):u==="max-age"?o.maxAge=parseInt(f,10):u==="secure"?o.secure=!0:u==="httponly"?o.httpOnly=!0:u==="samesite"?o.sameSite=f:o[u]=f}),o}function Ds(e){var t="",i="",s=e.split("=");return s.length>1?(t=s.shift(),i=s.join("=")):i=e,{name:t,value:i}}function li(e,t){if(t=t?Object.assign({},Q,t):Q,!e)return t.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var i=e.headers[Object.keys(e.headers).find(function(r){return r.toLowerCase()==="set-cookie"})];!i&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=i}if(Array.isArray(e)||(e=[e]),t=t?Object.assign({},Q,t):Q,t.map){var s={};return e.filter(Je).reduce(function(r,n){var l=et(n,t);return r[l.name]=l,r},s)}else return e.filter(Je).map(function(r){return et(r,t)})}function Bs(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],i=0,s,r,n,l,o;function c(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}function h(){return r=e.charAt(i),r!=="="&&r!==";"&&r!==","}for(;i<e.length;){for(s=i,o=!1;c();)if(r=e.charAt(i),r===","){for(n=i,i+=1,c(),l=i;i<e.length&&h();)i+=1;i<e.length&&e.charAt(i)==="="?(o=!0,i=l,t.push(e.substring(s,n)),s=i):i=n+1}else i+=1;(!o||i>=e.length)&&t.push(e.substring(s,e.length))}return t}re.exports=li;re.exports.parse=li;re.exports.parseString=et;re.exports.splitCookiesString=Bs});var Ht=Te(Le()),xe={"application/ecmascript":{source:"apache",compressible:!0,extensions:["ecma"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/http":{source:"iana"},"application/javascript":{source:"apache",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/mp4":{source:"iana",extensions:["mp4","mpg4","mp4s","m4p"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/sql":{source:"iana",extensions:["sql"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-gzip":{source:"apache"},"application/x-javascript":{compressible:!0},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/red":{source:"iana"},"audio/rtx":{source:"iana"},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/webp":{source:"iana",extensions:["webp"]},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/ecmascript":{source:"apache"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"text/markdown":{source:"iana",compressible:!0,extensions:["md","markdown"]}},qt=/^\s*([^;\s]*)(?:;|\s|$)/,Hi=/^text\//i,D={};function Wt(e){if(!e||typeof e!="string")return!1;var t=qt.exec(e),i=t&&xe[t[1].toLowerCase()];return i&&i.charset?i.charset:!(!t||!Hi.test(t[1]))&&"UTF-8"}function qi(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?D.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var i=D.charset(t);i&&(t+="; charset="+i.toLowerCase())}return t}function Gi(e){if(!e||typeof e!="string")return!1;var t=qt.exec(e),i=t&&D.extensions[t[1].toLowerCase()];return!(!i||!i.length)&&i[0]}function zi(e){if(!e||typeof e!="string")return!1;var t=(0,Ht.extname)("x."+e).toLowerCase().substr(1);return t&&D.types[t]||!1}function Ki(e,t){var i=["nginx","apache",void 0,"iana"];Object.keys(xe).forEach(function(s){var r=xe[s],n=r.extensions;if(n&&n.length){e[s]=n;for(var l=0;l<n.length;l++){var o=n[l];if(t[o]){var c=i.indexOf(xe[t[o]].source),h=i.indexOf(r.source);if(t[o]!=="application/octet-stream"&&(c>h||c===h&&t[o].substr(0,12)==="application/"))continue}t[o]=s}}})}D.charset=Wt,D.charsets={lookup:Wt},D.contentType=qi,D.extension=Gi,D.extensions=Object.create(null),D.lookup=zi,D.types=Object.create(null),Ki(D.extensions,D.types);var Gt=D;var qs=Te(Le(),1);var we={};ge(we,{deleteDB:()=>is,openDB:()=>je,unwrap:()=>J,wrap:()=>B});var Xi=(e,t)=>t.some(i=>e instanceof i),zt,Kt;function Qi(){return zt||(zt=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Yi(){return Kt||(Kt=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Xt=new WeakMap,De=new WeakMap,Qt=new WeakMap,Oe=new WeakMap,Ve=new WeakMap;function Zi(e){let t=new Promise((i,s)=>{let r=()=>{e.removeEventListener("success",n),e.removeEventListener("error",l)},n=()=>{i(B(e.result)),r()},l=()=>{s(e.error),r()};e.addEventListener("success",n),e.addEventListener("error",l)});return t.then(i=>{i instanceof IDBCursor&&Xt.set(i,e)}).catch(()=>{}),Ve.set(t,e),t}function Ji(e){if(De.has(e))return;let t=new Promise((i,s)=>{let r=()=>{e.removeEventListener("complete",n),e.removeEventListener("error",l),e.removeEventListener("abort",l)},n=()=>{i(),r()},l=()=>{s(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",n),e.addEventListener("error",l),e.addEventListener("abort",l)});De.set(e,t)}var Be={get(e,t,i){if(e instanceof IDBTransaction){if(t==="done")return De.get(e);if(t==="objectStoreNames")return e.objectStoreNames||Qt.get(e);if(t==="store")return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return B(e[t])},set(e,t,i){return e[t]=i,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Yt(e){Be=e(Be)}function es(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...i){let s=e.call(J(this),t,...i);return Qt.set(s,t.sort?t.sort():[t]),B(s)}:Yi().includes(e)?function(...t){return e.apply(J(this),t),B(Xt.get(this))}:function(...t){return B(e.apply(J(this),t))}}function ts(e){return typeof e=="function"?es(e):(e instanceof IDBTransaction&&Ji(e),Xi(e,Qi())?new Proxy(e,Be):e)}function B(e){if(e instanceof IDBRequest)return Zi(e);if(Oe.has(e))return Oe.get(e);let t=ts(e);return t!==e&&(Oe.set(e,t),Ve.set(t,e)),t}var J=e=>Ve.get(e);function je(e,t,{blocked:i,upgrade:s,blocking:r,terminated:n}={}){let l=indexedDB.open(e,t),o=B(l);return s&&l.addEventListener("upgradeneeded",c=>{s(B(l.result),c.oldVersion,c.newVersion,B(l.transaction),c)}),i&&l.addEventListener("blocked",c=>i(c.oldVersion,c.newVersion,c)),o.then(c=>{n&&c.addEventListener("close",()=>n()),r&&c.addEventListener("versionchange",h=>r(h.oldVersion,h.newVersion,h))}).catch(()=>{}),o}function is(e,{blocked:t}={}){let i=indexedDB.deleteDatabase(e);return t&&i.addEventListener("blocked",s=>t(s.oldVersion,s)),B(i).then(()=>{})}var ss=["get","getKey","getAll","getAllKeys","count"],rs=["put","add","delete","clear"],Me=new Map;function Zt(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Me.get(t))return Me.get(t);let i=t.replace(/FromIndex$/,""),s=t!==i,r=rs.includes(i);if(!(i in(s?IDBIndex:IDBObjectStore).prototype)||!(r||ss.includes(i)))return;let n=async function(l,...o){let c=this.transaction(l,r?"readwrite":"readonly"),h=c.store;return s&&(h=h.index(o.shift())),(await Promise.all([h[i](...o),r&&c.done]))[0]};return Me.set(t,n),n}Yt(e=>({...e,get:(t,i,s)=>Zt(t,i)||e.get(t,i,s),has:(t,i)=>!!Zt(t,i)||e.has(t,i)}));var be={};ge(be,{decode:()=>Fe,encode:()=>Ue});var{encode:Ue,decode:Fe}={encode(e){if(!e)return e;e=e.toString();let t=Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),i,s,r,n,l="",o=e.length%3;for(let c=0;c<e.length;){if((s=e.charCodeAt(c++))>255||(r=e.charCodeAt(c++))>255||(n=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");i=s<<16|r<<8|n,l+=t[i>>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]}return encodeURIComponent(o?l.slice(0,o-3)+"===".substr(o):l)},decode(e){if(!e)return e;let t={0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,"+":62,"/":63,"=":64},i;e=(e=decodeURIComponent(e.toString())).replace(/\s+/g,""),e+="==".slice(2-(3&e.length));let s,r,n="";for(let l=0;l<e.length;)i=t[e.charAt(l++)]<<18|t[e.charAt(l++)]<<12|(s=t[e.charAt(l++)])<<6|(r=t[e.charAt(l++)]),n+=s===64?String.fromCharCode(i>>16&255):r===64?String.fromCharCode(i>>16&255,i>>8&255):String.fromCharCode(i>>16&255,i>>8&255,255&i);return n}};function ns(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function L(e,t,i){return e(i={path:t,exports:{},require:function(s,r){return as(s,r??i.path)}},i.exports),i.exports}function as(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var I=L(function(e,t){t.__esModule=!0,t.isIdentifierChar=function(f,x){return f<48?f===36:f<58||!(f<65)&&(f<91||(f<97?f===95:f<123||(f<=65535?f>=170&&l.test(String.fromCharCode(f)):x!==!1&&(h(f,o)||h(f,c)))))},t.isIdentifierStart=function(f,x){return f<65?f===36:f<91||(f<97?f===95:f<123||(f<=65535?f>=170&&n.test(String.fromCharCode(f)):x!==!1&&h(f,o)))},t.reservedWords=t.keywords=t.keywordRelationalOperator=void 0,t.reservedWords={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"};let i="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";t.keywords={5:i,"5module":i+" export import",6:i+" const class extends export import super"},t.keywordRelationalOperator=/^in(stanceof)?$/;let s="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\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-\u1711\u171F-\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-\u1B4C\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-\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-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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-\uAB69\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",r="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",n=RegExp("["+s+"]"),l=RegExp("["+s+r+"]");s=r=null;let o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938],c=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];function h(u,f){let x=65536;for(let v=0;v<f.length;v+=2){if((x+=f[v])>u)return!1;if((x+=f[v+1])>=u)return!0}}}),p=L(function(e,t){t.__esModule=!0,t.types=t.keywords=t.TokenType=void 0;class i{constructor(u,f={}){this.label=u,this.keyword=f.keyword,this.beforeExpr=!!f.beforeExpr,this.startsExpr=!!f.startsExpr,this.isLoop=!!f.isLoop,this.isAssign=!!f.isAssign,this.prefix=!!f.prefix,this.postfix=!!f.postfix,this.binop=f.binop||null,this.updateContext=null}}function s(h,u){return new i(h,{beforeExpr:!0,binop:u})}t.TokenType=i;let r={beforeExpr:!0},n={startsExpr:!0},l={};function o(h,u={}){return u.keyword=h,l[h]=new i(h,u)}t.keywords=l;let c={num:new i("num",n),regexp:new i("regexp",n),string:new i("string",n),name:new i("name",n),privateId:new i("privateId",n),eof:new i("eof"),bracketL:new i("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new i("]"),braceL:new i("{",{beforeExpr:!0,startsExpr:!0}),braceR:new i("}"),parenL:new i("(",{beforeExpr:!0,startsExpr:!0}),parenR:new i(")"),comma:new i(",",r),semi:new i(";",r),colon:new i(":",r),dot:new i("."),question:new i("?",r),questionDot:new i("?."),arrow:new i("=>",r),template:new i("template"),invalidTemplate:new i("invalidTemplate"),ellipsis:new i("...",r),backQuote:new i("`",n),dollarBraceL:new i("${",{beforeExpr:!0,startsExpr:!0}),eq:new i("=",{beforeExpr:!0,isAssign:!0}),assign:new i("_=",{beforeExpr:!0,isAssign:!0}),incDec:new i("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new i("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:s("||",1),logicalAND:s("&&",2),bitwiseOR:s("|",3),bitwiseXOR:s("^",4),bitwiseAND:s("&",5),equality:s("==/!=/===/!==",6),relational:s("</>/<=/>=",7),bitShift:s("<</>>/>>>",8),plusMin:new i("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:s("%",10),star:s("*",10),slash:s("/",10),starstar:new i("**",{beforeExpr:!0}),coalesce:s("??",1),_break:o("break"),_case:o("case",r),_catch:o("catch"),_continue:o("continue"),_debugger:o("debugger"),_default:o("default",r),_do:o("do",{isLoop:!0,beforeExpr:!0}),_else:o("else",r),_finally:o("finally"),_for:o("for",{isLoop:!0}),_function:o("function",n),_if:o("if"),_return:o("return",r),_switch:o("switch"),_throw:o("throw",r),_try:o("try"),_var:o("var"),_const:o("const"),_while:o("while",{isLoop:!0}),_with:o("with"),_new:o("new",{beforeExpr:!0,startsExpr:!0}),_this:o("this",n),_super:o("super",n),_class:o("class",n),_extends:o("extends",r),_export:o("export"),_import:o("import",n),_null:o("null",n),_true:o("true",n),_false:o("false",n),_in:o("in",{beforeExpr:!0,binop:7}),_instanceof:o("instanceof",{beforeExpr:!0,binop:7}),_typeof:o("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:o("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:o("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})};t.types=c}),E=L(function(e,t){t.__esModule=!0,t.isNewLine=r,t.lineBreakG=t.lineBreak=void 0,t.nextLineBreak=function(l,o,c=l.length){for(let h=o;h<c;h++){let u=l.charCodeAt(h);if(r(u))return h<c-1&&u===13&&l.charCodeAt(h+1)===10?h+2:h+1}return-1},t.skipWhiteSpace=t.nonASCIIwhitespace=void 0;let i=/\r\n?|\n|\u2028|\u2029/;t.lineBreak=i;let s=RegExp(i.source,"g");function r(n){return n===10||n===13||n===8232||n===8233}t.lineBreakG=s,t.nonASCIIwhitespace=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,t.skipWhiteSpace=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g}),R=L(function(e,t){t.__esModule=!0,t.loneSurrogate=t.isArray=t.hasOwn=void 0,t.wordsRegexp=function(c){return RegExp("^(?:"+c.replace(/ /g,"|")+")$")};let i=Object.prototype,s=i.hasOwnProperty,r=i.toString,n=Object.hasOwn||((o,c)=>s.call(o,c));t.hasOwn=n;let l=Array.isArray||(o=>r.call(o)==="[object Array]");t.isArray=l,t.loneSurrogate=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/}),j=L(function(e,t){t.__esModule=!0,t.SourceLocation=t.Position=void 0,t.getLineInfo=function(r,n){for(let l=1,o=0;;){let c=(0,E.nextLineBreak)(r,o,n);if(c<0)return new i(l,n-o);++l,o=c}};class i{constructor(r,n){this.line=r,this.column=n}offset(r){return new i(this.line,this.column+r)}}t.Position=i,t.SourceLocation=class{constructor(r,n,l){this.start=n,this.end=l,r.sourceFile!==null&&(this.source=r.sourceFile)}}}),We=L(function(e,t){t.__esModule=!0,t.defaultOptions=void 0,t.getOptions=function(n){var l,o;let c={};for(let h in i)c[h]=n&&(0,R.hasOwn)(n,h)?n[h]:i[h];if(c.ecmaVersion==="latest"?c.ecmaVersion=1e8:c.ecmaVersion==null?(!s&&typeof console=="object"&&console.warn&&(s=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
Defaulting to 2020, but this will stop working in the future.`)),c.ecmaVersion=11):c.ecmaVersion>=2015&&(c.ecmaVersion-=2009),c.allowReserved==null&&(c.allowReserved=c.ecmaVersion<5),(0,R.isArray)(c.onToken)){let h=c.onToken;c.onToken=u=>h.push(u)}return(0,R.isArray)(c.onComment)&&(c.onComment=(l=c,o=c.onComment,function(h,u,f,x,v,y){let a={type:h?"Block":"Line",value:u,start:f,end:x};l.locations&&(a.loc=new j.SourceLocation(this,v,y)),l.ranges&&(a.range=[f,x]),o.push(a)})),c};let i={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};t.defaultOptions=i;let s=!1}),b=L(function(e,t){t.__esModule=!0,t.SCOPE_VAR=t.SCOPE_TOP=t.SCOPE_SUPER=t.SCOPE_SIMPLE_CATCH=t.SCOPE_GENERATOR=t.SCOPE_FUNCTION=t.SCOPE_DIRECT_SUPER=t.SCOPE_CLASS_STATIC_BLOCK=t.SCOPE_ASYNC=t.SCOPE_ARROW=t.BIND_VAR=t.BIND_SIMPLE_CATCH=t.BIND_OUTSIDE=t.BIND_NONE=t.BIND_LEXICAL=t.BIND_FUNCTION=void 0,t.functionFlags=function(s,r){return 2|(s?4:0)|(r?8:0)},t.SCOPE_VAR=259,t.SCOPE_CLASS_STATIC_BLOCK=256,t.SCOPE_DIRECT_SUPER=128,t.SCOPE_SUPER=64,t.SCOPE_SIMPLE_CATCH=32,t.SCOPE_ARROW=16,t.SCOPE_GENERATOR=8,t.SCOPE_ASYNC=4,t.SCOPE_FUNCTION=2,t.SCOPE_TOP=1,t.BIND_OUTSIDE=5,t.BIND_SIMPLE_CATCH=4,t.BIND_FUNCTION=3,t.BIND_LEXICAL=2,t.BIND_VAR=1,t.BIND_NONE=0}),T=L(function(e,t){t.__esModule=!0,t.Parser=void 0,t.Parser=class{constructor(s,r,n){this.options=s=(0,We.getOptions)(s),this.sourceFile=s.sourceFile,this.keywords=(0,R.wordsRegexp)(I.keywords[s.ecmaVersion>=6?6:s.sourceType==="module"?"5module":5]);let l="";s.allowReserved!==!0&&(l=I.reservedWords[s.ecmaVersion>=6?6:s.ecmaVersion===5?5:3],s.sourceType==="module"&&(l+=" await")),this.reservedWords=(0,R.wordsRegexp)(l);let o=(l?l+" ":"")+I.reservedWords.strict;this.reservedWordsStrict=(0,R.wordsRegexp)(o),this.reservedWordsStrictBind=(0,R.wordsRegexp)(o+" "+I.reservedWords.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
|
|
`,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E.lineBreak).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=p.types.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=s.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&s.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(b.SCOPE_TOP),this.regexpState=null,this.privateNameStack=[]}parse(){let s=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(s)}get inFunction(){return(this.currentVarScope().flags&b.SCOPE_FUNCTION)>0}get inGenerator(){return(this.currentVarScope().flags&b.SCOPE_GENERATOR)>0&&!this.currentVarScope().inClassFieldInit}get inAsync(){return(this.currentVarScope().flags&b.SCOPE_ASYNC)>0&&!this.currentVarScope().inClassFieldInit}get canAwait(){for(let s=this.scopeStack.length-1;s>=0;s--){let r=this.scopeStack[s];if(r.inClassFieldInit||r.flags&b.SCOPE_CLASS_STATIC_BLOCK)return!1;if(r.flags&b.SCOPE_FUNCTION)return(r.flags&b.SCOPE_ASYNC)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction}get allowSuper(){let s=this.currentThisScope(),r=s.flags,n=s.inClassFieldInit;return(r&b.SCOPE_SUPER)>0||n||this.options.allowSuperOutsideMethod}get allowDirectSuper(){return(this.currentThisScope().flags&b.SCOPE_DIRECT_SUPER)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}get allowNewDotTarget(){let s=this.currentThisScope(),r=s.flags,n=s.inClassFieldInit;return(r&(b.SCOPE_FUNCTION|b.SCOPE_CLASS_STATIC_BLOCK))>0||n}get inClassStaticBlock(){return(this.currentVarScope().flags&b.SCOPE_CLASS_STATIC_BLOCK)>0}static extend(...s){let r=this;for(let n=0;n<s.length;n++)r=s[n](r);return r}static parse(s,r){return new this(r,s).parse()}static parseExpressionAt(s,r,n){let l=new this(n,s,r);return l.nextToken(),l.parseExpression()}static tokenizer(s,r){return new this(r,s)}}}),Ce=L(function(e,t){t.__esModule=!0,t.DestructuringErrors=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};let i=T.Parser.prototype,s=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;i.strictDirective=function(r){for(;;){E.skipWhiteSpace.lastIndex=r,r+=E.skipWhiteSpace.exec(this.input)[0].length;let n=s.exec(this.input.slice(r));if(!n||(n[1]||n[2])==="use strict")return!1;r+=n[0].length,E.skipWhiteSpace.lastIndex=r,r+=E.skipWhiteSpace.exec(this.input)[0].length,this.input[r]===";"&&r++}},i.eat=function(r){return this.type===r&&(this.next(),!0)},i.isContextual=function(r){return this.type===p.types.name&&this.value===r&&!this.containsEsc},i.eatContextual=function(r){return!!this.isContextual(r)&&(this.next(),!0)},i.expectContextual=function(r){this.eatContextual(r)||this.unexpected()},i.canInsertSemicolon=function(){return this.type===p.types.eof||this.type===p.types.braceR||E.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},i.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},i.semicolon=function(){this.eat(p.types.semi)||this.insertSemicolon()||this.unexpected()},i.afterTrailingComma=function(r,n){if(this.type===r)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),n||this.next(),!0},i.expect=function(r){this.eat(r)||this.unexpected()},i.unexpected=function(r){this.raise(r??this.start,"Unexpected token")},i.checkPatternErrors=function(r,n){if(!r)return;r.trailingComma>-1&&this.raiseRecoverable(r.trailingComma,"Comma is not permitted after the rest element");let l=n?r.parenthesizedAssign:r.parenthesizedBind;l>-1&&this.raiseRecoverable(l,"Parenthesized pattern")},i.checkExpressionErrors=function(r,n){if(!r)return!1;let l=r.shorthandAssign,o=r.doubleProto;if(!n)return l>=0||o>=0;l>=0&&this.raise(l,"Shorthand property assignments are valid only in destructuring patterns"),o>=0&&this.raiseRecoverable(o,"Redefinition of __proto__ property")},i.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},i.isSimpleAssignTarget=function(r){return r.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(r.expression):r.type==="Identifier"||r.type==="MemberExpression"}});function ee(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=os(e))||t&&e&&typeof e.length=="number"){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function os(e,t){if(e){if(typeof e=="string")return Jt(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Jt(e,t)}}function Jt(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}var _=T.Parser.prototype;_.parseTopLevel=function(e){let t=Object.create(null);for(e.body||(e.body=[]);this.type!==p.types.eof;){let r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var i=0,s=Object.keys(this.undefinedExports);i<s.length;i++){let r=s[i];this.raiseRecoverable(this.undefinedExports[r].start,`Export '${r}' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var He={kind:"loop"},cs={kind:"switch"};_.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;E.skipWhiteSpace.lastIndex=this.pos;let t=E.skipWhiteSpace.exec(this.input),i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(s===91||s===92||s>55295&&s<56320)return!0;if(e)return!1;if(s===123)return!0;if((0,I.isIdentifierStart)(s,!0)){let r=i+1;for(;(0,I.isIdentifierChar)(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;let n=this.input.slice(i,r);if(!I.keywordRelationalOperator.test(n))return!0}return!1},_.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;E.skipWhiteSpace.lastIndex=this.pos;let e=E.skipWhiteSpace.exec(this.input),t=this.pos+e[0].length,i;return!E.lineBreak.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!((0,I.isIdentifierChar)(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))},_.parseStatement=function(e,t,i){let s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=p.types._var,n="let"),s){case p.types._break:case p.types._continue:return this.parseBreakContinueStatement(r,s.keyword);case p.types._debugger:return this.parseDebuggerStatement(r);case p.types._do:return this.parseDoStatement(r);case p.types._for:return this.parseForStatement(r);case p.types._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case p.types._class:return e&&this.unexpected(),this.parseClass(r,!0);case p.types._if:return this.parseIfStatement(r);case p.types._return:return this.parseReturnStatement(r);case p.types._switch:return this.parseSwitchStatement(r);case p.types._throw:return this.parseThrowStatement(r);case p.types._try:return this.parseTryStatement(r);case p.types._const:case p.types._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case p.types._while:return this.parseWhileStatement(r);case p.types._with:return this.parseWithStatement(r);case p.types.braceL:return this.parseBlock(!0,r);case p.types.semi:return this.parseEmptyStatement(r);case p.types._export:case p.types._import:if(this.options.ecmaVersion>10&&s===p.types._import){E.skipWhiteSpace.lastIndex=this.pos;let c=E.skipWhiteSpace.exec(this.input),h=this.pos+c[0].length,u=this.input.charCodeAt(h);if(u===40||u===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===p.types._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);let l=this.value,o=this.parseExpression();return s===p.types.name&&o.type==="Identifier"&&this.eat(p.types.colon)?this.parseLabeledStatement(r,l,o,e):this.parseExpressionStatement(r,o)}},_.parseBreakContinueStatement=function(e,t){let i=t==="break";this.next(),this.eat(p.types.semi)||this.insertSemicolon()?e.label=null:this.type!==p.types.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());let s=0;for(;s<this.labels.length;++s){let r=this.labels[s];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||e.label&&i))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")},_.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},_.parseDoStatement=function(e){return this.next(),this.labels.push(He),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(p.types._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(p.types.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},_.parseForStatement=function(e){this.next();let t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(He),this.enterScope(0),this.expect(p.types.parenL),this.type===p.types.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);let i=this.isLet();if(this.type===p.types._var||this.type===p.types._const||i){let o=this.startNode(),c=i?"let":this.value;return this.next(),this.parseVar(o,!0,c),this.finishNode(o,"VariableDeclaration"),(this.type===p.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&o.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===p.types._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,o)):(t>-1&&this.unexpected(t),this.parseFor(e,o))}let s=this.isContextual("let"),r=!1,n=new Ce.DestructuringErrors,l=this.parseExpression(!(t>-1)||"await",n);return this.type===p.types._in||(r=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===p.types._in?t>-1&&this.unexpected(t):e.await=t>-1),s&&r&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,n),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(n,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},_.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,te|(i?0:qe),!1,t)},_.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(p.types._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},_.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(p.types.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},_.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(p.types.braceL),this.labels.push(cs),this.enterScope(0);let t;for(let i=!1;this.type!==p.types.braceR;)if(this.type===p.types._case||this.type===p.types._default){let s=this.type===p.types._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(p.types.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},_.parseThrowStatement=function(e){return this.next(),E.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ls=[];_.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===p.types._catch){let t=this.startNode();if(this.next(),this.eat(p.types.parenL)){t.param=this.parseBindingAtom();let i=t.param.type==="Identifier";this.enterScope(i?b.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(t.param,i?b.BIND_SIMPLE_CATCH:b.BIND_LEXICAL),this.expect(p.types.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(p.types._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},_.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},_.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(He),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},_.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},_.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},_.parseLabeledStatement=function(e,t,i,s){for(var r,n=ee(this.labels);!(r=n()).done;)r.value.name===t&&this.raise(i.start,"Label '"+t+"' is already declared");let l=this.type.isLoop?"loop":this.type===p.types._switch?"switch":null;for(let o=this.labels.length-1;o>=0;o--){let c=this.labels[o];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=l;else break}return this.labels.push({name:t,kind:l,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")},_.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},_.parseBlock=function(e=!0,t=this.startNode(),i){for(t.body=[],this.expect(p.types.braceL),e&&this.enterScope(0);this.type!==p.types.braceR;){let s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},_.parseFor=function(e,t){return e.init=t,this.expect(p.types.semi),e.test=this.type===p.types.semi?null:this.parseExpression(),this.expect(p.types.semi),e.update=this.type===p.types.parenR?null:this.parseExpression(),this.expect(p.types.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},_.parseForIn=function(e,t){let i=this.type===p.types._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,`${i?"for-in":"for-of"} loop variable declaration may not have an initializer`),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(p.types.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")},_.parseVar=function(e,t,i){for(e.declarations=[],e.kind=i;;){let s=this.startNode();if(this.parseVarId(s,i),this.eat(p.types.eq)?s.init=this.parseMaybeAssign(t):i!=="const"||this.type===p.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")?s.id.type==="Identifier"||t&&(this.type===p.types._in||this.isContextual("of"))?s.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(p.types.comma))break}return e},_.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?b.BIND_VAR:b.BIND_LEXICAL,!1)};var te=1,qe=2;function ps(e,t){let i=t.key.name,s=e[i],r="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(r=(t.static?"s":"i")+t.kind),s==="iget"&&r==="iset"||s==="iset"&&r==="iget"||s==="sget"&&r==="sset"||s==="sset"&&r==="sget"?(e[i]="true",!1):!!s||(e[i]=r,!1)}function _e(e,t){let i=e.computed,s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}function $e(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=hs(e))||t&&e&&typeof e.length=="number"){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hs(e,t){if(e){if(typeof e=="string")return ei(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ei(e,t)}}function ei(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}_.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===p.types.star&&t&qe&&this.unexpected(),e.generator=this.eat(p.types.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&te&&(e.id=4&t&&this.type!==p.types.name?null:this.parseIdent(),e.id&&!(t&qe)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?b.BIND_VAR:b.BIND_LEXICAL:b.BIND_FUNCTION));let n=this.yieldPos,l=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,b.functionFlags)(e.async,e.generator)),t&te||(e.id=this.type===p.types.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=l,this.awaitIdentPos=o,this.finishNode(e,t&te?"FunctionDeclaration":"FunctionExpression")},_.parseFunctionParams=function(e){this.expect(p.types.parenL),e.params=this.parseBindingList(p.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},_.parseClass=function(e,t){this.next();let i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);let s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(p.types.braceL);this.type!==p.types.braceR;){let l=this.parseClassElement(e.superClass!==null);l&&(r.body.push(l),l.type==="MethodDefinition"&&l.kind==="constructor"?(n&&this.raise(l.start,"Duplicate constructor in the same class"),n=!0):l.key&&l.key.type==="PrivateIdentifier"&&ps(s,l)&&this.raiseRecoverable(l.key.start,`Identifier '#${l.key.name}' has already been declared`))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},_.parseClassElement=function(e){if(this.eat(p.types.semi))return null;let t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,l="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(p.types.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===p.types.star?o=!0:s="static"}if(i.static=o,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===p.types.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(p.types.star)&&(r=!0),!s&&!n&&!r){let c=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?l=c:s=c)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===p.types.parenL||l!=="method"||r||n){let c=!i.static&&_e(i,"constructor");c&&l!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":l,this.parseClassMethod(i,r,n,c&&e)}else this.parseClassField(i);return i},_.isClassElementNameStart=function(){return this.type===p.types.name||this.type===p.types.privateId||this.type===p.types.num||this.type===p.types.string||this.type===p.types.bracketL||this.type.keyword},_.parseClassElementName=function(e){this.type===p.types.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},_.parseClassMethod=function(e,t,i,s){let r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&_e(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");let n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},_.parseClassField=function(e){if(_e(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&_e(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(p.types.eq)){let t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},_.parseClassStaticBlock=function(e){e.body=[];let t=this.labels;for(this.labels=[],this.enterScope(b.SCOPE_CLASS_STATIC_BLOCK|b.SCOPE_SUPER);this.type!==p.types.braceR;){let i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},_.parseClassId=function(e,t){this.type===p.types.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,b.BIND_LEXICAL,!1)):(t===!0&&this.unexpected(),e.id=null)},_.parseClassSuper=function(e){e.superClass=this.eat(p.types._extends)?this.parseExprSubscripts(!1):null},_.enterClassBody=function(){let e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},_.exitClassBody=function(){let e=this.privateNameStack.pop(),t=e.declared,i=e.used,s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1];for(let n=0;n<i.length;++n){let l=i[n];(0,R.hasOwn)(t,l.name)||(r?r.used.push(l):this.raiseRecoverable(l.start,`Private field '#${l.name}' must be declared in an enclosing class`))}},_.parseExport=function(e,t){if(this.next(),this.eat(p.types.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==p.types.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(p.types._default)){this.checkExport(t,"default",this.lastTokStart);let r;if(this.type===p.types._function||(r=this.isAsyncFunction())){let n=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(n,4|te,!1,r)}else if(this.type===p.types._class){let n=this.startNode();e.declaration=this.parseClass(n,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==p.types.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i,s=ee(e.specifiers);!(i=s()).done;){let r=i.value;this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},_.checkExport=function(e,t,i){e&&((0,R.hasOwn)(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)},_.checkPatternExport=function(e,t){let i=t.type;if(i==="Identifier")this.checkExport(e,t.name,t.start);else if(i==="ObjectPattern")for(var s,r=ee(t.properties);!(s=r()).done;){let o=s.value;this.checkPatternExport(e,o)}else if(i==="ArrayPattern")for(var n,l=ee(t.elements);!(n=l()).done;){let o=n.value;o&&this.checkPatternExport(e,o)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"?this.checkPatternExport(e,t.argument):i==="ParenthesizedExpression"&&this.checkPatternExport(e,t.expression)},_.checkVariableExport=function(e,t){if(e)for(var i,s=ee(t);!(i=s()).done;){let r=i.value;this.checkPatternExport(e,r.id)}},_.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},_.parseExportSpecifiers=function(e){let t=[],i=!0;for(this.expect(p.types.braceL);!this.eat(p.types.braceR);){if(i)i=!1;else if(this.expect(p.types.comma),this.afterTrailingComma(p.types.braceR))break;let s=this.startNode();s.local=this.parseModuleExportName(),s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local,this.checkExport(e,s.exported[s.exported.type==="Identifier"?"name":"value"],s.exported.start),t.push(this.finishNode(s,"ExportSpecifier"))}return t},_.parseImport=function(e){return this.next(),this.type===p.types.string?(e.specifiers=ls,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===p.types.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},_.parseImportSpecifiers=function(){let e=[],t=!0;if(this.type===p.types.name){let i=this.startNode();if(i.local=this.parseIdent(),this.checkLValSimple(i.local,b.BIND_LEXICAL),e.push(this.finishNode(i,"ImportDefaultSpecifier")),!this.eat(p.types.comma))return e}if(this.type===p.types.star){let i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdent(),this.checkLValSimple(i.local,b.BIND_LEXICAL),e.push(this.finishNode(i,"ImportNamespaceSpecifier")),e}for(this.expect(p.types.braceL);!this.eat(p.types.braceR);){if(t)t=!1;else if(this.expect(p.types.comma),this.afterTrailingComma(p.types.braceR))break;let i=this.startNode();i.imported=this.parseModuleExportName(),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLValSimple(i.local,b.BIND_LEXICAL),e.push(this.finishNode(i,"ImportSpecifier"))}return e},_.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===p.types.string){let e=this.parseLiteral(this.value);return R.loneSurrogate.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},_.adaptDirectivePrologue=function(e){for(let t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},_.isDirectiveCandidate=function(e){return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var M=T.Parser.prototype;M.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s,r=$e(e.properties);!(s=r()).done;){let n=s.value;this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e},M.toAssignableList=function(e,t){let i=e.length;for(let s=0;s<i;s++){let r=e[s];r&&this.toAssignable(r,t)}if(i){let s=e[i-1];this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier"&&this.unexpected(s.argument.start)}return e},M.parseSpread=function(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},M.parseRestBinding=function(){let e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==p.types.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},M.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case p.types.bracketL:let e=this.startNode();return this.next(),e.elements=this.parseBindingList(p.types.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case p.types.braceL:return this.parseObj(!0)}return this.parseIdent()},M.parseBindingList=function(e,t,i){let s=[],r=!0;for(;!this.eat(e);)if(r?r=!1:this.expect(p.types.comma),t&&this.type===p.types.comma)s.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===p.types.ellipsis){let n=this.parseRestBinding();this.parseBindingListItem(n),s.push(n),this.type===p.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else{let n=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(n),s.push(n)}}return s},M.parseBindingListItem=function(e){return e},M.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(p.types.eq))return i;let s=this.startNodeAt(e,t);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")},M.checkLValSimple=function(e,t=b.BIND_NONE,i){let s=t!==b.BIND_NONE;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===b.BIND_LEXICAL&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&((0,R.hasOwn)(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==b.BIND_OUTSIDE&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}},M.checkLValPattern=function(e,t=b.BIND_NONE,i){switch(e.type){case"ObjectPattern":for(var s,r=$e(e.properties);!(s=r()).done;){let o=s.value;this.checkLValInnerPattern(o,t,i)}break;case"ArrayPattern":for(var n,l=$e(e.elements);!(n=l()).done;){let o=n.value;o&&this.checkLValInnerPattern(o,t,i)}break;default:this.checkLValSimple(e,t,i)}},M.checkLValInnerPattern=function(e,t=b.BIND_NONE,i){switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var X=L(function(e,t){t.__esModule=!0,t.types=t.TokContext=void 0;class i{constructor(l,o,c,h,u){this.token=l,this.isExpr=!!o,this.preserveSpace=!!c,this.override=h,this.generator=!!u}}t.TokContext=i;let s={b_stat:new i("{",!1),b_expr:new i("{",!0),b_tmpl:new i("${",!1),p_stat:new i("(",!1),p_expr:new i("(",!0),q_tmpl:new i("`",!0,!0,n=>n.tryReadTemplateToken()),f_stat:new i("function",!1),f_expr:new i("function",!0),f_expr_gen:new i("function",!0,!1,null,!0),f_gen:new i("function",!1,!1,null,!0)};t.types=s;let r=T.Parser.prototype;r.initialContext=function(){return[s.b_stat]},r.curContext=function(){return this.context[this.context.length-1]},r.braceIsBlock=function(n){let l=this.curContext();return l===s.f_expr||l===s.f_stat||(n===p.types.colon&&(l===s.b_stat||l===s.b_expr)?!l.isExpr:n===p.types._return||n===p.types.name&&this.exprAllowed?E.lineBreak.test(this.input.slice(this.lastTokEnd,this.start)):n===p.types._else||n===p.types.semi||n===p.types.eof||n===p.types.parenR||n===p.types.arrow||(n===p.types.braceL?l===s.b_stat:n!==p.types._var&&n!==p.types._const&&n!==p.types.name&&!this.exprAllowed))},r.inGeneratorContext=function(){for(let n=this.context.length-1;n>=1;n--){let l=this.context[n];if(l.token==="function")return l.generator}return!1},r.updateContext=function(n){let l,o=this.type;o.keyword&&n===p.types.dot?this.exprAllowed=!1:(l=o.updateContext)?l.call(this,n):this.exprAllowed=o.beforeExpr},r.overrideContext=function(n){this.curContext()!==n&&(this.context[this.context.length-1]=n)},p.types.parenR.updateContext=p.types.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}let n=this.context.pop();n===s.b_stat&&this.curContext().token==="function"&&(n=this.context.pop()),this.exprAllowed=!n.isExpr},p.types.braceL.updateContext=function(n){this.context.push(this.braceIsBlock(n)?s.b_stat:s.b_expr),this.exprAllowed=!0},p.types.dollarBraceL.updateContext=function(){this.context.push(s.b_tmpl),this.exprAllowed=!0},p.types.parenL.updateContext=function(n){let l=n===p.types._if||n===p.types._for||n===p.types._with||n===p.types._while;this.context.push(l?s.p_stat:s.p_expr),this.exprAllowed=!0},p.types.incDec.updateContext=function(){},p.types._function.updateContext=p.types._class.updateContext=function(n){!n.beforeExpr||n===p.types._else||n===p.types.semi&&this.curContext()!==s.p_stat||n===p.types._return&&E.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))||(n===p.types.colon||n===p.types.braceL)&&this.curContext()===s.b_stat?this.context.push(s.f_stat):this.context.push(s.f_expr),this.exprAllowed=!1},p.types.backQuote.updateContext=function(){this.curContext()===s.q_tmpl?this.context.pop():this.context.push(s.q_tmpl),this.exprAllowed=!1},p.types.star.updateContext=function(n){if(n===p.types._function){let l=this.context.length-1;this.context[l]===s.f_expr?this.context[l]=s.f_expr_gen:this.context[l]=s.f_gen}this.exprAllowed=!0},p.types.name.updateContext=function(n){let l=!1;this.options.ecmaVersion>=6&&n!==p.types.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(l=!0),this.exprAllowed=l}});function ti(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=us(e))||t&&e&&typeof e.length=="number"){i&&(e=i);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(e,t){if(e){if(typeof e=="string")return ii(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ii(e,t)}}function ii(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,s=Array(t);i<t;i++)s[i]=e[i];return s}var C=T.Parser.prototype;function ni(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ni(e.expression)}C.checkPropClash=function(e,t,i){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement"||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;let s=e.key,r;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}let n=e.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&n==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}let l=t[r="$"+r];if(l){let o;(o=n==="init"?this.strict&&l.init||l.get||l.set:l.init||l[n])&&this.raiseRecoverable(s.start,"Redefinition of property")}else l=t[r]={init:!1,get:!1,set:!1};l[n]=!0},C.parseExpression=function(e,t){let i=this.start,s=this.startLoc,r=this.parseMaybeAssign(e,t);if(this.type===p.types.comma){let n=this.startNodeAt(i,s);for(n.expressions=[r];this.eat(p.types.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return r},C.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}let s=!1,r=-1,n=-1,l=-1;t?(r=t.parenthesizedAssign,n=t.trailingComma,l=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Ce.DestructuringErrors,s=!0);let o=this.start,c=this.startLoc;(this.type===p.types.parenL||this.type===p.types.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");let h=this.parseMaybeConditional(e,t);if(i&&(h=i.call(this,h,o,c)),this.type.isAssign){let u=this.startNodeAt(o,c);return u.operator=this.value,this.type===p.types.eq&&(h=this.toAssignable(h,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=h.start&&(t.shorthandAssign=-1),this.type===p.types.eq?this.checkLValPattern(h):this.checkLValSimple(h),u.left=h,this.next(),u.right=this.parseMaybeAssign(e),l>-1&&(t.doubleProto=l),this.finishNode(u,"AssignmentExpression")}return s&&this.checkExpressionErrors(t,!0),r>-1&&(t.parenthesizedAssign=r),n>-1&&(t.trailingComma=n),h},C.parseMaybeConditional=function(e,t){let i=this.start,s=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(this.eat(p.types.question)){let n=this.startNodeAt(i,s);return n.test=r,n.consequent=this.parseMaybeAssign(),this.expect(p.types.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return r},C.parseExprOps=function(e,t){let i=this.start,s=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,s,-1,e)},C.parseExprOp=function(e,t,i,s,r){let n=this.type.binop;if(n!=null&&(!r||this.type!==p.types._in)&&n>s){let l=this.type===p.types.logicalOR||this.type===p.types.logicalAND,o=this.type===p.types.coalesce;o&&(n=p.types.logicalAND.binop);let c=this.value;this.next();let h=this.start,u=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),h,u,n,r),x=this.buildBinary(t,i,e,f,c,l||o);return(l&&this.type===p.types.coalesce||o&&(this.type===p.types.logicalOR||this.type===p.types.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(x,t,i,s,r)}return e},C.buildBinary=function(e,t,i,s,r,n){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");let l=this.startNodeAt(e,t);return l.left=i,l.operator=r,l.right=s,this.finishNode(l,n?"LogicalExpression":"BinaryExpression")},C.parseMaybeUnary=function(e,t,i,s){let r=this.start,n=this.startLoc,l;if(this.isContextual("await")&&this.canAwait)l=this.parseAwait(s),t=!0;else if(this.type.prefix){let o=this.startNode(),c=this.type===p.types.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,c,s),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&o.argument.type==="Identifier"?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&ni(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,l=this.finishNode(o,c?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==p.types.privateId){if(l=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return l;for(;this.type.postfix&&!this.canInsertSemicolon();){let o=this.startNodeAt(r,n);o.operator=this.value,o.prefix=!1,o.argument=l,this.checkLValSimple(l),this.next(),l=this.finishNode(o,"UpdateExpression")}}else(s||this.privateNameStack.length===0)&&this.unexpected(),l=this.parsePrivateIdent(),this.type!==p.types._in&&this.unexpected();return!i&&this.eat(p.types.starstar)?t?void this.unexpected(this.lastTokStart):this.buildBinary(r,n,l,this.parseMaybeUnary(null,!1,!1,s),"**",!1):l},C.parseExprSubscripts=function(e,t){let i=this.start,s=this.startLoc,r=this.parseExprAtom(e,t);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;let n=this.parseSubscripts(r,i,s,!1,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n},C.parseSubscripts=function(e,t,i,s,r){let n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,l=!1;for(;;){let o=this.parseSubscript(e,t,i,s,n,l,r);if(o.optional&&(l=!0),o===e||o.type==="ArrowFunctionExpression"){if(l){let c=this.startNodeAt(t,i);c.expression=o,o=this.finishNode(c,"ChainExpression")}return o}e=o}},C.parseSubscript=function(e,t,i,s,r,n,l){let o=this.options.ecmaVersion>=11,c=o&&this.eat(p.types.questionDot);s&&c&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let h=this.eat(p.types.bracketL);if(h||c&&this.type!==p.types.parenL&&this.type!==p.types.backQuote||this.eat(p.types.dot)){let u=this.startNodeAt(t,i);u.object=e,h?(u.property=this.parseExpression(),this.expect(p.types.bracketR)):this.type===p.types.privateId&&e.type!=="Super"?u.property=this.parsePrivateIdent():u.property=this.parseIdent(this.options.allowReserved!=="never"),u.computed=!!h,o&&(u.optional=c||u.object.optional),e=this.finishNode(u,"MemberExpression")}else if(!s&&this.eat(p.types.parenL)){let u=new Ce.DestructuringErrors,f=this.yieldPos,x=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let y=this.parseExprList(p.types.parenR,this.options.ecmaVersion>=8,!1,u);if(r&&!c&&!this.canInsertSemicolon()&&this.eat(p.types.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=x,this.awaitIdentPos=v,this.parseArrowExpression(this.startNodeAt(t,i),y,!0,l);this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=x||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;let a=this.startNodeAt(t,i);a.callee=e,a.arguments=y,o&&(a.optional=c),e=this.finishNode(a,"CallExpression")}else if(this.type===p.types.backQuote){(c||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let u=this.startNodeAt(t,i);u.tag=e,u.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(u,"TaggedTemplateExpression")}return e},C.parseExprAtom=function(e,t){this.type===p.types.slash&&this.readRegexp();let i,s=this.potentialArrowAt===this.start;switch(this.type){case p.types._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),i=this.startNode(),this.next(),this.type!==p.types.parenL||this.allowDirectSuper||this.raise(i.start,"super() call outside constructor of a subclass"),this.type!==p.types.dot&&this.type!==p.types.bracketL&&this.type!==p.types.parenL&&this.unexpected(),this.finishNode(i,"Super");case p.types._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case p.types.name:let r=this.start,n=this.startLoc,l=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!l&&o.name==="async"&&!this.canInsertSemicolon()&&this.eat(p.types._function))return this.overrideContext(X.types.f_expr),this.parseFunction(this.startNodeAt(r,n),0,!1,!0,t);if(s&&!this.canInsertSemicolon()){if(this.eat(p.types.arrow))return this.parseArrowExpression(this.startNodeAt(r,n),[o],!1,t);if(this.options.ecmaVersion>=8&&o.name==="async"&&this.type===p.types.name&&!l&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return o=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(p.types.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,n),[o],!0,t)}return o;case p.types.regexp:let c=this.value;return(i=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},i;case p.types.num:case p.types.string:return this.parseLiteral(this.value);case p.types._null:case p.types._true:case p.types._false:return(i=this.startNode()).value=this.type===p.types._null?null:this.type===p.types._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case p.types.parenL:let h=this.start,u=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case p.types.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(p.types.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case p.types.braceL:return this.overrideContext(X.types.b_expr),this.parseObj(!1,e);case p.types._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case p.types._class:return this.parseClass(this.startNode(),!1);case p.types._new:return this.parseNew();case p.types.backQuote:return this.parseTemplate();case p.types._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},C.parseExprImport=function(){let e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");let t=this.parseIdent(!0);switch(this.type){case p.types.parenL:return this.parseDynamicImport(e);case p.types.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},C.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(p.types.parenR)){let t=this.start;this.eat(p.types.comma)&&this.eat(p.types.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},C.parseImportMeta=function(e){this.next();let t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType==="module"||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},C.parseLiteral=function(e){let t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},C.parseParenExpression=function(){this.expect(p.types.parenL);let e=this.parseExpression();return this.expect(p.types.parenR),e},C.parseParenAndDistinguishExpression=function(e,t){let i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();let l=this.start,o=this.startLoc,c=[],h=!0,u=!1,f=new Ce.DestructuringErrors,x=this.yieldPos,v=this.awaitPos,y;for(this.yieldPos=0,this.awaitPos=0;this.type!==p.types.parenR;){if(h?h=!1:this.expect(p.types.comma),n&&this.afterTrailingComma(p.types.parenR,!0)){u=!0;break}if(this.type===p.types.ellipsis){y=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===p.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}let a=this.lastTokEnd,d=this.lastTokEndLoc;if(this.expect(p.types.parenR),e&&!this.canInsertSemicolon()&&this.eat(p.types.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=x,this.awaitPos=v,this.parseParenArrowList(i,s,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),y&&this.unexpected(y),this.checkExpressionErrors(f,!0),this.yieldPos=x||this.yieldPos,this.awaitPos=v||this.awaitPos,c.length>1?((r=this.startNodeAt(l,o)).expressions=c,this.finishNodeAt(r,"SequenceExpression",a,d)):r=c[0]}else r=this.parseParenExpression();if(!this.options.preserveParens)return r;{let l=this.startNodeAt(i,s);return l.expression=r,this.finishNode(l,"ParenthesizedExpression")}},C.parseParenItem=function(e){return e},C.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var ds=[];C.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");let e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(p.types.dot)){e.meta=t;let n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}let i=this.start,s=this.startLoc,r=this.type===p.types._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),i,s,!0,!1),r&&e.callee.type==="ImportExpression"&&this.raise(i,"Cannot use new with import()"),this.eat(p.types.parenL)?e.arguments=this.parseExprList(p.types.parenR,this.options.ecmaVersion>=8,!1):e.arguments=ds,this.finishNode(e,"NewExpression")},C.parseTemplateElement=function({isTagged:e}){let t=this.startNode();return this.type===p.types.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),t.value={raw:this.value,cooked:null}):t.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
`),cooked:this.value},this.next(),t.tail=this.type===p.types.backQuote,this.finishNode(t,"TemplateElement")},C.parseTemplate=function({isTagged:e=!1}={}){let t=this.startNode();this.next(),t.expressions=[];let i=this.parseTemplateElement({isTagged:e});for(t.quasis=[i];!i.tail;)this.type===p.types.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(p.types.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(p.types.braceR),t.quasis.push(i=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(t,"TemplateLiteral")},C.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===p.types.name||this.type===p.types.num||this.type===p.types.string||this.type===p.types.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===p.types.star)&&!E.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))},C.parseObj=function(e,t){let i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(p.types.braceR);){if(s)s=!1;else if(this.expect(p.types.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(p.types.braceR))break;let n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")},C.parseProperty=function(e,t){let i=this.startNode(),s,r,n,l;if(this.options.ecmaVersion>=9&&this.eat(p.types.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===p.types.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(this.type===p.types.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),i.argument=this.parseMaybeAssign(!1,t),this.type===p.types.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,l=this.startLoc),e||(s=this.eat(p.types.star)));let o=this.containsEsc;return this.parsePropertyName(i),!e&&!o&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(p.types.star),this.parsePropertyName(i,t)):r=!1,this.parsePropertyValue(i,e,s,r,n,l,t,o),this.finishNode(i,"Property")},C.parsePropertyValue=function(e,t,i,s,r,n,l,o){if((i||s)&&this.type===p.types.colon&&this.unexpected(),this.eat(p.types.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,l),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===p.types.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s);else if(t||o||!(this.options.ecmaVersion>=5)||e.computed||e.key.type!=="Identifier"||e.key.name!=="get"&&e.key.name!=="set"||this.type===p.types.comma||this.type===p.types.braceR||this.type===p.types.eq)this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===p.types.eq&&l?(l.shorthandAssign<0&&(l.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected();else{(i||s)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);let c=e.kind==="get"?0:1;if(e.value.params.length!==c){let h=e.value.start;e.kind==="get"?this.raiseRecoverable(h,"getter should have no params"):this.raiseRecoverable(h,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},C.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(p.types.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(p.types.bracketR),e.key;e.computed=!1}return e.key=this.type===p.types.num||this.type===p.types.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},C.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},C.parseMethod=function(e,t,i){let s=this.startNode(),r=this.yieldPos,n=this.awaitPos,l=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope((0,b.functionFlags)(t,s.generator)|b.SCOPE_SUPER|(i?b.SCOPE_DIRECT_SUPER:0)),this.expect(p.types.parenL),s.params=this.parseBindingList(p.types.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=l,this.finishNode(s,"FunctionExpression")},C.parseArrowExpression=function(e,t,i,s){let r=this.yieldPos,n=this.awaitPos,l=this.awaitIdentPos;return this.enterScope((0,b.functionFlags)(i,!1)|b.SCOPE_ARROW),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=l,this.finishNode(e,"ArrowFunctionExpression")},C.parseFunctionBody=function(e,t,i,s){let r=t&&this.type!==p.types.braceL,n=this.strict,l=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{let o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||o)&&(l=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");let c=this.labels;this.labels=[],l&&(this.strict=!0),this.checkParams(e,!n&&!l&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,b.BIND_OUTSIDE),e.body=this.parseBlock(!1,void 0,l&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},C.isSimpleParamList=function(e){for(var t,i=ti(e);!(t=i()).done;)if(t.value.type!=="Identifier")return!1;return!0},C.checkParams=function(e,t){let i=Object.create(null);for(var s,r=ti(e.params);!(s=r()).done;){let n=s.value;this.checkLValInnerPattern(n,b.BIND_VAR,t?null:i)}},C.parseExprList=function(e,t,i,s){let r=[],n=!0;for(;!this.eat(e);){if(n)n=!1;else if(this.expect(p.types.comma),t&&this.afterTrailingComma(e))break;let l;i&&this.type===p.types.comma?l=null:this.type===p.types.ellipsis?(l=this.parseSpread(s),s&&this.type===p.types.comma&&s.trailingComma<0&&(s.trailingComma=this.start)):l=this.parseMaybeAssign(!1,s),r.push(l)}return r},C.checkUnreserved=function({start:e,end:t,name:i}){if(this.inGenerator&&i==="yield"&&this.raiseRecoverable(e,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&i==="await"&&this.raiseRecoverable(e,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&i==="arguments"&&this.raiseRecoverable(e,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(i==="arguments"||i==="await")&&this.raise(e,`Cannot use ${i} in class static initialization block`),this.keywords.test(i)&&this.raise(e,`Unexpected keyword '${i}'`),this.options.ecmaVersion<6&&this.input.slice(e,t).indexOf("\\")!==-1)return;(this.strict?this.reservedWordsStrict:this.reservedWords).test(i)&&(this.inAsync||i!=="await"||this.raiseRecoverable(e,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(e,`The keyword '${i}' is reserved`))},C.parseIdent=function(e,t){let i=this.startNode();return this.type===p.types.name?i.name=this.value:this.type.keyword?(i.name=this.type.keyword,(i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(i,"Identifier"),e||(this.checkUnreserved(i),i.name!=="await"||this.awaitIdentPos||(this.awaitIdentPos=i.start)),i},C.parsePrivateIdent=function(){let e=this.startNode();return this.type===p.types.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.privateNameStack.length===0?this.raise(e.start,`Private field '#${e.name}' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e),e},C.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);let t=this.startNode();return this.next(),this.type===p.types.semi||this.canInsertSemicolon()||this.type!==p.types.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(p.types.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},C.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);let t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var ve=T.Parser.prototype;ve.raise=function(e,t){let i=(0,j.getLineInfo)(this.input,e),s=SyntaxError(t+=" ("+i.line+":"+i.column+")");throw s.pos=e,s.loc=i,s.raisedAt=this.pos,s},ve.raiseRecoverable=ve.raise,ve.curPosition=function(){if(this.options.locations)return new j.Position(this.curLine,this.pos-this.lineStart)};var H=T.Parser.prototype,Ge=class{constructor(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1}};H.enterScope=function(e){this.scopeStack.push(new Ge(e))},H.exitScope=function(){this.scopeStack.pop()},H.treatFunctionsAsVarInScope=function(e){return e.flags&b.SCOPE_FUNCTION||!this.inModule&&e.flags&b.SCOPE_TOP},H.declareName=function(e,t,i){let s=!1;if(t===b.BIND_LEXICAL){let r=this.currentScope();s=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&b.SCOPE_TOP&&delete this.undefinedExports[e]}else if(t===b.BIND_SIMPLE_CATCH)this.currentScope().lexical.push(e);else if(t===b.BIND_FUNCTION){let r=this.currentScope();s=this.treatFunctionsAsVar?r.lexical.indexOf(e)>-1:r.lexical.indexOf(e)>-1||r.var.indexOf(e)>-1,r.functions.push(e)}else for(let r=this.scopeStack.length-1;r>=0;--r){let n=this.scopeStack[r];if(n.lexical.indexOf(e)>-1&&!(n.flags&b.SCOPE_SIMPLE_CATCH&&n.lexical[0]===e)||!this.treatFunctionsAsVarInScope(n)&&n.functions.indexOf(e)>-1){s=!0;break}if(n.var.push(e),this.inModule&&n.flags&b.SCOPE_TOP&&delete this.undefinedExports[e],n.flags&b.SCOPE_VAR)break}s&&this.raiseRecoverable(i,`Identifier '${e}' has already been declared`)},H.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},H.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},H.currentVarScope=function(){for(let e=this.scopeStack.length-1;;e--){let t=this.scopeStack[e];if(t.flags&b.SCOPE_VAR)return t}},H.currentThisScope=function(){for(let e=this.scopeStack.length-1;;e--){let t=this.scopeStack[e];if(t.flags&b.SCOPE_VAR&&!(t.flags&b.SCOPE_ARROW))return t}};var si=L(function(e,t){t.__esModule=!0,t.Node=void 0;class i{constructor(l,o,c){this.type="",this.start=o,this.end=0,l.options.locations&&(this.loc=new j.SourceLocation(l,c)),l.options.directSourceFile&&(this.sourceFile=l.options.directSourceFile),l.options.ranges&&(this.range=[o,0])}}t.Node=i;let s=T.Parser.prototype;function r(n,l,o,c){return n.type=l,n.end=o,this.options.locations&&(n.loc.end=c),this.options.ranges&&(n.range[1]=o),n}s.startNode=function(){return new i(this,this.start,this.startLoc)},s.startNodeAt=function(n,l){return new i(this,n,l)},s.finishNode=function(n,l){return r.call(this,n,l,this.lastTokEnd,this.lastTokEndLoc)},s.finishNodeAt=function(n,l,o,c){return r.call(this,n,l,o,c)},s.copyNode=function(n){let l=new i(this,n.start,this.startLoc);for(let o in n)l[o]=n[o];return l}}),fs=L(function(e,t){t.__esModule=!0,t.default=void 0;let i="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",s=i+" Extended_Pictographic",r=s,n=r+" EBase EComp EMod EPres ExtPict",l={9:i,10:s,11:r,12:n,13:n},o="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",c="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",h=c+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",u=h+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",f=u+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",x={9:c,10:h,11:u,12:f,13:f+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"},v={};function y(m){let g=v[m]={binary:(0,R.wordsRegexp)(l[m]+" "+o),nonBinary:{General_Category:(0,R.wordsRegexp)(o),Script:(0,R.wordsRegexp)(x[m])}};g.nonBinary.Script_Extensions=g.nonBinary.Script,g.nonBinary.gc=g.nonBinary.General_Category,g.nonBinary.sc=g.nonBinary.Script,g.nonBinary.scx=g.nonBinary.Script_Extensions}for(var a=0,d=[9,10,11,12,13];a<d.length;a++){let m=d[a];y(m)}t.default=v,e.exports=t.default}),ms=L(function(e,t){t.__esModule=!0,t.RegExpValidationState=void 0;var i,s=(i=fs,i&&i.__esModule?i:{default:i});function r(a,d){(d==null||d>a.length)&&(d=a.length);for(var m=0,g=Array(d);m<d;m++)g[m]=a[m];return g}let n=T.Parser.prototype;function l(a){return a<=65535?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,(1023&a)+56320)}function o(a){return a===36||a>=40&&a<=43||a===46||a===63||a>=91&&a<=94||a>=123&&a<=125}function c(a){return a>=65&&a<=90||a>=97&&a<=122}function h(a){return c(a)||a===95}function u(a){return h(a)||f(a)}function f(a){return a>=48&&a<=57}function x(a){return a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102}function v(a){return a>=65&&a<=70?10+(a-65):a>=97&&a<=102?10+(a-97):a-48}function y(a){return a>=48&&a<=55}t.RegExpValidationState=class{constructor(d){this.parser=d,this.validFlags=`gim${d.options.ecmaVersion>=6?"uy":""}${d.options.ecmaVersion>=9?"s":""}${d.options.ecmaVersion>=13?"d":""}`,this.unicodeProperties=s.default[d.options.ecmaVersion>=13?13:d.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]}reset(d,m,g){let w=g.indexOf("u")!==-1;this.start=0|d,this.source=m+"",this.flags=g,this.switchU=w&&this.parser.options.ecmaVersion>=6,this.switchN=w&&this.parser.options.ecmaVersion>=9}raise(d){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /${this.source}/: ${d}`)}at(d,m=!1){let g=this.source,w=g.length;if(d>=w)return-1;let S=g.charCodeAt(d);if(!(m||this.switchU)||S<=55295||S>=57344||d+1>=w)return S;let A=g.charCodeAt(d+1);return A>=56320&&A<=57343?(S<<10)+A-56613888:S}nextIndex(d,m=!1){let g=this.source,w=g.length;if(d>=w)return w;let S=g.charCodeAt(d),A;return!(m||this.switchU)||S<=55295||S>=57344||d+1>=w||(A=g.charCodeAt(d+1))<56320||A>57343?d+1:d+2}current(d=!1){return this.at(this.pos,d)}lookahead(d=!1){return this.at(this.nextIndex(this.pos,d),d)}advance(d=!1){this.pos=this.nextIndex(this.pos,d)}eat(d,m=!1){return this.current(m)===d&&(this.advance(m),!0)}},n.validateRegExpFlags=function(a){let d=a.validFlags,m=a.flags;for(let g=0;g<m.length;g++){let w=m.charAt(g);d.indexOf(w)===-1&&this.raise(a.start,"Invalid regular expression flag"),m.indexOf(w,g+1)>-1&&this.raise(a.start,"Duplicate regular expression flag")}},n.validateRegExpPattern=function(a){this.regexp_pattern(a),!a.switchN&&this.options.ecmaVersion>=9&&a.groupNames.length>0&&(a.switchN=!0,this.regexp_pattern(a))},n.regexp_pattern=function(a){a.pos=0,a.lastIntValue=0,a.lastStringValue="",a.lastAssertionIsQuantifiable=!1,a.numCapturingParens=0,a.maxBackReference=0,a.groupNames.length=0,a.backReferenceNames.length=0,this.regexp_disjunction(a),a.pos!==a.source.length&&(a.eat(41)&&a.raise("Unmatched ')'"),(a.eat(93)||a.eat(125))&&a.raise("Lone quantifier brackets")),a.maxBackReference>a.numCapturingParens&&a.raise("Invalid escape");for(var d,m=function(w,S){var A=typeof Symbol<"u"&&w[Symbol.iterator]||w["@@iterator"];if(A)return(A=A.call(w)).next.bind(A);if(Array.isArray(w)||(A=function(U,jt){if(U){if(typeof U=="string")return r(U,jt);var z=Object.prototype.toString.call(U).slice(8,-1);if(z==="Object"&&U.constructor&&(z=U.constructor.name),z==="Map"||z==="Set")return Array.from(U);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return r(U,jt)}}(w))){A&&(w=A);var P=0;return function(){return P>=w.length?{done:!0}:{done:!1,value:w[P++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(a.backReferenceNames);!(d=m()).done;){let g=d.value;a.groupNames.indexOf(g)===-1&&a.raise("Invalid named capture referenced")}},n.regexp_disjunction=function(a){for(this.regexp_alternative(a);a.eat(124);)this.regexp_alternative(a);this.regexp_eatQuantifier(a,!0)&&a.raise("Nothing to repeat"),a.eat(123)&&a.raise("Lone quantifier brackets")},n.regexp_alternative=function(a){for(;a.pos<a.source.length&&this.regexp_eatTerm(a););},n.regexp_eatTerm=function(a){return this.regexp_eatAssertion(a)?(a.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(a)&&a.switchU&&a.raise("Invalid quantifier"),!0):(a.switchU?!!this.regexp_eatAtom(a):!!this.regexp_eatExtendedAtom(a))&&(this.regexp_eatQuantifier(a),!0)},n.regexp_eatAssertion=function(a){let d=a.pos;if(a.lastAssertionIsQuantifiable=!1,a.eat(94)||a.eat(36))return!0;if(a.eat(92)){if(a.eat(66)||a.eat(98))return!0;a.pos=d}if(a.eat(40)&&a.eat(63)){let m=!1;if(this.options.ecmaVersion>=9&&(m=a.eat(60)),a.eat(61)||a.eat(33))return this.regexp_disjunction(a),a.eat(41)||a.raise("Unterminated group"),a.lastAssertionIsQuantifiable=!m,!0}return a.pos=d,!1},n.regexp_eatQuantifier=function(a,d=!1){return!!this.regexp_eatQuantifierPrefix(a,d)&&(a.eat(63),!0)},n.regexp_eatQuantifierPrefix=function(a,d){return a.eat(42)||a.eat(43)||a.eat(63)||this.regexp_eatBracedQuantifier(a,d)},n.regexp_eatBracedQuantifier=function(a,d){let m=a.pos;if(a.eat(123)){let g=0,w=-1;if(this.regexp_eatDecimalDigits(a)&&(g=a.lastIntValue,a.eat(44)&&this.regexp_eatDecimalDigits(a)&&(w=a.lastIntValue),a.eat(125)))return w!==-1&&w<g&&!d&&a.raise("numbers out of order in {} quantifier"),!0;a.switchU&&!d&&a.raise("Incomplete quantifier"),a.pos=m}return!1},n.regexp_eatAtom=function(a){return this.regexp_eatPatternCharacters(a)||a.eat(46)||this.regexp_eatReverseSolidusAtomEscape(a)||this.regexp_eatCharacterClass(a)||this.regexp_eatUncapturingGroup(a)||this.regexp_eatCapturingGroup(a)},n.regexp_eatReverseSolidusAtomEscape=function(a){let d=a.pos;if(a.eat(92)){if(this.regexp_eatAtomEscape(a))return!0;a.pos=d}return!1},n.regexp_eatUncapturingGroup=function(a){let d=a.pos;if(a.eat(40)){if(a.eat(63)&&a.eat(58)){if(this.regexp_disjunction(a),a.eat(41))return!0;a.raise("Unterminated group")}a.pos=d}return!1},n.regexp_eatCapturingGroup=function(a){if(a.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(a):a.current()===63&&a.raise("Invalid group"),this.regexp_disjunction(a),a.eat(41))return a.numCapturingParens+=1,!0;a.raise("Unterminated group")}return!1},n.regexp_eatExtendedAtom=function(a){return a.eat(46)||this.regexp_eatReverseSolidusAtomEscape(a)||this.regexp_eatCharacterClass(a)||this.regexp_eatUncapturingGroup(a)||this.regexp_eatCapturingGroup(a)||this.regexp_eatInvalidBracedQuantifier(a)||this.regexp_eatExtendedPatternCharacter(a)},n.regexp_eatInvalidBracedQuantifier=function(a){return this.regexp_eatBracedQuantifier(a,!0)&&a.raise("Nothing to repeat"),!1},n.regexp_eatSyntaxCharacter=function(a){let d=a.current();return!!o(d)&&(a.lastIntValue=d,a.advance(),!0)},n.regexp_eatPatternCharacters=function(a){let d=a.pos,m=0;for(;(m=a.current())!==-1&&!o(m);)a.advance();return a.pos!==d},n.regexp_eatExtendedPatternCharacter=function(a){let d=a.current();return d!==-1&&d!==36&&(!(d>=40)||!(d<=43))&&d!==46&&d!==63&&d!==91&&d!==94&&d!==124&&(a.advance(),!0)},n.regexp_groupSpecifier=function(a){if(a.eat(63)){if(this.regexp_eatGroupName(a)){a.groupNames.indexOf(a.lastStringValue)!==-1&&a.raise("Duplicate capture group name"),a.groupNames.push(a.lastStringValue);return}a.raise("Invalid group")}},n.regexp_eatGroupName=function(a){if(a.lastStringValue="",a.eat(60)){if(this.regexp_eatRegExpIdentifierName(a)&&a.eat(62))return!0;a.raise("Invalid capture group name")}return!1},n.regexp_eatRegExpIdentifierName=function(a){if(a.lastStringValue="",this.regexp_eatRegExpIdentifierStart(a)){for(a.lastStringValue+=l(a.lastIntValue);this.regexp_eatRegExpIdentifierPart(a);)a.lastStringValue+=l(a.lastIntValue);return!0}return!1},n.regexp_eatRegExpIdentifierStart=function(a){var d;let m=a.pos,g=this.options.ecmaVersion>=11,w=a.current(g);return a.advance(g),w===92&&this.regexp_eatRegExpUnicodeEscapeSequence(a,g)&&(w=a.lastIntValue),d=w,(0,I.isIdentifierStart)(d,!0)||d===36||d===95?(a.lastIntValue=w,!0):(a.pos=m,!1)},n.regexp_eatRegExpIdentifierPart=function(a){var d;let m=a.pos,g=this.options.ecmaVersion>=11,w=a.current(g);return a.advance(g),w===92&&this.regexp_eatRegExpUnicodeEscapeSequence(a,g)&&(w=a.lastIntValue),d=w,(0,I.isIdentifierChar)(d,!0)||d===36||d===95||d===8204||d===8205?(a.lastIntValue=w,!0):(a.pos=m,!1)},n.regexp_eatAtomEscape=function(a){return!!(this.regexp_eatBackReference(a)||this.regexp_eatCharacterClassEscape(a)||this.regexp_eatCharacterEscape(a)||a.switchN&&this.regexp_eatKGroupName(a))||(a.switchU&&(a.current()===99&&a.raise("Invalid unicode escape"),a.raise("Invalid escape")),!1)},n.regexp_eatBackReference=function(a){let d=a.pos;if(this.regexp_eatDecimalEscape(a)){let m=a.lastIntValue;if(a.switchU)return m>a.maxBackReference&&(a.maxBackReference=m),!0;if(m<=a.numCapturingParens)return!0;a.pos=d}return!1},n.regexp_eatKGroupName=function(a){if(a.eat(107)){if(this.regexp_eatGroupName(a))return a.backReferenceNames.push(a.lastStringValue),!0;a.raise("Invalid named reference")}return!1},n.regexp_eatCharacterEscape=function(a){return this.regexp_eatControlEscape(a)||this.regexp_eatCControlLetter(a)||this.regexp_eatZero(a)||this.regexp_eatHexEscapeSequence(a)||this.regexp_eatRegExpUnicodeEscapeSequence(a,!1)||!a.switchU&&this.regexp_eatLegacyOctalEscapeSequence(a)||this.regexp_eatIdentityEscape(a)},n.regexp_eatCControlLetter=function(a){let d=a.pos;if(a.eat(99)){if(this.regexp_eatControlLetter(a))return!0;a.pos=d}return!1},n.regexp_eatZero=function(a){return!(a.current()!==48||f(a.lookahead()))&&(a.lastIntValue=0,a.advance(),!0)},n.regexp_eatControlEscape=function(a){let d=a.current();return d===116?(a.lastIntValue=9,a.advance(),!0):d===110?(a.lastIntValue=10,a.advance(),!0):d===118?(a.lastIntValue=11,a.advance(),!0):d===102?(a.lastIntValue=12,a.advance(),!0):d===114&&(a.lastIntValue=13,a.advance(),!0)},n.regexp_eatControlLetter=function(a){let d=a.current();return!!c(d)&&(a.lastIntValue=d%32,a.advance(),!0)},n.regexp_eatRegExpUnicodeEscapeSequence=function(a,d=!1){let m=a.pos,g=d||a.switchU;if(a.eat(117)){var w;if(this.regexp_eatFixedHexDigits(a,4)){let S=a.lastIntValue;if(g&&S>=55296&&S<=56319){let A=a.pos;if(a.eat(92)&&a.eat(117)&&this.regexp_eatFixedHexDigits(a,4)){let P=a.lastIntValue;if(P>=56320&&P<=57343)return a.lastIntValue=(S-55296)*1024+(P-56320)+65536,!0}a.pos=A,a.lastIntValue=S}return!0}if(g&&a.eat(123)&&this.regexp_eatHexDigits(a)&&a.eat(125)&&(w=a.lastIntValue,w>=0&&w<=1114111))return!0;g&&a.raise("Invalid unicode escape"),a.pos=m}return!1},n.regexp_eatIdentityEscape=function(a){if(a.switchU)return!!this.regexp_eatSyntaxCharacter(a)||!!a.eat(47)&&(a.lastIntValue=47,!0);let d=a.current();return d!==99&&(!a.switchN||d!==107)&&(a.lastIntValue=d,a.advance(),!0)},n.regexp_eatDecimalEscape=function(a){a.lastIntValue=0;let d=a.current();if(d>=49&&d<=57){do a.lastIntValue=10*a.lastIntValue+(d-48),a.advance();while((d=a.current())>=48&&d<=57);return!0}return!1},n.regexp_eatCharacterClassEscape=function(a){var d;let m=a.current();if(d=m,d===100||d===68||d===115||d===83||d===119||d===87)return a.lastIntValue=-1,a.advance(),!0;if(a.switchU&&this.options.ecmaVersion>=9&&(m===80||m===112)){if(a.lastIntValue=-1,a.advance(),a.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(a)&&a.eat(125))return!0;a.raise("Invalid property name")}return!1},n.regexp_eatUnicodePropertyValueExpression=function(a){let d=a.pos;if(this.regexp_eatUnicodePropertyName(a)&&a.eat(61)){let m=a.lastStringValue;if(this.regexp_eatUnicodePropertyValue(a)){let g=a.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(a,m,g),!0}}if(a.pos=d,this.regexp_eatLoneUnicodePropertyNameOrValue(a)){let m=a.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(a,m),!0}return!1},n.regexp_validateUnicodePropertyNameAndValue=function(a,d,m){(0,R.hasOwn)(a.unicodeProperties.nonBinary,d)||a.raise("Invalid property name"),a.unicodeProperties.nonBinary[d].test(m)||a.raise("Invalid property value")},n.regexp_validateUnicodePropertyNameOrValue=function(a,d){a.unicodeProperties.binary.test(d)||a.raise("Invalid property name")},n.regexp_eatUnicodePropertyName=function(a){let d=0;for(a.lastStringValue="";h(d=a.current());)a.lastStringValue+=l(d),a.advance();return a.lastStringValue!==""},n.regexp_eatUnicodePropertyValue=function(a){let d=0;for(a.lastStringValue="";u(d=a.current());)a.lastStringValue+=l(d),a.advance();return a.lastStringValue!==""},n.regexp_eatLoneUnicodePropertyNameOrValue=function(a){return this.regexp_eatUnicodePropertyValue(a)},n.regexp_eatCharacterClass=function(a){if(a.eat(91)){if(a.eat(94),this.regexp_classRanges(a),a.eat(93))return!0;a.raise("Unterminated character class")}return!1},n.regexp_classRanges=function(a){for(;this.regexp_eatClassAtom(a);){let d=a.lastIntValue;if(a.eat(45)&&this.regexp_eatClassAtom(a)){let m=a.lastIntValue;a.switchU&&(d===-1||m===-1)&&a.raise("Invalid character class"),d!==-1&&m!==-1&&d>m&&a.raise("Range out of order in character class")}}},n.regexp_eatClassAtom=function(a){let d=a.pos;if(a.eat(92)){if(this.regexp_eatClassEscape(a))return!0;if(a.switchU){let g=a.current();(g===99||y(g))&&a.raise("Invalid class escape"),a.raise("Invalid escape")}a.pos=d}let m=a.current();return m!==93&&(a.lastIntValue=m,a.advance(),!0)},n.regexp_eatClassEscape=function(a){let d=a.pos;if(a.eat(98))return a.lastIntValue=8,!0;if(a.switchU&&a.eat(45))return a.lastIntValue=45,!0;if(!a.switchU&&a.eat(99)){if(this.regexp_eatClassControlLetter(a))return!0;a.pos=d}return this.regexp_eatCharacterClassEscape(a)||this.regexp_eatCharacterEscape(a)},n.regexp_eatClassControlLetter=function(a){let d=a.current();return(!!f(d)||d===95)&&(a.lastIntValue=d%32,a.advance(),!0)},n.regexp_eatHexEscapeSequence=function(a){let d=a.pos;if(a.eat(120)){if(this.regexp_eatFixedHexDigits(a,2))return!0;a.switchU&&a.raise("Invalid escape"),a.pos=d}return!1},n.regexp_eatDecimalDigits=function(a){let d=a.pos,m=0;for(a.lastIntValue=0;f(m=a.current());)a.lastIntValue=10*a.lastIntValue+(m-48),a.advance();return a.pos!==d},n.regexp_eatHexDigits=function(a){let d=a.pos,m=0;for(a.lastIntValue=0;x(m=a.current());)a.lastIntValue=16*a.lastIntValue+v(m),a.advance();return a.pos!==d},n.regexp_eatLegacyOctalEscapeSequence=function(a){if(this.regexp_eatOctalDigit(a)){let d=a.lastIntValue;if(this.regexp_eatOctalDigit(a)){let m=a.lastIntValue;d<=3&&this.regexp_eatOctalDigit(a)?a.lastIntValue=64*d+8*m+a.lastIntValue:a.lastIntValue=8*d+m}else a.lastIntValue=d;return!0}return!1},n.regexp_eatOctalDigit=function(a){let d=a.current();return y(d)?(a.lastIntValue=d-48,a.advance(),!0):(a.lastIntValue=0,!1)},n.regexp_eatFixedHexDigits=function(a,d){let m=a.pos;a.lastIntValue=0;for(let g=0;g<d;++g){let w=a.current();if(!x(w))return a.pos=m,!1;a.lastIntValue=16*a.lastIntValue+v(w),a.advance()}return!0}}),ri=L(function(e,t){t.__esModule=!0,t.Token=void 0;class i{constructor(c){this.type=c.type,this.value=c.value,this.start=c.start,this.end=c.end,c.options.locations&&(this.loc=new j.SourceLocation(c,c.startLoc,c.endLoc)),c.options.ranges&&(this.range=[c.start,c.end])}}t.Token=i;let s=T.Parser.prototype;function r(o){return typeof BigInt!="function"?null:BigInt(o.replace(/_/g,""))}function n(o){return o<=65535?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,(1023&o)+56320)}s.next=function(o){!o&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new i(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},s.getToken=function(){return this.next(),new i(this)},typeof Symbol<"u"&&(s[Symbol.iterator]=function(){return{next:()=>{let o=this.getToken();return{done:o.type===p.types.eof,value:o}}}}),s.nextToken=function(){let o=this.curContext();return o&&o.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(p.types.eof):o.override?o.override(this):void this.readToken(this.fullCharCodeAtPos())},s.readToken=function(o){return(0,I.isIdentifierStart)(o,this.options.ecmaVersion>=6)||o===92?this.readWord():this.getTokenFromCode(o)},s.fullCharCodeAtPos=function(){let o=this.input.charCodeAt(this.pos);if(o<=55295||o>=56320)return o;let c=this.input.charCodeAt(this.pos+1);return c<=56319||c>=57344?o:(o<<10)+c-56613888},s.skipBlockComment=function(){let o=this.options.onComment&&this.curPosition(),c=this.pos,h=this.input.indexOf("*/",this.pos+=2);if(h===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=h+2,this.options.locations)for(let u,f=c;(u=(0,E.nextLineBreak)(this.input,f,this.pos))>-1;)++this.curLine,f=this.lineStart=u;this.options.onComment&&this.options.onComment(!0,this.input.slice(c+2,h),c,this.pos,o,this.curPosition())},s.skipLineComment=function(o){let c=this.pos,h=this.options.onComment&&this.curPosition(),u=this.input.charCodeAt(this.pos+=o);for(;this.pos<this.input.length&&!(0,E.isNewLine)(u);)u=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(c+o,this.pos),c,this.pos,h,this.curPosition())},s.skipSpace=function(){e:for(;this.pos<this.input.length;){let o=this.input.charCodeAt(this.pos);switch(o){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(o>8&&o<14||o>=5760&&E.nonASCIIwhitespace.test(String.fromCharCode(o)))++this.pos;else break e}}},s.finishToken=function(o,c){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());let h=this.type;this.type=o,this.value=c,this.updateContext(h)},s.readToken_dot=function(){let o=this.input.charCodeAt(this.pos+1);if(o>=48&&o<=57)return this.readNumber(!0);let c=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&o===46&&c===46?(this.pos+=3,this.finishToken(p.types.ellipsis)):(++this.pos,this.finishToken(p.types.dot))},s.readToken_slash=function(){let o=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):o===61?this.finishOp(p.types.assign,2):this.finishOp(p.types.slash,1)},s.readToken_mult_modulo_exp=function(o){let c=this.input.charCodeAt(this.pos+1),h=1,u=o===42?p.types.star:p.types.modulo;return this.options.ecmaVersion>=7&&o===42&&c===42&&(++h,u=p.types.starstar,c=this.input.charCodeAt(this.pos+2)),c===61?this.finishOp(p.types.assign,h+1):this.finishOp(u,h)},s.readToken_pipe_amp=function(o){let c=this.input.charCodeAt(this.pos+1);return c===o?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(p.types.assign,3):this.finishOp(o===124?p.types.logicalOR:p.types.logicalAND,2):c===61?this.finishOp(p.types.assign,2):this.finishOp(o===124?p.types.bitwiseOR:p.types.bitwiseAND,1)},s.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(p.types.assign,2):this.finishOp(p.types.bitwiseXOR,1)},s.readToken_plus_min=function(o){let c=this.input.charCodeAt(this.pos+1);return c===o?c===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.lineBreak.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(p.types.incDec,2):c===61?this.finishOp(p.types.assign,2):this.finishOp(p.types.plusMin,1)},s.readToken_lt_gt=function(o){let c=this.input.charCodeAt(this.pos+1),h=1;return c===o?(h=o===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+h)===61?this.finishOp(p.types.assign,h+1):this.finishOp(p.types.bitShift,h)):c!==33||o!==60||this.inModule||this.input.charCodeAt(this.pos+2)!==45||this.input.charCodeAt(this.pos+3)!==45?(c===61&&(h=2),this.finishOp(p.types.relational,h)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},s.readToken_eq_excl=function(o){let c=this.input.charCodeAt(this.pos+1);return c===61?this.finishOp(p.types.equality,this.input.charCodeAt(this.pos+2)===61?3:2):o===61&&c===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(p.types.arrow)):this.finishOp(o===61?p.types.eq:p.types.prefix,1)},s.readToken_question=function(){let o=this.options.ecmaVersion;if(o>=11){let c=this.input.charCodeAt(this.pos+1);if(c===46){let h=this.input.charCodeAt(this.pos+2);if(h<48||h>57)return this.finishOp(p.types.questionDot,2)}if(c===63)return o>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(p.types.assign,3):this.finishOp(p.types.coalesce,2)}return this.finishOp(p.types.question,1)},s.readToken_numberSign=function(){let o=this.options.ecmaVersion,c=35;if(o>=13&&(++this.pos,c=this.fullCharCodeAtPos(),(0,I.isIdentifierStart)(c,!0)||c===92))return this.finishToken(p.types.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+n(c)+"'")},s.getTokenFromCode=function(o){switch(o){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(p.types.parenL);case 41:return++this.pos,this.finishToken(p.types.parenR);case 59:return++this.pos,this.finishToken(p.types.semi);case 44:return++this.pos,this.finishToken(p.types.comma);case 91:return++this.pos,this.finishToken(p.types.bracketL);case 93:return++this.pos,this.finishToken(p.types.bracketR);case 123:return++this.pos,this.finishToken(p.types.braceL);case 125:return++this.pos,this.finishToken(p.types.braceR);case 58:return++this.pos,this.finishToken(p.types.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(p.types.backQuote);case 48:let c=this.input.charCodeAt(this.pos+1);if(c===120||c===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(c===111||c===79)return this.readRadixNumber(8);if(c===98||c===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(o);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(o);case 124:case 38:return this.readToken_pipe_amp(o);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(o);case 60:case 62:return this.readToken_lt_gt(o);case 61:case 33:return this.readToken_eq_excl(o);case 63:return this.readToken_question();case 126:return this.finishOp(p.types.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+n(o)+"'")},s.finishOp=function(o,c){let h=this.input.slice(this.pos,this.pos+c);return this.pos+=c,this.finishToken(o,h)},s.readRegexp=function(){let o,c,h=this.pos;for(;;){this.pos>=this.input.length&&this.raise(h,"Unterminated regular expression");let a=this.input.charAt(this.pos);if(E.lineBreak.test(a)&&this.raise(h,"Unterminated regular expression"),o)o=!1;else{if(a==="[")c=!0;else if(a==="]"&&c)c=!1;else if(a==="/"&&!c)break;o=a==="\\"}++this.pos}let u=this.input.slice(h,this.pos);++this.pos;let f=this.pos,x=this.readWord1();this.containsEsc&&this.unexpected(f);let v=this.regexpState||(this.regexpState=new ms.RegExpValidationState(this));v.reset(h,u,x),this.validateRegExpFlags(v),this.validateRegExpPattern(v);let y=null;try{y=RegExp(u,x)}catch{}return this.finishToken(p.types.regexp,{pattern:u,flags:x,value:y})},s.readInt=function(o,c,h){let u=this.options.ecmaVersion>=12&&c===void 0,f=h&&this.input.charCodeAt(this.pos)===48,x=this.pos,v=0,y=0;for(let a=0,d=c??1/0;a<d;++a,++this.pos){let m=this.input.charCodeAt(this.pos),g;if(u&&m===95){f&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),y===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),a===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),y=m;continue}if((g=m>=97?m-97+10:m>=65?m-65+10:m>=48&&m<=57?m-48:1/0)>=o)break;y=m,v=v*o+g}return u&&y===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===x||c!=null&&this.pos-x!==c?null:v},s.readRadixNumber=function(o){let c=this.pos;this.pos+=2;let h=this.readInt(o);return h==null&&this.raise(this.start+2,"Expected number in radix "+o),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(h=r(this.input.slice(c,this.pos)),++this.pos):(0,I.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(p.types.num,h)},s.readNumber=function(o){var c,h;let u=this.pos;o||this.readInt(10,void 0,!0)!==null||this.raise(u,"Invalid number");let f=this.pos-u>=2&&this.input.charCodeAt(u)===48;f&&this.strict&&this.raise(u,"Invalid number");let x=this.input.charCodeAt(this.pos);if(!f&&!o&&this.options.ecmaVersion>=11&&x===110){let y=r(this.input.slice(u,this.pos));return++this.pos,(0,I.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(p.types.num,y)}f&&/[89]/.test(this.input.slice(u,this.pos))&&(f=!1),x!==46||f||(++this.pos,this.readInt(10),x=this.input.charCodeAt(this.pos)),x!==69&&x!==101||f||(((x=this.input.charCodeAt(++this.pos))===43||x===45)&&++this.pos,this.readInt(10)===null&&this.raise(u,"Invalid number")),(0,I.isIdentifierStart)(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");let v=(c=this.input.slice(u,this.pos),(h=f)?parseInt(c,8):parseFloat(c.replace(/_/g,"")));return this.finishToken(p.types.num,v)},s.readCodePoint=function(){let o;if(this.input.charCodeAt(this.pos)===123){this.options.ecmaVersion<6&&this.unexpected();let c=++this.pos;o=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,o>1114111&&this.invalidStringToken(c,"Code point out of bounds")}else o=this.readHexChar(4);return o},s.readString=function(o){let c="",h=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let u=this.input.charCodeAt(this.pos);if(u===o)break;u===92?(c+=this.input.slice(h,this.pos),c+=this.readEscapedChar(!1),h=this.pos):u===8232||u===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):((0,E.isNewLine)(u)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return c+=this.input.slice(h,this.pos++),this.finishToken(p.types.string,c)};let l={};s.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(o){if(o===l)this.readInvalidTemplateToken();else throw o}this.inTemplateElement=!1},s.invalidStringToken=function(o,c){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw l;this.raise(o,c)},s.readTmplToken=function(){let o="",c=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");let h=this.input.charCodeAt(this.pos);if(h===96||h===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===p.types.template||this.type===p.types.invalidTemplate)?h===36?(this.pos+=2,this.finishToken(p.types.dollarBraceL)):(++this.pos,this.finishToken(p.types.backQuote)):(o+=this.input.slice(c,this.pos),this.finishToken(p.types.template,o));if(h===92)o+=this.input.slice(c,this.pos),o+=this.readEscapedChar(!0),c=this.pos;else if((0,E.isNewLine)(h)){switch(o+=this.input.slice(c,this.pos),++this.pos,h){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:o+=`
|
|
`;break;default:o+=String.fromCharCode(h)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),c=this.pos}else++this.pos}},s.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(p.types.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},s.readEscapedChar=function(o){let c=this.input.charCodeAt(++this.pos);switch(++this.pos,c){case 110:return`
|
|
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return n(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),o){let h=this.pos-1;return this.invalidStringToken(h,"Invalid escape sequence in template string"),null}default:if(c>=48&&c<=55){let h=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],u=parseInt(h,8);return u>255&&(u=parseInt(h=h.slice(0,-1),8)),this.pos+=h.length-1,c=this.input.charCodeAt(this.pos),(h!=="0"||c===56||c===57)&&(this.strict||o)&&this.invalidStringToken(this.pos-1-h.length,o?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(u)}return(0,E.isNewLine)(c)?"":String.fromCharCode(c)}},s.readHexChar=function(o){let c=this.pos,h=this.readInt(16,o);return h===null&&this.invalidStringToken(c,"Bad character escape sequence"),h},s.readWord1=function(){this.containsEsc=!1;let o="",c=!0,h=this.pos,u=this.options.ecmaVersion>=6;for(;this.pos<this.input.length;){let f=this.fullCharCodeAtPos();if((0,I.isIdentifierChar)(f,u))this.pos+=f<=65535?1:2;else if(f===92){this.containsEsc=!0,o+=this.input.slice(h,this.pos);let x=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;let v=this.readCodePoint();(c?I.isIdentifierStart:I.isIdentifierChar)(v,u)||this.invalidStringToken(x,"Invalid Unicode escape"),o+=this.input.substr(this.pos-6,6),h=this.pos}else break;c=!1}return o+this.input.slice(h,this.pos)},s.readWord=function(){let o=this.readWord1(),c=p.types.name;return this.keywords.test(o)&&(c=p.keywords[o]),this.finishToken(c,o)}}),k=L(function(e,t){t.__esModule=!0,t.parse=function(c,h){return T.Parser.parse(c,h)},t.parseExpressionAt=function(c,h,u){return T.Parser.parseExpressionAt(c,h,u)},t.tokenizer=function(c,h){return T.Parser.tokenizer(c,h)},t.version=void 0,t.Parser=T.Parser,t.defaultOptions=We.defaultOptions,t.Position=j.Position,t.SourceLocation=j.SourceLocation,t.getLineInfo=j.getLineInfo,t.Node=si.Node,t.TokenType=p.TokenType,t.tokTypes=p.types,t.keywordTypes=p.keywords,t.TokContext=X.TokContext,t.tokContexts=X.types,t.isIdentifierChar=I.isIdentifierChar,t.isIdentifierStart=I.isIdentifierStart,t.Token=ri.Token,t.isNewLine=E.isNewLine,t.lineBreak=E.lineBreak,t.lineBreakG=E.lineBreakG,t.nonASCIIwhitespace=E.nonASCIIwhitespace;var i=function(c,h){if(!h&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var u=s(h);if(u&&u.has(c))return u.get(c);var f={},x=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in c)if(v!=="default"&&Object.prototype.hasOwnProperty.call(c,v)){var y=x?Object.getOwnPropertyDescriptor(c,v):null;y&&(y.get||y.set)?Object.defineProperty(f,v,y):f[v]=c[v]}return f.default=c,u&&u.set(c,f),f}(R);function s(o){if(typeof WeakMap!="function")return null;var c=new WeakMap,h=new WeakMap;return(s=function(f){return f?h:c})(o)}let r="8.7.0";t.version=r,T.Parser.acorn={Parser:T.Parser,version:r,defaultOptions:We.defaultOptions,Position:j.Position,SourceLocation:j.SourceLocation,getLineInfo:j.getLineInfo,Node:si.Node,TokenType:p.TokenType,tokTypes:p.types,keywordTypes:p.keywords,TokContext:X.TokContext,tokContexts:X.types,isIdentifierChar:I.isIdentifierChar,isIdentifierStart:I.isIdentifierStart,Token:ri.Token,isNewLine:E.isNewLine,lineBreak:E.lineBreak,lineBreakG:E.lineBreakG,nonASCIIwhitespace:E.nonASCIIwhitespace};let n=i.wordsRegexp,l={};i.wordsRegexp=function(o){return l[o]||(l[o]=n(o)),l[o]}}),pr=ns(k),hr=k.Node,ur=k.Parser,dr=k.Position,fr=k.SourceLocation,mr=k.TokContext,yr=k.Token,gr=k.TokenType;var xr=k.defaultOptions,wr=k.getLineInfo,br=k.isIdentifierChar,_r=k.isIdentifierStart,vr=k.isNewLine,Cr=k.keywordTypes,Er=k.lineBreak,Sr=k.lineBreakG,kr=k.nonASCIIwhitespace,ai=k.parse,Ir=k.parseExpressionAt,Ar=k.tokContexts,Pr=k.tokTypes,Nr=k.tokenizer,Tr=k.version;var Ee,ys=new Uint8Array(16);function ze(){if(!Ee&&(Ee=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ee))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ee(ys)}var N=[];for(let e=0;e<256;++e)N.push((e+256).toString(16).slice(1));function oi(e,t=0){return(N[e[t+0]]+N[e[t+1]]+N[e[t+2]]+N[e[t+3]]+"-"+N[e[t+4]]+N[e[t+5]]+"-"+N[e[t+6]]+N[e[t+7]]+"-"+N[e[t+8]]+N[e[t+9]]+"-"+N[e[t+10]]+N[e[t+11]]+N[e[t+12]]+N[e[t+13]]+N[e[t+14]]+N[e[t+15]]).toLowerCase()}var gs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ke={randomUUID:gs};function xs(e,t,i){if(Ke.randomUUID&&!t&&!e)return Ke.randomUUID();e=e||{};let s=e.random||(e.rng||ze)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,t){i=i||0;for(let r=0;r<16;++r)t[i+r]=s[r];return t}return oi(s)}var Se=xs;var q=globalThis.WebSocket,ws=globalThis.Request,bs=globalThis.Response,ke={prototype:{send:q.prototype.send},CLOSED:q.CLOSED,CLOSING:q.CLOSING,CONNECTING:q.CONNECTING,OPEN:q.OPEN},_s=20,vs=[101,204,205,304],Cs=[301,302,303,307,308];var Xe=class{},Es="!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~";function Ss(e){for(let t=0;t<e.length;t++){let i=e[t];if(!Es.includes(i))return!1}return!0}var Qe=class extends Xe{constructor(){super();Re(this,"callbacks",{});Re(this,"uid",Se());if(!("ServiceWorkerGlobalScope"in self))throw new TypeError("Attempt to construct RemoteClient from outside a service worker");addEventListener("message",i=>{if(i.data.__remote_target===this.uid){let s=this.callbacks[i.data.__remote_id];s(i.data.__remote_value)}})}async send(i,s){let r=await self.clients.matchAll();if(r.length<1)throw new Error("no available clients");for(let n of r)n.postMessage({__remote_target:this.uid,__remote_id:s,__remote_value:i})}async sendWithResponse(i){let s=Se();return new Promise(r=>{this.callbacks[s]=r,this.send(i,s)})}connect(i,s,r,n,l){return new q("")}async request(i,s,r,n,l,o,c){let h=await this.sendWithResponse({type:"request",options:{method:i,requestHeaders:s,body:r,remote:n.toString()}}),u=new bs(vs.includes(h.status)?void 0:h.body,{status:h.status,statusText:h.statusText??void 0,headers:new Headers(h.headers)});return u.rawHeaders=h.headers,u.rawResponse=h,u}},ks=Object.getOwnPropertyDescriptor(q.prototype,"readyState").get,Is=["ws:","wss:"],ie;function As(e){ie=e}"ServiceWorkerGlobalScope"in self&&As(new Qe);var se=class{constructor(...t){}createWebSocket(t,i=[],s){if(!ie)throw new TypeError("A request was made before the client was ready!! This is a problem on the end of whoever set the bare client implementation");try{t=new URL(t)}catch{throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${t}' is invalid.`)}if(!Is.includes(t.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${t.protocol}' is not allowed.`);Array.isArray(i)||(i=[i]),i=i.map(String);for(let u of i)if(!Ss(u))throw new DOMException(`Failed to construct 'WebSocket': The subprotocol '${u}' is invalid.`);let r=ie.connect(t,i,async()=>{let u=typeof s.headers=="function"?await s.headers():s.headers||{},f=u instanceof Headers?Object.fromEntries(u):u;return f.Host=t.host,f.Pragma="no-cache",f["Cache-Control"]="no-cache",f.Upgrade="websocket",f.Connection="Upgrade",f},u=>{n=u.protocol,s.setCookiesCallback&&s.setCookiesCallback(u.setCookies)},u=>{l=u},s.webSocketImpl||q),n="",l=ke.CONNECTING,o=()=>{let u=ks.call(r);return u===ke.OPEN?l:u};s.readyStateHook?s.readyStateHook(r,o):Object.defineProperty(r,"readyState",{get:o,configurable:!0,enumerable:!0});let c=()=>{if(o()===ke.CONNECTING)return new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.")};s.sendErrorHook?s.sendErrorHook(r,c):r.send=function(...u){let f=c();if(f)throw f;ke.prototype.send.call(this,...u)},s.urlHook?s.urlHook(r,t):Object.defineProperty(r,"url",{get:()=>t.toString(),configurable:!0,enumerable:!0});let h=()=>n;return s.protocolHook?s.protocolHook(r,h):Object.defineProperty(r,"protocol",{get:h,configurable:!0,enumerable:!0}),r}async fetch(t,i){let s=new ws(t,i),r=i?.headers||s.headers,n=r instanceof Headers?Object.fromEntries(r):r,l=i?.duplex,o=i?.body||s.body,c=new URL(s.url);if(!ie)throw new TypeError("A request was made before the client was ready!! This is a problem on the end of whoever set the bare client implementation");for(let h=0;;h++){"host"in n?n.host=c.host:n.Host=c.host;let u=await ie.request(s.method,n,o,c,s.cache,l,s.signal);u.finalURL=c.toString();let f=i?.redirect||s.redirect;if(Cs.includes(u.status))switch(f){case"follow":{let x=u.headers.get("location");if(_s>h&&x!==null){c=new URL(x,c);continue}else throw new TypeError("Failed to fetch")}case"error":throw new TypeError("Failed to fetch");case"manual":return u}else return u}}};async function ci(...e){return new se}var Ze={};ge(Ze,{parse:()=>Ns,serialize:()=>Ye});var Ps=Object.prototype.toString,Ie=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Ns(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},s=(t||{}).decode||Ts,r=0;r<e.length;){var n=e.indexOf("=",r);if(n===-1)break;var l=e.indexOf(";",r);if(l===-1)l=e.length;else if(l<n){r=e.lastIndexOf(";",n-1)+1;continue}var o=e.slice(r,n).trim();if(i[o]===void 0){var c=e.slice(n+1,l).trim();c.charCodeAt(0)===34&&(c=c.slice(1,-1)),i[o]=Os(c,s)}r=l+1}return i}function Ye(e,t,i){var s=i||{},r=s.encode||Rs;if(typeof r!="function")throw new TypeError("option encode is invalid");if(!Ie.test(e))throw new TypeError("argument name is invalid");var n=r(t);if(n&&!Ie.test(n))throw new TypeError("argument val is invalid");var l=e+"="+n;if(s.maxAge!=null){var o=s.maxAge-0;if(isNaN(o)||!isFinite(o))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(o)}if(s.domain){if(!Ie.test(s.domain))throw new TypeError("option domain is invalid");l+="; Domain="+s.domain}if(s.path){if(!Ie.test(s.path))throw new TypeError("option path is invalid");l+="; Path="+s.path}if(s.expires){var c=s.expires;Ls(c)&&!isNaN(c.valueOf())||(l+="; Expires="+new Date(0).toUTCString()),l+="; Expires="+c.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.priority)switch(typeof s.priority=="string"?s.priority.toLowerCase():s.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l}function Ts(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Rs(e){return encodeURIComponent(e)}function Ls(e){return Ps.call(e)==="[object Date]"||e instanceof Date}function Os(e,t){try{return t(e)}catch{return e}}var _i=Te(pi(),1);var G={};Object.defineProperty(G,"__esModule",{value:!0}),G.GENERATOR=G.EXPRESSIONS_PRECEDENCE=G.NEEDS_PARENTHESES=void 0;function Vs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hi(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function Ms(e,t,i){return t&&hi(e.prototype,t),i&&hi(e,i),e}var js=JSON.stringify;if(!String.prototype.repeat)throw new Error("String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation");if(!String.prototype.endsWith)throw new Error("String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation");var Ae={"||":3,"&&":4,"|":5,"??":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},V=17;G.NEEDS_PARENTHESES=V;var ui,di,fi,mi,yi,gi,xi={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:V,ClassExpression:V,FunctionExpression:V,ObjectExpression:V,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function Y(e,t){var i=e.generator;if(e.write("("),t!=null&&t.length>0){i[t[0].type](t[0],e);for(var s=t.length,r=1;r<s;r++){var n=t[r];e.write(", "),i[n.type](n,e)}}e.write(")")}function wi(e,t,i,s){var r=e.expressionsPrecedence[t.type];if(r===V)return!0;var n=e.expressionsPrecedence[i.type];return r!==n?!s&&r===15&&n===14&&i.operator==="**"||r<n:(r===13||r===14)&&(t.operator==="**"&&i.operator==="**"?!s:s?Ae[t.operator]<=Ae[i.operator]:Ae[t.operator]<Ae[i.operator])}function Pe(e,t,i,s){var r=e.generator;wi(e,t,i,s)?(e.write("("),r[t.type](t,e),e.write(")")):r[t.type](t,e)}function Us(e,t,i,s){var r=t.split(`
|
|
`),n=r.length-1;if(e.write(r[0].trim()),n>0){e.write(s);for(var l=1;l<n;l++)e.write(i+r[l].trim()+s);e.write(i+r[n].trim())}}function O(e,t,i,s){for(var r=t.length,n=0;n<r;n++){var l=t[n];e.write(i),l.type[0]==="L"?e.write("// "+l.value.trim()+`
|
|
`,l):(e.write("/*"),Us(e,l.value,i,s),e.write("*/"+s))}}function Fs(e){for(var t=e;t!=null;){var i=t.type;if(i[0]==="C"&&i[1]==="a")return!0;if(i[0]!=="M"||i[1]!=="e"||i[2]!=="m")return!1;t=t.object}}function tt(e,t){var i=e.generator,s=t.declarations;e.write(t.kind+" ");var r=s.length;if(r>0){i.VariableDeclarator(s[0],e);for(var n=1;n<r;n++)e.write(", "),i.VariableDeclarator(s[n],e)}}G.EXPRESSIONS_PRECEDENCE=xi;var it={Program:function(e,t){var i=t.indent.repeat(t.indentLevel),s=t.lineEnd,r=t.writeComments;r&&e.comments!=null&&O(t,e.comments,i,s);for(var n=e.body,l=n.length,o=0;o<l;o++){var c=n[o];r&&c.comments!=null&&O(t,c.comments,i,s),t.write(i),this[c.type](c,t),t.write(s)}r&&e.trailingComments!=null&&O(t,e.trailingComments,i,s)},ParenthesizedExpression:function(e,t){t.write("("),this[e.expression.type](e.expression,t),t.write(")")},BlockStatement:gi=function(e,t){var i=t.indent.repeat(t.indentLevel++),s=t.lineEnd,r=t.writeComments,n=i+t.indent;t.write("{");var l=e.body;if(l!=null&&l.length>0){t.write(s),r&&e.comments!=null&&O(t,e.comments,n,s);for(var o=l.length,c=0;c<o;c++){var h=l[c];r&&h.comments!=null&&O(t,h.comments,n,s),t.write(n),this[h.type](h,t),t.write(s)}t.write(i)}else r&&e.comments!=null&&(t.write(s),O(t,e.comments,n,s),t.write(i));r&&e.trailingComments!=null&&O(t,e.trailingComments,n,s),t.write("}"),t.indentLevel--},ClassBody:gi,StaticBlock:function(e,t){t.write("static "),this.BlockStatement(e,t)},EmptyStatement:function(e,t){t.write(";")},ExpressionStatement:function(e,t){var i=t.expressionsPrecedence[e.expression.type];i===V||i===3&&e.expression.left.type[0]==="O"?(t.write("("),this[e.expression.type](e.expression,t),t.write(")")):this[e.expression.type](e.expression,t),t.write(";")},IfStatement:function(e,t){t.write("if ("),this[e.test.type](e.test,t),t.write(") "),this[e.consequent.type](e.consequent,t),e.alternate!=null&&(t.write(" else "),this[e.alternate.type](e.alternate,t))},LabeledStatement:function(e,t){this[e.label.type](e.label,t),t.write(": "),this[e.body.type](e.body,t)},BreakStatement:function(e,t){t.write("break"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},ContinueStatement:function(e,t){t.write("continue"),e.label!=null&&(t.write(" "),this[e.label.type](e.label,t)),t.write(";")},WithStatement:function(e,t){t.write("with ("),this[e.object.type](e.object,t),t.write(") "),this[e.body.type](e.body,t)},SwitchStatement:function(e,t){var i=t.indent.repeat(t.indentLevel++),s=t.lineEnd,r=t.writeComments;t.indentLevel++;var n=i+t.indent,l=n+t.indent;t.write("switch ("),this[e.discriminant.type](e.discriminant,t),t.write(") {"+s);for(var o=e.cases,c=o.length,h=0;h<c;h++){var u=o[h];r&&u.comments!=null&&O(t,u.comments,n,s),u.test?(t.write(n+"case "),this[u.test.type](u.test,t),t.write(":"+s)):t.write(n+"default:"+s);for(var f=u.consequent,x=f.length,v=0;v<x;v++){var y=f[v];r&&y.comments!=null&&O(t,y.comments,l,s),t.write(l),this[y.type](y,t),t.write(s)}}t.indentLevel-=2,t.write(i+"}")},ReturnStatement:function(e,t){t.write("return"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t)),t.write(";")},ThrowStatement:function(e,t){t.write("throw "),this[e.argument.type](e.argument,t),t.write(";")},TryStatement:function(e,t){if(t.write("try "),this[e.block.type](e.block,t),e.handler){var i=e.handler;i.param==null?t.write(" catch "):(t.write(" catch ("),this[i.param.type](i.param,t),t.write(") ")),this[i.body.type](i.body,t)}e.finalizer&&(t.write(" finally "),this[e.finalizer.type](e.finalizer,t))},WhileStatement:function(e,t){t.write("while ("),this[e.test.type](e.test,t),t.write(") "),this[e.body.type](e.body,t)},DoWhileStatement:function(e,t){t.write("do "),this[e.body.type](e.body,t),t.write(" while ("),this[e.test.type](e.test,t),t.write(");")},ForStatement:function(e,t){if(t.write("for ("),e.init!=null){var i=e.init;i.type[0]==="V"?tt(t,i):this[i.type](i,t)}t.write("; "),e.test&&this[e.test.type](e.test,t),t.write("; "),e.update&&this[e.update.type](e.update,t),t.write(") "),this[e.body.type](e.body,t)},ForInStatement:ui=function(e,t){t.write("for ".concat(e.await?"await ":"","("));var i=e.left;i.type[0]==="V"?tt(t,i):this[i.type](i,t),t.write(e.type[3]==="I"?" in ":" of "),this[e.right.type](e.right,t),t.write(") "),this[e.body.type](e.body,t)},ForOfStatement:ui,DebuggerStatement:function(e,t){t.write("debugger;",e)},FunctionDeclaration:di=function(e,t){t.write((e.async?"async ":"")+(e.generator?"function* ":"function ")+(e.id?e.id.name:""),e),Y(t,e.params),t.write(" "),this[e.body.type](e.body,t)},FunctionExpression:di,VariableDeclaration:function(e,t){tt(t,e),t.write(";")},VariableDeclarator:function(e,t){this[e.id.type](e.id,t),e.init!=null&&(t.write(" = "),this[e.init.type](e.init,t))},ClassDeclaration:function(e,t){if(t.write("class "+(e.id?"".concat(e.id.name," "):""),e),e.superClass){t.write("extends ");var i=e.superClass,s=i.type,r=t.expressionsPrecedence[s];s[0]==="C"&&s[1]==="l"&&s[5]==="E"||!(r===V||r<t.expressionsPrecedence.ClassExpression)?this[i.type](i,t):(t.write("("),this[e.superClass.type](i,t),t.write(")")),t.write(" ")}this.ClassBody(e.body,t)},ImportDeclaration:function(e,t){t.write("import ");var i=e.specifiers,s=i.length,r=0;if(s>0){for(;r<s;){r>0&&t.write(", ");var n=i[r],l=n.type[6];if(l==="D")t.write(n.local.name,n),r++;else{if(l!=="N")break;t.write("* as "+n.local.name,n),r++}}if(r<s){for(t.write("{");;){var o=i[r],c=o.imported.name;if(t.write(c,o),c!==o.local.name&&t.write(" as "+o.local.name),!(++r<s))break;t.write(", ")}t.write("}")}t.write(" from ")}this.Literal(e.source,t),t.write(";")},ImportExpression:function(e,t){t.write("import("),this[e.source.type](e.source,t),t.write(")")},ExportDefaultDeclaration:function(e,t){t.write("export default "),this[e.declaration.type](e.declaration,t),t.expressionsPrecedence[e.declaration.type]!=null&&e.declaration.type[0]!=="F"&&t.write(";")},ExportNamedDeclaration:function(e,t){if(t.write("export "),e.declaration)this[e.declaration.type](e.declaration,t);else{t.write("{");var i=e.specifiers,s=i.length;if(s>0)for(var r=0;;){var n=i[r],l=n.local.name;if(t.write(l,n),l!==n.exported.name&&t.write(" as "+n.exported.name),!(++r<s))break;t.write(", ")}t.write("}"),e.source&&(t.write(" from "),this.Literal(e.source,t)),t.write(";")}},ExportAllDeclaration:function(e,t){e.exported!=null?t.write("export * as "+e.exported.name+" from "):t.write("export * from "),this.Literal(e.source,t),t.write(";")},MethodDefinition:function(e,t){e.static&&t.write("static ");var i=e.kind[0];i!=="g"&&i!=="s"||t.write(e.kind+" "),e.value.async&&t.write("async "),e.value.generator&&t.write("*"),e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),Y(t,e.value.params),t.write(" "),this[e.value.body.type](e.value.body,t)},ClassExpression:function(e,t){this.ClassDeclaration(e,t)},ArrowFunctionExpression:function(e,t){t.write(e.async?"async ":"",e);var i=e.params;i!=null&&(i.length===1&&i[0].type[0]==="I"?t.write(i[0].name,i[0]):Y(t,e.params)),t.write(" => "),e.body.type[0]==="O"?(t.write("("),this.ObjectExpression(e.body,t),t.write(")")):this[e.body.type](e.body,t)},ThisExpression:function(e,t){t.write("this",e)},Super:function(e,t){t.write("super",e)},RestElement:fi=function(e,t){t.write("..."),this[e.argument.type](e.argument,t)},SpreadElement:fi,YieldExpression:function(e,t){t.write(e.delegate?"yield*":"yield"),e.argument&&(t.write(" "),this[e.argument.type](e.argument,t))},AwaitExpression:function(e,t){t.write("await ",e),Pe(t,e.argument,e)},TemplateLiteral:function(e,t){var i=e.quasis,s=e.expressions;t.write("`");for(var r=s.length,n=0;n<r;n++){var l=s[n],o=i[n];t.write(o.value.raw,o),t.write("${"),this[l.type](l,t),t.write("}")}var c=i[i.length-1];t.write(c.value.raw,c),t.write("`")},TemplateElement:function(e,t){t.write(e.value.raw,e)},TaggedTemplateExpression:function(e,t){Pe(t,e.tag,e),this[e.quasi.type](e.quasi,t)},ArrayExpression:yi=function(e,t){if(t.write("["),e.elements.length>0)for(var i=e.elements,s=i.length,r=0;;){var n=i[r];if(n!=null&&this[n.type](n,t),!(++r<s)){n==null&&t.write(", ");break}t.write(", ")}t.write("]")},ArrayPattern:yi,ObjectExpression:function(e,t){var i=t.indent.repeat(t.indentLevel++),s=t.lineEnd,r=t.writeComments,n=i+t.indent;if(t.write("{"),e.properties.length>0){t.write(s),r&&e.comments!=null&&O(t,e.comments,n,s);for(var l=","+s,o=e.properties,c=o.length,h=0;;){var u=o[h];if(r&&u.comments!=null&&O(t,u.comments,n,s),t.write(n),this[u.type](u,t),!(++h<c))break;t.write(l)}t.write(s),r&&e.trailingComments!=null&&O(t,e.trailingComments,n,s),t.write(i+"}")}else r?e.comments!=null?(t.write(s),O(t,e.comments,n,s),e.trailingComments!=null&&O(t,e.trailingComments,n,s),t.write(i+"}")):e.trailingComments!=null?(t.write(s),O(t,e.trailingComments,n,s),t.write(i+"}")):t.write("}"):t.write("}");t.indentLevel--},Property:function(e,t){e.method||e.kind[0]!=="i"?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write("["),this[e.key.type](e.key,t),t.write("]")):this[e.key.type](e.key,t),t.write(": ")),this[e.value.type](e.value,t))},PropertyDefinition:function(e,t){e.static&&t.write("static "),e.computed&&t.write("["),this[e.key.type](e.key,t),e.computed&&t.write("]"),e.value!=null?(t.write(" = "),this[e.value.type](e.value,t),t.write(";")):e.key.type[0]!=="F"&&t.write(";")},ObjectPattern:function(e,t){if(t.write("{"),e.properties.length>0)for(var i=e.properties,s=i.length,r=0;this[i[r].type](i[r],t),++r<s;)t.write(", ");t.write("}")},SequenceExpression:function(e,t){Y(t,e.expressions)},UnaryExpression:function(e,t){if(e.prefix){var i=e.operator,s=e.argument,r=e.argument.type;t.write(i);var n=wi(t,s,e);n||!(i.length>1)&&(r[0]!=="U"||r[1]!=="n"&&r[1]!=="p"||!s.prefix||s.operator[0]!==i||i!=="+"&&i!=="-")||t.write(" "),n?(t.write(i.length>1?" (":"("),this[r](s,t),t.write(")")):this[r](s,t)}else this[e.argument.type](e.argument,t),t.write(e.operator)},UpdateExpression:function(e,t){e.prefix?(t.write(e.operator),this[e.argument.type](e.argument,t)):(this[e.argument.type](e.argument,t),t.write(e.operator))},AssignmentExpression:function(e,t){this[e.left.type](e.left,t),t.write(" "+e.operator+" "),this[e.right.type](e.right,t)},AssignmentPattern:function(e,t){this[e.left.type](e.left,t),t.write(" = "),this[e.right.type](e.right,t)},BinaryExpression:mi=function(e,t){var i=e.operator==="in";i&&t.write("("),Pe(t,e.left,e,!1),t.write(" "+e.operator+" "),Pe(t,e.right,e,!0),i&&t.write(")")},LogicalExpression:mi,ConditionalExpression:function(e,t){var i=e.test,s=t.expressionsPrecedence[i.type];s===V||s<=t.expressionsPrecedence.ConditionalExpression?(t.write("("),this[i.type](i,t),t.write(")")):this[i.type](i,t),t.write(" ? "),this[e.consequent.type](e.consequent,t),t.write(" : "),this[e.alternate.type](e.alternate,t)},NewExpression:function(e,t){t.write("new ");var i=t.expressionsPrecedence[e.callee.type];i===V||i<t.expressionsPrecedence.CallExpression||Fs(e.callee)?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),Y(t,e.arguments)},CallExpression:function(e,t){var i=t.expressionsPrecedence[e.callee.type];i===V||i<t.expressionsPrecedence.CallExpression?(t.write("("),this[e.callee.type](e.callee,t),t.write(")")):this[e.callee.type](e.callee,t),e.optional&&t.write("?."),Y(t,e.arguments)},ChainExpression:function(e,t){this[e.expression.type](e.expression,t)},MemberExpression:function(e,t){var i=t.expressionsPrecedence[e.object.type];i===V||i<t.expressionsPrecedence.MemberExpression?(t.write("("),this[e.object.type](e.object,t),t.write(")")):this[e.object.type](e.object,t),e.computed?(e.optional&&t.write("?."),t.write("["),this[e.property.type](e.property,t),t.write("]")):(e.optional?t.write("?."):t.write("."),this[e.property.type](e.property,t))},MetaProperty:function(e,t){t.write(e.meta.name+"."+e.property.name,e)},Identifier:function(e,t){t.write(e.name,e)},PrivateIdentifier:function(e,t){t.write("#".concat(e.name),e)},Literal:function(e,t){e.raw!=null?t.write(e.raw,e):e.regex!=null?this.RegExpLiteral(e,t):e.bigint!=null?t.write(e.bigint+"n",e):t.write(js(e.value),e)},RegExpLiteral:function(e,t){var i=e.regex;t.write("/".concat(i.pattern,"/").concat(i.flags),e)}};G.GENERATOR=it;var $s={},Ws=it;G.baseGenerator=Ws;var Hs=function(){function e(t){Vs(this,e);var i=t??$s;this.output="",i.output!=null?(this.output=i.output,this.write=this.writeToStream):this.output="",this.generator=i.generator!=null?i.generator:it,this.expressionsPrecedence=i.expressionsPrecedence!=null?i.expressionsPrecedence:xi,this.indent=i.indent!=null?i.indent:" ",this.lineEnd=i.lineEnd!=null?i.lineEnd:`
|
|
`,this.indentLevel=i.startingIndentLevel!=null?i.startingIndentLevel:0,this.writeComments=!!i.comments&&i.comments,i.sourceMap!=null&&(this.write=i.output==null?this.writeAndMap:this.writeToStreamAndMap,this.sourceMap=i.sourceMap,this.line=1,this.column=0,this.lineEndSize=this.lineEnd.split(`
|
|
`).length-1,this.mapping={original:null,generated:this,name:void 0,source:i.sourceMap.file||i.sourceMap._file})}return Ms(e,[{key:"write",value:function(t){this.output+=t}},{key:"writeToStream",value:function(t){this.output.write(t)}},{key:"writeAndMap",value:function(t,i){this.output+=t,this.map(t,i)}},{key:"writeToStreamAndMap",value:function(t,i){this.output.write(t),this.map(t,i)}},{key:"map",value:function(t,i){if(i!=null){var s=i.type;if(s[0]==="L"&&s[2]==="n")return this.column=0,void this.line++;if(i.loc!=null){var r=this.mapping;r.original=i.loc.start,r.name=i.name,this.sourceMap.addMapping(r)}if(s[0]==="T"&&s[8]==="E"||s[0]==="L"&&s[1]==="i"&&typeof i.value=="string"){for(var n=t.length,l=this.column,o=this.line,c=0;c<n;c++)t[c]===`
|
|
`?(l=0,o++):l++;return this.column=l,void(this.line=o)}}var h=t.length,u=this.lineEnd;h>0&&(this.lineEndSize>0&&(u.length===1?t[h-1]===u:t.endsWith(u))?(this.line+=this.lineEndSize,this.column=0):this.column+=h)}},{key:"toString",value:function(){return this.output}}]),e}();function bi(e,t){var i=new Hs(t);return i.generator[e.type](e,i),i.output}var st=class{constructor(t){this.mime=Gt;this.idb=we;this.path=qs;this.acorn={parse:ai};this.bare={createBareClient:ci,BareClient:se};this.base64=be;this.estree={generate:bi};this.cookie={...Ze,serialize:(...t)=>{try{return Ye.apply({},t)}catch(i){console.log(i)}}};this.setCookieParser=_i.parse;this.ctx=t}},vi=st;function rt(e,t,i,s,r="",n=!1,l=""){if(self.__dynamic$config)var o=self.__dynamic$config.mode=="development";else var o=!1;if(n){var c=[{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:e+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}]},{nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:t+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}]}];return this.ctx.config.assets.files.inject&&c.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:this.ctx.config.assets.files.inject+(o?"?"+Math.floor(Math.random()*(99999-1e4)+1e4):"")}]}),s&&c.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(`self.__dynamic$cookies = atob("${btoa(s)}");document.currentScript?.remove();`)}]}),r&&c.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(r+";document.currentScript?.remove();")}]}),l&&c.unshift({nodeName:"script",tagName:"script",namespaceURI:"http://www.w3.org/1999/xhtml",childNodes:[],attrs:[{name:"src",value:"data:application/javascript;base64,"+btoa(l+";document.currentScript?.remove();")}]}),c}else{var h=[`<script src="${t+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}"><\/script>`,`<script src="${e+(o?"?"+Math.floor(Math.random()*89999+1e4):"")}"><\/script>`];return this.ctx.config.assets.files.inject&&h.unshift(`<script src="${this.ctx.config.assets.files.inject+(o?"?"+Math.floor(Math.random()*(99999-1e4)+1e4):"")}"><\/script>`),s&&h.unshift(`<script src="${"data:application/javascript;base64,"+btoa(`self.__dynamic$cookies = atob("${btoa(s)}");document.currentScript?.remove();`)}"><\/script>`),r&&h.unshift(`<script src="${"data:application/javascript;base64,"+btoa(r+";document.currentScript?.remove();")}"><\/script>`),l&&h.unshift(`<script src="${"data:application/javascript;base64,"+btoa(l+";document.currentScript?.remove();")}"><\/script>`),h}}var ne=class{constructor(t){this.generateHead=rt;this.config=[{elements:"all",tags:["style"],action:"css"},{elements:["script","iframe","embed","input","track","media","source","img","a","link","area","form","object"],tags:["src","href","action","data"],action:"url"},{elements:["source","img"],tags:["srcset"],action:"srcset"},{elements:["script","link"],tags:["integrity"],action:"rewrite",new:"nointegrity"},{elements:["script","link"],tags:["nonce"],action:"rewrite",new:"nononce"},{elements:["meta"],tags:["http-equiv"],action:"http-equiv"},{elements:["iframe"],tags:["srcdoc"],action:"html"},{elements:["link"],tags:["imagesrcset"],action:"srcset"},{elements:"all",tags:["onclick"],action:"js"}];this.ctx=t.ctx}generateRedirect(t){return`
|
|
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
|
|
<TITLE>301 Moved</TITLE></HEAD><BODY>
|
|
<H1>301 Moved</H1>
|
|
The document has moved
|
|
<A HREF="${t}">here</A>.
|
|
</BODY></HTML>
|
|
`}iterate(t,i){function s(r=t){for(var n=0;n<r.childNodes.length;n++)i(r.childNodes[n]),r.childNodes[n].childNodes&&r.childNodes[n].childNodes.length&&s(r.childNodes[n])}s(t)}rewrite(t,i,s=[]){return Array.isArray(t)&&(t=t[0]),!t||(t=t.toString(),!t.match(/<(html|script|style)[^>]*>/g)&&t.match(/<\!DOCTYPE[^>]*>/gi))?t:t.replace(/(<!DOCTYPE html>|<html(.*?)>)/im,`$1${s.join("")}
|
|
`).replace(/<(script|link)\b[^>]*>/g,(r,n)=>r.replace(/\snonce\s*=\s*"[^"]*"/,l=>l.replace("nonce","nononce")).replace(/\sintegrity\s*=\s*"[^"]*"/,l=>l.replace("integrity","nointegrity")))}};var ae=class{constructor(t){this.ctx=t.ctx}rewrite(t,i,s={}){let r=this;return t&&t.toString().replace(/((@import ['"`]+|url\(['"`]?)(.*?)(['"`]?\)|['"`]+))/gmi,function(){try{return arguments[0].replace(arguments[3],r.ctx.url.encode(arguments[3],i))}catch{}})}};function nt(e,t){if(typeof e!="object"||!t)return;i(e,null,t);function i(s,r,n){if(!(typeof s!="object"||!n)){s.parent=r,n(s,r,n);for(let l in s)l!=="parent"&&(Array.isArray(s[l])?s[l].forEach(o=>{o&&i(o,s,n)}):s[l]&&i(s[l],s,n));typeof s.iterateEnd=="function"&&s.iterateEnd()}}}function at(e,t={},i,s){var r=this.ctx.modules.acorn.parse(e.toString(),{sourceType:t.module?"module":"script",allowImportExportEverywhere:!0,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,ecmaVersion:"latest",preserveParens:!0,loose:!0,allowReserved:!0});return this.iterate(r,(n,l=null)=>{this.emit(n,n.type,l,i,s,t)}),e=this.ctx.modules.estree.generate(r),e}function ot(e,t={}){if(typeof e.name!="string")return!1;if(e.__dynamic!==!0){if(!["parent","top","postMessage","opener","window","self","globalThis","parent","location"].includes(e.name))return!1;if(!(t.type=="CallExpression"&&t.callee==e)&&!(t.type=="MemberExpression"&&t.object!==e&&!["document","window","self","globalThis"].includes(t.object.name))&&t.type!="FunctionDeclaration"&&t.type!="VariableDeclaration"&&!(t.type=="VariableDeclarator"&&t.id==e)&&t.type!="LabeledStatement"&&!(t.type=="Property"&&t.key==e)&&!(t.type=="ArrowFunctionExpression"&&t.params.includes(e))&&!(t.type=="FunctionExpression"&&t.params.includes(e))&&!(t.type=="FunctionExpression"&&t.id==e)&&!(t.type=="CatchClause"&&t.param==e)&&t.type!="ContinueStatement"&&t.type!="BreakStatement"&&!(t.type=="AssignmentExpression"&&t.left==e)&&t.type!="UpdateExpression"&&t.type!="UpdateExpression"&&!(t.type=="ForInStatement"&&t.left==e)&&!(t.type=="MethodDefinition"&&t.key==e)&&!(t.type=="AssignmentPattern"&&t.left==e)&&t.type!="NewExpression"&&t?.parent?.type!="NewExpression"&&!(t.type=="UnaryExpression"&&t.argument==e)&&!(t.type=="Property"&&t.shorthand==!0&&t.value==e)){if(e.name=="__dynamic")return e.name="undefined";if(e.name=="eval"&&t.right!==e)return e.name="__dynamic$eval";e.name=`dg$(${e.name})`}}}function Z(e,t={}){Object.entries({type:"CallExpression",callee:{type:"MemberExpression",object:{type:"Identifier",name:"self"},property:{type:"Identifier",name:"__dynamic$message"}},arguments:[e.object||e,{type:"Identifier",name:"self",__dynamic:!0}]}).forEach(([i,s])=>e[i]=s)}function ct(e,t={},i={}){if(e.object.name+="",t.type!=="AssignmentExpression"&&t.left!==e){if(e.property.value=="postMessage"&&t.type=="CallExpression"&&t.callee==e)return Z(e,t);if(e.object.value=="postMessage"&&t.type=="CallExpression"&&t.callee==e)return Z(e,t);if((e.property.name=="postMessage"||e.object.name=="postMessage")&&e.object.type!=="Super"){var s=e.object?.name;e.type="CallExpression",e.callee={type:"Identifier",name:"__dynamic$message"},e.arguments=[{type:"Identifier",name:s},{type:"Identifier",name:"self",__dynamic:!0}],t.type=="CallExpression"&&(t.arguments=t.arguments);return}}if(e.property.name=="eval"&&(e.property.name="__dynamic$eval"),e.object.name=="eval"&&(e.object.name="__dynamic$eval"),i.destination!=="worker"&&(e.property.name=="window"&&e.object.name!="top"&&(e.object.name=="self"||e.object.name=="globalThis")&&t.type!=="NewExpression"&&(t.type!=="CallExpression"||t.type=="CallExpression"&&e!==t.callee)&&(e.property.name="__dynamic$window"),e.object.name=="top"&&t.type!=="NewExpression"&&(t.type!=="CallExpression"||t.type=="CallExpression"&&e!==t.callee)&&(e.object.name="top.__dynamic$window"),e.property.name=="top"&&(e.object.name=="self"||e.object.name=="globalThis")&&t.type!=="NewExpression"&&(t.type!=="CallExpression"||t.type=="CallExpression"&&e!==t.callee)&&(e.property.name="top.__dynamic$window"),t.type!=="NewExpression"&&(t.type!=="CallExpression"||t.type=="CallExpression"&&e!==t.callee)&&(e.object.name=="window"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0}),e.object.name=="parent"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0}),e.property.name=="__dynamic"&&(e.property.name="undefined"),e.object.name=="self"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0}),e.object.name=="document"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0}),e.object.name=="globalThis"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0})),e.object.name=="location"&&(e.object={type:"CallExpression",callee:{type:"Identifier",name:"dg$"},arguments:[e.object],__dynamic:!0}),e.property.name=="location"&&t.type!=="BinaryExpression"&&t.type!=="AssignmentExpression")){e.property.__dynamic=!0,e.__dynamic=!0;let r=Object.assign({},e);e.type="CallExpression",e.callee={type:"Identifier",name:"dg$",__dynamic:!0},e.arguments=[r],e.__dynamic=!0}e.computed&&i.destination!=="worker"&&(e.property={type:"CallExpression",callee:{type:"Identifier",name:"dp$"},arguments:[e.property],__dynamic:!0})}function lt(e,t={}){if(!(e.value instanceof String)||(e.value=="__dynamic"&&(e.value="undefined"),!["location","parent","top","postMessage"].includes(e.value)))return!1;e.value=="postMessage"&&t.type!="AssignmentExpression"&&t.left!=e&&Z(e,t),e.value=="location"&&(e.value="__dynamic$location"),e.value=="__dynamic"&&(e.value="undefined"),e.value=="eval"&&(e.value="__dynamic$eval")}function Ne(e,t={}){e.__dynamic||e.arguments.length&&(e.arguments=[{type:"CallExpression",callee:{type:"Identifier",name:"__dynamic$wrapEval",__dynamic:!0},arguments:e.arguments,__dynamic:!0}],e.__dynamic=!0)}function pt(e,t={}){if(!(t.type=="AssignmentExpression"&&t.left==e)){if(e.callee.type=="Identifier"){if(e.callee.name=="postMessage"){let i="undefined";e.callee.type="CallExpression",e.callee.callee={type:"Identifier",name:"__dynamic$message"},e.callee.arguments=[{type:"Identifier",name:i},{type:"Identifier",name:"self",__dynamic:!0}];return}e.callee.name=="eval"&&Ne(e)}if(e.callee.type=="MemberExpression"){if(e.callee.property.name=="postMessage"&&e.callee.object.type!=="Super"){let i=e.callee.object;e.callee.type="CallExpression",e.callee.callee={type:"Identifier",name:"__dynamic$message"},e.callee.arguments=[i,{type:"Identifier",name:"self",__dynamic:!0}];return}e.callee.object.name=="eval"&&Ne(e)}e.arguments.length>0&&e.arguments.length<4;try{}catch{}}}function ht(e,t={}){if(e.left.type=="Identifier"){if(e.left.__dynamic===!0)return;if(e.left.name=="location"){var i=structuredClone(e.left),s=structuredClone(e.right);e.right.type="CallExpression",e.right.callee={type:"Identifier",name:"ds$"},e.right.arguments=[i,s]}}}function ut(e,t={}){e.parent.type!="ObjectPattern"&&e.parent?.parent?.type!="AssignmentExpression"&&(e.shorthand=!1)}function dt(e,t={},i={},s={}){if(e.type=="Literal"&&(t.type=="ImportDeclaration"||t.type=="ExportNamedDeclaration"||t.type=="ExportAllDeclaration")){var r=e.value+"";e.value=i.url.encode(e.value,s.meta),e.raw=e.raw.replace(r,e.value),e.__dynamic=!0}e.type=="ImportExpression"&&(e.source={type:"CallExpression",callee:{type:"Identifier",name:"__dynamic$import"},arguments:[e.source,{type:"Literal",__dynamic:!0,value:i.meta.href}]},e.__dynamic=!0)}function ft(e,t={}){if(e.id.type!=="Identifier")return!1;e.id.__dynamic!==!0&&e.id.name!="location"}function Gs(e,t,i={},s={},r={},n={}){if(!e.__dynamic){switch(t){case"Identifier":ot(e,i);break;case"MemberExpression":ct(e,i,n);break;case"Literal":lt(e,i);break;case"CallExpression":pt(e,i);break;case"AssignmentExpression":ht(e,i);break;case"ThisExpression":break;case"Property":ut(e,i);break;case"VariableDeclarator":ft(e,i);break;case"CatchClause":break;default:break}dt(e,i,s,r)}}var Ci=Gs;var oe=class{constructor(t){this.iterate=nt;this.process=at;this.emit=Ci;this.ctx=t.ctx}rewrite(t,i={},s=!0,r={}){if(!t||t instanceof Object||(t=t.toString(),t.includes("/* dynamic.js */")))return t;t=`/* dynamic.js */
|
|
|
|
${t}`;try{try{t=this.process(t,i,{module:!0,...this.ctx},r)}catch{t=this.process(t,i,{module:!1,...this.ctx},r)}}catch{}return s&&(t=`
|
|
if (typeof self !== undefined && typeof self.importScripts == 'function' && typeof self.__dynamic == 'undefined') importScripts('/dynamic/dynamic.config.js', '/dynamic/dynamic.handler.js?'+Math.floor(Math.random()*(99999-10000)+10000));
|
|
|
|
${t}`),t}};var ce=class{constructor(t){this.config={rewrite:[["icons","urlit"],["name"," - Dynamic"],["start_url","url"],["scope","url"],["short_name"," - Dynamic"],["shortcuts","urlev"]],delete:["serviceworker"]};this.ctx=t.ctx}rewrite(t,i){let s=JSON.parse(t);for(let o in this.config)if(o=="rewrite")for(var[r,n]of this.config[o]){if(n=="urlit"&&s[r]){for(var l=0;l<s[r].length;l++)s[r][l].src=this.ctx.url.encode(s[r][l].src,i);continue}if(n=="urlev"&&s[r]){for(var l=0;l<s[r].length;l++)s[r][l].url=this.ctx.url.encode(s[r][l].url,i);continue}if(n=="url"&&s[r]){s[r]=this.ctx.url.encode(s[r],i);continue}n=="url"||n=="urlit"||n=="urlev"||(s[r]=s[r]+n)}else if(o=="delete")for(var r of this.config[o])s[r]&&delete s[r];return JSON.stringify(s)}};var Ei={encode(e,t){return!e||!e.toString()?e:e.split(", ").map(i=>i.split(" ").map((s,r)=>r==0?t.url.encode(s,t.baseURL||t.meta):s).join(" ")).join(", ")},decode(e){return e}};var mt=class{constructor(t){this.ctx=t,this.html=new ne(this),this.srcset=Ei,this.js=new oe(this),this.css=new ae(this),this.man=new ce(this)}},Si=mt;async function ki(e){var t;if(e.method==="GET"){var i=new URL(e.url);t=i.searchParams.get("url")}else if(e.method==="POST"){if(t=(await e.formData()).get("url"),t===null){var i=new URL(e.url);t=i.searchParams.get("url")}if(!t)return new Response("Error: Invalid or Unfound url",{status:400})}else return new Response("Error: Invalid method",{status:405});return new Response("",{status:301,headers:{location:location.origin+this.ctx.config.prefix+this.ctx.encoding.encode(t)}})}function Ii({url:e}){return!e.toString().substr(location.origin.length,(this.ctx.config.prefix+"route").length).startsWith(this.ctx.config.prefix+"route")}function yt({url:e}){return!e.toString().substr(location.origin.length,this.ctx.config.prefix.length).startsWith(this.ctx.config.prefix)}async function gt(e,t,i){for(let r in e){if(this.ctx.headers.csp.indexOf(r.toLowerCase())!==-1&&delete e[r],r.toLowerCase()=="location"){e[r]=this.ctx.url.encode(e[r],t);continue}if(r.toLowerCase()==="set-cookie"){Array.isArray(e[r])?e[r]=e[r].map(n=>this.ctx.modules.setCookieParser(n,{decodeValues:!1})[0]):e[r]=this.ctx.modules.setCookieParser(e[r],{decodeValues:!1});for await(var s of e[r])await i.set(t.host,this.ctx.modules.cookie.serialize(s.name,s.value,{...s,encode:n=>n}));delete e[r];continue}}return new Headers(e)}function xt(e,t,i,s){let{referrer:r}=i;if(["origin","Origin","host","Host","referer","Referer"].forEach(n=>{e[n]&&delete e[n]}),e.Origin=`${t.protocol}//${t.host}${t.port?":"+t.port:""}`,e.Host=t.host+(t.port?":"+t.port:""),e.Referer=t.href,i.referrerPolicy=="strict-origin-when-cross-origin"&&(e.Referer=`${t.protocol}//${t.host}/`),i.referrerPolicy=="origin"&&t.origin&&(r=t.origin+"/"),s){switch(i.credentials){case"omit":break;case"same-origin":i.client&&t.origin==i.client.__dynamic$location.origin&&(e.Cookie=s),i.client||(e.Cookie=s);break;case"include":e.Cookie=s;break;default:break}e.Cookie=s}if(r&&r!=location.origin+"/")try{e.Referer=this.ctx.url.decode(r),i.referrerPolicy=="strict-origin-when-cross-origin"&&(e.Referer=new URL(this.ctx.url.decode(r)).origin),e.Origin=new URL(this.ctx.url.decode(r)).origin}catch{}return i.client&&(e.Origin=i.client.__dynamic$location.origin,e.Referer=i.client.__dynamic$location.href,i.referrerPolicy=="strict-origin-when-cross-origin"&&(e.Referer=i.client.__dynamic$location.origin)),this.ctx.config.tab&&this.ctx.config.tab.ua&&(delete e["user-agent"],delete e["User-Agent"],e["user-agent"]=this.ctx.config.tab.ua),e["sec-fetch-dest"]=i.destination||"empty",e["sec-fetch-mode"]=i.mode||"cors",e["sec-fetch-site"]=i.client?i.client.__dynamic$location.origin==t.origin?i.client.__dynamic$location.port==t.port?"same-origin":"same-site":"cross-origin":"none",i.mode=="navigate"&&(e["sec-fetch-site"]="same-origin"),e["sec-fetch-user"]="?1",new Headers(e)}function wt(e){var t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return t}function bt(e){try{if(new new Proxy(e,{construct:()=>({})}),!Object.getOwnPropertyNames(e).includes("arguments"))throw new Error("");return!0}catch{return!1}}function _t(e){return e.url.toString().substr(location.origin.length,e.url.toString().length).startsWith(self.__dynamic$config.assets.prefix)}async function vt(e){let t;if(self.__dynamic$config.mode!=="development"){var i=await caches.open("__dynamic$files");i?t=await i.match(e.url)||await fetch(e):t=await fetch(e)}else t=await fetch(e);let s=await t.blob();return(e.url.startsWith(location.origin+"/dynamic/dynamic.config.js")||e.url.startsWith(location.origin+"/dynamic/dynamic.client.js"))&&(s=new Blob([`${await s.text()}
|
|
self.document?.currentScript?.remove();`],{type:"application/javascript"})),new Response(s,{headers:t.headers,status:t.status,statusText:t.statusText})}async function Ct(e,t){}var le=class{constructor(t){this.rawHeaders={};this.headers=new Headers({});this.status=200;this.statusText="OK";this.body=t}async blob(){return this.body}async text(){return await this.body.text()}};function Et(e){var t=this.ctx.encoding;return typeof this.ctx.config.encoding=="object"?t={...t,...this.ctx.encoding}:t={...this.ctx.encoding[this.ctx.config.encoding]},this.ctx.encoding={...this.ctx.encoding,...t},this.ctx.encoding}function St(e,t,i){if(!e.url.startsWith("http"))return e.url;let s=e.url.toString();return e.url.startsWith(location.origin)&&(s=s.substr(self.location.origin.length)),s=new URL(s,new URL(t.__dynamic$location.href)).href,this.ctx.url.encode(s,i)}var kt=class{constructor(t){this.route=ki;this.routePath=Ii;this.path=yt;this.resHeader=gt;this.reqHeader=xt;this.clone=wt;this.class=bt;this.file=_t;this.edit=vt;this.error=Ct;this.encode=Et;this.rewritePath=St;this.about=le;this.ctx=t}},Ai=kt;function It(e,t){if(!e)return e;if(e=new String(e).toString(),e.startsWith("about:blank"))return location.origin+this.ctx.config.prefix+e;if(!e.match(this.ctx.regex.ProtocolRegex)&&e.match(/^([a-zA-Z0-9\-]+)\:\/\//g)||e.startsWith("chrome-extension://"))return e;if(e.match(this.ctx.regex.WeirdRegex)){var i=this.ctx.regex.WeirdRegex.exec(e);i&&(e=i[2])}if(e.startsWith(location.origin+this.ctx.config.prefix)||e.startsWith(this.ctx.config.prefix)||e.startsWith(location.origin+this.ctx.config.assets.prefix+"dynamic.")||e.match(this.ctx.regex.BypassRegex))return e;if(e.match(this.ctx.regex.DataRegex)){try{var i=this.ctx.regex.DataRegex.exec(e);if(i){var[s,r,n,l,o]=i;l=="base64"?o=this.ctx.modules.base64.atob(decodeURIComponent(o)):o=decodeURIComponent(o),r&&(r=="text/html"?o=this.ctx.rewrite.html.rewrite(o,t,this.ctx.rewrite.html.generateHead(location.origin+"/dynamic/dynamic.client.js",location.origin+"/dynamic/dynamic.config.js","",`window.__dynamic$url = "${t.href}"; window.__dynamic$parentURL = "${location.href}";`)):r=="text/css"?o=this.ctx.rewrite.css.rewrite(o,t):(r=="text/javascript"||r=="application/javascript")&&(o=this.ctx.rewrite.js.rewrite(o,t))),l=="base64"?o=this.ctx.modules.base64.btoa(o):o=encodeURIComponent(o),n?l?e=`data:${r};${n};${l},${o}`:e=`data:${r};${n},${o}`:l?e=`data:${r};${l},${o}`:e=`data:${r},${o}`}}catch{}return e}return e=new String(e).toString(),t.href.match(this.ctx.regex.BypassRegex)&&(e=new URL(e,new URL((this.ctx.parent.__dynamic||this.ctx).meta.href)).href),e=new URL(e,t.href),(this.ctx._location?.origin||(location.origin=="null"?location.ancestorOrigins[0]:location.origin))+this.ctx.config.prefix+(this.ctx.encoding.encode(e.origin+e.pathname)+e.search+e.hash)}function At(e){if(!e||(e=new String(e).toString(),e.match(this.ctx.regex.BypassRegex)))return e;var t=e.indexOf(this.ctx.config.prefix);if(t==-1)return e;try{if(e=new URL(e,new URL(self.location.origin)).href,t=e.indexOf(this.ctx.config.prefix),e.slice(t+this.ctx.config.prefix.length).trim()=="about:blank")return"about:blank";var i=new URL(e).search+new URL(e).hash||"",s=new URL(this.ctx.encoding.decode(e.slice(t+this.ctx.config.prefix.length).replace("https://","https:/").replace("https:/","https://").split("?")[0]))}catch{return e}return e=s.origin+s.pathname+i+(new URL(e).search?s.search.replace("?","&"):s.search),e}var Pt=class{constructor(t){this.encode=It;this.decode=At;this.ctx=t}},Pi=Pt;function Nt(e){e=new URL(e.href);for(var t in e)this.ctx.meta[t]=e[t];return!0}var pe=class{constructor(){}};var Tt=class extends pe{constructor(i){super();this.load=Nt;this.ctx=i}},Ni=Tt;var he=class{constructor(t="",i=new Request("")){this.headers=new Headers({});this.redirect="manual";this.body=null;this.method="GET";i.headers&&(this.headers=i.headers),i.redirect&&(this.redirect=i.redirect),i.body&&(this.body=i.body),this.method=i.method||"GET",this.url=new String(t)}get init(){return{headers:this.headers||new Headers({}),redirect:this.redirect||"manual",body:this.body||null,method:this.method||"GET"}}};var ue=class extends Response{constructor(i="",s=new Response("")){super(i,s);this.status=200;this.statusText="OK";this.headers=new Headers({});this.body=i,s.status&&(this.status=s.status),s.statusText&&(this.statusText=s.statusText),s.headers&&(this.headers=s.headers)}get init(){return{headers:this.headers||new Headers({}),statusText:this.statusText||200,body:this.body||new Blob([]),status:this.statusText||"OK"}}};var Rt=class{constructor(t){this.Request=he;this.Response=ue;this.ctx=t}},Ti=Rt;var zs=/^(#|about:|mailto:|blob:|javascript:)/g,Ks=/^data:([a-z\/A-Z0-9\-\+]+);?(charset\=[\-A-Za-z0-9]+)?;?(base64)?[;,]*(.*)/g,Xs=/^([\/A-Za-z0-9\-%]+)(http[s]?:\/\/.*)/g,de=class{constructor(t){this.BypassRegex=zs;this.DataRegex=Ks;this.WeirdRegex=Xs;this.ctx=t}};var Lt=class{constructor(t){this.ctx=t}},Ri=Lt;var Li={csp:["cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","origin-isolation","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-frame-options","x-permitted-cross-domain-policies","x-xss-protection"],status:{empty:[204,101,205,304]},method:{body:["GET","HEAD"]}};function Ot(e,t=""){return(this.ctx.modules.mime.contentType(t||e.pathname)||"text/css").split(";")[0]==="text/css"}function Dt(e,t="",i=""){let s;return!t&&this.ctx.modules.mime.contentType(e.pathname)==e.pathname?i.trim().match(/<(html|script|body)[^>]*>/g)&&(s=i.trim().indexOf((i.trim().match(/<(html|script|body)[^>]*>/g)||[])[0]),s>-1&&s<100):(this.ctx.modules.mime.contentType(t||e.pathname)||"text/html").split(";")[0]==="text/html"||i.trim().match(/\<\!(doctype|DOCTYPE) html\>/g)}function Bt(e,t=""){if(e.pathname.endsWith(".js")&&t=="text/plain")return!0;var i=(this.ctx.modules.mime.contentType(t||e.pathname)||"application/javascript").split(";")[0];return i=="text/javascript"||i=="application/javascript"||i=="application/x-javascript"}var Vt=class{constructor(t){this.html=Dt;this.js=Bt;this.css=Ot;this.ctx=t}},Oi=Vt;function Qs(e,t){return e||(e=[]),e.find(i=>i.name==t.name)?e[e.findIndex(i=>i.name==t.name)]={name:t.name,value:t.value,expires:t.expires}:e.push({name:t.name,value:t.value,expires:t.expires}),e}var $={open:async()=>je("__dynamic$cookies",1,{async upgrade(e){await e.createObjectStore("__dynamic$cookies")}}),set:async(e,t,i)=>{if(t.domain&&(e=t.domain),e.startsWith(".")&&(e=e.slice(1)),t.expires){var s=new Date(t.expires);if(s<new Date)return $.remove(e,t,i)}return await(await i).put("__dynamic$cookies",Qs(await(await i).get("__dynamic$cookies",e),t),e),!0},get:async(e,t)=>{var i=e.replace(/^(.*\.)?([^.]*\..*)$/g,"$2"),s=await(await t).get("__dynamic$cookies",e)||[];if(e!==i&&e!=="."+i){var r=await(await t).get("__dynamic$cookies",i);if(r)for(var{name:n,value:l,expires:o}of r){if(o){var c=new Date(o);if(c<=new Date){$.remove(e,r.find(h=>h.name==n&&h.value==l&&h.expires==o),t);continue}}s.find(h=>h.name==n&&h.value==l)||s.push({name:n,value:l,expires:o||new Date(1e13)})}}return s},remove:async(e,t,i)=>{t.domain&&(e=t.domain),e.startsWith(".")&&(e=e.slice(1));var s=await(await i).get("__dynamic$cookies",e);return s?(s=s.filter(r=>r.name!==t.name),await(await i).put("__dynamic$cookies",s,e),!0):!1},update:async(e,t)=>{var i=e.replace(/^(.*\.)?([^.]*\..*)$/g,"$2"),s=await(await t).get("__dynamic$cookies",i);if(s){for(var{name:r,value:n,expires:l}of s)if(l){var o=new Date(l);if(o<=new Date){$.remove(e,{name:r,value:n,expires:l},t);continue}}}return s}};var Di=(e=[])=>e.map(t=>`${t.name}=${t.value}`).join("; ");var fe=class{constructor(t){this.db=$;this.ctx=t}async get(t){this._db||(this._db=this.db.open());let i=await $.get(t,this._db);return Di(i)}async set(t,i=""){return i=this.ctx.modules.setCookieParser.parse(i,{decodeValues:!1})[0],this._db||(this._db=this.db.open()),await $.set(t,i,this._db)}async open(){await $.open()}async update(t){return this._db||(this._db=this.db.open()),await $.update(t,this._db)}};var Mt={};ge(Mt,{base64:()=>er,none:()=>Js,plain:()=>Zs,xor:()=>Ys});var Ys={encode:(e,t=2)=>e&&encodeURIComponent(e.split("").map((i,s)=>s%t?String.fromCharCode(i.charCodeAt(0)^t):i).join("")),decode:(e,t=2)=>e&&decodeURIComponent(e).split("").map((i,s)=>s%t?String.fromCharCode(i.charCodeAt(0)^t):i).join("")},Zs={encode:e=>e&&encodeURIComponent(e),decode:e=>e&&decodeURIComponent(e)},Js={encode:e=>e,decode:e=>e},er={encode:e=>e&&decodeURIComponent(Ue(e)),decode:e=>e&&Fe(e)};var me=class{constructor(t){this.modules=new vi(this);this.util=new Ai(this);this.http=new Ti(this);this.meta=new Ni(this);this.rewrite=new Si(this);this.url=new Pi(this);this.is=new Oi(this);this.cookies=new fe(this);this.regex=new de(this);this.headers=Li;this.encoding=Mt;this.middleware=new Ri(this);this.listeners=[];t&&!this.config&&(this.config=t),t&&this.util.encode(self)}on(t,i){this.listeners.push({event:t,cb:i})}fire(t,i){var s=!1;for(var r of this.listeners)r.event===t&&(i=(s=!0,r.cb(...i)));return s&&i?i:null}};(function(e){e.skipWaiting(),e.addEventListener("install",async(s,r)=>{let n=e.__dynamic$config.logLevel||0;if(n>1&&console[e.__dynamic$config.mode=="development"?"group":"groupCollapsed"]("Dynamic Install Sequence:"),typeof e.ORIGINS=="object")if(e.ORIGINS.length)if(e.ORIGINS[0]=="*")console.log("Wildcard Origin Accepted");else if(e.ORIGINS.includes(location.origin))n>1&&console.log("Origin Verified: "+location.origin);else return console.error("Illegal Origin: "+location.origin),console.log("Status: Aborting Install"),console.groupEnd(),await e.registration.unregister();else console.warn("Warning: No Origins Specified");else typeof e.ORIGINS=="string"?e.ORIGINS=="*"&&n>1&&console.log("Wildcard Origin Accepted"):n>0&&console.warn("Warning: No Origins Specified");n>1&&console.log("ServiceWorker Installed:",s),n>1&&console.log("Configuration Loaded:",e.__dynamic$config),await e.skipWaiting(),n>1&&console.groupCollapsed("Loading Dynamic Modules:");for await(var l of[["html","dynamic.html.js"]]){var[o,c]=l;c=new URL(c,new URL(location.origin+e.__dynamic$config.assets.prefix+"dynamic.worker.js")).href,e[o]=fetch(c).then(u=>(n>1&&console.log("Loaded Dynamic Module: "+o,u),e[o]=u.text())).then(u=>(0,eval)(u)),n>1&&console.log("Loading: "+o,c)}if(console.groupEnd(),e.__dynamic$config.mode=="development")return console.groupEnd();let h=await caches.open("__dynamic$files");n>1&&console.groupCollapsed("Dynamic File Cache:");for await(var l of Object.values(e.__dynamic$config.assets.files)){if(!l)continue;var c=l;c=new URL(c,new URL(location.origin+e.__dynamic$config.assets.prefix+"dynamic.worker.js")).href;let x=await fetch(c);await h.put(c,x),n>1&&console.log("Cache Installed: "+c.split("/").pop(),x)}console.groupEnd(),console.groupEnd()}),e.addEventListener("activate",s=>{e.skipWaiting(),s.waitUntil(e.clients.claim())}),e.addEventListener("message",async s=>{let{data:r}=s;if(r.type=="createBlobHandler"){var n=new Response(r.blob,{headers:{"Content-Type":"text/html","Content-Length":r.blob.size,"x-dynamic-location":r.location}}),l=await caches.open("__dynamic$blob"),o=t.config.prefix+"caches/"+r.url;await l.put(o,n),e.clients.matchAll().then(c=>{c.forEach(h=>{h.postMessage({url:o})})})}}),e.__dynamic$config||importScripts("/dynamic/dynamic.config.js");let t=new me(e.__dynamic$config),i=e.__dynamic$config.block||[];return t.config=e.__dynamic$config,t.config.bare.path=typeof t.config.bare.path=="string"?[new URL(t.config.bare.path,e.location)][0]:t.config.bare.path.map(s=>new URL(s,e.location)),t.encoding={...t.encoding,...t.encoding[t.config.encoding||"none"]},e.__dynamic=t,e.Object.defineProperty(e.WindowClient.prototype,"__dynamic$location",{get(){return new URL(t.url.decode(this.url))}}),e.Dynamic=class{constructor(s=e.__dynamic$config){this.listeners=[];this.middleware=t.middleware;this.on=e.__dynamic.on;this.fire=e.__dynamic.fire;t.bare=t.modules.bare.createBareClient(t.config.bare.path),e.__dynamic$config=s}async route(s){let{request:r}=s;if(r.url.startsWith(t.config.bare.path.toString()))return!1;if(r.url.startsWith(location.origin+e.__dynamic$config.prefix))return!0;if(i.includes(r.url))return!1;if(r.mode!=="navigate"&&(r.client=(await e.clients.matchAll()).find(n=>n.id==s.clientId)),!r.url.startsWith(location.origin+e.__dynamic$config.prefix))return r.client?!!r.client.url.startsWith(location.origin+e.__dynamic$config.prefix):!1}async fetch(s){let{request:r}=s;try{if(r.mode!=="navigate"&&(r.client=(await e.clients.matchAll()).find(w=>w.id==s.clientId)),t.util.file(r))return await t.util.edit(r);if(r.url.startsWith(e.__dynamic$config.bare.path.toString()))return await fetch(r);if(t.util.path(r)){if(!r.client||!r.url.startsWith("http"))return await fetch(r);Object.defineProperty(r,"url",{value:t.util.rewritePath(r,r.client,new URL(e.__dynamic.url.decode(new URL(r.url))))})}if(!t.util.routePath(r))return await t.util.route(r);await t.bare.working;let c=new me(t.config);c.encoding={...c.encoding,...c.encoding[t.config.encoding||"none"]},c.on=(w,S)=>e.__dynamic.on(w,S),c.fire=(w,...S)=>e.__dynamic.fire(w,S);let h=c.fire("request",[r]);if(h)return h;if(r.url.startsWith(location.origin+t.config.prefix+"caches/")){let S=await(await caches.open("__dynamic")).match(new URL(r.url).pathname);if(!S)return new Response(null,{status:201});var n;let A=await S.blob(),P=await A.text(),W=c.rewrite.html.generateHead(location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.client,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.config,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.config,"",`window.__dynamic$url = "${S.headers.get("x-dynamic-location")}"`);return c.meta.load(new URL(S.headers.get("x-dynamic-location"))),c.is.html(c.meta,S.headers.get("content-type"),P)?n=new Blob([c.rewrite.html.rewrite(P,c.meta,W)]):n=A,new Response(n,{status:S.status,statusText:S.statusText,headers:S.headers})}if(c.meta.load(new URL(c.url.decode(new URL(r.url)))),i.indexOf(c.meta.host)!==-1)return this.fire("blocked",[c.meta,r])||new Response(null,{status:403,statusText:"Forbidden"});let u=c.cookies;await u.open(),await u.update(c.meta.host);let f=Object.fromEntries(r.headers.entries()),x=t.util.reqHeader(f,c.meta,r,await u.get(r.client?r.client.__dynamic$location.host:c.meta.host)),v=new t.http.Request(c.meta.href,{headers:x,redirect:r.redirect||"manual",method:r.method,credentials:r.credentials,body:null,cache:r.cache}),y;t.headers.method.body.indexOf(r.method.toUpperCase())==-1&&(v.body=await r.blob()),c.meta.protocol!=="about:"?y=await(await t.bare).fetch(c.meta.href,v.init):y=new t.util.about(new Blob(["<html><head></head><body></body></html>"]));let a=this.fire("fetched",[c.meta,y,r]);if(a)return a;let d=await c.util.resHeader(y.rawHeaders,c.meta,u);var l=await e.clients.matchAll();for await(var o of l)o.postMessage({type:"cookies",host:c.meta.host,cookies:await u.get(c.meta.host)});let m=!1;switch(r.destination){case"document":let w=await y.blob(),S=await w.text(),A=c.rewrite.html.generateHead(location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.client,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.config,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.client,await u.get(c.meta.host),"",!1,"self.__dynamic$bare = JSON.parse('"+JSON.stringify((await t.bare).manifest)+"');");c.is.html(c.meta,y.headers.get("content-type"),S)?m=new Blob([c.rewrite.html.rewrite(S,c.meta,A)],{type:y.headers.get("content-type")||"text/html; charset=utf-8"}):m=w;break;case"iframe":{let P=await y.blob(),W=await P.text();if(c.is.html(c.meta,y.headers.get("content-type"),W)){try{let U=c.rewrite.html.generateHead(location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.client,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.config,location.origin+e.__dynamic$config.assets.prefix+e.__dynamic$config.assets.files.client,await u.get(c.meta.host),"",!0,"self.__dynamic$bare = JSON.parse('"+JSON.stringify((await t.bare).manifest)+"');");m=new Blob([new(await e.html)({ctx:c}).rewrite(W,c.meta,U)],{type:y.headers.get("content-type")||"text/html; charset=utf-8"})}catch{m=P}break}m=P;break}case"worker":case"script":c.is.js(c.meta,y.headers.get("content-type"))&&(m=new Blob([c.rewrite.js.rewrite(await y.text(),r,!0,c)],{type:y.headers.get("content-type")||"application/javascript"}));break;case"style":c.is.css(c.meta,y.headers.get("content-type"))&&(m=new Blob([c.rewrite.css.rewrite(await y.text(),c.meta)],{type:y.headers.get("content-type")||"text/css"}));break;case"manifest":m=new Blob([c.rewrite.man.rewrite(await y.text(),c.meta)],{type:y.headers.get("content-type")||"application/json"});break;default:{let P=await y.blob(),W=await P.text();if(c.is.html(c.meta,y.headers.get("content-type"),W)){try{m=new Blob([new(await e.html)({ctx:c}).rewrite(W,c.meta,[])],{type:y.headers.get("content-type")||"text/html; charset=utf-8"})}catch{m=P}break}m=P;break}}m==!1&&(m=await y.blob()),t.headers.status.empty.indexOf(y.status)!==-1&&(m=null),x.get("accept")==="text/event-stream"&&d.set("content-type","text/event-stream"),m&&d.set("content-length",m.size);let g=this.fire("response",[c.meta,y,r,d,m]);return g||new Response(m,{status:y.status,statusText:y.statusText,headers:d})}catch(c){return e.__dynamic$config.logLevel>=1&&console.error(c),new Response(c,{status:500,statusText:"error",headers:new Headers({})})}}}})(self);})();
|
|
//# sourceMappingURL=dynamic.worker.js.map
|