diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..e69de29bb diff --git a/src/.eslintrc.js b/src/.eslintrc.js new file mode 100644 index 000000000..5b999efa4 --- /dev/null +++ b/src/.eslintrc.js @@ -0,0 +1,10 @@ +module.exports = { + root: true, + // This tells ESLint to load the config from the package `eslint-config-custom` + extends: ["custom"], + settings: { + next: { + rootDir: ["apps/*/"], + }, + }, +}; diff --git a/src/.gitattributes b/src/.gitattributes new file mode 100644 index 000000000..83e15fe21 --- /dev/null +++ b/src/.gitattributes @@ -0,0 +1,2 @@ +packages/haxidraw-client/src/flatten-svg/* linguist-vendored +.yarn/patches/* linguist-generated \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 000000000..50f15ce2f --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,43 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +node_modules +.pnp +.pnp.* + +# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored +.yarn/* +!.yarn/patches +# !.yarn/plugins +# !.yarn/releases +!.yarn/versions + +# testing +coverage + +# next.js +.next/ +out/ +build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# turbo +.turbo + +# vercel +.vercel diff --git a/src/.idea/.gitignore b/src/.idea/.gitignore new file mode 100644 index 000000000..b58b603fe --- /dev/null +++ b/src/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/src/.idea/compiler.xml b/src/.idea/compiler.xml new file mode 100644 index 000000000..3b851673f --- /dev/null +++ b/src/.idea/compiler.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/.idea/dictionaries/me.xml b/src/.idea/dictionaries/me.xml new file mode 100644 index 000000000..6504a106b --- /dev/null +++ b/src/.idea/dictionaries/me.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/.idea/discord.xml b/src/.idea/discord.xml new file mode 100644 index 000000000..d8e956166 --- /dev/null +++ b/src/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/.idea/modules.xml b/src/.idea/modules.xml new file mode 100644 index 000000000..7f7055998 --- /dev/null +++ b/src/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/.idea/new-src.iml b/src/.idea/new-src.iml new file mode 100644 index 000000000..24643cc37 --- /dev/null +++ b/src/.idea/new-src.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/.idea/prettier.xml b/src/.idea/prettier.xml new file mode 100644 index 000000000..b0c1c68fb --- /dev/null +++ b/src/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/.idea/vcs.xml b/src/.idea/vcs.xml new file mode 100644 index 000000000..6c0b86358 --- /dev/null +++ b/src/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.npmrc b/src/.npmrc new file mode 100644 index 000000000..ded82e2f6 --- /dev/null +++ b/src/.npmrc @@ -0,0 +1 @@ +auto-install-peers = true diff --git a/src/.vscode/extensions.json b/src/.vscode/extensions.json new file mode 100644 index 000000000..daaa5ee2e --- /dev/null +++ b/src/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "arcanis.vscode-zipfs", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode" + ] +} diff --git a/src/.vscode/launch.json b/src/.vscode/launch.json new file mode 100644 index 000000000..e133c5402 --- /dev/null +++ b/src/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "type": "firefox", + "request": "attach", + "name": "Attach", + "url": "localhost:3000", + "webRoot": "${workspaceFolder}/apps/editor", + "enableCRAWorkaround": true + } + ] +} \ No newline at end of file diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json new file mode 100644 index 000000000..710727a62 --- /dev/null +++ b/src/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "search.exclude": { + "**/.yarn": true, + "**/.pnp.*": true + }, + "eslint.nodePath": ".yarn/sdks", + "prettier.prettierPath": ".yarn/sdks/prettier/index.js", + "typescript.tsdk": ".yarn/sdks/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + "cmake.configureOnOpen": false +} diff --git a/src/.yarn/patches/@rollup-browser-npm-3.26.2-ec96fc6979.patch b/src/.yarn/patches/@rollup-browser-npm-3.26.2-ec96fc6979.patch new file mode 100644 index 000000000..94902bcb7 --- /dev/null +++ b/src/.yarn/patches/@rollup-browser-npm-3.26.2-ec96fc6979.patch @@ -0,0 +1,21 @@ +diff --git a/dist/es/rollup.browser.js b/dist/es/rollup.browser.js +index d5e5786dea7eadd270c97dec6c728aa14df9943d..00ebfe3bf6cf095371990ad0da86c53296e040b9 100644 +--- a/dist/es/rollup.browser.js ++++ b/dist/es/rollup.browser.js +@@ -7,4 +7,4 @@ + + Released under the MIT License. + */ +-var e="3.26.2";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(e){const t=",".charCodeAt(0),s=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;eBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s>>=1,l&&(n=-2147483648|-n),s[i]+=n,t}function h(e,s,i){return!(s>=i)&&e.charCodeAt(s)!==t}function u(e){e.sort(d)}function d(e,t){return e[0]-t[0]}function p(e){const i=new Int32Array(5),n=16384,r=n-36,a=new Uint8Array(n),l=a.subarray(0,r);let c=0,h="";for(let u=0;u0&&(c===n&&(h+=o.decode(a),c=0),a[c++]=s),0!==d.length){i[0]=0;for(let e=0;er&&(h+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,i,s,0),1!==s.length&&(c=f(a,c,i,s,1),c=f(a,c,i,s,2),c=f(a,c,i,s,3),4!==s.length&&(c=f(a,c,i,s,4)))}}}return h+o.decode(a.subarray(0,c))}function f(e,t,s,i,r){const o=i[r];let a=o-s[r];s[r]=o,a=a<0?-a<<1|1:a<<1;do{let s=31&a;a>>>=5,a>0&&(s|=32),e[t++]=n[s]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(s.exports);var i=s.exports;class n{constructor(e){this.bits=e instanceof n?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let r=class e{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.startwindow.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const a=o();class l{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=i.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+a(this.toString())}}function c(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const h=Object.prototype.toString;function u(e){return"[object Object]"===h.call(e)}function d(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e>1;e=0&&t.push(i),this.rawSegments.push(t)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,o=!0;for(;r1){for(let e=0;e{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?c(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new l(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;if(u(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const i={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];tn?`${e}${t}`:(n=!0,t);this.intro=this.intro.replace(s,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)i[o]||(a.content=a.content.replace(s,r),a.content.length&&(n="\n"===a.content[a.content.length-1]));else for(o=a.start;o=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,o=n.next,a=this.byStart[s];if(!a&&n===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=i),a&&(a.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,n.next=a||null,l||(this.firstChunk=i),a||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if("string"!=typeof s)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(m.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),m.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,o=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!o)}else{const i=new r(e,t,"").edit(s,n);l.next=i,i.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(f);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(f),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(f),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(f),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(f),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=n===i?e-i.start:0,a=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(o,a),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=s?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=d(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,s(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,s(t,this.original))}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&this.overwrite(i,i+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i))this.overwrite(n,n+i,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const y=Object.prototype.hasOwnProperty;const x=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,E=/^\.?\.\//,b=/\\/g,v=/[/\\]/,S=/\.[^.]+$/;function A(e){return x.test(e)}function k(e){return E.test(e)}function I(e){return e.replace(b,"/")}function w(e){return e.split(v).pop()||""}function P(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function C(e){const t=S.exec(w(e));return t?t[0]:""}function $(e,t){const s=e.split(v).filter(Boolean),i=t.split(v).filter(Boolean);for("."===s[0]&&s.shift(),"."===i[0]&&i.shift();s[0]&&i[0]&&s[0]===i[0];)s.shift(),i.shift();for(;".."===i[0]&&s.length>0;)i.shift(),s.pop();for(;s.pop();)i.unshift("..");return i.join("/")}function N(...e){const t=e.shift();if(!t)return"/";let s=t.split(v);for(const t of e)if(A(t))s=t.split(v);else{const e=t.split(v);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&s.pop()}s.push(...e)}return s.join("/")}const _=/[\n\r'\\\u2028\u2029]/,R=/([\n\r'\u2028\u2029])/g,O=/\\/g;function D(e){return _.test(e)?e.replace(O,"\\\\").replace(R,"\\$1"):e}function L(e){const t=w(e);return t.slice(0,Math.max(0,t.length-C(e).length))}function T(e){return A(e)?$(N(),e):e}function M(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||A(e)}const V=/^(\.\.\/)*\.\.$/;function B(e,t,s,i){let n=I($(P(e),t));if(s&&n.endsWith(".js")&&(n=n.slice(0,-3)),i){if(""===n)return"../"+w(t);if(V.test(n))return[...n.split("/"),"..",w(t)].join("/")}return n?n.startsWith("..")?n:"./"+n:"."}class z{constructor(e,t,s){this.options=t,this.inputBase=s,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?I($(this.inputBase,this.id)):this.id)}getImportAssertions(e){return this.importAssertions||(this.importAssertions=function(e,{getObject:t}){if(!e)return null;const s=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(s.length>0)return t(s,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAssertions&&this.moduleInfo.assertions,e))}getImportPath(e){return D(this.renormalizeRenderPath?B(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function F(e,t,s){const i=e.get(t);if(void 0!==i)return i;const n=s();return e.set(t,n),n}function j(){return new Set}function U(){return[]}const G=Symbol("Unknown Key"),W=Symbol("Unknown Non-Accessor Key"),q=Symbol("Unknown Integer"),H=Symbol("Symbol.toStringTag"),K=[],Y=[G],X=[W],Q=[q],Z=Symbol("Entities");class J{constructor(){this.entityPaths=Object.create(null,{[Z]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const s=this.getEntities(e);return!!s.has(t)||(s.add(t),!1)}withTrackedEntityAtPath(e,t,s,i){const n=this.getEntities(e);if(n.has(t))return i;n.add(t);const r=s();return n.delete(t),r}getEntities(e){let t=this.entityPaths;for(const s of e)t=t[s]=t[s]||Object.create(null,{[Z]:{value:new Set}});return t[Z]}}const ee=new J;class te{constructor(){this.entityPaths=Object.create(null,{[Z]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,s){let i=this.entityPaths;for(const t of e)i=i[t]=i[t]||Object.create(null,{[Z]:{value:new Map}});const n=F(i[Z],t,j);return!!n.has(s)||(n.add(s),!1)}}const se=Symbol("Unknown Value"),ie=Symbol("Unknown Truthy Value");class ne{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){ae(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,s){return se}getReturnExpressionWhenCalledAtPath(e,t,s,i){return oe}hasEffectsOnInteractionAtPath(e,t,s){return!0}include(e,t,s){this.included=!0}includeCallArguments(e,t){for(const s of t)s.include(e,!1)}shouldBeIncluded(e){return!0}}const re=new class extends ne{},oe=[re,!1],ae=e=>{for(const t of e.args)t?.deoptimizePath(Y)},le={args:[null],type:0},ce={args:[null,re],type:1},he={args:[null],type:2,withNew:!1};class ue extends ne{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(e)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:t},s){return 0!==t||e.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class de extends ue{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const pe=Object.freeze(Object.create(null)),fe=Object.freeze({}),me=Object.freeze([]),ge=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var ye=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const xe=/[^\w$]/g,Ee=e=>(e=>/\d/.test(e[0]))(e)||ye.has(e)||"arguments"===e;function be(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(xe,"_"),Ee(e)&&(e=`_${e}`),e||"_"}const ve="warn",Se="info",Ae="debug",ke={[Ae]:0,[Se]:1,silent:3,[ve]:2};function Ie(e,t){return e.start<=t&&t{const s=n+e.length+1,i={start:n,end:s,line:t};return n=s,i}));let o=0;return function(t,n){if("string"==typeof t&&(t=e.indexOf(t,n??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(Ie(a,t))return{line:s+a.line,column:i+t-a.start,character:t};o+=l,a=r[o]}}}(e,s)(t,s&&s.startIndex)}function Pe(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const Ce=120,$e=10,Ne="...";function _e(e,t,s){let i=e.split("\n");if(t>i.length)return"";const n=Math.max(Pe(i[t-1].slice(0,s)).length+$e+Ne.length,Ce),r=Math.max(0,t-3);let o=Math.min(t+2,i.length);for(i=i.slice(r,o);!/\S/.test(i[i.length-1]);)i.pop(),o-=1;const a=String(o).length;return i.map(((e,i)=>{const o=r+i+1===t;let l=String(i+r+1);for(;l.lengthn&&(c=`${c.slice(0,n-Ne.length)}${Ne}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Pe(e.slice(0,s)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function Re(e,t){const s=e.length<=1,i=e.map((e=>`"${e}"`));let n=s?i[0]:`${i.slice(0,-1).join(", ")} and ${i.slice(-1)[0]}`;return t&&(n+=` ${s?t[0]:t[1]}`),n}function Oe(e){return`https://rollupjs.org/${e}`}const De="troubleshooting/#error-name-is-not-exported-by-module",Le="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Te="configuration-options/#output-amd-id",Me="configuration-options/#output-dir",Ve="configuration-options/#output-exports",Be="configuration-options/#output-extend",ze="configuration-options/#output-format",Fe="configuration-options/#output-experimentaldeepdynamicchunkoptimization",je="configuration-options/#output-globals",Ue="configuration-options/#output-inlinedynamicimports",Ge="configuration-options/#output-interop",We="configuration-options/#output-manualchunks",qe="configuration-options/#output-name",He="configuration-options/#output-sourcemapfile",Ke="plugin-development/#this-getmoduleinfo";function Ye(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError"})),e}function Xe(e,t,s,i){if("object"==typeof t){const{line:s,column:n}=t;e.loc={column:n,file:i,line:s}}else{e.pos=t;const{line:n,column:r}=we(s,t,{offsetLine:1});e.loc={column:r,file:i,line:n}}if(void 0===e.frame){const{line:t,column:i}=e.loc;e.frame=_e(s,t,i)}}const Qe="ADDON_ERROR",Ze="ALREADY_CLOSED",Je="ANONYMOUS_PLUGIN_CACHE",et="ASSET_NOT_FINALISED",tt="CANNOT_EMIT_FROM_OPTIONS_HOOK",st="CHUNK_NOT_GENERATED",it="CIRCULAR_REEXPORT",nt="DEPRECATED_FEATURE",rt="DUPLICATE_PLUGIN_NAME",ot="FILE_NAME_CONFLICT",at="ILLEGAL_IDENTIFIER_AS_NAME",lt="INVALID_CHUNK",ct="INVALID_EXPORT_OPTION",ht="INVALID_LOG_POSITION",ut="INVALID_OPTION",dt="INVALID_PLUGIN_HOOK",pt="INVALID_ROLLUP_PHASE",ft="INVALID_SETASSETSOURCE",mt="MISSING_EXPORT",gt="MISSING_GLOBAL_NAME",yt="MISSING_IMPLICIT_DEPENDANT",xt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Et="MISSING_NODE_BUILTINS",bt="MISSING_OPTION",vt="MIXED_EXPORTS",St="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",At="OPTIMIZE_CHUNK_STATUS",kt="PLUGIN_ERROR",It="SOURCEMAP_BROKEN",wt="UNEXPECTED_NAMED_IMPORT",Pt="UNKNOWN_OPTION",Ct="UNRESOLVED_ENTRY",$t="UNRESOLVED_IMPORT",Nt="VALIDATION_ERROR";function _t(){return{code:Ze,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Rt(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ot({fileName:e,code:t},s){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s.message}.`};return Xe(i,s.loc,t,e),i}function Dt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(T).join(" -> ")}`}}function Lt(e,t,{line:s,column:i}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${T(t)} is at (${s}:${i})\n${_e(e,s,i)}`}}function Tt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${T(t)}".`}}function Mt(e,t,s,i){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${T(i)}" tried to import "${T(s)}" with ${Vt(t)} assertions, but it was already imported elsewhere with ${Vt(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const Vt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function Bt(e,t,s){return{code:ct,message:`"${e}" was specified for "output.exports", but entry module "${T(s)}" has the following exports: ${Re(t)}`,url:Oe(Ve)}}function zt(e,t,s,i){return{code:ut,message:`Invalid value ${void 0===i?"":`${JSON.stringify(i)} `}for option "${e}" - ${s}.`,url:Oe(t)}}function Ft(e,t,s){const i=".json"===C(s);return{binding:e,code:mt,exporter:s,id:t,message:`"${e}" is not exported by "${T(s)}", imported by "${T(t)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Oe(De)}}function jt(e){const t=[...e.implicitlyLoadedBefore].map((e=>T(e.id))).sort();return{code:yt,message:`Module "${T(e.id)}" that should be implicitly loaded before ${Re(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Ut(e,t,s){return{code:At,message:`${s}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Gt(e,t,{hook:s,id:i}={}){const n=e.code;return e.pluginCode||null==n||"string"==typeof n&&("string"!=typeof n||n.startsWith("PLUGIN_"))||(e.pluginCode=n),e.code=kt,e.plugin=t,s&&(e.hook=s),i&&(e.id=i),e}function Wt(e){return{code:It,message:`Multiple conflicting contents for sourcemap source ${e}`}}function qt(e,t,s){const i=s?"reexport":"import";return{code:wt,exporter:e,message:`The named export "${t}" was ${i}ed from the external module "${T(e)}" even though its interop type is "defaultOnly". Either remove or change this ${i} or change the value of the "output.interop" option.`,url:Oe(Ge)}}function Ht(e){return{code:wt,exporter:e,message:`There was a namespace "*" reexport from the external module "${T(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Oe(Ge)}}function Kt(e){return{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}}function Yt(e){return{code:Nt,message:e}}function Xt(e,t,s,i,n){Qt(e,t,s,i.onLog,i.strictDeprecations,n)}function Qt(e,t,s,i,n,r){if(s||n){const s=function(e,t,s){return{code:nt,message:e,url:Oe(t),...s?{plugin:s}:{}}}(e,t,r);if(n)return Ye(s);i(ve,s)}}class Zt{constructor(e,t,s,i,n,r){this.options=e,this.id=t,this.renormalizeRenderPath=n,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=be(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this,l=this.info={assertions:r,ast:null,code:null,dynamicallyImportedIdResolutions:me,dynamicallyImportedIds:me,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Xt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ke,!0,e),l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:me,implicitlyLoadedBefore:me,importedIdResolutions:me,importedIds:me,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const s=new de(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const s of e)for(const e of this.declarations.get(s).module.importers)t.add(e);const s=[...t];var i,n,r;this.options.onLog(ve,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:r=s,message:`${Re(n=e,["is","are"])} imported from external module "${i}" but never used in ${Re(r.map((e=>T(e))))}.`,names:n})}}const Jt={ArrayPattern(e,t){for(const s of t.elements)s&&Jt[s.type](e,s)},AssignmentPattern(e,t){Jt[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const s of t.properties)"RestElement"===s.type?Jt.RestElement(e,s):Jt[s.value.type](e,s.value)},RestElement(e,t){Jt[t.argument.type](e,t.argument)}},es=function(e){const t=[];return Jt[e.type](t,e),t};function ts(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function ss(){return{accessed:new J,assigned:new J,brokenFlow:!1,called:new te,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new te,replacedVariableInits:new Map}}function is(e,t=null){return Object.create(t,e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const ns=new class extends ne{getLiteralValueAtPath(){}},rs={value:{hasEffectsWhenCalled:null,returns:re}},os=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(fs,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(fs,e[0],t,s)}},as={value:{hasEffectsWhenCalled:null,returns:os}},ls=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(ms,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ms,e[0],t,s)}},cs={value:{hasEffectsWhenCalled:null,returns:ls}},hs=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(ys,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ys,e[0],t,s)}},us={value:{hasEffectsWhenCalled:null,returns:hs}},ds={value:{hasEffectsWhenCalled({args:e},t){const s=e[2];return e.length<3||"symbol"==typeof s.getLiteralValueAtPath(K,ee,{deoptimizeCache(){}})&&s.hasEffectsOnInteractionAtPath(K,he,t)},returns:hs}},ps=is({hasOwnProperty:as,isPrototypeOf:as,propertyIsEnumerable:as,toLocaleString:us,toString:us,valueOf:rs}),fs=is({valueOf:as},ps),ms=is({toExponential:us,toFixed:us,toLocaleString:us,toPrecision:us,valueOf:cs},ps),gs=is({exec:rs,test:as},ps),ys=is({anchor:us,at:rs,big:us,blink:us,bold:us,charAt:us,charCodeAt:cs,codePointAt:rs,concat:us,endsWith:as,fixed:us,fontcolor:us,fontsize:us,includes:as,indexOf:cs,italics:us,lastIndexOf:cs,link:us,localeCompare:cs,match:rs,matchAll:rs,normalize:us,padEnd:us,padStart:us,repeat:us,replace:ds,replaceAll:ds,search:cs,slice:us,small:us,split:rs,startsWith:as,strike:us,sub:us,substr:us,substring:us,sup:us,toLocaleLowerCase:us,toLocaleUpperCase:us,toLowerCase:us,toString:us,toUpperCase:us,trim:us,trimEnd:us,trimLeft:us,trimRight:us,trimStart:us,valueOf:us},ps);function xs(e,t,s,i){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(s,i)||!1)}function Es(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:oe}function bs(e,t,s){s(e,t)}function vs(e,t,s){}var Ss={};Ss.Program=Ss.BlockStatement=Ss.StaticBlock=function(e,t,s){for(var i=0,n=e.body;i=r.end;)Hs(e,r,n),r=i[++t.annotationIndex];if(r&&r.end<=e.end)for(Ss[s](e,t,Gs);(r=i[t.annotationIndex])&&r.end<=e.end;)++t.annotationIndex,Xs(e,r,!1)}const Ws=/[^\s(]/g,qs=/\S/g;function Hs(e,t,s){const i=[];let n;if(Ks(s.slice(t.end,e.start),Ws)){const t=e.start;for(;;){switch(i.push(e),e.type){case _s:case Ps:e=e.expression;continue;case Ms:if(Ks(s.slice(t,e.start),qs)){e=e.expressions[0];continue}n=!0;break;case Cs:if(Ks(s.slice(t,e.start),qs)){e=e.test;continue}n=!0;break;case Ds:case ks:if(Ks(s.slice(t,e.start),qs)){e=e.left;continue}n=!0;break;case Ns:case $s:e=e.declaration;continue;case Bs:{const t=e;if("const"===t.kind){e=t.declarations[0].init;continue}n=!0;break}case Vs:e=e.init;continue;case Rs:case As:case ws:case Ls:break;default:n=!0}break}}else n=!0;if(n)Xs(e,t,!1);else for(const e of i)Xs(e,t,!0)}function Ks(e,t){let s;for(;null!==(s=t.exec(e));){if("/"===s[0]){const s=e.charCodeAt(t.lastIndex);if(42===s){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}if(47===s){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}return t.lastIndex=0,!1}return!0}const Ys=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Xs(e,t,s){const i=s?js:Us,n=e[i];n?n.push(t):e[i]=[t]}const Qs={ImportExpression:["arguments"],Literal:[],Program:["body"]};const Zs="variables";class Js extends ne{constructor(e,t,s,i=!1){super(),this.deoptimized=!1,this.esTreeNode=i?e:null,this.keys=Qs[e.type]||function(e){return Qs[e.type]=Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))),Qs[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(s),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.keys){const s=this[t];if(null!==s)if(Array.isArray(s)){for(const t of s)if(t?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(K,this.assignmentInteraction,e)}include(e,t,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.include(e,t);else i.include(e,t)}}includeAsAssignmentTarget(e,t,s){this.include(e,t)}initialise(){}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}parseNode(e,t){for(const[s,i]of Object.entries(e))if(!this.hasOwnProperty(s))if(95===s.charCodeAt(0)){if(s===js){const e=i;this.annotations=e,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.annotationType)),this.annotationPure=e.some((e=>"pure"===e.annotationType)))}else if(s===Us)for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}else if("object"!=typeof i||null===i)this[s]=i;else if(Array.isArray(i)){this[s]=[];for(const e of i)this[s].push(null===e?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(s)))}else this[s]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope,t?.includes(s))}render(e,t){for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.render(e,t);else i.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(ss())}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.keys){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Y);else t.deoptimizePath(Y)}this.context.requestTreeshakingPass()}}class ei extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[G,...t],s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(Y,le,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([G,G]),this.context.requestTreeshakingPass()}}class ti extends ne{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},s){2===t&&0===s.length&&this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Q)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?oe:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||re:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(e.length>(0===i?1:0))return!0;if(2===i){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Q,ce,s))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(K,he,s))return!0}return!1}}const si=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:os})],ii=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:hs})],ni=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ls})],ri=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:re})],oi=/^\d+$/;class ai extends ne{constructor(e,t,s=!1){if(super(),this.prototypeExpression=t,this.immutable=s,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(Y);this.prototypeExpression?.deoptimizePath([G,G]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,s){const[i,...n]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof i&&this.deoptimizedPaths[i]))return void ae(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(a[i]){const t=l[i];if(t)for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(oi.test(i))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}else{for(const t of[...Object.values(l),c])for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(oi.test(e))for(const e of t)e.deoptimizePath(Y);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===q?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===W);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const s=1===e.length?Y:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,G]:e)}getLiteralValueAtPath(e,t,s){if(0===e.length)return ie;const i=e[0],n=this.getMemberExpressionAndTrackDeopt(i,s);return n?n.getLiteralValueAtPath(e.slice(1),t,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,s):1!==e.length?se:void 0}getReturnExpressionWhenCalledAtPath(e,t,s,i){if(0===e.length)return oe;const[n,...r]=e,o=this.getMemberExpressionAndTrackDeopt(n,i);return o?o.getReturnExpressionWhenCalledAtPath(r,t,s,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,s,i):oe}hasEffectsOnInteractionAtPath(e,t,s){const[i,...n]=e;if(n.length>0||2===t.type){const r=this.getMemberExpression(i);return r?r.hasEffectsOnInteractionAtPath(n,t,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}if(i===W)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(r[i]){const e=o[i];if(e)for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(n,t,s))return!0}else for(const e of[...Object.values(o),a])for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,h=[];for(let u=e.length-1;u>=0;u--){const{key:d,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof d)"set"===p?i[d]||(i[d]=[f,...h],n[d]=[f,...c]):"get"===p?s[d]||(s[d]=[f,...a],r[d]=[f,...l]):(i[d]||(i[d]=[f,...h]),s[d]||(s[d]=[f,...a]));else{if(d===q){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&h.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Y)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(oi.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Q)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&oi.test(e)||this.deoptimizedPaths[e])return re;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&oi.test(e)?re:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return re;const s=this.getMemberExpression(e);if(s!==re&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return s}}const li=e=>"string"==typeof e&&/^\d+$/.test(e),ci=new class extends ne{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||li(t[0])||ae(e)}getLiteralValueAtPath(e){return 1===e.length&&li(e[0])?void 0:se}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},hi=new ai({__proto__:null,hasOwnProperty:si,isPrototypeOf:si,propertyIsEnumerable:si,toLocaleString:ii,toString:ii,valueOf:ri},ci,!0),ui=[{key:q,kind:"init",property:re},{key:"length",kind:"init",property:ls}],di=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:os})],pi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ls})],fi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new ai(ui,Ai),returnsPrimitive:null})],mi=[new ti({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new ai(ui,Ai),returnsPrimitive:null})],gi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new ai(ui,Ai),returnsPrimitive:null})],yi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ls})],xi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:re})],Ei=[new ti({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:re})],bi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:re})],vi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Si=[new ti({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ai=new ai({__proto__:null,at:Ei,concat:mi,copyWithin:vi,entries:mi,every:di,fill:vi,filter:gi,find:bi,findIndex:pi,findLast:bi,findLastIndex:pi,flat:mi,flatMap:gi,forEach:bi,includes:si,indexOf:ni,join:ii,keys:ri,lastIndexOf:ni,map:gi,pop:xi,push:yi,reduce:bi,reduceRight:bi,reverse:vi,shift:xi,slice:mi,some:di,sort:Si,splice:fi,toLocaleString:ii,toString:ii,unshift:yi,values:Ei},hi,!0);class ki extends Js{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;tthis.init.deoptimizeArgumentsOnInteractionAtPath(e,t,s)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=me;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Y)}}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.isReassigned?se:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getLiteralValueAtPath(e,t,s))),se)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.isReassigned?oe:s.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath(e,t,s,i))),oe)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return!!this.isReassigned||!s.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!s.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s));case 2:return!!this.isReassigned||!(t.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s)}}include(){if(!this.included){this.included=!0;for(const e of this.declarations){e.included||e.include(ts(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==Ts);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const s of t)s.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=re,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(e){const{declarations:t}=this;for(const s of e.declarations)t.push(s);const s=this.markInitializersForDeoptimization();if(s.push(e.init),e.additionalInitializers)for(const t of e.additionalInitializers)s.push(t)}}const Pi=me,Ci=new Set([G]),$i=new J,Ni=new Set([re]);class _i extends wi{constructor(e,t,s){super(e,t,re,s),this.deoptimizationInteractions=[],this.deoptimizations=new J,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===re){if(!this.entitiesToBeDeoptimized.has(re)){this.entitiesToBeDeoptimized.add(re);for(const{interaction:e}of this.deoptimizationInteractions)ae(e);this.deoptimizationInteractions=Pi}}else if(this.deoptimizedFields.has(G))e.deoptimizePath(Y);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:s}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,s,ee)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(re)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(G)||2===e.type&&this.deoptimizedFields.has(t[0])))ae(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const s of this.entitiesToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,t,ee);this.entitiesToBeDeoptimized.has(re)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(G))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const t of this.entitiesToBeDeoptimized)t.deoptimizePath(e);t===G&&(this.deoptimizationInteractions=Pi,this.deoptimizations=$i,this.deoptimizedFields=Ci,this.entitiesToBeDeoptimized=Ni)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Y):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),oe}}const Ri="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Oi=64;function Di(e){let t="";do{const s=e%Oi;e=e/Oi|0,t=Ri[s]+t}while(0!==e);return t}function Li(e,t,s){let i=e,n=1;for(;t.has(i)||ye.has(i)||s?.has(i);)i=`${e}$${Di(n++)}`;return t.add(i),i}let Ti=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,s,i){const n=e.name;let r=this.variables.get(n);return r?r.addDeclaration(e,s):(r=new wi(e.name,e,s||ns,t),this.variables.set(n,r)),r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Mi extends Ti{constructor(e){super(),this.accessedOutsideVariables=new Map,this.parent=e,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Mi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const s=t.get(this)||new Set;for(const t of e)s.add(t);t.set(this,s),this.parent instanceof Mi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Mi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,s,i){for(const i of this.accessedOutsideVariables.values())i.included&&(e.add(i.getBaseVariableName()),"system"===t&&s.has(i)&&e.add("exports"));const n=i.get(this);if(n)for(const t of n)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,s){const i=new Set;if(this.addUsedOutsideNames(i,e,t,s),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&i.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Li(e,i,t.forbiddenNames));for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,s),s}}class Vi extends Mi{constructor(e,t){super(e),this.parameters=[],this.hasRest=!1,this.context=t,this.hoistedBodyVarScope=new Mi(this)}addParameterDeclaration(e){const{name:t}=e,s=new _i(t,e,this.context),i=this.hoistedBodyVarScope.variables.get(t);return i&&(this.hoistedBodyVarScope.variables.set(t,s),s.mergeDeclarations(i)),this.variables.set(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let s=!1,i=!1;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of t)if(s instanceof ei){for(const s of t)s.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n,a=t[r];if(o)if(s=!1,0===o.length)i=!0;else for(const e of o)e.included&&(i=!0),e.calledFromTryStatement&&(s=!0);!i&&a.shouldBeIncluded(e)&&(i=!0),i&&a.include(e,s)}}}class Bi extends Vi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=re;for(const e of this.returnExpressions)e.deoptimizePath(Y)}}}function zi(e,t){if("MemberExpression"===e.type)return!e.computed&&zi(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const Fi=Symbol("PureFunction"),ji=()=>{},Ui=Symbol("Value Properties"),Gi=()=>ie,Wi=()=>!0,qi={deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:()=>!1},Hi={deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:Wi},Ki={__proto__:null,[Ui]:Hi},Yi={__proto__:null,[Ui]:qi},Xi={__proto__:null,[Ui]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Y)},getLiteralValue:Gi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(X,ce,t)}},Qi={__proto__:null,[Ui]:Hi,prototype:Ki},Zi={__proto__:null,[Ui]:qi,prototype:Ki},Ji={__proto__:null,[Ui]:{deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ki)},prototype:Ki},en={__proto__:null,[Ui]:qi,from:Ki,of:Yi,prototype:Ki},tn={__proto__:null,[Ui]:qi,supportedLocalesOf:Zi},sn={global:Ki,globalThis:Ki,self:Ki,window:Ki,__proto__:null,[Ui]:Hi,Array:{__proto__:null,[Ui]:Hi,from:Ki,isArray:Yi,of:Yi,prototype:Ki},ArrayBuffer:{__proto__:null,[Ui]:qi,isView:Yi,prototype:Ki},Atomics:Ki,BigInt:Qi,BigInt64Array:Qi,BigUint64Array:Qi,Boolean:Zi,constructor:Qi,DataView:Zi,Date:{__proto__:null,[Ui]:qi,now:Yi,parse:Yi,prototype:Ki,UTC:Yi},decodeURI:Yi,decodeURIComponent:Yi,encodeURI:Yi,encodeURIComponent:Yi,Error:Zi,escape:Yi,eval:Ki,EvalError:Zi,Float32Array:en,Float64Array:en,Function:Qi,hasOwnProperty:Ki,Infinity:Ki,Int16Array:en,Int32Array:en,Int8Array:en,isFinite:Yi,isNaN:Yi,isPrototypeOf:Ki,JSON:Ki,Map:Ji,Math:{__proto__:null,[Ui]:Hi,abs:Yi,acos:Yi,acosh:Yi,asin:Yi,asinh:Yi,atan:Yi,atan2:Yi,atanh:Yi,cbrt:Yi,ceil:Yi,clz32:Yi,cos:Yi,cosh:Yi,exp:Yi,expm1:Yi,floor:Yi,fround:Yi,hypot:Yi,imul:Yi,log:Yi,log10:Yi,log1p:Yi,log2:Yi,max:Yi,min:Yi,pow:Yi,random:Yi,round:Yi,sign:Yi,sin:Yi,sinh:Yi,sqrt:Yi,tan:Yi,tanh:Yi,trunc:Yi},NaN:Ki,Number:{__proto__:null,[Ui]:qi,isFinite:Yi,isInteger:Yi,isNaN:Yi,isSafeInteger:Yi,parseFloat:Yi,parseInt:Yi,prototype:Ki},Object:{__proto__:null,[Ui]:qi,create:Yi,defineProperty:Xi,defineProperties:Xi,freeze:Xi,getOwnPropertyDescriptor:Yi,getOwnPropertyDescriptors:Yi,getOwnPropertyNames:Yi,getOwnPropertySymbols:Yi,getPrototypeOf:Yi,hasOwn:Yi,is:Yi,isExtensible:Yi,isFrozen:Yi,isSealed:Yi,keys:Yi,fromEntries:Ki,entries:Yi,prototype:Ki},parseFloat:Yi,parseInt:Yi,Promise:{__proto__:null,[Ui]:Hi,all:Ki,allSettled:Ki,any:Ki,prototype:Ki,race:Ki,reject:Ki,resolve:Ki},propertyIsEnumerable:Ki,Proxy:Ki,RangeError:Zi,ReferenceError:Zi,Reflect:Ki,RegExp:Zi,Set:Ji,SharedArrayBuffer:Qi,String:{__proto__:null,[Ui]:qi,fromCharCode:Yi,fromCodePoint:Yi,prototype:Ki,raw:Yi},Symbol:{__proto__:null,[Ui]:qi,for:Yi,keyFor:Yi,prototype:Ki,toStringTag:{__proto__:null,[Ui]:{deoptimizeArgumentsOnCall:ji,getLiteralValue:()=>H,hasEffectsWhenCalled:Wi}}},SyntaxError:Zi,toLocaleString:Ki,toString:Ki,TypeError:Zi,Uint16Array:en,Uint32Array:en,Uint8Array:en,Uint8ClampedArray:en,unescape:Yi,URIError:Zi,valueOf:Ki,WeakMap:Ji,WeakSet:Ji,clearInterval:Qi,clearTimeout:Qi,console:{__proto__:null,[Ui]:Hi,assert:Qi,clear:Qi,count:Qi,countReset:Qi,debug:Qi,dir:Qi,dirxml:Qi,error:Qi,exception:Qi,group:Qi,groupCollapsed:Qi,groupEnd:Qi,info:Qi,log:Qi,table:Qi,time:Qi,timeEnd:Qi,timeLog:Qi,trace:Qi,warn:Qi},Intl:{__proto__:null,[Ui]:Hi,Collator:tn,DateTimeFormat:tn,ListFormat:tn,NumberFormat:tn,PluralRules:tn,RelativeTimeFormat:tn},setInterval:Qi,setTimeout:Qi,TextDecoder:Qi,TextEncoder:Qi,URL:Qi,URLSearchParams:Qi,AbortController:Qi,AbortSignal:Qi,addEventListener:Ki,alert:Ki,AnalyserNode:Qi,Animation:Qi,AnimationEvent:Qi,applicationCache:Ki,ApplicationCache:Qi,ApplicationCacheErrorEvent:Qi,atob:Ki,Attr:Qi,Audio:Qi,AudioBuffer:Qi,AudioBufferSourceNode:Qi,AudioContext:Qi,AudioDestinationNode:Qi,AudioListener:Qi,AudioNode:Qi,AudioParam:Qi,AudioProcessingEvent:Qi,AudioScheduledSourceNode:Qi,AudioWorkletNode:Qi,BarProp:Qi,BaseAudioContext:Qi,BatteryManager:Qi,BeforeUnloadEvent:Qi,BiquadFilterNode:Qi,Blob:Qi,BlobEvent:Qi,blur:Ki,BroadcastChannel:Qi,btoa:Ki,ByteLengthQueuingStrategy:Qi,Cache:Qi,caches:Ki,CacheStorage:Qi,cancelAnimationFrame:Ki,cancelIdleCallback:Ki,CanvasCaptureMediaStreamTrack:Qi,CanvasGradient:Qi,CanvasPattern:Qi,CanvasRenderingContext2D:Qi,ChannelMergerNode:Qi,ChannelSplitterNode:Qi,CharacterData:Qi,clientInformation:Ki,ClipboardEvent:Qi,close:Ki,closed:Ki,CloseEvent:Qi,Comment:Qi,CompositionEvent:Qi,confirm:Ki,ConstantSourceNode:Qi,ConvolverNode:Qi,CountQueuingStrategy:Qi,createImageBitmap:Ki,Credential:Qi,CredentialsContainer:Qi,crypto:Ki,Crypto:Qi,CryptoKey:Qi,CSS:Qi,CSSConditionRule:Qi,CSSFontFaceRule:Qi,CSSGroupingRule:Qi,CSSImportRule:Qi,CSSKeyframeRule:Qi,CSSKeyframesRule:Qi,CSSMediaRule:Qi,CSSNamespaceRule:Qi,CSSPageRule:Qi,CSSRule:Qi,CSSRuleList:Qi,CSSStyleDeclaration:Qi,CSSStyleRule:Qi,CSSStyleSheet:Qi,CSSSupportsRule:Qi,CustomElementRegistry:Qi,customElements:Ki,CustomEvent:Qi,DataTransfer:Qi,DataTransferItem:Qi,DataTransferItemList:Qi,defaultstatus:Ki,defaultStatus:Ki,DelayNode:Qi,DeviceMotionEvent:Qi,DeviceOrientationEvent:Qi,devicePixelRatio:Ki,dispatchEvent:Ki,document:Ki,Document:Qi,DocumentFragment:Qi,DocumentType:Qi,DOMError:Qi,DOMException:Qi,DOMImplementation:Qi,DOMMatrix:Qi,DOMMatrixReadOnly:Qi,DOMParser:Qi,DOMPoint:Qi,DOMPointReadOnly:Qi,DOMQuad:Qi,DOMRect:Qi,DOMRectReadOnly:Qi,DOMStringList:Qi,DOMStringMap:Qi,DOMTokenList:Qi,DragEvent:Qi,DynamicsCompressorNode:Qi,Element:Qi,ErrorEvent:Qi,Event:Qi,EventSource:Qi,EventTarget:Qi,external:Ki,fetch:Ki,File:Qi,FileList:Qi,FileReader:Qi,find:Ki,focus:Ki,FocusEvent:Qi,FontFace:Qi,FontFaceSetLoadEvent:Qi,FormData:Qi,frames:Ki,GainNode:Qi,Gamepad:Qi,GamepadButton:Qi,GamepadEvent:Qi,getComputedStyle:Ki,getSelection:Ki,HashChangeEvent:Qi,Headers:Qi,history:Ki,History:Qi,HTMLAllCollection:Qi,HTMLAnchorElement:Qi,HTMLAreaElement:Qi,HTMLAudioElement:Qi,HTMLBaseElement:Qi,HTMLBodyElement:Qi,HTMLBRElement:Qi,HTMLButtonElement:Qi,HTMLCanvasElement:Qi,HTMLCollection:Qi,HTMLContentElement:Qi,HTMLDataElement:Qi,HTMLDataListElement:Qi,HTMLDetailsElement:Qi,HTMLDialogElement:Qi,HTMLDirectoryElement:Qi,HTMLDivElement:Qi,HTMLDListElement:Qi,HTMLDocument:Qi,HTMLElement:Qi,HTMLEmbedElement:Qi,HTMLFieldSetElement:Qi,HTMLFontElement:Qi,HTMLFormControlsCollection:Qi,HTMLFormElement:Qi,HTMLFrameElement:Qi,HTMLFrameSetElement:Qi,HTMLHeadElement:Qi,HTMLHeadingElement:Qi,HTMLHRElement:Qi,HTMLHtmlElement:Qi,HTMLIFrameElement:Qi,HTMLImageElement:Qi,HTMLInputElement:Qi,HTMLLabelElement:Qi,HTMLLegendElement:Qi,HTMLLIElement:Qi,HTMLLinkElement:Qi,HTMLMapElement:Qi,HTMLMarqueeElement:Qi,HTMLMediaElement:Qi,HTMLMenuElement:Qi,HTMLMetaElement:Qi,HTMLMeterElement:Qi,HTMLModElement:Qi,HTMLObjectElement:Qi,HTMLOListElement:Qi,HTMLOptGroupElement:Qi,HTMLOptionElement:Qi,HTMLOptionsCollection:Qi,HTMLOutputElement:Qi,HTMLParagraphElement:Qi,HTMLParamElement:Qi,HTMLPictureElement:Qi,HTMLPreElement:Qi,HTMLProgressElement:Qi,HTMLQuoteElement:Qi,HTMLScriptElement:Qi,HTMLSelectElement:Qi,HTMLShadowElement:Qi,HTMLSlotElement:Qi,HTMLSourceElement:Qi,HTMLSpanElement:Qi,HTMLStyleElement:Qi,HTMLTableCaptionElement:Qi,HTMLTableCellElement:Qi,HTMLTableColElement:Qi,HTMLTableElement:Qi,HTMLTableRowElement:Qi,HTMLTableSectionElement:Qi,HTMLTemplateElement:Qi,HTMLTextAreaElement:Qi,HTMLTimeElement:Qi,HTMLTitleElement:Qi,HTMLTrackElement:Qi,HTMLUListElement:Qi,HTMLUnknownElement:Qi,HTMLVideoElement:Qi,IDBCursor:Qi,IDBCursorWithValue:Qi,IDBDatabase:Qi,IDBFactory:Qi,IDBIndex:Qi,IDBKeyRange:Qi,IDBObjectStore:Qi,IDBOpenDBRequest:Qi,IDBRequest:Qi,IDBTransaction:Qi,IDBVersionChangeEvent:Qi,IdleDeadline:Qi,IIRFilterNode:Qi,Image:Qi,ImageBitmap:Qi,ImageBitmapRenderingContext:Qi,ImageCapture:Qi,ImageData:Qi,indexedDB:Ki,innerHeight:Ki,innerWidth:Ki,InputEvent:Qi,IntersectionObserver:Qi,IntersectionObserverEntry:Qi,isSecureContext:Ki,KeyboardEvent:Qi,KeyframeEffect:Qi,length:Ki,localStorage:Ki,location:Ki,Location:Qi,locationbar:Ki,matchMedia:Ki,MediaDeviceInfo:Qi,MediaDevices:Qi,MediaElementAudioSourceNode:Qi,MediaEncryptedEvent:Qi,MediaError:Qi,MediaKeyMessageEvent:Qi,MediaKeySession:Qi,MediaKeyStatusMap:Qi,MediaKeySystemAccess:Qi,MediaList:Qi,MediaQueryList:Qi,MediaQueryListEvent:Qi,MediaRecorder:Qi,MediaSettingsRange:Qi,MediaSource:Qi,MediaStream:Qi,MediaStreamAudioDestinationNode:Qi,MediaStreamAudioSourceNode:Qi,MediaStreamEvent:Qi,MediaStreamTrack:Qi,MediaStreamTrackEvent:Qi,menubar:Ki,MessageChannel:Qi,MessageEvent:Qi,MessagePort:Qi,MIDIAccess:Qi,MIDIConnectionEvent:Qi,MIDIInput:Qi,MIDIInputMap:Qi,MIDIMessageEvent:Qi,MIDIOutput:Qi,MIDIOutputMap:Qi,MIDIPort:Qi,MimeType:Qi,MimeTypeArray:Qi,MouseEvent:Qi,moveBy:Ki,moveTo:Ki,MutationEvent:Qi,MutationObserver:Qi,MutationRecord:Qi,name:Ki,NamedNodeMap:Qi,NavigationPreloadManager:Qi,navigator:Ki,Navigator:Qi,NetworkInformation:Qi,Node:Qi,NodeFilter:Ki,NodeIterator:Qi,NodeList:Qi,Notification:Qi,OfflineAudioCompletionEvent:Qi,OfflineAudioContext:Qi,offscreenBuffering:Ki,OffscreenCanvas:Qi,open:Ki,openDatabase:Ki,Option:Qi,origin:Ki,OscillatorNode:Qi,outerHeight:Ki,outerWidth:Ki,PageTransitionEvent:Qi,pageXOffset:Ki,pageYOffset:Ki,PannerNode:Qi,parent:Ki,Path2D:Qi,PaymentAddress:Qi,PaymentRequest:Qi,PaymentRequestUpdateEvent:Qi,PaymentResponse:Qi,performance:Ki,Performance:Qi,PerformanceEntry:Qi,PerformanceLongTaskTiming:Qi,PerformanceMark:Qi,PerformanceMeasure:Qi,PerformanceNavigation:Qi,PerformanceNavigationTiming:Qi,PerformanceObserver:Qi,PerformanceObserverEntryList:Qi,PerformancePaintTiming:Qi,PerformanceResourceTiming:Qi,PerformanceTiming:Qi,PeriodicWave:Qi,Permissions:Qi,PermissionStatus:Qi,personalbar:Ki,PhotoCapabilities:Qi,Plugin:Qi,PluginArray:Qi,PointerEvent:Qi,PopStateEvent:Qi,postMessage:Ki,Presentation:Qi,PresentationAvailability:Qi,PresentationConnection:Qi,PresentationConnectionAvailableEvent:Qi,PresentationConnectionCloseEvent:Qi,PresentationConnectionList:Qi,PresentationReceiver:Qi,PresentationRequest:Qi,print:Ki,ProcessingInstruction:Qi,ProgressEvent:Qi,PromiseRejectionEvent:Qi,prompt:Ki,PushManager:Qi,PushSubscription:Qi,PushSubscriptionOptions:Qi,queueMicrotask:Ki,RadioNodeList:Qi,Range:Qi,ReadableStream:Qi,RemotePlayback:Qi,removeEventListener:Ki,Request:Qi,requestAnimationFrame:Ki,requestIdleCallback:Ki,resizeBy:Ki,ResizeObserver:Qi,ResizeObserverEntry:Qi,resizeTo:Ki,Response:Qi,RTCCertificate:Qi,RTCDataChannel:Qi,RTCDataChannelEvent:Qi,RTCDtlsTransport:Qi,RTCIceCandidate:Qi,RTCIceTransport:Qi,RTCPeerConnection:Qi,RTCPeerConnectionIceEvent:Qi,RTCRtpReceiver:Qi,RTCRtpSender:Qi,RTCSctpTransport:Qi,RTCSessionDescription:Qi,RTCStatsReport:Qi,RTCTrackEvent:Qi,screen:Ki,Screen:Qi,screenLeft:Ki,ScreenOrientation:Qi,screenTop:Ki,screenX:Ki,screenY:Ki,ScriptProcessorNode:Qi,scroll:Ki,scrollbars:Ki,scrollBy:Ki,scrollTo:Ki,scrollX:Ki,scrollY:Ki,SecurityPolicyViolationEvent:Qi,Selection:Qi,ServiceWorker:Qi,ServiceWorkerContainer:Qi,ServiceWorkerRegistration:Qi,sessionStorage:Ki,ShadowRoot:Qi,SharedWorker:Qi,SourceBuffer:Qi,SourceBufferList:Qi,speechSynthesis:Ki,SpeechSynthesisEvent:Qi,SpeechSynthesisUtterance:Qi,StaticRange:Qi,status:Ki,statusbar:Ki,StereoPannerNode:Qi,stop:Ki,Storage:Qi,StorageEvent:Qi,StorageManager:Qi,styleMedia:Ki,StyleSheet:Qi,StyleSheetList:Qi,SubtleCrypto:Qi,SVGAElement:Qi,SVGAngle:Qi,SVGAnimatedAngle:Qi,SVGAnimatedBoolean:Qi,SVGAnimatedEnumeration:Qi,SVGAnimatedInteger:Qi,SVGAnimatedLength:Qi,SVGAnimatedLengthList:Qi,SVGAnimatedNumber:Qi,SVGAnimatedNumberList:Qi,SVGAnimatedPreserveAspectRatio:Qi,SVGAnimatedRect:Qi,SVGAnimatedString:Qi,SVGAnimatedTransformList:Qi,SVGAnimateElement:Qi,SVGAnimateMotionElement:Qi,SVGAnimateTransformElement:Qi,SVGAnimationElement:Qi,SVGCircleElement:Qi,SVGClipPathElement:Qi,SVGComponentTransferFunctionElement:Qi,SVGDefsElement:Qi,SVGDescElement:Qi,SVGDiscardElement:Qi,SVGElement:Qi,SVGEllipseElement:Qi,SVGFEBlendElement:Qi,SVGFEColorMatrixElement:Qi,SVGFEComponentTransferElement:Qi,SVGFECompositeElement:Qi,SVGFEConvolveMatrixElement:Qi,SVGFEDiffuseLightingElement:Qi,SVGFEDisplacementMapElement:Qi,SVGFEDistantLightElement:Qi,SVGFEDropShadowElement:Qi,SVGFEFloodElement:Qi,SVGFEFuncAElement:Qi,SVGFEFuncBElement:Qi,SVGFEFuncGElement:Qi,SVGFEFuncRElement:Qi,SVGFEGaussianBlurElement:Qi,SVGFEImageElement:Qi,SVGFEMergeElement:Qi,SVGFEMergeNodeElement:Qi,SVGFEMorphologyElement:Qi,SVGFEOffsetElement:Qi,SVGFEPointLightElement:Qi,SVGFESpecularLightingElement:Qi,SVGFESpotLightElement:Qi,SVGFETileElement:Qi,SVGFETurbulenceElement:Qi,SVGFilterElement:Qi,SVGForeignObjectElement:Qi,SVGGElement:Qi,SVGGeometryElement:Qi,SVGGradientElement:Qi,SVGGraphicsElement:Qi,SVGImageElement:Qi,SVGLength:Qi,SVGLengthList:Qi,SVGLinearGradientElement:Qi,SVGLineElement:Qi,SVGMarkerElement:Qi,SVGMaskElement:Qi,SVGMatrix:Qi,SVGMetadataElement:Qi,SVGMPathElement:Qi,SVGNumber:Qi,SVGNumberList:Qi,SVGPathElement:Qi,SVGPatternElement:Qi,SVGPoint:Qi,SVGPointList:Qi,SVGPolygonElement:Qi,SVGPolylineElement:Qi,SVGPreserveAspectRatio:Qi,SVGRadialGradientElement:Qi,SVGRect:Qi,SVGRectElement:Qi,SVGScriptElement:Qi,SVGSetElement:Qi,SVGStopElement:Qi,SVGStringList:Qi,SVGStyleElement:Qi,SVGSVGElement:Qi,SVGSwitchElement:Qi,SVGSymbolElement:Qi,SVGTextContentElement:Qi,SVGTextElement:Qi,SVGTextPathElement:Qi,SVGTextPositioningElement:Qi,SVGTitleElement:Qi,SVGTransform:Qi,SVGTransformList:Qi,SVGTSpanElement:Qi,SVGUnitTypes:Qi,SVGUseElement:Qi,SVGViewElement:Qi,TaskAttributionTiming:Qi,Text:Qi,TextEvent:Qi,TextMetrics:Qi,TextTrack:Qi,TextTrackCue:Qi,TextTrackCueList:Qi,TextTrackList:Qi,TimeRanges:Qi,toolbar:Ki,top:Ki,Touch:Qi,TouchEvent:Qi,TouchList:Qi,TrackEvent:Qi,TransitionEvent:Qi,TreeWalker:Qi,UIEvent:Qi,ValidityState:Qi,visualViewport:Ki,VisualViewport:Qi,VTTCue:Qi,WaveShaperNode:Qi,WebAssembly:Ki,WebGL2RenderingContext:Qi,WebGLActiveInfo:Qi,WebGLBuffer:Qi,WebGLContextEvent:Qi,WebGLFramebuffer:Qi,WebGLProgram:Qi,WebGLQuery:Qi,WebGLRenderbuffer:Qi,WebGLRenderingContext:Qi,WebGLSampler:Qi,WebGLShader:Qi,WebGLShaderPrecisionFormat:Qi,WebGLSync:Qi,WebGLTexture:Qi,WebGLTransformFeedback:Qi,WebGLUniformLocation:Qi,WebGLVertexArrayObject:Qi,WebSocket:Qi,WheelEvent:Qi,Window:Qi,Worker:Qi,WritableStream:Qi,XMLDocument:Qi,XMLHttpRequest:Qi,XMLHttpRequestEventTarget:Qi,XMLHttpRequestUpload:Qi,XMLSerializer:Qi,XPathEvaluator:Qi,XPathExpression:Qi,XPathResult:Qi,XSLTProcessor:Qi};for(const e of["window","global","self","globalThis"])sn[e]=sn;function nn(e){let t=sn;for(const s of e){if("string"!=typeof s)return null;if(t=t[s],!t)return null}return t[Ui]}class rn extends ue{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,s){switch(e.type){case 0:case 1:return void(nn([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,s));case 2:{const i=nn([this.name,...t]);return void(i?i.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,s))}}}getLiteralValueAtPath(e,t,s){const i=nn([this.name,...e]);return i?i.getLiteralValue():se}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!nn([this.name]):!nn([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const i=nn([this.name,...e]);return!i||i.hasEffectsWhenCalled(t,s)}}}}const on={__proto__:null,class:!0,const:!0,let:!0,var:!0};class an extends Js{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&zi(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let s;const{treeshake:i}=this.context.options;switch(e){case"var":s=this.scope.addDeclaration(this,this.context,t,!0),i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":s=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":s=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return s.kind=e,[this.variable=s]}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const[n,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,s,i);return[n,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof rn&&!this.isPureFunction(K)&&this.variable.hasEffectsOnInteractionAtPath(K,le,e)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,s);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(null!==this.isTDZAccess)return this.isTDZAccess;if(!(this.variable instanceof wi&&this.variable.kind&&this.variable.kind in on&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let e;return this.variable.declarations&&1===this.variable.declarations.length&&(e=this.variable.declarations[0])&&this.start=i)return i;n=e.charCodeAt(++s),++s,(s=47===n?e.indexOf("\n",s)+1:e.indexOf("*/",s)+2)>i&&(i=e.indexOf(t,s))}}const pn=/\S/g;function fn(e,t){pn.lastIndex=t;return pn.exec(e).index}function mn(e){let t,s,i=0;for(t=e.indexOf("\n",i);;){if(i=e.indexOf("/",i),-1===i||i>t)return[t,t+1];if(s=e.charCodeAt(i+1),47===s)return[i,t+1];i=e.indexOf("*/",i+3)+2,i>t&&(t=e.indexOf("\n",i))}}function gn(e,t,s,i,n){let r,o,a,l,c=e[0],h=!c.included||c.needsBoundaries;h&&(l=s+mn(t.original.slice(s,c.start))[1]);for(let s=1;s<=e.length;s++)r=c,o=l,a=h,c=e[s],h=void 0!==c&&(!c.included||c.needsBoundaries),a||h?(l=r.end+mn(t.original.slice(r.end,void 0===c?i:c.start))[1],r.included?a?r.render(t,n,{end:l,start:o}):r.render(t,n):cn(r,t,o,l)):r.render(t,n)}function yn(e,t,s,i){const n=[];let r,o,a,l,c=s-1;for(const i of e){for(void 0!==r&&(c=r.end+dn(t.original.slice(r.end,i.start),",")),o=a=c+1+mn(t.original.slice(c+1,i.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&n.push({contentEnd:a,end:o,node:r,separator:c,start:s}),r=i,s=o}return n.push({contentEnd:i,end:i,node:r,separator:null,start:s}),n}function xn(e,t,s){for(;;){const[i,n]=mn(e.original.slice(t,s));if(-1===i)break;e.remove(t+i,t+=n)}}class En extends Mi{addDeclaration(e,t,s,i){if(i){const n=this.parent.addDeclaration(e,t,s,i);return n.markInitializersForDeoptimization(),n}return super.addDeclaration(e,t,s,!1)}}class bn extends Js{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===Ts&&this.context.log(ve,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${T(t)}" was ignored.`}),this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ts:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class vn extends Js{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(re)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new En(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof bn&&"use asm"===e.directive}render(e,t){this.body.length>0?gn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Sn extends Js{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,re)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(K)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(K,t,s)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([G,G]),this.context.requestTreeshakingPass())}}class An extends Js{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(2===e.type){const{parameters:t}=this.scope,{args:s}=e;let i=!1;for(let e=0;e0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Y),this.context.requestTreeshakingPass()),oe):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,s){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],he,s)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],le,s)))return!0}for(const e of this.params)if(e.hasEffects(s))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:s}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=s}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",re))),this.params[this.params.length-1]instanceof Sn),this.body instanceof vn?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===Is&&(this.body=new vn(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}An.prototype.preventChildBlockScope=!0;class kn extends An{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Bi(e,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=e,s.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const s of this.params)s instanceof an||s.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ai([],hi)}}function In(e,{exportNamesByVariable:t,snippets:{_:s,getObject:i,getPropertyAccess:n}},r=""){if(1===e.length&&1===t.get(e[0]).length){const i=e[0];return`exports('${t.get(i)}',${s}${i.getName(n)}${r})`}{const s=[];for(const i of e)for(const e of t.get(i))s.push([e,i.getName(n)+r]);return`exports(${i(s,{lineBreakIndent:null})})`}}function wn(e,t,s,i,{exportNamesByVariable:n,snippets:{_:r}}){i.prependRight(t,`exports('${n.get(e)}',${r}`),i.appendLeft(s,")")}function Pn(e,t,s,i,n,r){const{_:o,getPropertyAccess:a}=r.snippets;n.appendLeft(s,`,${o}${In([e],r)},${o}${e.getName(a)}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}class Cn extends Js{addExportedVariables(e,t){for(const s of this.properties)"Property"===s.type?s.value.addExportedVariables(e,t):s.argument.addExportedVariables(e,t)}declare(e,t){const s=[];for(const i of this.properties)s.push(...i.declare(e,t));return s}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(K,t,s))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class $n extends wi{constructor(e){super("arguments",null,re,e),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Y):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Y);this.deoptimizedArguments.length=0}}class Nn extends _i{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,s){return(s.replacedVariableInits.get(this)||re).hasEffectsOnInteractionAtPath(e,t,s)}}class _n extends Bi{constructor(e,t){super(e,t),this.variables.set("arguments",this.argumentsVariable=new $n(t)),this.variables.set("this",this.thisVariable=new Nn(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const s of t)s.included||s.include(e,!1)}}class Rn extends An{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new _n(e,this.context),this.constructedEntity=new ai(Object.create(null),hi),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){super.deoptimizeArgumentsOnInteractionAtPath(e,t,s),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:re);const{brokenFlow:i,ignore:n,replacedVariableInits:r}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(s))return!0;s.brokenFlow=i,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),s.ignore=n}return!1}include(e,t){super.include(e,t),this.id?.include();const s=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof an&&!s||i.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ai([{key:"prototype",kind:"init",property:new ai([],hi)}],hi)}}class On extends Js{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Rn||e instanceof kn)break e}while(e=e.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Dn={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>ee<e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};function Ln(e,t,s){if(s.arguments.length>0)if(s.arguments[s.arguments.length-1].included)for(const i of s.arguments)i.render(e,t);else{let i=s.arguments.length-2;for(;i>=0&&!s.arguments[i].included;)i--;if(i>=0){for(let n=0;n<=i;n++)s.arguments[n].render(e,t);e.remove(dn(e.original,",",s.arguments[i].end),s.end-1)}else e.remove(dn(e.original,"(",s.callee.end)+1,s.end-1)}}class Tn extends Js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.context.code.charCodeAt(this.start)?se:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?oe:Es(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||xs(this.members,e[0],t,s))}}initialise(){this.members=function(e){if(e instanceof RegExp)return gs;switch(typeof e){case"boolean":return fs;case"number":return ms;case"string":return ys}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Mn(e){return e.computed?function(e){if(e instanceof Tn)return String(e.value);return null}(e.property):e.property.name}function Vn(e){const t=e.propertyKey,s=e.object;if("string"==typeof t){if(s instanceof an)return[{key:s.name,pos:s.start},{key:t,pos:e.property.start}];if(s instanceof Bn){const i=Vn(s);return i&&[...i,{key:t,pos:e.property.start}]}}return null}class Bn extends Js{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const e=Vn(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const s=zn(t,e.slice(1),this.context);s?"undefined"===s?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let s=1;s!!e&&e!==re));if(0!==o.length)if(n===re)for(const e of o)e.deoptimizePath(Y);else s.withTrackedEntityAtPath(t,n,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);n.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==re){this.returnExpression=oe;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ge,this.deoptimizableDependentExpressions=me;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Y)}}deoptimizePath(e){if(0===e.length||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==re&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){const[i]=this.getReturnExpression(t);return i===re?se:t.withTrackedEntityAtPath(e,i,(()=>(this.deoptimizableDependentExpressions.push(s),i.getLiteralValueAtPath(e,t,s))),se)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getReturnExpression(s);return n[0]===re?n:s.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(i);const[r,o]=n[0].getReturnExpressionWhenCalledAtPath(e,t,s,i);return[r,o||n[1]]}),oe)}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(2===i){const{args:i,withNew:n}=t;if((n?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,i,this))return!1}else if((1===i?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[n,r]=this.getReturnExpression();return(1===i||!r)&&n.hasEffectsOnInteractionAtPath(e,t,s)}}class jn extends Fn{bind(){if(super.bind(),this.callee instanceof an){this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(ve,Rt(this.callee.name),this.start),"eval"===this.callee.name&&this.context.log(ve,{code:"EVAL",id:e=this.context.module.id,message:`Use of eval in "${T(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Oe("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Bn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(K,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Zs&&this.callee instanceof an&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(K,ee,e)}render(e,t,{renderedSurroundingElement:s}=pe){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:s}),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}getReturnExpression(e=ee){return null===this.returnExpression?(this.returnExpression=oe,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(K,this.interaction,e,this)):this.returnExpression}}class Un extends Vi{addDeclaration(e,t,s,i){const n=this.variables.get(e.name);return n?(this.parent.addDeclaration(e,t,ns,i),n.addDeclaration(e,s),n):this.parent.addDeclaration(e,t,s,i)}}class Gn extends Mi{constructor(e,t,s){super(e),this.variables.set("this",this.thisVariable=new wi("this",null,t,s)),this.instanceScope=new Mi(this),this.instanceScope.variables.set("this",new Nn(s))}findLexicalBoundary(){return this}}class Wn extends Js{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},K,s):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(K,{args:t.args,type:2,withNew:!1},s):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=oe,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(K,he,ee,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class qn extends Wn{applyDeoptimizations(){}}class Hn extends ne{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],s)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,s){return this.object.getLiteralValueAtPath([this.key,...e],t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,s)}}class Kn extends Js{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Mi(e)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,s):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,s))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof qn&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof qn&&"constructor"===e.kind||e.deoptimizePath(Y);this.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const s of this.body.body){const i=s.static?e:t,n=s.kind;if(i===t&&!n)continue;const r="set"===n||"get"===n?n:"init";let o;if(s.computed){const e=s.key.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e){i.push({key:G,kind:r,property:s});continue}o=String(e)}else o=s.key instanceof an?s.key.name:String(s.key.value);i.push({key:o,kind:r,property:s})}return e.unshift({key:"prototype",kind:"init",property:new ai(t,this.superClass?new Hn(this.superClass,"prototype"):hi)}),this.objectEntity=new ai(e,this.superClass||hi)}}class Yn extends Kn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new an(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===i&&s.has(o)&&e.appendLeft(this.end,`${n}${In([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${n}=${n}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:s,variable:i}=e;for(const e of t.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}class Xn extends Kn{render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s===_s&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Qn extends ne{constructor(e){super(),this.expressions=e,this.included=!1}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return[new Qn(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,s){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(e,t,s))return!0;return!1}}function Zn(e,t){const{brokenFlow:s,hasBreak:i,hasContinue:n,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=i,e.hasContinue=n,e.brokenFlow=s,!1)}function Jn(e,t,s){const{brokenFlow:i,hasBreak:n,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,s,{asSingleStatement:!0}),e.hasBreak=n,e.hasContinue=r,e.brokenFlow=i}class er extends Js{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}er.prototype.needsBoundaries=!0;class tr extends Rn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new an(e.id,this,this.scope.parent)),super.parseNode(e)}}class sr extends Js{include(e,t){super.include(e,t),t&&this.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s,r=function(e,t){return fn(e,dn(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof tr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const s=dn(e,"function",t)+8;e=e.slice(s,dn(e,"(",s));const i=dn(e,"*");return-1===i?s:s+i+1}(e.original,r):null,t);else if(this.declaration instanceof Yn)this.renderNamedDeclaration(e,r,null===this.declaration.id?dn(e.original,"class",i)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void cn(this,e,i,n);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:_s}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,s,i){const{exportNamesByVariable:n,format:r,snippets:{getPropertyAccess:o}}=i,a=this.variable.getName(o);e.remove(this.start,t),null!==s&&e.appendLeft(s,` ${a}`),"system"===r&&this.declaration instanceof Yn&&n.has(this.variable)&&e.appendLeft(this.end,` ${In([this.variable],i)};`)}renderVariableDeclaration(e,t,{format:s,exportNamesByVariable:i,snippets:{cnst:n,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===s&&i.get(this.variable);a?(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${a[0]}', `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}sr.prototype.needsBoundaries=!0;class ir extends Js{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s;null===this.declaration?e.remove(i,n):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:n,start:i}))}applyDeoptimizations(){}}ir.prototype.needsBoundaries=!0;class nr extends Rn{render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s===_s&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class rr extends En{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,s,i)}}const or=Symbol("unset");class ar extends Js{constructor(){super(...arguments),this.testValue=or}deoptimizeCache(){this.testValue=se}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const s=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&s,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new rr(this.scope),this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new rr(this.scope),this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:s}}=t,i=this.getTestValue(),n=[],r=this.test.included,o=!this.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof i||i)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),n.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof i&&i?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),n.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(n,e,s)}applyDeoptimizations(){}getTestValue(){return this.testValue===or?this.testValue=this.test.getLiteralValueAtPath(K,ee,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let s=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),s=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&s)}renderHoistedDeclarations(e,t,s){const i=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(s):""})))].filter(Boolean).join(", ");if(i){const e=this.parent.type,s=e!==Ts&&e!==Is;t.prependRight(this.start,`${s?"{ ":""}var ${i}; `),s&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof ar&&e.alternate)return!0;if(e instanceof vn)return!1;e=e.parent}while(e);return!1}}class lr extends Js{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}lr.prototype.needsBoundaries=!0;class cr extends Js{applyDeoptimizations(){}}const hr="_interopDefault",ur="_interopDefaultCompat",dr="_interopNamespace",pr="_interopNamespaceCompat",fr="_interopNamespaceDefault",mr="_interopNamespaceDefaultOnly",gr="_mergeNamespaces",yr={auto:hr,compat:ur,default:null,defaultOnly:null,esModule:null},xr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Er={auto:dr,compat:pr,default:fr,defaultOnly:mr,esModule:null},br=(e,t)=>"esModule"!==e&&xr(e,t),vr=(e,t,s,i,n,r,o)=>{const a=new Set(e);for(const e of Lr)t.has(e)&&a.add(e);return Lr.map((e=>a.has(e)?Sr[e](s,i,n,r,o,a):"")).join("")},Sr={[ur](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:ur});return`${o}${Ir(t)}${i}?${i}${s?Ar(t):kr(t)}${a}${r}${r}`},[hr](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:hr});return`${o}e${i}&&${i}e.__esModule${i}?${i}${s?Ar(t):kr(t)}${a}${r}${r}`},[pr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(fr)){const[e,s]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:pr});return`${e}${Ir(t)}${o}?${o}e${o}:${o}${fr}(e)${s}${l}${l}`}return`function ${pr}(e)${o}{${l}${e}if${o}(${Ir(t)})${o}return e;${l}`+wr(e,e,t,s,i,n)+`}${l}${l}`},[mr](e,t,s,i,n){const{getDirectReturnFunction:r,getObject:o,n:a}=t,[l,c]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:mr});return`${l}${Or(i,Dr(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${c}${a}${a}`},[fr](e,t,s,i,n){const{_:r,n:o}=t;return`function ${fr}(e)${r}{${o}`+wr(e,e,t,s,i,n)+`}${o}${o}`},[dr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(fr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${fr}(e)${t}${l}${l}`}return`function ${dr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+wr(e,e,t,s,i,n)+`}${l}${l}`},[gr](e,t,s,i,n){const{_:r,cnst:o,n:a}=t,l="var"===o&&s;return`function ${gr}(n, m)${r}{${a}${e}${Cr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(s?l?Nr:_r:Rr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Or(i,Dr(n,"n",t))};${a}}${a}${a}`}},Ar=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,kr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Ir=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,wr=(e,t,s,i,n,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}=s,d=`{${h}`+(i?$r:Rr)(e,t+e+e,s)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Tr(l)}${o}}`:""});${h}${t}if${o}(e)${o}{${h}${t}${e}${Pr(d,!i,s)}${h}${t}}${h}${t}n${c("default")}${o}=${o}e;${h}${t}return ${Or(n,"n")}${u}${h}`},Pr=(e,t,{_:s,cnst:i,getFunctionIntro:n,s:r})=>"var"!==i||t?`for${s}(${i} k in e)${s}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:!1,name:null})}${e})${r}`,Cr=(e,t,s,{_:i,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,n]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:s,t:s},name:null});return`m.forEach(${t}e${i}&&${i}typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e)${i}&&${i}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${n});`}return`for${i}(var i${i}=${i}0;${i}i${i}<${i}m.length;${i}i++)${i}{${a}${s}${s}${n} e${i}=${i}m[i];${a}${s}${s}if${i}(typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e))${i}{${i}for${i}(${n} k in e)${i}${e}${i}}${a}${s}}`},$r=(e,t,s)=>{const{_:i,n:n}=s;return`${t}if${i}(k${i}!==${i}'default')${i}{${n}`+Nr(e,t+e,s)+`${t}}${n}`},Nr=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}enumerable:${s}true,${r}${t}${e}get:${s}${o}e[k]${a}${r}${t}});${r}`},_r=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}if${s}(d)${s}{${r}${t}${e}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}${e}enumerable:${s}true,${r}${t}${e}${e}get:${s}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Rr=(e,t,{_:s,n:i})=>`${t}n[k]${s}=${s}e[k];${i}`,Or=(e,t)=>e?`Object.freeze(${t})`:t,Dr=(e,t,{_:s,getObject:i})=>e?`Object.defineProperty(${t},${s}Symbol.toStringTag,${s}${Tr(i)})`:t,Lr=Object.keys(Sr);function Tr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function Mr(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Vr extends Js{declareDeclarator(e){this.id.declare(e,this.init||ns)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:s,id:i,init:n}=this;s||this.applyDeoptimizations(),this.included=!0,n?.include(e,t),i.markDeclarationReached(),(t||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t){const{exportNamesByVariable:s,snippets:{_:i,getPropertyAccess:n}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=dn(e.original,"=",o.end);e.remove(l,fn(e.original,t+1))}if(a){if(o instanceof an&&a instanceof Xn&&!a.id){o.variable.getName(n)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?pe:{renderedSurroundingElement:_s})}else o instanceof an&&Mr(o.variable,s)&&e.appendLeft(r,`${i}=${i}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof an&&t instanceof Xn&&!t.id){const{name:s,variable:i}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}function Br(e,t,s){return"external"===t?Er[s(e instanceof Zt?e.id:null)]:"default"===t?mr:null}const zr={amd:["require"],cjs:["require"],system:["module"]};function Fr(e){const t=[];for(const s of e.properties){if("RestElement"===s.type||s.computed||"Identifier"!==s.key.type)return;t.push(s.key.name)}return t}class jr extends Js{applyDeoptimizations(){}}const Ur="ROLLUP_FILE_URL_",Gr="import";const Wr={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},qr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Hr=(e,t="URL")=>`new ${t}(${e}).href`,Kr=(e,t=!1)=>Hr(`'${D(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Yr=e=>(t,{chunkId:s})=>{const i=e(s);return null===t?`({ url: ${i} })`:"url"===t?i:"undefined"},Xr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Qr=e=>Xr(`__dirname + '/${e}'`),Zr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${D(e)}', document.baseURI).href)`,Jr={amd:e=>("."!==e[0]&&(e="./"+e),Hr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Qr(e)} : ${Kr(e)})`,es:e=>Hr(`'${e}', import.meta.url`),iife:e=>Kr(e),system:e=>Hr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Qr(e)} : ${Kr(e,!0)})`},eo={amd:Yr((()=>Hr("module.uri, document.baseURI"))),cjs:Yr((e=>`(typeof document === 'undefined' ? ${Xr("__filename")} : ${Zr(e)})`)),iife:Yr((e=>Zr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Yr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Xr("__filename")} : ${Zr(e,!0)})`))};class to extends Js{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(ss()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:s,module:i}=this.context;s(Se,Lt(e,i.id,we(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){let s=this.start;if(e.original.startsWith("#!")&&(s=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,s)),this.body.length>0){for(;"/"===e.original[s]&&/[*/]/.test(e.original[s+1]);){const t=mn(e.original.slice(s,this.body[0].start));if(-1===t[0])break;s+=t[1]}gn(this.body,e,s,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class so extends Js{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const s of this.consequent)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t,s){if(this.consequent.length>0){this.test&&this.test.render(e,t);const i=this.test?this.test.end:dn(e.original,"default",this.start)+7,n=dn(e.original,":",i)+1;gn(this.consequent,e,n,s.end,t)}else super.render(e,t)}}so.prototype.needsBoundaries=!0;class io extends Js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?se:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?oe:Es(ys,e[0])}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ys,e[0],t,s)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class no extends ue{constructor(){super("undefined")}getLiteralValueAtPath(){}}class ro extends wi{constructor(e,t,s){super(e,t,t.declaration,s),this.hasId=!1,this.originalId=null,this.originalVariable=null;const i=t.declaration;(i instanceof tr||i instanceof Yn)&&i.id?(this.hasId=!0,this.originalId=i.id):i instanceof an&&(this.originalId=i)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof no||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const s=new Set;do{s.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof ro&&!s.has(t));return this.originalVariable=t||e}}class oo extends Mi{constructor(e,t){super(e),this.context=t,this.variables.set("this",new wi("this",null,ns,t))}addExportDefaultDeclaration(e,t,s){const i=new ro(e,t,s);return this.variables.set("default",i),i}addNamespaceMemberAccess(){}deconflict(e,t,s){for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.context.traceVariable(e)||this.parent.findVariable(e);return s instanceof rn&&this.accessedOutsideVariables.set(e,s),s}}const ao={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>se,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class lo extends Js{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(K)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:s}=pe){this.included=!0;for(const i of this.declarations){(t||i.shouldBeIncluded(e))&&i.include(e,t);const{id:n,init:r}=i;s&&n.include(e,t),r&&n.included&&!r.included&&(n instanceof Cn||n instanceof Ii)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,s=pe){if(function(e,t){for(const s of e){if(!s.id.included)return!1;if(s.id.type===Os){if(t.has(s.id.variable))return!1}else{const e=[];if(s.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const s of this.declarations)s.render(e,t);s.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}applyDeoptimizations(){}renderDeclarationEnd(e,t,s,i,n,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===s?e.appendLeft(n,t):(10!==e.original.charCodeAt(i-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(i--,13===e.original.charCodeAt(i)&&i--),i===s+1?e.overwrite(s,n,t):(e.overwrite(s,s+1,t),e.remove(i,n))),r.length>0&&e.appendLeft(n,` ${In(r,o)};`)}renderReplacedDeclarations(e,t){const s=yn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,n;n=fn(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o,a,l=!1,c=!1,h="";const u=[],d=function(e,t,s){let i=null;if("system"===t.format){for(const{node:n}of e)n.id instanceof an&&n.init&&0===s.length&&1===t.exportNamesByVariable.get(n.id.variable)?.length?(i=n.id.variable,s.push(i)):n.id.addExportedVariables(s,t.exportNamesByVariable);s.length>1?i=null:i&&(s.length=0)}return i}(s,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of s)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof an&&Mr(u.id.variable,t.exportNamesByVariable))c&&(h+=";"),l=!1;else{if(d&&d===u.id.variable){const s=dn(e.original,"=",u.id.end);wn(d,fn(e.original,s+1),null===f?m:f,e,t)}l?h+=",":(c&&(h+=";"),o+=`${this.kind} `,l=!0)}n===r+1?e.overwrite(r,n,h+o):(e.overwrite(r,r+1,h),e.appendLeft(n,o)),i=m,n=g,c=!0,r=f,h=""}else e.remove(p,g);this.renderDeclarationEnd(e,h,r,i,n,u,t)}}const co={ArrayExpression:ki,ArrayPattern:Ii,ArrowFunctionExpression:kn,AssignmentExpression:class extends Js{hasEffects(e){const{deoptimized:t,left:s,operator:i,right:n}=this;return t||this.applyDeoptimizations(),n.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)}hasEffectsOnInteractionAtPath(e,t,s){return this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){const{deoptimized:s,left:i,right:n,operator:r}=this;s||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||i.included||i.hasEffectsAsAssignmentTarget(ss(),!1))&&i.includeAsAssignmentTarget(e,t,"="!==r),n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:s,renderedParentType:i,renderedSurroundingElement:n}=pe){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=fn(e.original,dn(e.original,"=",r.end)+1);e.remove(a,l),s&&xn(e,l,o.start),o.render(e,t,{renderedParentType:i||c.type,renderedSurroundingElement:n||c.type})}if("system"===t.format)if(r instanceof an){const s=r.variable,i=t.exportNamesByVariable.get(s);if(i)return void(1===i.length?wn(s,a,l,e,t):Pn(s,a,l,c.type!==_s,e,t))}else{const s=[];if(r.addExportedVariables(s,t.exportNamesByVariable),s.length>0)return void function(e,t,s,i,n,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;n.prependRight(t,a(["v"],`${In(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:i})),n.appendLeft(s,")")}(s,a,l,n===_s,e,t)}r.included&&r instanceof Cn&&(n===_s||n===As)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends Js{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.left.hasEffectsOnInteractionAtPath(K,t,s)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:s}=pe){this.left.render(e,t,{isShorthandProperty:s}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},AwaitExpression:On,BinaryExpression:class extends Js{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(e.length>0)return se;const i=this.left.getLiteralValueAtPath(K,t,s);if("symbol"==typeof i)return se;const n=this.right.getLiteralValueAtPath(K,t,s);if("symbol"==typeof n)return se;const r=Dn[this.operator];return r?r(i,n):se}hasEffects(e){return"+"===this.operator&&this.parent instanceof bn&&""===this.left.getLiteralValueAtPath(K,ee,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}render(e,t,{renderedSurroundingElement:s}=pe){this.left.render(e,t,{renderedSurroundingElement:s}),this.right.render(e,t)}},BlockStatement:vn,BreakStatement:class extends Js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:jn,CatchClause:class extends Js{createScope(e){this.scope=new Un(e,this.context)}parseNode(e){const{param:t}=e;t&&(this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope),this.param.declare("parameter",re)),super.parseNode(e)}},ChainExpression:class extends Js{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(!this.expression.isSkippedAsOptional(s))return this.expression.getLiteralValueAtPath(e,t,s)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}},ClassBody:class extends Js{createScope(e){this.scope=new Gn(e,this.parent,this.context)}include(e,t){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const s of this.body)s.include(e,t)}parseNode(e){const t=this.body=[];for(const s of e.body)t.push(new(this.context.getNodeConstructor(s.type))(s,this,s.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Yn,ClassExpression:Xn,ConditionalExpression:class extends Js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Y);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=me;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Qn([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.consequent.hasEffectsOnInteractionAtPath(e,t,s)||this.alternate.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===s?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):s.include(e,t)}includeCallArguments(e,t){const s=this.getUsedBranch();s?s.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=pe){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=dn(e.original,":",this.consequent.end),l=fn(e.original,(this.consequent.included?dn(e.original,"?",this.test.end):a)+1);i&&xn(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),hn(this,e),o.render(e,t,{isCalleeOfRenderedParent:s,preventASI:!0,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(K,ee,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends Js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends Js{hasEffects(e){return!!this.test.hasEffects(e)||Zn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Jn(e,this.body,t)}},EmptyStatement:class extends Js{hasEffects(){return!1}},ExportAllDeclaration:er,ExportDefaultDeclaration:sr,ExportNamedDeclaration:ir,ExportSpecifier:class extends Js{applyDeoptimizations(){}},ExpressionStatement:bn,ForInStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){const{body:t,deoptimized:s,left:i,right:n}=this;return s||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(e,!1)&&!n.hasEffects(e))||Zn(e,t)}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Jn(e,s,t)}initialise(){this.left.setAssignedValue(re)}render(e,t){this.left.render(e,t,un),this.right.render(e,t,un),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.context.requestTreeshakingPass()}},ForOfStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Jn(e,s,t)}initialise(){this.left.setAssignedValue(re)}render(e,t){this.left.render(e,t,un),this.right.render(e,t,un),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},ForStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Zn(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),Jn(e,this.body,t)}render(e,t){this.init?.render(e,t,un),this.test?.render(e,t,un),this.update?.render(e,t,un),this.body.render(e,t)}},FunctionDeclaration:tr,FunctionExpression:nr,Identifier:an,IfStatement:ar,ImportAttribute:class extends Js{},ImportDeclaration:lr,ImportDefaultSpecifier:cr,ImportExpression:class extends Js{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof bn)return me;if(e instanceof On){const t=e.parent;if(t instanceof bn)return me;if(t instanceof Vr){const e=t.id;return e instanceof Cn?Fr(e):void 0}if(t instanceof Bn){const e=t.property;if(!t.computed&&e instanceof an)return[e.name]}}else if(e instanceof Bn){const t=e.parent,s=e.property;if(!(t instanceof jn&&s instanceof an))return;const i=s.name;if(t.parent instanceof bn&&["catch","finally"].includes(i))return me;if("then"!==i)return;if(0===t.arguments.length)return me;const n=t.arguments[0];if(1!==t.arguments.length||!(n instanceof kn||n instanceof nr))return;if(0===n.params.length)return me;const r=n.params[0];return 1===n.params.length&&r instanceof Cn?Fr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:s,getDirectReturnFunction:i,getObject:n,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,s]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${s})`)}else{if(this.mechanism&&(e.overwrite(this.start,dn(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,s]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${s})`)}}else this.source.render(e,t);!0!==this.assertions&&(this.arguments&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&e.appendLeft(this.end-1,`,${s}${n([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,s,i,n,r,o,a,l){const{format:c}=s;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.assertions=l;const h=[...zr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,s,i,n)),u&&h.push(u),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:s,dynamicImportFunction:i,dynamicImportInCjs:n,format:r,generatedCode:{arrowFunctions:o},interop:a},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:h},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:r,moduleId:this.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const p=!this.resolution||"string"==typeof this.resolution;switch(r){case"cjs":{if(n&&(!e||"string"==typeof e||e instanceof Zt))return{helper:null,mechanism:null};const s=Br(e,t,a);let i="require(",r=")";s&&(i=`/*#__PURE__*/${s}(${i}`,r+=")");const[l,u]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${l}${i}`,r+=`${u})`,!o&&p&&(i=h(["t"],`${i}t${r}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),r=")"),{helper:s,mechanism:{left:i,right:r}}}case"amd":{const i=s?"c":"resolve",n=s?"e":"reject",r=Br(e,t,a),[u,d]=c(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=r?`${u}${i}(/*#__PURE__*/${r}(m))${d}`:i,[m,g]=c([i,n],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,x=`],${l}${f},${l}${n})${g})`;return!o&&p&&(y=h(["t"],`${y}t${x}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),x=")"),{helper:r,mechanism:{left:y,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(i)return{helper:null,mechanism:{left:`${i}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:jr,ImportSpecifier:class extends Js{applyDeoptimizations(){}},LabeledStatement:class extends Js{hasEffects(e){const t=e.brokenFlow;return e.ignore.labels.add(this.label.name),!!this.body.hasEffects(e)||(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t),!1)}include(e,t){this.included=!0;const s=e.brokenFlow;this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=s)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,fn(e.original,dn(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Tn,LogicalExpression:class extends Js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Y);const{context:t,expressionsToBeDeoptimized:s}=this;this.expressionsToBeDeoptimized=me;for(const e of s)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Qn([this.left.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.left.hasEffectsOnInteractionAtPath(e,t,s)||this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||s===this.right&&this.left.shouldBeIncluded(e)||!s?(this.left.include(e,t),this.right.include(e,t)):s.include(e,t)}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=pe){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:i,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=dn(e.original,this.operator,this.left.end);if(this.right.included){const t=fn(e.original,o+2);e.remove(this.start,t),i&&xn(e,t,this.right.start)}else e.remove(o,this.end);hn(this,e),this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:Bn,MetaProperty:class extends Js{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:s}=this;return t===Gr&&s?.startsWith(Ur)?e.getFileName(s.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Gr)){this.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Bn&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Ur)&&(this.referenceId=t.slice(16))}}render(e,{format:t,pluginDriver:s,snippets:i}){const{context:{module:{id:n}},meta:{name:r},metaProperty:o,parent:a,preliminaryChunkId:l,referenceId:c,start:h,end:u}=this;if(r!==Gr)return;const d=l;if(c){const i=s.getFileName(c),r=I($(P(d),i)),o=s.hookFirstSync("resolveFileUrl",[{chunkId:d,fileName:i,format:t,moduleId:n,referenceId:c,relativePath:r}])||Jr[t](r);return void e.overwrite(a.start,a.end,o,{contentOnly:!0})}const p=s.hookFirstSync("resolveImportMeta",[o,{chunkId:d,format:t,moduleId:n}])||eo[t]?.(o,{chunkId:d,snippets:i});"string"==typeof p&&(a instanceof Bn?e.overwrite(a.start,a.end,p,{contentOnly:!0}):e.overwrite(h,u,p,{contentOnly:!0}))}setResolution(e,t,s){this.preliminaryChunkId=s;const i=(this.metaProperty?.startsWith(Ur)?qr:Wr)[e];i.length>0&&this.scope.addAccessedGlobals(i,t)}},MethodDefinition:qn,NewExpression:class extends Js{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(K,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}},ObjectExpression:class extends Js{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s!==_s&&s!==As||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=hi;const t=[];for(const s of this.properties){if(s instanceof ei){t.push({key:G,kind:"init",property:s});continue}let i;if(s.computed){const e=s.key.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e){t.push({key:G,kind:s.kind,property:s});continue}i=String(e)}else if(i=s.key instanceof an?s.key.name:String(s.key.value),"__proto__"===i&&"init"===s.kind){e=s.value instanceof Tn&&null===s.value.value?null:s.value;continue}t.push({key:i,kind:s.kind,property:s})}return this.objectEntity=new ai(t,e)}},ObjectPattern:Cn,PrivateIdentifier:class extends Js{},Program:to,Property:class extends Wn{constructor(){super(...arguments),this.declarationInit=null}declare(e,t){return this.declarationInit=t,this.value.declare(e,re)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([G,G]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.value?this.value.getLiteralValueAtPath(e,t,s):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,s,i):oe}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}},RestElement:Sn,ReturnStatement:class extends Js{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||re)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,s)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,s){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(t||i===s&&!(this.parent instanceof bn)||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t,{renderedParentType:s,isCalleeOfRenderedParent:i,preventASI:n}=pe){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:h,end:u}of yn(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&n&&xn(e,h,l.start),1===r){const n=s||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:i&&l===a,renderedParentType:n,renderedSurroundingElement:n})}else l.render(e,t);else cn(l,e,h,u);o&&e.remove(o,this.end)}},SpreadElement:ei,StaticBlock:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){if(this.body.length>0){const s=dn(e.original.slice(this.start,this.end),"{")+1;gn(this.body,e,this.start+s,this.end-1,t)}else super.render(e,t)}},Super:class extends Js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:so,SwitchStatement:class extends Js{createScope(e){this.parentScope=e,this.scope=new En(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:s,ignore:i}=e,{breaks:n}=i;i.breaks=!0,e.hasBreak=!1;let r=!0;for(const s of this.cases){if(s.hasEffects(e))return!0;r&&(r=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),i.breaks=n,e.hasBreak=s,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:s,hasBreak:i}=e;e.hasBreak=!1;let n=!0,r=t||null!==this.defaultCase&&this.defaultCase=0;i--){const o=this.cases[i];if(o.included&&(r=!0),!r){const e=ss();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),n&&(n=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=s):n=s}r&&null!==this.defaultCase&&(e.brokenFlow=n),e.hasBreak=i}initialise(){for(let e=0;e0&&gn(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends Fn{bind(){if(super.bind(),this.tag.type===Os){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.context.log(ve,Rt(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(K,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[s]=this.getReturnExpression();s.included||s.include(e,!1)}initialise(){this.args=[re,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Bn&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}getReturnExpression(e=ee){return null===this.returnExpression?(this.returnExpression=oe,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(K,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends Js{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:io,ThisExpression:class extends Js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,s)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof oo?this.context.moduleContext:null,"undefined"===this.alias&&this.context.log(ve,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:Oe("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Js{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends Js{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const s=this.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:n}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)n.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Zs:t),n.size>0&&(this.includedLabelsAfterBlock=[...n]),e.brokenFlow=i;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=i),this.finalizer?.include(e,t)}},UnaryExpression:class extends Js{getLiteralValueAtPath(e,t,s){if(e.length>0)return se;const i=this.argument.getLiteralValueAtPath(K,t,s);return"symbol"==typeof i?se:ao[this.operator](i)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof an)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(K,ce,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(K),this.context.requestTreeshakingPass())}},UnknownNode:class extends Js{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends Js{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(re)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n}}=t;if(this.argument.render(e,t),"system"===i){const i=this.argument.variable,r=s.get(i);if(r)if(this.prefix)1===r.length?wn(i,this.start,this.end,e,t):Pn(i,this.start,this.end,this.parent.type!==_s,e,t);else{const s=this.operator[0];!function(e,t,s,i,n,r,o){const{_:a}=r.snippets;n.prependRight(t,`${In([e],r,o)},${a}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}(i,this.start,this.end,this.parent.type!==_s,e,t,`${n}${s}${n}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(K),this.argument instanceof an){this.scope.findVariable(this.argument.name).isReassigned=!0}this.context.requestTreeshakingPass()}},VariableDeclaration:lo,VariableDeclarator:Vr,WhileStatement:class extends Js{hasEffects(e){return!!this.test.hasEffects(e)||Zn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Jn(e,this.body,t)}},YieldExpression:class extends Js{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},ho="_missingExportShim";class uo extends ue{constructor(e){super(ho),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class po extends ue{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(t.length>1||1===t.length&&2===e.type){const i=t[0];"string"==typeof i?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),s):ae(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===H?"Module":se}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const s of t)if("*"!==s[0]&&s!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(s);t&&(e[s]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(0===e.length)return!0;if(1===e.length&&2!==i)return 1===i;const n=e[0];if("string"!=typeof n)return!0;const r=this.getMemberVariables()[n];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,s)}include(){this.included=!0,this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([gr],e)}renderBlock(e){const{exportNamesByVariable:t,format:s,freeze:i,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}}=e,d=this.getMemberVariables(),p=Object.entries(d).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${e}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${gr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Tr(l)})`),i&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===s&&t.has(this)&&(f+=`${h}${In([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references)if(e.context.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}po.prototype.isNamespace=!0;class fo extends ue{constructor(e,t,s){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=s}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof ro||e instanceof fo;){if(e instanceof ro){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof fo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var mo;function go(e){return e.id}!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(mo||(mo={}));const yo=e=>{const t=e.key;return t&&(t.name||t.value)};function xo(e,t){const s=Object.keys(e);return s.length!==Object.keys(t).length||s.some((s=>e[s]!==t[s]))}var Eo="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},bo={memoryUsage:()=>({heapUsed:0})};let vo=new Map;function So(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Ao(e,t=3){e=So(e,t);const s=bo.memoryUsage().heapUsed,i=Eo.now(),n=vo.get(e);void 0===n?vo.set(e,{memory:0,startMemory:s,startTime:i,time:0,totalMemory:0}):(n.startMemory=s,n.startTime=i)}function ko(e,t=3){e=So(e,t);const s=vo.get(e);if(void 0!==s){const e=bo.memoryUsage().heapUsed;s.memory+=e-s.startMemory,s.time+=Eo.now()-s.startTime,s.totalMemory=Math.max(s.totalMemory,e)}}function Io(){const e={};for(const[t,{memory:s,time:i,totalMemory:n}]of vo)e[t]=[i,s,n];return e}let wo=ji,Po=ji;const Co=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function $o(e,t){for(const s of Co)if(s in e){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${s}`;const n=function(...e){wo(i,4);const t=r.apply(this,e);return Po(i,4),t};let r;"function"==typeof e[s].handler?(r=e[s].handler,e[s].handler=n):(r=e[s],e[s]=n)}return e}function No(e){e.isExecuted=!0;const t=[e],s=new Set;for(const e of t)for(const i of[...e.dependencies,...e.implicitlyLoadedBefore])i instanceof Zt||i.isExecuted||!i.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(i)||s.has(i.id)||(i.isExecuted=!0,s.add(i.id),t.push(i))}const _o={identifier:null,localName:ho};function Ro(e,t,s,i,n=new Map){const r=n.get(t);if(r){if(r.has(e))return i?[null]:Ye((o=t,a=e.id,{code:it,exporter:a,message:`"${o}" cannot be exported from "${T(a)}" as it is a reexport that references itself.`}));r.add(e)}else n.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:s,isExportAllSearch:i,searchedNamesAndModules:n})}function Oo(e,t){const s=F(t.sideEffectDependenciesByVariable,e,j);let i=e;const n=new Set([i]);for(;;){const e=i.module;if(i=i instanceof ro?i.getDirectOriginalVariable():i instanceof fo?i.syntheticNamespace:null,!i||n.has(i))break;n.add(i),s.add(e);const t=e.sideEffectDependenciesByVariable.get(i);if(t)for(const e of t)s.add(e)}return s}class Do{constructor(e,t,s,i,n,r,o,a){this.graph=e,this.id=t,this.options=s,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new uo(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:h,exportAllSources:u,exports:d,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAssertions:y}=this;this.info={assertions:a,ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return h.sort()},get exportedBindings(){const e={".":[...d.keys()]};for(const[t,{source:s}]of g)(e[s]??(e[s]=[])).push(t);for(const t of u)(e[t]??(e[t]=[])).push("*");return e},get exports(){return[...d.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},get hasModuleSideEffects(){return Xt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ke,!0,s),this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,go).sort()},get implicitlyLoadedBefore(){return Array.from(f,go).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==mo.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const e=w(this.id),t=C(this.id);return be(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),Ye(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof Zt)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,s=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&s.add(t)}for(let i of s){const s=this.sideEffectDependenciesByVariable.get(i);if(s)for(const e of s)t.add(e);i instanceof fo?i=i.getBaseVariable():i instanceof ro&&(i=i.getOriginalVariable()),e.add(i.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[s]=this.getVariableForExportName(t);if(s instanceof ro&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof de))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof Zt)e.add(`*${t.id}`);else for(const s of[...t.getReexports(),...t.getExports()])"default"!==s&&e.add(s);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const s of this.exports.keys()){const[i]=this.getVariableForExportName(s);(i&&i.included?e:t).push(s)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Ye((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${T(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:n}=fe){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=Ro(r.module,r.localName,t,!1,n);return e?(t&&(Lo(e,t,this),this.info.moduleSideEffects&&F(t.sideEffectDependenciesByVariable,e,j).add(this)),[e]):this.error(Ft(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===_o)return[this.exportShimVariable];const e=o.localName,s=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});return t&&(Lo(s,t,this),F(t.sideEffectDependenciesByVariable,s,j).add(this)),[s]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,n);if(this.namespaceReexportsByName.set(e,s),s[0])return s}return this.info.syntheticNamedExports?[F(this.syntheticExports,e,(()=>new fo(this.astContext,e,this.getSyntheticNamespace())))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=ts();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(No(this),this.graph.needsTreeshakingPass=!0);for(const t of this.exports.keys())if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(Y),e.included||this.includeVariable(e)}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Y),t.included||this.includeVariable(t),t instanceof de&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(ts(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(No(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(Y),e.included||this.includeVariable(e)),this.exports.has(s)||this.reexportDescriptions.has(s)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const s=this.graph.modulesById.get(this.resolvedIds[t].id);s instanceof Zt?e.push(s):this.exportAllModules.push(s)}this.exportAllModules.push(...e)}log(e,t,s){this.addLocationToLogProps(t,s),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:s}=this.astContext;return s&&"es"!==e.format&&"system"!==e.format?Ye((i=this.id,n=e.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${n}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:s};var i,n}setSource({ast:e,code:t,customTransformCache:s,originalCode:i,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){wo("generate ast",3),this.info.code=t,this.originalCode=i,this.originalSourcemap=n,this.sourcemapChain=o,l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=s,this.updateOptions(c);const h=e??this.tryParse();Po("generate ast",3),wo("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new g(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>co[e]||co.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new oo(this.graph.scope,this.astContext),this.namespace=new po(this.astContext),this.ast=new to(h,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=h:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),Po("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,go),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:s,searchedNamesAndModules:i}=fe){const n=this.scope.variables.get(e);if(n)return n;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Do&&"*"===r.name)return e.namespace;const[n]=Ro(e,r.name,t||this,s,i);return n||this.error(Ft(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:s}){null!=t&&(this.info.moduleSideEffects=t),null!=s&&(this.info.syntheticNamedExports=s),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof io?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Tn&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof sr)this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof er){const t=e.source.value;if(this.addSource(t,e),e.exported){const s=e.exported.name;this.reexportDescriptions.set(s,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Tn){const t=e.source.value;this.addSource(t,e);for(const{exported:s,local:i,start:n}of e.specifiers){const e=s instanceof Tn?s.value:s.name;this.reexportDescriptions.set(e,{localName:i instanceof Tn?i.value:i.name,module:null,source:t,start:n})}}else if(e.declaration){const t=e.declaration;if(t instanceof lo)for(const e of t.declarations)for(const t of es(e.id))this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:s}of e.specifiers){const e=t.name,i=s instanceof an?s.name:s.value;this.exports.set(i,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const s of e.specifiers){const e=s instanceof cr?"default":s instanceof jr?"*":s.imported instanceof an?s.imported.name:s.imported.value;this.importDescriptions.set(s.local.name,{module:null,name:e,source:t,start:s.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let s=this.info.code;const i=we(s,t,{offsetLine:1});if(i){let{column:n,line:r}=i;try{({column:n,line:r}=function(e,t){const s=e.filter((e=>!!e.mappings));e:for(;s.length>0;){const e=s.pop().mappings[t.line-1];if(e){const s=e.filter((e=>e.length>1)),i=s[s.length-1];for(const e of s)if(e[0]>=t.column||e===i){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:n,line:r})),s=this.originalCode}catch(e){this.options.onLog(ve,function(e,t,s,i,n){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:s,file:t,line:i},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:n}}(e,this.id,n,r,t))}Xe(e,{column:n,line:r},s,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,s){const i=new Set,n=r=>{for(const o of r)i.has(o)||(i.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||s.has(o))&&(o instanceof Zt||o.hasEffects()?e.add(o):n(o.dependencies)))};n(this.dependencies),n(s)}addSource(e,t){const s=(i=t.assertions,i?.length?Object.fromEntries(i.map((e=>[yo(e),e.value.value]))):fe);var i;const n=this.sourcesWithAssertions.get(e);n?xo(n,s)&&this.log(ve,Mt(n,s,e,this.id),t.start):this.sourcesWithAssertions.set(e,s)}getVariableFromNamespaceReexports(e,t,s){let i=null;const n=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Ro(o,e,t,!0,To(s));o instanceof Zt||l?r.add(a):a instanceof fo?i||(i=a):a&&n.set(a,o)}if(n.size>0){const t=[...n],s=t[0][0];return 1===t.length?[s]:(this.options.onLog(ve,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${T(a)}" re-exports "${o}" from one of the modules ${Re(l.map((e=>T(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],s=t[0];return t.length>1&&this.options.onLog(ve,function(e,t,s,i){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:i,message:`Ambiguous external namespace resolution: "${T(t)}" re-exports "${e}" from one of the external modules ${Re(i.map((e=>T(e))))}, guessing "${T(s)}".`,reexporter:t}}(e,this.id,s.module.id,t.map((e=>e.module.id)))),[s,!0]}return i?[i]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const s of[this,...this.exportAllModules])if(s instanceof Zt){const[t]=s.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(s.info.syntheticNamedExports){const e=s.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof Do){t.includedDynamicImporters.push(this);const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?t.includeExportsByNames(s):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof Do&&t!==this&&Oo(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof Do&&(t.isExecuted||No(t),t!==this)){const t=Oo(e,this);for(const e of t)e.isExecuted||No(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,s;this.options.onLog(ve,(t=this.id,{binding:s=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${s}" has been shimmed in module "${T(t)}".`})),this.exports.set(e,_o)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){return this.error(function(e,t){let s=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?s+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(s+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:"PARSE_ERROR",id:t,message:s}}(e,this.id),e.pos)}}}function Lo(e,t,s){if(e.module instanceof Do&&e.module!==s){const i=e.module.cycles;if(i.size>0){const n=s.cycles;for(const r of n)if(i.has(r)){t.alternativeReexportModules.set(e,s);break}}}}const To=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function Mo(e){return e.endsWith(".js")?e.slice(0,-3):e}function Vo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Mo(t)}`:e.id??""}function Bo(e,t,s,i,n,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:h,getPropertyAccess:u,n:d,s:p}=n;if(!s)return`${d}${d}${a}${function(e,t,s,i,n){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:h}of t)if(h)return zo(a,h[0].imported,l,o,e,c,s,r,i,n)}(e,t,i,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:n,isChunk:a,name:h,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&s)for(const t of g)if("*"!==t.reexported){const s=zo(h,t.imported,p,a,e,m,i,n,o,u);if(f&&(f+=d),"*"!==t.imported&&t.needsLiveBinding){const[e,i]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}'${t.reexported}',${l}{${d}${r}enumerable:${l}true,${d}${r}get:${l}${e}${s}${i}${d}});`}else f+=`exports${u(t.reexported)}${l}=${l}${s};`}for(const{exported:t,local:s}of e){const e=`exports${u(t)}`;e!==s&&(f&&(f+=d),f+=`${e}${l}=${l}${s};`)}for(const{name:e,reexports:i}of t)if(i&&s)for(const t of i)if("*"===t.reexported){f&&(f+=d);const s=`{${d}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${Uo(e,t.needsLiveBinding,r,n)}${p}${d}}`;f+=`Object.keys(${e}).forEach(${h(["k"],{isAsync:!1,name:null})}${s});`}return f?`${d}${d}${f}`:""}function zo(e,t,s,i,n,r,o,a,l,c){if("default"===t){if(!i){const t=o(a),s=yr[t]?n:e;return xr(t,l)?`${s}${c("default")}`:s}return s?`${e}${c("default")}`:e}return"*"===t?(i?!s:Er[o(a)])?r:e:`${e}${c(t)}`}function Fo(e){return e([["value","true"]],{lineBreakIndent:null})}function jo(e,t,s,{_:i,getObject:n}){if(e){if(t)return s?`Object.defineProperties(exports,${i}${n([["__esModule",Fo(n)],[null,`[Symbol.toStringTag]:${i}${Tr(n)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${i}'__esModule',${i}${Fo(n)});`;if(s)return`Object.defineProperty(exports,${i}Symbol.toStringTag,${i}${Tr(n)});`}return""}const Uo=(e,t,s,{_:i,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${i}k,${i}{${r}${s}${s}enumerable:${i}true,${r}${s}${s}get:${i}${t}${e}[k]${o}${r}${s}})`}return`exports[k]${i}=${i}${e}[k]`};function Go(e,t,s,i,n,r,o,a){const{_:l,cnst:c,n:h}=a,u=new Set,d=[],p=(e,t,s)=>{u.add(t),d.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${s});`)};for(const{defaultVariableName:s,imports:i,importPath:n,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...i||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,mr,o);break}}else{const e=t(n);let r=!1,a=!1;for(const{imported:t,reexported:n}of[...i||[],...c||[]]){let i,c;"default"===t?r||(r=!0,s!==l&&(c=s,i=yr[e])):"*"!==t||"*"===n||a||(a=!0,i=Er[e],c=l),i&&p(c,i,o)}}return`${vr(u,r,o,a,s,i,n)}${d.length>0?`${d.join(h)}${h}${h}`:""}`}function Wo(e,t){return"."!==e[0]?e:t?(s=e).endsWith(".js")?s:s+".js":Mo(e);var s}const qo=new Set([...t(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Ho(e,t){const s=t.map((({importPath:e})=>e)).filter((e=>qo.has(e)||e.startsWith("node:")));0!==s.length&&e(ve,function(e){return{code:Et,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Re(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(s))}const Ko=(e,t)=>e.split(".").map(t).join("");function Yo(e,t,s,i,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof s?s(o[0]):s[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${n}=${n}${l}${n}||${n}{}`))),`${l}${r(a)}`].join(`,${n}`)+`${n}=${n}${i}`;return o.length>0&&(c=`(${c})`),c}function Xo(e){let t=e.length;for(;t--;){const{imports:s,reexports:i}=e[t];if(s||i)return e.slice(0,t+1)}return[]}const Qo=({dependencies:e,exports:t})=>{const s=new Set(t.map((e=>e.exported)));s.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&s.add(e.reexported);return s},Zo=(e,t,{_:s,cnst:i,getObject:n,n:r})=>e?`${r}${t}${i} _starExcludes${s}=${s}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"",Jo=(e,t,{_:s,n:i})=>e.length>0?`${i}${t}var ${e.join(`,${s}`)};`:"",ea=(e,t,s)=>ta(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,s);function ta(e,t,{_:s,n:i}){return 0===e.length?"":1===e.length?`exports('${e[0].name}',${s}${e[0].value});${i}${i}`:`exports({${i}`+e.map((({name:e,value:i})=>`${t}${e}:${s}${i}`)).join(`,${i}`)+`${i}});${i}${i}`}const sa=(e,t,s)=>ta(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,s),ia=(e,t,s)=>ta(e.filter((e=>e.local===ho)).map((e=>({name:e.exported,value:ho}))),t,s);function na(e,t,s){return e?`${t}${Ko(e,s)}`:"null"}var ra={amd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:h,namedExportsMode:u,log:d,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:x,interop:E,namespaceToStringTag:b,strict:v}){Ho(d,s);const S=s.map((e=>`'${Wo(e.importPath,m.forceJsExtensionForImports)}'`)),A=s.map((e=>e.name)),{n:k,getNonArrowFunctionIntro:I,_:w}=f;u&&r&&(A.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(A.unshift("require"),S.unshift("'require'")),t.has("module")&&(A.unshift("module"),S.unshift("'module'"));const P=Vo(m,o),C=(P?`'${P}',${w}`:"")+(S.length>0?`[${S.join(`,${w}`)}],${w}`:""),$=v?`${w}'use strict';`:"";e.prepend(`${l}${Go(s,E,y,x,b,t,a,f)}`);const N=Bo(i,s,u,E,f,a,y);let _=jo(u&&r,c&&(!0===g||"if-default-prop"===g&&n),h&&b,f);_&&(_=k+k+_),e.append(`${N}${_}${p}`).indent(a).prepend(`${m.define}(${C}(${I(A,{isAsync:!1,name:null})}{${$}${k}${k}`).append(`${k}${k}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:h,outro:u,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:x,strict:E}){const{_:b,n:v}=d,S=E?`'use strict';${v}${v}`:"";let A=jo(h&&r,l&&(!0===f||"if-default-prop"===f&&n),c&&x,d);A&&(A+=v+v);const k=function(e,{_:t,cnst:s,n:i},n){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:h}of e)c||h?(r+=n&&o?",":`${r?`;${i}`:""}${s} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=n&&!o?",":`;${i}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${i}${i}`;return""}(s,d,p),I=Go(s,y,m,g,x,t,o,d);e.prepend(`${S}${a}${A}${k}${I}`);const w=Bo(i,s,h,y,d,o,m,`module.exports${b}=${b}`);e.append(`${w}${u}`)},es:function(e,{accessedGlobals:t,indent:s,intro:i,outro:n,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,namespaceToStringTag:h}){const{n:u}=a,d=function(e,{_:t}){const s=[];for(const{importPath:i,reexports:n,imports:r,name:o,assertions:a}of e){const e=`'${i}'${a?`${t}assert${t}${a}`:""};`;if(n||r){if(r){let i=null,n=null;const o=[];for(const e of r)"default"===e.imported?i=e:"*"===e.imported?n=e:o.push(e);n&&s.push(`import${t}*${t}as ${n.local} from${t}${e}`),i&&0===o.length?s.push(`import ${i.local} from${t}${e}`):o.length>0&&s.push(`import ${i?`${i.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(n){let i=null;const a=[],l=[];for(const e of n)"*"===e.reexported?i=e:"*"===e.imported?a.push(e):l.push(e);if(i&&s.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||s.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)s.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}l.length>0&&s.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else s.push(`import${t}${e}`)}return s}(r,a);d.length>0&&(i+=d.join(u)+u+u),(i+=vr(null,t,s,a,l,c,h))&&e.prepend(i);const p=function(e,{_:t,cnst:s}){const i=[],n=[];for(const r of e)r.expression&&i.push(`${s} ${r.local}${t}=${t}${r.expression};`),n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`);n.length>0&&i.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`);return i}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),n&&e.append(n),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:h,snippets:u},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:x,name:E,namespaceToStringTag:b,strict:v}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:k,n:I}=u,w=E&&E.includes("."),P=!f&&!w;if(E&&P&&(Ee(C=E)||xe.test(C)))return Ye(function(e){return{code:at,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Oe(Be)}}(E));var C;Ho(c,s);const $=Xo(s),N=$.map((e=>e.globalName||"null")),_=$.map((e=>e.name));r&&!E&&c(ve,{code:xt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Oe(qe)}),l&&r&&(f?(N.unshift(`this${Ko(E,k)}${S}=${S}this${Ko(E,k)}${S}||${S}{}`),_.unshift("exports")):(N.unshift("{}"),_.unshift("exports")));const R=v?`${o}'use strict';${I}`:"",O=Go(s,x,g,m,b,t,o,u);e.prepend(`${a}${O}`);let D=`(${A(_,{isAsync:!1,name:null})}{${I}${R}${I}`;r&&(!E||f&&l||(D=(P?`var ${E}`:`this${Ko(E,k)}`)+`${S}=${S}${D}`),w&&(D=function(e,t,s,{_:i,getPropertyAccess:n,s:r},o){const a=e.split(".");a[0]=("function"==typeof s?s(a[0]):s[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=n(e),`${l}${i}=${i}${l}${i}||${i}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,d)+D));let L=`${I}${I}})(${N.join(`,${S}`)});`;r&&!f&&l&&(L=`${I}${I}${o}return exports;${L}`);const T=Bo(i,s,l,x,u,o,g);let M=jo(l&&r,!0===p||"if-default-prop"===p&&n,b,u);M&&(M=I+I+M),e.append(`${T}${M}${h}`).indent(o).prepend(D).append(L)},system:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasExports:n,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:h,freeze:u,name:d,namespaceToStringTag:p,strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:x,n:E,s:b}=a,{importBindings:v,setters:S,starExcludes:A}=function(e,t,s,{_:i,cnst:n,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let h=null;for(const{imports:u,reexports:d}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${i}=${i}module;`):p.push(`${e.local}${i}=${i}module${o(e.imported)};`);if(d){const a=[];let l=!1;for(const{imported:e,reexported:t}of d)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l){const o=r(a,{lineBreakIndent:null});l?(h||(h=Qo({dependencies:e,exports:t})),p.push(`${n} setter${i}=${i}${o};`,`for${i}(${n} name in module)${i}{`,`${s}if${i}(!_starExcludes[name])${i}setter[name]${i}=${i}module[name];`,"}","exports(setter);")):p.push(`exports(${o});`)}else{const[e,t]=a[0];p.push(`exports('${e}',${i}${t});`)}}c.push(p.join(`${a}${s}${s}${s}`))}return{importBindings:l,setters:c,starExcludes:h}}(s,i,r,a),k=d?`'${d}',${g}`:"",I=t.has("module")?["exports","module"]:n?["exports"]:[];let w=`System.register(${k}[`+s.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${x(I,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Zo(A,r,a)+Jo(v,r,a)+`${E}${r}return${g}{${S.length>0?`${E}${r}${r}setters:${g}[${S.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;w+=`${r}${r}execute:${g}(${x([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${b}${E}}));`;e.prepend(o+vr(null,t,r,a,h,u,p)+ea(i,r,a)).append(`${l}${E}${E}`+sa(i,r,a)+ia(i,r,a)).indent(`${r}${r}${r}`).append(P).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:h,outro:u,snippets:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:x,interop:E,name:b,namespaceToStringTag:v,globals:S,noConflict:A,strict:k}){const{_:I,cnst:w,getFunctionIntro:P,getNonArrowFunctionIntro:C,getPropertyAccess:$,n:N,s:_}=d,R=f?"f":"factory",O=f?"g":"global";if(r&&!b)return Ye({code:xt,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Oe(qe)});Ho(h,s);const D=s.map((e=>`'${Wo(e.importPath,p.forceJsExtensionForImports)}'`)),L=s.map((e=>`require('${e.importPath}')`)),T=Xo(s),M=T.map((e=>na(e.globalName,O,$))),V=T.map((e=>e.name));c&&(r||A)&&(D.unshift("'exports'"),L.unshift("exports"),M.unshift(Yo(b,O,S,(g?`${na(b,O,$)}${I}||${I}`:"")+"{}",d)),V.unshift("exports"));const B=Vo(p,o),z=(B?`'${B}',${I}`:"")+(D.length>0?`[${D.join(`,${I}`)}],${I}`:""),F=p.define,j=!c&&r?`module.exports${I}=${I}`:"",U=k?`${I}'use strict';${N}`:"";let G;if(A){const e=f?"e":"exports";let t;if(!c&&r)t=`${w} ${e}${I}=${I}${Yo(b,O,S,`${R}(${M.join(`,${I}`)})`,d)};`;else{t=`${w} ${e}${I}=${I}${M.shift()};${N}${a}${a}${R}(${[e,...M].join(`,${I}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${N}${a}${a}${w} current${I}=${I}${function(e,t,{_:s,getPropertyAccess:i}){let n=t;return e.split(".").map((e=>n+=i(e))).join(`${s}&&${s}`)}(b,O,d)};${N}${a}${a}${t}${N}${a}${a}${e}.noConflict${I}=${I}${P([],{isAsync:!1,name:null})}{${I}${na(b,O,$)}${I}=${I}current;${I}return ${e}${_}${I}};${N}${a}})()`}else G=`${R}(${M.join(`,${I}`)})`,!c&&r&&(G=Yo(b,O,S,G,d));const W=r||A&&c||M.length>0,q=[R];W&&q.unshift(O);const H=W?`this,${I}`:"",K=W?`(${O}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${O}${I}||${I}self,${I}`:"",Y=W?")":"",X=W?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${j}${R}(${L.join(`,${I}`)})${I}:${N}`:"",Q=`(${C(q,{isAsync:!1,name:null})}{${N}`+X+`${a}typeof ${F}${I}===${I}'function'${I}&&${I}${F}.amd${I}?${I}${F}(${z}${R})${I}:${N}`+`${a}${K}${G}${Y};${N}`+`})(${H}(${C(V,{isAsync:!1,name:null})}{${U}${N}`,Z=N+N+"}));";e.prepend(`${l}${Go(s,E,y,x,v,t,a,d)}`);const J=Bo(i,s,c,E,d,a,y);let ee=jo(c&&r,!0===m||"if-default-prop"===m&&n,v,d);ee&&(ee=N+N+ee),e.append(`${J}${ee}${u}`).trim().indent(a).append(Z).prepend(Q)}};const oa=(e,t)=>t?`${e}\n${t}`:e,aa=(e,t)=>t?`${e}\n\n${t}`:e;async function la(e,t,s){try{let[i,n,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(s),[s],oa),t.hookReduceValue("footer",e.footer(s),[s],oa),t.hookReduceValue("intro",e.intro(s),[s],aa),t.hookReduceValue("outro",e.outro(s),[s],aa)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),i&&(i+="\n"),n&&(n="\n"+n),{banner:i,footer:n,intro:r,outro:o}}catch(e){return Ye((i=e.message,n=e.hook,r=e.plugin,{code:Qe,message:`Could not retrieve "${n}". Check configuration of plugin "${r}".\n\tError Message: ${i}`}))}var i,n,r}const ca={amd:da,cjs:da,es:ua,iife:da,system:ua,umd:da};function ha(e,t,s,i,n,r,o,a,l,c,h,u,d,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(i,n,u,d);!function(e,t,s){for(const i of t){for(const t of i.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof ro&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Li(t.name,e,t.forbiddenNames));if(s.has(i)){const t=i.namespace;t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}}}(i,f,p),ca[n](i,s,t,r,o,a,l,c,h);for(const e of f)e.scope.deconflict(n,u,d)}function ua(e,t,s,i,n,r,o,a,l){for(const t of s.dependencies)(n||t instanceof z)&&(t.variableName=Li(t.suggestedVariableName,e,null));for(const s of t){const t=s.module,i=s.name;s.isNamespace&&(n||t instanceof Zt)?s.setRenderNames(null,(t instanceof Zt?a.get(t):o.get(t)).variableName):t instanceof Zt&&"default"===i?s.setRenderNames(null,Li([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,s.forbiddenNames)):s.setRenderNames(null,Li(i,e,s.forbiddenNames))}for(const t of l)t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}function da(e,t,{deconflictedDefault:s,deconflictedNamespace:i,dependencies:n},r,o,a,l,c){for(const t of n)t.variableName=Li(t.suggestedVariableName,e,null);for(const t of i)t.namespaceVariableName=Li(`${t.suggestedVariableName}__namespace`,e,null);for(const t of s)t.defaultVariableName=i.has(t)&&br(r(t.id),a)?t.namespaceVariableName:Li(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Zt){const s=c.get(t),i=e.name;if("default"===i){const i=r(t.id),n=yr[i]?s.defaultVariableName:s.variableName;xr(i,a)?e.setRenderNames(n,"default"):e.setRenderNames(null,n)}else"*"===i?e.setRenderNames(null,Er[r(t.id)]?s.namespaceVariableName:s.variableName):e.setRenderNames(s.variableName,null)}else{const s=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===s.exportMode?s.namespaceVariableName:s.variableName):"default"===s.exportMode?e.setRenderNames(null,s.variableName):e.setRenderNames(s.variableName,s.getVariableExportName(e))}}}function pa(e,{exports:t,name:s,format:i},n,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Ye(Bt("default",o,n))}else if("none"===t&&o.length>0)return Ye(Bt("none",o,n));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==i&&"system"!==i&&o.includes("default")&&r(ve,function(e,t){return{code:vt,id:e,message:`Entry module "${T(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Oe(Ve)}}(n,s)),t="named")),t}function fa(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return" ".repeat(n)}function ma(e,t,s,i,n,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Zt){t.push(r.get(e));continue}const o=n.get(e);o===i?s.has(e)||(s.add(e),ma(e,t,s,i,n,r)):t.push(o)}}const ga="!~{",ya="}~",xa=new RegExp(`${ga}[0-9a-zA-Z_$]{1,59}${ya}`,"g"),Ea=(e,t)=>e.replace(xa,(e=>t.get(e)||e)),ba=(e,t,s)=>e.replace(xa,(e=>e===t?s:e)),va=(e,t)=>{const s=new Set,i=e.replace(xa,(e=>t.has(e)?(s.add(e),`${ga}${"0".repeat(e.length-5)}${ya}`):e));return{containedPlaceholders:s,transformedCode:i}},Sa=Symbol("bundleKeys"),Aa={type:"placeholder"};function ka(e,t,s){return M(e)?Ye(Yt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,i,n)=>{if(!s.hasOwnProperty(i)||n&&"hash"!==i)return Ye(Yt(`"[${i}${n||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=s[i](n&&Number.parseInt(n.slice(1)));return M(r)?Ye(Yt(`Invalid substitution "${r}" for placeholder "[${i}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Ia(e,{[Sa]:t}){if(!t.has(e.toLowerCase()))return e;const s=C(e);e=e.slice(0,Math.max(0,e.length-s.length));let i,n=1;for(;t.has((i=e+ ++n+s).toLowerCase()););return i}const wa=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Pa(e,t,s,i){const n="function"==typeof t?t(e.id):t[e.id];return n||(s?(i(ve,(r=e.id,o=e.variableName,{code:gt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:Oe(je)})),e.variableName):void 0);var r,o}class Ca{constructor(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=s,this.unsetOptions=i,this.pluginDriver=n,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=h,this.getPlaceholder=u,this.bundle=d,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!s.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||s.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=be(this.generateVariableName())}static generateFacade(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){const m=new Ca([],e,t,s,i,n,r,o,a,l,null,u,d,p,f);m.assignFacadeName(h,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof Do?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const s=e.getExportNamesByVariable();for(const e of this.exports)if(!s.has(e))return!1;for(const i of t)if(!(i.module===e||s.has(i)||i instanceof fo&&s.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,s){const i=this.getRenderedChunkInfo(),n=e=>Ea(e,s),r=this.fileName=n(i.fileName);return{...i,code:e,dynamicImports:i.dynamicImports.map(n),fileName:r,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(n),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[n(e),t]))),imports:i.imports.map(n),map:t,referencedFiles:i.referencedFiles.map(n)}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[s,i]of t){this.exportNamesByVariable.set(s,[...i]);for(const e of i)this.exportsByName.set(e,s);e.delete(s)}}this.outputOptions.minifyInternalExports?function(e,t,s){let i=0;for(const n of e){let[e]=n.name;if(t.has(e))do{e=Di(++i),49===e.charCodeAt(0)&&(i+=9*64**(e.length-1),e=Di(i))}while(ye.has(e)||t.has(e));t.set(e,n),s.set(n,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,s){for(const i of e){let e=0,n=i.name;for(;t.has(n);)n=i.name+"$"+ ++e;t.set(n,i),s.set(i,[n])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=pa(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&s.add(t);for(const i of t){const t=Array.from(new Set(i.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&i.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(i.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===i.preserveSignature||"exports-only"===i.preserveSignature&&i.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(i,s)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),i,this.outputOptions.preserveModules))}for(const s of t)e.push(Ca.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,s,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,s)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=$a(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,s)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return D(B(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:s,entryFileNames:i,file:n,format:r,preserveModules:o}=this.outputOptions;if(n)e=w(n);else if(null===this.fileName){const[n,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=ka("function"==typeof n?n(this.getPreRenderedChunkInfo()):n,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=Ia(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Aa),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Oa),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Oa),importedBindings:_a(this.getRenderedDependencies(),Oa),imports:Array.from(this.dependencies,Oa),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof po?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,s,i){const n=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];ma(a,t,r,e,s,i),n.unshift(t)}}const o=new Set;for(const e of n)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:s,inputOptions:{onLog:i},outputOptions:n,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=n;if(l&&!c&&null!==s)for(const t of e)t instanceof Ca&&this.inlineChunkDependencies(t);const h=this.getPreliminaryFileName(),{accessedGlobals:u,indent:d,magicString:p,renderedSource:f,usedModules:m,usesTopLevelAwait:g}=this.renderModules(h.fileName),y=[...this.getRenderedDependencies().values()],x="none"===t?[]:this.getChunkExportDeclarations(a);let E=x.length>0,b=!1;for(const e of y){const{reexports:t}=e;t?.length&&(E=!0,!b&&t.some((e=>"default"===e.reexported))&&(b=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!x.find((({exported:t})=>t===e))))))}if(!b)for(const{exported:e}of x)if("default"===e){b=!0;break}const{intro:v,outro:S,banner:A,footer:k}=await la(n,r,this.getRenderedChunkInfo());return ra[a](f,{accessedGlobals:u,dependencies:y,exports:x,hasDefaultExport:b,hasExports:E,id:h.fileName,indent:d,intro:v,isEntryFacade:c||null!==s&&s.info.isEntry,isModuleFacade:null!==s,log:i,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:g},n),A&&p.prepend(A),k&&p.append(k),{chunk:this,magicString:p,preliminaryFileName:h,usedModules:m}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:s}=this;for(const i of e.implicitlyLoadedBefore){const e=t.get(i);e&&e!==this&&s.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},s,i){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(i?this.getPreserveModulesChunkNameFromModule(s):$a(s)))}checkCircularDependencyImport(e,t){const s=e.module;if(s instanceof Do){const l=this.chunkByModule.get(s);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(ve,(i=s.getExportNamesByVariable().get(e)?.[0]||"*",n=s.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:n,id:o,message:`Export "${i}" of module "${T(n)}" was reexported through module "${T(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${T(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var i,n,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],s=e.getExportNamesByVariable();for(const i of s.keys()){const s=i instanceof fo,n=s?i.getBaseVariable():i;if(this.checkCircularDependencyImport(n,e),!(n instanceof po&&this.outputOptions.preserveModules)){const e=n.module;if(e instanceof Do){const i=this.chunkByModule.get(e);i&&i!==this&&(i.exports.add(n),t.push(n),s&&this.imports.add(n))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?$a(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const s of this.getExportNames()){if("*"===s[0])continue;const i=this.exportsByName.get(s);if(!(i instanceof fo)){const t=i.module;if(t){const i=this.chunkByModule.get(t);if(i!==this){if(!i||"es"!==e)continue;const t=this.renderedDependencies.get(i);if(!t)continue;const{imports:n,reexports:r}=t,o=r?.find((({reexported:e})=>e===s)),a=n?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let n=null,r=!1,o=i.getName(this.snippets.getPropertyAccess);if(i instanceof wi){for(const e of i.declarations)if(e.parent instanceof tr||e instanceof sr&&e.declaration instanceof tr){r=!0;break}}else i instanceof fo&&(n=o,"es"===e&&(o=i.renderName));t.push({exported:s,expression:n,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,s){const i=new Set,n=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Zt){const a=this.externalChunkByModule.get(o);i.add(a),e&&("default"===t.name?yr[s(o.id)]&&n.add(a):"*"===t.name&&Er[s(o.id)]&&r.add(a))}else{const s=this.chunkByModule.get(o);s!==this&&(i.add(s),e&&"default"===s.exportMode&&t.isNamespace&&r.add(s))}}if(t)for(const e of this.dependencies)i.add(e);return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof Ca||e instanceof z)))}getDynamicImportStringAndAssertions(e,t){if(e instanceof Zt){const s=this.externalChunkByModule.get(e);return[`'${s.getImportPath(t)}'`,s.getImportAssertions(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?L(this.fileName):L(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const s of this.imports){const i=s.module;let n,r;if(i instanceof Zt){if(n=this.externalChunkByModule.get(i),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(i.id))return Ye(qt(i.id,r,!1))}else n=this.chunkByModule.get(i),r=n.getVariableExportName(s);F(t,n,U).push({imported:r,local:s.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:s,resolution:i}of t.dynamicImports)s.included&&e.push(i instanceof Do?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:s,resolution:i}:i instanceof Zt?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:s,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:i});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:s,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:i.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=Na(e);if(t)return t;const{preserveModulesRoot:s,sanitizeFileName:i}=this.outputOptions,n=i(I(e.id.split(Ra,1)[0])),r=C(n),o=wa.has(r)?n.slice(0,-r.length):n;return A(o)?s&&N(o).startsWith(s)?o.slice(s.length).replace(/^[/\\]/,""):$(this.inputBase,o):`_virtual/${w(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,s=new Map;for(let i of this.getExportNames()){let n,r,o=!1;if("*"===i[0]){const s=i.slice(1);"defaultOnly"===t(s)&&this.inputOptions.onLog(ve,Ht(s)),o=e,n=this.externalChunkByModule.get(this.modulesById.get(s)),r=i="*"}else{const s=this.exportsByName.get(i);if(s instanceof fo)continue;const a=s.module;if(a instanceof Do){if(n=this.chunkByModule.get(a),n===this)continue;r=n.getVariableExportName(s),o=s.isReassigned}else{if(n=this.externalChunkByModule.get(a),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Ye(qt(a.id,r,!0));o=e&&("default"!==r||xr(t(a.id),!0))}}F(s,n,U).push({imported:r,needsLiveBinding:o,reexported:i})}return s}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const s of t.importMetas){const t=s.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),s=new Map,i=this.getFileName();for(const n of this.dependencies){const r=e.get(n)||null,o=t.get(n)||null,a=n instanceof z||"default"!==n.exportMode,l=n.getImportPath(i);s.set(n,{assertions:n instanceof z?n.getImportAssertions(this.snippets):null,defaultVariableName:n.defaultVariableName,globalName:n instanceof z&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Pa(n,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:n instanceof Ca,name:n.variableName,namedExportsMode:a,namespaceVariableName:n.namespaceVariableName,reexports:o})}return this.renderedDependencies=s}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Ca&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:s,exportNamesByVariable:i,includedNamespaces:n,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:h,pluginDriver:f,renderedModules:m,snippets:x}=this,{compact:E,dynamicImportFunction:b,format:v,freeze:S,namespaceToStringTag:A}=h,{_:k,cnst:I,n:w}=x;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof g)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!u(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{y.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(y.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new g(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let s;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const i=new p(e.hires);return this.intro&&i.advance(this.intro),this.sources.forEach(((e,n)=>{n>0&&i.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=d(o.original);o.intro&&i.advance(o.intro),o.firstChunk.eachNext((s=>{const n=a(s.start);s.intro.length&&i.advance(s.intro),e.filename?s.edited?i.addEdit(r,s.content,n,s.storeName?t.indexOf(s.original):-1):i.addUneditedChunk(r,s,o.original,n,o.sourcemapLocations):i.advance(s.content),s.outro.length&&i.advance(s.outro)})),o.outro&&i.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===s&&(s=[]),s.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?c(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw,x_google_ignoreList:s}}generateMap(e){return new l(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const s=t.content._getRawIndentString();null!==s&&(e[s]||(e[s]=0),e[s]+=1)})),Object.keys(e).sort(((t,s)=>e[t]-e[s]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((s,i)=>{const n=void 0!==s.separator?s.separator:this.separator,r=t||i>0&&/\r?\n$/.test(n);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:r}),t="\n"===s.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,s)=>s>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const s=void 0!==e.separator?e.separator:this.separator;return(t>0?s:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e=>!e.content.isEmpty())))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,s=0;do{if(t=this.sources[s++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let s,i=this.sources.length-1;do{if(s=this.sources[i--],!s){this.intro=this.intro.replace(t,"");break}}while(!s.content.trimEndAborted(e));return this}}({separator:`${w}${w}`}),C=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=fa(t.originalCode);if(null!==e)return e}return"\t"}(a,h),$=[];let N="";const _=new Set,R=new Map,O={dynamicImportFunction:b,exportNamesByVariable:i,format:v,freeze:S,indent:C,namespaceToStringTag:A,pluginDriver:f,snippets:x,useOriginalName:null};let D=!1;for(const e of a){let s,i=0;if(e.isIncluded()||n.has(e)){const r=e.render(O);({source:s}=r),D||(D=r.usesTopLevelAwait),i=s.length(),i&&(E&&s.lastLine().includes("//")&&s.append("\n"),R.set(e,s),P.addSource(s),$.push(e));const o=e.namespace;if(n.has(e)){const e=o.renderBlock(O);o.renderFirst()?N+=w+e:P.addSource(new g(e))}const a=t.get(e.scope);if(a)for(const e of a)_.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();m[e.id]={get code(){return s?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:i}}N&&P.prepend(N+w+w),this.needsExportsShim&&P.prepend(`${w}${I} ${ho}${k}=${k}void 0;${w}${w}`);const L=E?P:P.trim();var T;return o&&0===this.getExportNames().length&&0===s.size&&r(ve,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${T=this.getChunkName()}".`,names:[T]}),{accessedGlobals:_,indent:C,magicString:P,renderedSource:L,usedModules:$,usesTopLevelAwait:D}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:s,pluginDriver:i,snippets:n}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,s,n,i,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAssertions(a,e);o.setExternalResolution("external",a,s,n,i,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,interop:t,namespaceToStringTag:s,preserveModules:i,externalLiveBindings:n}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const s=this.exportsByName.get(t);"es"!==e&&"system"!==e&&s.isReassigned&&!s.isId?s.setRenderNames("exports",t):s instanceof fo?r.add(s):s.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(ho),s&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Lr)o.add(e)}ha(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,t),this.imports,o,e,t,i,n,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:s,orderedModules:i,outputOptions:{format:n}}=this;for(const r of i){for(const s of r.importMetas)s.setResolution(n,t,e);s.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const s=e.namespace.getMemberVariables();for(const e of Object.values(s))e.included&&t.add(e)}for(let s of t){s instanceof ro&&(s=s.getOriginalVariable()),s instanceof fo&&(s=s.getBaseVariable());const t=this.chunkByModule.get(s.module);t!==this&&(this.imports.add(s),s.module instanceof Do&&(this.checkCircularDependencyImport(s,e),s instanceof po&&this.outputOptions.preserveModules||t.exports.add(s)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:s}of e.dynamicImports)t.included&&s instanceof Do&&this.chunkByModule.get(s)===this&&!this.includedNamespaces.has(s)&&(this.includedNamespaces.add(s),this.ensureReexportsAreAvailableForModule(s))}}function $a(e){return Na(e)??L(e.id)}function Na(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function _a(e,t){const s={};for(const[i,n]of e){const e=new Set;if(n.imports)for(const{imported:t}of n.imports)e.add(t);if(n.reexports)for(const{imported:t}of n.reexports)e.add(t);s[t(i)]=[...e]}return s}const Ra=/[#?]/,Oa=e=>e.getFileName();function*Da(e){for(const t of e)yield*t}function La(e,t,s,i){const{chunkDefinitions:n,modulesInManualChunks:r}=function(e){const t=[],s=new Set(e.keys()),i=Object.create(null);for(const[t,n]of e)Ta(t,i[n]||(i[n]=[]),s);for(const[e,s]of Object.entries(i))t.push({alias:e,modules:s});return{chunkDefinitions:t,modulesInManualChunks:s}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,s=new Map,i=[],n=new Set(e);let r=0;for(const e of n){const o=new Set;i.push(o);const a=new Set([e]);for(const e of a){F(s,e,j).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof Zt||a.add(t);for(const{resolution:s}of e.dynamicImports)s instanceof Do&&s.includedDynamicImporters.length>0&&!n.has(s)&&(t.add(s),n.add(s),o.add(s));for(const s of e.implicitlyLoadedBefore)n.has(s)||(t.add(s),n.add(s))}r++}const o=[...n],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,s){const i=new Map,n=new Set;for(const[s,r]of e.entries())i.set(r,s),t.has(r)&&n.add(s);const r=[];for(const e of s){const t=new Set;for(const s of e)t.add(i.get(s));r.push(t)}return{dynamicEntries:n,dynamicImportsByEntry:r}}(o,t,i);return{allEntries:o,dependentEntriesByModule:s,dynamicallyDependentEntriesByDynamicEntry:Ma(s,a,o),dynamicImportsByEntry:l}}(e),h=Va(function*(e,t){for(const[s,i]of e)t.has(s)||(yield{dependentEntries:i,modules:[s]})}(a,r));return function(e,t,s,i){const n=i.map((()=>0n)),r=i.map(((e,s)=>t.has(s)?-1n:0n));let o=1n;for(const{dependentEntries:t}of e){for(const e of t)n[e]|=o;o<<=1n}const a=t;for(const[e,t]of a){a.delete(e);const i=r[e];let o=i;for(const e of t)o&=n[e]|r[e];if(o!==i){r[e]=o;for(const t of s[e])F(a,t,j).add(e)}}o=1n;for(const{dependentEntries:t}of e){for(const e of t)(r[e]&o)===o&&t.delete(e);o<<=1n}}(h,l,c,o),n.push(...function(e,t,s,i){wo("optimize chunks",3);const n=function(e,t,s){const i=[],n=[],r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:t,modules:c}of e){const e={containedAtoms:l,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:t,modules:c,pure:!0,size:0};let h=0,u=!0;for(const t of c)r.set(t,e),t.isIncluded()&&(u&&(u=!t.hasEffects()),h+=s>1?t.estimateSize():1);e.pure=u,e.size=h,o.push(h),u||(a|=l),(h{const e=i;return i<<=1n,r|=e,e})));else{const i=t.get(a);i&&i!==e&&(s.add(i),i.dependentChunks.add(e))}const{containedAtoms:c}=e;for(const e of a)o[e]|=c}}for(const t of e)for(const e of t){const{dependentEntries:t}=e;e.correlatedAtoms=-1n;for(const s of t)e.correlatedAtoms&=o[s]}return r}([n,i],r,t,l),{big:new Set(n),sideEffectAtoms:a,sizeByAtom:o,small:new Set(i)}}(e,t,s);if(!n)return Po("optimize chunks",3),e;return s>1&&i("info",Ut(e.length,n.small.size,"Initially")),function(e,t){const{small:s}=e;for(const i of s){const n=Ba(i,e,t<=1?1:1/0);if(n){const{containedAtoms:r,correlatedAtoms:o,modules:a,pure:l,size:c}=i;s.delete(i),za(n,t,e).delete(n),n.modules.push(...a),n.size+=c,n.pure&&(n.pure=l);const{dependencies:h,dependentChunks:u,dependentEntries:d}=n;n.correlatedAtoms&=o,n.containedAtoms|=r;for(const e of i.dependentEntries)d.add(e);for(const e of i.dependencies)h.add(e),e.dependentChunks.delete(i),e.dependentChunks.add(n);for(const e of i.dependentChunks)u.add(e),e.dependencies.delete(i),e.dependencies.add(n);h.delete(n),u.delete(n),za(n,t,e).add(n)}}}(n,s),s>1&&i("info",Ut(n.small.size+n.big.size,n.small.size,"After merging chunks")),Po("optimize chunks",3),[...n.small,...n.big]}(Va(h),o.length,s,i).map((({modules:e})=>({alias:null,modules:e})))),n}function Ta(e,t,s){const i=new Set([e]);for(const e of i){s.add(e),t.push(e);for(const t of e.dependencies)t instanceof Zt||s.has(t)||i.add(t)}}function Ma(e,t,s){const i=new Map;for(const n of t){const t=F(i,n,j),r=s[n];for(const s of Da([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const i of e.get(s))t.add(i)}return i}function Va(e){var t;const s=Object.create(null);for(const{dependentEntries:i,modules:n}of e){let e=0n;for(const t of i)e|=1n<=t)return 1/0;return i}(o&~r,s,n)}const Ga=(e,t)=>e.execIndex>t.execIndex?1:-1;function Wa(e,t,s){const i=Symbol(e.id),n=[e.id];let r=t;for(e.cycles.add(i);r!==e;)r.cycles.add(i),n.push(r.id),r=s.get(r);return n.push(n[0]),n.reverse(),n}const qa=(e,t)=>t?`(${e})`:e,Ha=/^(?!\d)[\w$]+$/;class Ka{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,s){return{column:t,line:e,name:s,source:this}}}class Ya{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,s=[],i=[],n=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:h,source:{content:u,filename:d}}=l;let p=t.get(d);if(void 0===p)p=e.length,e.push(d),t.set(d,p),s[p]=u;else if(null==s[p])s[p]=u;else if(null!=u&&s[p]!==u)return Ye(Wt(d));const f=[r[0],p,c,o];if(h){let e=n.get(h);void 0===e&&(e=i.length,i.push(h),n.set(h,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:i,sources:e,sourcesContent:s}}traceSegment(e,t,s){const i=this.mappings[e];if(!i)return null;let n=0,r=i.length-1;for(;n<=r;){const e=n+r>>1,o=i[e];if(o[0]===t||n===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:s):null}o[0]>t?r=e-1:n=e+1}return null}}function Xa(e){return function(t,s){return s.mappings?new Ya(s,[t]):(e(ve,(i=s.plugin,{code:It,message:`Sourcemap is likely to be incorrect: a plugin (${i}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:i,url:Oe(Le)})),new Ya({mappings:[],names:[]},[t]));var i}}function Qa(e,t,s,i,n){let r;if(s){const t=s.sources,i=s.sourcesContent||[],n=P(e)||".",o=s.sourceRoot||".",a=t.map(((e,t)=>new Ka(N(n,o,e),i[t])));r=new Ya(s,a)}else r=new Ka(e,t);return i.reduce(n,r)}var Za={},Ja=el;function el(e,t){if(!e)throw new Error(t||"Assertion failed")}el.equal=function(e,t,s){if(e!=t)throw new Error(s||"Assertion failed: "+e+" != "+t)};var tl={exports:{}};"function"==typeof Object.create?tl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:tl.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var sl=tl.exports,il=Ja,nl=sl;function rl(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function ol(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function al(e){return 1===e.length?"0"+e:e}function ll(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Za.inherits=nl,Za.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var s=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,s[i++]=63&r|128):rl(e,n)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n)),s[i++]=r>>18|240,s[i++]=r>>12&63|128,s[i++]=r>>6&63|128,s[i++]=63&r|128):(s[i++]=r>>12|224,s[i++]=r>>6&63|128,s[i++]=63&r|128)}else for(n=0;n>>0}return r},Za.split32=function(e,t){for(var s=new Array(4*e.length),i=0,n=0;i>>24,s[n+1]=r>>>16&255,s[n+2]=r>>>8&255,s[n+3]=255&r):(s[n+3]=r>>>24,s[n+2]=r>>>16&255,s[n+1]=r>>>8&255,s[n]=255&r)}return s},Za.rotr32=function(e,t){return e>>>t|e<<32-t},Za.rotl32=function(e,t){return e<>>32-t},Za.sum32=function(e,t){return e+t>>>0},Za.sum32_3=function(e,t,s){return e+t+s>>>0},Za.sum32_4=function(e,t,s,i){return e+t+s+i>>>0},Za.sum32_5=function(e,t,s,i,n){return e+t+s+i+n>>>0},Za.sum64=function(e,t,s,i){var n=e[t],r=i+e[t+1]>>>0,o=(r>>0,e[t+1]=r},Za.sum64_hi=function(e,t,s,i){return(t+i>>>0>>0},Za.sum64_lo=function(e,t,s,i){return t+i>>>0},Za.sum64_4_hi=function(e,t,s,i,n,r,o,a){var l=0,c=t;return l+=(c=c+i>>>0)>>0)>>0)>>0},Za.sum64_4_lo=function(e,t,s,i,n,r,o,a){return t+i+r+a>>>0},Za.sum64_5_hi=function(e,t,s,i,n,r,o,a,l,c){var h=0,u=t;return h+=(u=u+i>>>0)>>0)>>0)>>0)>>0},Za.sum64_5_lo=function(e,t,s,i,n,r,o,a,l,c){return t+i+r+a+c>>>0},Za.rotr64_hi=function(e,t,s){return(t<<32-s|e>>>s)>>>0},Za.rotr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0},Za.shr64_hi=function(e,t,s){return e>>>s},Za.shr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0};var cl={},hl=Za,ul=Ja;function dl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}cl.BlockHash=dl,dl.prototype.update=function(e,t){if(e=hl.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var s=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-s,e.length),0===this.pending.length&&(this.pending=null),e=hl.join32(e,0,e.length-s,this.endian);for(var i=0;i>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,r=8;r>>3},pl.g1_256=function(e){return fl(e,17)^fl(e,19)^e>>>10};var xl=Za,El=cl,bl=pl,vl=Ja,Sl=xl.sum32,Al=xl.sum32_4,kl=xl.sum32_5,Il=bl.ch32,wl=bl.maj32,Pl=bl.s0_256,Cl=bl.s1_256,$l=bl.g0_256,Nl=bl.g1_256,_l=El.BlockHash,Rl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ol(){if(!(this instanceof Ol))return new Ol;_l.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Rl,this.W=new Array(64)}xl.inherits(Ol,_l);var Dl=Ol;Ol.blockSize=512,Ol.outSize=256,Ol.hmacStrength=192,Ol.padLength=64,Ol.prototype._update=function(e,t){for(var s=this.W,i=0;i<16;i++)s[i]=e[t+i];for(;iLl();function Ml(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),""===e.mappings)return{mappings:[],names:[],sources:[],version:3};const t="string"==typeof e.mappings?i.decode(e.mappings):e.mappings;return{...e,mappings:t}}async function Vl(e,t,s,i,n){wo("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));Po("render chunks",2),wo("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{nonHashedChunksWithPlaceholders:a,renderedChunksByPlaceholder:l,hashDependenciesByPlaceholder:c}=await async function(e,t,s,i,n){const r=[],o=new Map,a=new Map,l=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&l.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:c,hashPlaceholder:h},magicString:u,usedModules:d})=>{const p={chunk:e,fileName:c,...await Bl(u,c,d,t,s,i,n)},{code:f}=p;if(h){const{containedPlaceholders:t,transformedCode:s}=va(f,l),n=Tl().update(s),r=i.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&n.update(r),o.set(h,p),a.set(h,{containedPlaceholders:t,contentHash:n.digest("hex")})}else r.push(p)}))),{hashDependenciesByPlaceholder:a,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,i,s,n),h=function(e,t,s){const i=new Map;for(const[n,{fileName:r}]of e){let e=Tl();const o=new Set([n]);for(const s of o){const{containedPlaceholders:i,contentHash:n}=t.get(s);e.update(n);for(const e of i)o.add(e)}let a,l;do{l&&(e=Tl().update(l)),l=e.digest("hex").slice(0,n.length),a=ba(r,n,l)}while(s[Sa].has(a.toLowerCase()));s[a]=Aa,i.set(n,l)}return i}(l,c,t);!function(e,t,s,i,n,r){for(const{chunk:i,code:o,fileName:a,map:l}of e.values()){let e=Ea(o,t);const c=Ea(a,t);l&&(l.file=Ea(l.file,t),e+=zl(c,l,n,r)),s[c]=i.finalizeChunk(e,l,t)}for(const{chunk:e,code:o,fileName:a,map:l}of i){let i=t.size>0?Ea(o,t):o;l&&(i+=zl(a,l,n,r)),s[a]=e.finalizeChunk(i,l,t)}}(l,h,t,a,s,i),Po("transform chunks",2)}async function Bl(e,t,s,i,n,r,o){let a=null;const c=[];let h=await r.hookReduceArg0("renderChunk",[e.toString(),i[t],n,{chunks:i}],((e,t,s)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Ml(t.map);c.push(e||{missing:!0,plugin:s.name})}return t.code}));const{compact:u,dir:d,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:x}=n;if(u||"\n"===h[h.length-1]||(h+="\n"),f){let i;wo("sourcemaps",3),i=p?N(g||p):d?N(d,t):N(t);a=function(e,t,s,i,n,r){const o=Xa(r),a=s.filter((e=>!e.excludeFromSourcemap)).map((e=>Qa(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),c=new Ya(t,a),h=i.reduce(o,c);let{sources:u,sourcesContent:d,names:p,mappings:f}=h.traceMappings();if(e){const t=P(e);u=u.map((e=>$(t,e))),e=w(e)}return d=n?null:d,new l({file:e,mappings:f,names:p,sources:u,sourcesContent:d})}(i,e.generateDecodedMap({}),s,c,m,o);for(let e=0;e{const t=new Set;return new Proxy(e,{deleteProperty:(e,s)=>("string"==typeof s&&t.delete(s.toLowerCase()),Reflect.deleteProperty(e,s)),get:(e,s)=>s===Sa?t:Reflect.get(e,s),set:(e,s,i)=>("string"==typeof s&&t.add(s.toLowerCase()),Reflect.set(e,s,i))})})(t);this.pluginDriver.setOutputBundle(s,this.outputOptions);try{wo("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Po("initialize render",2),wo("generate chunks",2);const e=(()=>{let e=0;return(t,s=8)=>{if(s>64)return Ye(Yt(`Hashes cannot be longer than 64 characters, received ${s}. Check the "${t}" option.`));const i=`${ga}${Di(++e).padStart(s-5,"0")}${ya}`;return i.length>s?Ye(Yt(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${i.length}, received ${s}. Check the "${t}" option.`)):i}})(),t=await this.generateChunks(s,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Ye(zt("output.format",ze,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Ye(zt("output.file",Me,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return Ye(zt("output.sourcemapFile",He,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(ve,zt("output.amd.id",Te,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();Po("generate chunks",2),await Vl(t,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,s=Object.values(e);for(const e of s)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of s)if("chunk"===e.type)for(const s of e.referencedFiles)t.has(s)&&t.delete(s);for(const s of t)delete e[s]})(s),wo("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,s,e]),this.finaliseAssets(s),Po("generate bundle",2),Po("GENERATE",1),t}async addManualChunks(e){const t=new Map,s=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:i}of s)for(const s of i)jl(e,s,t);return t}assignManualChunks(e){const t=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values()){const n=e(i.id,s);if("string"==typeof n){if(!(i instanceof Do))return Ye(Kt(i.id));t.push([n,i])}}t.sort((([e],[t])=>e>t?1:e`${t?"async ":""}function${s?` ${s}`:""}${r}(${e.join(`,${r}`)})${r}`,h=t?(e,{isAsync:t,name:s})=>{const i=1===e.length;return`${s?`${l} ${s}${r}=${r}`:""}${t?`async${i?" ":r}`:""}${i?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:s,lineBreakIndent:i,name:n})=>[`${h(e,{isAsync:!1,name:n})}${t?i?`${o}${i.base}${i.t}`:"":`{${i?`${o}${i.base}${i.t}`:r}${s?"return ":""}`}`,t?`${n?";":""}${i?`${o}${i.base}`:""}`:`${a}${i?`${o}${i.base}`:r}}`],d=n?e=>Ha.test(e):e=>!ye.has(e)&&Ha.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,s,{needsArrowReturnParens:i,needsWrappedFunction:n})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${qa(`${r}${qa(s,t&&i)}${o}`,t||n)}(`},getFunctionIntro:h,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const s=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${s}${t}`;const n=!d(e);return e===t&&i&&!n?s+e:`${s}${n?`'${e}'`:e}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>d(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const s of e.values())s instanceof Do&&(s.isIncluded()||s.info.isEntry||s.includedDynamicImporters.length>0)&&t.push(s);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return P(e[0]);const t=e.slice(1).reduce(((e,t)=>{const s=t.split(/\/+|\\+/);let i;for(i=0;e[i]===s[i]&&i1?t.join("/"):"/"}(function(e,t){const s=[];for(const i of e)(i.info.isEntry||t)&&A(i.id)&&s.push(i.id);return s}(l,r)),h=function(e,t,s){const i=new Map;for(const n of e.values())n instanceof Zt&&i.set(n,new z(n,t,s));return i}(this.graph.modulesById,this.outputOptions,c),u=[],d=new Map;for(const{alias:n,modules:p}of i?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):La(this.graph.entryModules,o,s,this.inputOptions.onLog)){p.sort(Ga);const s=new Ca(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,d,h,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);u.push(s)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function jl(e,t,s){const i=s.get(t);if("string"==typeof i&&i!==e)return Ye((n=t.id,r=e,o=i,{code:lt,message:`Cannot assign "${T(n)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var n,r,o;s.set(t,e)}var Ul=[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,81,2,71,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,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Gl=[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,20,1,64,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,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,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,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,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],Wl="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ql={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"},Hl="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",Kl={5:Hl,"5module":Hl+" export import",6:Hl+" const class extends export import super"},Yl=/^in(stanceof)?$/,Xl=new RegExp("["+Wl+"]"),Ql=new RegExp("["+Wl+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Zl(e,t){for(var s=65536,i=0;ie)return!1;if((s+=t[i+1])>=e)return!0}return!1}function Jl(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Xl.test(String.fromCharCode(e)):!1!==t&&Zl(e,Gl)))}function ec(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ql.test(String.fromCharCode(e)):!1!==t&&(Zl(e,Gl)||Zl(e,Ul)))))}var tc=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function sc(e,t){return new tc(e,{beforeExpr:!0,binop:t})}var ic={beforeExpr:!0},nc={startsExpr:!0},rc={};function oc(e,t){return void 0===t&&(t={}),t.keyword=e,rc[e]=new tc(e,t)}var ac={num:new tc("num",nc),regexp:new tc("regexp",nc),string:new tc("string",nc),name:new tc("name",nc),privateId:new tc("privateId",nc),eof:new tc("eof"),bracketL:new tc("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tc("]"),braceL:new tc("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tc("}"),parenL:new tc("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tc(")"),comma:new tc(",",ic),semi:new tc(";",ic),colon:new tc(":",ic),dot:new tc("."),question:new tc("?",ic),questionDot:new tc("?."),arrow:new tc("=>",ic),template:new tc("template"),invalidTemplate:new tc("invalidTemplate"),ellipsis:new tc("...",ic),backQuote:new tc("`",nc),dollarBraceL:new tc("${",{beforeExpr:!0,startsExpr:!0}),eq:new tc("=",{beforeExpr:!0,isAssign:!0}),assign:new tc("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tc("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tc("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:sc("||",1),logicalAND:sc("&&",2),bitwiseOR:sc("|",3),bitwiseXOR:sc("^",4),bitwiseAND:sc("&",5),equality:sc("==/!=/===/!==",6),relational:sc("/<=/>=",7),bitShift:sc("<>/>>>",8),plusMin:new tc("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:sc("%",10),star:sc("*",10),slash:sc("/",10),starstar:new tc("**",{beforeExpr:!0}),coalesce:sc("??",1),_break:oc("break"),_case:oc("case",ic),_catch:oc("catch"),_continue:oc("continue"),_debugger:oc("debugger"),_default:oc("default",ic),_do:oc("do",{isLoop:!0,beforeExpr:!0}),_else:oc("else",ic),_finally:oc("finally"),_for:oc("for",{isLoop:!0}),_function:oc("function",nc),_if:oc("if"),_return:oc("return",ic),_switch:oc("switch"),_throw:oc("throw",ic),_try:oc("try"),_var:oc("var"),_const:oc("const"),_while:oc("while",{isLoop:!0}),_with:oc("with"),_new:oc("new",{beforeExpr:!0,startsExpr:!0}),_this:oc("this",nc),_super:oc("super",nc),_class:oc("class",nc),_extends:oc("extends",ic),_export:oc("export"),_import:oc("import",nc),_null:oc("null",nc),_true:oc("true",nc),_false:oc("false",nc),_in:oc("in",{beforeExpr:!0,binop:7}),_instanceof:oc("instanceof",{beforeExpr:!0,binop:7}),_typeof:oc("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:oc("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:oc("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lc=/\r\n?|\n|\u2028|\u2029/,cc=new RegExp(lc.source,"g");function hc(e){return 10===e||13===e||8232===e||8233===e}function uc(e,t,s){void 0===s&&(s=e.length);for(var i=t;i>10),56320+(1023&e)))}var vc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Sc=function(e,t){this.line=e,this.column=t};Sc.prototype.offset=function(e){return new Sc(this.line,this.column+e)};var Ac=function(e,t,s){this.start=t,this.end=s,null!==e.sourceFile&&(this.source=e.sourceFile)};function kc(e,t){for(var s=1,i=0;;){var n=uc(e,i,t);if(n<0)return new Sc(s,t-i);++s,i=n}}var Ic={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},wc=!1;function Pc(e){var t={};for(var s in Ic)t[s]=e&&yc(e,s)?e[s]:Ic[s];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!wc&&"object"==typeof console&&console.warn&&(wc=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),xc(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return xc(t.onComment)&&(t.onComment=function(e,t){return function(s,i,n,r,o,a){var l={type:s?"Block":"Line",value:i,start:n,end:r};e.locations&&(l.loc=new Ac(this,o,a)),e.ranges&&(l.range=[n,r]),t.push(l)}}(t,t.onComment)),t}var Cc=256;function $c(e,t){return 2|(e?4:0)|(t?8:0)}var Nc=function(e,t,s){this.options=e=Pc(e),this.sourceFile=e.sourceFile,this.keywords=Ec(Kl[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=ql[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=Ec(i);var n=(i?i+" ":"")+ql.strict;this.reservedWordsStrict=Ec(n),this.reservedWordsStrictBind=Ec(n+" "+ql.strictBind),this.input=String(t),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lc).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=ac.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},_c={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Nc.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},_c.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},_c.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_c.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_c.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Cc)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},_c.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(64&t)>0||s||this.options.allowSuperOutsideMethod},_c.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},_c.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},_c.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(258&t)>0||s},_c.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Cc)>0},Nc.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var s=this,i=0;i=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}e+=t[0].length,pc.lastIndex=e,e+=pc.exec(this.input)[0].length,";"===this.input[e]&&e++}},Rc.eat=function(e){return this.type===e&&(this.next(),!0)},Rc.isContextual=function(e){return this.type===ac.name&&this.value===e&&!this.containsEsc},Rc.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Rc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Rc.canInsertSemicolon=function(){return this.type===ac.eof||this.type===ac.braceR||lc.test(this.input.slice(this.lastTokEnd,this.start))},Rc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Rc.semicolon=function(){this.eat(ac.semi)||this.insertSemicolon()||this.unexpected()},Rc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Rc.expect=function(e){this.eat(e)||this.unexpected()},Rc.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Dc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Rc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},Rc.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,i=e.doubleProto;if(!t)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Rc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&i<56320)return!0;if(Jl(i,!0)){for(var n=s+1;ec(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!Yl.test(r))return!0}return!1},Lc.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;pc.lastIndex=this.pos;var e,t=pc.exec(this.input),s=this.pos+t[0].length;return!(lc.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(ec(e=this.input.charCodeAt(s+8))||e>55295&&e<56320))},Lc.parseStatement=function(e,t,s){var i,n=this.type,r=this.startNode();switch(this.isLet(e)&&(n=ac._var,i="let"),n){case ac._break:case ac._continue:return this.parseBreakContinueStatement(r,n.keyword);case ac._debugger:return this.parseDebuggerStatement(r);case ac._do:return this.parseDoStatement(r);case ac._for:return this.parseForStatement(r);case ac._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case ac._class:return e&&this.unexpected(),this.parseClass(r,!0);case ac._if:return this.parseIfStatement(r);case ac._return:return this.parseReturnStatement(r);case ac._switch:return this.parseSwitchStatement(r);case ac._throw:return this.parseThrowStatement(r);case ac._try:return this.parseTryStatement(r);case ac._const:case ac._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case ac._while:return this.parseWhileStatement(r);case ac._with:return this.parseWithStatement(r);case ac.braceL:return this.parseBlock(!0,r);case ac.semi:return this.parseEmptyStatement(r);case ac._export:case ac._import:if(this.options.ecmaVersion>10&&n===ac._import){pc.lastIndex=this.pos;var o=pc.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)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'")),n===ac._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var c=this.value,h=this.parseExpression();return n===ac.name&&"Identifier"===h.type&&this.eat(ac.colon)?this.parseLabeledStatement(r,c,h,e):this.parseExpressionStatement(r,h)}},Lc.parseBreakContinueStatement=function(e,t){var s="break"===t;this.next(),this.eat(ac.semi)||this.insertSemicolon()?e.label=null:this.type!==ac.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(ac.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Lc.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Tc),this.enterScope(0),this.expect(ac.parenL),this.type===ac.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===ac._var||this.type===ac._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===ac._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===ac._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var r=this.isContextual("let"),o=!1,a=new Dc,l=this.parseExpression(!(t>-1)||"await",a);return this.type===ac._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===ac._in?t>-1&&this.unexpected(t):e.await=t>-1),r&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},Lc.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,Bc|(s?0:zc),!1,t)},Lc.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(ac._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Lc.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(ac.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Lc.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(ac.braceL),this.labels.push(Mc),this.enterScope(0);for(var s=!1;this.type!==ac.braceR;)if(this.type===ac._case||this.type===ac._default){var i=this.type===ac._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(ac.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")},Lc.parseThrowStatement=function(e){return this.next(),lc.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 Vc=[];Lc.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(ac.parenR),e},Lc.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===ac._catch){var t=this.startNode();this.next(),this.eat(ac.parenL)?t.param=this.parseCatchClauseParam():(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(ac._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Lc.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Lc.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Tc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Lc.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")},Lc.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Lc.parseLabeledStatement=function(e,t,s,i){for(var n=0,r=this.labels;n=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},Lc.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Lc.parseBlock=function(e,t,s){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(ac.braceL),e&&this.enterScope(0);this.type!==ac.braceR;){var i=this.parseStatement(null);t.body.push(i)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Lc.parseFor=function(e,t){return e.init=t,this.expect(ac.semi),e.test=this.type===ac.semi?null:this.parseExpression(),this.expect(ac.semi),e.update=this.type===ac.parenR?null:this.parseExpression(),this.expect(ac.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Lc.parseForIn=function(e,t){var s=this.type===ac._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(ac.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},Lc.parseVar=function(e,t,s,i){for(e.declarations=[],e.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(ac.eq)?n.init=this.parseMaybeAssign(t):i||"const"!==s||this.type===ac._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"Identifier"===n.id.type||t&&(this.type===ac._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(ac.comma))break}return e},Lc.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Bc=1,zc=2;function Fc(e,t){var s=t.key.name,i=e[s],n="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(e[s]="true",!1):!!i||(e[s]=n,!1)}function jc(e,t){var s=e.computed,i=e.key;return!s&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Lc.parseFunction=function(e,t,s,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===ac.star&&t&zc&&this.unexpected(),e.generator=this.eat(ac.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&Bc&&(e.id=4&t&&this.type!==ac.name?null:this.parseIdent(),!e.id||t&zc||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($c(e.async,e.generator)),t&Bc||(e.id=this.type===ac.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,n),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Bc?"FunctionDeclaration":"FunctionExpression")},Lc.parseFunctionParams=function(e){this.expect(ac.parenL),e.params=this.parseBindingList(ac.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Lc.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(ac.braceL);this.type!==ac.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(r&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),r=!0):o.key&&"PrivateIdentifier"===o.key.type&&Fc(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Lc.parseClassElement=function(e){if(this.eat(ac.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(ac.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===ac.star?a=!0:i="static"}if(s.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==ac.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(t>=9||!r)&&this.eat(ac.star)&&(n=!0),!i&&!r&&!n){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===ac.parenL||"method"!==o||n||r){var c=!s.static&&jc(s,"constructor"),h=c&&e;c&&"method"!==o&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=c?"constructor":o,this.parseClassMethod(s,n,r,h)}else this.parseClassField(s);return s},Lc.isClassElementNameStart=function(){return this.type===ac.name||this.type===ac.privateId||this.type===ac.num||this.type===ac.string||this.type===ac.bracketL||this.type.keyword},Lc.parseClassElementName=function(e){this.type===ac.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Lc.parseClassMethod=function(e,t,s,i){var n=e.key;"constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):e.static&&jc(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=e.value=this.parseMethod(t,s,i);return"get"===e.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===e.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Lc.parseClassField=function(e){if(jc(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&jc(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(ac.eq)){var t=this.currentThisScope(),s=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=s}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Lc.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==ac.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Lc.parseClassId=function(e,t){this.type===ac.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Lc.parseClassSuper=function(e){e.superClass=this.eat(ac._extends)?this.parseExprSubscripts(null,!1):null},Lc.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Lc.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,s=e.used,i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==ac.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},Lc.parseExport=function(e,t){if(this.next(),this.eat(ac.star))return this.parseExportAllDeclaration(e,t);if(this.eat(ac._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==ac.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,i=e.specifiers;s=13&&this.type===ac.string){var e=this.parseLiteral(this.value);return vc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Lc.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Uc=Nc.prototype;Uc.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=e.properties;i=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(ac._function))return this.overrideContext(Wc.f_expr),this.parseFunction(this.startNodeAt(r,o),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(ac.arrow))return this.parseArrowExpression(this.startNodeAt(r,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===ac.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(ac.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,o),[l],!0,t)}return l;case ac.regexp:var c=this.value;return(i=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},i;case ac.num:case ac.string:return this.parseLiteral(this.value);case ac._null:case ac._true:case ac._false:return(i=this.startNode()).value=this.type===ac._null?null:this.type===ac._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case ac.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case ac.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(ac.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case ac.braceL:return this.overrideContext(Wc.b_expr),this.parseObj(!1,e);case ac._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case ac._class:return this.parseClass(this.startNode(),!1);case ac._new:return this.parseNew();case ac.backQuote:return this.parseTemplate();case ac._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},Hc.parseExprAtomDefault=function(){this.unexpected()},Hc.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var s=this.parseIdent(!0);return this.type!==ac.parenL||e?this.type===ac.dot?(t.meta=s,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Hc.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(ac.parenR)){var t=this.start;this.eat(ac.comma)&&this.eat(ac.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Hc.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Hc.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Hc.parseParenExpression=function(){this.expect(ac.parenL);var e=this.parseExpression();return this.expect(ac.parenR),e},Hc.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Hc.parseParenAndDistinguishExpression=function(e,t){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],h=!0,u=!1,d=new Dc,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==ac.parenR;){if(h?h=!1:this.expect(ac.comma),r&&this.afterTrailingComma(ac.parenR,!0)){u=!0;break}if(this.type===ac.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===ac.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(ac.parenR),e&&this.shouldParseArrow(c)&&this.eat(ac.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(i,n,c,t);c.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((s=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(s,"SequenceExpression",m,g)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(i,n);return y.expression=s,this.finishNode(y,"ParenthesizedExpression")}return s},Hc.parseParenItem=function(e){return e},Hc.parseParenArrowList=function(e,t,s,i){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,i)};var Yc=[];Hc.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ac.dot)){e.meta=t;var s=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(ac.parenL)?e.arguments=this.parseExprList(ac.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Yc,this.finishNode(e,"NewExpression")},Hc.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===ac.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value,cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===ac.backQuote,this.finishNode(s,"TemplateElement")},Hc.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(s.quasis=[i];!i.tail;)this.type===ac.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(ac.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(ac.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},Hc.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===ac.name||this.type===ac.num||this.type===ac.string||this.type===ac.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===ac.star)&&!lc.test(this.input.slice(this.lastTokEnd,this.start))},Hc.parseObj=function(e,t){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(ac.braceR);){if(i)i=!1;else if(this.expect(ac.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(ac.braceR))break;var r=this.parseProperty(e,t);e||this.checkPropClash(r,n,t),s.properties.push(r)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Hc.parseProperty=function(e,t){var s,i,n,r,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(ac.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===ac.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===ac.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(n=this.start,r=this.startLoc),e||(s=this.eat(ac.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(o)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(ac.star),this.parsePropertyName(o)):i=!1,this.parsePropertyValue(o,e,s,i,n,r,t,a),this.finishNode(o,"Property")},Hc.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var s=e.value.start;"get"===e.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Hc.parsePropertyValue=function(e,t,s,i,n,r,o,a){(s||i)&&this.type===ac.colon&&this.unexpected(),this.eat(ac.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===ac.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(s,i)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===ac.comma||this.type===ac.braceR||this.type===ac.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key)):this.type===ac.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(e))},Hc.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ac.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(ac.bracketR),e.key;e.computed=!1}return e.key=this.type===ac.num||this.type===ac.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Hc.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Hc.parseMethod=function(e,t,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|$c(t,i.generator)|(s?128:0)),this.expect(ac.parenL),i.params=this.parseBindingList(ac.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},Hc.parseArrowExpression=function(e,t,s,i){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|$c(s,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Hc.parseFunctionBody=function(e,t,s,i){var n=t&&this.type!==ac.braceL,r=this.strict,o=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!r&&!o&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!r),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Hc.isSimpleParamList=function(e){for(var t=0,s=e;t-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&1&n.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(e)>-1:r.lexical.indexOf(e)>-1||r.var.indexOf(e)>-1,r.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},Qc.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Qc.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Qc.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Qc.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var Jc=function(e,t,s){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ac(e,s)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},eh=Nc.prototype;function th(e,t,s,i){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=s),e}eh.startNode=function(){return new Jc(this,this.start,this.startLoc)},eh.startNodeAt=function(e,t){return new Jc(this,e,t)},eh.finishNode=function(e,t){return th.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},eh.finishNodeAt=function(e,t,s,i){return th.call(this,e,t,s,i)},eh.copyNode=function(e){var t=new Jc(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var sh="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",ih=sh+" Extended_Pictographic",nh=ih+" EBase EComp EMod EPres ExtPict",rh={9:sh,10:ih,11:ih,12:nh,13:nh,14:nh},oh={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},ah="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",lh="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",ch=lh+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",hh=ch+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",uh=hh+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",dh=uh+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ph={9:lh,10:ch,11:hh,12:uh,13:dh,14:dh+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},fh={};function mh(e){var t=fh[e]={binary:Ec(rh[e]+" "+ah),binaryOfStrings:Ec(oh[e]),nonBinary:{General_Category:Ec(ah),Script:Ec(ph[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var gh=0,yh=[9,10,11,12,13,14];gh=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=fh[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function bh(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function vh(e){return e>=65&&e<=90||e>=97&&e<=122}Eh.prototype.reset=function(e,t,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|e,this.source=t+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Eh.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Eh.prototype.at=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return-1;var n=s.charCodeAt(e);if(!t&&!this.switchU||n<=55295||n>=57344||e+1>=i)return n;var r=s.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},Eh.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return i;var n,r=s.charCodeAt(e);return!t&&!this.switchU||r<=55295||r>=57344||e+1>=i||(n=s.charCodeAt(e+1))<56320||n>57343?e+1:e+2},Eh.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Eh.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Eh.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Eh.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Eh.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var s=this.pos,i=0,n=e;i-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(i=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")},xh.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},xh.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},xh.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},xh.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},xh.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return-1!==n&&n=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},xh.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},xh.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},xh.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!bh(t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;-1!==(s=e.current())&&!bh(s);)e.advance();return e.pos!==t},xh.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},xh.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},xh.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},xh.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=bc(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=bc(e.lastIntValue);return!0}return!1},xh.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return Jl(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},xh.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return ec(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},xh.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},xh.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},xh.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},xh.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},xh.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},xh.regexp_eatZero=function(e){return 48===e.current()&&!kh(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},xh.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},xh.regexp_eatControlLetter=function(e){var t=e.current();return!!vh(t)&&(e.lastIntValue=t%32,e.advance(),!0)},xh.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var s,i=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(n&&r>=55296&&r<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(r-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=r}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((s=e.lastIntValue)>=0&&s<=1114111))return!0;n&&e.raise("Invalid unicode escape"),e.pos=i}return!1},xh.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Sh(e){return vh(e)||95===e}function Ah(e){return Sh(e)||kh(e)}function kh(e){return e>=48&&e<=57}function Ih(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function wh(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ph(e){return e>=48&&e<=55}xh.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=80===t)||112===t)){var i;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&2===i&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return 0},xh.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,i),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return 0},xh.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){yc(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},xh.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},xh.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Sh(t=e.current());)e.lastStringValue+=bc(t),e.advance();return""!==e.lastStringValue},xh.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ah(t=e.current());)e.lastStringValue+=bc(t),e.advance();return""!==e.lastStringValue},xh.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},xh.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===s&&e.raise("Negated character class may contain strings"),!0}return!1},xh.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},xh.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;!e.switchU||-1!==t&&-1!==s||e.raise("Invalid character class"),-1!==t&&-1!==s&&t>s&&e.raise("Range out of order in character class")}}},xh.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(99===s||Ph(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},xh.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},xh.regexp_classSetExpression=function(e){var t,s=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(s=2);for(var i=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(s=1):e.raise("Invalid character in character class");if(i!==e.pos)return s;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return s}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return s;2===t&&(s=2)}},xh.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return-1!==s&&-1!==i&&s>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},xh.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},xh.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return s&&2===i&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null},xh.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},xh.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},xh.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},xh.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var s=e.current();return!(s<0||s===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(s))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(s)&&(e.advance(),e.lastIntValue=s,!0))},xh.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!kh(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},xh.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},xh.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;kh(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t},xh.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;Ih(s=e.current());)e.lastIntValue=16*e.lastIntValue+wh(s),e.advance();return e.pos!==t},xh.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*s+e.lastIntValue:e.lastIntValue=8*t+s}else e.lastIntValue=t;return!0}return!1},xh.regexp_eatOctalDigit=function(e){var t=e.current();return Ph(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},xh.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length?this.finishToken(ac.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},$h.readToken=function(e){return Jl(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},$h.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},$h.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=t;(i=uc(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},$h.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&dc.test(String.fromCharCode(e))))break e;++this.pos}}},$h.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},$h.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(ac.ellipsis)):(++this.pos,this.finishToken(ac.dot))},$h.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(ac.assign,2):this.finishOp(ac.slash,1)},$h.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,i=42===e?ac.star:ac.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++s,i=ac.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(ac.assign,s+1):this.finishOp(i,s)},$h.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(ac.assign,3);return this.finishOp(124===e?ac.logicalOR:ac.logicalAND,2)}return 61===t?this.finishOp(ac.assign,2):this.finishOp(124===e?ac.bitwiseOR:ac.bitwiseAND,1)},$h.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(ac.assign,2):this.finishOp(ac.bitwiseXOR,1)},$h.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!lc.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(ac.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(ac.assign,2):this.finishOp(ac.plusMin,1)},$h.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(ac.assign,s+1):this.finishOp(ac.bitShift,s)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(s=2),this.finishOp(ac.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},$h.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(ac.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(ac.arrow)):this.finishOp(61===e?ac.eq:ac.prefix,1)},$h.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(ac.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(ac.assign,3);return this.finishOp(ac.coalesce,2)}}return this.finishOp(ac.question,1)},$h.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,Jl(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(ac.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+bc(e)+"'")},$h.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(ac.parenL);case 41:return++this.pos,this.finishToken(ac.parenR);case 59:return++this.pos,this.finishToken(ac.semi);case 44:return++this.pos,this.finishToken(ac.comma);case 91:return++this.pos,this.finishToken(ac.bracketL);case 93:return++this.pos,this.finishToken(ac.bracketR);case 123:return++this.pos,this.finishToken(ac.braceL);case 125:return++this.pos,this.finishToken(ac.braceR);case 58:return++this.pos,this.finishToken(ac.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(ac.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(ac.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+bc(e)+"'")},$h.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},$h.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(lc.test(i)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(r);var a=this.regexpState||(this.regexpState=new Eh(this));a.reset(s,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(n,o)}catch(e){}return this.finishToken(ac.regexp,{pattern:n,flags:o,value:l})},$h.readInt=function(e,t,s){for(var i=this.options.ecmaVersion>=12&&void 0===t,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?h-97+10:h>=65?h-65+10:h>=48&&h<=57?h-48:1/0)>=e)break;a=h,o=o*e+u}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=t&&this.pos-r!==t?null:o},$h.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return null==s&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=Nh(this.input.slice(t,this.pos)),++this.pos):Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ac.num,s)},$h.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var s=this.pos-t>=2&&48===this.input.charCodeAt(t);s&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&110===i){var n=Nh(this.input.slice(t,this.pos));return++this.pos,Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ac.num,n)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),46!==i||s||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||s||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=(r=this.input.slice(t,this.pos),s?parseInt(r,8):parseFloat(r.replace(/_/g,"")));return this.finishToken(ac.num,o)},$h.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},$h.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(hc(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(ac.string,t)};var _h={};$h.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==_h)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},$h.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw _h;this.raise(e,t)},$h.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==ac.template&&this.type!==ac.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(ac.template,e)):36===s?(this.pos+=2,this.finishToken(ac.dollarBraceL)):(++this.pos,this.finishToken(ac.backQuote));if(92===s)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(hc(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},$h.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return hc(t)?"":String.fromCharCode(t)}},$h.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return null===s&&this.invalidStringToken(t,"Bad character escape sequence"),s},$h.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos()=>Ye(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Oe("plugin-development/#a-simple-example")}}(e)),Lh=Dh("fs.mkdir"),Th=Dh("fs.readFile"),Mh=Dh("fs.writeFile");async function Vh(e,t,s,i,n,r,o,a,l){const c=await function(e,t,s,i,n,r,o,a){let l=null,c=null;if(n){l=new Set;for(const s of n)e===s.source&&t===s.importer&&l.add(s.plugin);c=(e,t)=>({...e,resolve:(e,s,{assertions:r,custom:o,isEntry:a,skipSelf:l}=pe)=>i(e,s,o,a,r||fe,l?[...n,{importer:s,plugin:t,source:e}]:n)})}return s.hookFirstAndGetPlugin("resolveId",[e,t,{assertions:a,custom:r,isEntry:o}],c,l)}(e,t,i,n,r,o,a,l);return null==c?Dh("path.resolve")():c[0]}const Bh="at position ",zh="at output position ";const Fh={delete:()=>!1,get(){},has:()=>!1,set(){}};function jh(e){return e.startsWith(Bh)||e.startsWith(zh)?Ye({code:Je,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Ye({code:rt,message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Uh=(e,t,s=Kh)=>{const{onwarn:i,onLog:n}=e,r=Gh(s,i);if(n){const e=ke[t];return(t,s)=>n(t,Wh(s),((t,s)=>{if("error"===t)return Ye(qh(s));ke[t]>=e&&r(t,qh(s))}))}return r},Gh=(e,t)=>t?(s,i)=>{s===ve?t(Wh(i),(t=>e(ve,qh(t)))):e(s,i)}:e,Wh=e=>(Object.defineProperty(e,"toString",{value:()=>Hh(e),writable:!0}),e),qh=e=>"string"==typeof e?{message:e}:"function"==typeof e?qh(e()):e,Hh=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${T(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Kh=(e,t)=>{const s=Hh(t);switch(e){case ve:return console.warn(s);case Ae:return console.debug(s);default:return console.info(s)}};function Yh(e,t,s,i,n=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));o.length>0&&i(ve,function(e,t,s){return{code:Pt,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${s.join(", ")}`}}(s,o,[...r].sort()))}const Xh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:me,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:me,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:me,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Qh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Zh=(e,t,s,i,n)=>{const r=e?.preset;if(r){const n=t[r];if(n)return{...n,...e};Ye(zt(`${s}.preset`,i,`valid values are ${Re(Object.keys(t))}`,r))}return((e,t,s,i)=>n=>{if("string"==typeof n){const r=e[n];if(r)return r;Ye(zt(t,s,`valid values are ${i}${Re(Object.keys(e))}. You can also supply an object for more fine-grained control`,n))}return(e=>e&&"object"==typeof e?e:{})(n)})(t,s,i,n)(e)},Jh=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function eu(e,t,s,i){const n=t.id,r=[];let o=null===e.map?null:Ml(e.map);const a=e.code;let c=e.ast;const h=[],u=[];let d=!1;const p=()=>d=!0;let f="",m=e.code;const y=e=>(t,s)=>{t=qh(t),s&&Xe(t,s,m,n),t.id=n,t.hook="transform",e(t)};let x;try{x=await s.hookReduceArg0("transform",[m,n],(function(e,s,n){let o,a;if("string"==typeof s)o=s;else{if(!s||"object"!=typeof s)return e;if(t.updateOptions(s),null==s.code)return(s.map||s.ast)&&i(ve,function(e){return{code:St,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(n.name)),e;({code:o,map:a,ast:c}=s)}return null!==a&&r.push(Ml("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:n.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){h.push(t),e.addWatchFile(t)},cache:d?e.cache:(c=e.cache,x=p,{delete:e=>(x(),c.delete(e)),get:e=>(x(),c.get(e)),has:e=>(x(),c.has(e)),set:(e,t)=>(x(),c.set(e,t))}),debug:y(e.debug),emitFile:e=>(u.push(e),s.emitFile(e)),error:(t,s)=>("string"==typeof t&&(t={message:t}),s&&Xe(t,s,m,n),t.id=n,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,s,i,n){return 0===i.length?s:{version:3,...Qa(e,t,s,i,Xa(n)).traceMappings()}}(n,a,o,r,i);if(!e){return new g(a).generateMap({hires:!0,includeContent:!0,source:n})}return o!==e&&(o=e,r.length=0),new l({...e,file:null,sourcesContent:e.sourcesContent})},info:y(e.info),setAssetSource(){return this.error({code:ft,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:y(e.warn)};var c,x}))}catch(e){return Ye(Gt(e,f,{hook:"transform",id:n}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:c,code:x,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:h}}const tu="resolveDependencies";class su{constructor(e,t,s,i){this.graph=e,this.modulesById=t,this.options=s,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,s,i,n,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Vh(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,s,"boolean"==typeof i?i:!t,n),t,e),n),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const s=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,t){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((n=>{for(const[r,o]of n.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,nu(o,e[r],t,i+r);const n=this.indexedEntryModules.find((e=>e.module===o));n?n.index=Math.min(n.index,s+r):this.indexedEntryModules.push({index:s+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),n})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:s,name:i,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:s,name:i||null},a=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,fe),void 0,!1,!e.resolveDependencies||tu)).info}addEntryWithImplicitDependants(e,t){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async i=>{if(nu(i,e,!1,s),!i.info.isEntry){this.implicitEntryModules.add(i);const s=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,i.id))));for(const e of s)i.implicitlyLoadedAfter.add(e);for(const e of i.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(i)}return i})))}async addModuleSource(e,t,s){let i;try{i=await this.graph.fileOperationQueue.run((async()=>await this.pluginDriver.hookFirst("load",[e])??await Th(e,"utf8")))}catch(s){let i=`Could not load ${e}`;throw t&&(i+=` (imported by ${T(t)})`),i+=`: ${s.message}`,s.message=i,s}const n="string"==typeof i?{code:i}:null!=i&&"object"==typeof i&&"string"==typeof i.code?i:Ye(function(e){return{code:"BAD_LOADER",message:`Error loading "${T(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==n.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))s.updateOptions(n),s.setSource(await eu(n,s,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);s.setSource(r)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const s=await Promise.all(t.map((t=>t.then((async([t,s])=>null===s?null:"string"==typeof s?(t.resolution=s,null):t.resolution=await this.fetchResolvedDependency(T(s.id),e.id,s))))));for(const t of s)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({assertions:e,id:t,meta:s,moduleSideEffects:i,syntheticNamedExports:n},r,o,a){const l=this.modulesById.get(t);if(l instanceof Do)return r&&xo(e,l.info.assertions)&&this.options.onLog(ve,Mt(l.info.assertions,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Zt)return Ye({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new Do(this.graph,t,this.options,o,i,n,s,e);this.modulesById.set(t,c),this.graph.watchFiles[t]=!0;const h=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=ou(h).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,h);const d=await h;return a?a===tu&&await u:await this.fetchModuleDependencies(c,...d),c}async fetchModuleDependencies(e,t,s,i){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await i)}fetchResolvedDependency(e,t,s){if(s.external){const{assertions:i,external:n,id:r,moduleSideEffects:o,meta:a}=s;let l=this.modulesById.get(r);if(l){if(!(l instanceof Zt))return Ye(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${T(t)}", but is already an existing non-external module id.`}}(e,t));xo(l.info.assertions,i)&&this.options.onLog(ve,Mt(l.info.assertions,i,e,t))}else l=new Zt(this.options,r,o,a,"absolute"!==n&&A(r),i),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(s,t,!1,!1)}async fetchStaticDependencies(e,t){for(const s of await Promise.all(t.map((t=>t.then((([t,s])=>this.fetchResolvedDependency(t,e.id,s)))))))e.dependencies.add(s),s.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof Do&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,s){const{makeAbsoluteExternalsRelative:i}=this.options;if(e){if("object"==typeof e){const n=e.external||this.options.external(e.id,t,!0);return{...e,external:n&&("relative"===n||!A(e.id)||!0===n&&ru(e.id,s,i)||"absolute")}}const n=this.options.external(e,t,!0);return{external:n&&(ru(e,s,i)||"absolute"),id:n&&i?iu(e,t):e}}const n=i?iu(s,t):s;return!1===e||this.options.external(n,t,!0)?{external:ru(n,s,i)||"absolute",id:n}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const s=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,function(e){const t=e.arguments?.[0]?.properties.find((e=>"assert"===yo(e)))?.value;if(!t)return fe;const s=t.properties.map((e=>{const t=yo(e);return"string"==typeof t&&"string"==typeof e.value.value?[t,e.value.value]:null})).filter((e=>!!e));return s.length>0?Object.fromEntries(s):fe}(t.node));return s&&"object"==typeof s&&(t.id=s.id),[t,s]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAssertions,(async([t,s])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,fe,!1,s),t,e.id,s)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const s=e.external||!1;return{assertions:e.assertions||t,external:s,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!s),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,s){const i=this.moduleLoadPromises.get(e);if(s)return s===tu?ou(i):i;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await i)}handleInvalidResolvedId(e,t,s,i){return null===e?k(t)?Ye(function(e,t){return{code:$t,exporter:e,id:t,message:`Could not resolve "${e}" from "${T(t)}"`}}(t,s)):(this.options.onLog(ve,function(e,t){return{code:$t,exporter:e,id:t,message:`"${e}" is imported by "${T(t)}", but could not be resolved – treating it as an external dependency.`,url:Oe("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,s)),{assertions:i,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(ve,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${T(t)}").`}}(t,s)),e)}async loadEntryModule(e,t,s,i,n=!1){const r=await Vh(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,fe,!0,fe);if(null==r)return Ye(null===i?function(e){return{code:Ct,message:`Could not resolve entry module "${T(e)}".`}}(e):function(e,t){return{code:yt,message:`Module "${T(e)}" that should be implicitly loaded before "${T(t)}" could not be resolved.`}}(e,i));const o="object"==typeof r&&r.external;return!1===r||o?Ye(null===i?o&&n?Kt(e):function(e){return{code:Ct,message:`Entry module "${T(e)}" cannot be external.`}}(e):function(e,t){return{code:yt,message:`Module "${T(e)}" that should be implicitly loaded before "${T(t)}" cannot be external.`}}(e,i)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},fe),void 0,t,!1)}async resolveDynamicImport(e,t,s,i){const n=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,s,{assertions:i}]);if("string"!=typeof t)return"string"==typeof n?n:n?this.getResolvedIdWithDefaults(n,i):null;if(null==n){const n=e.resolvedIds[t];return n?(xo(n.assertions,i)&&this.options.onLog(ve,Mt(n.assertions,i,t,s)),n):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,fe,!1,i),t,e.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(n,s,t),i),t,s,i)}}function iu(e,t){return k(e)?t?N(t,"..",e):N(e):e}function nu(e,{fileName:t,name:s},i,n){if(null!==t)e.chunkFileNames.add(t);else if(null!==s){let t=0;for(;e.chunkNames[t]?.priorityC(r).slice(1),extname:()=>C(r),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-C(r).length))}),n)}function hu(e,{bundle:t},s){t[Sa].has(e.toLowerCase())?s(ve,function(e){return{code:ot,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Aa}const uu=new Set(["chunk","asset","prebuilt-chunk"]);function du(e,t,s){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||s;return Ye(Yt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function pu(e,t){return"string"!=typeof e.fileName?Ye((s=e.name||t,{code:et,message:`Plugin error - Unable to get file name for asset "${s}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var s}function fu(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():Ye((s=e.fileName||e.name,{code:st,message:`Plugin error - Unable to get file name for emitted chunk "${s}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var s}class mu{constructor(e,t,s){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&uu.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!M(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Ye(Yt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Ye(Yt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Ye({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?fu(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:pu(t,e):Ye({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const s=this.filesByReferenceId.get(e);if(!s)return Ye({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==s.type)return Ye(Yt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==s.source)return Ye({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||e}", source already set.`});const i=du(t,s,e);if(this.output)this.finalizeAdditionalAsset(s,i,this.output);else{s.source=i;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(s,i,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const s=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&hu(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{F(i,lu(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=s?new Map(s.filesByReferenceId):new Map,s?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let s=t;do{s=Tl().update(s).digest("hex").slice(0,8)}while(this.filesByReferenceId.has(s)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(s))));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(s,e);return s}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,referencedFiles:[],type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:du(e.source,e,null),s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:s,source:i}=e;s&&hu(s,t,this.options.onLog),void 0!==i&&this.finalizeAdditionalAsset(e,i,t)}emitChunk(e){if(this.graph.phase>mo.LOAD_AND_PARSE)return Ye({code:pt,message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Ye(Yt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Ye(Yt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||M(e.fileName))return Ye(Yt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},s=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),s}finalizeAdditionalAsset(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=lu(t);r=i.get(o),r||(r=cu(e.name,t,o,n,s),i.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=s[r];"asset"===c?.type?c.needsCodeReference&&(c.needsCodeReference=o):s[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let r,o="",a=!0;for(const i of e){a&&(a=i.needsCodeReference);const e=cu(i.name,i.source,t,n,s);(!o||e.length{null!=r&&s(ve,{code:ht,message:`Plugin "${i}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(n=qh(n)).code&&!n.pluginCode&&(n.pluginCode=n.code),n.code=t,n.plugin=i,s(e,n)}}function yu(t,s,i,n,r,o){const{logLevel:a,onLog:l}=n;let c,h=!0;if("string"!=typeof t.cacheKey&&(t.name.startsWith(Bh)||t.name.startsWith(zh)||o.has(t.name)?h=!1:o.add(t.name)),s)if(h){const e=t.cacheKey||t.name;d=s[e]||(s[e]=Object.create(null)),c={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=t.name,c={delete:()=>jh(u),get:()=>jh(u),has:()=>jh(u),set:()=>jh(u)};else c=Fh;var u,d;return{addWatchFile(e){if(i.phase>=mo.GENERATE)return this.error({code:pt,message:'Cannot call "addWatchFile" after the build has finished.'});i.watchFiles[e]=!0},cache:c,debug:gu(Ae,"PLUGIN_LOG",l,t.name,a),emitFile:r.emitFile.bind(r),error:e=>Ye(Gt(qh(e),t.name)),getFileName:r.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),info:gu(Se,"PLUGIN_LOG",l,t.name,a),load:e=>i.moduleLoader.preloadModule(e),meta:{rollupVersion:e,watchMode:i.watchMode},get moduleIds(){const e=i.modulesById.keys();return function*(){Xt(`Accessing "this.moduleIds" on the plugin context by plugin ${t.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,n,t.name),yield*e}()},parse:i.contextParse.bind(i),resolve:(e,s,{assertions:n,custom:r,isEntry:o,skipSelf:a}=pe)=>i.moduleLoader.resolveId(e,s,r,o,n||fe,a?[{importer:s,plugin:t,source:e}]:null),setAssetSource:r.setAssetSource,warn:gu(ve,"PLUGIN_WARNING",l,t.name,a)}}const xu=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class Eu{constructor(e,t,s,i,n){this.graph=e,this.options=t,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new mu(e,t,n&&n.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...n?n.plugins:[],...s];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((s=>[s,yu(s,i,e,t,this.fileEmitter,r)]))),n)for(const e of s)for(const s of xu)s in e&&t.onLog(ve,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${s}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new Eu(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,s,i){return this.hookFirstAndGetPlugin(e,t,s,i).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,s,i){for(const n of this.getSortedPlugins(e)){if(i?.has(n))continue;const r=await this.runHook(e,t,n,s);if(null!=r)return[r,n]}return null}hookFirstSync(e,t,s){for(const i of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,i,s);if(null!=n)return n}return null}async hookParallel(e,t,s){const i=[];for(const n of this.getSortedPlugins(e))n[e].sequential?(await Promise.all(i),i.length=0,await this.runHook(e,t,n,s)):i.push(this.runHook(e,t,n,s));await Promise.all(i)}hookReduceArg0(e,[t,...s],i,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...s],t,n).then((e=>i.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...s],i,n){for(const r of this.getSortedPlugins(e)){const o=[t,...s],a=this.runHookSync(e,o,r,n);t=i.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,s,i){const n=[],r=[];for(const t of this.getSortedPlugins(e,Su))t[e].sequential?(n.push(...await Promise.all(r)),r.length=0,n.push(await this.runHook(e,s,t))):r.push(this.runHook(e,s,t));return n.push(...await Promise.all(r)),n.reduce(i,await t)}hookReduceValueSync(e,t,s,i,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,s,t,n);r=i.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,s){let i=Promise.resolve();for(const n of this.getSortedPlugins(e))i=i.then((()=>this.runHook(e,t,n,s)));return i.then(Au)}getSortedPlugins(e,t){return F(this.sortedPlugins,e,(()=>bu(e,this.plugins,t)))}runHook(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const i=r.apply(o,t);return i?.then?(a=[s.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(i).then((e=>(this.unfulfilledActions.delete(a),e)))):i})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),Ye(Gt(t,s.name,{hook:e})))))}runHookSync(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));try{return r.apply(o,t)}catch(t){return Ye(Gt(t,s.name,{hook:e}))}}}function bu(e,t,s=vu){const i=[],n=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(s(t.handler,e,o),"pre"===t.order){i.push(o);continue}if("post"===t.order){r.push(o);continue}}else s(t,e,o);n.push(o)}}return[...i,...n,...r]}function vu(e,t,s){"function"!=typeof e&&Ye(function(e,t){return{code:dt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,s.name))}function Su(e,t,s){if("string"!=typeof e&&"function"!=typeof e)return Ye(function(e,t){return{code:dt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,s.name))}function Au(){}class ku{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,s)=>{this.queue.push({reject:s,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:s,task:i}=e;try{s(await i())}catch(e){t(e)}}this.workerCount--}}class Iu{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,s,i,n=e||1;function r(e,r){++t>n&&(i=s,o(1),++t),s[e]=r}function o(e){t=0,s=Object.create(null),e||(i=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==s[e]||void 0!==i[e]},get:function(e){var t=s[e];return void 0!==t?t:void 0!==(t=i[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==s[e]?s[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new J,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=mo.LOAD_AND_PARSE,this.scope=new au,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",s)}this.pluginDriver=new Eu(this,e,e.plugins,this.pluginCache),this.acornParser=Nc.extend(...e.acornInjectPlugins),this.moduleLoader=new su(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new ku(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const s of e?e.manualPureFunctions:[]){let e=t;for(const t of s.split("."))e=e[t]||(e[t]=Object.create(null));e[Fi]=!0}return t})(e)}async build(){wo("generate module graph",2),await this.generateModuleGraph(),Po("generate module graph",2),wo("sort and bind modules",2),this.phase=mo.ANALYSE,this.sortModules(),Po("sort and bind modules",2),wo("mark included statements",2),this.includeStatements(),Po("mark included statements",2),this.phase=mo.GENERATE}contextParse(e,t={}){const s=t.onComment,i=[];t.onComment=s&&"function"==typeof s?(e,n,r,o,...a)=>(i.push({end:o,start:r,type:e?"Block":"Line",value:n}),s.call(t,e,n,r,o,...a)):i;const n=this.acornParser.parse(e,{...this.options.acorn,...t});return"object"==typeof s&&s.push(...i),t.onComment=s,function(e,t,s){const i=[],n=[];for(const t of e){for(const[e,s]of Ys)s.test(t.value)&&i.push({...t,annotationType:e});Fs.test(t.value)&&n.push(t)}for(const e of n)Xs(t,e,!1);Gs(t,{annotationIndex:0,annotations:i,code:s})}(i,n,e),n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let s=!0;for(const[e,i]of Object.entries(t))i[0]>=this.options.experimentalCacheExpiry?delete t[e]:s=!1;s&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof Do?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)No(t);if(this.options.treeshake){let t=1;do{wo(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Po("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Ye(jt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const s=[],i=new Set,n=new Set,r=new Map,o=[],a=e=>{if(e instanceof Do){for(const t of e.dependencies)r.has(t)?i.has(t)||s.push(Wa(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)n.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof Do&&n.add(t);o.push(e)}e.execIndex=t++,i.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of n)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:s,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(ve,Dt(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(ve,Ft(t.name,e.id,t.module.id),t.start)}}function wu(e,t){return t()}function Pu(t,s,i,n){t=bu("onLog",t);const r=ke[n],o=(n,a,l=ge)=>{if(!(ke[n]ke[e]o(e,qh(t),new Set(l).add(s));if(!1===("handler"in t?t.handler:t).call({debug:c(Ae),error:e=>Ye(qh(e)),info:c(Se),meta:{rollupVersion:e,watchMode:i},warn:c(ve)},n,a))return}s(n,a)}};return o}const Cu="{".charCodeAt(0),$u=" ".charCodeAt(0),Nu="assert";function _u(e){const t=e.acorn||Oh,{tokTypes:s,TokenType:i}=t;return class extends e{constructor(...e){super(...e),this.assertToken=new i(Nu)}_codeAt(e){return this.input.charCodeAt(e)}_eat(e){this.type!==e&&this.unexpected(),this.next()}readToken(e){let t=0;for(;t<6;t++)if(this._codeAt(this.pos+t)!==Nu.charCodeAt(t))return super.readToken(e);for(;this._codeAt(this.pos+t)!==Cu;t++)if(this._codeAt(this.pos+t)!==$u)return super.readToken(e);return"{"===this.type.label?super.readToken(e):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(s.comma)){const t=this.parseObj(!1);e.arguments=[t]}return this._eat(s.parenR),this.finishNode(e,"ImportExpression")}parseExport(e,t){if(this.next(),this.eat(s.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}if(this.eat(s._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===s._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(n,5,!1,i)}else if(this.type===s._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}}else{for(var o=0,a=e.specifiers;o({ecmaVersion:"latest",sourceType:"module",...e.acorn}),Du=e=>[_u,...Ru(e.acornInjectPlugins)],Lu=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Tu=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...s)=>!t.startsWith("\0")&&e(t,...s)||!1;if(e){const t=new Set,s=[];for(const i of Ru(e))i instanceof RegExp?s.push(i):t.add(i);return(e,...i)=>t.has(e)||s.some((t=>t.test(e)))}return()=>!1},Mu=(e,t,s)=>{const i=e.inlineDynamicImports;return i&&Qt('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',Ue,!0,t,s),i},Vu=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Bu=(e,t,s)=>{const i=e.manualChunks;return i&&Qt('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',We,!0,t,s),i},zu=(e,t,s)=>{const i=e.maxParallelFileReads;"number"==typeof i&&Qt('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,t,s);const n=e.maxParallelFileOps??i;return"number"==typeof n?n<=0?1/0:n:20},Fu=(e,t)=>{const s=e.moduleContext;if("function"==typeof s)return e=>s(e)??t;if(s){const e=Object.create(null);for(const[t,i]of Object.entries(s))e[N(t)]=i;return s=>e[s]??t}return()=>t},ju=(e,t,s)=>{const i=e.preserveModules;return i&&Qt('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,t,s),i},Uu=e=>{if(!1===e.treeshake)return!1;const t=Zh(e.treeshake,Xh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??me,moduleSideEffects:Gu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Gu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,s)=>!!t.startsWith("\0")||!1!==e(t,s);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Ye(zt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Wu=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,qu=/^[a-z]:/i;function Hu(e){const t=qu.exec(e),s=t?t[0]:"";return s+e.slice(s.length).replace(Wu,"_")}const Ku=(e,t,s)=>{const{file:i}=e;if("string"==typeof i){if(t)return Ye(zt("output.file",Me,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(s.input))return Ye(zt("output.file",Me,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return i},Yu=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Ye(zt("output.format",ze,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Xu=(e,t)=>{const s=(e.inlineDynamicImports??t.inlineDynamicImports)||!1,{input:i}=t;return s&&(Array.isArray(i)?i:Object.keys(i)).length>1?Ye(zt("output.inlineDynamicImports",Ue,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):s},Qu=(e,t,s)=>{const i=(e.preserveModules??s.preserveModules)||!1;if(i){if(t)return Ye(zt("output.inlineDynamicImports",Ue,'this option is not supported for "output.preserveModules"'));if(!1===s.preserveEntrySignatures)return Ye(zt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return i},Zu=(e,t)=>{const s=e.preferConst;return null!=s&&Xt('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,t),!!s},Ju=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return N(t)},ed=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Ye(zt("output.amd.id",Te,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Ye(zt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},td=(e,t)=>{const s=e[t];return"function"==typeof s?s:()=>s||""},sd=(e,t)=>{const{dir:s}=e;return"string"==typeof s&&"string"==typeof t?Ye(zt("output.dir",Me,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):s},id=(e,t,s)=>{const i=e.dynamicImportFunction;return i&&(Xt('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,t),"es"!==s&&t.onLog(ve,zt("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),i},nd=(e,t)=>{const s=e.entryFileNames;return null==s&&t.add("entryFileNames"),s??"[name].js"};function rd(e,t){const s=e.experimentalDeepDynamicChunkOptimization;return null!=s&&Xt('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',Fe,!0,t),s||!1}function od(e,t){const s=e.exports;if(null==s)t.add("exports");else if(!["default","named","none","auto"].includes(s))return Ye({code:ct,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${s}".`,url:Oe(Ve)});return s||"auto"}const ad=(e,t)=>{const s=Zh(e.generatedCode,Qh,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===s.arrowFunctions,constBindings:!0===s.constBindings||t,objectShorthand:!0===s.objectShorthand,reservedNamesAsProps:!1!==s.reservedNamesAsProps,symbols:!0===s.symbols}},ld=(e,t)=>{if(t)return"";const s=e.indent;return!1===s?"":s??!0},cd=new Set(["compat","auto","esModule","default","defaultOnly"]),hd=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let s=null;return i=>null===i?s||ud(s=t(i)):i in e?e[i]:ud(e[i]=t(i))}return void 0===t?()=>"default":()=>ud(t)},ud=e=>cd.has(e)?e:Ye(zt("output.interop",Ge,`use one of ${Array.from(cd,(e=>JSON.stringify(e))).join(", ")}`,e)),dd=(e,t,s,i)=>{const n=e.manualChunks||i.manualChunks;if(n){if(t)return Ye(zt("output.manualChunks",We,'this option is not supported for "output.inlineDynamicImports"'));if(s)return Ye(zt("output.manualChunks",We,'this option is not supported for "output.preserveModules"'))}return n||{}},pd=(e,t,s)=>e.minifyInternalExports??(s||"es"===t||"system"===t),fd=(e,t,s)=>{const i=e.namespaceToStringTag;return null!=i?(Xt('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,s),i):t.symbols||!1},md=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(s=t).endsWith("/")?s:s+"/":Ye(zt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var s};function gd(t){return async function(t,s){const{options:i,unsetOptions:n}=await async function(t,s){if(!t)throw new Error("You must supply an options object to rollup");const i=await async function(t,s){const i=bu("options",await Jh(t.plugins)),n=t.logLevel||Se,r=Pu(i,Uh(t,n),s,n);for(const o of i){const{name:i,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:gu(Ae,"PLUGIN_LOG",r,i,n),error:e=>Ye(Gt(qh(e),i,{hook:"onLog"})),info:gu(Se,"PLUGIN_LOG",r,i,n),meta:{rollupVersion:e,watchMode:s},warn:gu(ve,"PLUGIN_WARNING",r,i,n)},t);c&&(t=c)}return t}(t,s),{options:n,unsetOptions:r}=await async function(e,t){const s=new Set,i=e.context??"undefined",n=await Jh(e.plugins),r=e.logLevel||Se,o=Pu(n,Uh(e,r),t,r),a=e.strictDeprecations||!1,l=zu(e,o,a),c={acorn:Ou(e),acornInjectPlugins:Du(e),cache:Lu(e),context:i,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Tu(e.external),inlineDynamicImports:Mu(e,o,a),input:Vu(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:Bu(e,o,a),maxParallelFileOps:l,maxParallelFileReads:l,moduleContext:Fu(e,i),onLog:o,onwarn:e=>o(ve,e),perf:e.perf||!1,plugins:n,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveModules:ju(e,o,a),preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Uu(e)};return Yh(e,[...Object.keys(c),"watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:s}}(i,s);return yd(n.plugins,Bh),{options:n,unsetOptions:r}}(t,null!==s);!function(e){e.perf?(vo=new Map,wo=Ao,Po=ko,e.plugins=e.plugins.map($o)):(wo=ji,Po=ji)}(i);const r=new Iu(i,s),o=!1!==t.cache;t.cache&&(i.cache=void 0,t.cache=void 0);wo("BUILD",1),await wu(r.pluginDriver,(async()=>{try{wo("initialize",2),await r.pluginDriver.hookParallel("buildStart",[i]),Po("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Po("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?Ye(_t()):xd(!1,i,n,e,r),watchFiles:Object.keys(r.watchFiles),write:async e=>a.closed?Ye(_t()):xd(!0,i,n,e,r)};i.perf&&(a.getTimings=Io);return a}(t,null)}function yd(e,t){for(const[s,i]of e.entries())i.name||(i.name=`${t}${s+1}`)}async function xd(e,t,s,i,n){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,s,i){if(!e)throw new Error("You must supply an options object");const n=await Jh(e.plugins);yd(n,zh);const r=t.createOutputPluginDriver(n);return{...await Ed(s,i,e,r),outputPluginDriver:r}}(i,n.pluginDriver,t,s);return wu(0,(async()=>{const s=new Fl(r,a,t,o,n),i=await s.generate(e);if(e){if(wo("WRITE",1),!r.dir&&!r.file)return Ye({code:bt,message:'You must specify "output.file" or "output.dir" for the build.',url:Oe(Me)});await Promise.all(Object.values(i).map((e=>n.fileOperationQueue.run((()=>async function(e,t){const s=N(t.dir||P(t.file),e.fileName);return await Lh(P(s),{recursive:!0}),Mh(s,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,i]),Po("WRITE",1)}return l=i,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>vd(e)-vd(t)))};var l}))}function Ed(e,t,s,i){return async function(e,t,s){const i=new Set(s),n=e.compact||!1,r=Yu(e),o=Xu(e,t),a=Qu(e,o,t),l=Ku(e,a,t),c=Zu(e,t),h=ad(e,c),u={amd:ed(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:td(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:n,dir:sd(e,l),dynamicImportFunction:id(e,t,r),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:nd(e,i),esModule:e.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:rd(e,t),experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:od(e,i),extend:e.extend||!1,externalImportAssertions:e.externalImportAssertions??!0,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:td(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:h,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:ld(e,n),inlineDynamicImports:o,interop:hd(e),intro:td(e,"intro"),manualChunks:dd(e,o,a,t),minifyInternalExports:pd(e,r,n),name:e.name,namespaceToStringTag:fd(e,h,t),noConflict:e.noConflict||!1,outro:td(e,"outro"),paths:e.paths||{},plugins:await Jh(e.plugins),preferConst:c,preserveModules:a,preserveModulesRoot:Ju(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Hu,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:md(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return Yh(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:i}}(i.hookReduceArg0Sync("outputOptions",[s],((e,t)=>t||e),(e=>{const t=()=>e.error({code:tt,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var bd;function vd(e){return"asset"===e.type?bd.ASSET:e.isEntry?bd.ENTRY_CHUNK:bd.SECONDARY_CHUNK}function Sd(e){return e}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(bd||(bd={}));export{e as VERSION,Sd as defineConfig,gd as rollup}; ++var e="3.26.2";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var s={exports:{}};!function(e){const t=",".charCodeAt(0),s=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;eBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s>>=1,l&&(n=-2147483648|-n),s[i]+=n,t}function h(e,s,i){return!(s>=i)&&e.charCodeAt(s)!==t}function u(e){e.sort(d)}function d(e,t){return e[0]-t[0]}function p(e){const i=new Int32Array(5),n=16384,r=n-36,a=new Uint8Array(n),l=a.subarray(0,r);let c=0,h="";for(let u=0;u0&&(c===n&&(h+=o.decode(a),c=0),a[c++]=s),0!==d.length){i[0]=0;for(let e=0;er&&(h+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,i,s,0),1!==s.length&&(c=f(a,c,i,s,1),c=f(a,c,i,s,2),c=f(a,c,i,s,3),4!==s.length&&(c=f(a,c,i,s,4)))}}}return h+o.decode(a.subarray(0,c))}function f(e,t,s,i,r){const o=i[r];let a=o-s[r];s[r]=o,a=a<0?-a<<1|1:a<<1;do{let s=31&a;a>>>=5,a>0&&(s|=32),e[t++]=n[s]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(s.exports);var i=s.exports;class n{constructor(e){this.bits=e instanceof n?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let r=class e{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.startwindow.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const a=o();class l{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=i.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+a(this.toString())}}function c(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const h=Object.prototype.toString;function u(e){return"[object Object]"===h.call(e)}function d(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e>1;e=0&&t.push(i),this.rawSegments.push(t)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,o=!0;for(;r1){for(let e=0;e{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?c(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new l(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;if(u(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const i={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];tn?`${e}${t}`:(n=!0,t);this.intro=this.intro.replace(s,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)i[o]||(a.content=a.content.replace(s,r),a.content.length&&(n="\n"===a.content[a.content.length-1]));else for(o=a.start;o=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,o=n.next,a=this.byStart[s];if(!a&&n===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=i),a&&(a.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,n.next=a||null,l||(this.firstChunk=i),a||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if("string"!=typeof s)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(m.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),m.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,o=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!o)}else{const i=new r(e,t,"").edit(s,n);l.next=i,i.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(f);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(f),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(f),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(f),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(f),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=n===i?e-i.start:0,a=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(o,a),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=s?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=d(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,s(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,s(t,this.original))}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&this.overwrite(i,i+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i))this.overwrite(n,n+i,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const y=Object.prototype.hasOwnProperty;const x=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,E=/^\.?\.\//,b=/\\/g,v=/[/\\]/,S=/\.[^.]+$/;function A(e){return x.test(e)}function k(e){return E.test(e)}function I(e){return e.replace(b,"/")}function w(e){return e.split(v).pop()||""}function P(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function C(e){const t=S.exec(w(e));return t?t[0]:""}function $(e,t){const s=e.split(v).filter(Boolean),i=t.split(v).filter(Boolean);for("."===s[0]&&s.shift(),"."===i[0]&&i.shift();s[0]&&i[0]&&s[0]===i[0];)s.shift(),i.shift();for(;".."===i[0]&&s.length>0;)i.shift(),s.pop();for(;s.pop();)i.unshift("..");return i.join("/")}function N(...e){const t=e.shift();if(!t)return"/";let s=t.split(v);for(const t of e)if(A(t))s=t.split(v);else{const e=t.split(v);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&s.pop()}s.push(...e)}return s.join("/")}const _=/[\n\r'\\\u2028\u2029]/,R=/([\n\r'\u2028\u2029])/g,O=/\\/g;function D(e){return _.test(e)?e.replace(O,"\\\\").replace(R,"\\$1"):e}function L(e){const t=w(e);return t.slice(0,Math.max(0,t.length-C(e).length))}function T(e){return A(e)?$(N(),e):e}function M(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||A(e)}const V=/^(\.\.\/)*\.\.$/;function B(e,t,s,i){let n=I($(P(e),t));if(s&&n.endsWith(".js")&&(n=n.slice(0,-3)),i){if(""===n)return"../"+w(t);if(V.test(n))return[...n.split("/"),"..",w(t)].join("/")}return n?n.startsWith("..")?n:"./"+n:"."}class z{constructor(e,t,s){this.options=t,this.inputBase=s,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?I($(this.inputBase,this.id)):this.id)}getImportAssertions(e){return this.importAssertions||(this.importAssertions=function(e,{getObject:t}){if(!e)return null;const s=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(s.length>0)return t(s,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAssertions&&this.moduleInfo.assertions,e))}getImportPath(e){return D(this.renormalizeRenderPath?B(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function F(e,t,s){const i=e.get(t);if(void 0!==i)return i;const n=s();return e.set(t,n),n}function j(){return new Set}function U(){return[]}const G=Symbol("Unknown Key"),W=Symbol("Unknown Non-Accessor Key"),q=Symbol("Unknown Integer"),H=Symbol("Symbol.toStringTag"),K=[],Y=[G],X=[W],Q=[q],Z=Symbol("Entities");class J{constructor(){this.entityPaths=Object.create(null,{[Z]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const s=this.getEntities(e);return!!s.has(t)||(s.add(t),!1)}withTrackedEntityAtPath(e,t,s,i){const n=this.getEntities(e);if(n.has(t))return i;n.add(t);const r=s();return n.delete(t),r}getEntities(e){let t=this.entityPaths;for(const s of e)t=t[s]=t[s]||Object.create(null,{[Z]:{value:new Set}});return t[Z]}}const ee=new J;class te{constructor(){this.entityPaths=Object.create(null,{[Z]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,s){let i=this.entityPaths;for(const t of e)i=i[t]=i[t]||Object.create(null,{[Z]:{value:new Map}});const n=F(i[Z],t,j);return!!n.has(s)||(n.add(s),!1)}}const se=Symbol("Unknown Value"),ie=Symbol("Unknown Truthy Value");class ne{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){ae(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,s){return se}getReturnExpressionWhenCalledAtPath(e,t,s,i){return oe}hasEffectsOnInteractionAtPath(e,t,s){return!0}include(e,t,s){this.included=!0}includeCallArguments(e,t){for(const s of t)s.include(e,!1)}shouldBeIncluded(e){return!0}}const re=new class extends ne{},oe=[re,!1],ae=e=>{for(const t of e.args)t?.deoptimizePath(Y)},le={args:[null],type:0},ce={args:[null,re],type:1},he={args:[null],type:2,withNew:!1};class ue extends ne{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(e)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:t},s){return 0!==t||e.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class de extends ue{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const pe=Object.freeze(Object.create(null)),fe=Object.freeze({}),me=Object.freeze([]),ge=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var ye=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const xe=/[^\w$]/g,Ee=e=>(e=>/\d/.test(e[0]))(e)||ye.has(e)||"arguments"===e;function be(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(xe,"_"),Ee(e)&&(e=`_${e}`),e||"_"}const ve="warn",Se="info",Ae="debug",ke={[Ae]:0,[Se]:1,silent:3,[ve]:2};function Ie(e,t){return e.start<=t&&t{const s=n+e.length+1,i={start:n,end:s,line:t};return n=s,i}));let o=0;return function(t,n){if("string"==typeof t&&(t=e.indexOf(t,n??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(Ie(a,t))return{line:s+a.line,column:i+t-a.start,character:t};o+=l,a=r[o]}}}(e,s)(t,s&&s.startIndex)}function Pe(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const Ce=120,$e=10,Ne="...";function _e(e,t,s){let i=e.split("\n");if(t>i.length)return"";const n=Math.max(Pe(i[t-1].slice(0,s)).length+$e+Ne.length,Ce),r=Math.max(0,t-3);let o=Math.min(t+2,i.length);for(i=i.slice(r,o);!/\S/.test(i[i.length-1]);)i.pop(),o-=1;const a=String(o).length;return i.map(((e,i)=>{const o=r+i+1===t;let l=String(i+r+1);for(;l.lengthn&&(c=`${c.slice(0,n-Ne.length)}${Ne}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Pe(e.slice(0,s)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function Re(e,t){const s=e.length<=1,i=e.map((e=>`"${e}"`));let n=s?i[0]:`${i.slice(0,-1).join(", ")} and ${i.slice(-1)[0]}`;return t&&(n+=` ${s?t[0]:t[1]}`),n}function Oe(e){return`https://rollupjs.org/${e}`}const De="troubleshooting/#error-name-is-not-exported-by-module",Le="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Te="configuration-options/#output-amd-id",Me="configuration-options/#output-dir",Ve="configuration-options/#output-exports",Be="configuration-options/#output-extend",ze="configuration-options/#output-format",Fe="configuration-options/#output-experimentaldeepdynamicchunkoptimization",je="configuration-options/#output-globals",Ue="configuration-options/#output-inlinedynamicimports",Ge="configuration-options/#output-interop",We="configuration-options/#output-manualchunks",qe="configuration-options/#output-name",He="configuration-options/#output-sourcemapfile",Ke="plugin-development/#this-getmoduleinfo";function Ye(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError"})),e}function Xe(e,t,s,i){if("object"==typeof t){const{line:s,column:n}=t;e.loc={column:n,file:i,line:s}}else{e.pos=t;const{line:n,column:r}=we(s,t,{offsetLine:1});e.loc={column:r,file:i,line:n}}if(void 0===e.frame){const{line:t,column:i}=e.loc;e.frame=_e(s,t,i)}}const Qe="ADDON_ERROR",Ze="ALREADY_CLOSED",Je="ANONYMOUS_PLUGIN_CACHE",et="ASSET_NOT_FINALISED",tt="CANNOT_EMIT_FROM_OPTIONS_HOOK",st="CHUNK_NOT_GENERATED",it="CIRCULAR_REEXPORT",nt="DEPRECATED_FEATURE",rt="DUPLICATE_PLUGIN_NAME",ot="FILE_NAME_CONFLICT",at="ILLEGAL_IDENTIFIER_AS_NAME",lt="INVALID_CHUNK",ct="INVALID_EXPORT_OPTION",ht="INVALID_LOG_POSITION",ut="INVALID_OPTION",dt="INVALID_PLUGIN_HOOK",pt="INVALID_ROLLUP_PHASE",ft="INVALID_SETASSETSOURCE",mt="MISSING_EXPORT",gt="MISSING_GLOBAL_NAME",yt="MISSING_IMPLICIT_DEPENDANT",xt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Et="MISSING_NODE_BUILTINS",bt="MISSING_OPTION",vt="MIXED_EXPORTS",St="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",At="OPTIMIZE_CHUNK_STATUS",kt="PLUGIN_ERROR",It="SOURCEMAP_BROKEN",wt="UNEXPECTED_NAMED_IMPORT",Pt="UNKNOWN_OPTION",Ct="UNRESOLVED_ENTRY",$t="UNRESOLVED_IMPORT",Nt="VALIDATION_ERROR";function _t(){return{code:Ze,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Rt(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ot({fileName:e,code:t},s){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s.message}.`};return Xe(i,s.loc,t,e),i}function Dt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(T).join(" -> ")}`}}function Lt(e,t,{line:s,column:i}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${T(t)} is at (${s}:${i})\n${_e(e,s,i)}`}}function Tt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${T(t)}".`}}function Mt(e,t,s,i){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${T(i)}" tried to import "${T(s)}" with ${Vt(t)} assertions, but it was already imported elsewhere with ${Vt(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const Vt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function Bt(e,t,s){return{code:ct,message:`"${e}" was specified for "output.exports", but entry module "${T(s)}" has the following exports: ${Re(t)}`,url:Oe(Ve)}}function zt(e,t,s,i){return{code:ut,message:`Invalid value ${void 0===i?"":`${JSON.stringify(i)} `}for option "${e}" - ${s}.`,url:Oe(t)}}function Ft(e,t,s){const i=".json"===C(s);return{binding:e,code:mt,exporter:s,id:t,message:`"${e}" is not exported by "${T(s)}", imported by "${T(t)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Oe(De)}}function jt(e){const t=[...e.implicitlyLoadedBefore].map((e=>T(e.id))).sort();return{code:yt,message:`Module "${T(e.id)}" that should be implicitly loaded before ${Re(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Ut(e,t,s){return{code:At,message:`${s}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Gt(e,t,{hook:s,id:i}={}){const n=e.code;return e.pluginCode||null==n||"string"==typeof n&&("string"!=typeof n||n.startsWith("PLUGIN_"))||(e.pluginCode=n),e.code=kt,e.plugin=t,s&&(e.hook=s),i&&(e.id=i),e}function Wt(e){return{code:It,message:`Multiple conflicting contents for sourcemap source ${e}`}}function qt(e,t,s){const i=s?"reexport":"import";return{code:wt,exporter:e,message:`The named export "${t}" was ${i}ed from the external module "${T(e)}" even though its interop type is "defaultOnly". Either remove or change this ${i} or change the value of the "output.interop" option.`,url:Oe(Ge)}}function Ht(e){return{code:wt,exporter:e,message:`There was a namespace "*" reexport from the external module "${T(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Oe(Ge)}}function Kt(e){return{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}}function Yt(e){return{code:Nt,message:e}}function Xt(e,t,s,i,n){Qt(e,t,s,i.onLog,i.strictDeprecations,n)}function Qt(e,t,s,i,n,r){if(s||n){const s=function(e,t,s){return{code:nt,message:e,url:Oe(t),...s?{plugin:s}:{}}}(e,t,r);if(n)return Ye(s);i(ve,s)}}class Zt{constructor(e,t,s,i,n,r){this.options=e,this.id=t,this.renormalizeRenderPath=n,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=be(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this,l=this.info={assertions:r,ast:null,code:null,dynamicallyImportedIdResolutions:me,dynamicallyImportedIds:me,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Xt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ke,!0,e),l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:me,implicitlyLoadedBefore:me,importedIdResolutions:me,importedIds:me,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const s=new de(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const s of e)for(const e of this.declarations.get(s).module.importers)t.add(e);const s=[...t];var i,n,r;this.options.onLog(ve,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:r=s,message:`${Re(n=e,["is","are"])} imported from external module "${i}" but never used in ${Re(r.map((e=>T(e))))}.`,names:n})}}const Jt={ArrayPattern(e,t){for(const s of t.elements)s&&Jt[s.type](e,s)},AssignmentPattern(e,t){Jt[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const s of t.properties)"RestElement"===s.type?Jt.RestElement(e,s):Jt[s.value.type](e,s.value)},RestElement(e,t){Jt[t.argument.type](e,t.argument)}},es=function(e){const t=[];return Jt[e.type](t,e),t};function ts(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function ss(){return{accessed:new J,assigned:new J,brokenFlow:!1,called:new te,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new te,replacedVariableInits:new Map}}function is(e,t=null){return Object.create(t,e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const ns=new class extends ne{getLiteralValueAtPath(){}},rs={value:{hasEffectsWhenCalled:null,returns:re}},os=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(fs,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(fs,e[0],t,s)}},as={value:{hasEffectsWhenCalled:null,returns:os}},ls=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(ms,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ms,e[0],t,s)}},cs={value:{hasEffectsWhenCalled:null,returns:ls}},hs=new class extends ne{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Es(ys,e[0]):oe}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ys,e[0],t,s)}},us={value:{hasEffectsWhenCalled:null,returns:hs}},ds={value:{hasEffectsWhenCalled({args:e},t){const s=e[2];return e.length<3||"symbol"==typeof s.getLiteralValueAtPath(K,ee,{deoptimizeCache(){}})&&s.hasEffectsOnInteractionAtPath(K,he,t)},returns:hs}},ps=is({hasOwnProperty:as,isPrototypeOf:as,propertyIsEnumerable:as,toLocaleString:us,toString:us,valueOf:rs}),fs=is({valueOf:as},ps),ms=is({toExponential:us,toFixed:us,toLocaleString:us,toPrecision:us,valueOf:cs},ps),gs=is({exec:rs,test:as},ps),ys=is({anchor:us,at:rs,big:us,blink:us,bold:us,charAt:us,charCodeAt:cs,codePointAt:rs,concat:us,endsWith:as,fixed:us,fontcolor:us,fontsize:us,includes:as,indexOf:cs,italics:us,lastIndexOf:cs,link:us,localeCompare:cs,match:rs,matchAll:rs,normalize:us,padEnd:us,padStart:us,repeat:us,replace:ds,replaceAll:ds,search:cs,slice:us,small:us,split:rs,startsWith:as,strike:us,sub:us,substr:us,substring:us,sup:us,toLocaleLowerCase:us,toLocaleUpperCase:us,toLowerCase:us,toString:us,toUpperCase:us,trim:us,trimEnd:us,trimLeft:us,trimRight:us,trimStart:us,valueOf:us},ps);function xs(e,t,s,i){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(s,i)||!1)}function Es(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:oe}function bs(e,t,s){s(e,t)}function vs(e,t,s){}var Ss={};Ss.Program=Ss.BlockStatement=Ss.StaticBlock=function(e,t,s){for(var i=0,n=e.body;i=r.end;)Hs(e,r,n),r=i[++t.annotationIndex];if(r&&r.end<=e.end)for(Ss[s](e,t,Gs);(r=i[t.annotationIndex])&&r.end<=e.end;)++t.annotationIndex,Xs(e,r,!1)}const Ws=/[^\s(]/g,qs=/\S/g;function Hs(e,t,s){const i=[];let n;if(Ks(s.slice(t.end,e.start),Ws)){const t=e.start;for(;;){switch(i.push(e),e.type){case _s:case Ps:e=e.expression;continue;case Ms:if(Ks(s.slice(t,e.start),qs)){e=e.expressions[0];continue}n=!0;break;case Cs:if(Ks(s.slice(t,e.start),qs)){e=e.test;continue}n=!0;break;case Ds:case ks:if(Ks(s.slice(t,e.start),qs)){e=e.left;continue}n=!0;break;case Ns:case $s:e=e.declaration;continue;case Bs:{const t=e;if("const"===t.kind){e=t.declarations[0].init;continue}n=!0;break}case Vs:e=e.init;continue;case Rs:case As:case ws:case Ls:break;default:n=!0}break}}else n=!0;if(n)Xs(e,t,!1);else for(const e of i)Xs(e,t,!0)}function Ks(e,t){let s;for(;null!==(s=t.exec(e));){if("/"===s[0]){const s=e.charCodeAt(t.lastIndex);if(42===s){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}if(47===s){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}return t.lastIndex=0,!1}return!0}const Ys=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Xs(e,t,s){const i=s?js:Us,n=e[i];n?n.push(t):e[i]=[t]}const Qs={ImportExpression:["arguments"],Literal:[],Program:["body"]};const Zs="variables";class Js extends ne{constructor(e,t,s,i=!1){super(),this.deoptimized=!1,this.esTreeNode=i?e:null,this.keys=Qs[e.type]||function(e){return Qs[e.type]=Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))),Qs[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(s),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.keys){const s=this[t];if(null!==s)if(Array.isArray(s)){for(const t of s)if(t?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(K,this.assignmentInteraction,e)}include(e,t,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.include(e,t);else i.include(e,t)}}includeAsAssignmentTarget(e,t,s){this.include(e,t)}initialise(){}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}parseNode(e,t){for(const[s,i]of Object.entries(e))if(!this.hasOwnProperty(s))if(95===s.charCodeAt(0)){if(s===js){const e=i;this.annotations=e,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.annotationType)),this.annotationPure=e.some((e=>"pure"===e.annotationType)))}else if(s===Us)for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}else if("object"!=typeof i||null===i)this[s]=i;else if(Array.isArray(i)){this[s]=[];for(const e of i)this[s].push(null===e?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(s)))}else this[s]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope,t?.includes(s))}render(e,t){for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.render(e,t);else i.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(ss())}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.keys){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Y);else t.deoptimizePath(Y)}this.context.requestTreeshakingPass()}}class ei extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[G,...t],s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(Y,le,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([G,G]),this.context.requestTreeshakingPass()}}class ti extends ne{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},s){2===t&&0===s.length&&this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Q)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?oe:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||re:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(e.length>(0===i?1:0))return!0;if(2===i){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Q,ce,s))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(K,he,s))return!0}return!1}}const si=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:os})],ii=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:hs})],ni=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ls})],ri=[new ti({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:re})],oi=/^\d+$/;class ai extends ne{constructor(e,t,s=!1){if(super(),this.prototypeExpression=t,this.immutable=s,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(Y);this.prototypeExpression?.deoptimizePath([G,G]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,s){const[i,...n]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof i&&this.deoptimizedPaths[i]))return void ae(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(a[i]){const t=l[i];if(t)for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(oi.test(i))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}else{for(const t of[...Object.values(l),c])for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(oi.test(e))for(const e of t)e.deoptimizePath(Y);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===q?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===W);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const s=1===e.length?Y:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,G]:e)}getLiteralValueAtPath(e,t,s){if(0===e.length)return ie;const i=e[0],n=this.getMemberExpressionAndTrackDeopt(i,s);return n?n.getLiteralValueAtPath(e.slice(1),t,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,s):1!==e.length?se:void 0}getReturnExpressionWhenCalledAtPath(e,t,s,i){if(0===e.length)return oe;const[n,...r]=e,o=this.getMemberExpressionAndTrackDeopt(n,i);return o?o.getReturnExpressionWhenCalledAtPath(r,t,s,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,s,i):oe}hasEffectsOnInteractionAtPath(e,t,s){const[i,...n]=e;if(n.length>0||2===t.type){const r=this.getMemberExpression(i);return r?r.hasEffectsOnInteractionAtPath(n,t,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}if(i===W)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(r[i]){const e=o[i];if(e)for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(n,t,s))return!0}else for(const e of[...Object.values(o),a])for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,h=[];for(let u=e.length-1;u>=0;u--){const{key:d,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof d)"set"===p?i[d]||(i[d]=[f,...h],n[d]=[f,...c]):"get"===p?s[d]||(s[d]=[f,...a],r[d]=[f,...l]):(i[d]||(i[d]=[f,...h]),s[d]||(s[d]=[f,...a]));else{if(d===q){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&h.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Y)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(oi.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Q)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&oi.test(e)||this.deoptimizedPaths[e])return re;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&oi.test(e)?re:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return re;const s=this.getMemberExpression(e);if(s!==re&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return s}}const li=e=>"string"==typeof e&&/^\d+$/.test(e),ci=new class extends ne{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||li(t[0])||ae(e)}getLiteralValueAtPath(e){return 1===e.length&&li(e[0])?void 0:se}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},hi=new ai({__proto__:null,hasOwnProperty:si,isPrototypeOf:si,propertyIsEnumerable:si,toLocaleString:ii,toString:ii,valueOf:ri},ci,!0),ui=[{key:q,kind:"init",property:re},{key:"length",kind:"init",property:ls}],di=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:os})],pi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ls})],fi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new ai(ui,Ai),returnsPrimitive:null})],mi=[new ti({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new ai(ui,Ai),returnsPrimitive:null})],gi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new ai(ui,Ai),returnsPrimitive:null})],yi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ls})],xi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:re})],Ei=[new ti({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:re})],bi=[new ti({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:re})],vi=[new ti({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Si=[new ti({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ai=new ai({__proto__:null,at:Ei,concat:mi,copyWithin:vi,entries:mi,every:di,fill:vi,filter:gi,find:bi,findIndex:pi,findLast:bi,findLastIndex:pi,flat:mi,flatMap:gi,forEach:bi,includes:si,indexOf:ni,join:ii,keys:ri,lastIndexOf:ni,map:gi,pop:xi,push:yi,reduce:bi,reduceRight:bi,reverse:vi,shift:xi,slice:mi,some:di,sort:Si,splice:fi,toLocaleString:ii,toString:ii,unshift:yi,values:Ei},hi,!0);class ki extends Js{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;tthis.init.deoptimizeArgumentsOnInteractionAtPath(e,t,s)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=me;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Y)}}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.isReassigned?se:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getLiteralValueAtPath(e,t,s))),se)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.isReassigned?oe:s.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath(e,t,s,i))),oe)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return!!this.isReassigned||!s.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!s.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s));case 2:return!!this.isReassigned||!(t.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s)}}include(){if(!this.included){this.included=!0;for(const e of this.declarations){e.included||e.include(ts(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==Ts);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const s of t)s.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=re,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(e){const{declarations:t}=this;for(const s of e.declarations)t.push(s);const s=this.markInitializersForDeoptimization();if(s.push(e.init),e.additionalInitializers)for(const t of e.additionalInitializers)s.push(t)}}const Pi=me,Ci=new Set([G]),$i=new J,Ni=new Set([re]);class _i extends wi{constructor(e,t,s){super(e,t,re,s),this.deoptimizationInteractions=[],this.deoptimizations=new J,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===re){if(!this.entitiesToBeDeoptimized.has(re)){this.entitiesToBeDeoptimized.add(re);for(const{interaction:e}of this.deoptimizationInteractions)ae(e);this.deoptimizationInteractions=Pi}}else if(this.deoptimizedFields.has(G))e.deoptimizePath(Y);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:s}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,s,ee)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(re)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(G)||2===e.type&&this.deoptimizedFields.has(t[0])))ae(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const s of this.entitiesToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,t,ee);this.entitiesToBeDeoptimized.has(re)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(G))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const t of this.entitiesToBeDeoptimized)t.deoptimizePath(e);t===G&&(this.deoptimizationInteractions=Pi,this.deoptimizations=$i,this.deoptimizedFields=Ci,this.entitiesToBeDeoptimized=Ni)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Y):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),oe}}const Ri="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Oi=64;function Di(e){let t="";do{const s=e%Oi;e=e/Oi|0,t=Ri[s]+t}while(0!==e);return t}function Li(e,t,s){let i=e,n=1;for(;t.has(i)||ye.has(i)||s?.has(i);)i=`${e}$${Di(n++)}`;return t.add(i),i}let Ti=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,s,i){const n=e.name;let r=this.variables.get(n);return r?r.addDeclaration(e,s):(r=new wi(e.name,e,s||ns,t),this.variables.set(n,r)),r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Mi extends Ti{constructor(e){super(),this.accessedOutsideVariables=new Map,this.parent=e,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Mi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const s=t.get(this)||new Set;for(const t of e)s.add(t);t.set(this,s),this.parent instanceof Mi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Mi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,s,i){for(const i of this.accessedOutsideVariables.values())i.included&&(e.add(i.getBaseVariableName()),"system"===t&&s.has(i)&&e.add("exports"));const n=i.get(this);if(n)for(const t of n)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,s){const i=new Set;if(this.addUsedOutsideNames(i,e,t,s),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&i.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Li(e,i,t.forbiddenNames));for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,s),s}}class Vi extends Mi{constructor(e,t){super(e),this.parameters=[],this.hasRest=!1,this.context=t,this.hoistedBodyVarScope=new Mi(this)}addParameterDeclaration(e){const{name:t}=e,s=new _i(t,e,this.context),i=this.hoistedBodyVarScope.variables.get(t);return i&&(this.hoistedBodyVarScope.variables.set(t,s),s.mergeDeclarations(i)),this.variables.set(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let s=!1,i=!1;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of t)if(s instanceof ei){for(const s of t)s.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n,a=t[r];if(o)if(s=!1,0===o.length)i=!0;else for(const e of o)e.included&&(i=!0),e.calledFromTryStatement&&(s=!0);!i&&a.shouldBeIncluded(e)&&(i=!0),i&&a.include(e,s)}}}class Bi extends Vi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=re;for(const e of this.returnExpressions)e.deoptimizePath(Y)}}}function zi(e,t){if("MemberExpression"===e.type)return!e.computed&&zi(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const Fi=Symbol("PureFunction"),ji=()=>{},Ui=Symbol("Value Properties"),Gi=()=>ie,Wi=()=>!0,qi={deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:()=>!1},Hi={deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:Wi},Ki={__proto__:null,[Ui]:Hi},Yi={__proto__:null,[Ui]:qi},Xi={__proto__:null,[Ui]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Y)},getLiteralValue:Gi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(X,ce,t)}},Qi={__proto__:null,[Ui]:Hi,prototype:Ki},Zi={__proto__:null,[Ui]:qi,prototype:Ki},Ji={__proto__:null,[Ui]:{deoptimizeArgumentsOnCall:ji,getLiteralValue:Gi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ki)},prototype:Ki},en={__proto__:null,[Ui]:qi,from:Ki,of:Yi,prototype:Ki},tn={__proto__:null,[Ui]:qi,supportedLocalesOf:Zi},sn={global:Ki,globalThis:Ki,self:Ki,window:Ki,__proto__:null,[Ui]:Hi,Array:{__proto__:null,[Ui]:Hi,from:Ki,isArray:Yi,of:Yi,prototype:Ki},ArrayBuffer:{__proto__:null,[Ui]:qi,isView:Yi,prototype:Ki},Atomics:Ki,BigInt:Qi,BigInt64Array:Qi,BigUint64Array:Qi,Boolean:Zi,constructor:Qi,DataView:Zi,Date:{__proto__:null,[Ui]:qi,now:Yi,parse:Yi,prototype:Ki,UTC:Yi},decodeURI:Yi,decodeURIComponent:Yi,encodeURI:Yi,encodeURIComponent:Yi,Error:Zi,escape:Yi,eval:Ki,EvalError:Zi,Float32Array:en,Float64Array:en,Function:Qi,hasOwnProperty:Ki,Infinity:Ki,Int16Array:en,Int32Array:en,Int8Array:en,isFinite:Yi,isNaN:Yi,isPrototypeOf:Ki,JSON:Ki,Map:Ji,Math:{__proto__:null,[Ui]:Hi,abs:Yi,acos:Yi,acosh:Yi,asin:Yi,asinh:Yi,atan:Yi,atan2:Yi,atanh:Yi,cbrt:Yi,ceil:Yi,clz32:Yi,cos:Yi,cosh:Yi,exp:Yi,expm1:Yi,floor:Yi,fround:Yi,hypot:Yi,imul:Yi,log:Yi,log10:Yi,log1p:Yi,log2:Yi,max:Yi,min:Yi,pow:Yi,random:Yi,round:Yi,sign:Yi,sin:Yi,sinh:Yi,sqrt:Yi,tan:Yi,tanh:Yi,trunc:Yi},NaN:Ki,Number:{__proto__:null,[Ui]:qi,isFinite:Yi,isInteger:Yi,isNaN:Yi,isSafeInteger:Yi,parseFloat:Yi,parseInt:Yi,prototype:Ki},Object:{__proto__:null,[Ui]:qi,create:Yi,defineProperty:Xi,defineProperties:Xi,freeze:Xi,getOwnPropertyDescriptor:Yi,getOwnPropertyDescriptors:Yi,getOwnPropertyNames:Yi,getOwnPropertySymbols:Yi,getPrototypeOf:Yi,hasOwn:Yi,is:Yi,isExtensible:Yi,isFrozen:Yi,isSealed:Yi,keys:Yi,fromEntries:Ki,entries:Yi,prototype:Ki},parseFloat:Yi,parseInt:Yi,Promise:{__proto__:null,[Ui]:Hi,all:Ki,allSettled:Ki,any:Ki,prototype:Ki,race:Ki,reject:Ki,resolve:Ki},propertyIsEnumerable:Ki,Proxy:Ki,RangeError:Zi,ReferenceError:Zi,Reflect:Ki,RegExp:Zi,Set:Ji,SharedArrayBuffer:Qi,String:{__proto__:null,[Ui]:qi,fromCharCode:Yi,fromCodePoint:Yi,prototype:Ki,raw:Yi},Symbol:{__proto__:null,[Ui]:qi,for:Yi,keyFor:Yi,prototype:Ki,toStringTag:{__proto__:null,[Ui]:{deoptimizeArgumentsOnCall:ji,getLiteralValue:()=>H,hasEffectsWhenCalled:Wi}}},SyntaxError:Zi,toLocaleString:Ki,toString:Ki,TypeError:Zi,Uint16Array:en,Uint32Array:en,Uint8Array:en,Uint8ClampedArray:en,unescape:Yi,URIError:Zi,valueOf:Ki,WeakMap:Ji,WeakSet:Ji,clearInterval:Qi,clearTimeout:Qi,console:{__proto__:null,[Ui]:Hi,assert:Qi,clear:Qi,count:Qi,countReset:Qi,debug:Qi,dir:Qi,dirxml:Qi,error:Qi,exception:Qi,group:Qi,groupCollapsed:Qi,groupEnd:Qi,info:Qi,log:Qi,table:Qi,time:Qi,timeEnd:Qi,timeLog:Qi,trace:Qi,warn:Qi},Intl:{__proto__:null,[Ui]:Hi,Collator:tn,DateTimeFormat:tn,ListFormat:tn,NumberFormat:tn,PluralRules:tn,RelativeTimeFormat:tn},setInterval:Qi,setTimeout:Qi,TextDecoder:Qi,TextEncoder:Qi,URL:Qi,URLSearchParams:Qi,AbortController:Qi,AbortSignal:Qi,addEventListener:Ki,alert:Ki,AnalyserNode:Qi,Animation:Qi,AnimationEvent:Qi,applicationCache:Ki,ApplicationCache:Qi,ApplicationCacheErrorEvent:Qi,atob:Ki,Attr:Qi,Audio:Qi,AudioBuffer:Qi,AudioBufferSourceNode:Qi,AudioContext:Qi,AudioDestinationNode:Qi,AudioListener:Qi,AudioNode:Qi,AudioParam:Qi,AudioProcessingEvent:Qi,AudioScheduledSourceNode:Qi,AudioWorkletNode:Qi,BarProp:Qi,BaseAudioContext:Qi,BatteryManager:Qi,BeforeUnloadEvent:Qi,BiquadFilterNode:Qi,Blob:Qi,BlobEvent:Qi,blur:Ki,BroadcastChannel:Qi,btoa:Ki,ByteLengthQueuingStrategy:Qi,Cache:Qi,caches:Ki,CacheStorage:Qi,cancelAnimationFrame:Ki,cancelIdleCallback:Ki,CanvasCaptureMediaStreamTrack:Qi,CanvasGradient:Qi,CanvasPattern:Qi,CanvasRenderingContext2D:Qi,ChannelMergerNode:Qi,ChannelSplitterNode:Qi,CharacterData:Qi,clientInformation:Ki,ClipboardEvent:Qi,close:Ki,closed:Ki,CloseEvent:Qi,Comment:Qi,CompositionEvent:Qi,confirm:Ki,ConstantSourceNode:Qi,ConvolverNode:Qi,CountQueuingStrategy:Qi,createImageBitmap:Ki,Credential:Qi,CredentialsContainer:Qi,crypto:Ki,Crypto:Qi,CryptoKey:Qi,CSS:Qi,CSSConditionRule:Qi,CSSFontFaceRule:Qi,CSSGroupingRule:Qi,CSSImportRule:Qi,CSSKeyframeRule:Qi,CSSKeyframesRule:Qi,CSSMediaRule:Qi,CSSNamespaceRule:Qi,CSSPageRule:Qi,CSSRule:Qi,CSSRuleList:Qi,CSSStyleDeclaration:Qi,CSSStyleRule:Qi,CSSStyleSheet:Qi,CSSSupportsRule:Qi,CustomElementRegistry:Qi,customElements:Ki,CustomEvent:Qi,DataTransfer:Qi,DataTransferItem:Qi,DataTransferItemList:Qi,defaultstatus:Ki,defaultStatus:Ki,DelayNode:Qi,DeviceMotionEvent:Qi,DeviceOrientationEvent:Qi,devicePixelRatio:Ki,dispatchEvent:Ki,document:Ki,Document:Qi,DocumentFragment:Qi,DocumentType:Qi,DOMError:Qi,DOMException:Qi,DOMImplementation:Qi,DOMMatrix:Qi,DOMMatrixReadOnly:Qi,DOMParser:Qi,DOMPoint:Qi,DOMPointReadOnly:Qi,DOMQuad:Qi,DOMRect:Qi,DOMRectReadOnly:Qi,DOMStringList:Qi,DOMStringMap:Qi,DOMTokenList:Qi,DragEvent:Qi,DynamicsCompressorNode:Qi,Element:Qi,ErrorEvent:Qi,Event:Qi,EventSource:Qi,EventTarget:Qi,external:Ki,fetch:Ki,File:Qi,FileList:Qi,FileReader:Qi,find:Ki,focus:Ki,FocusEvent:Qi,FontFace:Qi,FontFaceSetLoadEvent:Qi,FormData:Qi,frames:Ki,GainNode:Qi,Gamepad:Qi,GamepadButton:Qi,GamepadEvent:Qi,getComputedStyle:Ki,getSelection:Ki,HashChangeEvent:Qi,Headers:Qi,history:Ki,History:Qi,HTMLAllCollection:Qi,HTMLAnchorElement:Qi,HTMLAreaElement:Qi,HTMLAudioElement:Qi,HTMLBaseElement:Qi,HTMLBodyElement:Qi,HTMLBRElement:Qi,HTMLButtonElement:Qi,HTMLCanvasElement:Qi,HTMLCollection:Qi,HTMLContentElement:Qi,HTMLDataElement:Qi,HTMLDataListElement:Qi,HTMLDetailsElement:Qi,HTMLDialogElement:Qi,HTMLDirectoryElement:Qi,HTMLDivElement:Qi,HTMLDListElement:Qi,HTMLDocument:Qi,HTMLElement:Qi,HTMLEmbedElement:Qi,HTMLFieldSetElement:Qi,HTMLFontElement:Qi,HTMLFormControlsCollection:Qi,HTMLFormElement:Qi,HTMLFrameElement:Qi,HTMLFrameSetElement:Qi,HTMLHeadElement:Qi,HTMLHeadingElement:Qi,HTMLHRElement:Qi,HTMLHtmlElement:Qi,HTMLIFrameElement:Qi,HTMLImageElement:Qi,HTMLInputElement:Qi,HTMLLabelElement:Qi,HTMLLegendElement:Qi,HTMLLIElement:Qi,HTMLLinkElement:Qi,HTMLMapElement:Qi,HTMLMarqueeElement:Qi,HTMLMediaElement:Qi,HTMLMenuElement:Qi,HTMLMetaElement:Qi,HTMLMeterElement:Qi,HTMLModElement:Qi,HTMLObjectElement:Qi,HTMLOListElement:Qi,HTMLOptGroupElement:Qi,HTMLOptionElement:Qi,HTMLOptionsCollection:Qi,HTMLOutputElement:Qi,HTMLParagraphElement:Qi,HTMLParamElement:Qi,HTMLPictureElement:Qi,HTMLPreElement:Qi,HTMLProgressElement:Qi,HTMLQuoteElement:Qi,HTMLScriptElement:Qi,HTMLSelectElement:Qi,HTMLShadowElement:Qi,HTMLSlotElement:Qi,HTMLSourceElement:Qi,HTMLSpanElement:Qi,HTMLStyleElement:Qi,HTMLTableCaptionElement:Qi,HTMLTableCellElement:Qi,HTMLTableColElement:Qi,HTMLTableElement:Qi,HTMLTableRowElement:Qi,HTMLTableSectionElement:Qi,HTMLTemplateElement:Qi,HTMLTextAreaElement:Qi,HTMLTimeElement:Qi,HTMLTitleElement:Qi,HTMLTrackElement:Qi,HTMLUListElement:Qi,HTMLUnknownElement:Qi,HTMLVideoElement:Qi,IDBCursor:Qi,IDBCursorWithValue:Qi,IDBDatabase:Qi,IDBFactory:Qi,IDBIndex:Qi,IDBKeyRange:Qi,IDBObjectStore:Qi,IDBOpenDBRequest:Qi,IDBRequest:Qi,IDBTransaction:Qi,IDBVersionChangeEvent:Qi,IdleDeadline:Qi,IIRFilterNode:Qi,Image:Qi,ImageBitmap:Qi,ImageBitmapRenderingContext:Qi,ImageCapture:Qi,ImageData:Qi,indexedDB:Ki,innerHeight:Ki,innerWidth:Ki,InputEvent:Qi,IntersectionObserver:Qi,IntersectionObserverEntry:Qi,isSecureContext:Ki,KeyboardEvent:Qi,KeyframeEffect:Qi,length:Ki,localStorage:Ki,location:Ki,Location:Qi,locationbar:Ki,matchMedia:Ki,MediaDeviceInfo:Qi,MediaDevices:Qi,MediaElementAudioSourceNode:Qi,MediaEncryptedEvent:Qi,MediaError:Qi,MediaKeyMessageEvent:Qi,MediaKeySession:Qi,MediaKeyStatusMap:Qi,MediaKeySystemAccess:Qi,MediaList:Qi,MediaQueryList:Qi,MediaQueryListEvent:Qi,MediaRecorder:Qi,MediaSettingsRange:Qi,MediaSource:Qi,MediaStream:Qi,MediaStreamAudioDestinationNode:Qi,MediaStreamAudioSourceNode:Qi,MediaStreamEvent:Qi,MediaStreamTrack:Qi,MediaStreamTrackEvent:Qi,menubar:Ki,MessageChannel:Qi,MessageEvent:Qi,MessagePort:Qi,MIDIAccess:Qi,MIDIConnectionEvent:Qi,MIDIInput:Qi,MIDIInputMap:Qi,MIDIMessageEvent:Qi,MIDIOutput:Qi,MIDIOutputMap:Qi,MIDIPort:Qi,MimeType:Qi,MimeTypeArray:Qi,MouseEvent:Qi,moveBy:Ki,moveTo:Ki,MutationEvent:Qi,MutationObserver:Qi,MutationRecord:Qi,name:Ki,NamedNodeMap:Qi,NavigationPreloadManager:Qi,navigator:Ki,Navigator:Qi,NetworkInformation:Qi,Node:Qi,NodeFilter:Ki,NodeIterator:Qi,NodeList:Qi,Notification:Qi,OfflineAudioCompletionEvent:Qi,OfflineAudioContext:Qi,offscreenBuffering:Ki,OffscreenCanvas:Qi,open:Ki,openDatabase:Ki,Option:Qi,origin:Ki,OscillatorNode:Qi,outerHeight:Ki,outerWidth:Ki,PageTransitionEvent:Qi,pageXOffset:Ki,pageYOffset:Ki,PannerNode:Qi,parent:Ki,Path2D:Qi,PaymentAddress:Qi,PaymentRequest:Qi,PaymentRequestUpdateEvent:Qi,PaymentResponse:Qi,performance:Ki,Performance:Qi,PerformanceEntry:Qi,PerformanceLongTaskTiming:Qi,PerformanceMark:Qi,PerformanceMeasure:Qi,PerformanceNavigation:Qi,PerformanceNavigationTiming:Qi,PerformanceObserver:Qi,PerformanceObserverEntryList:Qi,PerformancePaintTiming:Qi,PerformanceResourceTiming:Qi,PerformanceTiming:Qi,PeriodicWave:Qi,Permissions:Qi,PermissionStatus:Qi,personalbar:Ki,PhotoCapabilities:Qi,Plugin:Qi,PluginArray:Qi,PointerEvent:Qi,PopStateEvent:Qi,postMessage:Ki,Presentation:Qi,PresentationAvailability:Qi,PresentationConnection:Qi,PresentationConnectionAvailableEvent:Qi,PresentationConnectionCloseEvent:Qi,PresentationConnectionList:Qi,PresentationReceiver:Qi,PresentationRequest:Qi,print:Ki,ProcessingInstruction:Qi,ProgressEvent:Qi,PromiseRejectionEvent:Qi,prompt:Ki,PushManager:Qi,PushSubscription:Qi,PushSubscriptionOptions:Qi,queueMicrotask:Ki,RadioNodeList:Qi,Range:Qi,ReadableStream:Qi,RemotePlayback:Qi,removeEventListener:Ki,Request:Qi,requestAnimationFrame:Ki,requestIdleCallback:Ki,resizeBy:Ki,ResizeObserver:Qi,ResizeObserverEntry:Qi,resizeTo:Ki,Response:Qi,RTCCertificate:Qi,RTCDataChannel:Qi,RTCDataChannelEvent:Qi,RTCDtlsTransport:Qi,RTCIceCandidate:Qi,RTCIceTransport:Qi,RTCPeerConnection:Qi,RTCPeerConnectionIceEvent:Qi,RTCRtpReceiver:Qi,RTCRtpSender:Qi,RTCSctpTransport:Qi,RTCSessionDescription:Qi,RTCStatsReport:Qi,RTCTrackEvent:Qi,screen:Ki,Screen:Qi,screenLeft:Ki,ScreenOrientation:Qi,screenTop:Ki,screenX:Ki,screenY:Ki,ScriptProcessorNode:Qi,scroll:Ki,scrollbars:Ki,scrollBy:Ki,scrollTo:Ki,scrollX:Ki,scrollY:Ki,SecurityPolicyViolationEvent:Qi,Selection:Qi,ServiceWorker:Qi,ServiceWorkerContainer:Qi,ServiceWorkerRegistration:Qi,sessionStorage:Ki,ShadowRoot:Qi,SharedWorker:Qi,SourceBuffer:Qi,SourceBufferList:Qi,speechSynthesis:Ki,SpeechSynthesisEvent:Qi,SpeechSynthesisUtterance:Qi,StaticRange:Qi,status:Ki,statusbar:Ki,StereoPannerNode:Qi,stop:Ki,Storage:Qi,StorageEvent:Qi,StorageManager:Qi,styleMedia:Ki,StyleSheet:Qi,StyleSheetList:Qi,SubtleCrypto:Qi,SVGAElement:Qi,SVGAngle:Qi,SVGAnimatedAngle:Qi,SVGAnimatedBoolean:Qi,SVGAnimatedEnumeration:Qi,SVGAnimatedInteger:Qi,SVGAnimatedLength:Qi,SVGAnimatedLengthList:Qi,SVGAnimatedNumber:Qi,SVGAnimatedNumberList:Qi,SVGAnimatedPreserveAspectRatio:Qi,SVGAnimatedRect:Qi,SVGAnimatedString:Qi,SVGAnimatedTransformList:Qi,SVGAnimateElement:Qi,SVGAnimateMotionElement:Qi,SVGAnimateTransformElement:Qi,SVGAnimationElement:Qi,SVGCircleElement:Qi,SVGClipPathElement:Qi,SVGComponentTransferFunctionElement:Qi,SVGDefsElement:Qi,SVGDescElement:Qi,SVGDiscardElement:Qi,SVGElement:Qi,SVGEllipseElement:Qi,SVGFEBlendElement:Qi,SVGFEColorMatrixElement:Qi,SVGFEComponentTransferElement:Qi,SVGFECompositeElement:Qi,SVGFEConvolveMatrixElement:Qi,SVGFEDiffuseLightingElement:Qi,SVGFEDisplacementMapElement:Qi,SVGFEDistantLightElement:Qi,SVGFEDropShadowElement:Qi,SVGFEFloodElement:Qi,SVGFEFuncAElement:Qi,SVGFEFuncBElement:Qi,SVGFEFuncGElement:Qi,SVGFEFuncRElement:Qi,SVGFEGaussianBlurElement:Qi,SVGFEImageElement:Qi,SVGFEMergeElement:Qi,SVGFEMergeNodeElement:Qi,SVGFEMorphologyElement:Qi,SVGFEOffsetElement:Qi,SVGFEPointLightElement:Qi,SVGFESpecularLightingElement:Qi,SVGFESpotLightElement:Qi,SVGFETileElement:Qi,SVGFETurbulenceElement:Qi,SVGFilterElement:Qi,SVGForeignObjectElement:Qi,SVGGElement:Qi,SVGGeometryElement:Qi,SVGGradientElement:Qi,SVGGraphicsElement:Qi,SVGImageElement:Qi,SVGLength:Qi,SVGLengthList:Qi,SVGLinearGradientElement:Qi,SVGLineElement:Qi,SVGMarkerElement:Qi,SVGMaskElement:Qi,SVGMatrix:Qi,SVGMetadataElement:Qi,SVGMPathElement:Qi,SVGNumber:Qi,SVGNumberList:Qi,SVGPathElement:Qi,SVGPatternElement:Qi,SVGPoint:Qi,SVGPointList:Qi,SVGPolygonElement:Qi,SVGPolylineElement:Qi,SVGPreserveAspectRatio:Qi,SVGRadialGradientElement:Qi,SVGRect:Qi,SVGRectElement:Qi,SVGScriptElement:Qi,SVGSetElement:Qi,SVGStopElement:Qi,SVGStringList:Qi,SVGStyleElement:Qi,SVGSVGElement:Qi,SVGSwitchElement:Qi,SVGSymbolElement:Qi,SVGTextContentElement:Qi,SVGTextElement:Qi,SVGTextPathElement:Qi,SVGTextPositioningElement:Qi,SVGTitleElement:Qi,SVGTransform:Qi,SVGTransformList:Qi,SVGTSpanElement:Qi,SVGUnitTypes:Qi,SVGUseElement:Qi,SVGViewElement:Qi,TaskAttributionTiming:Qi,Text:Qi,TextEvent:Qi,TextMetrics:Qi,TextTrack:Qi,TextTrackCue:Qi,TextTrackCueList:Qi,TextTrackList:Qi,TimeRanges:Qi,toolbar:Ki,top:Ki,Touch:Qi,TouchEvent:Qi,TouchList:Qi,TrackEvent:Qi,TransitionEvent:Qi,TreeWalker:Qi,UIEvent:Qi,ValidityState:Qi,visualViewport:Ki,VisualViewport:Qi,VTTCue:Qi,WaveShaperNode:Qi,WebAssembly:Ki,WebGL2RenderingContext:Qi,WebGLActiveInfo:Qi,WebGLBuffer:Qi,WebGLContextEvent:Qi,WebGLFramebuffer:Qi,WebGLProgram:Qi,WebGLQuery:Qi,WebGLRenderbuffer:Qi,WebGLRenderingContext:Qi,WebGLSampler:Qi,WebGLShader:Qi,WebGLShaderPrecisionFormat:Qi,WebGLSync:Qi,WebGLTexture:Qi,WebGLTransformFeedback:Qi,WebGLUniformLocation:Qi,WebGLVertexArrayObject:Qi,WebSocket:Qi,WheelEvent:Qi,Window:Qi,Worker:Qi,WritableStream:Qi,XMLDocument:Qi,XMLHttpRequest:Qi,XMLHttpRequestEventTarget:Qi,XMLHttpRequestUpload:Qi,XMLSerializer:Qi,XPathEvaluator:Qi,XPathExpression:Qi,XPathResult:Qi,XSLTProcessor:Qi};for(const e of["window","global","self","globalThis"])sn[e]=sn;function nn(e){let t=sn;for(const s of e){if("string"!=typeof s)return null;if(t=t[s],!t)return null}return t[Ui]}class rn extends ue{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,s){switch(e.type){case 0:case 1:return void(nn([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,s));case 2:{const i=nn([this.name,...t]);return void(i?i.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,s))}}}getLiteralValueAtPath(e,t,s){const i=nn([this.name,...e]);return i?i.getLiteralValue():se}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!nn([this.name]):!nn([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const i=nn([this.name,...e]);return!i||i.hasEffectsWhenCalled(t,s)}}}}const on={__proto__:null,class:!0,const:!0,let:!0,var:!0};class an extends Js{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&zi(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let s;const{treeshake:i}=this.context.options;switch(e){case"var":s=this.scope.addDeclaration(this,this.context,t,!0),i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":s=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":s=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return s.kind=e,[this.variable=s]}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const[n,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,s,i);return[n,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof rn&&!this.isPureFunction(K)&&this.variable.hasEffectsOnInteractionAtPath(K,le,e)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,s);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(null!==this.isTDZAccess)return this.isTDZAccess;if(!(this.variable instanceof wi&&this.variable.kind&&this.variable.kind in on&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let e;return this.variable.declarations&&1===this.variable.declarations.length&&(e=this.variable.declarations[0])&&this.start=i)return i;n=e.charCodeAt(++s),++s,(s=47===n?e.indexOf("\n",s)+1:e.indexOf("*/",s)+2)>i&&(i=e.indexOf(t,s))}}const pn=/\S/g;function fn(e,t){pn.lastIndex=t;return pn.exec(e).index}function mn(e){let t,s,i=0;for(t=e.indexOf("\n",i);;){if(i=e.indexOf("/",i),-1===i||i>t)return[t,t+1];if(s=e.charCodeAt(i+1),47===s)return[i,t+1];i=e.indexOf("*/",i+3)+2,i>t&&(t=e.indexOf("\n",i))}}function gn(e,t,s,i,n){let r,o,a,l,c=e[0],h=!c.included||c.needsBoundaries;h&&(l=s+mn(t.original.slice(s,c.start))[1]);for(let s=1;s<=e.length;s++)r=c,o=l,a=h,c=e[s],h=void 0!==c&&(!c.included||c.needsBoundaries),a||h?(l=r.end+mn(t.original.slice(r.end,void 0===c?i:c.start))[1],r.included?a?r.render(t,n,{end:l,start:o}):r.render(t,n):cn(r,t,o,l)):r.render(t,n)}function yn(e,t,s,i){const n=[];let r,o,a,l,c=s-1;for(const i of e){for(void 0!==r&&(c=r.end+dn(t.original.slice(r.end,i.start),",")),o=a=c+1+mn(t.original.slice(c+1,i.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&n.push({contentEnd:a,end:o,node:r,separator:c,start:s}),r=i,s=o}return n.push({contentEnd:i,end:i,node:r,separator:null,start:s}),n}function xn(e,t,s){for(;;){const[i,n]=mn(e.original.slice(t,s));if(-1===i)break;e.remove(t+i,t+=n)}}class En extends Mi{addDeclaration(e,t,s,i){if(i){const n=this.parent.addDeclaration(e,t,s,i);return n.markInitializersForDeoptimization(),n}return super.addDeclaration(e,t,s,!1)}}class bn extends Js{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===Ts&&this.context.log(ve,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${T(t)}" was ignored.`}),this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ts:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class vn extends Js{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(re)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new En(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof bn&&"use asm"===e.directive}render(e,t){this.body.length>0?gn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class Sn extends Js{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,re)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(K)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(K,t,s)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([G,G]),this.context.requestTreeshakingPass())}}class An extends Js{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(2===e.type){const{parameters:t}=this.scope,{args:s}=e;let i=!1;for(let e=0;e0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Y),this.context.requestTreeshakingPass()),oe):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,s){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],he,s)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],le,s)))return!0}for(const e of this.params)if(e.hasEffects(s))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:s}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=s}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",re))),this.params[this.params.length-1]instanceof Sn),this.body instanceof vn?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===Is&&(this.body=new vn(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}An.prototype.preventChildBlockScope=!0;class kn extends An{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Bi(e,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=e,s.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const s of this.params)s instanceof an||s.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ai([],hi)}}function In(e,{exportNamesByVariable:t,snippets:{_:s,getObject:i,getPropertyAccess:n}},r=""){if(1===e.length&&1===t.get(e[0]).length){const i=e[0];return`exports('${t.get(i)}',${s}${i.getName(n)}${r})`}{const s=[];for(const i of e)for(const e of t.get(i))s.push([e,i.getName(n)+r]);return`exports(${i(s,{lineBreakIndent:null})})`}}function wn(e,t,s,i,{exportNamesByVariable:n,snippets:{_:r}}){i.prependRight(t,`exports('${n.get(e)}',${r}`),i.appendLeft(s,")")}function Pn(e,t,s,i,n,r){const{_:o,getPropertyAccess:a}=r.snippets;n.appendLeft(s,`,${o}${In([e],r)},${o}${e.getName(a)}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}class Cn extends Js{addExportedVariables(e,t){for(const s of this.properties)"Property"===s.type?s.value.addExportedVariables(e,t):s.argument.addExportedVariables(e,t)}declare(e,t){const s=[];for(const i of this.properties)s.push(...i.declare(e,t));return s}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(K,t,s))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class $n extends wi{constructor(e){super("arguments",null,re,e),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Y):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Y);this.deoptimizedArguments.length=0}}class Nn extends _i{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,s){return(s.replacedVariableInits.get(this)||re).hasEffectsOnInteractionAtPath(e,t,s)}}class _n extends Bi{constructor(e,t){super(e,t),this.variables.set("arguments",this.argumentsVariable=new $n(t)),this.variables.set("this",this.thisVariable=new Nn(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const s of t)s.included||s.include(e,!1)}}class Rn extends An{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new _n(e,this.context),this.constructedEntity=new ai(Object.create(null),hi),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){super.deoptimizeArgumentsOnInteractionAtPath(e,t,s),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:re);const{brokenFlow:i,ignore:n,replacedVariableInits:r}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(s))return!0;s.brokenFlow=i,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),s.ignore=n}return!1}include(e,t){super.include(e,t),this.id?.include();const s=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof an&&!s||i.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ai([{key:"prototype",kind:"init",property:new ai([],hi)}],hi)}}class On extends Js{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Rn||e instanceof kn)break e}while(e=e.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Dn={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>ee<e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};function Ln(e,t,s){if(s.arguments.length>0)if(s.arguments[s.arguments.length-1].included)for(const i of s.arguments)i.render(e,t);else{let i=s.arguments.length-2;for(;i>=0&&!s.arguments[i].included;)i--;if(i>=0){for(let n=0;n<=i;n++)s.arguments[n].render(e,t);e.remove(dn(e.original,",",s.arguments[i].end),s.end-1)}else e.remove(dn(e.original,"(",s.callee.end)+1,s.end-1)}}class Tn extends Js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.context.code.charCodeAt(this.start)?se:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?oe:Es(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||xs(this.members,e[0],t,s))}}initialise(){this.members=function(e){if(e instanceof RegExp)return gs;switch(typeof e){case"boolean":return fs;case"number":return ms;case"string":return ys}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Mn(e){return e.computed?function(e){if(e instanceof Tn)return String(e.value);return null}(e.property):e.property.name}function Vn(e){const t=e.propertyKey,s=e.object;if("string"==typeof t){if(s instanceof an)return[{key:s.name,pos:s.start},{key:t,pos:e.property.start}];if(s instanceof Bn){const i=Vn(s);return i&&[...i,{key:t,pos:e.property.start}]}}return null}class Bn extends Js{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const e=Vn(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const s=zn(t,e.slice(1),this.context);s?"undefined"===s?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let s=1;s!!e&&e!==re));if(0!==o.length)if(n===re)for(const e of o)e.deoptimizePath(Y);else s.withTrackedEntityAtPath(t,n,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);n.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==re){this.returnExpression=oe;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ge,this.deoptimizableDependentExpressions=me;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Y)}}deoptimizePath(e){if(0===e.length||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==re&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){const[i]=this.getReturnExpression(t);return i===re?se:t.withTrackedEntityAtPath(e,i,(()=>(this.deoptimizableDependentExpressions.push(s),i.getLiteralValueAtPath(e,t,s))),se)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getReturnExpression(s);return n[0]===re?n:s.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(i);const[r,o]=n[0].getReturnExpressionWhenCalledAtPath(e,t,s,i);return[r,o||n[1]]}),oe)}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(2===i){const{args:i,withNew:n}=t;if((n?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,i,this))return!1}else if((1===i?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[n,r]=this.getReturnExpression();return(1===i||!r)&&n.hasEffectsOnInteractionAtPath(e,t,s)}}class jn extends Fn{bind(){if(super.bind(),this.callee instanceof an){this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(ve,Rt(this.callee.name),this.start),"eval"===this.callee.name&&this.context.log(ve,{code:"EVAL",id:e=this.context.module.id,message:`Use of eval in "${T(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Oe("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Bn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(K,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Zs&&this.callee instanceof an&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(K,ee,e)}render(e,t,{renderedSurroundingElement:s}=pe){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:s}),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}getReturnExpression(e=ee){return null===this.returnExpression?(this.returnExpression=oe,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(K,this.interaction,e,this)):this.returnExpression}}class Un extends Vi{addDeclaration(e,t,s,i){const n=this.variables.get(e.name);return n?(this.parent.addDeclaration(e,t,ns,i),n.addDeclaration(e,s),n):this.parent.addDeclaration(e,t,s,i)}}class Gn extends Mi{constructor(e,t,s){super(e),this.variables.set("this",this.thisVariable=new wi("this",null,t,s)),this.instanceScope=new Mi(this),this.instanceScope.variables.set("this",new Nn(s))}findLexicalBoundary(){return this}}class Wn extends Js{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},K,s):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(K,{args:t.args,type:2,withNew:!1},s):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=oe,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(K,he,ee,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class qn extends Wn{applyDeoptimizations(){}}class Hn extends ne{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],s)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,s){return this.object.getLiteralValueAtPath([this.key,...e],t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,s)}}class Kn extends Js{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Mi(e)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,s):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,s))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof qn&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof qn&&"constructor"===e.kind||e.deoptimizePath(Y);this.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const s of this.body.body){const i=s.static?e:t,n=s.kind;if(i===t&&!n)continue;const r="set"===n||"get"===n?n:"init";let o;if(s.computed){const e=s.key.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e){i.push({key:G,kind:r,property:s});continue}o=String(e)}else o=s.key instanceof an?s.key.name:String(s.key.value);i.push({key:o,kind:r,property:s})}return e.unshift({key:"prototype",kind:"init",property:new ai(t,this.superClass?new Hn(this.superClass,"prototype"):hi)}),this.objectEntity=new ai(e,this.superClass||hi)}}class Yn extends Kn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new an(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===i&&s.has(o)&&e.appendLeft(this.end,`${n}${In([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${n}=${n}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:s,variable:i}=e;for(const e of t.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}class Xn extends Kn{render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s===_s&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Qn extends ne{constructor(e){super(),this.expressions=e,this.included=!1}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return[new Qn(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,s){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(e,t,s))return!0;return!1}}function Zn(e,t){const{brokenFlow:s,hasBreak:i,hasContinue:n,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=i,e.hasContinue=n,e.brokenFlow=s,!1)}function Jn(e,t,s){const{brokenFlow:i,hasBreak:n,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,s,{asSingleStatement:!0}),e.hasBreak=n,e.hasContinue=r,e.brokenFlow=i}class er extends Js{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}er.prototype.needsBoundaries=!0;class tr extends Rn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new an(e.id,this,this.scope.parent)),super.parseNode(e)}}class sr extends Js{include(e,t){super.include(e,t),t&&this.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s,r=function(e,t){return fn(e,dn(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof tr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const s=dn(e,"function",t)+8;e=e.slice(s,dn(e,"(",s));const i=dn(e,"*");return-1===i?s:s+i+1}(e.original,r):null,t);else if(this.declaration instanceof Yn)this.renderNamedDeclaration(e,r,null===this.declaration.id?dn(e.original,"class",i)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void cn(this,e,i,n);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:_s}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,s,i){const{exportNamesByVariable:n,format:r,snippets:{getPropertyAccess:o}}=i,a=this.variable.getName(o);e.remove(this.start,t),null!==s&&e.appendLeft(s,` ${a}`),"system"===r&&this.declaration instanceof Yn&&n.has(this.variable)&&e.appendLeft(this.end,` ${In([this.variable],i)};`)}renderVariableDeclaration(e,t,{format:s,exportNamesByVariable:i,snippets:{cnst:n,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===s&&i.get(this.variable);a?(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${a[0]}', `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}sr.prototype.needsBoundaries=!0;class ir extends Js{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s;null===this.declaration?e.remove(i,n):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:n,start:i}))}applyDeoptimizations(){}}ir.prototype.needsBoundaries=!0;class nr extends Rn{render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s===_s&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class rr extends En{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,s,i)}}const or=Symbol("unset");class ar extends Js{constructor(){super(...arguments),this.testValue=or}deoptimizeCache(){this.testValue=se}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const s=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&s,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new rr(this.scope),this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new rr(this.scope),this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:s}}=t,i=this.getTestValue(),n=[],r=this.test.included,o=!this.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof i||i)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),n.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof i&&i?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),n.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(n,e,s)}applyDeoptimizations(){}getTestValue(){return this.testValue===or?this.testValue=this.test.getLiteralValueAtPath(K,ee,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let s=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),s=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&s)}renderHoistedDeclarations(e,t,s){const i=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(s):""})))].filter(Boolean).join(", ");if(i){const e=this.parent.type,s=e!==Ts&&e!==Is;t.prependRight(this.start,`${s?"{ ":""}var ${i}; `),s&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof ar&&e.alternate)return!0;if(e instanceof vn)return!1;e=e.parent}while(e);return!1}}class lr extends Js{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}lr.prototype.needsBoundaries=!0;class cr extends Js{applyDeoptimizations(){}}const hr="_interopDefault",ur="_interopDefaultCompat",dr="_interopNamespace",pr="_interopNamespaceCompat",fr="_interopNamespaceDefault",mr="_interopNamespaceDefaultOnly",gr="_mergeNamespaces",yr={auto:hr,compat:ur,default:null,defaultOnly:null,esModule:null},xr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Er={auto:dr,compat:pr,default:fr,defaultOnly:mr,esModule:null},br=(e,t)=>"esModule"!==e&&xr(e,t),vr=(e,t,s,i,n,r,o)=>{const a=new Set(e);for(const e of Lr)t.has(e)&&a.add(e);return Lr.map((e=>a.has(e)?Sr[e](s,i,n,r,o,a):"")).join("")},Sr={[ur](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:ur});return`${o}${Ir(t)}${i}?${i}${s?Ar(t):kr(t)}${a}${r}${r}`},[hr](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:hr});return`${o}e${i}&&${i}e.__esModule${i}?${i}${s?Ar(t):kr(t)}${a}${r}${r}`},[pr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(fr)){const[e,s]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:pr});return`${e}${Ir(t)}${o}?${o}e${o}:${o}${fr}(e)${s}${l}${l}`}return`function ${pr}(e)${o}{${l}${e}if${o}(${Ir(t)})${o}return e;${l}`+wr(e,e,t,s,i,n)+`}${l}${l}`},[mr](e,t,s,i,n){const{getDirectReturnFunction:r,getObject:o,n:a}=t,[l,c]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:mr});return`${l}${Or(i,Dr(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${c}${a}${a}`},[fr](e,t,s,i,n){const{_:r,n:o}=t;return`function ${fr}(e)${r}{${o}`+wr(e,e,t,s,i,n)+`}${o}${o}`},[dr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(fr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${fr}(e)${t}${l}${l}`}return`function ${dr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+wr(e,e,t,s,i,n)+`}${l}${l}`},[gr](e,t,s,i,n){const{_:r,cnst:o,n:a}=t,l="var"===o&&s;return`function ${gr}(n, m)${r}{${a}${e}${Cr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(s?l?Nr:_r:Rr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Or(i,Dr(n,"n",t))};${a}}${a}${a}`}},Ar=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,kr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Ir=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,wr=(e,t,s,i,n,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}=s,d=`{${h}`+(i?$r:Rr)(e,t+e+e,s)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Tr(l)}${o}}`:""});${h}${t}if${o}(e)${o}{${h}${t}${e}${Pr(d,!i,s)}${h}${t}}${h}${t}n${c("default")}${o}=${o}e;${h}${t}return ${Or(n,"n")}${u}${h}`},Pr=(e,t,{_:s,cnst:i,getFunctionIntro:n,s:r})=>"var"!==i||t?`for${s}(${i} k in e)${s}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:!1,name:null})}${e})${r}`,Cr=(e,t,s,{_:i,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,n]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:s,t:s},name:null});return`m.forEach(${t}e${i}&&${i}typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e)${i}&&${i}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${n});`}return`for${i}(var i${i}=${i}0;${i}i${i}<${i}m.length;${i}i++)${i}{${a}${s}${s}${n} e${i}=${i}m[i];${a}${s}${s}if${i}(typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e))${i}{${i}for${i}(${n} k in e)${i}${e}${i}}${a}${s}}`},$r=(e,t,s)=>{const{_:i,n:n}=s;return`${t}if${i}(k${i}!==${i}'default')${i}{${n}`+Nr(e,t+e,s)+`${t}}${n}`},Nr=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}enumerable:${s}true,${r}${t}${e}get:${s}${o}e[k]${a}${r}${t}});${r}`},_r=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}if${s}(d)${s}{${r}${t}${e}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}${e}enumerable:${s}true,${r}${t}${e}${e}get:${s}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Rr=(e,t,{_:s,n:i})=>`${t}n[k]${s}=${s}e[k];${i}`,Or=(e,t)=>e?`Object.freeze(${t})`:t,Dr=(e,t,{_:s,getObject:i})=>e?`Object.defineProperty(${t},${s}Symbol.toStringTag,${s}${Tr(i)})`:t,Lr=Object.keys(Sr);function Tr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function Mr(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Vr extends Js{declareDeclarator(e){this.id.declare(e,this.init||ns)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:s,id:i,init:n}=this;s||this.applyDeoptimizations(),this.included=!0,n?.include(e,t),i.markDeclarationReached(),(t||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t){const{exportNamesByVariable:s,snippets:{_:i,getPropertyAccess:n}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=dn(e.original,"=",o.end);e.remove(l,fn(e.original,t+1))}if(a){if(o instanceof an&&a instanceof Xn&&!a.id){o.variable.getName(n)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?pe:{renderedSurroundingElement:_s})}else o instanceof an&&Mr(o.variable,s)&&e.appendLeft(r,`${i}=${i}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof an&&t instanceof Xn&&!t.id){const{name:s,variable:i}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}function Br(e,t,s){return"external"===t?Er[s(e instanceof Zt?e.id:null)]:"default"===t?mr:null}const zr={amd:["require"],cjs:["require"],system:["module"]};function Fr(e){const t=[];for(const s of e.properties){if("RestElement"===s.type||s.computed||"Identifier"!==s.key.type)return;t.push(s.key.name)}return t}class jr extends Js{applyDeoptimizations(){}}const Ur="ROLLUP_FILE_URL_",Gr="import";const Wr={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},qr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Hr=(e,t="URL")=>`new ${t}(${e}).href`,Kr=(e,t=!1)=>Hr(`'${D(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Yr=e=>(t,{chunkId:s})=>{const i=e(s);return null===t?`({ url: ${i} })`:"url"===t?i:"undefined"},Xr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Qr=e=>Xr(`__dirname + '/${e}'`),Zr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${D(e)}', document.baseURI).href)`,Jr={amd:e=>("."!==e[0]&&(e="./"+e),Hr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Qr(e)} : ${Kr(e)})`,es:e=>Hr(`'${e}', import.meta.url`),iife:e=>Kr(e),system:e=>Hr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Qr(e)} : ${Kr(e,!0)})`},eo={amd:Yr((()=>Hr("module.uri, document.baseURI"))),cjs:Yr((e=>`(typeof document === 'undefined' ? ${Xr("__filename")} : ${Zr(e)})`)),iife:Yr((e=>Zr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Yr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Xr("__filename")} : ${Zr(e,!0)})`))};class to extends Js{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(ss()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:s,module:i}=this.context;s(Se,Lt(e,i.id,we(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){let s=this.start;if(e.original.startsWith("#!")&&(s=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,s)),this.body.length>0){for(;"/"===e.original[s]&&/[*/]/.test(e.original[s+1]);){const t=mn(e.original.slice(s,this.body[0].start));if(-1===t[0])break;s+=t[1]}gn(this.body,e,s,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class so extends Js{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const s of this.consequent)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t,s){if(this.consequent.length>0){this.test&&this.test.render(e,t);const i=this.test?this.test.end:dn(e.original,"default",this.start)+7,n=dn(e.original,":",i)+1;gn(this.consequent,e,n,s.end,t)}else super.render(e,t)}}so.prototype.needsBoundaries=!0;class io extends Js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?se:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?oe:Es(ys,e[0])}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||xs(ys,e[0],t,s)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class no extends ue{constructor(){super("undefined")}getLiteralValueAtPath(){}}class ro extends wi{constructor(e,t,s){super(e,t,t.declaration,s),this.hasId=!1,this.originalId=null,this.originalVariable=null;const i=t.declaration;(i instanceof tr||i instanceof Yn)&&i.id?(this.hasId=!0,this.originalId=i.id):i instanceof an&&(this.originalId=i)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof no||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const s=new Set;do{s.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof ro&&!s.has(t));return this.originalVariable=t||e}}class oo extends Mi{constructor(e,t){super(e),this.context=t,this.variables.set("this",new wi("this",null,ns,t))}addExportDefaultDeclaration(e,t,s){const i=new ro(e,t,s);return this.variables.set("default",i),i}addNamespaceMemberAccess(){}deconflict(e,t,s){for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.context.traceVariable(e)||this.parent.findVariable(e);return s instanceof rn&&this.accessedOutsideVariables.set(e,s),s}}const ao={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>se,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class lo extends Js{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(K)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:s}=pe){this.included=!0;for(const i of this.declarations){(t||i.shouldBeIncluded(e))&&i.include(e,t);const{id:n,init:r}=i;s&&n.include(e,t),r&&n.included&&!r.included&&(n instanceof Cn||n instanceof Ii)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,s=pe){if(function(e,t){for(const s of e){if(!s.id.included)return!1;if(s.id.type===Os){if(t.has(s.id.variable))return!1}else{const e=[];if(s.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const s of this.declarations)s.render(e,t);s.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}applyDeoptimizations(){}renderDeclarationEnd(e,t,s,i,n,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===s?e.appendLeft(n,t):(10!==e.original.charCodeAt(i-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(i--,13===e.original.charCodeAt(i)&&i--),i===s+1?e.overwrite(s,n,t):(e.overwrite(s,s+1,t),e.remove(i,n))),r.length>0&&e.appendLeft(n,` ${In(r,o)};`)}renderReplacedDeclarations(e,t){const s=yn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,n;n=fn(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o,a,l=!1,c=!1,h="";const u=[],d=function(e,t,s){let i=null;if("system"===t.format){for(const{node:n}of e)n.id instanceof an&&n.init&&0===s.length&&1===t.exportNamesByVariable.get(n.id.variable)?.length?(i=n.id.variable,s.push(i)):n.id.addExportedVariables(s,t.exportNamesByVariable);s.length>1?i=null:i&&(s.length=0)}return i}(s,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of s)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof an&&Mr(u.id.variable,t.exportNamesByVariable))c&&(h+=";"),l=!1;else{if(d&&d===u.id.variable){const s=dn(e.original,"=",u.id.end);wn(d,fn(e.original,s+1),null===f?m:f,e,t)}l?h+=",":(c&&(h+=";"),o+=`${this.kind} `,l=!0)}n===r+1?e.overwrite(r,n,h+o):(e.overwrite(r,r+1,h),e.appendLeft(n,o)),i=m,n=g,c=!0,r=f,h=""}else e.remove(p,g);this.renderDeclarationEnd(e,h,r,i,n,u,t)}}const co={ArrayExpression:ki,ArrayPattern:Ii,ArrowFunctionExpression:kn,AssignmentExpression:class extends Js{hasEffects(e){const{deoptimized:t,left:s,operator:i,right:n}=this;return t||this.applyDeoptimizations(),n.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)}hasEffectsOnInteractionAtPath(e,t,s){return this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){const{deoptimized:s,left:i,right:n,operator:r}=this;s||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||i.included||i.hasEffectsAsAssignmentTarget(ss(),!1))&&i.includeAsAssignmentTarget(e,t,"="!==r),n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:s,renderedParentType:i,renderedSurroundingElement:n}=pe){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=fn(e.original,dn(e.original,"=",r.end)+1);e.remove(a,l),s&&xn(e,l,o.start),o.render(e,t,{renderedParentType:i||c.type,renderedSurroundingElement:n||c.type})}if("system"===t.format)if(r instanceof an){const s=r.variable,i=t.exportNamesByVariable.get(s);if(i)return void(1===i.length?wn(s,a,l,e,t):Pn(s,a,l,c.type!==_s,e,t))}else{const s=[];if(r.addExportedVariables(s,t.exportNamesByVariable),s.length>0)return void function(e,t,s,i,n,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;n.prependRight(t,a(["v"],`${In(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:i})),n.appendLeft(s,")")}(s,a,l,n===_s,e,t)}r.included&&r instanceof Cn&&(n===_s||n===As)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends Js{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.left.hasEffectsOnInteractionAtPath(K,t,s)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:s}=pe){this.left.render(e,t,{isShorthandProperty:s}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},AwaitExpression:On,BinaryExpression:class extends Js{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(e.length>0)return se;const i=this.left.getLiteralValueAtPath(K,t,s);if("symbol"==typeof i)return se;const n=this.right.getLiteralValueAtPath(K,t,s);if("symbol"==typeof n)return se;const r=Dn[this.operator];return r?r(i,n):se}hasEffects(e){return"+"===this.operator&&this.parent instanceof bn&&""===this.left.getLiteralValueAtPath(K,ee,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}render(e,t,{renderedSurroundingElement:s}=pe){this.left.render(e,t,{renderedSurroundingElement:s}),this.right.render(e,t)}},BlockStatement:vn,BreakStatement:class extends Js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:jn,CatchClause:class extends Js{createScope(e){this.scope=new Un(e,this.context)}parseNode(e){const{param:t}=e;t&&(this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope),this.param.declare("parameter",re)),super.parseNode(e)}},ChainExpression:class extends Js{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(!this.expression.isSkippedAsOptional(s))return this.expression.getLiteralValueAtPath(e,t,s)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}},ClassBody:class extends Js{createScope(e){this.scope=new Gn(e,this.parent,this.context)}include(e,t){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const s of this.body)s.include(e,t)}parseNode(e){const t=this.body=[];for(const s of e.body)t.push(new(this.context.getNodeConstructor(s.type))(s,this,s.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Yn,ClassExpression:Xn,ConditionalExpression:class extends Js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Y);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=me;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Qn([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.consequent.hasEffectsOnInteractionAtPath(e,t,s)||this.alternate.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===s?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):s.include(e,t)}includeCallArguments(e,t){const s=this.getUsedBranch();s?s.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=pe){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=dn(e.original,":",this.consequent.end),l=fn(e.original,(this.consequent.included?dn(e.original,"?",this.test.end):a)+1);i&&xn(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),hn(this,e),o.render(e,t,{isCalleeOfRenderedParent:s,preventASI:!0,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(K,ee,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends Js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends Js{hasEffects(e){return!!this.test.hasEffects(e)||Zn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Jn(e,this.body,t)}},EmptyStatement:class extends Js{hasEffects(){return!1}},ExportAllDeclaration:er,ExportDefaultDeclaration:sr,ExportNamedDeclaration:ir,ExportSpecifier:class extends Js{applyDeoptimizations(){}},ExpressionStatement:bn,ForInStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){const{body:t,deoptimized:s,left:i,right:n}=this;return s||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(e,!1)&&!n.hasEffects(e))||Zn(e,t)}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Jn(e,s,t)}initialise(){this.left.setAssignedValue(re)}render(e,t){this.left.render(e,t,un),this.right.render(e,t,un),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.context.requestTreeshakingPass()}},ForOfStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Jn(e,s,t)}initialise(){this.left.setAssignedValue(re)}render(e,t){this.left.render(e,t,un),this.right.render(e,t,un),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(K),this.right.deoptimizePath(Y),this.context.requestTreeshakingPass()}},ForStatement:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Zn(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),Jn(e,this.body,t)}render(e,t){this.init?.render(e,t,un),this.test?.render(e,t,un),this.update?.render(e,t,un),this.body.render(e,t)}},FunctionDeclaration:tr,FunctionExpression:nr,Identifier:an,IfStatement:ar,ImportAttribute:class extends Js{},ImportDeclaration:lr,ImportDefaultSpecifier:cr,ImportExpression:class extends Js{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof bn)return me;if(e instanceof On){const t=e.parent;if(t instanceof bn)return me;if(t instanceof Vr){const e=t.id;return e instanceof Cn?Fr(e):void 0}if(t instanceof Bn){const e=t.property;if(!t.computed&&e instanceof an)return[e.name]}}else if(e instanceof Bn){const t=e.parent,s=e.property;if(!(t instanceof jn&&s instanceof an))return;const i=s.name;if(t.parent instanceof bn&&["catch","finally"].includes(i))return me;if("then"!==i)return;if(0===t.arguments.length)return me;const n=t.arguments[0];if(1!==t.arguments.length||!(n instanceof kn||n instanceof nr))return;if(0===n.params.length)return me;const r=n.params[0];return 1===n.params.length&&r instanceof Cn?Fr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:s,getDirectReturnFunction:i,getObject:n,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,s]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${s})`)}else{if(this.mechanism&&(e.overwrite(this.start,dn(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,s]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${s})`)}}else this.source.render(e,t);!0!==this.assertions&&(this.arguments&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&e.appendLeft(this.end-1,`,${s}${n([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,s,i,n,r,o,a,l){const{format:c}=s;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.assertions=l;const h=[...zr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,s,i,n)),u&&h.push(u),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:s,dynamicImportFunction:i,dynamicImportInCjs:n,format:r,generatedCode:{arrowFunctions:o},interop:a},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:h},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:r,moduleId:this.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const p=!this.resolution||"string"==typeof this.resolution;switch(r){case"cjs":{if(n&&(!e||"string"==typeof e||e instanceof Zt))return{helper:null,mechanism:null};const s=Br(e,t,a);let i="require(",r=")";s&&(i=`/*#__PURE__*/${s}(${i}`,r+=")");const[l,u]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${l}${i}`,r+=`${u})`,!o&&p&&(i=h(["t"],`${i}t${r}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),r=")"),{helper:s,mechanism:{left:i,right:r}}}case"amd":{const i=s?"c":"resolve",n=s?"e":"reject",r=Br(e,t,a),[u,d]=c(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=r?`${u}${i}(/*#__PURE__*/${r}(m))${d}`:i,[m,g]=c([i,n],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,x=`],${l}${f},${l}${n})${g})`;return!o&&p&&(y=h(["t"],`${y}t${x}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),x=")"),{helper:r,mechanism:{left:y,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(i)return{helper:null,mechanism:{left:`${i}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:jr,ImportSpecifier:class extends Js{applyDeoptimizations(){}},LabeledStatement:class extends Js{hasEffects(e){const t=e.brokenFlow;return e.ignore.labels.add(this.label.name),!!this.body.hasEffects(e)||(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t),!1)}include(e,t){this.included=!0;const s=e.brokenFlow;this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=s)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,fn(e.original,dn(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Tn,LogicalExpression:class extends Js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Y);const{context:t,expressionsToBeDeoptimized:s}=this;this.expressionsToBeDeoptimized=me;for(const e of s)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Qn([this.left.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.left.hasEffectsOnInteractionAtPath(e,t,s)||this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||s===this.right&&this.left.shouldBeIncluded(e)||!s?(this.left.include(e,t),this.right.include(e,t)):s.include(e,t)}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=pe){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:i,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=dn(e.original,this.operator,this.left.end);if(this.right.included){const t=fn(e.original,o+2);e.remove(this.start,t),i&&xn(e,t,this.right.start)}else e.remove(o,this.end);hn(this,e),this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:Bn,MetaProperty:class extends Js{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:s}=this;return t===Gr&&s?.startsWith(Ur)?e.getFileName(s.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Gr)){this.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Bn&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Ur)&&(this.referenceId=t.slice(16))}}render(e,{format:t,pluginDriver:s,snippets:i}){const{context:{module:{id:n}},meta:{name:r},metaProperty:o,parent:a,preliminaryChunkId:l,referenceId:c,start:h,end:u}=this;if(r!==Gr)return;const d=l;if(c){const i=s.getFileName(c),r=I($(P(d),i)),o=s.hookFirstSync("resolveFileUrl",[{chunkId:d,fileName:i,format:t,moduleId:n,referenceId:c,relativePath:r}])||Jr[t](r);return void e.overwrite(a.start,a.end,o,{contentOnly:!0})}const p=s.hookFirstSync("resolveImportMeta",[o,{chunkId:d,format:t,moduleId:n}])||eo[t]?.(o,{chunkId:d,snippets:i});"string"==typeof p&&(a instanceof Bn?e.overwrite(a.start,a.end,p,{contentOnly:!0}):e.overwrite(h,u,p,{contentOnly:!0}))}setResolution(e,t,s){this.preliminaryChunkId=s;const i=(this.metaProperty?.startsWith(Ur)?qr:Wr)[e];i.length>0&&this.scope.addAccessedGlobals(i,t)}},MethodDefinition:qn,NewExpression:class extends Js{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(K,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}},ObjectExpression:class extends Js{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}render(e,t,{renderedSurroundingElement:s}=pe){super.render(e,t),s!==_s&&s!==As||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=hi;const t=[];for(const s of this.properties){if(s instanceof ei){t.push({key:G,kind:"init",property:s});continue}let i;if(s.computed){const e=s.key.getLiteralValueAtPath(K,ee,this);if("symbol"==typeof e){t.push({key:G,kind:s.kind,property:s});continue}i=String(e)}else if(i=s.key instanceof an?s.key.name:String(s.key.value),"__proto__"===i&&"init"===s.kind){e=s.value instanceof Tn&&null===s.value.value?null:s.value;continue}t.push({key:i,kind:s.kind,property:s})}return this.objectEntity=new ai(t,e)}},ObjectPattern:Cn,PrivateIdentifier:class extends Js{},Program:to,Property:class extends Wn{constructor(){super(...arguments),this.declarationInit=null}declare(e,t){return this.declarationInit=t,this.value.declare(e,re)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([G,G]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.value?this.value.getLiteralValueAtPath(e,t,s):se}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,s,i):oe}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}},RestElement:Sn,ReturnStatement:class extends Js{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||re)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends Js{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,s)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,s){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(t||i===s&&!(this.parent instanceof bn)||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t,{renderedParentType:s,isCalleeOfRenderedParent:i,preventASI:n}=pe){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:h,end:u}of yn(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&n&&xn(e,h,l.start),1===r){const n=s||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:i&&l===a,renderedParentType:n,renderedSurroundingElement:n})}else l.render(e,t);else cn(l,e,h,u);o&&e.remove(o,this.end)}},SpreadElement:ei,StaticBlock:class extends Js{createScope(e){this.scope=new En(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){if(this.body.length>0){const s=dn(e.original.slice(this.start,this.end),"{")+1;gn(this.body,e,this.start+s,this.end-1,t)}else super.render(e,t)}},Super:class extends Js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:so,SwitchStatement:class extends Js{createScope(e){this.parentScope=e,this.scope=new En(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:s,ignore:i}=e,{breaks:n}=i;i.breaks=!0,e.hasBreak=!1;let r=!0;for(const s of this.cases){if(s.hasEffects(e))return!0;r&&(r=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),i.breaks=n,e.hasBreak=s,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:s,hasBreak:i}=e;e.hasBreak=!1;let n=!0,r=t||null!==this.defaultCase&&this.defaultCase=0;i--){const o=this.cases[i];if(o.included&&(r=!0),!r){const e=ss();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),n&&(n=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=s):n=s}r&&null!==this.defaultCase&&(e.brokenFlow=n),e.hasBreak=i}initialise(){for(let e=0;e0&&gn(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends Fn{bind(){if(super.bind(),this.tag.type===Os){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.context.log(ve,Rt(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(K,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[s]=this.getReturnExpression();s.included||s.include(e,!1)}initialise(){this.args=[re,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Bn&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,K,ee),this.context.requestTreeshakingPass()}getReturnExpression(e=ee){return null===this.returnExpression?(this.returnExpression=oe,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(K,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends Js{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:io,ThisExpression:class extends Js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,s)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof oo?this.context.moduleContext:null,"undefined"===this.alias&&this.context.log(ve,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:Oe("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends Js{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends Js{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const s=this.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:n}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)n.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Zs:t),n.size>0&&(this.includedLabelsAfterBlock=[...n]),e.brokenFlow=i;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=i),this.finalizer?.include(e,t)}},UnaryExpression:class extends Js{getLiteralValueAtPath(e,t,s){if(e.length>0)return se;const i=this.argument.getLiteralValueAtPath(K,t,s);return"symbol"==typeof i?se:ao[this.operator](i)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof an)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(K,ce,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(K),this.context.requestTreeshakingPass())}},UnknownNode:class extends Js{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends Js{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(re)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n}}=t;if(this.argument.render(e,t),"system"===i){const i=this.argument.variable,r=s.get(i);if(r)if(this.prefix)1===r.length?wn(i,this.start,this.end,e,t):Pn(i,this.start,this.end,this.parent.type!==_s,e,t);else{const s=this.operator[0];!function(e,t,s,i,n,r,o){const{_:a}=r.snippets;n.prependRight(t,`${In([e],r,o)},${a}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}(i,this.start,this.end,this.parent.type!==_s,e,t,`${n}${s}${n}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(K),this.argument instanceof an){this.scope.findVariable(this.argument.name).isReassigned=!0}this.context.requestTreeshakingPass()}},VariableDeclaration:lo,VariableDeclarator:Vr,WhileStatement:class extends Js{hasEffects(e){return!!this.test.hasEffects(e)||Zn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Jn(e,this.body,t)}},YieldExpression:class extends Js{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},ho="_missingExportShim";class uo extends ue{constructor(e){super(ho),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class po extends ue{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(t.length>1||1===t.length&&2===e.type){const i=t[0];"string"==typeof i?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),s):ae(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===H?"Module":se}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const s of t)if("*"!==s[0]&&s!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(s);t&&(e[s]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(0===e.length)return!0;if(1===e.length&&2!==i)return 1===i;const n=e[0];if("string"!=typeof n)return!0;const r=this.getMemberVariables()[n];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,s)}include(){this.included=!0,this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([gr],e)}renderBlock(e){const{exportNamesByVariable:t,format:s,freeze:i,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}}=e,d=this.getMemberVariables(),p=Object.entries(d).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${e}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${gr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Tr(l)})`),i&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===s&&t.has(this)&&(f+=`${h}${In([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references)if(e.context.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}po.prototype.isNamespace=!0;class fo extends ue{constructor(e,t,s){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=s}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof ro||e instanceof fo;){if(e instanceof ro){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof fo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var mo;function go(e){return e.id}!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(mo||(mo={}));const yo=e=>{const t=e.key;return t&&(t.name||t.value)};function xo(e,t){const s=Object.keys(e);return s.length!==Object.keys(t).length||s.some((s=>e[s]!==t[s]))}var Eo="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},bo={memoryUsage:()=>({heapUsed:0})};let vo=new Map;function So(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function Ao(e,t=3){e=So(e,t);const s=bo.memoryUsage().heapUsed,i=Eo.now(),n=vo.get(e);void 0===n?vo.set(e,{memory:0,startMemory:s,startTime:i,time:0,totalMemory:0}):(n.startMemory=s,n.startTime=i)}function ko(e,t=3){e=So(e,t);const s=vo.get(e);if(void 0!==s){const e=bo.memoryUsage().heapUsed;s.memory+=e-s.startMemory,s.time+=Eo.now()-s.startTime,s.totalMemory=Math.max(s.totalMemory,e)}}function Io(){const e={};for(const[t,{memory:s,time:i,totalMemory:n}]of vo)e[t]=[i,s,n];return e}let wo=ji,Po=ji;const Co=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function $o(e,t){for(const s of Co)if(s in e){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${s}`;const n=function(...e){wo(i,4);const t=r.apply(this,e);return Po(i,4),t};let r;"function"==typeof e[s].handler?(r=e[s].handler,e[s].handler=n):(r=e[s],e[s]=n)}return e}function No(e){e.isExecuted=!0;const t=[e],s=new Set;for(const e of t)for(const i of[...e.dependencies,...e.implicitlyLoadedBefore])i instanceof Zt||i.isExecuted||!i.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(i)||s.has(i.id)||(i.isExecuted=!0,s.add(i.id),t.push(i))}const _o={identifier:null,localName:ho};function Ro(e,t,s,i,n=new Map){const r=n.get(t);if(r){if(r.has(e))return i?[null]:Ye((o=t,a=e.id,{code:it,exporter:a,message:`"${o}" cannot be exported from "${T(a)}" as it is a reexport that references itself.`}));r.add(e)}else n.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:s,isExportAllSearch:i,searchedNamesAndModules:n})}function Oo(e,t){const s=F(t.sideEffectDependenciesByVariable,e,j);let i=e;const n=new Set([i]);for(;;){const e=i.module;if(i=i instanceof ro?i.getDirectOriginalVariable():i instanceof fo?i.syntheticNamespace:null,!i||n.has(i))break;n.add(i),s.add(e);const t=e.sideEffectDependenciesByVariable.get(i);if(t)for(const e of t)s.add(e)}return s}class Do{constructor(e,t,s,i,n,r,o,a){this.graph=e,this.id=t,this.options=s,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new uo(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:h,exportAllSources:u,exports:d,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAssertions:y}=this;this.info={assertions:a,ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return h.sort()},get exportedBindings(){const e={".":[...d.keys()]};for(const[t,{source:s}]of g)(e[s]??(e[s]=[])).push(t);for(const t of u)(e[t]??(e[t]=[])).push("*");return e},get exports(){return[...d.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},get hasModuleSideEffects(){return Xt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ke,!0,s),this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,go).sort()},get implicitlyLoadedBefore(){return Array.from(f,go).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==mo.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const e=w(this.id),t=C(this.id);return be(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),Ye(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof Zt)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,s=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&s.add(t)}for(let i of s){const s=this.sideEffectDependenciesByVariable.get(i);if(s)for(const e of s)t.add(e);i instanceof fo?i=i.getBaseVariable():i instanceof ro&&(i=i.getOriginalVariable()),e.add(i.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[s]=this.getVariableForExportName(t);if(s instanceof ro&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof de))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof Zt)e.add(`*${t.id}`);else for(const s of[...t.getReexports(),...t.getExports()])"default"!==s&&e.add(s);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const s of this.exports.keys()){const[i]=this.getVariableForExportName(s);(i&&i.included?e:t).push(s)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Ye((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${T(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:n}=fe){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=Ro(r.module,r.localName,t,!1,n);return e?(t&&(Lo(e,t,this),this.info.moduleSideEffects&&F(t.sideEffectDependenciesByVariable,e,j).add(this)),[e]):this.error(Ft(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===_o)return[this.exportShimVariable];const e=o.localName,s=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});return t&&(Lo(s,t,this),F(t.sideEffectDependenciesByVariable,s,j).add(this)),[s]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,n);if(this.namespaceReexportsByName.set(e,s),s[0])return s}return this.info.syntheticNamedExports?[F(this.syntheticExports,e,(()=>new fo(this.astContext,e,this.getSyntheticNamespace())))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=ts();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(No(this),this.graph.needsTreeshakingPass=!0);for(const t of this.exports.keys())if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(Y),e.included||this.includeVariable(e)}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Y),t.included||this.includeVariable(t),t instanceof de&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(ts(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(No(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(Y),e.included||this.includeVariable(e)),this.exports.has(s)||this.reexportDescriptions.has(s)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const s=this.graph.modulesById.get(this.resolvedIds[t].id);s instanceof Zt?e.push(s):this.exportAllModules.push(s)}this.exportAllModules.push(...e)}log(e,t,s){this.addLocationToLogProps(t,s),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:s}=this.astContext;return s&&"iife"!==e.format&&"es"!==e.format&&"system"!==e.format?Ye((i=this.id,n=e.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${n}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:s};var i,n}setSource({ast:e,code:t,customTransformCache:s,originalCode:i,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){wo("generate ast",3),this.info.code=t,this.originalCode=i,this.originalSourcemap=n,this.sourcemapChain=o,l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=s,this.updateOptions(c);const h=e??this.tryParse();Po("generate ast",3),wo("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new g(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>co[e]||co.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new oo(this.graph.scope,this.astContext),this.namespace=new po(this.astContext),this.ast=new to(h,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=h:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),Po("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,go),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:s,searchedNamesAndModules:i}=fe){const n=this.scope.variables.get(e);if(n)return n;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Do&&"*"===r.name)return e.namespace;const[n]=Ro(e,r.name,t||this,s,i);return n||this.error(Ft(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:s}){null!=t&&(this.info.moduleSideEffects=t),null!=s&&(this.info.syntheticNamedExports=s),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof io?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Tn&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof sr)this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof er){const t=e.source.value;if(this.addSource(t,e),e.exported){const s=e.exported.name;this.reexportDescriptions.set(s,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Tn){const t=e.source.value;this.addSource(t,e);for(const{exported:s,local:i,start:n}of e.specifiers){const e=s instanceof Tn?s.value:s.name;this.reexportDescriptions.set(e,{localName:i instanceof Tn?i.value:i.name,module:null,source:t,start:n})}}else if(e.declaration){const t=e.declaration;if(t instanceof lo)for(const e of t.declarations)for(const t of es(e.id))this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:s}of e.specifiers){const e=t.name,i=s instanceof an?s.name:s.value;this.exports.set(i,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const s of e.specifiers){const e=s instanceof cr?"default":s instanceof jr?"*":s.imported instanceof an?s.imported.name:s.imported.value;this.importDescriptions.set(s.local.name,{module:null,name:e,source:t,start:s.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let s=this.info.code;const i=we(s,t,{offsetLine:1});if(i){let{column:n,line:r}=i;try{({column:n,line:r}=function(e,t){const s=e.filter((e=>!!e.mappings));e:for(;s.length>0;){const e=s.pop().mappings[t.line-1];if(e){const s=e.filter((e=>e.length>1)),i=s[s.length-1];for(const e of s)if(e[0]>=t.column||e===i){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:n,line:r})),s=this.originalCode}catch(e){this.options.onLog(ve,function(e,t,s,i,n){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:s,file:t,line:i},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:n}}(e,this.id,n,r,t))}Xe(e,{column:n,line:r},s,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,s){const i=new Set,n=r=>{for(const o of r)i.has(o)||(i.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||s.has(o))&&(o instanceof Zt||o.hasEffects()?e.add(o):n(o.dependencies)))};n(this.dependencies),n(s)}addSource(e,t){const s=(i=t.assertions,i?.length?Object.fromEntries(i.map((e=>[yo(e),e.value.value]))):fe);var i;const n=this.sourcesWithAssertions.get(e);n?xo(n,s)&&this.log(ve,Mt(n,s,e,this.id),t.start):this.sourcesWithAssertions.set(e,s)}getVariableFromNamespaceReexports(e,t,s){let i=null;const n=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Ro(o,e,t,!0,To(s));o instanceof Zt||l?r.add(a):a instanceof fo?i||(i=a):a&&n.set(a,o)}if(n.size>0){const t=[...n],s=t[0][0];return 1===t.length?[s]:(this.options.onLog(ve,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${T(a)}" re-exports "${o}" from one of the modules ${Re(l.map((e=>T(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],s=t[0];return t.length>1&&this.options.onLog(ve,function(e,t,s,i){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:i,message:`Ambiguous external namespace resolution: "${T(t)}" re-exports "${e}" from one of the external modules ${Re(i.map((e=>T(e))))}, guessing "${T(s)}".`,reexporter:t}}(e,this.id,s.module.id,t.map((e=>e.module.id)))),[s,!0]}return i?[i]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const s of[this,...this.exportAllModules])if(s instanceof Zt){const[t]=s.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(s.info.syntheticNamedExports){const e=s.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof Do){t.includedDynamicImporters.push(this);const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?t.includeExportsByNames(s):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof Do&&t!==this&&Oo(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof Do&&(t.isExecuted||No(t),t!==this)){const t=Oo(e,this);for(const e of t)e.isExecuted||No(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,s;this.options.onLog(ve,(t=this.id,{binding:s=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${s}" has been shimmed in module "${T(t)}".`})),this.exports.set(e,_o)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){return this.error(function(e,t){let s=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?s+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(s+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:"PARSE_ERROR",id:t,message:s}}(e,this.id),e.pos)}}}function Lo(e,t,s){if(e.module instanceof Do&&e.module!==s){const i=e.module.cycles;if(i.size>0){const n=s.cycles;for(const r of n)if(i.has(r)){t.alternativeReexportModules.set(e,s);break}}}}const To=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function Mo(e){return e.endsWith(".js")?e.slice(0,-3):e}function Vo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Mo(t)}`:e.id??""}function Bo(e,t,s,i,n,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:h,getPropertyAccess:u,n:d,s:p}=n;if(!s)return`${d}${d}${a}${function(e,t,s,i,n){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:h}of t)if(h)return zo(a,h[0].imported,l,o,e,c,s,r,i,n)}(e,t,i,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:n,isChunk:a,name:h,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&s)for(const t of g)if("*"!==t.reexported){const s=zo(h,t.imported,p,a,e,m,i,n,o,u);if(f&&(f+=d),"*"!==t.imported&&t.needsLiveBinding){const[e,i]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}'${t.reexported}',${l}{${d}${r}enumerable:${l}true,${d}${r}get:${l}${e}${s}${i}${d}});`}else f+=`exports${u(t.reexported)}${l}=${l}${s};`}for(const{exported:t,local:s}of e){const e=`exports${u(t)}`;e!==s&&(f&&(f+=d),f+=`${e}${l}=${l}${s};`)}for(const{name:e,reexports:i}of t)if(i&&s)for(const t of i)if("*"===t.reexported){f&&(f+=d);const s=`{${d}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${Uo(e,t.needsLiveBinding,r,n)}${p}${d}}`;f+=`Object.keys(${e}).forEach(${h(["k"],{isAsync:!1,name:null})}${s});`}return f?`${d}${d}${f}`:""}function zo(e,t,s,i,n,r,o,a,l,c){if("default"===t){if(!i){const t=o(a),s=yr[t]?n:e;return xr(t,l)?`${s}${c("default")}`:s}return s?`${e}${c("default")}`:e}return"*"===t?(i?!s:Er[o(a)])?r:e:`${e}${c(t)}`}function Fo(e){return e([["value","true"]],{lineBreakIndent:null})}function jo(e,t,s,{_:i,getObject:n}){if(e){if(t)return s?`Object.defineProperties(exports,${i}${n([["__esModule",Fo(n)],[null,`[Symbol.toStringTag]:${i}${Tr(n)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${i}'__esModule',${i}${Fo(n)});`;if(s)return`Object.defineProperty(exports,${i}Symbol.toStringTag,${i}${Tr(n)});`}return""}const Uo=(e,t,s,{_:i,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${i}k,${i}{${r}${s}${s}enumerable:${i}true,${r}${s}${s}get:${i}${t}${e}[k]${o}${r}${s}})`}return`exports[k]${i}=${i}${e}[k]`};function Go(e,t,s,i,n,r,o,a){const{_:l,cnst:c,n:h}=a,u=new Set,d=[],p=(e,t,s)=>{u.add(t),d.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${s});`)};for(const{defaultVariableName:s,imports:i,importPath:n,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...i||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,mr,o);break}}else{const e=t(n);let r=!1,a=!1;for(const{imported:t,reexported:n}of[...i||[],...c||[]]){let i,c;"default"===t?r||(r=!0,s!==l&&(c=s,i=yr[e])):"*"!==t||"*"===n||a||(a=!0,i=Er[e],c=l),i&&p(c,i,o)}}return`${vr(u,r,o,a,s,i,n)}${d.length>0?`${d.join(h)}${h}${h}`:""}`}function Wo(e,t){return"."!==e[0]?e:t?(s=e).endsWith(".js")?s:s+".js":Mo(e);var s}const qo=new Set([...t(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Ho(e,t){const s=t.map((({importPath:e})=>e)).filter((e=>qo.has(e)||e.startsWith("node:")));0!==s.length&&e(ve,function(e){return{code:Et,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Re(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(s))}const Ko=(e,t)=>e.split(".").map(t).join("");function Yo(e,t,s,i,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof s?s(o[0]):s[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${n}=${n}${l}${n}||${n}{}`))),`${l}${r(a)}`].join(`,${n}`)+`${n}=${n}${i}`;return o.length>0&&(c=`(${c})`),c}function Xo(e){let t=e.length;for(;t--;){const{imports:s,reexports:i}=e[t];if(s||i)return e.slice(0,t+1)}return[]}const Qo=({dependencies:e,exports:t})=>{const s=new Set(t.map((e=>e.exported)));s.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&s.add(e.reexported);return s},Zo=(e,t,{_:s,cnst:i,getObject:n,n:r})=>e?`${r}${t}${i} _starExcludes${s}=${s}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"",Jo=(e,t,{_:s,n:i})=>e.length>0?`${i}${t}var ${e.join(`,${s}`)};`:"",ea=(e,t,s)=>ta(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,s);function ta(e,t,{_:s,n:i}){return 0===e.length?"":1===e.length?`exports('${e[0].name}',${s}${e[0].value});${i}${i}`:`exports({${i}`+e.map((({name:e,value:i})=>`${t}${e}:${s}${i}`)).join(`,${i}`)+`${i}});${i}${i}`}const sa=(e,t,s)=>ta(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,s),ia=(e,t,s)=>ta(e.filter((e=>e.local===ho)).map((e=>({name:e.exported,value:ho}))),t,s);function na(e,t,s){return e?`${t}${Ko(e,s)}`:"null"}var ra={amd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:h,namedExportsMode:u,log:d,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:x,interop:E,namespaceToStringTag:b,strict:v}){Ho(d,s);const S=s.map((e=>`'${Wo(e.importPath,m.forceJsExtensionForImports)}'`)),A=s.map((e=>e.name)),{n:k,getNonArrowFunctionIntro:I,_:w}=f;u&&r&&(A.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(A.unshift("require"),S.unshift("'require'")),t.has("module")&&(A.unshift("module"),S.unshift("'module'"));const P=Vo(m,o),C=(P?`'${P}',${w}`:"")+(S.length>0?`[${S.join(`,${w}`)}],${w}`:""),$=v?`${w}'use strict';`:"";e.prepend(`${l}${Go(s,E,y,x,b,t,a,f)}`);const N=Bo(i,s,u,E,f,a,y);let _=jo(u&&r,c&&(!0===g||"if-default-prop"===g&&n),h&&b,f);_&&(_=k+k+_),e.append(`${N}${_}${p}`).indent(a).prepend(`${m.define}(${C}(${I(A,{isAsync:!1,name:null})}{${$}${k}${k}`).append(`${k}${k}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:h,outro:u,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:x,strict:E}){const{_:b,n:v}=d,S=E?`'use strict';${v}${v}`:"";let A=jo(h&&r,l&&(!0===f||"if-default-prop"===f&&n),c&&x,d);A&&(A+=v+v);const k=function(e,{_:t,cnst:s,n:i},n){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:h}of e)c||h?(r+=n&&o?",":`${r?`;${i}`:""}${s} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=n&&!o?",":`;${i}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${i}${i}`;return""}(s,d,p),I=Go(s,y,m,g,x,t,o,d);e.prepend(`${S}${a}${A}${k}${I}`);const w=Bo(i,s,h,y,d,o,m,`module.exports${b}=${b}`);e.append(`${w}${u}`)},es:function(e,{accessedGlobals:t,indent:s,intro:i,outro:n,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,namespaceToStringTag:h}){const{n:u}=a,d=function(e,{_:t}){const s=[];for(const{importPath:i,reexports:n,imports:r,name:o,assertions:a}of e){const e=`'${i}'${a?`${t}assert${t}${a}`:""};`;if(n||r){if(r){let i=null,n=null;const o=[];for(const e of r)"default"===e.imported?i=e:"*"===e.imported?n=e:o.push(e);n&&s.push(`import${t}*${t}as ${n.local} from${t}${e}`),i&&0===o.length?s.push(`import ${i.local} from${t}${e}`):o.length>0&&s.push(`import ${i?`${i.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(n){let i=null;const a=[],l=[];for(const e of n)"*"===e.reexported?i=e:"*"===e.imported?a.push(e):l.push(e);if(i&&s.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||s.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)s.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}l.length>0&&s.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else s.push(`import${t}${e}`)}return s}(r,a);d.length>0&&(i+=d.join(u)+u+u),(i+=vr(null,t,s,a,l,c,h))&&e.prepend(i);const p=function(e,{_:t,cnst:s}){const i=[],n=[];for(const r of e)r.expression&&i.push(`${s} ${r.local}${t}=${t}${r.expression};`),n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`);n.length>0&&i.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`);return i}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),n&&e.append(n),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:h,snippets:u},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:x,name:E,namespaceToStringTag:b,strict:v}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:k,n:I}=u,w=E&&E.includes("."),P=!f&&!w;if(E&&P&&(Ee(C=E)||xe.test(C)))return Ye(function(e){return{code:at,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Oe(Be)}}(E));var C;Ho(c,s);const $=Xo(s),N=$.map((e=>e.globalName||"null")),_=$.map((e=>e.name));r&&!E&&c(ve,{code:xt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Oe(qe)}),l&&r&&(f?(N.unshift(`this${Ko(E,k)}${S}=${S}this${Ko(E,k)}${S}||${S}{}`),_.unshift("exports")):(N.unshift("{}"),_.unshift("exports")));const R=v?`${o}'use strict';${I}`:"",O=Go(s,x,g,m,b,t,o,u);e.prepend(`${a}${O}`);let D=`(${A(_,{isAsync:!1,name:null})}{${I}${R}${I}`;r&&(!E||f&&l||(D=(P?`var ${E}`:`this${Ko(E,k)}`)+`${S}=${S}${D}`),w&&(D=function(e,t,s,{_:i,getPropertyAccess:n,s:r},o){const a=e.split(".");a[0]=("function"==typeof s?s(a[0]):s[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=n(e),`${l}${i}=${i}${l}${i}||${i}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,d)+D));let L=`${I}${I}})(${N.join(`,${S}`)});`;r&&!f&&l&&(L=`${I}${I}${o}return exports;${L}`);const T=Bo(i,s,l,x,u,o,g);let M=jo(l&&r,!0===p||"if-default-prop"===p&&n,b,u);M&&(M=I+I+M),e.append(`${T}${M}${h}`).indent(o).prepend(D).append(L)},system:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasExports:n,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:h,freeze:u,name:d,namespaceToStringTag:p,strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:x,n:E,s:b}=a,{importBindings:v,setters:S,starExcludes:A}=function(e,t,s,{_:i,cnst:n,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let h=null;for(const{imports:u,reexports:d}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${i}=${i}module;`):p.push(`${e.local}${i}=${i}module${o(e.imported)};`);if(d){const a=[];let l=!1;for(const{imported:e,reexported:t}of d)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l){const o=r(a,{lineBreakIndent:null});l?(h||(h=Qo({dependencies:e,exports:t})),p.push(`${n} setter${i}=${i}${o};`,`for${i}(${n} name in module)${i}{`,`${s}if${i}(!_starExcludes[name])${i}setter[name]${i}=${i}module[name];`,"}","exports(setter);")):p.push(`exports(${o});`)}else{const[e,t]=a[0];p.push(`exports('${e}',${i}${t});`)}}c.push(p.join(`${a}${s}${s}${s}`))}return{importBindings:l,setters:c,starExcludes:h}}(s,i,r,a),k=d?`'${d}',${g}`:"",I=t.has("module")?["exports","module"]:n?["exports"]:[];let w=`System.register(${k}[`+s.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${x(I,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Zo(A,r,a)+Jo(v,r,a)+`${E}${r}return${g}{${S.length>0?`${E}${r}${r}setters:${g}[${S.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;w+=`${r}${r}execute:${g}(${x([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${b}${E}}));`;e.prepend(o+vr(null,t,r,a,h,u,p)+ea(i,r,a)).append(`${l}${E}${E}`+sa(i,r,a)+ia(i,r,a)).indent(`${r}${r}${r}`).append(P).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:h,outro:u,snippets:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:x,interop:E,name:b,namespaceToStringTag:v,globals:S,noConflict:A,strict:k}){const{_:I,cnst:w,getFunctionIntro:P,getNonArrowFunctionIntro:C,getPropertyAccess:$,n:N,s:_}=d,R=f?"f":"factory",O=f?"g":"global";if(r&&!b)return Ye({code:xt,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Oe(qe)});Ho(h,s);const D=s.map((e=>`'${Wo(e.importPath,p.forceJsExtensionForImports)}'`)),L=s.map((e=>`require('${e.importPath}')`)),T=Xo(s),M=T.map((e=>na(e.globalName,O,$))),V=T.map((e=>e.name));c&&(r||A)&&(D.unshift("'exports'"),L.unshift("exports"),M.unshift(Yo(b,O,S,(g?`${na(b,O,$)}${I}||${I}`:"")+"{}",d)),V.unshift("exports"));const B=Vo(p,o),z=(B?`'${B}',${I}`:"")+(D.length>0?`[${D.join(`,${I}`)}],${I}`:""),F=p.define,j=!c&&r?`module.exports${I}=${I}`:"",U=k?`${I}'use strict';${N}`:"";let G;if(A){const e=f?"e":"exports";let t;if(!c&&r)t=`${w} ${e}${I}=${I}${Yo(b,O,S,`${R}(${M.join(`,${I}`)})`,d)};`;else{t=`${w} ${e}${I}=${I}${M.shift()};${N}${a}${a}${R}(${[e,...M].join(`,${I}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${N}${a}${a}${w} current${I}=${I}${function(e,t,{_:s,getPropertyAccess:i}){let n=t;return e.split(".").map((e=>n+=i(e))).join(`${s}&&${s}`)}(b,O,d)};${N}${a}${a}${t}${N}${a}${a}${e}.noConflict${I}=${I}${P([],{isAsync:!1,name:null})}{${I}${na(b,O,$)}${I}=${I}current;${I}return ${e}${_}${I}};${N}${a}})()`}else G=`${R}(${M.join(`,${I}`)})`,!c&&r&&(G=Yo(b,O,S,G,d));const W=r||A&&c||M.length>0,q=[R];W&&q.unshift(O);const H=W?`this,${I}`:"",K=W?`(${O}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${O}${I}||${I}self,${I}`:"",Y=W?")":"",X=W?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${j}${R}(${L.join(`,${I}`)})${I}:${N}`:"",Q=`(${C(q,{isAsync:!1,name:null})}{${N}`+X+`${a}typeof ${F}${I}===${I}'function'${I}&&${I}${F}.amd${I}?${I}${F}(${z}${R})${I}:${N}`+`${a}${K}${G}${Y};${N}`+`})(${H}(${C(V,{isAsync:!1,name:null})}{${U}${N}`,Z=N+N+"}));";e.prepend(`${l}${Go(s,E,y,x,v,t,a,d)}`);const J=Bo(i,s,c,E,d,a,y);let ee=jo(c&&r,!0===m||"if-default-prop"===m&&n,v,d);ee&&(ee=N+N+ee),e.append(`${J}${ee}${u}`).trim().indent(a).append(Z).prepend(Q)}};const oa=(e,t)=>t?`${e}\n${t}`:e,aa=(e,t)=>t?`${e}\n\n${t}`:e;async function la(e,t,s){try{let[i,n,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(s),[s],oa),t.hookReduceValue("footer",e.footer(s),[s],oa),t.hookReduceValue("intro",e.intro(s),[s],aa),t.hookReduceValue("outro",e.outro(s),[s],aa)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),i&&(i+="\n"),n&&(n="\n"+n),{banner:i,footer:n,intro:r,outro:o}}catch(e){return Ye((i=e.message,n=e.hook,r=e.plugin,{code:Qe,message:`Could not retrieve "${n}". Check configuration of plugin "${r}".\n\tError Message: ${i}`}))}var i,n,r}const ca={amd:da,cjs:da,es:ua,iife:da,system:ua,umd:da};function ha(e,t,s,i,n,r,o,a,l,c,h,u,d,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(i,n,u,d);!function(e,t,s){for(const i of t){for(const t of i.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof ro&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Li(t.name,e,t.forbiddenNames));if(s.has(i)){const t=i.namespace;t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}}}(i,f,p),ca[n](i,s,t,r,o,a,l,c,h);for(const e of f)e.scope.deconflict(n,u,d)}function ua(e,t,s,i,n,r,o,a,l){for(const t of s.dependencies)(n||t instanceof z)&&(t.variableName=Li(t.suggestedVariableName,e,null));for(const s of t){const t=s.module,i=s.name;s.isNamespace&&(n||t instanceof Zt)?s.setRenderNames(null,(t instanceof Zt?a.get(t):o.get(t)).variableName):t instanceof Zt&&"default"===i?s.setRenderNames(null,Li([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,s.forbiddenNames)):s.setRenderNames(null,Li(i,e,s.forbiddenNames))}for(const t of l)t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}function da(e,t,{deconflictedDefault:s,deconflictedNamespace:i,dependencies:n},r,o,a,l,c){for(const t of n)t.variableName=Li(t.suggestedVariableName,e,null);for(const t of i)t.namespaceVariableName=Li(`${t.suggestedVariableName}__namespace`,e,null);for(const t of s)t.defaultVariableName=i.has(t)&&br(r(t.id),a)?t.namespaceVariableName:Li(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Zt){const s=c.get(t),i=e.name;if("default"===i){const i=r(t.id),n=yr[i]?s.defaultVariableName:s.variableName;xr(i,a)?e.setRenderNames(n,"default"):e.setRenderNames(null,n)}else"*"===i?e.setRenderNames(null,Er[r(t.id)]?s.namespaceVariableName:s.variableName):e.setRenderNames(s.variableName,null)}else{const s=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===s.exportMode?s.namespaceVariableName:s.variableName):"default"===s.exportMode?e.setRenderNames(null,s.variableName):e.setRenderNames(s.variableName,s.getVariableExportName(e))}}}function pa(e,{exports:t,name:s,format:i},n,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Ye(Bt("default",o,n))}else if("none"===t&&o.length>0)return Ye(Bt("none",o,n));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==i&&"system"!==i&&o.includes("default")&&r(ve,function(e,t){return{code:vt,id:e,message:`Entry module "${T(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Oe(Ve)}}(n,s)),t="named")),t}function fa(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return" ".repeat(n)}function ma(e,t,s,i,n,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Zt){t.push(r.get(e));continue}const o=n.get(e);o===i?s.has(e)||(s.add(e),ma(e,t,s,i,n,r)):t.push(o)}}const ga="!~{",ya="}~",xa=new RegExp(`${ga}[0-9a-zA-Z_$]{1,59}${ya}`,"g"),Ea=(e,t)=>e.replace(xa,(e=>t.get(e)||e)),ba=(e,t,s)=>e.replace(xa,(e=>e===t?s:e)),va=(e,t)=>{const s=new Set,i=e.replace(xa,(e=>t.has(e)?(s.add(e),`${ga}${"0".repeat(e.length-5)}${ya}`):e));return{containedPlaceholders:s,transformedCode:i}},Sa=Symbol("bundleKeys"),Aa={type:"placeholder"};function ka(e,t,s){return M(e)?Ye(Yt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,i,n)=>{if(!s.hasOwnProperty(i)||n&&"hash"!==i)return Ye(Yt(`"[${i}${n||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=s[i](n&&Number.parseInt(n.slice(1)));return M(r)?Ye(Yt(`Invalid substitution "${r}" for placeholder "[${i}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Ia(e,{[Sa]:t}){if(!t.has(e.toLowerCase()))return e;const s=C(e);e=e.slice(0,Math.max(0,e.length-s.length));let i,n=1;for(;t.has((i=e+ ++n+s).toLowerCase()););return i}const wa=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Pa(e,t,s,i){const n="function"==typeof t?t(e.id):t[e.id];return n||(s?(i(ve,(r=e.id,o=e.variableName,{code:gt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:Oe(je)})),e.variableName):void 0);var r,o}class Ca{constructor(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=s,this.unsetOptions=i,this.pluginDriver=n,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=h,this.getPlaceholder=u,this.bundle=d,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!s.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||s.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=be(this.generateVariableName())}static generateFacade(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){const m=new Ca([],e,t,s,i,n,r,o,a,l,null,u,d,p,f);m.assignFacadeName(h,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof Do?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const s=e.getExportNamesByVariable();for(const e of this.exports)if(!s.has(e))return!1;for(const i of t)if(!(i.module===e||s.has(i)||i instanceof fo&&s.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,s){const i=this.getRenderedChunkInfo(),n=e=>Ea(e,s),r=this.fileName=n(i.fileName);return{...i,code:e,dynamicImports:i.dynamicImports.map(n),fileName:r,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(n),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[n(e),t]))),imports:i.imports.map(n),map:t,referencedFiles:i.referencedFiles.map(n)}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[s,i]of t){this.exportNamesByVariable.set(s,[...i]);for(const e of i)this.exportsByName.set(e,s);e.delete(s)}}this.outputOptions.minifyInternalExports?function(e,t,s){let i=0;for(const n of e){let[e]=n.name;if(t.has(e))do{e=Di(++i),49===e.charCodeAt(0)&&(i+=9*64**(e.length-1),e=Di(i))}while(ye.has(e)||t.has(e));t.set(e,n),s.set(n,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,s){for(const i of e){let e=0,n=i.name;for(;t.has(n);)n=i.name+"$"+ ++e;t.set(n,i),s.set(i,[n])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=pa(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&s.add(t);for(const i of t){const t=Array.from(new Set(i.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&i.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(i.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===i.preserveSignature||"exports-only"===i.preserveSignature&&i.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(i,s)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),i,this.outputOptions.preserveModules))}for(const s of t)e.push(Ca.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,s,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,s)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=$a(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,s)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return D(B(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:s,entryFileNames:i,file:n,format:r,preserveModules:o}=this.outputOptions;if(n)e=w(n);else if(null===this.fileName){const[n,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=ka("function"==typeof n?n(this.getPreRenderedChunkInfo()):n,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=Ia(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Aa),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Oa),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Oa),importedBindings:_a(this.getRenderedDependencies(),Oa),imports:Array.from(this.dependencies,Oa),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof po?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,s,i){const n=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];ma(a,t,r,e,s,i),n.unshift(t)}}const o=new Set;for(const e of n)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:s,inputOptions:{onLog:i},outputOptions:n,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=n;if(l&&!c&&null!==s)for(const t of e)t instanceof Ca&&this.inlineChunkDependencies(t);const h=this.getPreliminaryFileName(),{accessedGlobals:u,indent:d,magicString:p,renderedSource:f,usedModules:m,usesTopLevelAwait:g}=this.renderModules(h.fileName),y=[...this.getRenderedDependencies().values()],x="none"===t?[]:this.getChunkExportDeclarations(a);let E=x.length>0,b=!1;for(const e of y){const{reexports:t}=e;t?.length&&(E=!0,!b&&t.some((e=>"default"===e.reexported))&&(b=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!x.find((({exported:t})=>t===e))))))}if(!b)for(const{exported:e}of x)if("default"===e){b=!0;break}const{intro:v,outro:S,banner:A,footer:k}=await la(n,r,this.getRenderedChunkInfo());return ra[a](f,{accessedGlobals:u,dependencies:y,exports:x,hasDefaultExport:b,hasExports:E,id:h.fileName,indent:d,intro:v,isEntryFacade:c||null!==s&&s.info.isEntry,isModuleFacade:null!==s,log:i,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:g},n),A&&p.prepend(A),k&&p.append(k),{chunk:this,magicString:p,preliminaryFileName:h,usedModules:m}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:s}=this;for(const i of e.implicitlyLoadedBefore){const e=t.get(i);e&&e!==this&&s.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},s,i){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(i?this.getPreserveModulesChunkNameFromModule(s):$a(s)))}checkCircularDependencyImport(e,t){const s=e.module;if(s instanceof Do){const l=this.chunkByModule.get(s);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(ve,(i=s.getExportNamesByVariable().get(e)?.[0]||"*",n=s.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:n,id:o,message:`Export "${i}" of module "${T(n)}" was reexported through module "${T(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${T(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var i,n,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],s=e.getExportNamesByVariable();for(const i of s.keys()){const s=i instanceof fo,n=s?i.getBaseVariable():i;if(this.checkCircularDependencyImport(n,e),!(n instanceof po&&this.outputOptions.preserveModules)){const e=n.module;if(e instanceof Do){const i=this.chunkByModule.get(e);i&&i!==this&&(i.exports.add(n),t.push(n),s&&this.imports.add(n))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?$a(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const s of this.getExportNames()){if("*"===s[0])continue;const i=this.exportsByName.get(s);if(!(i instanceof fo)){const t=i.module;if(t){const i=this.chunkByModule.get(t);if(i!==this){if(!i||"es"!==e)continue;const t=this.renderedDependencies.get(i);if(!t)continue;const{imports:n,reexports:r}=t,o=r?.find((({reexported:e})=>e===s)),a=n?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let n=null,r=!1,o=i.getName(this.snippets.getPropertyAccess);if(i instanceof wi){for(const e of i.declarations)if(e.parent instanceof tr||e instanceof sr&&e.declaration instanceof tr){r=!0;break}}else i instanceof fo&&(n=o,"es"===e&&(o=i.renderName));t.push({exported:s,expression:n,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,s){const i=new Set,n=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Zt){const a=this.externalChunkByModule.get(o);i.add(a),e&&("default"===t.name?yr[s(o.id)]&&n.add(a):"*"===t.name&&Er[s(o.id)]&&r.add(a))}else{const s=this.chunkByModule.get(o);s!==this&&(i.add(s),e&&"default"===s.exportMode&&t.isNamespace&&r.add(s))}}if(t)for(const e of this.dependencies)i.add(e);return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof Ca||e instanceof z)))}getDynamicImportStringAndAssertions(e,t){if(e instanceof Zt){const s=this.externalChunkByModule.get(e);return[`'${s.getImportPath(t)}'`,s.getImportAssertions(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?L(this.fileName):L(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const s of this.imports){const i=s.module;let n,r;if(i instanceof Zt){if(n=this.externalChunkByModule.get(i),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(i.id))return Ye(qt(i.id,r,!1))}else n=this.chunkByModule.get(i),r=n.getVariableExportName(s);F(t,n,U).push({imported:r,local:s.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:s,resolution:i}of t.dynamicImports)s.included&&e.push(i instanceof Do?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:s,resolution:i}:i instanceof Zt?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:s,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:i});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:s,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:i.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=Na(e);if(t)return t;const{preserveModulesRoot:s,sanitizeFileName:i}=this.outputOptions,n=i(I(e.id.split(Ra,1)[0])),r=C(n),o=wa.has(r)?n.slice(0,-r.length):n;return A(o)?s&&N(o).startsWith(s)?o.slice(s.length).replace(/^[/\\]/,""):$(this.inputBase,o):`_virtual/${w(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,s=new Map;for(let i of this.getExportNames()){let n,r,o=!1;if("*"===i[0]){const s=i.slice(1);"defaultOnly"===t(s)&&this.inputOptions.onLog(ve,Ht(s)),o=e,n=this.externalChunkByModule.get(this.modulesById.get(s)),r=i="*"}else{const s=this.exportsByName.get(i);if(s instanceof fo)continue;const a=s.module;if(a instanceof Do){if(n=this.chunkByModule.get(a),n===this)continue;r=n.getVariableExportName(s),o=s.isReassigned}else{if(n=this.externalChunkByModule.get(a),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Ye(qt(a.id,r,!0));o=e&&("default"!==r||xr(t(a.id),!0))}}F(s,n,U).push({imported:r,needsLiveBinding:o,reexported:i})}return s}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const s of t.importMetas){const t=s.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),s=new Map,i=this.getFileName();for(const n of this.dependencies){const r=e.get(n)||null,o=t.get(n)||null,a=n instanceof z||"default"!==n.exportMode,l=n.getImportPath(i);s.set(n,{assertions:n instanceof z?n.getImportAssertions(this.snippets):null,defaultVariableName:n.defaultVariableName,globalName:n instanceof z&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Pa(n,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:n instanceof Ca,name:n.variableName,namedExportsMode:a,namespaceVariableName:n.namespaceVariableName,reexports:o})}return this.renderedDependencies=s}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Ca&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:s,exportNamesByVariable:i,includedNamespaces:n,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:h,pluginDriver:f,renderedModules:m,snippets:x}=this,{compact:E,dynamicImportFunction:b,format:v,freeze:S,namespaceToStringTag:A}=h,{_:k,cnst:I,n:w}=x;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof g)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!u(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{y.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(y.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new g(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let s;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const i=new p(e.hires);return this.intro&&i.advance(this.intro),this.sources.forEach(((e,n)=>{n>0&&i.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=d(o.original);o.intro&&i.advance(o.intro),o.firstChunk.eachNext((s=>{const n=a(s.start);s.intro.length&&i.advance(s.intro),e.filename?s.edited?i.addEdit(r,s.content,n,s.storeName?t.indexOf(s.original):-1):i.addUneditedChunk(r,s,o.original,n,o.sourcemapLocations):i.advance(s.content),s.outro.length&&i.advance(s.outro)})),o.outro&&i.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===s&&(s=[]),s.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?c(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw,x_google_ignoreList:s}}generateMap(e){return new l(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const s=t.content._getRawIndentString();null!==s&&(e[s]||(e[s]=0),e[s]+=1)})),Object.keys(e).sort(((t,s)=>e[t]-e[s]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((s,i)=>{const n=void 0!==s.separator?s.separator:this.separator,r=t||i>0&&/\r?\n$/.test(n);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:r}),t="\n"===s.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,s)=>s>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const s=void 0!==e.separator?e.separator:this.separator;return(t>0?s:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e=>!e.content.isEmpty())))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,s=0;do{if(t=this.sources[s++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let s,i=this.sources.length-1;do{if(s=this.sources[i--],!s){this.intro=this.intro.replace(t,"");break}}while(!s.content.trimEndAborted(e));return this}}({separator:`${w}${w}`}),C=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=fa(t.originalCode);if(null!==e)return e}return"\t"}(a,h),$=[];let N="";const _=new Set,R=new Map,O={dynamicImportFunction:b,exportNamesByVariable:i,format:v,freeze:S,indent:C,namespaceToStringTag:A,pluginDriver:f,snippets:x,useOriginalName:null};let D=!1;for(const e of a){let s,i=0;if(e.isIncluded()||n.has(e)){const r=e.render(O);({source:s}=r),D||(D=r.usesTopLevelAwait),i=s.length(),i&&(E&&s.lastLine().includes("//")&&s.append("\n"),R.set(e,s),P.addSource(s),$.push(e));const o=e.namespace;if(n.has(e)){const e=o.renderBlock(O);o.renderFirst()?N+=w+e:P.addSource(new g(e))}const a=t.get(e.scope);if(a)for(const e of a)_.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();m[e.id]={get code(){return s?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:i}}N&&P.prepend(N+w+w),this.needsExportsShim&&P.prepend(`${w}${I} ${ho}${k}=${k}void 0;${w}${w}`);const L=E?P:P.trim();var T;return o&&0===this.getExportNames().length&&0===s.size&&r(ve,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${T=this.getChunkName()}".`,names:[T]}),{accessedGlobals:_,indent:C,magicString:P,renderedSource:L,usedModules:$,usesTopLevelAwait:D}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:s,pluginDriver:i,snippets:n}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,s,n,i,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAssertions(a,e);o.setExternalResolution("external",a,s,n,i,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,interop:t,namespaceToStringTag:s,preserveModules:i,externalLiveBindings:n}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const s=this.exportsByName.get(t);"es"!==e&&"system"!==e&&s.isReassigned&&!s.isId?s.setRenderNames("exports",t):s instanceof fo?r.add(s):s.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(ho),s&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Lr)o.add(e)}ha(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,t),this.imports,o,e,t,i,n,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:s,orderedModules:i,outputOptions:{format:n}}=this;for(const r of i){for(const s of r.importMetas)s.setResolution(n,t,e);s.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const s=e.namespace.getMemberVariables();for(const e of Object.values(s))e.included&&t.add(e)}for(let s of t){s instanceof ro&&(s=s.getOriginalVariable()),s instanceof fo&&(s=s.getBaseVariable());const t=this.chunkByModule.get(s.module);t!==this&&(this.imports.add(s),s.module instanceof Do&&(this.checkCircularDependencyImport(s,e),s instanceof po&&this.outputOptions.preserveModules||t.exports.add(s)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:s}of e.dynamicImports)t.included&&s instanceof Do&&this.chunkByModule.get(s)===this&&!this.includedNamespaces.has(s)&&(this.includedNamespaces.add(s),this.ensureReexportsAreAvailableForModule(s))}}function $a(e){return Na(e)??L(e.id)}function Na(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function _a(e,t){const s={};for(const[i,n]of e){const e=new Set;if(n.imports)for(const{imported:t}of n.imports)e.add(t);if(n.reexports)for(const{imported:t}of n.reexports)e.add(t);s[t(i)]=[...e]}return s}const Ra=/[#?]/,Oa=e=>e.getFileName();function*Da(e){for(const t of e)yield*t}function La(e,t,s,i){const{chunkDefinitions:n,modulesInManualChunks:r}=function(e){const t=[],s=new Set(e.keys()),i=Object.create(null);for(const[t,n]of e)Ta(t,i[n]||(i[n]=[]),s);for(const[e,s]of Object.entries(i))t.push({alias:e,modules:s});return{chunkDefinitions:t,modulesInManualChunks:s}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,s=new Map,i=[],n=new Set(e);let r=0;for(const e of n){const o=new Set;i.push(o);const a=new Set([e]);for(const e of a){F(s,e,j).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof Zt||a.add(t);for(const{resolution:s}of e.dynamicImports)s instanceof Do&&s.includedDynamicImporters.length>0&&!n.has(s)&&(t.add(s),n.add(s),o.add(s));for(const s of e.implicitlyLoadedBefore)n.has(s)||(t.add(s),n.add(s))}r++}const o=[...n],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,s){const i=new Map,n=new Set;for(const[s,r]of e.entries())i.set(r,s),t.has(r)&&n.add(s);const r=[];for(const e of s){const t=new Set;for(const s of e)t.add(i.get(s));r.push(t)}return{dynamicEntries:n,dynamicImportsByEntry:r}}(o,t,i);return{allEntries:o,dependentEntriesByModule:s,dynamicallyDependentEntriesByDynamicEntry:Ma(s,a,o),dynamicImportsByEntry:l}}(e),h=Va(function*(e,t){for(const[s,i]of e)t.has(s)||(yield{dependentEntries:i,modules:[s]})}(a,r));return function(e,t,s,i){const n=i.map((()=>0n)),r=i.map(((e,s)=>t.has(s)?-1n:0n));let o=1n;for(const{dependentEntries:t}of e){for(const e of t)n[e]|=o;o<<=1n}const a=t;for(const[e,t]of a){a.delete(e);const i=r[e];let o=i;for(const e of t)o&=n[e]|r[e];if(o!==i){r[e]=o;for(const t of s[e])F(a,t,j).add(e)}}o=1n;for(const{dependentEntries:t}of e){for(const e of t)(r[e]&o)===o&&t.delete(e);o<<=1n}}(h,l,c,o),n.push(...function(e,t,s,i){wo("optimize chunks",3);const n=function(e,t,s){const i=[],n=[],r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:t,modules:c}of e){const e={containedAtoms:l,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:t,modules:c,pure:!0,size:0};let h=0,u=!0;for(const t of c)r.set(t,e),t.isIncluded()&&(u&&(u=!t.hasEffects()),h+=s>1?t.estimateSize():1);e.pure=u,e.size=h,o.push(h),u||(a|=l),(h{const e=i;return i<<=1n,r|=e,e})));else{const i=t.get(a);i&&i!==e&&(s.add(i),i.dependentChunks.add(e))}const{containedAtoms:c}=e;for(const e of a)o[e]|=c}}for(const t of e)for(const e of t){const{dependentEntries:t}=e;e.correlatedAtoms=-1n;for(const s of t)e.correlatedAtoms&=o[s]}return r}([n,i],r,t,l),{big:new Set(n),sideEffectAtoms:a,sizeByAtom:o,small:new Set(i)}}(e,t,s);if(!n)return Po("optimize chunks",3),e;return s>1&&i("info",Ut(e.length,n.small.size,"Initially")),function(e,t){const{small:s}=e;for(const i of s){const n=Ba(i,e,t<=1?1:1/0);if(n){const{containedAtoms:r,correlatedAtoms:o,modules:a,pure:l,size:c}=i;s.delete(i),za(n,t,e).delete(n),n.modules.push(...a),n.size+=c,n.pure&&(n.pure=l);const{dependencies:h,dependentChunks:u,dependentEntries:d}=n;n.correlatedAtoms&=o,n.containedAtoms|=r;for(const e of i.dependentEntries)d.add(e);for(const e of i.dependencies)h.add(e),e.dependentChunks.delete(i),e.dependentChunks.add(n);for(const e of i.dependentChunks)u.add(e),e.dependencies.delete(i),e.dependencies.add(n);h.delete(n),u.delete(n),za(n,t,e).add(n)}}}(n,s),s>1&&i("info",Ut(n.small.size+n.big.size,n.small.size,"After merging chunks")),Po("optimize chunks",3),[...n.small,...n.big]}(Va(h),o.length,s,i).map((({modules:e})=>({alias:null,modules:e})))),n}function Ta(e,t,s){const i=new Set([e]);for(const e of i){s.add(e),t.push(e);for(const t of e.dependencies)t instanceof Zt||s.has(t)||i.add(t)}}function Ma(e,t,s){const i=new Map;for(const n of t){const t=F(i,n,j),r=s[n];for(const s of Da([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const i of e.get(s))t.add(i)}return i}function Va(e){var t;const s=Object.create(null);for(const{dependentEntries:i,modules:n}of e){let e=0n;for(const t of i)e|=1n<=t)return 1/0;return i}(o&~r,s,n)}const Ga=(e,t)=>e.execIndex>t.execIndex?1:-1;function Wa(e,t,s){const i=Symbol(e.id),n=[e.id];let r=t;for(e.cycles.add(i);r!==e;)r.cycles.add(i),n.push(r.id),r=s.get(r);return n.push(n[0]),n.reverse(),n}const qa=(e,t)=>t?`(${e})`:e,Ha=/^(?!\d)[\w$]+$/;class Ka{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,s){return{column:t,line:e,name:s,source:this}}}class Ya{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,s=[],i=[],n=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:h,source:{content:u,filename:d}}=l;let p=t.get(d);if(void 0===p)p=e.length,e.push(d),t.set(d,p),s[p]=u;else if(null==s[p])s[p]=u;else if(null!=u&&s[p]!==u)return Ye(Wt(d));const f=[r[0],p,c,o];if(h){let e=n.get(h);void 0===e&&(e=i.length,i.push(h),n.set(h,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:i,sources:e,sourcesContent:s}}traceSegment(e,t,s){const i=this.mappings[e];if(!i)return null;let n=0,r=i.length-1;for(;n<=r;){const e=n+r>>1,o=i[e];if(o[0]===t||n===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:s):null}o[0]>t?r=e-1:n=e+1}return null}}function Xa(e){return function(t,s){return s.mappings?new Ya(s,[t]):(e(ve,(i=s.plugin,{code:It,message:`Sourcemap is likely to be incorrect: a plugin (${i}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:i,url:Oe(Le)})),new Ya({mappings:[],names:[]},[t]));var i}}function Qa(e,t,s,i,n){let r;if(s){const t=s.sources,i=s.sourcesContent||[],n=P(e)||".",o=s.sourceRoot||".",a=t.map(((e,t)=>new Ka(N(n,o,e),i[t])));r=new Ya(s,a)}else r=new Ka(e,t);return i.reduce(n,r)}var Za={},Ja=el;function el(e,t){if(!e)throw new Error(t||"Assertion failed")}el.equal=function(e,t,s){if(e!=t)throw new Error(s||"Assertion failed: "+e+" != "+t)};var tl={exports:{}};"function"==typeof Object.create?tl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:tl.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var sl=tl.exports,il=Ja,nl=sl;function rl(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function ol(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function al(e){return 1===e.length?"0"+e:e}function ll(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Za.inherits=nl,Za.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var s=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,s[i++]=63&r|128):rl(e,n)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n)),s[i++]=r>>18|240,s[i++]=r>>12&63|128,s[i++]=r>>6&63|128,s[i++]=63&r|128):(s[i++]=r>>12|224,s[i++]=r>>6&63|128,s[i++]=63&r|128)}else for(n=0;n>>0}return r},Za.split32=function(e,t){for(var s=new Array(4*e.length),i=0,n=0;i>>24,s[n+1]=r>>>16&255,s[n+2]=r>>>8&255,s[n+3]=255&r):(s[n+3]=r>>>24,s[n+2]=r>>>16&255,s[n+1]=r>>>8&255,s[n]=255&r)}return s},Za.rotr32=function(e,t){return e>>>t|e<<32-t},Za.rotl32=function(e,t){return e<>>32-t},Za.sum32=function(e,t){return e+t>>>0},Za.sum32_3=function(e,t,s){return e+t+s>>>0},Za.sum32_4=function(e,t,s,i){return e+t+s+i>>>0},Za.sum32_5=function(e,t,s,i,n){return e+t+s+i+n>>>0},Za.sum64=function(e,t,s,i){var n=e[t],r=i+e[t+1]>>>0,o=(r>>0,e[t+1]=r},Za.sum64_hi=function(e,t,s,i){return(t+i>>>0>>0},Za.sum64_lo=function(e,t,s,i){return t+i>>>0},Za.sum64_4_hi=function(e,t,s,i,n,r,o,a){var l=0,c=t;return l+=(c=c+i>>>0)>>0)>>0)>>0},Za.sum64_4_lo=function(e,t,s,i,n,r,o,a){return t+i+r+a>>>0},Za.sum64_5_hi=function(e,t,s,i,n,r,o,a,l,c){var h=0,u=t;return h+=(u=u+i>>>0)>>0)>>0)>>0)>>0},Za.sum64_5_lo=function(e,t,s,i,n,r,o,a,l,c){return t+i+r+a+c>>>0},Za.rotr64_hi=function(e,t,s){return(t<<32-s|e>>>s)>>>0},Za.rotr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0},Za.shr64_hi=function(e,t,s){return e>>>s},Za.shr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0};var cl={},hl=Za,ul=Ja;function dl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}cl.BlockHash=dl,dl.prototype.update=function(e,t){if(e=hl.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var s=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-s,e.length),0===this.pending.length&&(this.pending=null),e=hl.join32(e,0,e.length-s,this.endian);for(var i=0;i>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,r=8;r>>3},pl.g1_256=function(e){return fl(e,17)^fl(e,19)^e>>>10};var xl=Za,El=cl,bl=pl,vl=Ja,Sl=xl.sum32,Al=xl.sum32_4,kl=xl.sum32_5,Il=bl.ch32,wl=bl.maj32,Pl=bl.s0_256,Cl=bl.s1_256,$l=bl.g0_256,Nl=bl.g1_256,_l=El.BlockHash,Rl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ol(){if(!(this instanceof Ol))return new Ol;_l.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Rl,this.W=new Array(64)}xl.inherits(Ol,_l);var Dl=Ol;Ol.blockSize=512,Ol.outSize=256,Ol.hmacStrength=192,Ol.padLength=64,Ol.prototype._update=function(e,t){for(var s=this.W,i=0;i<16;i++)s[i]=e[t+i];for(;iLl();function Ml(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),""===e.mappings)return{mappings:[],names:[],sources:[],version:3};const t="string"==typeof e.mappings?i.decode(e.mappings):e.mappings;return{...e,mappings:t}}async function Vl(e,t,s,i,n){wo("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));Po("render chunks",2),wo("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{nonHashedChunksWithPlaceholders:a,renderedChunksByPlaceholder:l,hashDependenciesByPlaceholder:c}=await async function(e,t,s,i,n){const r=[],o=new Map,a=new Map,l=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&l.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:c,hashPlaceholder:h},magicString:u,usedModules:d})=>{const p={chunk:e,fileName:c,...await Bl(u,c,d,t,s,i,n)},{code:f}=p;if(h){const{containedPlaceholders:t,transformedCode:s}=va(f,l),n=Tl().update(s),r=i.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&n.update(r),o.set(h,p),a.set(h,{containedPlaceholders:t,contentHash:n.digest("hex")})}else r.push(p)}))),{hashDependenciesByPlaceholder:a,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,i,s,n),h=function(e,t,s){const i=new Map;for(const[n,{fileName:r}]of e){let e=Tl();const o=new Set([n]);for(const s of o){const{containedPlaceholders:i,contentHash:n}=t.get(s);e.update(n);for(const e of i)o.add(e)}let a,l;do{l&&(e=Tl().update(l)),l=e.digest("hex").slice(0,n.length),a=ba(r,n,l)}while(s[Sa].has(a.toLowerCase()));s[a]=Aa,i.set(n,l)}return i}(l,c,t);!function(e,t,s,i,n,r){for(const{chunk:i,code:o,fileName:a,map:l}of e.values()){let e=Ea(o,t);const c=Ea(a,t);l&&(l.file=Ea(l.file,t),e+=zl(c,l,n,r)),s[c]=i.finalizeChunk(e,l,t)}for(const{chunk:e,code:o,fileName:a,map:l}of i){let i=t.size>0?Ea(o,t):o;l&&(i+=zl(a,l,n,r)),s[a]=e.finalizeChunk(i,l,t)}}(l,h,t,a,s,i),Po("transform chunks",2)}async function Bl(e,t,s,i,n,r,o){let a=null;const c=[];let h=await r.hookReduceArg0("renderChunk",[e.toString(),i[t],n,{chunks:i}],((e,t,s)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Ml(t.map);c.push(e||{missing:!0,plugin:s.name})}return t.code}));const{compact:u,dir:d,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:x}=n;if(u||"\n"===h[h.length-1]||(h+="\n"),f){let i;wo("sourcemaps",3),i=p?N(g||p):d?N(d,t):N(t);a=function(e,t,s,i,n,r){const o=Xa(r),a=s.filter((e=>!e.excludeFromSourcemap)).map((e=>Qa(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),c=new Ya(t,a),h=i.reduce(o,c);let{sources:u,sourcesContent:d,names:p,mappings:f}=h.traceMappings();if(e){const t=P(e);u=u.map((e=>$(t,e))),e=w(e)}return d=n?null:d,new l({file:e,mappings:f,names:p,sources:u,sourcesContent:d})}(i,e.generateDecodedMap({}),s,c,m,o);for(let e=0;e{const t=new Set;return new Proxy(e,{deleteProperty:(e,s)=>("string"==typeof s&&t.delete(s.toLowerCase()),Reflect.deleteProperty(e,s)),get:(e,s)=>s===Sa?t:Reflect.get(e,s),set:(e,s,i)=>("string"==typeof s&&t.add(s.toLowerCase()),Reflect.set(e,s,i))})})(t);this.pluginDriver.setOutputBundle(s,this.outputOptions);try{wo("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Po("initialize render",2),wo("generate chunks",2);const e=(()=>{let e=0;return(t,s=8)=>{if(s>64)return Ye(Yt(`Hashes cannot be longer than 64 characters, received ${s}. Check the "${t}" option.`));const i=`${ga}${Di(++e).padStart(s-5,"0")}${ya}`;return i.length>s?Ye(Yt(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${i.length}, received ${s}. Check the "${t}" option.`)):i}})(),t=await this.generateChunks(s,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Ye(zt("output.format",ze,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Ye(zt("output.file",Me,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return Ye(zt("output.sourcemapFile",He,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(ve,zt("output.amd.id",Te,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();Po("generate chunks",2),await Vl(t,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,s=Object.values(e);for(const e of s)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of s)if("chunk"===e.type)for(const s of e.referencedFiles)t.has(s)&&t.delete(s);for(const s of t)delete e[s]})(s),wo("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,s,e]),this.finaliseAssets(s),Po("generate bundle",2),Po("GENERATE",1),t}async addManualChunks(e){const t=new Map,s=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:i}of s)for(const s of i)jl(e,s,t);return t}assignManualChunks(e){const t=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values()){const n=e(i.id,s);if("string"==typeof n){if(!(i instanceof Do))return Ye(Kt(i.id));t.push([n,i])}}t.sort((([e],[t])=>e>t?1:e`${t?"async ":""}function${s?` ${s}`:""}${r}(${e.join(`,${r}`)})${r}`,h=t?(e,{isAsync:t,name:s})=>{const i=1===e.length;return`${s?`${l} ${s}${r}=${r}`:""}${t?`async${i?" ":r}`:""}${i?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:s,lineBreakIndent:i,name:n})=>[`${h(e,{isAsync:!1,name:n})}${t?i?`${o}${i.base}${i.t}`:"":`{${i?`${o}${i.base}${i.t}`:r}${s?"return ":""}`}`,t?`${n?";":""}${i?`${o}${i.base}`:""}`:`${a}${i?`${o}${i.base}`:r}}`],d=n?e=>Ha.test(e):e=>!ye.has(e)&&Ha.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,s,{needsArrowReturnParens:i,needsWrappedFunction:n})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${qa(`${r}${qa(s,t&&i)}${o}`,t||n)}(`},getFunctionIntro:h,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const s=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${s}${t}`;const n=!d(e);return e===t&&i&&!n?s+e:`${s}${n?`'${e}'`:e}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>d(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const s of e.values())s instanceof Do&&(s.isIncluded()||s.info.isEntry||s.includedDynamicImporters.length>0)&&t.push(s);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return P(e[0]);const t=e.slice(1).reduce(((e,t)=>{const s=t.split(/\/+|\\+/);let i;for(i=0;e[i]===s[i]&&i1?t.join("/"):"/"}(function(e,t){const s=[];for(const i of e)(i.info.isEntry||t)&&A(i.id)&&s.push(i.id);return s}(l,r)),h=function(e,t,s){const i=new Map;for(const n of e.values())n instanceof Zt&&i.set(n,new z(n,t,s));return i}(this.graph.modulesById,this.outputOptions,c),u=[],d=new Map;for(const{alias:n,modules:p}of i?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):La(this.graph.entryModules,o,s,this.inputOptions.onLog)){p.sort(Ga);const s=new Ca(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,d,h,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);u.push(s)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function jl(e,t,s){const i=s.get(t);if("string"==typeof i&&i!==e)return Ye((n=t.id,r=e,o=i,{code:lt,message:`Cannot assign "${T(n)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var n,r,o;s.set(t,e)}var Ul=[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,81,2,71,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,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Gl=[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,20,1,64,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,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,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,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,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],Wl="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ql={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"},Hl="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",Kl={5:Hl,"5module":Hl+" export import",6:Hl+" const class extends export import super"},Yl=/^in(stanceof)?$/,Xl=new RegExp("["+Wl+"]"),Ql=new RegExp("["+Wl+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Zl(e,t){for(var s=65536,i=0;ie)return!1;if((s+=t[i+1])>=e)return!0}return!1}function Jl(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Xl.test(String.fromCharCode(e)):!1!==t&&Zl(e,Gl)))}function ec(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ql.test(String.fromCharCode(e)):!1!==t&&(Zl(e,Gl)||Zl(e,Ul)))))}var tc=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function sc(e,t){return new tc(e,{beforeExpr:!0,binop:t})}var ic={beforeExpr:!0},nc={startsExpr:!0},rc={};function oc(e,t){return void 0===t&&(t={}),t.keyword=e,rc[e]=new tc(e,t)}var ac={num:new tc("num",nc),regexp:new tc("regexp",nc),string:new tc("string",nc),name:new tc("name",nc),privateId:new tc("privateId",nc),eof:new tc("eof"),bracketL:new tc("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new tc("]"),braceL:new tc("{",{beforeExpr:!0,startsExpr:!0}),braceR:new tc("}"),parenL:new tc("(",{beforeExpr:!0,startsExpr:!0}),parenR:new tc(")"),comma:new tc(",",ic),semi:new tc(";",ic),colon:new tc(":",ic),dot:new tc("."),question:new tc("?",ic),questionDot:new tc("?."),arrow:new tc("=>",ic),template:new tc("template"),invalidTemplate:new tc("invalidTemplate"),ellipsis:new tc("...",ic),backQuote:new tc("`",nc),dollarBraceL:new tc("${",{beforeExpr:!0,startsExpr:!0}),eq:new tc("=",{beforeExpr:!0,isAssign:!0}),assign:new tc("_=",{beforeExpr:!0,isAssign:!0}),incDec:new tc("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new tc("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:sc("||",1),logicalAND:sc("&&",2),bitwiseOR:sc("|",3),bitwiseXOR:sc("^",4),bitwiseAND:sc("&",5),equality:sc("==/!=/===/!==",6),relational:sc("/<=/>=",7),bitShift:sc("<>/>>>",8),plusMin:new tc("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:sc("%",10),star:sc("*",10),slash:sc("/",10),starstar:new tc("**",{beforeExpr:!0}),coalesce:sc("??",1),_break:oc("break"),_case:oc("case",ic),_catch:oc("catch"),_continue:oc("continue"),_debugger:oc("debugger"),_default:oc("default",ic),_do:oc("do",{isLoop:!0,beforeExpr:!0}),_else:oc("else",ic),_finally:oc("finally"),_for:oc("for",{isLoop:!0}),_function:oc("function",nc),_if:oc("if"),_return:oc("return",ic),_switch:oc("switch"),_throw:oc("throw",ic),_try:oc("try"),_var:oc("var"),_const:oc("const"),_while:oc("while",{isLoop:!0}),_with:oc("with"),_new:oc("new",{beforeExpr:!0,startsExpr:!0}),_this:oc("this",nc),_super:oc("super",nc),_class:oc("class",nc),_extends:oc("extends",ic),_export:oc("export"),_import:oc("import",nc),_null:oc("null",nc),_true:oc("true",nc),_false:oc("false",nc),_in:oc("in",{beforeExpr:!0,binop:7}),_instanceof:oc("instanceof",{beforeExpr:!0,binop:7}),_typeof:oc("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:oc("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:oc("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},lc=/\r\n?|\n|\u2028|\u2029/,cc=new RegExp(lc.source,"g");function hc(e){return 10===e||13===e||8232===e||8233===e}function uc(e,t,s){void 0===s&&(s=e.length);for(var i=t;i>10),56320+(1023&e)))}var vc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Sc=function(e,t){this.line=e,this.column=t};Sc.prototype.offset=function(e){return new Sc(this.line,this.column+e)};var Ac=function(e,t,s){this.start=t,this.end=s,null!==e.sourceFile&&(this.source=e.sourceFile)};function kc(e,t){for(var s=1,i=0;;){var n=uc(e,i,t);if(n<0)return new Sc(s,t-i);++s,i=n}}var Ic={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},wc=!1;function Pc(e){var t={};for(var s in Ic)t[s]=e&&yc(e,s)?e[s]:Ic[s];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!wc&&"object"==typeof console&&console.warn&&(wc=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),xc(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return xc(t.onComment)&&(t.onComment=function(e,t){return function(s,i,n,r,o,a){var l={type:s?"Block":"Line",value:i,start:n,end:r};e.locations&&(l.loc=new Ac(this,o,a)),e.ranges&&(l.range=[n,r]),t.push(l)}}(t,t.onComment)),t}var Cc=256;function $c(e,t){return 2|(e?4:0)|(t?8:0)}var Nc=function(e,t,s){this.options=e=Pc(e),this.sourceFile=e.sourceFile,this.keywords=Ec(Kl[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=ql[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=Ec(i);var n=(i?i+" ":"")+ql.strict;this.reservedWordsStrict=Ec(n),this.reservedWordsStrictBind=Ec(n+" "+ql.strictBind),this.input=String(t),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(lc).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=ac.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},_c={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Nc.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},_c.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},_c.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_c.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},_c.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Cc)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},_c.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(64&t)>0||s||this.options.allowSuperOutsideMethod},_c.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},_c.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},_c.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(258&t)>0||s},_c.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Cc)>0},Nc.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var s=this,i=0;i=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}e+=t[0].length,pc.lastIndex=e,e+=pc.exec(this.input)[0].length,";"===this.input[e]&&e++}},Rc.eat=function(e){return this.type===e&&(this.next(),!0)},Rc.isContextual=function(e){return this.type===ac.name&&this.value===e&&!this.containsEsc},Rc.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Rc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Rc.canInsertSemicolon=function(){return this.type===ac.eof||this.type===ac.braceR||lc.test(this.input.slice(this.lastTokEnd,this.start))},Rc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Rc.semicolon=function(){this.eat(ac.semi)||this.insertSemicolon()||this.unexpected()},Rc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Rc.expect=function(e){this.eat(e)||this.unexpected()},Rc.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Dc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Rc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},Rc.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,i=e.doubleProto;if(!t)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Rc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&i<56320)return!0;if(Jl(i,!0)){for(var n=s+1;ec(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!Yl.test(r))return!0}return!1},Lc.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;pc.lastIndex=this.pos;var e,t=pc.exec(this.input),s=this.pos+t[0].length;return!(lc.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(ec(e=this.input.charCodeAt(s+8))||e>55295&&e<56320))},Lc.parseStatement=function(e,t,s){var i,n=this.type,r=this.startNode();switch(this.isLet(e)&&(n=ac._var,i="let"),n){case ac._break:case ac._continue:return this.parseBreakContinueStatement(r,n.keyword);case ac._debugger:return this.parseDebuggerStatement(r);case ac._do:return this.parseDoStatement(r);case ac._for:return this.parseForStatement(r);case ac._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case ac._class:return e&&this.unexpected(),this.parseClass(r,!0);case ac._if:return this.parseIfStatement(r);case ac._return:return this.parseReturnStatement(r);case ac._switch:return this.parseSwitchStatement(r);case ac._throw:return this.parseThrowStatement(r);case ac._try:return this.parseTryStatement(r);case ac._const:case ac._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case ac._while:return this.parseWhileStatement(r);case ac._with:return this.parseWithStatement(r);case ac.braceL:return this.parseBlock(!0,r);case ac.semi:return this.parseEmptyStatement(r);case ac._export:case ac._import:if(this.options.ecmaVersion>10&&n===ac._import){pc.lastIndex=this.pos;var o=pc.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)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'")),n===ac._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var c=this.value,h=this.parseExpression();return n===ac.name&&"Identifier"===h.type&&this.eat(ac.colon)?this.parseLabeledStatement(r,c,h,e):this.parseExpressionStatement(r,h)}},Lc.parseBreakContinueStatement=function(e,t){var s="break"===t;this.next(),this.eat(ac.semi)||this.insertSemicolon()?e.label=null:this.type!==ac.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(ac.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Lc.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Tc),this.enterScope(0),this.expect(ac.parenL),this.type===ac.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===ac._var||this.type===ac._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===ac._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===ac._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var r=this.isContextual("let"),o=!1,a=new Dc,l=this.parseExpression(!(t>-1)||"await",a);return this.type===ac._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===ac._in?t>-1&&this.unexpected(t):e.await=t>-1),r&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},Lc.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,Bc|(s?0:zc),!1,t)},Lc.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(ac._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Lc.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(ac.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Lc.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(ac.braceL),this.labels.push(Mc),this.enterScope(0);for(var s=!1;this.type!==ac.braceR;)if(this.type===ac._case||this.type===ac._default){var i=this.type===ac._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(ac.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")},Lc.parseThrowStatement=function(e){return this.next(),lc.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 Vc=[];Lc.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(ac.parenR),e},Lc.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===ac._catch){var t=this.startNode();this.next(),this.eat(ac.parenL)?t.param=this.parseCatchClauseParam():(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(ac._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Lc.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Lc.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Tc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Lc.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")},Lc.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Lc.parseLabeledStatement=function(e,t,s,i){for(var n=0,r=this.labels;n=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},Lc.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Lc.parseBlock=function(e,t,s){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(ac.braceL),e&&this.enterScope(0);this.type!==ac.braceR;){var i=this.parseStatement(null);t.body.push(i)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Lc.parseFor=function(e,t){return e.init=t,this.expect(ac.semi),e.test=this.type===ac.semi?null:this.parseExpression(),this.expect(ac.semi),e.update=this.type===ac.parenR?null:this.parseExpression(),this.expect(ac.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Lc.parseForIn=function(e,t){var s=this.type===ac._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(ac.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},Lc.parseVar=function(e,t,s,i){for(e.declarations=[],e.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(ac.eq)?n.init=this.parseMaybeAssign(t):i||"const"!==s||this.type===ac._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"Identifier"===n.id.type||t&&(this.type===ac._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(ac.comma))break}return e},Lc.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var Bc=1,zc=2;function Fc(e,t){var s=t.key.name,i=e[s],n="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(e[s]="true",!1):!!i||(e[s]=n,!1)}function jc(e,t){var s=e.computed,i=e.key;return!s&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Lc.parseFunction=function(e,t,s,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===ac.star&&t&zc&&this.unexpected(),e.generator=this.eat(ac.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&Bc&&(e.id=4&t&&this.type!==ac.name?null:this.parseIdent(),!e.id||t&zc||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope($c(e.async,e.generator)),t&Bc||(e.id=this.type===ac.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,n),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&Bc?"FunctionDeclaration":"FunctionExpression")},Lc.parseFunctionParams=function(e){this.expect(ac.parenL),e.params=this.parseBindingList(ac.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Lc.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(ac.braceL);this.type!==ac.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(r&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),r=!0):o.key&&"PrivateIdentifier"===o.key.type&&Fc(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Lc.parseClassElement=function(e){if(this.eat(ac.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(ac.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===ac.star?a=!0:i="static"}if(s.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==ac.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(t>=9||!r)&&this.eat(ac.star)&&(n=!0),!i&&!r&&!n){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===ac.parenL||"method"!==o||n||r){var c=!s.static&&jc(s,"constructor"),h=c&&e;c&&"method"!==o&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=c?"constructor":o,this.parseClassMethod(s,n,r,h)}else this.parseClassField(s);return s},Lc.isClassElementNameStart=function(){return this.type===ac.name||this.type===ac.privateId||this.type===ac.num||this.type===ac.string||this.type===ac.bracketL||this.type.keyword},Lc.parseClassElementName=function(e){this.type===ac.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Lc.parseClassMethod=function(e,t,s,i){var n=e.key;"constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):e.static&&jc(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=e.value=this.parseMethod(t,s,i);return"get"===e.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===e.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Lc.parseClassField=function(e){if(jc(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&jc(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(ac.eq)){var t=this.currentThisScope(),s=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=s}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Lc.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==ac.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Lc.parseClassId=function(e,t){this.type===ac.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Lc.parseClassSuper=function(e){e.superClass=this.eat(ac._extends)?this.parseExprSubscripts(null,!1):null},Lc.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Lc.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,s=e.used,i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==ac.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},Lc.parseExport=function(e,t){if(this.next(),this.eat(ac.star))return this.parseExportAllDeclaration(e,t);if(this.eat(ac._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==ac.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,i=e.specifiers;s=13&&this.type===ac.string){var e=this.parseLiteral(this.value);return vc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Lc.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Uc=Nc.prototype;Uc.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=e.properties;i=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(ac._function))return this.overrideContext(Wc.f_expr),this.parseFunction(this.startNodeAt(r,o),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(ac.arrow))return this.parseArrowExpression(this.startNodeAt(r,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===ac.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(ac.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,o),[l],!0,t)}return l;case ac.regexp:var c=this.value;return(i=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},i;case ac.num:case ac.string:return this.parseLiteral(this.value);case ac._null:case ac._true:case ac._false:return(i=this.startNode()).value=this.type===ac._null?null:this.type===ac._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case ac.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case ac.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(ac.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case ac.braceL:return this.overrideContext(Wc.b_expr),this.parseObj(!1,e);case ac._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case ac._class:return this.parseClass(this.startNode(),!1);case ac._new:return this.parseNew();case ac.backQuote:return this.parseTemplate();case ac._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},Hc.parseExprAtomDefault=function(){this.unexpected()},Hc.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var s=this.parseIdent(!0);return this.type!==ac.parenL||e?this.type===ac.dot?(t.meta=s,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Hc.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(ac.parenR)){var t=this.start;this.eat(ac.comma)&&this.eat(ac.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Hc.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Hc.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Hc.parseParenExpression=function(){this.expect(ac.parenL);var e=this.parseExpression();return this.expect(ac.parenR),e},Hc.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Hc.parseParenAndDistinguishExpression=function(e,t){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],h=!0,u=!1,d=new Dc,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==ac.parenR;){if(h?h=!1:this.expect(ac.comma),r&&this.afterTrailingComma(ac.parenR,!0)){u=!0;break}if(this.type===ac.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===ac.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(ac.parenR),e&&this.shouldParseArrow(c)&&this.eat(ac.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(i,n,c,t);c.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((s=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(s,"SequenceExpression",m,g)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(i,n);return y.expression=s,this.finishNode(y,"ParenthesizedExpression")}return s},Hc.parseParenItem=function(e){return e},Hc.parseParenArrowList=function(e,t,s,i){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,i)};var Yc=[];Hc.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(ac.dot)){e.meta=t;var s=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(ac.parenL)?e.arguments=this.parseExprList(ac.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Yc,this.finishNode(e,"NewExpression")},Hc.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===ac.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value,cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===ac.backQuote,this.finishNode(s,"TemplateElement")},Hc.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(s.quasis=[i];!i.tail;)this.type===ac.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(ac.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(ac.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},Hc.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===ac.name||this.type===ac.num||this.type===ac.string||this.type===ac.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===ac.star)&&!lc.test(this.input.slice(this.lastTokEnd,this.start))},Hc.parseObj=function(e,t){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(ac.braceR);){if(i)i=!1;else if(this.expect(ac.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(ac.braceR))break;var r=this.parseProperty(e,t);e||this.checkPropClash(r,n,t),s.properties.push(r)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Hc.parseProperty=function(e,t){var s,i,n,r,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(ac.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===ac.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===ac.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(n=this.start,r=this.startLoc),e||(s=this.eat(ac.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(o)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(ac.star),this.parsePropertyName(o)):i=!1,this.parsePropertyValue(o,e,s,i,n,r,t,a),this.finishNode(o,"Property")},Hc.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var s=e.value.start;"get"===e.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Hc.parsePropertyValue=function(e,t,s,i,n,r,o,a){(s||i)&&this.type===ac.colon&&this.unexpected(),this.eat(ac.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===ac.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(s,i)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===ac.comma||this.type===ac.braceR||this.type===ac.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key)):this.type===ac.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(e))},Hc.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(ac.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(ac.bracketR),e.key;e.computed=!1}return e.key=this.type===ac.num||this.type===ac.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Hc.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Hc.parseMethod=function(e,t,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|$c(t,i.generator)|(s?128:0)),this.expect(ac.parenL),i.params=this.parseBindingList(ac.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},Hc.parseArrowExpression=function(e,t,s,i){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|$c(s,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Hc.parseFunctionBody=function(e,t,s,i){var n=t&&this.type!==ac.braceL,r=this.strict,o=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!r&&!o&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!r),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Hc.isSimpleParamList=function(e){for(var t=0,s=e;t-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&1&n.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(e)>-1:r.lexical.indexOf(e)>-1||r.var.indexOf(e)>-1,r.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},Qc.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Qc.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Qc.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Qc.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var Jc=function(e,t,s){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new Ac(e,s)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},eh=Nc.prototype;function th(e,t,s,i){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=s),e}eh.startNode=function(){return new Jc(this,this.start,this.startLoc)},eh.startNodeAt=function(e,t){return new Jc(this,e,t)},eh.finishNode=function(e,t){return th.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},eh.finishNodeAt=function(e,t,s,i){return th.call(this,e,t,s,i)},eh.copyNode=function(e){var t=new Jc(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var sh="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",ih=sh+" Extended_Pictographic",nh=ih+" EBase EComp EMod EPres ExtPict",rh={9:sh,10:ih,11:ih,12:nh,13:nh,14:nh},oh={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},ah="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",lh="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",ch=lh+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",hh=ch+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",uh=hh+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",dh=uh+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ph={9:lh,10:ch,11:hh,12:uh,13:dh,14:dh+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},fh={};function mh(e){var t=fh[e]={binary:Ec(rh[e]+" "+ah),binaryOfStrings:Ec(oh[e]),nonBinary:{General_Category:Ec(ah),Script:Ec(ph[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var gh=0,yh=[9,10,11,12,13,14];gh=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=fh[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function bh(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function vh(e){return e>=65&&e<=90||e>=97&&e<=122}Eh.prototype.reset=function(e,t,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|e,this.source=t+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},Eh.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Eh.prototype.at=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return-1;var n=s.charCodeAt(e);if(!t&&!this.switchU||n<=55295||n>=57344||e+1>=i)return n;var r=s.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},Eh.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return i;var n,r=s.charCodeAt(e);return!t&&!this.switchU||r<=55295||r>=57344||e+1>=i||(n=s.charCodeAt(e+1))<56320||n>57343?e+1:e+2},Eh.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Eh.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Eh.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Eh.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Eh.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var s=this.pos,i=0,n=e;i-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(i=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")},xh.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},xh.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},xh.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},xh.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},xh.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return-1!==n&&n=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},xh.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},xh.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},xh.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!bh(t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;-1!==(s=e.current())&&!bh(s);)e.advance();return e.pos!==t},xh.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},xh.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},xh.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},xh.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=bc(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=bc(e.lastIntValue);return!0}return!1},xh.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return Jl(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},xh.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return ec(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},xh.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},xh.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},xh.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},xh.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},xh.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},xh.regexp_eatZero=function(e){return 48===e.current()&&!kh(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},xh.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},xh.regexp_eatControlLetter=function(e){var t=e.current();return!!vh(t)&&(e.lastIntValue=t%32,e.advance(),!0)},xh.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var s,i=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(n&&r>=55296&&r<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(r-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=r}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((s=e.lastIntValue)>=0&&s<=1114111))return!0;n&&e.raise("Invalid unicode escape"),e.pos=i}return!1},xh.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Sh(e){return vh(e)||95===e}function Ah(e){return Sh(e)||kh(e)}function kh(e){return e>=48&&e<=57}function Ih(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function wh(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ph(e){return e>=48&&e<=55}xh.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=80===t)||112===t)){var i;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&2===i&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return 0},xh.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,i),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return 0},xh.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){yc(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},xh.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},xh.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Sh(t=e.current());)e.lastStringValue+=bc(t),e.advance();return""!==e.lastStringValue},xh.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Ah(t=e.current());)e.lastStringValue+=bc(t),e.advance();return""!==e.lastStringValue},xh.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},xh.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===s&&e.raise("Negated character class may contain strings"),!0}return!1},xh.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},xh.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;!e.switchU||-1!==t&&-1!==s||e.raise("Invalid character class"),-1!==t&&-1!==s&&t>s&&e.raise("Range out of order in character class")}}},xh.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(99===s||Ph(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},xh.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},xh.regexp_classSetExpression=function(e){var t,s=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(s=2);for(var i=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(s=1):e.raise("Invalid character in character class");if(i!==e.pos)return s;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return s}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return s;2===t&&(s=2)}},xh.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return-1!==s&&-1!==i&&s>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},xh.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},xh.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return s&&2===i&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null},xh.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},xh.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},xh.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},xh.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var s=e.current();return!(s<0||s===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(s))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(s)&&(e.advance(),e.lastIntValue=s,!0))},xh.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},xh.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!kh(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},xh.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},xh.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;kh(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t},xh.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;Ih(s=e.current());)e.lastIntValue=16*e.lastIntValue+wh(s),e.advance();return e.pos!==t},xh.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*s+e.lastIntValue:e.lastIntValue=8*t+s}else e.lastIntValue=t;return!0}return!1},xh.regexp_eatOctalDigit=function(e){var t=e.current();return Ph(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},xh.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length?this.finishToken(ac.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},$h.readToken=function(e){return Jl(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},$h.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},$h.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=t;(i=uc(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},$h.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&dc.test(String.fromCharCode(e))))break e;++this.pos}}},$h.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},$h.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(ac.ellipsis)):(++this.pos,this.finishToken(ac.dot))},$h.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(ac.assign,2):this.finishOp(ac.slash,1)},$h.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,i=42===e?ac.star:ac.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++s,i=ac.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(ac.assign,s+1):this.finishOp(i,s)},$h.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(ac.assign,3);return this.finishOp(124===e?ac.logicalOR:ac.logicalAND,2)}return 61===t?this.finishOp(ac.assign,2):this.finishOp(124===e?ac.bitwiseOR:ac.bitwiseAND,1)},$h.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(ac.assign,2):this.finishOp(ac.bitwiseXOR,1)},$h.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!lc.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(ac.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(ac.assign,2):this.finishOp(ac.plusMin,1)},$h.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(ac.assign,s+1):this.finishOp(ac.bitShift,s)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(s=2),this.finishOp(ac.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},$h.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(ac.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(ac.arrow)):this.finishOp(61===e?ac.eq:ac.prefix,1)},$h.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(ac.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(ac.assign,3);return this.finishOp(ac.coalesce,2)}}return this.finishOp(ac.question,1)},$h.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,Jl(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(ac.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+bc(e)+"'")},$h.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(ac.parenL);case 41:return++this.pos,this.finishToken(ac.parenR);case 59:return++this.pos,this.finishToken(ac.semi);case 44:return++this.pos,this.finishToken(ac.comma);case 91:return++this.pos,this.finishToken(ac.bracketL);case 93:return++this.pos,this.finishToken(ac.bracketR);case 123:return++this.pos,this.finishToken(ac.braceL);case 125:return++this.pos,this.finishToken(ac.braceR);case 58:return++this.pos,this.finishToken(ac.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(ac.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(ac.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+bc(e)+"'")},$h.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},$h.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(lc.test(i)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(r);var a=this.regexpState||(this.regexpState=new Eh(this));a.reset(s,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(n,o)}catch(e){}return this.finishToken(ac.regexp,{pattern:n,flags:o,value:l})},$h.readInt=function(e,t,s){for(var i=this.options.ecmaVersion>=12&&void 0===t,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?h-97+10:h>=65?h-65+10:h>=48&&h<=57?h-48:1/0)>=e)break;a=h,o=o*e+u}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=t&&this.pos-r!==t?null:o},$h.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return null==s&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=Nh(this.input.slice(t,this.pos)),++this.pos):Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ac.num,s)},$h.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var s=this.pos-t>=2&&48===this.input.charCodeAt(t);s&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&110===i){var n=Nh(this.input.slice(t,this.pos));return++this.pos,Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(ac.num,n)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),46!==i||s||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||s||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),Jl(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=(r=this.input.slice(t,this.pos),s?parseInt(r,8):parseFloat(r.replace(/_/g,"")));return this.finishToken(ac.num,o)},$h.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},$h.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(hc(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(ac.string,t)};var _h={};$h.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==_h)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},$h.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw _h;this.raise(e,t)},$h.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==ac.template&&this.type!==ac.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(ac.template,e)):36===s?(this.pos+=2,this.finishToken(ac.dollarBraceL)):(++this.pos,this.finishToken(ac.backQuote));if(92===s)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(hc(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},$h.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return hc(t)?"":String.fromCharCode(t)}},$h.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return null===s&&this.invalidStringToken(t,"Bad character escape sequence"),s},$h.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos()=>Ye(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Oe("plugin-development/#a-simple-example")}}(e)),Lh=Dh("fs.mkdir"),Th=Dh("fs.readFile"),Mh=Dh("fs.writeFile");async function Vh(e,t,s,i,n,r,o,a,l){const c=await function(e,t,s,i,n,r,o,a){let l=null,c=null;if(n){l=new Set;for(const s of n)e===s.source&&t===s.importer&&l.add(s.plugin);c=(e,t)=>({...e,resolve:(e,s,{assertions:r,custom:o,isEntry:a,skipSelf:l}=pe)=>i(e,s,o,a,r||fe,l?[...n,{importer:s,plugin:t,source:e}]:n)})}return s.hookFirstAndGetPlugin("resolveId",[e,t,{assertions:a,custom:r,isEntry:o}],c,l)}(e,t,i,n,r,o,a,l);return null==c?Dh("path.resolve")():c[0]}const Bh="at position ",zh="at output position ";const Fh={delete:()=>!1,get(){},has:()=>!1,set(){}};function jh(e){return e.startsWith(Bh)||e.startsWith(zh)?Ye({code:Je,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Ye({code:rt,message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Uh=(e,t,s=Kh)=>{const{onwarn:i,onLog:n}=e,r=Gh(s,i);if(n){const e=ke[t];return(t,s)=>n(t,Wh(s),((t,s)=>{if("error"===t)return Ye(qh(s));ke[t]>=e&&r(t,qh(s))}))}return r},Gh=(e,t)=>t?(s,i)=>{s===ve?t(Wh(i),(t=>e(ve,qh(t)))):e(s,i)}:e,Wh=e=>(Object.defineProperty(e,"toString",{value:()=>Hh(e),writable:!0}),e),qh=e=>"string"==typeof e?{message:e}:"function"==typeof e?qh(e()):e,Hh=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${T(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Kh=(e,t)=>{const s=Hh(t);switch(e){case ve:return console.warn(s);case Ae:return console.debug(s);default:return console.info(s)}};function Yh(e,t,s,i,n=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));o.length>0&&i(ve,function(e,t,s){return{code:Pt,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${s.join(", ")}`}}(s,o,[...r].sort()))}const Xh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:me,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:me,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:me,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Qh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Zh=(e,t,s,i,n)=>{const r=e?.preset;if(r){const n=t[r];if(n)return{...n,...e};Ye(zt(`${s}.preset`,i,`valid values are ${Re(Object.keys(t))}`,r))}return((e,t,s,i)=>n=>{if("string"==typeof n){const r=e[n];if(r)return r;Ye(zt(t,s,`valid values are ${i}${Re(Object.keys(e))}. You can also supply an object for more fine-grained control`,n))}return(e=>e&&"object"==typeof e?e:{})(n)})(t,s,i,n)(e)},Jh=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function eu(e,t,s,i){const n=t.id,r=[];let o=null===e.map?null:Ml(e.map);const a=e.code;let c=e.ast;const h=[],u=[];let d=!1;const p=()=>d=!0;let f="",m=e.code;const y=e=>(t,s)=>{t=qh(t),s&&Xe(t,s,m,n),t.id=n,t.hook="transform",e(t)};let x;try{x=await s.hookReduceArg0("transform",[m,n],(function(e,s,n){let o,a;if("string"==typeof s)o=s;else{if(!s||"object"!=typeof s)return e;if(t.updateOptions(s),null==s.code)return(s.map||s.ast)&&i(ve,function(e){return{code:St,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(n.name)),e;({code:o,map:a,ast:c}=s)}return null!==a&&r.push(Ml("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:n.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){h.push(t),e.addWatchFile(t)},cache:d?e.cache:(c=e.cache,x=p,{delete:e=>(x(),c.delete(e)),get:e=>(x(),c.get(e)),has:e=>(x(),c.has(e)),set:(e,t)=>(x(),c.set(e,t))}),debug:y(e.debug),emitFile:e=>(u.push(e),s.emitFile(e)),error:(t,s)=>("string"==typeof t&&(t={message:t}),s&&Xe(t,s,m,n),t.id=n,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,s,i,n){return 0===i.length?s:{version:3,...Qa(e,t,s,i,Xa(n)).traceMappings()}}(n,a,o,r,i);if(!e){return new g(a).generateMap({hires:!0,includeContent:!0,source:n})}return o!==e&&(o=e,r.length=0),new l({...e,file:null,sourcesContent:e.sourcesContent})},info:y(e.info),setAssetSource(){return this.error({code:ft,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:y(e.warn)};var c,x}))}catch(e){return Ye(Gt(e,f,{hook:"transform",id:n}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:c,code:x,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:h}}const tu="resolveDependencies";class su{constructor(e,t,s,i){this.graph=e,this.modulesById=t,this.options=s,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,s,i,n,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Vh(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,s,"boolean"==typeof i?i:!t,n),t,e),n),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const s=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,t){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((n=>{for(const[r,o]of n.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,nu(o,e[r],t,i+r);const n=this.indexedEntryModules.find((e=>e.module===o));n?n.index=Math.min(n.index,s+r):this.indexedEntryModules.push({index:s+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),n})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:s,name:i,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:s,name:i||null},a=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,fe),void 0,!1,!e.resolveDependencies||tu)).info}addEntryWithImplicitDependants(e,t){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async i=>{if(nu(i,e,!1,s),!i.info.isEntry){this.implicitEntryModules.add(i);const s=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,i.id))));for(const e of s)i.implicitlyLoadedAfter.add(e);for(const e of i.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(i)}return i})))}async addModuleSource(e,t,s){let i;try{i=await this.graph.fileOperationQueue.run((async()=>await this.pluginDriver.hookFirst("load",[e])??await Th(e,"utf8")))}catch(s){let i=`Could not load ${e}`;throw t&&(i+=` (imported by ${T(t)})`),i+=`: ${s.message}`,s.message=i,s}const n="string"==typeof i?{code:i}:null!=i&&"object"==typeof i&&"string"==typeof i.code?i:Ye(function(e){return{code:"BAD_LOADER",message:`Error loading "${T(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==n.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))s.updateOptions(n),s.setSource(await eu(n,s,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);s.setSource(r)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const s=await Promise.all(t.map((t=>t.then((async([t,s])=>null===s?null:"string"==typeof s?(t.resolution=s,null):t.resolution=await this.fetchResolvedDependency(T(s.id),e.id,s))))));for(const t of s)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({assertions:e,id:t,meta:s,moduleSideEffects:i,syntheticNamedExports:n},r,o,a){const l=this.modulesById.get(t);if(l instanceof Do)return r&&xo(e,l.info.assertions)&&this.options.onLog(ve,Mt(l.info.assertions,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Zt)return Ye({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new Do(this.graph,t,this.options,o,i,n,s,e);this.modulesById.set(t,c),this.graph.watchFiles[t]=!0;const h=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=ou(h).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,h);const d=await h;return a?a===tu&&await u:await this.fetchModuleDependencies(c,...d),c}async fetchModuleDependencies(e,t,s,i){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await i)}fetchResolvedDependency(e,t,s){if(s.external){const{assertions:i,external:n,id:r,moduleSideEffects:o,meta:a}=s;let l=this.modulesById.get(r);if(l){if(!(l instanceof Zt))return Ye(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${T(t)}", but is already an existing non-external module id.`}}(e,t));xo(l.info.assertions,i)&&this.options.onLog(ve,Mt(l.info.assertions,i,e,t))}else l=new Zt(this.options,r,o,a,"absolute"!==n&&A(r),i),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(s,t,!1,!1)}async fetchStaticDependencies(e,t){for(const s of await Promise.all(t.map((t=>t.then((([t,s])=>this.fetchResolvedDependency(t,e.id,s)))))))e.dependencies.add(s),s.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof Do&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,s){const{makeAbsoluteExternalsRelative:i}=this.options;if(e){if("object"==typeof e){const n=e.external||this.options.external(e.id,t,!0);return{...e,external:n&&("relative"===n||!A(e.id)||!0===n&&ru(e.id,s,i)||"absolute")}}const n=this.options.external(e,t,!0);return{external:n&&(ru(e,s,i)||"absolute"),id:n&&i?iu(e,t):e}}const n=i?iu(s,t):s;return!1===e||this.options.external(n,t,!0)?{external:ru(n,s,i)||"absolute",id:n}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const s=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,function(e){const t=e.arguments?.[0]?.properties.find((e=>"assert"===yo(e)))?.value;if(!t)return fe;const s=t.properties.map((e=>{const t=yo(e);return"string"==typeof t&&"string"==typeof e.value.value?[t,e.value.value]:null})).filter((e=>!!e));return s.length>0?Object.fromEntries(s):fe}(t.node));return s&&"object"==typeof s&&(t.id=s.id),[t,s]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAssertions,(async([t,s])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,fe,!1,s),t,e.id,s)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const s=e.external||!1;return{assertions:e.assertions||t,external:s,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!s),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,s){const i=this.moduleLoadPromises.get(e);if(s)return s===tu?ou(i):i;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await i)}handleInvalidResolvedId(e,t,s,i){return null===e?k(t)?Ye(function(e,t){return{code:$t,exporter:e,id:t,message:`Could not resolve "${e}" from "${T(t)}"`}}(t,s)):(this.options.onLog(ve,function(e,t){return{code:$t,exporter:e,id:t,message:`"${e}" is imported by "${T(t)}", but could not be resolved – treating it as an external dependency.`,url:Oe("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,s)),{assertions:i,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(ve,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${T(t)}").`}}(t,s)),e)}async loadEntryModule(e,t,s,i,n=!1){const r=await Vh(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,fe,!0,fe);if(null==r)return Ye(null===i?function(e){return{code:Ct,message:`Could not resolve entry module "${T(e)}".`}}(e):function(e,t){return{code:yt,message:`Module "${T(e)}" that should be implicitly loaded before "${T(t)}" could not be resolved.`}}(e,i));const o="object"==typeof r&&r.external;return!1===r||o?Ye(null===i?o&&n?Kt(e):function(e){return{code:Ct,message:`Entry module "${T(e)}" cannot be external.`}}(e):function(e,t){return{code:yt,message:`Module "${T(e)}" that should be implicitly loaded before "${T(t)}" cannot be external.`}}(e,i)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},fe),void 0,t,!1)}async resolveDynamicImport(e,t,s,i){const n=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,s,{assertions:i}]);if("string"!=typeof t)return"string"==typeof n?n:n?this.getResolvedIdWithDefaults(n,i):null;if(null==n){const n=e.resolvedIds[t];return n?(xo(n.assertions,i)&&this.options.onLog(ve,Mt(n.assertions,i,t,s)),n):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,fe,!1,i),t,e.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(n,s,t),i),t,s,i)}}function iu(e,t){return k(e)?t?N(t,"..",e):N(e):e}function nu(e,{fileName:t,name:s},i,n){if(null!==t)e.chunkFileNames.add(t);else if(null!==s){let t=0;for(;e.chunkNames[t]?.priorityC(r).slice(1),extname:()=>C(r),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-C(r).length))}),n)}function hu(e,{bundle:t},s){t[Sa].has(e.toLowerCase())?s(ve,function(e){return{code:ot,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Aa}const uu=new Set(["chunk","asset","prebuilt-chunk"]);function du(e,t,s){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||s;return Ye(Yt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function pu(e,t){return"string"!=typeof e.fileName?Ye((s=e.name||t,{code:et,message:`Plugin error - Unable to get file name for asset "${s}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var s}function fu(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():Ye((s=e.fileName||e.name,{code:st,message:`Plugin error - Unable to get file name for emitted chunk "${s}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var s}class mu{constructor(e,t,s){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&uu.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!M(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Ye(Yt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Ye(Yt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Ye({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?fu(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:pu(t,e):Ye({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const s=this.filesByReferenceId.get(e);if(!s)return Ye({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==s.type)return Ye(Yt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==s.source)return Ye({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||e}", source already set.`});const i=du(t,s,e);if(this.output)this.finalizeAdditionalAsset(s,i,this.output);else{s.source=i;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(s,i,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const s=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&hu(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{F(i,lu(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=s?new Map(s.filesByReferenceId):new Map,s?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let s=t;do{s=Tl().update(s).digest("hex").slice(0,8)}while(this.filesByReferenceId.has(s)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(s))));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(s,e);return s}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,referencedFiles:[],type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:du(e.source,e,null),s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:s,source:i}=e;s&&hu(s,t,this.options.onLog),void 0!==i&&this.finalizeAdditionalAsset(e,i,t)}emitChunk(e){if(this.graph.phase>mo.LOAD_AND_PARSE)return Ye({code:pt,message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Ye(Yt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Ye(Yt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||M(e.fileName))return Ye(Yt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},s=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),s}finalizeAdditionalAsset(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=lu(t);r=i.get(o),r||(r=cu(e.name,t,o,n,s),i.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=s[r];"asset"===c?.type?c.needsCodeReference&&(c.needsCodeReference=o):s[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let r,o="",a=!0;for(const i of e){a&&(a=i.needsCodeReference);const e=cu(i.name,i.source,t,n,s);(!o||e.length{null!=r&&s(ve,{code:ht,message:`Plugin "${i}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(n=qh(n)).code&&!n.pluginCode&&(n.pluginCode=n.code),n.code=t,n.plugin=i,s(e,n)}}function yu(t,s,i,n,r,o){const{logLevel:a,onLog:l}=n;let c,h=!0;if("string"!=typeof t.cacheKey&&(t.name.startsWith(Bh)||t.name.startsWith(zh)||o.has(t.name)?h=!1:o.add(t.name)),s)if(h){const e=t.cacheKey||t.name;d=s[e]||(s[e]=Object.create(null)),c={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=t.name,c={delete:()=>jh(u),get:()=>jh(u),has:()=>jh(u),set:()=>jh(u)};else c=Fh;var u,d;return{addWatchFile(e){if(i.phase>=mo.GENERATE)return this.error({code:pt,message:'Cannot call "addWatchFile" after the build has finished.'});i.watchFiles[e]=!0},cache:c,debug:gu(Ae,"PLUGIN_LOG",l,t.name,a),emitFile:r.emitFile.bind(r),error:e=>Ye(Gt(qh(e),t.name)),getFileName:r.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),info:gu(Se,"PLUGIN_LOG",l,t.name,a),load:e=>i.moduleLoader.preloadModule(e),meta:{rollupVersion:e,watchMode:i.watchMode},get moduleIds(){const e=i.modulesById.keys();return function*(){Xt(`Accessing "this.moduleIds" on the plugin context by plugin ${t.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,n,t.name),yield*e}()},parse:i.contextParse.bind(i),resolve:(e,s,{assertions:n,custom:r,isEntry:o,skipSelf:a}=pe)=>i.moduleLoader.resolveId(e,s,r,o,n||fe,a?[{importer:s,plugin:t,source:e}]:null),setAssetSource:r.setAssetSource,warn:gu(ve,"PLUGIN_WARNING",l,t.name,a)}}const xu=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class Eu{constructor(e,t,s,i,n){this.graph=e,this.options=t,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new mu(e,t,n&&n.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...n?n.plugins:[],...s];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((s=>[s,yu(s,i,e,t,this.fileEmitter,r)]))),n)for(const e of s)for(const s of xu)s in e&&t.onLog(ve,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${s}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new Eu(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,s,i){return this.hookFirstAndGetPlugin(e,t,s,i).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,s,i){for(const n of this.getSortedPlugins(e)){if(i?.has(n))continue;const r=await this.runHook(e,t,n,s);if(null!=r)return[r,n]}return null}hookFirstSync(e,t,s){for(const i of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,i,s);if(null!=n)return n}return null}async hookParallel(e,t,s){const i=[];for(const n of this.getSortedPlugins(e))n[e].sequential?(await Promise.all(i),i.length=0,await this.runHook(e,t,n,s)):i.push(this.runHook(e,t,n,s));await Promise.all(i)}hookReduceArg0(e,[t,...s],i,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...s],t,n).then((e=>i.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...s],i,n){for(const r of this.getSortedPlugins(e)){const o=[t,...s],a=this.runHookSync(e,o,r,n);t=i.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,s,i){const n=[],r=[];for(const t of this.getSortedPlugins(e,Su))t[e].sequential?(n.push(...await Promise.all(r)),r.length=0,n.push(await this.runHook(e,s,t))):r.push(this.runHook(e,s,t));return n.push(...await Promise.all(r)),n.reduce(i,await t)}hookReduceValueSync(e,t,s,i,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,s,t,n);r=i.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,s){let i=Promise.resolve();for(const n of this.getSortedPlugins(e))i=i.then((()=>this.runHook(e,t,n,s)));return i.then(Au)}getSortedPlugins(e,t){return F(this.sortedPlugins,e,(()=>bu(e,this.plugins,t)))}runHook(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const i=r.apply(o,t);return i?.then?(a=[s.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(i).then((e=>(this.unfulfilledActions.delete(a),e)))):i})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),Ye(Gt(t,s.name,{hook:e})))))}runHookSync(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));try{return r.apply(o,t)}catch(t){return Ye(Gt(t,s.name,{hook:e}))}}}function bu(e,t,s=vu){const i=[],n=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(s(t.handler,e,o),"pre"===t.order){i.push(o);continue}if("post"===t.order){r.push(o);continue}}else s(t,e,o);n.push(o)}}return[...i,...n,...r]}function vu(e,t,s){"function"!=typeof e&&Ye(function(e,t){return{code:dt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,s.name))}function Su(e,t,s){if("string"!=typeof e&&"function"!=typeof e)return Ye(function(e,t){return{code:dt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,s.name))}function Au(){}class ku{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,s)=>{this.queue.push({reject:s,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:s,task:i}=e;try{s(await i())}catch(e){t(e)}}this.workerCount--}}class Iu{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,s,i,n=e||1;function r(e,r){++t>n&&(i=s,o(1),++t),s[e]=r}function o(e){t=0,s=Object.create(null),e||(i=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==s[e]||void 0!==i[e]},get:function(e){var t=s[e];return void 0!==t?t:void 0!==(t=i[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==s[e]?s[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new J,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=mo.LOAD_AND_PARSE,this.scope=new au,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",s)}this.pluginDriver=new Eu(this,e,e.plugins,this.pluginCache),this.acornParser=Nc.extend(...e.acornInjectPlugins),this.moduleLoader=new su(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new ku(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const s of e?e.manualPureFunctions:[]){let e=t;for(const t of s.split("."))e=e[t]||(e[t]=Object.create(null));e[Fi]=!0}return t})(e)}async build(){wo("generate module graph",2),await this.generateModuleGraph(),Po("generate module graph",2),wo("sort and bind modules",2),this.phase=mo.ANALYSE,this.sortModules(),Po("sort and bind modules",2),wo("mark included statements",2),this.includeStatements(),Po("mark included statements",2),this.phase=mo.GENERATE}contextParse(e,t={}){const s=t.onComment,i=[];t.onComment=s&&"function"==typeof s?(e,n,r,o,...a)=>(i.push({end:o,start:r,type:e?"Block":"Line",value:n}),s.call(t,e,n,r,o,...a)):i;const n=this.acornParser.parse(e,{...this.options.acorn,...t});return"object"==typeof s&&s.push(...i),t.onComment=s,function(e,t,s){const i=[],n=[];for(const t of e){for(const[e,s]of Ys)s.test(t.value)&&i.push({...t,annotationType:e});Fs.test(t.value)&&n.push(t)}for(const e of n)Xs(t,e,!1);Gs(t,{annotationIndex:0,annotations:i,code:s})}(i,n,e),n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let s=!0;for(const[e,i]of Object.entries(t))i[0]>=this.options.experimentalCacheExpiry?delete t[e]:s=!1;s&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof Do?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)No(t);if(this.options.treeshake){let t=1;do{wo(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Po("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Ye(jt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const s=[],i=new Set,n=new Set,r=new Map,o=[],a=e=>{if(e instanceof Do){for(const t of e.dependencies)r.has(t)?i.has(t)||s.push(Wa(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)n.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof Do&&n.add(t);o.push(e)}e.execIndex=t++,i.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of n)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:s,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(ve,Dt(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(ve,Ft(t.name,e.id,t.module.id),t.start)}}function wu(e,t){return t()}function Pu(t,s,i,n){t=bu("onLog",t);const r=ke[n],o=(n,a,l=ge)=>{if(!(ke[n]ke[e]o(e,qh(t),new Set(l).add(s));if(!1===("handler"in t?t.handler:t).call({debug:c(Ae),error:e=>Ye(qh(e)),info:c(Se),meta:{rollupVersion:e,watchMode:i},warn:c(ve)},n,a))return}s(n,a)}};return o}const Cu="{".charCodeAt(0),$u=" ".charCodeAt(0),Nu="assert";function _u(e){const t=e.acorn||Oh,{tokTypes:s,TokenType:i}=t;return class extends e{constructor(...e){super(...e),this.assertToken=new i(Nu)}_codeAt(e){return this.input.charCodeAt(e)}_eat(e){this.type!==e&&this.unexpected(),this.next()}readToken(e){let t=0;for(;t<6;t++)if(this._codeAt(this.pos+t)!==Nu.charCodeAt(t))return super.readToken(e);for(;this._codeAt(this.pos+t)!==Cu;t++)if(this._codeAt(this.pos+t)!==$u)return super.readToken(e);return"{"===this.type.label?super.readToken(e):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(s.comma)){const t=this.parseObj(!1);e.arguments=[t]}return this._eat(s.parenR),this.finishNode(e,"ImportExpression")}parseExport(e,t){if(this.next(),this.eat(s.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}if(this.eat(s._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===s._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(n,5,!1,i)}else if(this.type===s._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}}else{for(var o=0,a=e.specifiers;o({ecmaVersion:"latest",sourceType:"module",...e.acorn}),Du=e=>[_u,...Ru(e.acornInjectPlugins)],Lu=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Tu=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...s)=>!t.startsWith("\0")&&e(t,...s)||!1;if(e){const t=new Set,s=[];for(const i of Ru(e))i instanceof RegExp?s.push(i):t.add(i);return(e,...i)=>t.has(e)||s.some((t=>t.test(e)))}return()=>!1},Mu=(e,t,s)=>{const i=e.inlineDynamicImports;return i&&Qt('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',Ue,!0,t,s),i},Vu=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Bu=(e,t,s)=>{const i=e.manualChunks;return i&&Qt('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',We,!0,t,s),i},zu=(e,t,s)=>{const i=e.maxParallelFileReads;"number"==typeof i&&Qt('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,t,s);const n=e.maxParallelFileOps??i;return"number"==typeof n?n<=0?1/0:n:20},Fu=(e,t)=>{const s=e.moduleContext;if("function"==typeof s)return e=>s(e)??t;if(s){const e=Object.create(null);for(const[t,i]of Object.entries(s))e[N(t)]=i;return s=>e[s]??t}return()=>t},ju=(e,t,s)=>{const i=e.preserveModules;return i&&Qt('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,t,s),i},Uu=e=>{if(!1===e.treeshake)return!1;const t=Zh(e.treeshake,Xh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??me,moduleSideEffects:Gu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Gu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,s)=>!!t.startsWith("\0")||!1!==e(t,s);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Ye(zt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Wu=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,qu=/^[a-z]:/i;function Hu(e){const t=qu.exec(e),s=t?t[0]:"";return s+e.slice(s.length).replace(Wu,"_")}const Ku=(e,t,s)=>{const{file:i}=e;if("string"==typeof i){if(t)return Ye(zt("output.file",Me,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(s.input))return Ye(zt("output.file",Me,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return i},Yu=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Ye(zt("output.format",ze,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Xu=(e,t)=>{const s=(e.inlineDynamicImports??t.inlineDynamicImports)||!1,{input:i}=t;return s&&(Array.isArray(i)?i:Object.keys(i)).length>1?Ye(zt("output.inlineDynamicImports",Ue,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):s},Qu=(e,t,s)=>{const i=(e.preserveModules??s.preserveModules)||!1;if(i){if(t)return Ye(zt("output.inlineDynamicImports",Ue,'this option is not supported for "output.preserveModules"'));if(!1===s.preserveEntrySignatures)return Ye(zt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return i},Zu=(e,t)=>{const s=e.preferConst;return null!=s&&Xt('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,t),!!s},Ju=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return N(t)},ed=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Ye(zt("output.amd.id",Te,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Ye(zt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},td=(e,t)=>{const s=e[t];return"function"==typeof s?s:()=>s||""},sd=(e,t)=>{const{dir:s}=e;return"string"==typeof s&&"string"==typeof t?Ye(zt("output.dir",Me,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):s},id=(e,t,s)=>{const i=e.dynamicImportFunction;return i&&(Xt('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,t),"es"!==s&&t.onLog(ve,zt("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),i},nd=(e,t)=>{const s=e.entryFileNames;return null==s&&t.add("entryFileNames"),s??"[name].js"};function rd(e,t){const s=e.experimentalDeepDynamicChunkOptimization;return null!=s&&Xt('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',Fe,!0,t),s||!1}function od(e,t){const s=e.exports;if(null==s)t.add("exports");else if(!["default","named","none","auto"].includes(s))return Ye({code:ct,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${s}".`,url:Oe(Ve)});return s||"auto"}const ad=(e,t)=>{const s=Zh(e.generatedCode,Qh,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===s.arrowFunctions,constBindings:!0===s.constBindings||t,objectShorthand:!0===s.objectShorthand,reservedNamesAsProps:!1!==s.reservedNamesAsProps,symbols:!0===s.symbols}},ld=(e,t)=>{if(t)return"";const s=e.indent;return!1===s?"":s??!0},cd=new Set(["compat","auto","esModule","default","defaultOnly"]),hd=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let s=null;return i=>null===i?s||ud(s=t(i)):i in e?e[i]:ud(e[i]=t(i))}return void 0===t?()=>"default":()=>ud(t)},ud=e=>cd.has(e)?e:Ye(zt("output.interop",Ge,`use one of ${Array.from(cd,(e=>JSON.stringify(e))).join(", ")}`,e)),dd=(e,t,s,i)=>{const n=e.manualChunks||i.manualChunks;if(n){if(t)return Ye(zt("output.manualChunks",We,'this option is not supported for "output.inlineDynamicImports"'));if(s)return Ye(zt("output.manualChunks",We,'this option is not supported for "output.preserveModules"'))}return n||{}},pd=(e,t,s)=>e.minifyInternalExports??(s||"es"===t||"system"===t),fd=(e,t,s)=>{const i=e.namespaceToStringTag;return null!=i?(Xt('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,s),i):t.symbols||!1},md=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(s=t).endsWith("/")?s:s+"/":Ye(zt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var s};function gd(t){return async function(t,s){const{options:i,unsetOptions:n}=await async function(t,s){if(!t)throw new Error("You must supply an options object to rollup");const i=await async function(t,s){const i=bu("options",await Jh(t.plugins)),n=t.logLevel||Se,r=Pu(i,Uh(t,n),s,n);for(const o of i){const{name:i,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:gu(Ae,"PLUGIN_LOG",r,i,n),error:e=>Ye(Gt(qh(e),i,{hook:"onLog"})),info:gu(Se,"PLUGIN_LOG",r,i,n),meta:{rollupVersion:e,watchMode:s},warn:gu(ve,"PLUGIN_WARNING",r,i,n)},t);c&&(t=c)}return t}(t,s),{options:n,unsetOptions:r}=await async function(e,t){const s=new Set,i=e.context??"undefined",n=await Jh(e.plugins),r=e.logLevel||Se,o=Pu(n,Uh(e,r),t,r),a=e.strictDeprecations||!1,l=zu(e,o,a),c={acorn:Ou(e),acornInjectPlugins:Du(e),cache:Lu(e),context:i,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Tu(e.external),inlineDynamicImports:Mu(e,o,a),input:Vu(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:Bu(e,o,a),maxParallelFileOps:l,maxParallelFileReads:l,moduleContext:Fu(e,i),onLog:o,onwarn:e=>o(ve,e),perf:e.perf||!1,plugins:n,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveModules:ju(e,o,a),preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Uu(e)};return Yh(e,[...Object.keys(c),"watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:s}}(i,s);return yd(n.plugins,Bh),{options:n,unsetOptions:r}}(t,null!==s);!function(e){e.perf?(vo=new Map,wo=Ao,Po=ko,e.plugins=e.plugins.map($o)):(wo=ji,Po=ji)}(i);const r=new Iu(i,s),o=!1!==t.cache;t.cache&&(i.cache=void 0,t.cache=void 0);wo("BUILD",1),await wu(r.pluginDriver,(async()=>{try{wo("initialize",2),await r.pluginDriver.hookParallel("buildStart",[i]),Po("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Po("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?Ye(_t()):xd(!1,i,n,e,r),watchFiles:Object.keys(r.watchFiles),write:async e=>a.closed?Ye(_t()):xd(!0,i,n,e,r)};i.perf&&(a.getTimings=Io);return a}(t,null)}function yd(e,t){for(const[s,i]of e.entries())i.name||(i.name=`${t}${s+1}`)}async function xd(e,t,s,i,n){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,s,i){if(!e)throw new Error("You must supply an options object");const n=await Jh(e.plugins);yd(n,zh);const r=t.createOutputPluginDriver(n);return{...await Ed(s,i,e,r),outputPluginDriver:r}}(i,n.pluginDriver,t,s);return wu(0,(async()=>{const s=new Fl(r,a,t,o,n),i=await s.generate(e);if(e){if(wo("WRITE",1),!r.dir&&!r.file)return Ye({code:bt,message:'You must specify "output.file" or "output.dir" for the build.',url:Oe(Me)});await Promise.all(Object.values(i).map((e=>n.fileOperationQueue.run((()=>async function(e,t){const s=N(t.dir||P(t.file),e.fileName);return await Lh(P(s),{recursive:!0}),Mh(s,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,i]),Po("WRITE",1)}return l=i,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>vd(e)-vd(t)))};var l}))}function Ed(e,t,s,i){return async function(e,t,s){const i=new Set(s),n=e.compact||!1,r=Yu(e),o=Xu(e,t),a=Qu(e,o,t),l=Ku(e,a,t),c=Zu(e,t),h=ad(e,c),u={amd:ed(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:td(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:n,dir:sd(e,l),dynamicImportFunction:id(e,t,r),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:nd(e,i),esModule:e.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:rd(e,t),experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:od(e,i),extend:e.extend||!1,externalImportAssertions:e.externalImportAssertions??!0,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:td(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:h,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:ld(e,n),inlineDynamicImports:o,interop:hd(e),intro:td(e,"intro"),manualChunks:dd(e,o,a,t),minifyInternalExports:pd(e,r,n),name:e.name,namespaceToStringTag:fd(e,h,t),noConflict:e.noConflict||!1,outro:td(e,"outro"),paths:e.paths||{},plugins:await Jh(e.plugins),preferConst:c,preserveModules:a,preserveModulesRoot:Ju(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Hu,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:md(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return Yh(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:i}}(i.hookReduceArg0Sync("outputOptions",[s],((e,t)=>t||e),(e=>{const t=()=>e.error({code:tt,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var bd;function vd(e){return"asset"===e.type?bd.ASSET:e.isEntry?bd.ENTRY_CHUNK:bd.SECONDARY_CHUNK}function Sd(e){return e}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(bd||(bd={}));export{e as VERSION,Sd as defineConfig,gd as rollup}; +diff --git a/dist/rollup.browser.js b/dist/rollup.browser.js +index bcec60b795d5b3a3ccc73807a4cb78a20babfd1e..336a90070617bf9c967a11ec362e6508e3edfc30 100644 +--- a/dist/rollup.browser.js ++++ b/dist/rollup.browser.js +@@ -7,5 +7,5 @@ + + Released under the MIT License. + */ +-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t="3.26.2";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e,t){!function(e){const t=",".charCodeAt(0),s=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;eBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s>>=1,l&&(n=-2147483648|-n),s[i]+=n,t}function h(e,s,i){return!(s>=i)&&e.charCodeAt(s)!==t}function u(e){e.sort(d)}function d(e,t){return e[0]-t[0]}function p(e){const i=new Int32Array(5),n=16384,r=n-36,a=new Uint8Array(n),l=a.subarray(0,r);let c=0,h="";for(let u=0;u0&&(c===n&&(h+=o.decode(a),c=0),a[c++]=s),0!==d.length){i[0]=0;for(let e=0;er&&(h+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,i,s,0),1!==s.length&&(c=f(a,c,i,s,1),c=f(a,c,i,s,2),c=f(a,c,i,s,3),4!==s.length&&(c=f(a,c,i,s,4)))}}}return h+o.decode(a.subarray(0,c))}function f(e,t,s,i,r){const o=i[r];let a=o-s[r];s[r]=o,a=a<0?-a<<1|1:a<<1;do{let s=31&a;a>>>=5,a>0&&(s|=32),e[t++]=n[s]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports);var n=i.exports;class r{constructor(e){this.bits=e instanceof r?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let o=class e{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.startwindow.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const l=a();class c{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=n.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+l(this.toString())}}function h(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const u=Object.prototype.toString;function d(e){return"[object Object]"===u.call(e)}function p(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e>1;e=0&&t.push(i),this.rawSegments.push(t)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,o=!0;for(;r1){for(let e=0;e{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?h(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new c(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;if(d(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const i={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];tn?`${e}${t}`:(n=!0,t);this.intro=this.intro.replace(s,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)i[o]||(a.content=a.content.replace(s,r),a.content.length&&(n="\n"===a.content[a.content.length-1]));else for(o=a.start;o=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,o=n.next,a=this.byStart[s];if(!a&&n===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=i),a&&(a.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,n.next=a||null,l||(this.firstChunk=i),a||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if("string"!=typeof s)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(g.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),g.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,r=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!r)}else{const i=new o(e,t,"").edit(s,n);l.next=i,i.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(m);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(m),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(m),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(m),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(m),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=n===i?e-i.start:0,a=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(o,a),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=s?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=p(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,s(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,s(t,this.original))}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&this.overwrite(i,i+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i))this.overwrite(n,n+i,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const x=Object.prototype.hasOwnProperty;const E=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,b=/^\.?\.\//,v=/\\/g,S=/[/\\]/,A=/\.[^.]+$/;function k(e){return E.test(e)}function I(e){return b.test(e)}function w(e){return e.replace(v,"/")}function P(e){return e.split(S).pop()||""}function C(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function $(e){const t=A.exec(P(e));return t?t[0]:""}function N(e,t){const s=e.split(S).filter(Boolean),i=t.split(S).filter(Boolean);for("."===s[0]&&s.shift(),"."===i[0]&&i.shift();s[0]&&i[0]&&s[0]===i[0];)s.shift(),i.shift();for(;".."===i[0]&&s.length>0;)i.shift(),s.pop();for(;s.pop();)i.unshift("..");return i.join("/")}function _(...e){const t=e.shift();if(!t)return"/";let s=t.split(S);for(const t of e)if(k(t))s=t.split(S);else{const e=t.split(S);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&s.pop()}s.push(...e)}return s.join("/")}const R=/[\n\r'\\\u2028\u2029]/,O=/([\n\r'\u2028\u2029])/g,D=/\\/g;function T(e){return R.test(e)?e.replace(D,"\\\\").replace(O,"\\$1"):e}function L(e){const t=P(e);return t.slice(0,Math.max(0,t.length-$(e).length))}function M(e){return k(e)?N(_(),e):e}function V(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||k(e)}const B=/^(\.\.\/)*\.\.$/;function z(e,t,s,i){let n=w(N(C(e),t));if(s&&n.endsWith(".js")&&(n=n.slice(0,-3)),i){if(""===n)return"../"+P(t);if(B.test(n))return[...n.split("/"),"..",P(t)].join("/")}return n?n.startsWith("..")?n:"./"+n:"."}class F{constructor(e,t,s){this.options=t,this.inputBase=s,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?w(N(this.inputBase,this.id)):this.id)}getImportAssertions(e){return this.importAssertions||(this.importAssertions=function(e,{getObject:t}){if(!e)return null;const s=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(s.length>0)return t(s,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAssertions&&this.moduleInfo.assertions,e))}getImportPath(e){return T(this.renormalizeRenderPath?z(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function j(e,t,s){const i=e.get(t);if(void 0!==i)return i;const n=s();return e.set(t,n),n}function U(){return new Set}function G(){return[]}const W=Symbol("Unknown Key"),q=Symbol("Unknown Non-Accessor Key"),H=Symbol("Unknown Integer"),K=Symbol("Symbol.toStringTag"),Y=[],X=[W],Q=[q],Z=[H],J=Symbol("Entities");class ee{constructor(){this.entityPaths=Object.create(null,{[J]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const s=this.getEntities(e);return!!s.has(t)||(s.add(t),!1)}withTrackedEntityAtPath(e,t,s,i){const n=this.getEntities(e);if(n.has(t))return i;n.add(t);const r=s();return n.delete(t),r}getEntities(e){let t=this.entityPaths;for(const s of e)t=t[s]=t[s]||Object.create(null,{[J]:{value:new Set}});return t[J]}}const te=new ee;class se{constructor(){this.entityPaths=Object.create(null,{[J]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,s){let i=this.entityPaths;for(const t of e)i=i[t]=i[t]||Object.create(null,{[J]:{value:new Map}});const n=j(i[J],t,U);return!!n.has(s)||(n.add(s),!1)}}const ie=Symbol("Unknown Value"),ne=Symbol("Unknown Truthy Value");class re{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){le(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,s){return ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){return ae}hasEffectsOnInteractionAtPath(e,t,s){return!0}include(e,t,s){this.included=!0}includeCallArguments(e,t){for(const s of t)s.include(e,!1)}shouldBeIncluded(e){return!0}}const oe=new class extends re{},ae=[oe,!1],le=e=>{for(const t of e.args)t?.deoptimizePath(X)},ce={args:[null],type:0},he={args:[null,oe],type:1},ue={args:[null],type:2,withNew:!1};class de extends re{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(e)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:t},s){return 0!==t||e.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class pe extends de{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const fe=Object.freeze(Object.create(null)),me=Object.freeze({}),ge=Object.freeze([]),ye=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var xe=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const Ee=/[^\w$]/g,be=e=>(e=>/\d/.test(e[0]))(e)||xe.has(e)||"arguments"===e;function ve(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Ee,"_"),be(e)&&(e=`_${e}`),e||"_"}const Se="warn",Ae="info",ke="debug",Ie={[ke]:0,[Ae]:1,silent:3,[Se]:2};function we(e,t){return e.start<=t&&t{const s=n+e.length+1,i={start:n,end:s,line:t};return n=s,i}));let o=0;return function(t,n){if("string"==typeof t&&(t=e.indexOf(t,n??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(we(a,t))return{line:s+a.line,column:i+t-a.start,character:t};o+=l,a=r[o]}}}(e,s)(t,s&&s.startIndex)}function Ce(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const $e=120,Ne=10,_e="...";function Re(e,t,s){let i=e.split("\n");if(t>i.length)return"";const n=Math.max(Ce(i[t-1].slice(0,s)).length+Ne+_e.length,$e),r=Math.max(0,t-3);let o=Math.min(t+2,i.length);for(i=i.slice(r,o);!/\S/.test(i[i.length-1]);)i.pop(),o-=1;const a=String(o).length;return i.map(((e,i)=>{const o=r+i+1===t;let l=String(i+r+1);for(;l.lengthn&&(c=`${c.slice(0,n-_e.length)}${_e}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Ce(e.slice(0,s)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function Oe(e,t){const s=e.length<=1,i=e.map((e=>`"${e}"`));let n=s?i[0]:`${i.slice(0,-1).join(", ")} and ${i.slice(-1)[0]}`;return t&&(n+=` ${s?t[0]:t[1]}`),n}function De(e){return`https://rollupjs.org/${e}`}const Te="troubleshooting/#error-name-is-not-exported-by-module",Le="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Me="configuration-options/#output-amd-id",Ve="configuration-options/#output-dir",Be="configuration-options/#output-exports",ze="configuration-options/#output-extend",Fe="configuration-options/#output-format",je="configuration-options/#output-experimentaldeepdynamicchunkoptimization",Ue="configuration-options/#output-globals",Ge="configuration-options/#output-inlinedynamicimports",We="configuration-options/#output-interop",qe="configuration-options/#output-manualchunks",He="configuration-options/#output-name",Ke="configuration-options/#output-sourcemapfile",Ye="plugin-development/#this-getmoduleinfo";function Xe(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError"})),e}function Qe(e,t,s,i){if("object"==typeof t){const{line:s,column:n}=t;e.loc={column:n,file:i,line:s}}else{e.pos=t;const{line:n,column:r}=Pe(s,t,{offsetLine:1});e.loc={column:r,file:i,line:n}}if(void 0===e.frame){const{line:t,column:i}=e.loc;e.frame=Re(s,t,i)}}const Ze="ADDON_ERROR",Je="ALREADY_CLOSED",et="ANONYMOUS_PLUGIN_CACHE",tt="ASSET_NOT_FINALISED",st="CANNOT_EMIT_FROM_OPTIONS_HOOK",it="CHUNK_NOT_GENERATED",nt="CIRCULAR_REEXPORT",rt="DEPRECATED_FEATURE",ot="DUPLICATE_PLUGIN_NAME",at="FILE_NAME_CONFLICT",lt="ILLEGAL_IDENTIFIER_AS_NAME",ct="INVALID_CHUNK",ht="INVALID_EXPORT_OPTION",ut="INVALID_LOG_POSITION",dt="INVALID_OPTION",pt="INVALID_PLUGIN_HOOK",ft="INVALID_ROLLUP_PHASE",mt="INVALID_SETASSETSOURCE",gt="MISSING_EXPORT",yt="MISSING_GLOBAL_NAME",xt="MISSING_IMPLICIT_DEPENDANT",Et="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",bt="MISSING_NODE_BUILTINS",vt="MISSING_OPTION",St="MIXED_EXPORTS",At="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",kt="OPTIMIZE_CHUNK_STATUS",It="PLUGIN_ERROR",wt="SOURCEMAP_BROKEN",Pt="UNEXPECTED_NAMED_IMPORT",Ct="UNKNOWN_OPTION",$t="UNRESOLVED_ENTRY",Nt="UNRESOLVED_IMPORT",_t="VALIDATION_ERROR";function Rt(){return{code:Je,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Ot(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Dt({fileName:e,code:t},s){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s.message}.`};return Qe(i,s.loc,t,e),i}function Tt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(M).join(" -> ")}`}}function Lt(e,t,{line:s,column:i}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${M(t)} is at (${s}:${i})\n${Re(e,s,i)}`}}function Mt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${M(t)}".`}}function Vt(e,t,s,i){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${M(i)}" tried to import "${M(s)}" with ${Bt(t)} assertions, but it was already imported elsewhere with ${Bt(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const Bt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function zt(e,t,s){return{code:ht,message:`"${e}" was specified for "output.exports", but entry module "${M(s)}" has the following exports: ${Oe(t)}`,url:De(Be)}}function Ft(e,t,s,i){return{code:dt,message:`Invalid value ${void 0===i?"":`${JSON.stringify(i)} `}for option "${e}" - ${s}.`,url:De(t)}}function jt(e,t,s){const i=".json"===$(s);return{binding:e,code:gt,exporter:s,id:t,message:`"${e}" is not exported by "${M(s)}", imported by "${M(t)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:De(Te)}}function Ut(e){const t=[...e.implicitlyLoadedBefore].map((e=>M(e.id))).sort();return{code:xt,message:`Module "${M(e.id)}" that should be implicitly loaded before ${Oe(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Gt(e,t,s){return{code:kt,message:`${s}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Wt(e,t,{hook:s,id:i}={}){const n=e.code;return e.pluginCode||null==n||"string"==typeof n&&("string"!=typeof n||n.startsWith("PLUGIN_"))||(e.pluginCode=n),e.code=It,e.plugin=t,s&&(e.hook=s),i&&(e.id=i),e}function qt(e){return{code:wt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Ht(e,t,s){const i=s?"reexport":"import";return{code:Pt,exporter:e,message:`The named export "${t}" was ${i}ed from the external module "${M(e)}" even though its interop type is "defaultOnly". Either remove or change this ${i} or change the value of the "output.interop" option.`,url:De(We)}}function Kt(e){return{code:Pt,exporter:e,message:`There was a namespace "*" reexport from the external module "${M(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:De(We)}}function Yt(e){return{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}}function Xt(e){return{code:_t,message:e}}function Qt(e,t,s,i,n){Zt(e,t,s,i.onLog,i.strictDeprecations,n)}function Zt(e,t,s,i,n,r){if(s||n){const s=function(e,t,s){return{code:rt,message:e,url:De(t),...s?{plugin:s}:{}}}(e,t,r);if(n)return Xe(s);i(Se,s)}}class Jt{constructor(e,t,s,i,n,r){this.options=e,this.id=t,this.renormalizeRenderPath=n,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=ve(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this,l=this.info={assertions:r,ast:null,code:null,dynamicallyImportedIdResolutions:ge,dynamicallyImportedIds:ge,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Qt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ye,!0,e),l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:ge,implicitlyLoadedBefore:ge,importedIdResolutions:ge,importedIds:ge,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const s=new pe(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const s of e)for(const e of this.declarations.get(s).module.importers)t.add(e);const s=[...t];var i,n,r;this.options.onLog(Se,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:r=s,message:`${Oe(n=e,["is","are"])} imported from external module "${i}" but never used in ${Oe(r.map((e=>M(e))))}.`,names:n})}}const es={ArrayPattern(e,t){for(const s of t.elements)s&&es[s.type](e,s)},AssignmentPattern(e,t){es[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const s of t.properties)"RestElement"===s.type?es.RestElement(e,s):es[s.value.type](e,s.value)},RestElement(e,t){es[t.argument.type](e,t.argument)}},ts=function(e){const t=[];return es[e.type](t,e),t};function ss(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function is(){return{accessed:new ee,assigned:new ee,brokenFlow:!1,called:new se,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new se,replacedVariableInits:new Map}}function ns(e,t=null){return Object.create(t,e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const rs=new class extends re{getLiteralValueAtPath(){}},os={value:{hasEffectsWhenCalled:null,returns:oe}},as=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(ms,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(ms,e[0],t,s)}},ls={value:{hasEffectsWhenCalled:null,returns:as}},cs=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(gs,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(gs,e[0],t,s)}},hs={value:{hasEffectsWhenCalled:null,returns:cs}},us=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(xs,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(xs,e[0],t,s)}},ds={value:{hasEffectsWhenCalled:null,returns:us}},ps={value:{hasEffectsWhenCalled({args:e},t){const s=e[2];return e.length<3||"symbol"==typeof s.getLiteralValueAtPath(Y,te,{deoptimizeCache(){}})&&s.hasEffectsOnInteractionAtPath(Y,ue,t)},returns:us}},fs=ns({hasOwnProperty:ls,isPrototypeOf:ls,propertyIsEnumerable:ls,toLocaleString:ds,toString:ds,valueOf:os}),ms=ns({valueOf:ls},fs),gs=ns({toExponential:ds,toFixed:ds,toLocaleString:ds,toPrecision:ds,valueOf:hs},fs),ys=ns({exec:os,test:ls},fs),xs=ns({anchor:ds,at:os,big:ds,blink:ds,bold:ds,charAt:ds,charCodeAt:hs,codePointAt:os,concat:ds,endsWith:ls,fixed:ds,fontcolor:ds,fontsize:ds,includes:ls,indexOf:hs,italics:ds,lastIndexOf:hs,link:ds,localeCompare:hs,match:os,matchAll:os,normalize:ds,padEnd:ds,padStart:ds,repeat:ds,replace:ps,replaceAll:ps,search:hs,slice:ds,small:ds,split:os,startsWith:ls,strike:ds,sub:ds,substr:ds,substring:ds,sup:ds,toLocaleLowerCase:ds,toLocaleUpperCase:ds,toLowerCase:ds,toString:ds,toUpperCase:ds,trim:ds,trimEnd:ds,trimLeft:ds,trimRight:ds,trimStart:ds,valueOf:ds},fs);function Es(e,t,s,i){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(s,i)||!1)}function bs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:ae}function vs(e,t,s){s(e,t)}function Ss(e,t,s){}var As={};As.Program=As.BlockStatement=As.StaticBlock=function(e,t,s){for(var i=0,n=e.body;i=r.end;)Ks(e,r,n),r=i[++t.annotationIndex];if(r&&r.end<=e.end)for(As[s](e,t,Ws);(r=i[t.annotationIndex])&&r.end<=e.end;)++t.annotationIndex,Qs(e,r,!1)}const qs=/[^\s(]/g,Hs=/\S/g;function Ks(e,t,s){const i=[];let n;if(Ys(s.slice(t.end,e.start),qs)){const t=e.start;for(;;){switch(i.push(e),e.type){case Rs:case Cs:e=e.expression;continue;case Vs:if(Ys(s.slice(t,e.start),Hs)){e=e.expressions[0];continue}n=!0;break;case $s:if(Ys(s.slice(t,e.start),Hs)){e=e.test;continue}n=!0;break;case Ts:case Is:if(Ys(s.slice(t,e.start),Hs)){e=e.left;continue}n=!0;break;case _s:case Ns:e=e.declaration;continue;case zs:{const t=e;if("const"===t.kind){e=t.declarations[0].init;continue}n=!0;break}case Bs:e=e.init;continue;case Os:case ks:case Ps:case Ls:break;default:n=!0}break}}else n=!0;if(n)Qs(e,t,!1);else for(const e of i)Qs(e,t,!0)}function Ys(e,t){let s;for(;null!==(s=t.exec(e));){if("/"===s[0]){const s=e.charCodeAt(t.lastIndex);if(42===s){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}if(47===s){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}return t.lastIndex=0,!1}return!0}const Xs=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Qs(e,t,s){const i=s?Us:Gs,n=e[i];n?n.push(t):e[i]=[t]}const Zs={ImportExpression:["arguments"],Literal:[],Program:["body"]};const Js="variables";class ei extends re{constructor(e,t,s,i=!1){super(),this.deoptimized=!1,this.esTreeNode=i?e:null,this.keys=Zs[e.type]||function(e){return Zs[e.type]=Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))),Zs[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(s),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.keys){const s=this[t];if(null!==s)if(Array.isArray(s)){for(const t of s)if(t?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Y,this.assignmentInteraction,e)}include(e,t,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.include(e,t);else i.include(e,t)}}includeAsAssignmentTarget(e,t,s){this.include(e,t)}initialise(){}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}parseNode(e,t){for(const[s,i]of Object.entries(e))if(!this.hasOwnProperty(s))if(95===s.charCodeAt(0)){if(s===Us){const e=i;this.annotations=e,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.annotationType)),this.annotationPure=e.some((e=>"pure"===e.annotationType)))}else if(s===Gs)for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}else if("object"!=typeof i||null===i)this[s]=i;else if(Array.isArray(i)){this[s]=[];for(const e of i)this[s].push(null===e?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(s)))}else this[s]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope,t?.includes(s))}render(e,t){for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.render(e,t);else i.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(is())}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.keys){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(X);else t.deoptimizePath(X)}this.context.requestTreeshakingPass()}}class ti extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[W,...t],s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(X,ce,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([W,W]),this.context.requestTreeshakingPass()}}class si extends re{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},s){2===t&&0===s.length&&this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Z)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?ae:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||oe:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(e.length>(0===i?1:0))return!0;if(2===i){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Z,he,s))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Y,ue,s))return!0}return!1}}const ii=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:as})],ni=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:us})],ri=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:cs})],oi=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:oe})],ai=/^\d+$/;class li extends re{constructor(e,t,s=!1){if(super(),this.prototypeExpression=t,this.immutable=s,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(X);this.prototypeExpression?.deoptimizePath([W,W]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,s){const[i,...n]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof i&&this.deoptimizedPaths[i]))return void le(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(a[i]){const t=l[i];if(t)for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(ai.test(i))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}else{for(const t of[...Object.values(l),c])for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(ai.test(e))for(const e of t)e.deoptimizePath(X);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===H?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===q);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const s=1===e.length?X:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,W]:e)}getLiteralValueAtPath(e,t,s){if(0===e.length)return ne;const i=e[0],n=this.getMemberExpressionAndTrackDeopt(i,s);return n?n.getLiteralValueAtPath(e.slice(1),t,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,s):1!==e.length?ie:void 0}getReturnExpressionWhenCalledAtPath(e,t,s,i){if(0===e.length)return ae;const[n,...r]=e,o=this.getMemberExpressionAndTrackDeopt(n,i);return o?o.getReturnExpressionWhenCalledAtPath(r,t,s,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,s,i):ae}hasEffectsOnInteractionAtPath(e,t,s){const[i,...n]=e;if(n.length>0||2===t.type){const r=this.getMemberExpression(i);return r?r.hasEffectsOnInteractionAtPath(n,t,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}if(i===q)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(r[i]){const e=o[i];if(e)for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(n,t,s))return!0}else for(const e of[...Object.values(o),a])for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,h=[];for(let u=e.length-1;u>=0;u--){const{key:d,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof d)"set"===p?i[d]||(i[d]=[f,...h],n[d]=[f,...c]):"get"===p?s[d]||(s[d]=[f,...a],r[d]=[f,...l]):(i[d]||(i[d]=[f,...h]),s[d]||(s[d]=[f,...a]));else{if(d===H){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&h.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(X)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(ai.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Z)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&ai.test(e)||this.deoptimizedPaths[e])return oe;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&ai.test(e)?oe:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return oe;const s=this.getMemberExpression(e);if(s!==oe&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return s}}const ci=e=>"string"==typeof e&&/^\d+$/.test(e),hi=new class extends re{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||ci(t[0])||le(e)}getLiteralValueAtPath(e){return 1===e.length&&ci(e[0])?void 0:ie}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ui=new li({__proto__:null,hasOwnProperty:ii,isPrototypeOf:ii,propertyIsEnumerable:ii,toLocaleString:ni,toString:ni,valueOf:oi},hi,!0),di=[{key:H,kind:"init",property:oe},{key:"length",kind:"init",property:cs}],pi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:as})],fi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:cs})],mi=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new li(di,ki),returnsPrimitive:null})],gi=[new si({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new li(di,ki),returnsPrimitive:null})],yi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new li(di,ki),returnsPrimitive:null})],xi=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:cs})],Ei=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:oe})],bi=[new si({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:oe})],vi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:oe})],Si=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ai=[new si({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ki=new li({__proto__:null,at:bi,concat:gi,copyWithin:Si,entries:gi,every:pi,fill:Si,filter:yi,find:vi,findIndex:fi,findLast:vi,findLastIndex:fi,flat:gi,flatMap:yi,forEach:vi,includes:ii,indexOf:ri,join:ni,keys:oi,lastIndexOf:ri,map:yi,pop:Ei,push:xi,reduce:vi,reduceRight:vi,reverse:Si,shift:Ei,slice:gi,some:pi,sort:Ai,splice:mi,toLocaleString:ni,toString:ni,unshift:xi,values:bi},ui,!0);class Ii extends ei{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;tthis.init.deoptimizeArgumentsOnInteractionAtPath(e,t,s)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=ge;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(X)}}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.isReassigned?ie:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getLiteralValueAtPath(e,t,s))),ie)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.isReassigned?ae:s.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath(e,t,s,i))),ae)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return!!this.isReassigned||!s.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!s.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s));case 2:return!!this.isReassigned||!(t.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s)}}include(){if(!this.included){this.included=!0;for(const e of this.declarations){e.included||e.include(ss(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==Ms);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const s of t)s.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=oe,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(e){const{declarations:t}=this;for(const s of e.declarations)t.push(s);const s=this.markInitializersForDeoptimization();if(s.push(e.init),e.additionalInitializers)for(const t of e.additionalInitializers)s.push(t)}}const Ci=ge,$i=new Set([W]),Ni=new ee,_i=new Set([oe]);class Ri extends Pi{constructor(e,t,s){super(e,t,oe,s),this.deoptimizationInteractions=[],this.deoptimizations=new ee,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===oe){if(!this.entitiesToBeDeoptimized.has(oe)){this.entitiesToBeDeoptimized.add(oe);for(const{interaction:e}of this.deoptimizationInteractions)le(e);this.deoptimizationInteractions=Ci}}else if(this.deoptimizedFields.has(W))e.deoptimizePath(X);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:s}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,s,te)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(oe)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(W)||2===e.type&&this.deoptimizedFields.has(t[0])))le(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const s of this.entitiesToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,t,te);this.entitiesToBeDeoptimized.has(oe)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(W))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const t of this.entitiesToBeDeoptimized)t.deoptimizePath(e);t===W&&(this.deoptimizationInteractions=Ci,this.deoptimizations=Ni,this.deoptimizedFields=$i,this.entitiesToBeDeoptimized=_i)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(X):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),ae}}const Oi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Di=64;function Ti(e){let t="";do{const s=e%Di;e=e/Di|0,t=Oi[s]+t}while(0!==e);return t}function Li(e,t,s){let i=e,n=1;for(;t.has(i)||xe.has(i)||s?.has(i);)i=`${e}$${Ti(n++)}`;return t.add(i),i}let Mi=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,s,i){const n=e.name;let r=this.variables.get(n);return r?r.addDeclaration(e,s):(r=new Pi(e.name,e,s||rs,t),this.variables.set(n,r)),r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Vi extends Mi{constructor(e){super(),this.accessedOutsideVariables=new Map,this.parent=e,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Vi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const s=t.get(this)||new Set;for(const t of e)s.add(t);t.set(this,s),this.parent instanceof Vi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Vi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,s,i){for(const i of this.accessedOutsideVariables.values())i.included&&(e.add(i.getBaseVariableName()),"system"===t&&s.has(i)&&e.add("exports"));const n=i.get(this);if(n)for(const t of n)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,s){const i=new Set;if(this.addUsedOutsideNames(i,e,t,s),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&i.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Li(e,i,t.forbiddenNames));for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,s),s}}class Bi extends Vi{constructor(e,t){super(e),this.parameters=[],this.hasRest=!1,this.context=t,this.hoistedBodyVarScope=new Vi(this)}addParameterDeclaration(e){const{name:t}=e,s=new Ri(t,e,this.context),i=this.hoistedBodyVarScope.variables.get(t);return i&&(this.hoistedBodyVarScope.variables.set(t,s),s.mergeDeclarations(i)),this.variables.set(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let s=!1,i=!1;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of t)if(s instanceof ti){for(const s of t)s.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n,a=t[r];if(o)if(s=!1,0===o.length)i=!0;else for(const e of o)e.included&&(i=!0),e.calledFromTryStatement&&(s=!0);!i&&a.shouldBeIncluded(e)&&(i=!0),i&&a.include(e,s)}}}class zi extends Bi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=oe;for(const e of this.returnExpressions)e.deoptimizePath(X)}}}function Fi(e,t){if("MemberExpression"===e.type)return!e.computed&&Fi(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const ji=Symbol("PureFunction"),Ui=()=>{},Gi=Symbol("Value Properties"),Wi=()=>ne,qi=()=>!0,Hi={deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:()=>!1},Ki={deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:qi},Yi={__proto__:null,[Gi]:Ki},Xi={__proto__:null,[Gi]:Hi},Qi={__proto__:null,[Gi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(X)},getLiteralValue:Wi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Q,he,t)}},Zi={__proto__:null,[Gi]:Ki,prototype:Yi},Ji={__proto__:null,[Gi]:Hi,prototype:Yi},en={__proto__:null,[Gi]:{deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Ii)},prototype:Yi},tn={__proto__:null,[Gi]:Hi,from:Yi,of:Xi,prototype:Yi},sn={__proto__:null,[Gi]:Hi,supportedLocalesOf:Ji},nn={global:Yi,globalThis:Yi,self:Yi,window:Yi,__proto__:null,[Gi]:Ki,Array:{__proto__:null,[Gi]:Ki,from:Yi,isArray:Xi,of:Xi,prototype:Yi},ArrayBuffer:{__proto__:null,[Gi]:Hi,isView:Xi,prototype:Yi},Atomics:Yi,BigInt:Zi,BigInt64Array:Zi,BigUint64Array:Zi,Boolean:Ji,constructor:Zi,DataView:Ji,Date:{__proto__:null,[Gi]:Hi,now:Xi,parse:Xi,prototype:Yi,UTC:Xi},decodeURI:Xi,decodeURIComponent:Xi,encodeURI:Xi,encodeURIComponent:Xi,Error:Ji,escape:Xi,eval:Yi,EvalError:Ji,Float32Array:tn,Float64Array:tn,Function:Zi,hasOwnProperty:Yi,Infinity:Yi,Int16Array:tn,Int32Array:tn,Int8Array:tn,isFinite:Xi,isNaN:Xi,isPrototypeOf:Yi,JSON:Yi,Map:en,Math:{__proto__:null,[Gi]:Ki,abs:Xi,acos:Xi,acosh:Xi,asin:Xi,asinh:Xi,atan:Xi,atan2:Xi,atanh:Xi,cbrt:Xi,ceil:Xi,clz32:Xi,cos:Xi,cosh:Xi,exp:Xi,expm1:Xi,floor:Xi,fround:Xi,hypot:Xi,imul:Xi,log:Xi,log10:Xi,log1p:Xi,log2:Xi,max:Xi,min:Xi,pow:Xi,random:Xi,round:Xi,sign:Xi,sin:Xi,sinh:Xi,sqrt:Xi,tan:Xi,tanh:Xi,trunc:Xi},NaN:Yi,Number:{__proto__:null,[Gi]:Hi,isFinite:Xi,isInteger:Xi,isNaN:Xi,isSafeInteger:Xi,parseFloat:Xi,parseInt:Xi,prototype:Yi},Object:{__proto__:null,[Gi]:Hi,create:Xi,defineProperty:Qi,defineProperties:Qi,freeze:Qi,getOwnPropertyDescriptor:Xi,getOwnPropertyDescriptors:Xi,getOwnPropertyNames:Xi,getOwnPropertySymbols:Xi,getPrototypeOf:Xi,hasOwn:Xi,is:Xi,isExtensible:Xi,isFrozen:Xi,isSealed:Xi,keys:Xi,fromEntries:Yi,entries:Xi,prototype:Yi},parseFloat:Xi,parseInt:Xi,Promise:{__proto__:null,[Gi]:Ki,all:Yi,allSettled:Yi,any:Yi,prototype:Yi,race:Yi,reject:Yi,resolve:Yi},propertyIsEnumerable:Yi,Proxy:Yi,RangeError:Ji,ReferenceError:Ji,Reflect:Yi,RegExp:Ji,Set:en,SharedArrayBuffer:Zi,String:{__proto__:null,[Gi]:Hi,fromCharCode:Xi,fromCodePoint:Xi,prototype:Yi,raw:Xi},Symbol:{__proto__:null,[Gi]:Hi,for:Xi,keyFor:Xi,prototype:Yi,toStringTag:{__proto__:null,[Gi]:{deoptimizeArgumentsOnCall:Ui,getLiteralValue:()=>K,hasEffectsWhenCalled:qi}}},SyntaxError:Ji,toLocaleString:Yi,toString:Yi,TypeError:Ji,Uint16Array:tn,Uint32Array:tn,Uint8Array:tn,Uint8ClampedArray:tn,unescape:Xi,URIError:Ji,valueOf:Yi,WeakMap:en,WeakSet:en,clearInterval:Zi,clearTimeout:Zi,console:{__proto__:null,[Gi]:Ki,assert:Zi,clear:Zi,count:Zi,countReset:Zi,debug:Zi,dir:Zi,dirxml:Zi,error:Zi,exception:Zi,group:Zi,groupCollapsed:Zi,groupEnd:Zi,info:Zi,log:Zi,table:Zi,time:Zi,timeEnd:Zi,timeLog:Zi,trace:Zi,warn:Zi},Intl:{__proto__:null,[Gi]:Ki,Collator:sn,DateTimeFormat:sn,ListFormat:sn,NumberFormat:sn,PluralRules:sn,RelativeTimeFormat:sn},setInterval:Zi,setTimeout:Zi,TextDecoder:Zi,TextEncoder:Zi,URL:Zi,URLSearchParams:Zi,AbortController:Zi,AbortSignal:Zi,addEventListener:Yi,alert:Yi,AnalyserNode:Zi,Animation:Zi,AnimationEvent:Zi,applicationCache:Yi,ApplicationCache:Zi,ApplicationCacheErrorEvent:Zi,atob:Yi,Attr:Zi,Audio:Zi,AudioBuffer:Zi,AudioBufferSourceNode:Zi,AudioContext:Zi,AudioDestinationNode:Zi,AudioListener:Zi,AudioNode:Zi,AudioParam:Zi,AudioProcessingEvent:Zi,AudioScheduledSourceNode:Zi,AudioWorkletNode:Zi,BarProp:Zi,BaseAudioContext:Zi,BatteryManager:Zi,BeforeUnloadEvent:Zi,BiquadFilterNode:Zi,Blob:Zi,BlobEvent:Zi,blur:Yi,BroadcastChannel:Zi,btoa:Yi,ByteLengthQueuingStrategy:Zi,Cache:Zi,caches:Yi,CacheStorage:Zi,cancelAnimationFrame:Yi,cancelIdleCallback:Yi,CanvasCaptureMediaStreamTrack:Zi,CanvasGradient:Zi,CanvasPattern:Zi,CanvasRenderingContext2D:Zi,ChannelMergerNode:Zi,ChannelSplitterNode:Zi,CharacterData:Zi,clientInformation:Yi,ClipboardEvent:Zi,close:Yi,closed:Yi,CloseEvent:Zi,Comment:Zi,CompositionEvent:Zi,confirm:Yi,ConstantSourceNode:Zi,ConvolverNode:Zi,CountQueuingStrategy:Zi,createImageBitmap:Yi,Credential:Zi,CredentialsContainer:Zi,crypto:Yi,Crypto:Zi,CryptoKey:Zi,CSS:Zi,CSSConditionRule:Zi,CSSFontFaceRule:Zi,CSSGroupingRule:Zi,CSSImportRule:Zi,CSSKeyframeRule:Zi,CSSKeyframesRule:Zi,CSSMediaRule:Zi,CSSNamespaceRule:Zi,CSSPageRule:Zi,CSSRule:Zi,CSSRuleList:Zi,CSSStyleDeclaration:Zi,CSSStyleRule:Zi,CSSStyleSheet:Zi,CSSSupportsRule:Zi,CustomElementRegistry:Zi,customElements:Yi,CustomEvent:Zi,DataTransfer:Zi,DataTransferItem:Zi,DataTransferItemList:Zi,defaultstatus:Yi,defaultStatus:Yi,DelayNode:Zi,DeviceMotionEvent:Zi,DeviceOrientationEvent:Zi,devicePixelRatio:Yi,dispatchEvent:Yi,document:Yi,Document:Zi,DocumentFragment:Zi,DocumentType:Zi,DOMError:Zi,DOMException:Zi,DOMImplementation:Zi,DOMMatrix:Zi,DOMMatrixReadOnly:Zi,DOMParser:Zi,DOMPoint:Zi,DOMPointReadOnly:Zi,DOMQuad:Zi,DOMRect:Zi,DOMRectReadOnly:Zi,DOMStringList:Zi,DOMStringMap:Zi,DOMTokenList:Zi,DragEvent:Zi,DynamicsCompressorNode:Zi,Element:Zi,ErrorEvent:Zi,Event:Zi,EventSource:Zi,EventTarget:Zi,external:Yi,fetch:Yi,File:Zi,FileList:Zi,FileReader:Zi,find:Yi,focus:Yi,FocusEvent:Zi,FontFace:Zi,FontFaceSetLoadEvent:Zi,FormData:Zi,frames:Yi,GainNode:Zi,Gamepad:Zi,GamepadButton:Zi,GamepadEvent:Zi,getComputedStyle:Yi,getSelection:Yi,HashChangeEvent:Zi,Headers:Zi,history:Yi,History:Zi,HTMLAllCollection:Zi,HTMLAnchorElement:Zi,HTMLAreaElement:Zi,HTMLAudioElement:Zi,HTMLBaseElement:Zi,HTMLBodyElement:Zi,HTMLBRElement:Zi,HTMLButtonElement:Zi,HTMLCanvasElement:Zi,HTMLCollection:Zi,HTMLContentElement:Zi,HTMLDataElement:Zi,HTMLDataListElement:Zi,HTMLDetailsElement:Zi,HTMLDialogElement:Zi,HTMLDirectoryElement:Zi,HTMLDivElement:Zi,HTMLDListElement:Zi,HTMLDocument:Zi,HTMLElement:Zi,HTMLEmbedElement:Zi,HTMLFieldSetElement:Zi,HTMLFontElement:Zi,HTMLFormControlsCollection:Zi,HTMLFormElement:Zi,HTMLFrameElement:Zi,HTMLFrameSetElement:Zi,HTMLHeadElement:Zi,HTMLHeadingElement:Zi,HTMLHRElement:Zi,HTMLHtmlElement:Zi,HTMLIFrameElement:Zi,HTMLImageElement:Zi,HTMLInputElement:Zi,HTMLLabelElement:Zi,HTMLLegendElement:Zi,HTMLLIElement:Zi,HTMLLinkElement:Zi,HTMLMapElement:Zi,HTMLMarqueeElement:Zi,HTMLMediaElement:Zi,HTMLMenuElement:Zi,HTMLMetaElement:Zi,HTMLMeterElement:Zi,HTMLModElement:Zi,HTMLObjectElement:Zi,HTMLOListElement:Zi,HTMLOptGroupElement:Zi,HTMLOptionElement:Zi,HTMLOptionsCollection:Zi,HTMLOutputElement:Zi,HTMLParagraphElement:Zi,HTMLParamElement:Zi,HTMLPictureElement:Zi,HTMLPreElement:Zi,HTMLProgressElement:Zi,HTMLQuoteElement:Zi,HTMLScriptElement:Zi,HTMLSelectElement:Zi,HTMLShadowElement:Zi,HTMLSlotElement:Zi,HTMLSourceElement:Zi,HTMLSpanElement:Zi,HTMLStyleElement:Zi,HTMLTableCaptionElement:Zi,HTMLTableCellElement:Zi,HTMLTableColElement:Zi,HTMLTableElement:Zi,HTMLTableRowElement:Zi,HTMLTableSectionElement:Zi,HTMLTemplateElement:Zi,HTMLTextAreaElement:Zi,HTMLTimeElement:Zi,HTMLTitleElement:Zi,HTMLTrackElement:Zi,HTMLUListElement:Zi,HTMLUnknownElement:Zi,HTMLVideoElement:Zi,IDBCursor:Zi,IDBCursorWithValue:Zi,IDBDatabase:Zi,IDBFactory:Zi,IDBIndex:Zi,IDBKeyRange:Zi,IDBObjectStore:Zi,IDBOpenDBRequest:Zi,IDBRequest:Zi,IDBTransaction:Zi,IDBVersionChangeEvent:Zi,IdleDeadline:Zi,IIRFilterNode:Zi,Image:Zi,ImageBitmap:Zi,ImageBitmapRenderingContext:Zi,ImageCapture:Zi,ImageData:Zi,indexedDB:Yi,innerHeight:Yi,innerWidth:Yi,InputEvent:Zi,IntersectionObserver:Zi,IntersectionObserverEntry:Zi,isSecureContext:Yi,KeyboardEvent:Zi,KeyframeEffect:Zi,length:Yi,localStorage:Yi,location:Yi,Location:Zi,locationbar:Yi,matchMedia:Yi,MediaDeviceInfo:Zi,MediaDevices:Zi,MediaElementAudioSourceNode:Zi,MediaEncryptedEvent:Zi,MediaError:Zi,MediaKeyMessageEvent:Zi,MediaKeySession:Zi,MediaKeyStatusMap:Zi,MediaKeySystemAccess:Zi,MediaList:Zi,MediaQueryList:Zi,MediaQueryListEvent:Zi,MediaRecorder:Zi,MediaSettingsRange:Zi,MediaSource:Zi,MediaStream:Zi,MediaStreamAudioDestinationNode:Zi,MediaStreamAudioSourceNode:Zi,MediaStreamEvent:Zi,MediaStreamTrack:Zi,MediaStreamTrackEvent:Zi,menubar:Yi,MessageChannel:Zi,MessageEvent:Zi,MessagePort:Zi,MIDIAccess:Zi,MIDIConnectionEvent:Zi,MIDIInput:Zi,MIDIInputMap:Zi,MIDIMessageEvent:Zi,MIDIOutput:Zi,MIDIOutputMap:Zi,MIDIPort:Zi,MimeType:Zi,MimeTypeArray:Zi,MouseEvent:Zi,moveBy:Yi,moveTo:Yi,MutationEvent:Zi,MutationObserver:Zi,MutationRecord:Zi,name:Yi,NamedNodeMap:Zi,NavigationPreloadManager:Zi,navigator:Yi,Navigator:Zi,NetworkInformation:Zi,Node:Zi,NodeFilter:Yi,NodeIterator:Zi,NodeList:Zi,Notification:Zi,OfflineAudioCompletionEvent:Zi,OfflineAudioContext:Zi,offscreenBuffering:Yi,OffscreenCanvas:Zi,open:Yi,openDatabase:Yi,Option:Zi,origin:Yi,OscillatorNode:Zi,outerHeight:Yi,outerWidth:Yi,PageTransitionEvent:Zi,pageXOffset:Yi,pageYOffset:Yi,PannerNode:Zi,parent:Yi,Path2D:Zi,PaymentAddress:Zi,PaymentRequest:Zi,PaymentRequestUpdateEvent:Zi,PaymentResponse:Zi,performance:Yi,Performance:Zi,PerformanceEntry:Zi,PerformanceLongTaskTiming:Zi,PerformanceMark:Zi,PerformanceMeasure:Zi,PerformanceNavigation:Zi,PerformanceNavigationTiming:Zi,PerformanceObserver:Zi,PerformanceObserverEntryList:Zi,PerformancePaintTiming:Zi,PerformanceResourceTiming:Zi,PerformanceTiming:Zi,PeriodicWave:Zi,Permissions:Zi,PermissionStatus:Zi,personalbar:Yi,PhotoCapabilities:Zi,Plugin:Zi,PluginArray:Zi,PointerEvent:Zi,PopStateEvent:Zi,postMessage:Yi,Presentation:Zi,PresentationAvailability:Zi,PresentationConnection:Zi,PresentationConnectionAvailableEvent:Zi,PresentationConnectionCloseEvent:Zi,PresentationConnectionList:Zi,PresentationReceiver:Zi,PresentationRequest:Zi,print:Yi,ProcessingInstruction:Zi,ProgressEvent:Zi,PromiseRejectionEvent:Zi,prompt:Yi,PushManager:Zi,PushSubscription:Zi,PushSubscriptionOptions:Zi,queueMicrotask:Yi,RadioNodeList:Zi,Range:Zi,ReadableStream:Zi,RemotePlayback:Zi,removeEventListener:Yi,Request:Zi,requestAnimationFrame:Yi,requestIdleCallback:Yi,resizeBy:Yi,ResizeObserver:Zi,ResizeObserverEntry:Zi,resizeTo:Yi,Response:Zi,RTCCertificate:Zi,RTCDataChannel:Zi,RTCDataChannelEvent:Zi,RTCDtlsTransport:Zi,RTCIceCandidate:Zi,RTCIceTransport:Zi,RTCPeerConnection:Zi,RTCPeerConnectionIceEvent:Zi,RTCRtpReceiver:Zi,RTCRtpSender:Zi,RTCSctpTransport:Zi,RTCSessionDescription:Zi,RTCStatsReport:Zi,RTCTrackEvent:Zi,screen:Yi,Screen:Zi,screenLeft:Yi,ScreenOrientation:Zi,screenTop:Yi,screenX:Yi,screenY:Yi,ScriptProcessorNode:Zi,scroll:Yi,scrollbars:Yi,scrollBy:Yi,scrollTo:Yi,scrollX:Yi,scrollY:Yi,SecurityPolicyViolationEvent:Zi,Selection:Zi,ServiceWorker:Zi,ServiceWorkerContainer:Zi,ServiceWorkerRegistration:Zi,sessionStorage:Yi,ShadowRoot:Zi,SharedWorker:Zi,SourceBuffer:Zi,SourceBufferList:Zi,speechSynthesis:Yi,SpeechSynthesisEvent:Zi,SpeechSynthesisUtterance:Zi,StaticRange:Zi,status:Yi,statusbar:Yi,StereoPannerNode:Zi,stop:Yi,Storage:Zi,StorageEvent:Zi,StorageManager:Zi,styleMedia:Yi,StyleSheet:Zi,StyleSheetList:Zi,SubtleCrypto:Zi,SVGAElement:Zi,SVGAngle:Zi,SVGAnimatedAngle:Zi,SVGAnimatedBoolean:Zi,SVGAnimatedEnumeration:Zi,SVGAnimatedInteger:Zi,SVGAnimatedLength:Zi,SVGAnimatedLengthList:Zi,SVGAnimatedNumber:Zi,SVGAnimatedNumberList:Zi,SVGAnimatedPreserveAspectRatio:Zi,SVGAnimatedRect:Zi,SVGAnimatedString:Zi,SVGAnimatedTransformList:Zi,SVGAnimateElement:Zi,SVGAnimateMotionElement:Zi,SVGAnimateTransformElement:Zi,SVGAnimationElement:Zi,SVGCircleElement:Zi,SVGClipPathElement:Zi,SVGComponentTransferFunctionElement:Zi,SVGDefsElement:Zi,SVGDescElement:Zi,SVGDiscardElement:Zi,SVGElement:Zi,SVGEllipseElement:Zi,SVGFEBlendElement:Zi,SVGFEColorMatrixElement:Zi,SVGFEComponentTransferElement:Zi,SVGFECompositeElement:Zi,SVGFEConvolveMatrixElement:Zi,SVGFEDiffuseLightingElement:Zi,SVGFEDisplacementMapElement:Zi,SVGFEDistantLightElement:Zi,SVGFEDropShadowElement:Zi,SVGFEFloodElement:Zi,SVGFEFuncAElement:Zi,SVGFEFuncBElement:Zi,SVGFEFuncGElement:Zi,SVGFEFuncRElement:Zi,SVGFEGaussianBlurElement:Zi,SVGFEImageElement:Zi,SVGFEMergeElement:Zi,SVGFEMergeNodeElement:Zi,SVGFEMorphologyElement:Zi,SVGFEOffsetElement:Zi,SVGFEPointLightElement:Zi,SVGFESpecularLightingElement:Zi,SVGFESpotLightElement:Zi,SVGFETileElement:Zi,SVGFETurbulenceElement:Zi,SVGFilterElement:Zi,SVGForeignObjectElement:Zi,SVGGElement:Zi,SVGGeometryElement:Zi,SVGGradientElement:Zi,SVGGraphicsElement:Zi,SVGImageElement:Zi,SVGLength:Zi,SVGLengthList:Zi,SVGLinearGradientElement:Zi,SVGLineElement:Zi,SVGMarkerElement:Zi,SVGMaskElement:Zi,SVGMatrix:Zi,SVGMetadataElement:Zi,SVGMPathElement:Zi,SVGNumber:Zi,SVGNumberList:Zi,SVGPathElement:Zi,SVGPatternElement:Zi,SVGPoint:Zi,SVGPointList:Zi,SVGPolygonElement:Zi,SVGPolylineElement:Zi,SVGPreserveAspectRatio:Zi,SVGRadialGradientElement:Zi,SVGRect:Zi,SVGRectElement:Zi,SVGScriptElement:Zi,SVGSetElement:Zi,SVGStopElement:Zi,SVGStringList:Zi,SVGStyleElement:Zi,SVGSVGElement:Zi,SVGSwitchElement:Zi,SVGSymbolElement:Zi,SVGTextContentElement:Zi,SVGTextElement:Zi,SVGTextPathElement:Zi,SVGTextPositioningElement:Zi,SVGTitleElement:Zi,SVGTransform:Zi,SVGTransformList:Zi,SVGTSpanElement:Zi,SVGUnitTypes:Zi,SVGUseElement:Zi,SVGViewElement:Zi,TaskAttributionTiming:Zi,Text:Zi,TextEvent:Zi,TextMetrics:Zi,TextTrack:Zi,TextTrackCue:Zi,TextTrackCueList:Zi,TextTrackList:Zi,TimeRanges:Zi,toolbar:Yi,top:Yi,Touch:Zi,TouchEvent:Zi,TouchList:Zi,TrackEvent:Zi,TransitionEvent:Zi,TreeWalker:Zi,UIEvent:Zi,ValidityState:Zi,visualViewport:Yi,VisualViewport:Zi,VTTCue:Zi,WaveShaperNode:Zi,WebAssembly:Yi,WebGL2RenderingContext:Zi,WebGLActiveInfo:Zi,WebGLBuffer:Zi,WebGLContextEvent:Zi,WebGLFramebuffer:Zi,WebGLProgram:Zi,WebGLQuery:Zi,WebGLRenderbuffer:Zi,WebGLRenderingContext:Zi,WebGLSampler:Zi,WebGLShader:Zi,WebGLShaderPrecisionFormat:Zi,WebGLSync:Zi,WebGLTexture:Zi,WebGLTransformFeedback:Zi,WebGLUniformLocation:Zi,WebGLVertexArrayObject:Zi,WebSocket:Zi,WheelEvent:Zi,Window:Zi,Worker:Zi,WritableStream:Zi,XMLDocument:Zi,XMLHttpRequest:Zi,XMLHttpRequestEventTarget:Zi,XMLHttpRequestUpload:Zi,XMLSerializer:Zi,XPathEvaluator:Zi,XPathExpression:Zi,XPathResult:Zi,XSLTProcessor:Zi};for(const e of["window","global","self","globalThis"])nn[e]=nn;function rn(e){let t=nn;for(const s of e){if("string"!=typeof s)return null;if(t=t[s],!t)return null}return t[Gi]}class on extends de{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,s){switch(e.type){case 0:case 1:return void(rn([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,s));case 2:{const i=rn([this.name,...t]);return void(i?i.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,s))}}}getLiteralValueAtPath(e,t,s){const i=rn([this.name,...e]);return i?i.getLiteralValue():ie}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!rn([this.name]):!rn([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const i=rn([this.name,...e]);return!i||i.hasEffectsWhenCalled(t,s)}}}}const an={__proto__:null,class:!0,const:!0,let:!0,var:!0};class ln extends ei{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Fi(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let s;const{treeshake:i}=this.context.options;switch(e){case"var":s=this.scope.addDeclaration(this,this.context,t,!0),i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":s=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":s=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return s.kind=e,[this.variable=s]}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const[n,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,s,i);return[n,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof on&&!this.isPureFunction(Y)&&this.variable.hasEffectsOnInteractionAtPath(Y,ce,e)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,s);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(null!==this.isTDZAccess)return this.isTDZAccess;if(!(this.variable instanceof Pi&&this.variable.kind&&this.variable.kind in an&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let e;return this.variable.declarations&&1===this.variable.declarations.length&&(e=this.variable.declarations[0])&&this.start=i)return i;n=e.charCodeAt(++s),++s,(s=47===n?e.indexOf("\n",s)+1:e.indexOf("*/",s)+2)>i&&(i=e.indexOf(t,s))}}const fn=/\S/g;function mn(e,t){fn.lastIndex=t;return fn.exec(e).index}function gn(e){let t,s,i=0;for(t=e.indexOf("\n",i);;){if(i=e.indexOf("/",i),-1===i||i>t)return[t,t+1];if(s=e.charCodeAt(i+1),47===s)return[i,t+1];i=e.indexOf("*/",i+3)+2,i>t&&(t=e.indexOf("\n",i))}}function yn(e,t,s,i,n){let r,o,a,l,c=e[0],h=!c.included||c.needsBoundaries;h&&(l=s+gn(t.original.slice(s,c.start))[1]);for(let s=1;s<=e.length;s++)r=c,o=l,a=h,c=e[s],h=void 0!==c&&(!c.included||c.needsBoundaries),a||h?(l=r.end+gn(t.original.slice(r.end,void 0===c?i:c.start))[1],r.included?a?r.render(t,n,{end:l,start:o}):r.render(t,n):hn(r,t,o,l)):r.render(t,n)}function xn(e,t,s,i){const n=[];let r,o,a,l,c=s-1;for(const i of e){for(void 0!==r&&(c=r.end+pn(t.original.slice(r.end,i.start),",")),o=a=c+1+gn(t.original.slice(c+1,i.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&n.push({contentEnd:a,end:o,node:r,separator:c,start:s}),r=i,s=o}return n.push({contentEnd:i,end:i,node:r,separator:null,start:s}),n}function En(e,t,s){for(;;){const[i,n]=gn(e.original.slice(t,s));if(-1===i)break;e.remove(t+i,t+=n)}}class bn extends Vi{addDeclaration(e,t,s,i){if(i){const n=this.parent.addDeclaration(e,t,s,i);return n.markInitializersForDeoptimization(),n}return super.addDeclaration(e,t,s,!1)}}class vn extends ei{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===Ms&&this.context.log(Se,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${M(t)}" was ignored.`}),this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ms:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class Sn extends ei{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(oe)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new bn(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof vn&&"use asm"===e.directive}render(e,t){this.body.length>0?yn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class An extends ei{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,oe)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Y)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Y,t,s)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([W,W]),this.context.requestTreeshakingPass())}}class kn extends ei{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(2===e.type){const{parameters:t}=this.scope,{args:s}=e;let i=!1;for(let e=0;e0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(X),this.context.requestTreeshakingPass()),ae):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,s){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ue,s)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],ce,s)))return!0}for(const e of this.params)if(e.hasEffects(s))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:s}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=s}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",oe))),this.params[this.params.length-1]instanceof An),this.body instanceof Sn?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===ws&&(this.body=new Sn(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}kn.prototype.preventChildBlockScope=!0;class In extends kn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new zi(e,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=e,s.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const s of this.params)s instanceof ln||s.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new li([],ui)}}function wn(e,{exportNamesByVariable:t,snippets:{_:s,getObject:i,getPropertyAccess:n}},r=""){if(1===e.length&&1===t.get(e[0]).length){const i=e[0];return`exports('${t.get(i)}',${s}${i.getName(n)}${r})`}{const s=[];for(const i of e)for(const e of t.get(i))s.push([e,i.getName(n)+r]);return`exports(${i(s,{lineBreakIndent:null})})`}}function Pn(e,t,s,i,{exportNamesByVariable:n,snippets:{_:r}}){i.prependRight(t,`exports('${n.get(e)}',${r}`),i.appendLeft(s,")")}function Cn(e,t,s,i,n,r){const{_:o,getPropertyAccess:a}=r.snippets;n.appendLeft(s,`,${o}${wn([e],r)},${o}${e.getName(a)}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}class $n extends ei{addExportedVariables(e,t){for(const s of this.properties)"Property"===s.type?s.value.addExportedVariables(e,t):s.argument.addExportedVariables(e,t)}declare(e,t){const s=[];for(const i of this.properties)s.push(...i.declare(e,t));return s}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Y,t,s))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class Nn extends Pi{constructor(e){super("arguments",null,oe,e),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(X):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(X);this.deoptimizedArguments.length=0}}class _n extends Ri{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,s){return(s.replacedVariableInits.get(this)||oe).hasEffectsOnInteractionAtPath(e,t,s)}}class Rn extends zi{constructor(e,t){super(e,t),this.variables.set("arguments",this.argumentsVariable=new Nn(t)),this.variables.set("this",this.thisVariable=new _n(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const s of t)s.included||s.include(e,!1)}}class On extends kn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Rn(e,this.context),this.constructedEntity=new li(Object.create(null),ui),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){super.deoptimizeArgumentsOnInteractionAtPath(e,t,s),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:oe);const{brokenFlow:i,ignore:n,replacedVariableInits:r}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(s))return!0;s.brokenFlow=i,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),s.ignore=n}return!1}include(e,t){super.include(e,t),this.id?.include();const s=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof ln&&!s||i.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new li([{key:"prototype",kind:"init",property:new li([],ui)}],ui)}}class Dn extends ei{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof On||e instanceof In)break e}while(e=e.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Tn={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>ee<e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};function Ln(e,t,s){if(s.arguments.length>0)if(s.arguments[s.arguments.length-1].included)for(const i of s.arguments)i.render(e,t);else{let i=s.arguments.length-2;for(;i>=0&&!s.arguments[i].included;)i--;if(i>=0){for(let n=0;n<=i;n++)s.arguments[n].render(e,t);e.remove(pn(e.original,",",s.arguments[i].end),s.end-1)}else e.remove(pn(e.original,"(",s.callee.end)+1,s.end-1)}}class Mn extends ei{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.context.code.charCodeAt(this.start)?ie:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ae:bs(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||Es(this.members,e[0],t,s))}}initialise(){this.members=function(e){if(e instanceof RegExp)return ys;switch(typeof e){case"boolean":return ms;case"number":return gs;case"string":return xs}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Vn(e){return e.computed?function(e){if(e instanceof Mn)return String(e.value);return null}(e.property):e.property.name}function Bn(e){const t=e.propertyKey,s=e.object;if("string"==typeof t){if(s instanceof ln)return[{key:s.name,pos:s.start},{key:t,pos:e.property.start}];if(s instanceof zn){const i=Bn(s);return i&&[...i,{key:t,pos:e.property.start}]}}return null}class zn extends ei{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const e=Bn(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const s=Fn(t,e.slice(1),this.context);s?"undefined"===s?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let s=1;s!!e&&e!==oe));if(0!==o.length)if(n===oe)for(const e of o)e.deoptimizePath(X);else s.withTrackedEntityAtPath(t,n,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);n.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==oe){this.returnExpression=ae;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ye,this.deoptimizableDependentExpressions=ge;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(X)}}deoptimizePath(e){if(0===e.length||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==oe&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){const[i]=this.getReturnExpression(t);return i===oe?ie:t.withTrackedEntityAtPath(e,i,(()=>(this.deoptimizableDependentExpressions.push(s),i.getLiteralValueAtPath(e,t,s))),ie)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getReturnExpression(s);return n[0]===oe?n:s.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(i);const[r,o]=n[0].getReturnExpressionWhenCalledAtPath(e,t,s,i);return[r,o||n[1]]}),ae)}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(2===i){const{args:i,withNew:n}=t;if((n?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,i,this))return!1}else if((1===i?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[n,r]=this.getReturnExpression();return(1===i||!r)&&n.hasEffectsOnInteractionAtPath(e,t,s)}}class Un extends jn{bind(){if(super.bind(),this.callee instanceof ln){this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(Se,Ot(this.callee.name),this.start),"eval"===this.callee.name&&this.context.log(Se,{code:"EVAL",id:e=this.context.module.id,message:`Use of eval in "${M(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:De("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof zn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Y,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Js&&this.callee instanceof ln&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(Y,te,e)}render(e,t,{renderedSurroundingElement:s}=fe){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:s}),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}getReturnExpression(e=te){return null===this.returnExpression?(this.returnExpression=ae,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Y,this.interaction,e,this)):this.returnExpression}}class Gn extends Bi{addDeclaration(e,t,s,i){const n=this.variables.get(e.name);return n?(this.parent.addDeclaration(e,t,rs,i),n.addDeclaration(e,s),n):this.parent.addDeclaration(e,t,s,i)}}class Wn extends Vi{constructor(e,t,s){super(e),this.variables.set("this",this.thisVariable=new Pi("this",null,t,s)),this.instanceScope=new Vi(this),this.instanceScope.variables.set("this",new _n(s))}findLexicalBoundary(){return this}}class qn extends ei{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Y,s):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Y,{args:t.args,type:2,withNew:!1},s):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=ae,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Y,ue,te,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Hn extends qn{applyDeoptimizations(){}}class Kn extends re{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],s)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,s){return this.object.getLiteralValueAtPath([this.key,...e],t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,s)}}class Yn extends ei{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Vi(e)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,s):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,s))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof Hn&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof Hn&&"constructor"===e.kind||e.deoptimizePath(X);this.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const s of this.body.body){const i=s.static?e:t,n=s.kind;if(i===t&&!n)continue;const r="set"===n||"get"===n?n:"init";let o;if(s.computed){const e=s.key.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e){i.push({key:W,kind:r,property:s});continue}o=String(e)}else o=s.key instanceof ln?s.key.name:String(s.key.value);i.push({key:o,kind:r,property:s})}return e.unshift({key:"prototype",kind:"init",property:new li(t,this.superClass?new Kn(this.superClass,"prototype"):ui)}),this.objectEntity=new li(e,this.superClass||ui)}}class Xn extends Yn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ln(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===i&&s.has(o)&&e.appendLeft(this.end,`${n}${wn([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${n}=${n}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:s,variable:i}=e;for(const e of t.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}class Qn extends Yn{render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s===Rs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Zn extends re{constructor(e){super(),this.expressions=e,this.included=!1}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return[new Zn(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,s){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(e,t,s))return!0;return!1}}function Jn(e,t){const{brokenFlow:s,hasBreak:i,hasContinue:n,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=i,e.hasContinue=n,e.brokenFlow=s,!1)}function er(e,t,s){const{brokenFlow:i,hasBreak:n,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,s,{asSingleStatement:!0}),e.hasBreak=n,e.hasContinue=r,e.brokenFlow=i}class tr extends ei{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}tr.prototype.needsBoundaries=!0;class sr extends On{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ln(e.id,this,this.scope.parent)),super.parseNode(e)}}class ir extends ei{include(e,t){super.include(e,t),t&&this.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s,r=function(e,t){return mn(e,pn(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof sr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const s=pn(e,"function",t)+8;e=e.slice(s,pn(e,"(",s));const i=pn(e,"*");return-1===i?s:s+i+1}(e.original,r):null,t);else if(this.declaration instanceof Xn)this.renderNamedDeclaration(e,r,null===this.declaration.id?pn(e.original,"class",i)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void hn(this,e,i,n);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Rs}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,s,i){const{exportNamesByVariable:n,format:r,snippets:{getPropertyAccess:o}}=i,a=this.variable.getName(o);e.remove(this.start,t),null!==s&&e.appendLeft(s,` ${a}`),"system"===r&&this.declaration instanceof Xn&&n.has(this.variable)&&e.appendLeft(this.end,` ${wn([this.variable],i)};`)}renderVariableDeclaration(e,t,{format:s,exportNamesByVariable:i,snippets:{cnst:n,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===s&&i.get(this.variable);a?(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${a[0]}', `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}ir.prototype.needsBoundaries=!0;class nr extends ei{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s;null===this.declaration?e.remove(i,n):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:n,start:i}))}applyDeoptimizations(){}}nr.prototype.needsBoundaries=!0;class rr extends On{render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s===Rs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class or extends bn{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,s,i)}}const ar=Symbol("unset");class lr extends ei{constructor(){super(...arguments),this.testValue=ar}deoptimizeCache(){this.testValue=ie}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const s=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&s,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new or(this.scope),this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new or(this.scope),this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:s}}=t,i=this.getTestValue(),n=[],r=this.test.included,o=!this.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof i||i)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),n.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof i&&i?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),n.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(n,e,s)}applyDeoptimizations(){}getTestValue(){return this.testValue===ar?this.testValue=this.test.getLiteralValueAtPath(Y,te,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let s=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),s=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&s)}renderHoistedDeclarations(e,t,s){const i=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(s):""})))].filter(Boolean).join(", ");if(i){const e=this.parent.type,s=e!==Ms&&e!==ws;t.prependRight(this.start,`${s?"{ ":""}var ${i}; `),s&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof lr&&e.alternate)return!0;if(e instanceof Sn)return!1;e=e.parent}while(e);return!1}}class cr extends ei{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}cr.prototype.needsBoundaries=!0;class hr extends ei{applyDeoptimizations(){}}const ur="_interopDefault",dr="_interopDefaultCompat",pr="_interopNamespace",fr="_interopNamespaceCompat",mr="_interopNamespaceDefault",gr="_interopNamespaceDefaultOnly",yr="_mergeNamespaces",xr={auto:ur,compat:dr,default:null,defaultOnly:null,esModule:null},Er=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),br={auto:pr,compat:fr,default:mr,defaultOnly:gr,esModule:null},vr=(e,t)=>"esModule"!==e&&Er(e,t),Sr=(e,t,s,i,n,r,o)=>{const a=new Set(e);for(const e of Lr)t.has(e)&&a.add(e);return Lr.map((e=>a.has(e)?Ar[e](s,i,n,r,o,a):"")).join("")},Ar={[dr](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${o}${wr(t)}${i}?${i}${s?kr(t):Ir(t)}${a}${r}${r}`},[ur](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:ur});return`${o}e${i}&&${i}e.__esModule${i}?${i}${s?kr(t):Ir(t)}${a}${r}${r}`},[fr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mr)){const[e,s]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:fr});return`${e}${wr(t)}${o}?${o}e${o}:${o}${mr}(e)${s}${l}${l}`}return`function ${fr}(e)${o}{${l}${e}if${o}(${wr(t)})${o}return e;${l}`+Pr(e,e,t,s,i,n)+`}${l}${l}`},[gr](e,t,s,i,n){const{getDirectReturnFunction:r,getObject:o,n:a}=t,[l,c]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:gr});return`${l}${Dr(i,Tr(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${c}${a}${a}`},[mr](e,t,s,i,n){const{_:r,n:o}=t;return`function ${mr}(e)${r}{${o}`+Pr(e,e,t,s,i,n)+`}${o}${o}`},[pr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:pr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${mr}(e)${t}${l}${l}`}return`function ${pr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Pr(e,e,t,s,i,n)+`}${l}${l}`},[yr](e,t,s,i,n){const{_:r,cnst:o,n:a}=t,l="var"===o&&s;return`function ${yr}(n, m)${r}{${a}${e}${$r(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(s?l?_r:Rr:Or)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Dr(i,Tr(n,"n",t))};${a}}${a}${a}`}},kr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Ir=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,wr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Pr=(e,t,s,i,n,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}=s,d=`{${h}`+(i?Nr:Or)(e,t+e+e,s)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Mr(l)}${o}}`:""});${h}${t}if${o}(e)${o}{${h}${t}${e}${Cr(d,!i,s)}${h}${t}}${h}${t}n${c("default")}${o}=${o}e;${h}${t}return ${Dr(n,"n")}${u}${h}`},Cr=(e,t,{_:s,cnst:i,getFunctionIntro:n,s:r})=>"var"!==i||t?`for${s}(${i} k in e)${s}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:!1,name:null})}${e})${r}`,$r=(e,t,s,{_:i,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,n]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:s,t:s},name:null});return`m.forEach(${t}e${i}&&${i}typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e)${i}&&${i}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${n});`}return`for${i}(var i${i}=${i}0;${i}i${i}<${i}m.length;${i}i++)${i}{${a}${s}${s}${n} e${i}=${i}m[i];${a}${s}${s}if${i}(typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e))${i}{${i}for${i}(${n} k in e)${i}${e}${i}}${a}${s}}`},Nr=(e,t,s)=>{const{_:i,n:n}=s;return`${t}if${i}(k${i}!==${i}'default')${i}{${n}`+_r(e,t+e,s)+`${t}}${n}`},_r=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}enumerable:${s}true,${r}${t}${e}get:${s}${o}e[k]${a}${r}${t}});${r}`},Rr=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}if${s}(d)${s}{${r}${t}${e}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}${e}enumerable:${s}true,${r}${t}${e}${e}get:${s}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Or=(e,t,{_:s,n:i})=>`${t}n[k]${s}=${s}e[k];${i}`,Dr=(e,t)=>e?`Object.freeze(${t})`:t,Tr=(e,t,{_:s,getObject:i})=>e?`Object.defineProperty(${t},${s}Symbol.toStringTag,${s}${Mr(i)})`:t,Lr=Object.keys(Ar);function Mr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function Vr(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Br extends ei{declareDeclarator(e){this.id.declare(e,this.init||rs)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:s,id:i,init:n}=this;s||this.applyDeoptimizations(),this.included=!0,n?.include(e,t),i.markDeclarationReached(),(t||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t){const{exportNamesByVariable:s,snippets:{_:i,getPropertyAccess:n}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=pn(e.original,"=",o.end);e.remove(l,mn(e.original,t+1))}if(a){if(o instanceof ln&&a instanceof Qn&&!a.id){o.variable.getName(n)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?fe:{renderedSurroundingElement:Rs})}else o instanceof ln&&Vr(o.variable,s)&&e.appendLeft(r,`${i}=${i}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof ln&&t instanceof Qn&&!t.id){const{name:s,variable:i}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}function zr(e,t,s){return"external"===t?br[s(e instanceof Jt?e.id:null)]:"default"===t?gr:null}const Fr={amd:["require"],cjs:["require"],system:["module"]};function jr(e){const t=[];for(const s of e.properties){if("RestElement"===s.type||s.computed||"Identifier"!==s.key.type)return;t.push(s.key.name)}return t}class Ur extends ei{applyDeoptimizations(){}}const Gr="ROLLUP_FILE_URL_",Wr="import";const qr={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},Hr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Kr=(e,t="URL")=>`new ${t}(${e}).href`,Yr=(e,t=!1)=>Kr(`'${T(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Xr=e=>(t,{chunkId:s})=>{const i=e(s);return null===t?`({ url: ${i} })`:"url"===t?i:"undefined"},Qr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Zr=e=>Qr(`__dirname + '/${e}'`),Jr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${T(e)}', document.baseURI).href)`,eo={amd:e=>("."!==e[0]&&(e="./"+e),Kr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Zr(e)} : ${Yr(e)})`,es:e=>Kr(`'${e}', import.meta.url`),iife:e=>Yr(e),system:e=>Kr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Zr(e)} : ${Yr(e,!0)})`},to={amd:Xr((()=>Kr("module.uri, document.baseURI"))),cjs:Xr((e=>`(typeof document === 'undefined' ? ${Qr("__filename")} : ${Jr(e)})`)),iife:Xr((e=>Jr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Xr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Qr("__filename")} : ${Jr(e,!0)})`))};class so extends ei{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(is()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:s,module:i}=this.context;s(Ae,Lt(e,i.id,Pe(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){let s=this.start;if(e.original.startsWith("#!")&&(s=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,s)),this.body.length>0){for(;"/"===e.original[s]&&/[*/]/.test(e.original[s+1]);){const t=gn(e.original.slice(s,this.body[0].start));if(-1===t[0])break;s+=t[1]}yn(this.body,e,s,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class io extends ei{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const s of this.consequent)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t,s){if(this.consequent.length>0){this.test&&this.test.render(e,t);const i=this.test?this.test.end:pn(e.original,"default",this.start)+7,n=pn(e.original,":",i)+1;yn(this.consequent,e,n,s.end,t)}else super.render(e,t)}}io.prototype.needsBoundaries=!0;class no extends ei{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?ie:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ae:bs(xs,e[0])}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(xs,e[0],t,s)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class ro extends de{constructor(){super("undefined")}getLiteralValueAtPath(){}}class oo extends Pi{constructor(e,t,s){super(e,t,t.declaration,s),this.hasId=!1,this.originalId=null,this.originalVariable=null;const i=t.declaration;(i instanceof sr||i instanceof Xn)&&i.id?(this.hasId=!0,this.originalId=i.id):i instanceof ln&&(this.originalId=i)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof ro||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const s=new Set;do{s.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof oo&&!s.has(t));return this.originalVariable=t||e}}class ao extends Vi{constructor(e,t){super(e),this.context=t,this.variables.set("this",new Pi("this",null,rs,t))}addExportDefaultDeclaration(e,t,s){const i=new oo(e,t,s);return this.variables.set("default",i),i}addNamespaceMemberAccess(){}deconflict(e,t,s){for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.context.traceVariable(e)||this.parent.findVariable(e);return s instanceof on&&this.accessedOutsideVariables.set(e,s),s}}const lo={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>ie,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class co extends ei{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Y)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:s}=fe){this.included=!0;for(const i of this.declarations){(t||i.shouldBeIncluded(e))&&i.include(e,t);const{id:n,init:r}=i;s&&n.include(e,t),r&&n.included&&!r.included&&(n instanceof $n||n instanceof wi)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,s=fe){if(function(e,t){for(const s of e){if(!s.id.included)return!1;if(s.id.type===Ds){if(t.has(s.id.variable))return!1}else{const e=[];if(s.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const s of this.declarations)s.render(e,t);s.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}applyDeoptimizations(){}renderDeclarationEnd(e,t,s,i,n,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===s?e.appendLeft(n,t):(10!==e.original.charCodeAt(i-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(i--,13===e.original.charCodeAt(i)&&i--),i===s+1?e.overwrite(s,n,t):(e.overwrite(s,s+1,t),e.remove(i,n))),r.length>0&&e.appendLeft(n,` ${wn(r,o)};`)}renderReplacedDeclarations(e,t){const s=xn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,n;n=mn(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o,a,l=!1,c=!1,h="";const u=[],d=function(e,t,s){let i=null;if("system"===t.format){for(const{node:n}of e)n.id instanceof ln&&n.init&&0===s.length&&1===t.exportNamesByVariable.get(n.id.variable)?.length?(i=n.id.variable,s.push(i)):n.id.addExportedVariables(s,t.exportNamesByVariable);s.length>1?i=null:i&&(s.length=0)}return i}(s,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of s)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof ln&&Vr(u.id.variable,t.exportNamesByVariable))c&&(h+=";"),l=!1;else{if(d&&d===u.id.variable){const s=pn(e.original,"=",u.id.end);Pn(d,mn(e.original,s+1),null===f?m:f,e,t)}l?h+=",":(c&&(h+=";"),o+=`${this.kind} `,l=!0)}n===r+1?e.overwrite(r,n,h+o):(e.overwrite(r,r+1,h),e.appendLeft(n,o)),i=m,n=g,c=!0,r=f,h=""}else e.remove(p,g);this.renderDeclarationEnd(e,h,r,i,n,u,t)}}const ho={ArrayExpression:Ii,ArrayPattern:wi,ArrowFunctionExpression:In,AssignmentExpression:class extends ei{hasEffects(e){const{deoptimized:t,left:s,operator:i,right:n}=this;return t||this.applyDeoptimizations(),n.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)}hasEffectsOnInteractionAtPath(e,t,s){return this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){const{deoptimized:s,left:i,right:n,operator:r}=this;s||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||i.included||i.hasEffectsAsAssignmentTarget(is(),!1))&&i.includeAsAssignmentTarget(e,t,"="!==r),n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:s,renderedParentType:i,renderedSurroundingElement:n}=fe){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=mn(e.original,pn(e.original,"=",r.end)+1);e.remove(a,l),s&&En(e,l,o.start),o.render(e,t,{renderedParentType:i||c.type,renderedSurroundingElement:n||c.type})}if("system"===t.format)if(r instanceof ln){const s=r.variable,i=t.exportNamesByVariable.get(s);if(i)return void(1===i.length?Pn(s,a,l,e,t):Cn(s,a,l,c.type!==Rs,e,t))}else{const s=[];if(r.addExportedVariables(s,t.exportNamesByVariable),s.length>0)return void function(e,t,s,i,n,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;n.prependRight(t,a(["v"],`${wn(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:i})),n.appendLeft(s,")")}(s,a,l,n===Rs,e,t)}r.included&&r instanceof $n&&(n===Rs||n===ks)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends ei{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Y,t,s)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:s}=fe){this.left.render(e,t,{isShorthandProperty:s}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},AwaitExpression:Dn,BinaryExpression:class extends ei{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(e.length>0)return ie;const i=this.left.getLiteralValueAtPath(Y,t,s);if("symbol"==typeof i)return ie;const n=this.right.getLiteralValueAtPath(Y,t,s);if("symbol"==typeof n)return ie;const r=Tn[this.operator];return r?r(i,n):ie}hasEffects(e){return"+"===this.operator&&this.parent instanceof vn&&""===this.left.getLiteralValueAtPath(Y,te,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}render(e,t,{renderedSurroundingElement:s}=fe){this.left.render(e,t,{renderedSurroundingElement:s}),this.right.render(e,t)}},BlockStatement:Sn,BreakStatement:class extends ei{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:Un,CatchClause:class extends ei{createScope(e){this.scope=new Gn(e,this.context)}parseNode(e){const{param:t}=e;t&&(this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope),this.param.declare("parameter",oe)),super.parseNode(e)}},ChainExpression:class extends ei{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(!this.expression.isSkippedAsOptional(s))return this.expression.getLiteralValueAtPath(e,t,s)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}},ClassBody:class extends ei{createScope(e){this.scope=new Wn(e,this.parent,this.context)}include(e,t){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const s of this.body)s.include(e,t)}parseNode(e){const t=this.body=[];for(const s of e.body)t.push(new(this.context.getNodeConstructor(s.type))(s,this,s.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Xn,ClassExpression:Qn,ConditionalExpression:class extends ei{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(X);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ge;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Zn([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.consequent.hasEffectsOnInteractionAtPath(e,t,s)||this.alternate.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===s?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):s.include(e,t)}includeCallArguments(e,t){const s=this.getUsedBranch();s?s.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=fe){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=pn(e.original,":",this.consequent.end),l=mn(e.original,(this.consequent.included?pn(e.original,"?",this.test.end):a)+1);i&&En(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),un(this,e),o.render(e,t,{isCalleeOfRenderedParent:s,preventASI:!0,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(Y,te,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends ei{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends ei{hasEffects(e){return!!this.test.hasEffects(e)||Jn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),er(e,this.body,t)}},EmptyStatement:class extends ei{hasEffects(){return!1}},ExportAllDeclaration:tr,ExportDefaultDeclaration:ir,ExportNamedDeclaration:nr,ExportSpecifier:class extends ei{applyDeoptimizations(){}},ExpressionStatement:vn,ForInStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){const{body:t,deoptimized:s,left:i,right:n}=this;return s||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(e,!1)&&!n.hasEffects(e))||Jn(e,t)}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),er(e,s,t)}initialise(){this.left.setAssignedValue(oe)}render(e,t){this.left.render(e,t,dn),this.right.render(e,t,dn),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.context.requestTreeshakingPass()}},ForOfStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),er(e,s,t)}initialise(){this.left.setAssignedValue(oe)}render(e,t){this.left.render(e,t,dn),this.right.render(e,t,dn),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},ForStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Jn(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),er(e,this.body,t)}render(e,t){this.init?.render(e,t,dn),this.test?.render(e,t,dn),this.update?.render(e,t,dn),this.body.render(e,t)}},FunctionDeclaration:sr,FunctionExpression:rr,Identifier:ln,IfStatement:lr,ImportAttribute:class extends ei{},ImportDeclaration:cr,ImportDefaultSpecifier:hr,ImportExpression:class extends ei{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof vn)return ge;if(e instanceof Dn){const t=e.parent;if(t instanceof vn)return ge;if(t instanceof Br){const e=t.id;return e instanceof $n?jr(e):void 0}if(t instanceof zn){const e=t.property;if(!t.computed&&e instanceof ln)return[e.name]}}else if(e instanceof zn){const t=e.parent,s=e.property;if(!(t instanceof Un&&s instanceof ln))return;const i=s.name;if(t.parent instanceof vn&&["catch","finally"].includes(i))return ge;if("then"!==i)return;if(0===t.arguments.length)return ge;const n=t.arguments[0];if(1!==t.arguments.length||!(n instanceof In||n instanceof rr))return;if(0===n.params.length)return ge;const r=n.params[0];return 1===n.params.length&&r instanceof $n?jr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:s,getDirectReturnFunction:i,getObject:n,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,s]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${s})`)}else{if(this.mechanism&&(e.overwrite(this.start,pn(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,s]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${s})`)}}else this.source.render(e,t);!0!==this.assertions&&(this.arguments&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&e.appendLeft(this.end-1,`,${s}${n([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,s,i,n,r,o,a,l){const{format:c}=s;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.assertions=l;const h=[...Fr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,s,i,n)),u&&h.push(u),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:s,dynamicImportFunction:i,dynamicImportInCjs:n,format:r,generatedCode:{arrowFunctions:o},interop:a},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:h},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:r,moduleId:this.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const p=!this.resolution||"string"==typeof this.resolution;switch(r){case"cjs":{if(n&&(!e||"string"==typeof e||e instanceof Jt))return{helper:null,mechanism:null};const s=zr(e,t,a);let i="require(",r=")";s&&(i=`/*#__PURE__*/${s}(${i}`,r+=")");const[l,u]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${l}${i}`,r+=`${u})`,!o&&p&&(i=h(["t"],`${i}t${r}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),r=")"),{helper:s,mechanism:{left:i,right:r}}}case"amd":{const i=s?"c":"resolve",n=s?"e":"reject",r=zr(e,t,a),[u,d]=c(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=r?`${u}${i}(/*#__PURE__*/${r}(m))${d}`:i,[m,g]=c([i,n],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,x=`],${l}${f},${l}${n})${g})`;return!o&&p&&(y=h(["t"],`${y}t${x}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),x=")"),{helper:r,mechanism:{left:y,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(i)return{helper:null,mechanism:{left:`${i}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:Ur,ImportSpecifier:class extends ei{applyDeoptimizations(){}},LabeledStatement:class extends ei{hasEffects(e){const t=e.brokenFlow;return e.ignore.labels.add(this.label.name),!!this.body.hasEffects(e)||(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t),!1)}include(e,t){this.included=!0;const s=e.brokenFlow;this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=s)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,mn(e.original,pn(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Mn,LogicalExpression:class extends ei{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(X);const{context:t,expressionsToBeDeoptimized:s}=this;this.expressionsToBeDeoptimized=ge;for(const e of s)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Zn([this.left.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.left.hasEffectsOnInteractionAtPath(e,t,s)||this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||s===this.right&&this.left.shouldBeIncluded(e)||!s?(this.left.include(e,t),this.right.include(e,t)):s.include(e,t)}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=fe){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:i,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=pn(e.original,this.operator,this.left.end);if(this.right.included){const t=mn(e.original,o+2);e.remove(this.start,t),i&&En(e,t,this.right.start)}else e.remove(o,this.end);un(this,e),this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:zn,MetaProperty:class extends ei{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:s}=this;return t===Wr&&s?.startsWith(Gr)?e.getFileName(s.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Wr)){this.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof zn&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Gr)&&(this.referenceId=t.slice(16))}}render(e,{format:t,pluginDriver:s,snippets:i}){const{context:{module:{id:n}},meta:{name:r},metaProperty:o,parent:a,preliminaryChunkId:l,referenceId:c,start:h,end:u}=this;if(r!==Wr)return;const d=l;if(c){const i=s.getFileName(c),r=w(N(C(d),i)),o=s.hookFirstSync("resolveFileUrl",[{chunkId:d,fileName:i,format:t,moduleId:n,referenceId:c,relativePath:r}])||eo[t](r);return void e.overwrite(a.start,a.end,o,{contentOnly:!0})}const p=s.hookFirstSync("resolveImportMeta",[o,{chunkId:d,format:t,moduleId:n}])||to[t]?.(o,{chunkId:d,snippets:i});"string"==typeof p&&(a instanceof zn?e.overwrite(a.start,a.end,p,{contentOnly:!0}):e.overwrite(h,u,p,{contentOnly:!0}))}setResolution(e,t,s){this.preliminaryChunkId=s;const i=(this.metaProperty?.startsWith(Gr)?Hr:qr)[e];i.length>0&&this.scope.addAccessedGlobals(i,t)}},MethodDefinition:Hn,NewExpression:class extends ei{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Y,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}},ObjectExpression:class extends ei{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s!==Rs&&s!==ks||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ui;const t=[];for(const s of this.properties){if(s instanceof ti){t.push({key:W,kind:"init",property:s});continue}let i;if(s.computed){const e=s.key.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e){t.push({key:W,kind:s.kind,property:s});continue}i=String(e)}else if(i=s.key instanceof ln?s.key.name:String(s.key.value),"__proto__"===i&&"init"===s.kind){e=s.value instanceof Mn&&null===s.value.value?null:s.value;continue}t.push({key:i,kind:s.kind,property:s})}return this.objectEntity=new li(t,e)}},ObjectPattern:$n,PrivateIdentifier:class extends ei{},Program:so,Property:class extends qn{constructor(){super(...arguments),this.declarationInit=null}declare(e,t){return this.declarationInit=t,this.value.declare(e,oe)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([W,W]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.value?this.value.getLiteralValueAtPath(e,t,s):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,s,i):ae}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}},RestElement:An,ReturnStatement:class extends ei{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||oe)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,s)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,s){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(t||i===s&&!(this.parent instanceof vn)||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t,{renderedParentType:s,isCalleeOfRenderedParent:i,preventASI:n}=fe){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:h,end:u}of xn(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&n&&En(e,h,l.start),1===r){const n=s||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:i&&l===a,renderedParentType:n,renderedSurroundingElement:n})}else l.render(e,t);else hn(l,e,h,u);o&&e.remove(o,this.end)}},SpreadElement:ti,StaticBlock:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){if(this.body.length>0){const s=pn(e.original.slice(this.start,this.end),"{")+1;yn(this.body,e,this.start+s,this.end-1,t)}else super.render(e,t)}},Super:class extends ei{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:io,SwitchStatement:class extends ei{createScope(e){this.parentScope=e,this.scope=new bn(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:s,ignore:i}=e,{breaks:n}=i;i.breaks=!0,e.hasBreak=!1;let r=!0;for(const s of this.cases){if(s.hasEffects(e))return!0;r&&(r=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),i.breaks=n,e.hasBreak=s,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:s,hasBreak:i}=e;e.hasBreak=!1;let n=!0,r=t||null!==this.defaultCase&&this.defaultCase=0;i--){const o=this.cases[i];if(o.included&&(r=!0),!r){const e=is();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),n&&(n=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=s):n=s}r&&null!==this.defaultCase&&(e.brokenFlow=n),e.hasBreak=i}initialise(){for(let e=0;e0&&yn(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends jn{bind(){if(super.bind(),this.tag.type===Ds){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.context.log(Se,Ot(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Y,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[s]=this.getReturnExpression();s.included||s.include(e,!1)}initialise(){this.args=[oe,...this.quasi.expressions],this.interaction={args:[this.tag instanceof zn&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}getReturnExpression(e=te){return null===this.returnExpression?(this.returnExpression=ae,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Y,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends ei{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:no,ThisExpression:class extends ei{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,s)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ao?this.context.moduleContext:null,"undefined"===this.alias&&this.context.log(Se,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:De("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends ei{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends ei{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const s=this.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:n}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)n.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Js:t),n.size>0&&(this.includedLabelsAfterBlock=[...n]),e.brokenFlow=i;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=i),this.finalizer?.include(e,t)}},UnaryExpression:class extends ei{getLiteralValueAtPath(e,t,s){if(e.length>0)return ie;const i=this.argument.getLiteralValueAtPath(Y,t,s);return"symbol"==typeof i?ie:lo[this.operator](i)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof ln)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Y,he,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Y),this.context.requestTreeshakingPass())}},UnknownNode:class extends ei{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends ei{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(oe)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n}}=t;if(this.argument.render(e,t),"system"===i){const i=this.argument.variable,r=s.get(i);if(r)if(this.prefix)1===r.length?Pn(i,this.start,this.end,e,t):Cn(i,this.start,this.end,this.parent.type!==Rs,e,t);else{const s=this.operator[0];!function(e,t,s,i,n,r,o){const{_:a}=r.snippets;n.prependRight(t,`${wn([e],r,o)},${a}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}(i,this.start,this.end,this.parent.type!==Rs,e,t,`${n}${s}${n}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Y),this.argument instanceof ln){this.scope.findVariable(this.argument.name).isReassigned=!0}this.context.requestTreeshakingPass()}},VariableDeclaration:co,VariableDeclarator:Br,WhileStatement:class extends ei{hasEffects(e){return!!this.test.hasEffects(e)||Jn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),er(e,this.body,t)}},YieldExpression:class extends ei{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},uo="_missingExportShim";class po extends de{constructor(e){super(uo),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class fo extends de{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(t.length>1||1===t.length&&2===e.type){const i=t[0];"string"==typeof i?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),s):le(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===K?"Module":ie}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const s of t)if("*"!==s[0]&&s!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(s);t&&(e[s]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(0===e.length)return!0;if(1===e.length&&2!==i)return 1===i;const n=e[0];if("string"!=typeof n)return!0;const r=this.getMemberVariables()[n];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,s)}include(){this.included=!0,this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([yr],e)}renderBlock(e){const{exportNamesByVariable:t,format:s,freeze:i,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}}=e,d=this.getMemberVariables(),p=Object.entries(d).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${e}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${yr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Mr(l)})`),i&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===s&&t.has(this)&&(f+=`${h}${wn([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references)if(e.context.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}fo.prototype.isNamespace=!0;class mo extends de{constructor(e,t,s){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=s}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof oo||e instanceof mo;){if(e instanceof oo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof mo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var go;function yo(e){return e.id}!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(go||(go={}));const xo=e=>{const t=e.key;return t&&(t.name||t.value)};function Eo(e,t){const s=Object.keys(e);return s.length!==Object.keys(t).length||s.some((s=>e[s]!==t[s]))}var bo="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},vo={memoryUsage:()=>({heapUsed:0})};let So=new Map;function Ao(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function ko(e,t=3){e=Ao(e,t);const s=vo.memoryUsage().heapUsed,i=bo.now(),n=So.get(e);void 0===n?So.set(e,{memory:0,startMemory:s,startTime:i,time:0,totalMemory:0}):(n.startMemory=s,n.startTime=i)}function Io(e,t=3){e=Ao(e,t);const s=So.get(e);if(void 0!==s){const e=vo.memoryUsage().heapUsed;s.memory+=e-s.startMemory,s.time+=bo.now()-s.startTime,s.totalMemory=Math.max(s.totalMemory,e)}}function wo(){const e={};for(const[t,{memory:s,time:i,totalMemory:n}]of So)e[t]=[i,s,n];return e}let Po=Ui,Co=Ui;const $o=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function No(e,t){for(const s of $o)if(s in e){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${s}`;const n=function(...e){Po(i,4);const t=r.apply(this,e);return Co(i,4),t};let r;"function"==typeof e[s].handler?(r=e[s].handler,e[s].handler=n):(r=e[s],e[s]=n)}return e}function _o(e){e.isExecuted=!0;const t=[e],s=new Set;for(const e of t)for(const i of[...e.dependencies,...e.implicitlyLoadedBefore])i instanceof Jt||i.isExecuted||!i.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(i)||s.has(i.id)||(i.isExecuted=!0,s.add(i.id),t.push(i))}const Ro={identifier:null,localName:uo};function Oo(e,t,s,i,n=new Map){const r=n.get(t);if(r){if(r.has(e))return i?[null]:Xe((o=t,a=e.id,{code:nt,exporter:a,message:`"${o}" cannot be exported from "${M(a)}" as it is a reexport that references itself.`}));r.add(e)}else n.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:s,isExportAllSearch:i,searchedNamesAndModules:n})}function Do(e,t){const s=j(t.sideEffectDependenciesByVariable,e,U);let i=e;const n=new Set([i]);for(;;){const e=i.module;if(i=i instanceof oo?i.getDirectOriginalVariable():i instanceof mo?i.syntheticNamespace:null,!i||n.has(i))break;n.add(i),s.add(e);const t=e.sideEffectDependenciesByVariable.get(i);if(t)for(const e of t)s.add(e)}return s}class To{constructor(e,t,s,i,n,r,o,a){this.graph=e,this.id=t,this.options=s,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new po(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:h,exportAllSources:u,exports:d,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAssertions:y}=this;this.info={assertions:a,ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return h.sort()},get exportedBindings(){const e={".":[...d.keys()]};for(const[t,{source:s}]of g)(e[s]??(e[s]=[])).push(t);for(const t of u)(e[t]??(e[t]=[])).push("*");return e},get exports(){return[...d.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},get hasModuleSideEffects(){return Qt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ye,!0,s),this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,yo).sort()},get implicitlyLoadedBefore(){return Array.from(f,yo).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==go.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const e=P(this.id),t=$(this.id);return ve(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),Xe(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof Jt)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,s=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&s.add(t)}for(let i of s){const s=this.sideEffectDependenciesByVariable.get(i);if(s)for(const e of s)t.add(e);i instanceof mo?i=i.getBaseVariable():i instanceof oo&&(i=i.getOriginalVariable()),e.add(i.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[s]=this.getVariableForExportName(t);if(s instanceof oo&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof pe))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof Jt)e.add(`*${t.id}`);else for(const s of[...t.getReexports(),...t.getExports()])"default"!==s&&e.add(s);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const s of this.exports.keys()){const[i]=this.getVariableForExportName(s);(i&&i.included?e:t).push(s)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Xe((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${M(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:n}=me){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=Oo(r.module,r.localName,t,!1,n);return e?(t&&(Lo(e,t,this),this.info.moduleSideEffects&&j(t.sideEffectDependenciesByVariable,e,U).add(this)),[e]):this.error(jt(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===Ro)return[this.exportShimVariable];const e=o.localName,s=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});return t&&(Lo(s,t,this),j(t.sideEffectDependenciesByVariable,s,U).add(this)),[s]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,n);if(this.namespaceReexportsByName.set(e,s),s[0])return s}return this.info.syntheticNamedExports?[j(this.syntheticExports,e,(()=>new mo(this.astContext,e,this.getSyntheticNamespace())))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=ss();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(_o(this),this.graph.needsTreeshakingPass=!0);for(const t of this.exports.keys())if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(X),e.included||this.includeVariable(e)}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(X),t.included||this.includeVariable(t),t instanceof pe&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(ss(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(_o(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(X),e.included||this.includeVariable(e)),this.exports.has(s)||this.reexportDescriptions.has(s)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const s=this.graph.modulesById.get(this.resolvedIds[t].id);s instanceof Jt?e.push(s):this.exportAllModules.push(s)}this.exportAllModules.push(...e)}log(e,t,s){this.addLocationToLogProps(t,s),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:s}=this.astContext;return s&&"es"!==e.format&&"system"!==e.format?Xe((i=this.id,n=e.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${n}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:s};var i,n}setSource({ast:e,code:t,customTransformCache:s,originalCode:i,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){Po("generate ast",3),this.info.code=t,this.originalCode=i,this.originalSourcemap=n,this.sourcemapChain=o,l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=s,this.updateOptions(c);const h=e??this.tryParse();Co("generate ast",3),Po("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new y(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>ho[e]||ho.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new ao(this.graph.scope,this.astContext),this.namespace=new fo(this.astContext),this.ast=new so(h,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=h:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),Co("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,yo),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:s,searchedNamesAndModules:i}=me){const n=this.scope.variables.get(e);if(n)return n;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof To&&"*"===r.name)return e.namespace;const[n]=Oo(e,r.name,t||this,s,i);return n||this.error(jt(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:s}){null!=t&&(this.info.moduleSideEffects=t),null!=s&&(this.info.syntheticNamedExports=s),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof no?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Mn&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof ir)this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof tr){const t=e.source.value;if(this.addSource(t,e),e.exported){const s=e.exported.name;this.reexportDescriptions.set(s,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Mn){const t=e.source.value;this.addSource(t,e);for(const{exported:s,local:i,start:n}of e.specifiers){const e=s instanceof Mn?s.value:s.name;this.reexportDescriptions.set(e,{localName:i instanceof Mn?i.value:i.name,module:null,source:t,start:n})}}else if(e.declaration){const t=e.declaration;if(t instanceof co)for(const e of t.declarations)for(const t of ts(e.id))this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:s}of e.specifiers){const e=t.name,i=s instanceof ln?s.name:s.value;this.exports.set(i,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const s of e.specifiers){const e=s instanceof hr?"default":s instanceof Ur?"*":s.imported instanceof ln?s.imported.name:s.imported.value;this.importDescriptions.set(s.local.name,{module:null,name:e,source:t,start:s.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let s=this.info.code;const i=Pe(s,t,{offsetLine:1});if(i){let{column:n,line:r}=i;try{({column:n,line:r}=function(e,t){const s=e.filter((e=>!!e.mappings));e:for(;s.length>0;){const e=s.pop().mappings[t.line-1];if(e){const s=e.filter((e=>e.length>1)),i=s[s.length-1];for(const e of s)if(e[0]>=t.column||e===i){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:n,line:r})),s=this.originalCode}catch(e){this.options.onLog(Se,function(e,t,s,i,n){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:s,file:t,line:i},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:n}}(e,this.id,n,r,t))}Qe(e,{column:n,line:r},s,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,s){const i=new Set,n=r=>{for(const o of r)i.has(o)||(i.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||s.has(o))&&(o instanceof Jt||o.hasEffects()?e.add(o):n(o.dependencies)))};n(this.dependencies),n(s)}addSource(e,t){const s=(i=t.assertions,i?.length?Object.fromEntries(i.map((e=>[xo(e),e.value.value]))):me);var i;const n=this.sourcesWithAssertions.get(e);n?Eo(n,s)&&this.log(Se,Vt(n,s,e,this.id),t.start):this.sourcesWithAssertions.set(e,s)}getVariableFromNamespaceReexports(e,t,s){let i=null;const n=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Oo(o,e,t,!0,Mo(s));o instanceof Jt||l?r.add(a):a instanceof mo?i||(i=a):a&&n.set(a,o)}if(n.size>0){const t=[...n],s=t[0][0];return 1===t.length?[s]:(this.options.onLog(Se,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${M(a)}" re-exports "${o}" from one of the modules ${Oe(l.map((e=>M(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],s=t[0];return t.length>1&&this.options.onLog(Se,function(e,t,s,i){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:i,message:`Ambiguous external namespace resolution: "${M(t)}" re-exports "${e}" from one of the external modules ${Oe(i.map((e=>M(e))))}, guessing "${M(s)}".`,reexporter:t}}(e,this.id,s.module.id,t.map((e=>e.module.id)))),[s,!0]}return i?[i]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const s of[this,...this.exportAllModules])if(s instanceof Jt){const[t]=s.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(s.info.syntheticNamedExports){const e=s.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof To){t.includedDynamicImporters.push(this);const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?t.includeExportsByNames(s):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof To&&t!==this&&Do(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof To&&(t.isExecuted||_o(t),t!==this)){const t=Do(e,this);for(const e of t)e.isExecuted||_o(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,s;this.options.onLog(Se,(t=this.id,{binding:s=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${s}" has been shimmed in module "${M(t)}".`})),this.exports.set(e,Ro)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){return this.error(function(e,t){let s=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?s+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(s+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:"PARSE_ERROR",id:t,message:s}}(e,this.id),e.pos)}}}function Lo(e,t,s){if(e.module instanceof To&&e.module!==s){const i=e.module.cycles;if(i.size>0){const n=s.cycles;for(const r of n)if(i.has(r)){t.alternativeReexportModules.set(e,s);break}}}}const Mo=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function Vo(e){return e.endsWith(".js")?e.slice(0,-3):e}function Bo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Vo(t)}`:e.id??""}function zo(e,t,s,i,n,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:h,getPropertyAccess:u,n:d,s:p}=n;if(!s)return`${d}${d}${a}${function(e,t,s,i,n){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:h}of t)if(h)return Fo(a,h[0].imported,l,o,e,c,s,r,i,n)}(e,t,i,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:n,isChunk:a,name:h,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&s)for(const t of g)if("*"!==t.reexported){const s=Fo(h,t.imported,p,a,e,m,i,n,o,u);if(f&&(f+=d),"*"!==t.imported&&t.needsLiveBinding){const[e,i]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}'${t.reexported}',${l}{${d}${r}enumerable:${l}true,${d}${r}get:${l}${e}${s}${i}${d}});`}else f+=`exports${u(t.reexported)}${l}=${l}${s};`}for(const{exported:t,local:s}of e){const e=`exports${u(t)}`;e!==s&&(f&&(f+=d),f+=`${e}${l}=${l}${s};`)}for(const{name:e,reexports:i}of t)if(i&&s)for(const t of i)if("*"===t.reexported){f&&(f+=d);const s=`{${d}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${Go(e,t.needsLiveBinding,r,n)}${p}${d}}`;f+=`Object.keys(${e}).forEach(${h(["k"],{isAsync:!1,name:null})}${s});`}return f?`${d}${d}${f}`:""}function Fo(e,t,s,i,n,r,o,a,l,c){if("default"===t){if(!i){const t=o(a),s=xr[t]?n:e;return Er(t,l)?`${s}${c("default")}`:s}return s?`${e}${c("default")}`:e}return"*"===t?(i?!s:br[o(a)])?r:e:`${e}${c(t)}`}function jo(e){return e([["value","true"]],{lineBreakIndent:null})}function Uo(e,t,s,{_:i,getObject:n}){if(e){if(t)return s?`Object.defineProperties(exports,${i}${n([["__esModule",jo(n)],[null,`[Symbol.toStringTag]:${i}${Mr(n)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${i}'__esModule',${i}${jo(n)});`;if(s)return`Object.defineProperty(exports,${i}Symbol.toStringTag,${i}${Mr(n)});`}return""}const Go=(e,t,s,{_:i,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${i}k,${i}{${r}${s}${s}enumerable:${i}true,${r}${s}${s}get:${i}${t}${e}[k]${o}${r}${s}})`}return`exports[k]${i}=${i}${e}[k]`};function Wo(e,t,s,i,n,r,o,a){const{_:l,cnst:c,n:h}=a,u=new Set,d=[],p=(e,t,s)=>{u.add(t),d.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${s});`)};for(const{defaultVariableName:s,imports:i,importPath:n,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...i||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,gr,o);break}}else{const e=t(n);let r=!1,a=!1;for(const{imported:t,reexported:n}of[...i||[],...c||[]]){let i,c;"default"===t?r||(r=!0,s!==l&&(c=s,i=xr[e])):"*"!==t||"*"===n||a||(a=!0,i=br[e],c=l),i&&p(c,i,o)}}return`${Sr(u,r,o,a,s,i,n)}${d.length>0?`${d.join(h)}${h}${h}`:""}`}function qo(e,t){return"."!==e[0]?e:t?(s=e).endsWith(".js")?s:s+".js":Vo(e);var s}const Ho=new Set([...s(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Ko(e,t){const s=t.map((({importPath:e})=>e)).filter((e=>Ho.has(e)||e.startsWith("node:")));0!==s.length&&e(Se,function(e){return{code:bt,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Oe(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(s))}const Yo=(e,t)=>e.split(".").map(t).join("");function Xo(e,t,s,i,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof s?s(o[0]):s[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${n}=${n}${l}${n}||${n}{}`))),`${l}${r(a)}`].join(`,${n}`)+`${n}=${n}${i}`;return o.length>0&&(c=`(${c})`),c}function Qo(e){let t=e.length;for(;t--;){const{imports:s,reexports:i}=e[t];if(s||i)return e.slice(0,t+1)}return[]}const Zo=({dependencies:e,exports:t})=>{const s=new Set(t.map((e=>e.exported)));s.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&s.add(e.reexported);return s},Jo=(e,t,{_:s,cnst:i,getObject:n,n:r})=>e?`${r}${t}${i} _starExcludes${s}=${s}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"",ea=(e,t,{_:s,n:i})=>e.length>0?`${i}${t}var ${e.join(`,${s}`)};`:"",ta=(e,t,s)=>sa(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,s);function sa(e,t,{_:s,n:i}){return 0===e.length?"":1===e.length?`exports('${e[0].name}',${s}${e[0].value});${i}${i}`:`exports({${i}`+e.map((({name:e,value:i})=>`${t}${e}:${s}${i}`)).join(`,${i}`)+`${i}});${i}${i}`}const ia=(e,t,s)=>sa(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,s),na=(e,t,s)=>sa(e.filter((e=>e.local===uo)).map((e=>({name:e.exported,value:uo}))),t,s);function ra(e,t,s){return e?`${t}${Yo(e,s)}`:"null"}var oa={amd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:h,namedExportsMode:u,log:d,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:x,interop:E,namespaceToStringTag:b,strict:v}){Ko(d,s);const S=s.map((e=>`'${qo(e.importPath,m.forceJsExtensionForImports)}'`)),A=s.map((e=>e.name)),{n:k,getNonArrowFunctionIntro:I,_:w}=f;u&&r&&(A.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(A.unshift("require"),S.unshift("'require'")),t.has("module")&&(A.unshift("module"),S.unshift("'module'"));const P=Bo(m,o),C=(P?`'${P}',${w}`:"")+(S.length>0?`[${S.join(`,${w}`)}],${w}`:""),$=v?`${w}'use strict';`:"";e.prepend(`${l}${Wo(s,E,y,x,b,t,a,f)}`);const N=zo(i,s,u,E,f,a,y);let _=Uo(u&&r,c&&(!0===g||"if-default-prop"===g&&n),h&&b,f);_&&(_=k+k+_),e.append(`${N}${_}${p}`).indent(a).prepend(`${m.define}(${C}(${I(A,{isAsync:!1,name:null})}{${$}${k}${k}`).append(`${k}${k}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:h,outro:u,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:x,strict:E}){const{_:b,n:v}=d,S=E?`'use strict';${v}${v}`:"";let A=Uo(h&&r,l&&(!0===f||"if-default-prop"===f&&n),c&&x,d);A&&(A+=v+v);const k=function(e,{_:t,cnst:s,n:i},n){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:h}of e)c||h?(r+=n&&o?",":`${r?`;${i}`:""}${s} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=n&&!o?",":`;${i}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${i}${i}`;return""}(s,d,p),I=Wo(s,y,m,g,x,t,o,d);e.prepend(`${S}${a}${A}${k}${I}`);const w=zo(i,s,h,y,d,o,m,`module.exports${b}=${b}`);e.append(`${w}${u}`)},es:function(e,{accessedGlobals:t,indent:s,intro:i,outro:n,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,namespaceToStringTag:h}){const{n:u}=a,d=function(e,{_:t}){const s=[];for(const{importPath:i,reexports:n,imports:r,name:o,assertions:a}of e){const e=`'${i}'${a?`${t}assert${t}${a}`:""};`;if(n||r){if(r){let i=null,n=null;const o=[];for(const e of r)"default"===e.imported?i=e:"*"===e.imported?n=e:o.push(e);n&&s.push(`import${t}*${t}as ${n.local} from${t}${e}`),i&&0===o.length?s.push(`import ${i.local} from${t}${e}`):o.length>0&&s.push(`import ${i?`${i.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(n){let i=null;const a=[],l=[];for(const e of n)"*"===e.reexported?i=e:"*"===e.imported?a.push(e):l.push(e);if(i&&s.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||s.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)s.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}l.length>0&&s.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else s.push(`import${t}${e}`)}return s}(r,a);d.length>0&&(i+=d.join(u)+u+u),(i+=Sr(null,t,s,a,l,c,h))&&e.prepend(i);const p=function(e,{_:t,cnst:s}){const i=[],n=[];for(const r of e)r.expression&&i.push(`${s} ${r.local}${t}=${t}${r.expression};`),n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`);n.length>0&&i.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`);return i}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),n&&e.append(n),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:h,snippets:u},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:x,name:E,namespaceToStringTag:b,strict:v}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:k,n:I}=u,w=E&&E.includes("."),P=!f&&!w;if(E&&P&&(be(C=E)||Ee.test(C)))return Xe(function(e){return{code:lt,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:De(ze)}}(E));var C;Ko(c,s);const $=Qo(s),N=$.map((e=>e.globalName||"null")),_=$.map((e=>e.name));r&&!E&&c(Se,{code:Et,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:De(He)}),l&&r&&(f?(N.unshift(`this${Yo(E,k)}${S}=${S}this${Yo(E,k)}${S}||${S}{}`),_.unshift("exports")):(N.unshift("{}"),_.unshift("exports")));const R=v?`${o}'use strict';${I}`:"",O=Wo(s,x,g,m,b,t,o,u);e.prepend(`${a}${O}`);let D=`(${A(_,{isAsync:!1,name:null})}{${I}${R}${I}`;r&&(!E||f&&l||(D=(P?`var ${E}`:`this${Yo(E,k)}`)+`${S}=${S}${D}`),w&&(D=function(e,t,s,{_:i,getPropertyAccess:n,s:r},o){const a=e.split(".");a[0]=("function"==typeof s?s(a[0]):s[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=n(e),`${l}${i}=${i}${l}${i}||${i}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,d)+D));let T=`${I}${I}})(${N.join(`,${S}`)});`;r&&!f&&l&&(T=`${I}${I}${o}return exports;${T}`);const L=zo(i,s,l,x,u,o,g);let M=Uo(l&&r,!0===p||"if-default-prop"===p&&n,b,u);M&&(M=I+I+M),e.append(`${L}${M}${h}`).indent(o).prepend(D).append(T)},system:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasExports:n,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:h,freeze:u,name:d,namespaceToStringTag:p,strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:x,n:E,s:b}=a,{importBindings:v,setters:S,starExcludes:A}=function(e,t,s,{_:i,cnst:n,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let h=null;for(const{imports:u,reexports:d}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${i}=${i}module;`):p.push(`${e.local}${i}=${i}module${o(e.imported)};`);if(d){const a=[];let l=!1;for(const{imported:e,reexported:t}of d)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l){const o=r(a,{lineBreakIndent:null});l?(h||(h=Zo({dependencies:e,exports:t})),p.push(`${n} setter${i}=${i}${o};`,`for${i}(${n} name in module)${i}{`,`${s}if${i}(!_starExcludes[name])${i}setter[name]${i}=${i}module[name];`,"}","exports(setter);")):p.push(`exports(${o});`)}else{const[e,t]=a[0];p.push(`exports('${e}',${i}${t});`)}}c.push(p.join(`${a}${s}${s}${s}`))}return{importBindings:l,setters:c,starExcludes:h}}(s,i,r,a),k=d?`'${d}',${g}`:"",I=t.has("module")?["exports","module"]:n?["exports"]:[];let w=`System.register(${k}[`+s.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${x(I,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Jo(A,r,a)+ea(v,r,a)+`${E}${r}return${g}{${S.length>0?`${E}${r}${r}setters:${g}[${S.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;w+=`${r}${r}execute:${g}(${x([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${b}${E}}));`;e.prepend(o+Sr(null,t,r,a,h,u,p)+ta(i,r,a)).append(`${l}${E}${E}`+ia(i,r,a)+na(i,r,a)).indent(`${r}${r}${r}`).append(P).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:h,outro:u,snippets:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:x,interop:E,name:b,namespaceToStringTag:v,globals:S,noConflict:A,strict:k}){const{_:I,cnst:w,getFunctionIntro:P,getNonArrowFunctionIntro:C,getPropertyAccess:$,n:N,s:_}=d,R=f?"f":"factory",O=f?"g":"global";if(r&&!b)return Xe({code:Et,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:De(He)});Ko(h,s);const D=s.map((e=>`'${qo(e.importPath,p.forceJsExtensionForImports)}'`)),T=s.map((e=>`require('${e.importPath}')`)),L=Qo(s),M=L.map((e=>ra(e.globalName,O,$))),V=L.map((e=>e.name));c&&(r||A)&&(D.unshift("'exports'"),T.unshift("exports"),M.unshift(Xo(b,O,S,(g?`${ra(b,O,$)}${I}||${I}`:"")+"{}",d)),V.unshift("exports"));const B=Bo(p,o),z=(B?`'${B}',${I}`:"")+(D.length>0?`[${D.join(`,${I}`)}],${I}`:""),F=p.define,j=!c&&r?`module.exports${I}=${I}`:"",U=k?`${I}'use strict';${N}`:"";let G;if(A){const e=f?"e":"exports";let t;if(!c&&r)t=`${w} ${e}${I}=${I}${Xo(b,O,S,`${R}(${M.join(`,${I}`)})`,d)};`;else{t=`${w} ${e}${I}=${I}${M.shift()};${N}${a}${a}${R}(${[e,...M].join(`,${I}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${N}${a}${a}${w} current${I}=${I}${function(e,t,{_:s,getPropertyAccess:i}){let n=t;return e.split(".").map((e=>n+=i(e))).join(`${s}&&${s}`)}(b,O,d)};${N}${a}${a}${t}${N}${a}${a}${e}.noConflict${I}=${I}${P([],{isAsync:!1,name:null})}{${I}${ra(b,O,$)}${I}=${I}current;${I}return ${e}${_}${I}};${N}${a}})()`}else G=`${R}(${M.join(`,${I}`)})`,!c&&r&&(G=Xo(b,O,S,G,d));const W=r||A&&c||M.length>0,q=[R];W&&q.unshift(O);const H=W?`this,${I}`:"",K=W?`(${O}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${O}${I}||${I}self,${I}`:"",Y=W?")":"",X=W?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${j}${R}(${T.join(`,${I}`)})${I}:${N}`:"",Q=`(${C(q,{isAsync:!1,name:null})}{${N}`+X+`${a}typeof ${F}${I}===${I}'function'${I}&&${I}${F}.amd${I}?${I}${F}(${z}${R})${I}:${N}`+`${a}${K}${G}${Y};${N}`+`})(${H}(${C(V,{isAsync:!1,name:null})}{${U}${N}`,Z=N+N+"}));";e.prepend(`${l}${Wo(s,E,y,x,v,t,a,d)}`);const J=zo(i,s,c,E,d,a,y);let ee=Uo(c&&r,!0===m||"if-default-prop"===m&&n,v,d);ee&&(ee=N+N+ee),e.append(`${J}${ee}${u}`).trim().indent(a).append(Z).prepend(Q)}};const aa=(e,t)=>t?`${e}\n${t}`:e,la=(e,t)=>t?`${e}\n\n${t}`:e;async function ca(e,t,s){try{let[i,n,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(s),[s],aa),t.hookReduceValue("footer",e.footer(s),[s],aa),t.hookReduceValue("intro",e.intro(s),[s],la),t.hookReduceValue("outro",e.outro(s),[s],la)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),i&&(i+="\n"),n&&(n="\n"+n),{banner:i,footer:n,intro:r,outro:o}}catch(e){return Xe((i=e.message,n=e.hook,r=e.plugin,{code:Ze,message:`Could not retrieve "${n}". Check configuration of plugin "${r}".\n\tError Message: ${i}`}))}var i,n,r}const ha={amd:pa,cjs:pa,es:da,iife:pa,system:da,umd:pa};function ua(e,t,s,i,n,r,o,a,l,c,h,u,d,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(i,n,u,d);!function(e,t,s){for(const i of t){for(const t of i.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof oo&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Li(t.name,e,t.forbiddenNames));if(s.has(i)){const t=i.namespace;t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}}}(i,f,p),ha[n](i,s,t,r,o,a,l,c,h);for(const e of f)e.scope.deconflict(n,u,d)}function da(e,t,s,i,n,r,o,a,l){for(const t of s.dependencies)(n||t instanceof F)&&(t.variableName=Li(t.suggestedVariableName,e,null));for(const s of t){const t=s.module,i=s.name;s.isNamespace&&(n||t instanceof Jt)?s.setRenderNames(null,(t instanceof Jt?a.get(t):o.get(t)).variableName):t instanceof Jt&&"default"===i?s.setRenderNames(null,Li([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,s.forbiddenNames)):s.setRenderNames(null,Li(i,e,s.forbiddenNames))}for(const t of l)t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}function pa(e,t,{deconflictedDefault:s,deconflictedNamespace:i,dependencies:n},r,o,a,l,c){for(const t of n)t.variableName=Li(t.suggestedVariableName,e,null);for(const t of i)t.namespaceVariableName=Li(`${t.suggestedVariableName}__namespace`,e,null);for(const t of s)t.defaultVariableName=i.has(t)&&vr(r(t.id),a)?t.namespaceVariableName:Li(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Jt){const s=c.get(t),i=e.name;if("default"===i){const i=r(t.id),n=xr[i]?s.defaultVariableName:s.variableName;Er(i,a)?e.setRenderNames(n,"default"):e.setRenderNames(null,n)}else"*"===i?e.setRenderNames(null,br[r(t.id)]?s.namespaceVariableName:s.variableName):e.setRenderNames(s.variableName,null)}else{const s=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===s.exportMode?s.namespaceVariableName:s.variableName):"default"===s.exportMode?e.setRenderNames(null,s.variableName):e.setRenderNames(s.variableName,s.getVariableExportName(e))}}}function fa(e,{exports:t,name:s,format:i},n,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Xe(zt("default",o,n))}else if("none"===t&&o.length>0)return Xe(zt("none",o,n));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==i&&"system"!==i&&o.includes("default")&&r(Se,function(e,t){return{code:St,id:e,message:`Entry module "${M(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:De(Be)}}(n,s)),t="named")),t}function ma(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return" ".repeat(n)}function ga(e,t,s,i,n,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Jt){t.push(r.get(e));continue}const o=n.get(e);o===i?s.has(e)||(s.add(e),ga(e,t,s,i,n,r)):t.push(o)}}const ya="!~{",xa="}~",Ea=new RegExp(`${ya}[0-9a-zA-Z_$]{1,59}${xa}`,"g"),ba=(e,t)=>e.replace(Ea,(e=>t.get(e)||e)),va=(e,t,s)=>e.replace(Ea,(e=>e===t?s:e)),Sa=(e,t)=>{const s=new Set,i=e.replace(Ea,(e=>t.has(e)?(s.add(e),`${ya}${"0".repeat(e.length-5)}${xa}`):e));return{containedPlaceholders:s,transformedCode:i}},Aa=Symbol("bundleKeys"),ka={type:"placeholder"};function Ia(e,t,s){return V(e)?Xe(Xt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,i,n)=>{if(!s.hasOwnProperty(i)||n&&"hash"!==i)return Xe(Xt(`"[${i}${n||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=s[i](n&&Number.parseInt(n.slice(1)));return V(r)?Xe(Xt(`Invalid substitution "${r}" for placeholder "[${i}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function wa(e,{[Aa]:t}){if(!t.has(e.toLowerCase()))return e;const s=$(e);e=e.slice(0,Math.max(0,e.length-s.length));let i,n=1;for(;t.has((i=e+ ++n+s).toLowerCase()););return i}const Pa=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Ca(e,t,s,i){const n="function"==typeof t?t(e.id):t[e.id];return n||(s?(i(Se,(r=e.id,o=e.variableName,{code:yt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:De(Ue)})),e.variableName):void 0);var r,o}class $a{constructor(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=s,this.unsetOptions=i,this.pluginDriver=n,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=h,this.getPlaceholder=u,this.bundle=d,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!s.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||s.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=ve(this.generateVariableName())}static generateFacade(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){const m=new $a([],e,t,s,i,n,r,o,a,l,null,u,d,p,f);m.assignFacadeName(h,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof To?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const s=e.getExportNamesByVariable();for(const e of this.exports)if(!s.has(e))return!1;for(const i of t)if(!(i.module===e||s.has(i)||i instanceof mo&&s.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,s){const i=this.getRenderedChunkInfo(),n=e=>ba(e,s),r=this.fileName=n(i.fileName);return{...i,code:e,dynamicImports:i.dynamicImports.map(n),fileName:r,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(n),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[n(e),t]))),imports:i.imports.map(n),map:t,referencedFiles:i.referencedFiles.map(n)}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[s,i]of t){this.exportNamesByVariable.set(s,[...i]);for(const e of i)this.exportsByName.set(e,s);e.delete(s)}}this.outputOptions.minifyInternalExports?function(e,t,s){let i=0;for(const n of e){let[e]=n.name;if(t.has(e))do{e=Ti(++i),49===e.charCodeAt(0)&&(i+=9*64**(e.length-1),e=Ti(i))}while(xe.has(e)||t.has(e));t.set(e,n),s.set(n,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,s){for(const i of e){let e=0,n=i.name;for(;t.has(n);)n=i.name+"$"+ ++e;t.set(n,i),s.set(i,[n])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=fa(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&s.add(t);for(const i of t){const t=Array.from(new Set(i.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&i.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(i.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===i.preserveSignature||"exports-only"===i.preserveSignature&&i.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(i,s)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),i,this.outputOptions.preserveModules))}for(const s of t)e.push($a.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,s,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,s)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=Na(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,s)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return T(z(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:s,entryFileNames:i,file:n,format:r,preserveModules:o}=this.outputOptions;if(n)e=P(n);else if(null===this.fileName){const[n,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=Ia("function"==typeof n?n(this.getPreRenderedChunkInfo()):n,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=wa(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=ka),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Da),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Da),importedBindings:Ra(this.getRenderedDependencies(),Da),imports:Array.from(this.dependencies,Da),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof fo?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,s,i){const n=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];ga(a,t,r,e,s,i),n.unshift(t)}}const o=new Set;for(const e of n)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:s,inputOptions:{onLog:i},outputOptions:n,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=n;if(l&&!c&&null!==s)for(const t of e)t instanceof $a&&this.inlineChunkDependencies(t);const h=this.getPreliminaryFileName(),{accessedGlobals:u,indent:d,magicString:p,renderedSource:f,usedModules:m,usesTopLevelAwait:g}=this.renderModules(h.fileName),y=[...this.getRenderedDependencies().values()],x="none"===t?[]:this.getChunkExportDeclarations(a);let E=x.length>0,b=!1;for(const e of y){const{reexports:t}=e;t?.length&&(E=!0,!b&&t.some((e=>"default"===e.reexported))&&(b=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!x.find((({exported:t})=>t===e))))))}if(!b)for(const{exported:e}of x)if("default"===e){b=!0;break}const{intro:v,outro:S,banner:A,footer:k}=await ca(n,r,this.getRenderedChunkInfo());return oa[a](f,{accessedGlobals:u,dependencies:y,exports:x,hasDefaultExport:b,hasExports:E,id:h.fileName,indent:d,intro:v,isEntryFacade:c||null!==s&&s.info.isEntry,isModuleFacade:null!==s,log:i,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:g},n),A&&p.prepend(A),k&&p.append(k),{chunk:this,magicString:p,preliminaryFileName:h,usedModules:m}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:s}=this;for(const i of e.implicitlyLoadedBefore){const e=t.get(i);e&&e!==this&&s.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},s,i){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(i?this.getPreserveModulesChunkNameFromModule(s):Na(s)))}checkCircularDependencyImport(e,t){const s=e.module;if(s instanceof To){const l=this.chunkByModule.get(s);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(Se,(i=s.getExportNamesByVariable().get(e)?.[0]||"*",n=s.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:n,id:o,message:`Export "${i}" of module "${M(n)}" was reexported through module "${M(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${M(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var i,n,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],s=e.getExportNamesByVariable();for(const i of s.keys()){const s=i instanceof mo,n=s?i.getBaseVariable():i;if(this.checkCircularDependencyImport(n,e),!(n instanceof fo&&this.outputOptions.preserveModules)){const e=n.module;if(e instanceof To){const i=this.chunkByModule.get(e);i&&i!==this&&(i.exports.add(n),t.push(n),s&&this.imports.add(n))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?Na(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const s of this.getExportNames()){if("*"===s[0])continue;const i=this.exportsByName.get(s);if(!(i instanceof mo)){const t=i.module;if(t){const i=this.chunkByModule.get(t);if(i!==this){if(!i||"es"!==e)continue;const t=this.renderedDependencies.get(i);if(!t)continue;const{imports:n,reexports:r}=t,o=r?.find((({reexported:e})=>e===s)),a=n?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let n=null,r=!1,o=i.getName(this.snippets.getPropertyAccess);if(i instanceof Pi){for(const e of i.declarations)if(e.parent instanceof sr||e instanceof ir&&e.declaration instanceof sr){r=!0;break}}else i instanceof mo&&(n=o,"es"===e&&(o=i.renderName));t.push({exported:s,expression:n,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,s){const i=new Set,n=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Jt){const a=this.externalChunkByModule.get(o);i.add(a),e&&("default"===t.name?xr[s(o.id)]&&n.add(a):"*"===t.name&&br[s(o.id)]&&r.add(a))}else{const s=this.chunkByModule.get(o);s!==this&&(i.add(s),e&&"default"===s.exportMode&&t.isNamespace&&r.add(s))}}if(t)for(const e of this.dependencies)i.add(e);return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof $a||e instanceof F)))}getDynamicImportStringAndAssertions(e,t){if(e instanceof Jt){const s=this.externalChunkByModule.get(e);return[`'${s.getImportPath(t)}'`,s.getImportAssertions(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?L(this.fileName):L(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const s of this.imports){const i=s.module;let n,r;if(i instanceof Jt){if(n=this.externalChunkByModule.get(i),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(i.id))return Xe(Ht(i.id,r,!1))}else n=this.chunkByModule.get(i),r=n.getVariableExportName(s);j(t,n,G).push({imported:r,local:s.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:s,resolution:i}of t.dynamicImports)s.included&&e.push(i instanceof To?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:s,resolution:i}:i instanceof Jt?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:s,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:i});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:s,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:i.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=_a(e);if(t)return t;const{preserveModulesRoot:s,sanitizeFileName:i}=this.outputOptions,n=i(w(e.id.split(Oa,1)[0])),r=$(n),o=Pa.has(r)?n.slice(0,-r.length):n;return k(o)?s&&_(o).startsWith(s)?o.slice(s.length).replace(/^[/\\]/,""):N(this.inputBase,o):`_virtual/${P(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,s=new Map;for(let i of this.getExportNames()){let n,r,o=!1;if("*"===i[0]){const s=i.slice(1);"defaultOnly"===t(s)&&this.inputOptions.onLog(Se,Kt(s)),o=e,n=this.externalChunkByModule.get(this.modulesById.get(s)),r=i="*"}else{const s=this.exportsByName.get(i);if(s instanceof mo)continue;const a=s.module;if(a instanceof To){if(n=this.chunkByModule.get(a),n===this)continue;r=n.getVariableExportName(s),o=s.isReassigned}else{if(n=this.externalChunkByModule.get(a),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Xe(Ht(a.id,r,!0));o=e&&("default"!==r||Er(t(a.id),!0))}}j(s,n,G).push({imported:r,needsLiveBinding:o,reexported:i})}return s}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const s of t.importMetas){const t=s.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),s=new Map,i=this.getFileName();for(const n of this.dependencies){const r=e.get(n)||null,o=t.get(n)||null,a=n instanceof F||"default"!==n.exportMode,l=n.getImportPath(i);s.set(n,{assertions:n instanceof F?n.getImportAssertions(this.snippets):null,defaultVariableName:n.defaultVariableName,globalName:n instanceof F&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Ca(n,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:n instanceof $a,name:n.variableName,namedExportsMode:a,namespaceVariableName:n.namespaceVariableName,reexports:o})}return this.renderedDependencies=s}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof $a&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:s,exportNamesByVariable:i,includedNamespaces:n,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:u,renderedModules:m,snippets:g}=this,{compact:E,dynamicImportFunction:b,format:v,freeze:S,namespaceToStringTag:A}=l,{_:k,cnst:I,n:w}=g;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof y)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!d(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{x.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(x.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new y(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let s;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const i=new f(e.hires);return this.intro&&i.advance(this.intro),this.sources.forEach(((e,n)=>{n>0&&i.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=p(o.original);o.intro&&i.advance(o.intro),o.firstChunk.eachNext((s=>{const n=a(s.start);s.intro.length&&i.advance(s.intro),e.filename?s.edited?i.addEdit(r,s.content,n,s.storeName?t.indexOf(s.original):-1):i.addUneditedChunk(r,s,o.original,n,o.sourcemapLocations):i.advance(s.content),s.outro.length&&i.advance(s.outro)})),o.outro&&i.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===s&&(s=[]),s.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?h(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw,x_google_ignoreList:s}}generateMap(e){return new c(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const s=t.content._getRawIndentString();null!==s&&(e[s]||(e[s]=0),e[s]+=1)})),Object.keys(e).sort(((t,s)=>e[t]-e[s]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((s,i)=>{const n=void 0!==s.separator?s.separator:this.separator,r=t||i>0&&/\r?\n$/.test(n);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:r}),t="\n"===s.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,s)=>s>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const s=void 0!==e.separator?e.separator:this.separator;return(t>0?s:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e=>!e.content.isEmpty())))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,s=0;do{if(t=this.sources[s++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let s,i=this.sources.length-1;do{if(s=this.sources[i--],!s){this.intro=this.intro.replace(t,"");break}}while(!s.content.trimEndAborted(e));return this}}({separator:`${w}${w}`}),C=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=ma(t.originalCode);if(null!==e)return e}return"\t"}(a,l),$=[];let N="";const _=new Set,R=new Map,O={dynamicImportFunction:b,exportNamesByVariable:i,format:v,freeze:S,indent:C,namespaceToStringTag:A,pluginDriver:u,snippets:g,useOriginalName:null};let D=!1;for(const e of a){let s,i=0;if(e.isIncluded()||n.has(e)){const r=e.render(O);({source:s}=r),D||(D=r.usesTopLevelAwait),i=s.length(),i&&(E&&s.lastLine().includes("//")&&s.append("\n"),R.set(e,s),P.addSource(s),$.push(e));const o=e.namespace;if(n.has(e)){const e=o.renderBlock(O);o.renderFirst()?N+=w+e:P.addSource(new y(e))}const a=t.get(e.scope);if(a)for(const e of a)_.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();m[e.id]={get code(){return s?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:i}}N&&P.prepend(N+w+w),this.needsExportsShim&&P.prepend(`${w}${I} ${uo}${k}=${k}void 0;${w}${w}`);const T=E?P:P.trim();var L;return o&&0===this.getExportNames().length&&0===s.size&&r(Se,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${L=this.getChunkName()}".`,names:[L]}),{accessedGlobals:_,indent:C,magicString:P,renderedSource:T,usedModules:$,usesTopLevelAwait:D}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:s,pluginDriver:i,snippets:n}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,s,n,i,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAssertions(a,e);o.setExternalResolution("external",a,s,n,i,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,interop:t,namespaceToStringTag:s,preserveModules:i,externalLiveBindings:n}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const s=this.exportsByName.get(t);"es"!==e&&"system"!==e&&s.isReassigned&&!s.isId?s.setRenderNames("exports",t):s instanceof mo?r.add(s):s.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(uo),s&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Lr)o.add(e)}ua(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,t),this.imports,o,e,t,i,n,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:s,orderedModules:i,outputOptions:{format:n}}=this;for(const r of i){for(const s of r.importMetas)s.setResolution(n,t,e);s.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const s=e.namespace.getMemberVariables();for(const e of Object.values(s))e.included&&t.add(e)}for(let s of t){s instanceof oo&&(s=s.getOriginalVariable()),s instanceof mo&&(s=s.getBaseVariable());const t=this.chunkByModule.get(s.module);t!==this&&(this.imports.add(s),s.module instanceof To&&(this.checkCircularDependencyImport(s,e),s instanceof fo&&this.outputOptions.preserveModules||t.exports.add(s)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:s}of e.dynamicImports)t.included&&s instanceof To&&this.chunkByModule.get(s)===this&&!this.includedNamespaces.has(s)&&(this.includedNamespaces.add(s),this.ensureReexportsAreAvailableForModule(s))}}function Na(e){return _a(e)??L(e.id)}function _a(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function Ra(e,t){const s={};for(const[i,n]of e){const e=new Set;if(n.imports)for(const{imported:t}of n.imports)e.add(t);if(n.reexports)for(const{imported:t}of n.reexports)e.add(t);s[t(i)]=[...e]}return s}const Oa=/[#?]/,Da=e=>e.getFileName();function*Ta(e){for(const t of e)yield*t}function La(e,t,s,i){const{chunkDefinitions:n,modulesInManualChunks:r}=function(e){const t=[],s=new Set(e.keys()),i=Object.create(null);for(const[t,n]of e)Ma(t,i[n]||(i[n]=[]),s);for(const[e,s]of Object.entries(i))t.push({alias:e,modules:s});return{chunkDefinitions:t,modulesInManualChunks:s}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,s=new Map,i=[],n=new Set(e);let r=0;for(const e of n){const o=new Set;i.push(o);const a=new Set([e]);for(const e of a){j(s,e,U).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof Jt||a.add(t);for(const{resolution:s}of e.dynamicImports)s instanceof To&&s.includedDynamicImporters.length>0&&!n.has(s)&&(t.add(s),n.add(s),o.add(s));for(const s of e.implicitlyLoadedBefore)n.has(s)||(t.add(s),n.add(s))}r++}const o=[...n],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,s){const i=new Map,n=new Set;for(const[s,r]of e.entries())i.set(r,s),t.has(r)&&n.add(s);const r=[];for(const e of s){const t=new Set;for(const s of e)t.add(i.get(s));r.push(t)}return{dynamicEntries:n,dynamicImportsByEntry:r}}(o,t,i);return{allEntries:o,dependentEntriesByModule:s,dynamicallyDependentEntriesByDynamicEntry:Va(s,a,o),dynamicImportsByEntry:l}}(e),h=Ba(function*(e,t){for(const[s,i]of e)t.has(s)||(yield{dependentEntries:i,modules:[s]})}(a,r));return function(e,t,s,i){const n=i.map((()=>0n)),r=i.map(((e,s)=>t.has(s)?-1n:0n));let o=1n;for(const{dependentEntries:t}of e){for(const e of t)n[e]|=o;o<<=1n}const a=t;for(const[e,t]of a){a.delete(e);const i=r[e];let o=i;for(const e of t)o&=n[e]|r[e];if(o!==i){r[e]=o;for(const t of s[e])j(a,t,U).add(e)}}o=1n;for(const{dependentEntries:t}of e){for(const e of t)(r[e]&o)===o&&t.delete(e);o<<=1n}}(h,l,c,o),n.push(...function(e,t,s,i){Po("optimize chunks",3);const n=function(e,t,s){const i=[],n=[],r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:t,modules:c}of e){const e={containedAtoms:l,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:t,modules:c,pure:!0,size:0};let h=0,u=!0;for(const t of c)r.set(t,e),t.isIncluded()&&(u&&(u=!t.hasEffects()),h+=s>1?t.estimateSize():1);e.pure=u,e.size=h,o.push(h),u||(a|=l),(h{const e=i;return i<<=1n,r|=e,e})));else{const i=t.get(a);i&&i!==e&&(s.add(i),i.dependentChunks.add(e))}const{containedAtoms:c}=e;for(const e of a)o[e]|=c}}for(const t of e)for(const e of t){const{dependentEntries:t}=e;e.correlatedAtoms=-1n;for(const s of t)e.correlatedAtoms&=o[s]}return r}([n,i],r,t,l),{big:new Set(n),sideEffectAtoms:a,sizeByAtom:o,small:new Set(i)}}(e,t,s);if(!n)return Co("optimize chunks",3),e;return s>1&&i("info",Gt(e.length,n.small.size,"Initially")),function(e,t){const{small:s}=e;for(const i of s){const n=za(i,e,t<=1?1:1/0);if(n){const{containedAtoms:r,correlatedAtoms:o,modules:a,pure:l,size:c}=i;s.delete(i),Fa(n,t,e).delete(n),n.modules.push(...a),n.size+=c,n.pure&&(n.pure=l);const{dependencies:h,dependentChunks:u,dependentEntries:d}=n;n.correlatedAtoms&=o,n.containedAtoms|=r;for(const e of i.dependentEntries)d.add(e);for(const e of i.dependencies)h.add(e),e.dependentChunks.delete(i),e.dependentChunks.add(n);for(const e of i.dependentChunks)u.add(e),e.dependencies.delete(i),e.dependencies.add(n);h.delete(n),u.delete(n),Fa(n,t,e).add(n)}}}(n,s),s>1&&i("info",Gt(n.small.size+n.big.size,n.small.size,"After merging chunks")),Co("optimize chunks",3),[...n.small,...n.big]}(Ba(h),o.length,s,i).map((({modules:e})=>({alias:null,modules:e})))),n}function Ma(e,t,s){const i=new Set([e]);for(const e of i){s.add(e),t.push(e);for(const t of e.dependencies)t instanceof Jt||s.has(t)||i.add(t)}}function Va(e,t,s){const i=new Map;for(const n of t){const t=j(i,n,U),r=s[n];for(const s of Ta([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const i of e.get(s))t.add(i)}return i}function Ba(e){var t;const s=Object.create(null);for(const{dependentEntries:i,modules:n}of e){let e=0n;for(const t of i)e|=1n<=t)return 1/0;return i}(o&~r,s,n)}const Wa=(e,t)=>e.execIndex>t.execIndex?1:-1;function qa(e,t,s){const i=Symbol(e.id),n=[e.id];let r=t;for(e.cycles.add(i);r!==e;)r.cycles.add(i),n.push(r.id),r=s.get(r);return n.push(n[0]),n.reverse(),n}const Ha=(e,t)=>t?`(${e})`:e,Ka=/^(?!\d)[\w$]+$/;class Ya{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,s){return{column:t,line:e,name:s,source:this}}}class Xa{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,s=[],i=[],n=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:h,source:{content:u,filename:d}}=l;let p=t.get(d);if(void 0===p)p=e.length,e.push(d),t.set(d,p),s[p]=u;else if(null==s[p])s[p]=u;else if(null!=u&&s[p]!==u)return Xe(qt(d));const f=[r[0],p,c,o];if(h){let e=n.get(h);void 0===e&&(e=i.length,i.push(h),n.set(h,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:i,sources:e,sourcesContent:s}}traceSegment(e,t,s){const i=this.mappings[e];if(!i)return null;let n=0,r=i.length-1;for(;n<=r;){const e=n+r>>1,o=i[e];if(o[0]===t||n===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:s):null}o[0]>t?r=e-1:n=e+1}return null}}function Qa(e){return function(t,s){return s.mappings?new Xa(s,[t]):(e(Se,(i=s.plugin,{code:wt,message:`Sourcemap is likely to be incorrect: a plugin (${i}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:i,url:De(Le)})),new Xa({mappings:[],names:[]},[t]));var i}}function Za(e,t,s,i,n){let r;if(s){const t=s.sources,i=s.sourcesContent||[],n=C(e)||".",o=s.sourceRoot||".",a=t.map(((e,t)=>new Ya(_(n,o,e),i[t])));r=new Xa(s,a)}else r=new Ya(e,t);return i.reduce(n,r)}var Ja={},el=tl;function tl(e,t){if(!e)throw new Error(t||"Assertion failed")}tl.equal=function(e,t,s){if(e!=t)throw new Error(s||"Assertion failed: "+e+" != "+t)};var sl={exports:{}};"function"==typeof Object.create?sl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:sl.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var il=sl.exports,nl=el,rl=il;function ol(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function al(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function ll(e){return 1===e.length?"0"+e:e}function cl(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Ja.inherits=rl,Ja.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var s=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,s[i++]=63&r|128):ol(e,n)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n)),s[i++]=r>>18|240,s[i++]=r>>12&63|128,s[i++]=r>>6&63|128,s[i++]=63&r|128):(s[i++]=r>>12|224,s[i++]=r>>6&63|128,s[i++]=63&r|128)}else for(n=0;n>>0}return r},Ja.split32=function(e,t){for(var s=new Array(4*e.length),i=0,n=0;i>>24,s[n+1]=r>>>16&255,s[n+2]=r>>>8&255,s[n+3]=255&r):(s[n+3]=r>>>24,s[n+2]=r>>>16&255,s[n+1]=r>>>8&255,s[n]=255&r)}return s},Ja.rotr32=function(e,t){return e>>>t|e<<32-t},Ja.rotl32=function(e,t){return e<>>32-t},Ja.sum32=function(e,t){return e+t>>>0},Ja.sum32_3=function(e,t,s){return e+t+s>>>0},Ja.sum32_4=function(e,t,s,i){return e+t+s+i>>>0},Ja.sum32_5=function(e,t,s,i,n){return e+t+s+i+n>>>0},Ja.sum64=function(e,t,s,i){var n=e[t],r=i+e[t+1]>>>0,o=(r>>0,e[t+1]=r},Ja.sum64_hi=function(e,t,s,i){return(t+i>>>0>>0},Ja.sum64_lo=function(e,t,s,i){return t+i>>>0},Ja.sum64_4_hi=function(e,t,s,i,n,r,o,a){var l=0,c=t;return l+=(c=c+i>>>0)>>0)>>0)>>0},Ja.sum64_4_lo=function(e,t,s,i,n,r,o,a){return t+i+r+a>>>0},Ja.sum64_5_hi=function(e,t,s,i,n,r,o,a,l,c){var h=0,u=t;return h+=(u=u+i>>>0)>>0)>>0)>>0)>>0},Ja.sum64_5_lo=function(e,t,s,i,n,r,o,a,l,c){return t+i+r+a+c>>>0},Ja.rotr64_hi=function(e,t,s){return(t<<32-s|e>>>s)>>>0},Ja.rotr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0},Ja.shr64_hi=function(e,t,s){return e>>>s},Ja.shr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0};var hl={},ul=Ja,dl=el;function pl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}hl.BlockHash=pl,pl.prototype.update=function(e,t){if(e=ul.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var s=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-s,e.length),0===this.pending.length&&(this.pending=null),e=ul.join32(e,0,e.length-s,this.endian);for(var i=0;i>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,r=8;r>>3},fl.g1_256=function(e){return ml(e,17)^ml(e,19)^e>>>10};var El=Ja,bl=hl,vl=fl,Sl=el,Al=El.sum32,kl=El.sum32_4,Il=El.sum32_5,wl=vl.ch32,Pl=vl.maj32,Cl=vl.s0_256,$l=vl.s1_256,Nl=vl.g0_256,_l=vl.g1_256,Rl=bl.BlockHash,Ol=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Dl(){if(!(this instanceof Dl))return new Dl;Rl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ol,this.W=new Array(64)}El.inherits(Dl,Rl);var Tl=Dl;Dl.blockSize=512,Dl.outSize=256,Dl.hmacStrength=192,Dl.padLength=64,Dl.prototype._update=function(e,t){for(var s=this.W,i=0;i<16;i++)s[i]=e[t+i];for(;iLl();function Vl(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),""===e.mappings)return{mappings:[],names:[],sources:[],version:3};const t="string"==typeof e.mappings?n.decode(e.mappings):e.mappings;return{...e,mappings:t}}async function Bl(e,t,s,i,n){Po("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));Co("render chunks",2),Po("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{nonHashedChunksWithPlaceholders:a,renderedChunksByPlaceholder:l,hashDependenciesByPlaceholder:c}=await async function(e,t,s,i,n){const r=[],o=new Map,a=new Map,l=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&l.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:c,hashPlaceholder:h},magicString:u,usedModules:d})=>{const p={chunk:e,fileName:c,...await zl(u,c,d,t,s,i,n)},{code:f}=p;if(h){const{containedPlaceholders:t,transformedCode:s}=Sa(f,l),n=Ml().update(s),r=i.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&n.update(r),o.set(h,p),a.set(h,{containedPlaceholders:t,contentHash:n.digest("hex")})}else r.push(p)}))),{hashDependenciesByPlaceholder:a,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,i,s,n),h=function(e,t,s){const i=new Map;for(const[n,{fileName:r}]of e){let e=Ml();const o=new Set([n]);for(const s of o){const{containedPlaceholders:i,contentHash:n}=t.get(s);e.update(n);for(const e of i)o.add(e)}let a,l;do{l&&(e=Ml().update(l)),l=e.digest("hex").slice(0,n.length),a=va(r,n,l)}while(s[Aa].has(a.toLowerCase()));s[a]=ka,i.set(n,l)}return i}(l,c,t);!function(e,t,s,i,n,r){for(const{chunk:i,code:o,fileName:a,map:l}of e.values()){let e=ba(o,t);const c=ba(a,t);l&&(l.file=ba(l.file,t),e+=Fl(c,l,n,r)),s[c]=i.finalizeChunk(e,l,t)}for(const{chunk:e,code:o,fileName:a,map:l}of i){let i=t.size>0?ba(o,t):o;l&&(i+=Fl(a,l,n,r)),s[a]=e.finalizeChunk(i,l,t)}}(l,h,t,a,s,i),Co("transform chunks",2)}async function zl(e,t,s,i,n,r,o){let a=null;const l=[];let h=await r.hookReduceArg0("renderChunk",[e.toString(),i[t],n,{chunks:i}],((e,t,s)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Vl(t.map);l.push(e||{missing:!0,plugin:s.name})}return t.code}));const{compact:u,dir:d,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:x}=n;if(u||"\n"===h[h.length-1]||(h+="\n"),f){let i;Po("sourcemaps",3),i=p?_(g||p):d?_(d,t):_(t);a=function(e,t,s,i,n,r){const o=Qa(r),a=s.filter((e=>!e.excludeFromSourcemap)).map((e=>Za(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new Xa(t,a),h=i.reduce(o,l);let{sources:u,sourcesContent:d,names:p,mappings:f}=h.traceMappings();if(e){const t=C(e);u=u.map((e=>N(t,e))),e=P(e)}return d=n?null:d,new c({file:e,mappings:f,names:p,sources:u,sourcesContent:d})}(i,e.generateDecodedMap({}),s,l,m,o);for(let e=0;e{const t=new Set;return new Proxy(e,{deleteProperty:(e,s)=>("string"==typeof s&&t.delete(s.toLowerCase()),Reflect.deleteProperty(e,s)),get:(e,s)=>s===Aa?t:Reflect.get(e,s),set:(e,s,i)=>("string"==typeof s&&t.add(s.toLowerCase()),Reflect.set(e,s,i))})})(t);this.pluginDriver.setOutputBundle(s,this.outputOptions);try{Po("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Co("initialize render",2),Po("generate chunks",2);const e=(()=>{let e=0;return(t,s=8)=>{if(s>64)return Xe(Xt(`Hashes cannot be longer than 64 characters, received ${s}. Check the "${t}" option.`));const i=`${ya}${Ti(++e).padStart(s-5,"0")}${xa}`;return i.length>s?Xe(Xt(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${i.length}, received ${s}. Check the "${t}" option.`)):i}})(),t=await this.generateChunks(s,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Xe(Ft("output.format",Fe,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Xe(Ft("output.file",Ve,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return Xe(Ft("output.sourcemapFile",Ke,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Se,Ft("output.amd.id",Me,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();Co("generate chunks",2),await Bl(t,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,s=Object.values(e);for(const e of s)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of s)if("chunk"===e.type)for(const s of e.referencedFiles)t.has(s)&&t.delete(s);for(const s of t)delete e[s]})(s),Po("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,s,e]),this.finaliseAssets(s),Co("generate bundle",2),Co("GENERATE",1),t}async addManualChunks(e){const t=new Map,s=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:i}of s)for(const s of i)Ul(e,s,t);return t}assignManualChunks(e){const t=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values()){const n=e(i.id,s);if("string"==typeof n){if(!(i instanceof To))return Xe(Yt(i.id));t.push([n,i])}}t.sort((([e],[t])=>e>t?1:e`${t?"async ":""}function${s?` ${s}`:""}${r}(${e.join(`,${r}`)})${r}`,h=t?(e,{isAsync:t,name:s})=>{const i=1===e.length;return`${s?`${l} ${s}${r}=${r}`:""}${t?`async${i?" ":r}`:""}${i?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:s,lineBreakIndent:i,name:n})=>[`${h(e,{isAsync:!1,name:n})}${t?i?`${o}${i.base}${i.t}`:"":`{${i?`${o}${i.base}${i.t}`:r}${s?"return ":""}`}`,t?`${n?";":""}${i?`${o}${i.base}`:""}`:`${a}${i?`${o}${i.base}`:r}}`],d=n?e=>Ka.test(e):e=>!xe.has(e)&&Ka.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,s,{needsArrowReturnParens:i,needsWrappedFunction:n})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Ha(`${r}${Ha(s,t&&i)}${o}`,t||n)}(`},getFunctionIntro:h,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const s=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${s}${t}`;const n=!d(e);return e===t&&i&&!n?s+e:`${s}${n?`'${e}'`:e}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>d(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const s of e.values())s instanceof To&&(s.isIncluded()||s.info.isEntry||s.includedDynamicImporters.length>0)&&t.push(s);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return C(e[0]);const t=e.slice(1).reduce(((e,t)=>{const s=t.split(/\/+|\\+/);let i;for(i=0;e[i]===s[i]&&i1?t.join("/"):"/"}(function(e,t){const s=[];for(const i of e)(i.info.isEntry||t)&&k(i.id)&&s.push(i.id);return s}(l,r)),h=function(e,t,s){const i=new Map;for(const n of e.values())n instanceof Jt&&i.set(n,new F(n,t,s));return i}(this.graph.modulesById,this.outputOptions,c),u=[],d=new Map;for(const{alias:n,modules:p}of i?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):La(this.graph.entryModules,o,s,this.inputOptions.onLog)){p.sort(Wa);const s=new $a(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,d,h,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);u.push(s)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function Ul(e,t,s){const i=s.get(t);if("string"==typeof i&&i!==e)return Xe((n=t.id,r=e,o=i,{code:ct,message:`Cannot assign "${M(n)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var n,r,o;s.set(t,e)}var Gl=[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,81,2,71,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,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Wl=[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,20,1,64,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,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,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,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,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],ql="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Hl={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"},Kl="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",Yl={5:Kl,"5module":Kl+" export import",6:Kl+" const class extends export import super"},Xl=/^in(stanceof)?$/,Ql=new RegExp("["+ql+"]"),Zl=new RegExp("["+ql+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Jl(e,t){for(var s=65536,i=0;ie)return!1;if((s+=t[i+1])>=e)return!0}return!1}function ec(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ql.test(String.fromCharCode(e)):!1!==t&&Jl(e,Wl)))}function tc(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Zl.test(String.fromCharCode(e)):!1!==t&&(Jl(e,Wl)||Jl(e,Gl)))))}var sc=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function ic(e,t){return new sc(e,{beforeExpr:!0,binop:t})}var nc={beforeExpr:!0},rc={startsExpr:!0},oc={};function ac(e,t){return void 0===t&&(t={}),t.keyword=e,oc[e]=new sc(e,t)}var lc={num:new sc("num",rc),regexp:new sc("regexp",rc),string:new sc("string",rc),name:new sc("name",rc),privateId:new sc("privateId",rc),eof:new sc("eof"),bracketL:new sc("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new sc("]"),braceL:new sc("{",{beforeExpr:!0,startsExpr:!0}),braceR:new sc("}"),parenL:new sc("(",{beforeExpr:!0,startsExpr:!0}),parenR:new sc(")"),comma:new sc(",",nc),semi:new sc(";",nc),colon:new sc(":",nc),dot:new sc("."),question:new sc("?",nc),questionDot:new sc("?."),arrow:new sc("=>",nc),template:new sc("template"),invalidTemplate:new sc("invalidTemplate"),ellipsis:new sc("...",nc),backQuote:new sc("`",rc),dollarBraceL:new sc("${",{beforeExpr:!0,startsExpr:!0}),eq:new sc("=",{beforeExpr:!0,isAssign:!0}),assign:new sc("_=",{beforeExpr:!0,isAssign:!0}),incDec:new sc("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new sc("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ic("||",1),logicalAND:ic("&&",2),bitwiseOR:ic("|",3),bitwiseXOR:ic("^",4),bitwiseAND:ic("&",5),equality:ic("==/!=/===/!==",6),relational:ic("/<=/>=",7),bitShift:ic("<>/>>>",8),plusMin:new sc("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ic("%",10),star:ic("*",10),slash:ic("/",10),starstar:new sc("**",{beforeExpr:!0}),coalesce:ic("??",1),_break:ac("break"),_case:ac("case",nc),_catch:ac("catch"),_continue:ac("continue"),_debugger:ac("debugger"),_default:ac("default",nc),_do:ac("do",{isLoop:!0,beforeExpr:!0}),_else:ac("else",nc),_finally:ac("finally"),_for:ac("for",{isLoop:!0}),_function:ac("function",rc),_if:ac("if"),_return:ac("return",nc),_switch:ac("switch"),_throw:ac("throw",nc),_try:ac("try"),_var:ac("var"),_const:ac("const"),_while:ac("while",{isLoop:!0}),_with:ac("with"),_new:ac("new",{beforeExpr:!0,startsExpr:!0}),_this:ac("this",rc),_super:ac("super",rc),_class:ac("class",rc),_extends:ac("extends",nc),_export:ac("export"),_import:ac("import",rc),_null:ac("null",rc),_true:ac("true",rc),_false:ac("false",rc),_in:ac("in",{beforeExpr:!0,binop:7}),_instanceof:ac("instanceof",{beforeExpr:!0,binop:7}),_typeof:ac("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ac("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ac("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},cc=/\r\n?|\n|\u2028|\u2029/,hc=new RegExp(cc.source,"g");function uc(e){return 10===e||13===e||8232===e||8233===e}function dc(e,t,s){void 0===s&&(s=e.length);for(var i=t;i>10),56320+(1023&e)))}var Sc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ac=function(e,t){this.line=e,this.column=t};Ac.prototype.offset=function(e){return new Ac(this.line,this.column+e)};var kc=function(e,t,s){this.start=t,this.end=s,null!==e.sourceFile&&(this.source=e.sourceFile)};function Ic(e,t){for(var s=1,i=0;;){var n=dc(e,i,t);if(n<0)return new Ac(s,t-i);++s,i=n}}var wc={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},Pc=!1;function Cc(e){var t={};for(var s in wc)t[s]=e&&xc(e,s)?e[s]:wc[s];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Pc&&"object"==typeof console&&console.warn&&(Pc=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),Ec(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return Ec(t.onComment)&&(t.onComment=function(e,t){return function(s,i,n,r,o,a){var l={type:s?"Block":"Line",value:i,start:n,end:r};e.locations&&(l.loc=new kc(this,o,a)),e.ranges&&(l.range=[n,r]),t.push(l)}}(t,t.onComment)),t}var $c=256;function Nc(e,t){return 2|(e?4:0)|(t?8:0)}var _c=function(e,t,s){this.options=e=Cc(e),this.sourceFile=e.sourceFile,this.keywords=bc(Yl[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=Hl[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=bc(i);var n=(i?i+" ":"")+Hl.strict;this.reservedWordsStrict=bc(n),this.reservedWordsStrictBind=bc(n+" "+Hl.strictBind),this.input=String(t),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(cc).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=lc.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Rc={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};_c.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Rc.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Rc.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Rc.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Rc.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&$c)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Rc.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(64&t)>0||s||this.options.allowSuperOutsideMethod},Rc.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Rc.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Rc.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(258&t)>0||s},Rc.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&$c)>0},_c.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var s=this,i=0;i=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}e+=t[0].length,fc.lastIndex=e,e+=fc.exec(this.input)[0].length,";"===this.input[e]&&e++}},Oc.eat=function(e){return this.type===e&&(this.next(),!0)},Oc.isContextual=function(e){return this.type===lc.name&&this.value===e&&!this.containsEsc},Oc.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Oc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Oc.canInsertSemicolon=function(){return this.type===lc.eof||this.type===lc.braceR||cc.test(this.input.slice(this.lastTokEnd,this.start))},Oc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Oc.semicolon=function(){this.eat(lc.semi)||this.insertSemicolon()||this.unexpected()},Oc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Oc.expect=function(e){this.eat(e)||this.unexpected()},Oc.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Tc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Oc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},Oc.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,i=e.doubleProto;if(!t)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Oc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&i<56320)return!0;if(ec(i,!0)){for(var n=s+1;tc(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!Xl.test(r))return!0}return!1},Lc.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;fc.lastIndex=this.pos;var e,t=fc.exec(this.input),s=this.pos+t[0].length;return!(cc.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(tc(e=this.input.charCodeAt(s+8))||e>55295&&e<56320))},Lc.parseStatement=function(e,t,s){var i,n=this.type,r=this.startNode();switch(this.isLet(e)&&(n=lc._var,i="let"),n){case lc._break:case lc._continue:return this.parseBreakContinueStatement(r,n.keyword);case lc._debugger:return this.parseDebuggerStatement(r);case lc._do:return this.parseDoStatement(r);case lc._for:return this.parseForStatement(r);case lc._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case lc._class:return e&&this.unexpected(),this.parseClass(r,!0);case lc._if:return this.parseIfStatement(r);case lc._return:return this.parseReturnStatement(r);case lc._switch:return this.parseSwitchStatement(r);case lc._throw:return this.parseThrowStatement(r);case lc._try:return this.parseTryStatement(r);case lc._const:case lc._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case lc._while:return this.parseWhileStatement(r);case lc._with:return this.parseWithStatement(r);case lc.braceL:return this.parseBlock(!0,r);case lc.semi:return this.parseEmptyStatement(r);case lc._export:case lc._import:if(this.options.ecmaVersion>10&&n===lc._import){fc.lastIndex=this.pos;var o=fc.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)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'")),n===lc._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var c=this.value,h=this.parseExpression();return n===lc.name&&"Identifier"===h.type&&this.eat(lc.colon)?this.parseLabeledStatement(r,c,h,e):this.parseExpressionStatement(r,h)}},Lc.parseBreakContinueStatement=function(e,t){var s="break"===t;this.next(),this.eat(lc.semi)||this.insertSemicolon()?e.label=null:this.type!==lc.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(lc.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Lc.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Mc),this.enterScope(0),this.expect(lc.parenL),this.type===lc.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===lc._var||this.type===lc._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===lc._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===lc._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var r=this.isContextual("let"),o=!1,a=new Tc,l=this.parseExpression(!(t>-1)||"await",a);return this.type===lc._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===lc._in?t>-1&&this.unexpected(t):e.await=t>-1),r&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},Lc.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,zc|(s?0:Fc),!1,t)},Lc.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(lc._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Lc.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(lc.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Lc.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(lc.braceL),this.labels.push(Vc),this.enterScope(0);for(var s=!1;this.type!==lc.braceR;)if(this.type===lc._case||this.type===lc._default){var i=this.type===lc._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(lc.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")},Lc.parseThrowStatement=function(e){return this.next(),cc.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 Bc=[];Lc.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(lc.parenR),e},Lc.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===lc._catch){var t=this.startNode();this.next(),this.eat(lc.parenL)?t.param=this.parseCatchClauseParam():(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(lc._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Lc.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Lc.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Mc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Lc.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")},Lc.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Lc.parseLabeledStatement=function(e,t,s,i){for(var n=0,r=this.labels;n=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},Lc.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Lc.parseBlock=function(e,t,s){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(lc.braceL),e&&this.enterScope(0);this.type!==lc.braceR;){var i=this.parseStatement(null);t.body.push(i)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Lc.parseFor=function(e,t){return e.init=t,this.expect(lc.semi),e.test=this.type===lc.semi?null:this.parseExpression(),this.expect(lc.semi),e.update=this.type===lc.parenR?null:this.parseExpression(),this.expect(lc.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Lc.parseForIn=function(e,t){var s=this.type===lc._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(lc.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},Lc.parseVar=function(e,t,s,i){for(e.declarations=[],e.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(lc.eq)?n.init=this.parseMaybeAssign(t):i||"const"!==s||this.type===lc._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"Identifier"===n.id.type||t&&(this.type===lc._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(lc.comma))break}return e},Lc.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var zc=1,Fc=2;function jc(e,t){var s=t.key.name,i=e[s],n="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(e[s]="true",!1):!!i||(e[s]=n,!1)}function Uc(e,t){var s=e.computed,i=e.key;return!s&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Lc.parseFunction=function(e,t,s,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===lc.star&&t&Fc&&this.unexpected(),e.generator=this.eat(lc.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&zc&&(e.id=4&t&&this.type!==lc.name?null:this.parseIdent(),!e.id||t&Fc||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nc(e.async,e.generator)),t&zc||(e.id=this.type===lc.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,n),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&zc?"FunctionDeclaration":"FunctionExpression")},Lc.parseFunctionParams=function(e){this.expect(lc.parenL),e.params=this.parseBindingList(lc.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Lc.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(lc.braceL);this.type!==lc.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(r&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),r=!0):o.key&&"PrivateIdentifier"===o.key.type&&jc(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Lc.parseClassElement=function(e){if(this.eat(lc.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(lc.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===lc.star?a=!0:i="static"}if(s.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==lc.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(t>=9||!r)&&this.eat(lc.star)&&(n=!0),!i&&!r&&!n){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===lc.parenL||"method"!==o||n||r){var c=!s.static&&Uc(s,"constructor"),h=c&&e;c&&"method"!==o&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=c?"constructor":o,this.parseClassMethod(s,n,r,h)}else this.parseClassField(s);return s},Lc.isClassElementNameStart=function(){return this.type===lc.name||this.type===lc.privateId||this.type===lc.num||this.type===lc.string||this.type===lc.bracketL||this.type.keyword},Lc.parseClassElementName=function(e){this.type===lc.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Lc.parseClassMethod=function(e,t,s,i){var n=e.key;"constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):e.static&&Uc(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=e.value=this.parseMethod(t,s,i);return"get"===e.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===e.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Lc.parseClassField=function(e){if(Uc(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Uc(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(lc.eq)){var t=this.currentThisScope(),s=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=s}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Lc.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==lc.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Lc.parseClassId=function(e,t){this.type===lc.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Lc.parseClassSuper=function(e){e.superClass=this.eat(lc._extends)?this.parseExprSubscripts(null,!1):null},Lc.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Lc.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,s=e.used,i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==lc.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},Lc.parseExport=function(e,t){if(this.next(),this.eat(lc.star))return this.parseExportAllDeclaration(e,t);if(this.eat(lc._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==lc.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,i=e.specifiers;s=13&&this.type===lc.string){var e=this.parseLiteral(this.value);return Sc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Lc.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Gc=_c.prototype;Gc.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=e.properties;i=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(lc._function))return this.overrideContext(qc.f_expr),this.parseFunction(this.startNodeAt(r,o),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(lc.arrow))return this.parseArrowExpression(this.startNodeAt(r,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===lc.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(lc.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,o),[l],!0,t)}return l;case lc.regexp:var c=this.value;return(i=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},i;case lc.num:case lc.string:return this.parseLiteral(this.value);case lc._null:case lc._true:case lc._false:return(i=this.startNode()).value=this.type===lc._null?null:this.type===lc._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case lc.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case lc.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(lc.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case lc.braceL:return this.overrideContext(qc.b_expr),this.parseObj(!1,e);case lc._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case lc._class:return this.parseClass(this.startNode(),!1);case lc._new:return this.parseNew();case lc.backQuote:return this.parseTemplate();case lc._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},Kc.parseExprAtomDefault=function(){this.unexpected()},Kc.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var s=this.parseIdent(!0);return this.type!==lc.parenL||e?this.type===lc.dot?(t.meta=s,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Kc.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(lc.parenR)){var t=this.start;this.eat(lc.comma)&&this.eat(lc.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Kc.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Kc.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Kc.parseParenExpression=function(){this.expect(lc.parenL);var e=this.parseExpression();return this.expect(lc.parenR),e},Kc.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Kc.parseParenAndDistinguishExpression=function(e,t){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],h=!0,u=!1,d=new Tc,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==lc.parenR;){if(h?h=!1:this.expect(lc.comma),r&&this.afterTrailingComma(lc.parenR,!0)){u=!0;break}if(this.type===lc.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===lc.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(lc.parenR),e&&this.shouldParseArrow(c)&&this.eat(lc.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(i,n,c,t);c.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((s=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(s,"SequenceExpression",m,g)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(i,n);return y.expression=s,this.finishNode(y,"ParenthesizedExpression")}return s},Kc.parseParenItem=function(e){return e},Kc.parseParenArrowList=function(e,t,s,i){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,i)};var Xc=[];Kc.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(lc.dot)){e.meta=t;var s=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(lc.parenL)?e.arguments=this.parseExprList(lc.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Xc,this.finishNode(e,"NewExpression")},Kc.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===lc.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value,cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===lc.backQuote,this.finishNode(s,"TemplateElement")},Kc.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(s.quasis=[i];!i.tail;)this.type===lc.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(lc.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(lc.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},Kc.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===lc.name||this.type===lc.num||this.type===lc.string||this.type===lc.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===lc.star)&&!cc.test(this.input.slice(this.lastTokEnd,this.start))},Kc.parseObj=function(e,t){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(lc.braceR);){if(i)i=!1;else if(this.expect(lc.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(lc.braceR))break;var r=this.parseProperty(e,t);e||this.checkPropClash(r,n,t),s.properties.push(r)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Kc.parseProperty=function(e,t){var s,i,n,r,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(lc.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===lc.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===lc.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(n=this.start,r=this.startLoc),e||(s=this.eat(lc.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(o)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(lc.star),this.parsePropertyName(o)):i=!1,this.parsePropertyValue(o,e,s,i,n,r,t,a),this.finishNode(o,"Property")},Kc.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var s=e.value.start;"get"===e.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Kc.parsePropertyValue=function(e,t,s,i,n,r,o,a){(s||i)&&this.type===lc.colon&&this.unexpected(),this.eat(lc.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===lc.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(s,i)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===lc.comma||this.type===lc.braceR||this.type===lc.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key)):this.type===lc.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(e))},Kc.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(lc.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(lc.bracketR),e.key;e.computed=!1}return e.key=this.type===lc.num||this.type===lc.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Kc.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Kc.parseMethod=function(e,t,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Nc(t,i.generator)|(s?128:0)),this.expect(lc.parenL),i.params=this.parseBindingList(lc.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},Kc.parseArrowExpression=function(e,t,s,i){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|Nc(s,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Kc.parseFunctionBody=function(e,t,s,i){var n=t&&this.type!==lc.braceL,r=this.strict,o=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!r&&!o&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!r),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Kc.isSimpleParamList=function(e){for(var t=0,s=e;t-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&1&n.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(e)>-1:r.lexical.indexOf(e)>-1||r.var.indexOf(e)>-1,r.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},Zc.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Zc.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Zc.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Zc.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var eh=function(e,t,s){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new kc(e,s)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},th=_c.prototype;function sh(e,t,s,i){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=s),e}th.startNode=function(){return new eh(this,this.start,this.startLoc)},th.startNodeAt=function(e,t){return new eh(this,e,t)},th.finishNode=function(e,t){return sh.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},th.finishNodeAt=function(e,t,s,i){return sh.call(this,e,t,s,i)},th.copyNode=function(e){var t=new eh(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var ih="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",nh=ih+" Extended_Pictographic",rh=nh+" EBase EComp EMod EPres ExtPict",oh={9:ih,10:nh,11:nh,12:rh,13:rh,14:rh},ah={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},lh="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",ch="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",hh=ch+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",uh=hh+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",dh=uh+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ph=dh+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",fh={9:ch,10:hh,11:uh,12:dh,13:ph,14:ph+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},mh={};function gh(e){var t=mh[e]={binary:bc(oh[e]+" "+lh),binaryOfStrings:bc(ah[e]),nonBinary:{General_Category:bc(lh),Script:bc(fh[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var yh=0,xh=[9,10,11,12,13,14];yh=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=mh[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function vh(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Sh(e){return e>=65&&e<=90||e>=97&&e<=122}bh.prototype.reset=function(e,t,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|e,this.source=t+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},bh.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},bh.prototype.at=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return-1;var n=s.charCodeAt(e);if(!t&&!this.switchU||n<=55295||n>=57344||e+1>=i)return n;var r=s.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},bh.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return i;var n,r=s.charCodeAt(e);return!t&&!this.switchU||r<=55295||r>=57344||e+1>=i||(n=s.charCodeAt(e+1))<56320||n>57343?e+1:e+2},bh.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},bh.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},bh.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},bh.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},bh.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var s=this.pos,i=0,n=e;i-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(i=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")},Eh.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Eh.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},Eh.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Eh.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Eh.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return-1!==n&&n=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Eh.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Eh.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Eh.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!vh(t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;-1!==(s=e.current())&&!vh(s);)e.advance();return e.pos!==t},Eh.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Eh.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Eh.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Eh.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=vc(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=vc(e.lastIntValue);return!0}return!1},Eh.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return ec(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Eh.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return tc(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Eh.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Eh.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},Eh.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Eh.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Eh.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Eh.regexp_eatZero=function(e){return 48===e.current()&&!Ih(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Eh.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Eh.regexp_eatControlLetter=function(e){var t=e.current();return!!Sh(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Eh.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var s,i=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(n&&r>=55296&&r<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(r-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=r}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((s=e.lastIntValue)>=0&&s<=1114111))return!0;n&&e.raise("Invalid unicode escape"),e.pos=i}return!1},Eh.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Ah(e){return Sh(e)||95===e}function kh(e){return Ah(e)||Ih(e)}function Ih(e){return e>=48&&e<=57}function wh(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ph(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ch(e){return e>=48&&e<=55}Eh.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=80===t)||112===t)){var i;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&2===i&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return 0},Eh.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,i),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return 0},Eh.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){xc(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},Eh.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Eh.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ah(t=e.current());)e.lastStringValue+=vc(t),e.advance();return""!==e.lastStringValue},Eh.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";kh(t=e.current());)e.lastStringValue+=vc(t),e.advance();return""!==e.lastStringValue},Eh.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Eh.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===s&&e.raise("Negated character class may contain strings"),!0}return!1},Eh.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Eh.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;!e.switchU||-1!==t&&-1!==s||e.raise("Invalid character class"),-1!==t&&-1!==s&&t>s&&e.raise("Range out of order in character class")}}},Eh.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(99===s||Ch(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},Eh.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Eh.regexp_classSetExpression=function(e){var t,s=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(s=2);for(var i=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(s=1):e.raise("Invalid character in character class");if(i!==e.pos)return s;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return s}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return s;2===t&&(s=2)}},Eh.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return-1!==s&&-1!==i&&s>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Eh.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Eh.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return s&&2===i&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null},Eh.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},Eh.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Eh.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Eh.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var s=e.current();return!(s<0||s===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(s))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(s)&&(e.advance(),e.lastIntValue=s,!0))},Eh.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Ih(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Eh.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Eh.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;Ih(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t},Eh.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;wh(s=e.current());)e.lastIntValue=16*e.lastIntValue+Ph(s),e.advance();return e.pos!==t},Eh.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*s+e.lastIntValue:e.lastIntValue=8*t+s}else e.lastIntValue=t;return!0}return!1},Eh.regexp_eatOctalDigit=function(e){var t=e.current();return Ch(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Eh.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length?this.finishToken(lc.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Nh.readToken=function(e){return ec(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Nh.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Nh.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=t;(i=dc(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},Nh.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&pc.test(String.fromCharCode(e))))break e;++this.pos}}},Nh.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},Nh.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(lc.ellipsis)):(++this.pos,this.finishToken(lc.dot))},Nh.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(lc.assign,2):this.finishOp(lc.slash,1)},Nh.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,i=42===e?lc.star:lc.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++s,i=lc.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(lc.assign,s+1):this.finishOp(i,s)},Nh.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(lc.assign,3);return this.finishOp(124===e?lc.logicalOR:lc.logicalAND,2)}return 61===t?this.finishOp(lc.assign,2):this.finishOp(124===e?lc.bitwiseOR:lc.bitwiseAND,1)},Nh.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(lc.assign,2):this.finishOp(lc.bitwiseXOR,1)},Nh.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!cc.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(lc.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(lc.assign,2):this.finishOp(lc.plusMin,1)},Nh.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(lc.assign,s+1):this.finishOp(lc.bitShift,s)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(s=2),this.finishOp(lc.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Nh.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(lc.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(lc.arrow)):this.finishOp(61===e?lc.eq:lc.prefix,1)},Nh.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(lc.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(lc.assign,3);return this.finishOp(lc.coalesce,2)}}return this.finishOp(lc.question,1)},Nh.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,ec(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(lc.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+vc(e)+"'")},Nh.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(lc.parenL);case 41:return++this.pos,this.finishToken(lc.parenR);case 59:return++this.pos,this.finishToken(lc.semi);case 44:return++this.pos,this.finishToken(lc.comma);case 91:return++this.pos,this.finishToken(lc.bracketL);case 93:return++this.pos,this.finishToken(lc.bracketR);case 123:return++this.pos,this.finishToken(lc.braceL);case 125:return++this.pos,this.finishToken(lc.braceR);case 58:return++this.pos,this.finishToken(lc.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(lc.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(lc.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+vc(e)+"'")},Nh.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},Nh.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(cc.test(i)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(r);var a=this.regexpState||(this.regexpState=new bh(this));a.reset(s,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(n,o)}catch(e){}return this.finishToken(lc.regexp,{pattern:n,flags:o,value:l})},Nh.readInt=function(e,t,s){for(var i=this.options.ecmaVersion>=12&&void 0===t,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?h-97+10:h>=65?h-65+10:h>=48&&h<=57?h-48:1/0)>=e)break;a=h,o=o*e+u}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=t&&this.pos-r!==t?null:o},Nh.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return null==s&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=_h(this.input.slice(t,this.pos)),++this.pos):ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(lc.num,s)},Nh.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var s=this.pos-t>=2&&48===this.input.charCodeAt(t);s&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&110===i){var n=_h(this.input.slice(t,this.pos));return++this.pos,ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(lc.num,n)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),46!==i||s||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||s||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=(r=this.input.slice(t,this.pos),s?parseInt(r,8):parseFloat(r.replace(/_/g,"")));return this.finishToken(lc.num,o)},Nh.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Nh.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(uc(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(lc.string,t)};var Rh={};Nh.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Rh)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Nh.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Rh;this.raise(e,t)},Nh.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==lc.template&&this.type!==lc.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(lc.template,e)):36===s?(this.pos+=2,this.finishToken(lc.dollarBraceL)):(++this.pos,this.finishToken(lc.backQuote));if(92===s)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(uc(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Nh.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return uc(t)?"":String.fromCharCode(t)}},Nh.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return null===s&&this.invalidStringToken(t,"Bad character escape sequence"),s},Nh.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos()=>Xe(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:De("plugin-development/#a-simple-example")}}(e)),Lh=Th("fs.mkdir"),Mh=Th("fs.readFile"),Vh=Th("fs.writeFile");async function Bh(e,t,s,i,n,r,o,a,l){const c=await function(e,t,s,i,n,r,o,a){let l=null,c=null;if(n){l=new Set;for(const s of n)e===s.source&&t===s.importer&&l.add(s.plugin);c=(e,t)=>({...e,resolve:(e,s,{assertions:r,custom:o,isEntry:a,skipSelf:l}=fe)=>i(e,s,o,a,r||me,l?[...n,{importer:s,plugin:t,source:e}]:n)})}return s.hookFirstAndGetPlugin("resolveId",[e,t,{assertions:a,custom:r,isEntry:o}],c,l)}(e,t,i,n,r,o,a,l);return null==c?Th("path.resolve")():c[0]}const zh="at position ",Fh="at output position ";const jh={delete:()=>!1,get(){},has:()=>!1,set(){}};function Uh(e){return e.startsWith(zh)||e.startsWith(Fh)?Xe({code:et,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Xe({code:ot,message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Gh=(e,t,s=Yh)=>{const{onwarn:i,onLog:n}=e,r=Wh(s,i);if(n){const e=Ie[t];return(t,s)=>n(t,qh(s),((t,s)=>{if("error"===t)return Xe(Hh(s));Ie[t]>=e&&r(t,Hh(s))}))}return r},Wh=(e,t)=>t?(s,i)=>{s===Se?t(qh(i),(t=>e(Se,Hh(t)))):e(s,i)}:e,qh=e=>(Object.defineProperty(e,"toString",{value:()=>Kh(e),writable:!0}),e),Hh=e=>"string"==typeof e?{message:e}:"function"==typeof e?Hh(e()):e,Kh=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${M(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Yh=(e,t)=>{const s=Kh(t);switch(e){case Se:return console.warn(s);case ke:return console.debug(s);default:return console.info(s)}};function Xh(e,t,s,i,n=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));o.length>0&&i(Se,function(e,t,s){return{code:Ct,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${s.join(", ")}`}}(s,o,[...r].sort()))}const Qh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ge,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:ge,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ge,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Zh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Jh=(e,t,s,i,n)=>{const r=e?.preset;if(r){const n=t[r];if(n)return{...n,...e};Xe(Ft(`${s}.preset`,i,`valid values are ${Oe(Object.keys(t))}`,r))}return((e,t,s,i)=>n=>{if("string"==typeof n){const r=e[n];if(r)return r;Xe(Ft(t,s,`valid values are ${i}${Oe(Object.keys(e))}. You can also supply an object for more fine-grained control`,n))}return(e=>e&&"object"==typeof e?e:{})(n)})(t,s,i,n)(e)},eu=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function tu(e,t,s,i){const n=t.id,r=[];let o=null===e.map?null:Vl(e.map);const a=e.code;let l=e.ast;const h=[],u=[];let d=!1;const p=()=>d=!0;let f="",m=e.code;const g=e=>(t,s)=>{t=Hh(t),s&&Qe(t,s,m,n),t.id=n,t.hook="transform",e(t)};let x;try{x=await s.hookReduceArg0("transform",[m,n],(function(e,s,n){let o,a;if("string"==typeof s)o=s;else{if(!s||"object"!=typeof s)return e;if(t.updateOptions(s),null==s.code)return(s.map||s.ast)&&i(Se,function(e){return{code:At,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(n.name)),e;({code:o,map:a,ast:l}=s)}return null!==a&&r.push(Vl("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:n.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){h.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,x=p,{delete:e=>(x(),l.delete(e)),get:e=>(x(),l.get(e)),has:e=>(x(),l.has(e)),set:(e,t)=>(x(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(u.push(e),s.emitFile(e)),error:(t,s)=>("string"==typeof t&&(t={message:t}),s&&Qe(t,s,m,n),t.id=n,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,s,i,n){return 0===i.length?s:{version:3,...Za(e,t,s,i,Qa(n)).traceMappings()}}(n,a,o,r,i);if(!e){return new y(a).generateMap({hires:!0,includeContent:!0,source:n})}return o!==e&&(o=e,r.length=0),new c({...e,file:null,sourcesContent:e.sourcesContent})},info:g(e.info),setAssetSource(){return this.error({code:mt,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:g(e.warn)};var l,x}))}catch(e){return Xe(Wt(e,f,{hook:"transform",id:n}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:x,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:h}}const su="resolveDependencies";class iu{constructor(e,t,s,i){this.graph=e,this.modulesById=t,this.options=s,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,s,i,n,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Bh(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,s,"boolean"==typeof i?i:!t,n),t,e),n),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const s=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,t){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((n=>{for(const[r,o]of n.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,ru(o,e[r],t,i+r);const n=this.indexedEntryModules.find((e=>e.module===o));n?n.index=Math.min(n.index,s+r):this.indexedEntryModules.push({index:s+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),n})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:s,name:i,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:s,name:i||null},a=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,me),void 0,!1,!e.resolveDependencies||su)).info}addEntryWithImplicitDependants(e,t){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async i=>{if(ru(i,e,!1,s),!i.info.isEntry){this.implicitEntryModules.add(i);const s=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,i.id))));for(const e of s)i.implicitlyLoadedAfter.add(e);for(const e of i.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(i)}return i})))}async addModuleSource(e,t,s){let i;try{i=await this.graph.fileOperationQueue.run((async()=>await this.pluginDriver.hookFirst("load",[e])??await Mh(e,"utf8")))}catch(s){let i=`Could not load ${e}`;throw t&&(i+=` (imported by ${M(t)})`),i+=`: ${s.message}`,s.message=i,s}const n="string"==typeof i?{code:i}:null!=i&&"object"==typeof i&&"string"==typeof i.code?i:Xe(function(e){return{code:"BAD_LOADER",message:`Error loading "${M(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==n.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))s.updateOptions(n),s.setSource(await tu(n,s,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);s.setSource(r)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const s=await Promise.all(t.map((t=>t.then((async([t,s])=>null===s?null:"string"==typeof s?(t.resolution=s,null):t.resolution=await this.fetchResolvedDependency(M(s.id),e.id,s))))));for(const t of s)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({assertions:e,id:t,meta:s,moduleSideEffects:i,syntheticNamedExports:n},r,o,a){const l=this.modulesById.get(t);if(l instanceof To)return r&&Eo(e,l.info.assertions)&&this.options.onLog(Se,Vt(l.info.assertions,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Jt)return Xe({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new To(this.graph,t,this.options,o,i,n,s,e);this.modulesById.set(t,c),this.graph.watchFiles[t]=!0;const h=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=au(h).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,h);const d=await h;return a?a===su&&await u:await this.fetchModuleDependencies(c,...d),c}async fetchModuleDependencies(e,t,s,i){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await i)}fetchResolvedDependency(e,t,s){if(s.external){const{assertions:i,external:n,id:r,moduleSideEffects:o,meta:a}=s;let l=this.modulesById.get(r);if(l){if(!(l instanceof Jt))return Xe(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${M(t)}", but is already an existing non-external module id.`}}(e,t));Eo(l.info.assertions,i)&&this.options.onLog(Se,Vt(l.info.assertions,i,e,t))}else l=new Jt(this.options,r,o,a,"absolute"!==n&&k(r),i),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(s,t,!1,!1)}async fetchStaticDependencies(e,t){for(const s of await Promise.all(t.map((t=>t.then((([t,s])=>this.fetchResolvedDependency(t,e.id,s)))))))e.dependencies.add(s),s.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof To&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,s){const{makeAbsoluteExternalsRelative:i}=this.options;if(e){if("object"==typeof e){const n=e.external||this.options.external(e.id,t,!0);return{...e,external:n&&("relative"===n||!k(e.id)||!0===n&&ou(e.id,s,i)||"absolute")}}const n=this.options.external(e,t,!0);return{external:n&&(ou(e,s,i)||"absolute"),id:n&&i?nu(e,t):e}}const n=i?nu(s,t):s;return!1===e||this.options.external(n,t,!0)?{external:ou(n,s,i)||"absolute",id:n}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const s=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,function(e){const t=e.arguments?.[0]?.properties.find((e=>"assert"===xo(e)))?.value;if(!t)return me;const s=t.properties.map((e=>{const t=xo(e);return"string"==typeof t&&"string"==typeof e.value.value?[t,e.value.value]:null})).filter((e=>!!e));return s.length>0?Object.fromEntries(s):me}(t.node));return s&&"object"==typeof s&&(t.id=s.id),[t,s]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAssertions,(async([t,s])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,me,!1,s),t,e.id,s)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const s=e.external||!1;return{assertions:e.assertions||t,external:s,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!s),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,s){const i=this.moduleLoadPromises.get(e);if(s)return s===su?au(i):i;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await i)}handleInvalidResolvedId(e,t,s,i){return null===e?I(t)?Xe(function(e,t){return{code:Nt,exporter:e,id:t,message:`Could not resolve "${e}" from "${M(t)}"`}}(t,s)):(this.options.onLog(Se,function(e,t){return{code:Nt,exporter:e,id:t,message:`"${e}" is imported by "${M(t)}", but could not be resolved – treating it as an external dependency.`,url:De("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,s)),{assertions:i,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(Se,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${M(t)}").`}}(t,s)),e)}async loadEntryModule(e,t,s,i,n=!1){const r=await Bh(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,me,!0,me);if(null==r)return Xe(null===i?function(e){return{code:$t,message:`Could not resolve entry module "${M(e)}".`}}(e):function(e,t){return{code:xt,message:`Module "${M(e)}" that should be implicitly loaded before "${M(t)}" could not be resolved.`}}(e,i));const o="object"==typeof r&&r.external;return!1===r||o?Xe(null===i?o&&n?Yt(e):function(e){return{code:$t,message:`Entry module "${M(e)}" cannot be external.`}}(e):function(e,t){return{code:xt,message:`Module "${M(e)}" that should be implicitly loaded before "${M(t)}" cannot be external.`}}(e,i)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},me),void 0,t,!1)}async resolveDynamicImport(e,t,s,i){const n=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,s,{assertions:i}]);if("string"!=typeof t)return"string"==typeof n?n:n?this.getResolvedIdWithDefaults(n,i):null;if(null==n){const n=e.resolvedIds[t];return n?(Eo(n.assertions,i)&&this.options.onLog(Se,Vt(n.assertions,i,t,s)),n):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,me,!1,i),t,e.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(n,s,t),i),t,s,i)}}function nu(e,t){return I(e)?t?_(t,"..",e):_(e):e}function ru(e,{fileName:t,name:s},i,n){if(null!==t)e.chunkFileNames.add(t);else if(null!==s){let t=0;for(;e.chunkNames[t]?.priority$(r).slice(1),extname:()=>$(r),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-$(r).length))}),n)}function uu(e,{bundle:t},s){t[Aa].has(e.toLowerCase())?s(Se,function(e){return{code:at,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=ka}const du=new Set(["chunk","asset","prebuilt-chunk"]);function pu(e,t,s){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||s;return Xe(Xt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function fu(e,t){return"string"!=typeof e.fileName?Xe((s=e.name||t,{code:tt,message:`Plugin error - Unable to get file name for asset "${s}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var s}function mu(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():Xe((s=e.fileName||e.name,{code:it,message:`Plugin error - Unable to get file name for emitted chunk "${s}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var s}class gu{constructor(e,t,s){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&du.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!V(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Xe(Xt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Xe(Xt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Xe({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?mu(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:fu(t,e):Xe({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const s=this.filesByReferenceId.get(e);if(!s)return Xe({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==s.type)return Xe(Xt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==s.source)return Xe({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||e}", source already set.`});const i=pu(t,s,e);if(this.output)this.finalizeAdditionalAsset(s,i,this.output);else{s.source=i;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(s,i,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const s=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&uu(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{j(i,cu(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=s?new Map(s.filesByReferenceId):new Map,s?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let s=t;do{s=Ml().update(s).digest("hex").slice(0,8)}while(this.filesByReferenceId.has(s)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(s))));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(s,e);return s}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,referencedFiles:[],type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:pu(e.source,e,null),s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:s,source:i}=e;s&&uu(s,t,this.options.onLog),void 0!==i&&this.finalizeAdditionalAsset(e,i,t)}emitChunk(e){if(this.graph.phase>go.LOAD_AND_PARSE)return Xe({code:ft,message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Xe(Xt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Xe(Xt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||V(e.fileName))return Xe(Xt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},s=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),s}finalizeAdditionalAsset(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=cu(t);r=i.get(o),r||(r=hu(e.name,t,o,n,s),i.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=s[r];"asset"===c?.type?c.needsCodeReference&&(c.needsCodeReference=o):s[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let r,o="",a=!0;for(const i of e){a&&(a=i.needsCodeReference);const e=hu(i.name,i.source,t,n,s);(!o||e.length{null!=r&&s(Se,{code:ut,message:`Plugin "${i}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(n=Hh(n)).code&&!n.pluginCode&&(n.pluginCode=n.code),n.code=t,n.plugin=i,s(e,n)}}function xu(e,s,i,n,r,o){const{logLevel:a,onLog:l}=n;let c,h=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(zh)||e.name.startsWith(Fh)||o.has(e.name)?h=!1:o.add(e.name)),s)if(h){const t=e.cacheKey||e.name;d=s[t]||(s[t]=Object.create(null)),c={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,c={delete:()=>Uh(u),get:()=>Uh(u),has:()=>Uh(u),set:()=>Uh(u)};else c=jh;var u,d;return{addWatchFile(e){if(i.phase>=go.GENERATE)return this.error({code:ft,message:'Cannot call "addWatchFile" after the build has finished.'});i.watchFiles[e]=!0},cache:c,debug:yu(ke,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>Xe(Wt(Hh(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),info:yu(Ae,"PLUGIN_LOG",l,e.name,a),load:e=>i.moduleLoader.preloadModule(e),meta:{rollupVersion:t,watchMode:i.watchMode},get moduleIds(){const t=i.modulesById.keys();return function*(){Qt(`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,n,e.name),yield*t}()},parse:i.contextParse.bind(i),resolve:(t,s,{assertions:n,custom:r,isEntry:o,skipSelf:a}=fe)=>i.moduleLoader.resolveId(t,s,r,o,n||me,a?[{importer:s,plugin:e,source:t}]:null),setAssetSource:r.setAssetSource,warn:yu(Se,"PLUGIN_WARNING",l,e.name,a)}}const Eu=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class bu{constructor(e,t,s,i,n){this.graph=e,this.options=t,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new gu(e,t,n&&n.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...n?n.plugins:[],...s];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((s=>[s,xu(s,i,e,t,this.fileEmitter,r)]))),n)for(const e of s)for(const s of Eu)s in e&&t.onLog(Se,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${s}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new bu(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,s,i){return this.hookFirstAndGetPlugin(e,t,s,i).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,s,i){for(const n of this.getSortedPlugins(e)){if(i?.has(n))continue;const r=await this.runHook(e,t,n,s);if(null!=r)return[r,n]}return null}hookFirstSync(e,t,s){for(const i of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,i,s);if(null!=n)return n}return null}async hookParallel(e,t,s){const i=[];for(const n of this.getSortedPlugins(e))n[e].sequential?(await Promise.all(i),i.length=0,await this.runHook(e,t,n,s)):i.push(this.runHook(e,t,n,s));await Promise.all(i)}hookReduceArg0(e,[t,...s],i,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...s],t,n).then((e=>i.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...s],i,n){for(const r of this.getSortedPlugins(e)){const o=[t,...s],a=this.runHookSync(e,o,r,n);t=i.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,s,i){const n=[],r=[];for(const t of this.getSortedPlugins(e,Au))t[e].sequential?(n.push(...await Promise.all(r)),r.length=0,n.push(await this.runHook(e,s,t))):r.push(this.runHook(e,s,t));return n.push(...await Promise.all(r)),n.reduce(i,await t)}hookReduceValueSync(e,t,s,i,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,s,t,n);r=i.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,s){let i=Promise.resolve();for(const n of this.getSortedPlugins(e))i=i.then((()=>this.runHook(e,t,n,s)));return i.then(ku)}getSortedPlugins(e,t){return j(this.sortedPlugins,e,(()=>vu(e,this.plugins,t)))}runHook(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const i=r.apply(o,t);return i?.then?(a=[s.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(i).then((e=>(this.unfulfilledActions.delete(a),e)))):i})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),Xe(Wt(t,s.name,{hook:e})))))}runHookSync(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));try{return r.apply(o,t)}catch(t){return Xe(Wt(t,s.name,{hook:e}))}}}function vu(e,t,s=Su){const i=[],n=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(s(t.handler,e,o),"pre"===t.order){i.push(o);continue}if("post"===t.order){r.push(o);continue}}else s(t,e,o);n.push(o)}}return[...i,...n,...r]}function Su(e,t,s){"function"!=typeof e&&Xe(function(e,t){return{code:pt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,s.name))}function Au(e,t,s){if("string"!=typeof e&&"function"!=typeof e)return Xe(function(e,t){return{code:pt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,s.name))}function ku(){}class Iu{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,s)=>{this.queue.push({reject:s,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:s,task:i}=e;try{s(await i())}catch(e){t(e)}}this.workerCount--}}class wu{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,s,i,n=e||1;function r(e,r){++t>n&&(i=s,o(1),++t),s[e]=r}function o(e){t=0,s=Object.create(null),e||(i=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==s[e]||void 0!==i[e]},get:function(e){var t=s[e];return void 0!==t?t:void 0!==(t=i[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==s[e]?s[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new ee,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=go.LOAD_AND_PARSE,this.scope=new lu,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",s)}this.pluginDriver=new bu(this,e,e.plugins,this.pluginCache),this.acornParser=_c.extend(...e.acornInjectPlugins),this.moduleLoader=new iu(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Iu(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const s of e?e.manualPureFunctions:[]){let e=t;for(const t of s.split("."))e=e[t]||(e[t]=Object.create(null));e[ji]=!0}return t})(e)}async build(){Po("generate module graph",2),await this.generateModuleGraph(),Co("generate module graph",2),Po("sort and bind modules",2),this.phase=go.ANALYSE,this.sortModules(),Co("sort and bind modules",2),Po("mark included statements",2),this.includeStatements(),Co("mark included statements",2),this.phase=go.GENERATE}contextParse(e,t={}){const s=t.onComment,i=[];t.onComment=s&&"function"==typeof s?(e,n,r,o,...a)=>(i.push({end:o,start:r,type:e?"Block":"Line",value:n}),s.call(t,e,n,r,o,...a)):i;const n=this.acornParser.parse(e,{...this.options.acorn,...t});return"object"==typeof s&&s.push(...i),t.onComment=s,function(e,t,s){const i=[],n=[];for(const t of e){for(const[e,s]of Xs)s.test(t.value)&&i.push({...t,annotationType:e});js.test(t.value)&&n.push(t)}for(const e of n)Qs(t,e,!1);Ws(t,{annotationIndex:0,annotations:i,code:s})}(i,n,e),n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let s=!0;for(const[e,i]of Object.entries(t))i[0]>=this.options.experimentalCacheExpiry?delete t[e]:s=!1;s&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof To?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)_o(t);if(this.options.treeshake){let t=1;do{Po(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Co("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Xe(Ut(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const s=[],i=new Set,n=new Set,r=new Map,o=[],a=e=>{if(e instanceof To){for(const t of e.dependencies)r.has(t)?i.has(t)||s.push(qa(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)n.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof To&&n.add(t);o.push(e)}e.execIndex=t++,i.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of n)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:s,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(Se,Tt(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(Se,jt(t.name,e.id,t.module.id),t.start)}}function Pu(e,t){return t()}function Cu(e,s,i,n){e=vu("onLog",e);const r=Ie[n],o=(n,a,l=ye)=>{if(!(Ie[n]Ie[e]o(e,Hh(t),new Set(l).add(s));if(!1===("handler"in e?e.handler:e).call({debug:c(ke),error:e=>Xe(Hh(e)),info:c(Ae),meta:{rollupVersion:t,watchMode:i},warn:c(Se)},n,a))return}s(n,a)}};return o}const $u="{".charCodeAt(0),Nu=" ".charCodeAt(0),_u="assert";function Ru(e){const t=e.acorn||Dh,{tokTypes:s,TokenType:i}=t;return class extends e{constructor(...e){super(...e),this.assertToken=new i(_u)}_codeAt(e){return this.input.charCodeAt(e)}_eat(e){this.type!==e&&this.unexpected(),this.next()}readToken(e){let t=0;for(;t<6;t++)if(this._codeAt(this.pos+t)!==_u.charCodeAt(t))return super.readToken(e);for(;this._codeAt(this.pos+t)!==$u;t++)if(this._codeAt(this.pos+t)!==Nu)return super.readToken(e);return"{"===this.type.label?super.readToken(e):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(s.comma)){const t=this.parseObj(!1);e.arguments=[t]}return this._eat(s.parenR),this.finishNode(e,"ImportExpression")}parseExport(e,t){if(this.next(),this.eat(s.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}if(this.eat(s._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===s._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(n,5,!1,i)}else if(this.type===s._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}}else{for(var o=0,a=e.specifiers;o({ecmaVersion:"latest",sourceType:"module",...e.acorn}),Tu=e=>[Ru,...Ou(e.acornInjectPlugins)],Lu=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Mu=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...s)=>!t.startsWith("\0")&&e(t,...s)||!1;if(e){const t=new Set,s=[];for(const i of Ou(e))i instanceof RegExp?s.push(i):t.add(i);return(e,...i)=>t.has(e)||s.some((t=>t.test(e)))}return()=>!1},Vu=(e,t,s)=>{const i=e.inlineDynamicImports;return i&&Zt('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',Ge,!0,t,s),i},Bu=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},zu=(e,t,s)=>{const i=e.manualChunks;return i&&Zt('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',qe,!0,t,s),i},Fu=(e,t,s)=>{const i=e.maxParallelFileReads;"number"==typeof i&&Zt('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,t,s);const n=e.maxParallelFileOps??i;return"number"==typeof n?n<=0?1/0:n:20},ju=(e,t)=>{const s=e.moduleContext;if("function"==typeof s)return e=>s(e)??t;if(s){const e=Object.create(null);for(const[t,i]of Object.entries(s))e[_(t)]=i;return s=>e[s]??t}return()=>t},Uu=(e,t,s)=>{const i=e.preserveModules;return i&&Zt('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,t,s),i},Gu=e=>{if(!1===e.treeshake)return!1;const t=Jh(e.treeshake,Qh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??ge,moduleSideEffects:Wu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Wu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,s)=>!!t.startsWith("\0")||!1!==e(t,s);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Xe(Ft("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},qu=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Hu=/^[a-z]:/i;function Ku(e){const t=Hu.exec(e),s=t?t[0]:"";return s+e.slice(s.length).replace(qu,"_")}const Yu=(e,t,s)=>{const{file:i}=e;if("string"==typeof i){if(t)return Xe(Ft("output.file",Ve,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(s.input))return Xe(Ft("output.file",Ve,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return i},Xu=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Xe(Ft("output.format",Fe,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Qu=(e,t)=>{const s=(e.inlineDynamicImports??t.inlineDynamicImports)||!1,{input:i}=t;return s&&(Array.isArray(i)?i:Object.keys(i)).length>1?Xe(Ft("output.inlineDynamicImports",Ge,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):s},Zu=(e,t,s)=>{const i=(e.preserveModules??s.preserveModules)||!1;if(i){if(t)return Xe(Ft("output.inlineDynamicImports",Ge,'this option is not supported for "output.preserveModules"'));if(!1===s.preserveEntrySignatures)return Xe(Ft("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return i},Ju=(e,t)=>{const s=e.preferConst;return null!=s&&Qt('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,t),!!s},ed=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return _(t)},td=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Xe(Ft("output.amd.id",Me,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Xe(Ft("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},sd=(e,t)=>{const s=e[t];return"function"==typeof s?s:()=>s||""},id=(e,t)=>{const{dir:s}=e;return"string"==typeof s&&"string"==typeof t?Xe(Ft("output.dir",Ve,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):s},nd=(e,t,s)=>{const i=e.dynamicImportFunction;return i&&(Qt('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,t),"es"!==s&&t.onLog(Se,Ft("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),i},rd=(e,t)=>{const s=e.entryFileNames;return null==s&&t.add("entryFileNames"),s??"[name].js"};function od(e,t){const s=e.experimentalDeepDynamicChunkOptimization;return null!=s&&Qt('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',je,!0,t),s||!1}function ad(e,t){const s=e.exports;if(null==s)t.add("exports");else if(!["default","named","none","auto"].includes(s))return Xe({code:ht,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${s}".`,url:De(Be)});return s||"auto"}const ld=(e,t)=>{const s=Jh(e.generatedCode,Zh,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===s.arrowFunctions,constBindings:!0===s.constBindings||t,objectShorthand:!0===s.objectShorthand,reservedNamesAsProps:!1!==s.reservedNamesAsProps,symbols:!0===s.symbols}},cd=(e,t)=>{if(t)return"";const s=e.indent;return!1===s?"":s??!0},hd=new Set(["compat","auto","esModule","default","defaultOnly"]),ud=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let s=null;return i=>null===i?s||dd(s=t(i)):i in e?e[i]:dd(e[i]=t(i))}return void 0===t?()=>"default":()=>dd(t)},dd=e=>hd.has(e)?e:Xe(Ft("output.interop",We,`use one of ${Array.from(hd,(e=>JSON.stringify(e))).join(", ")}`,e)),pd=(e,t,s,i)=>{const n=e.manualChunks||i.manualChunks;if(n){if(t)return Xe(Ft("output.manualChunks",qe,'this option is not supported for "output.inlineDynamicImports"'));if(s)return Xe(Ft("output.manualChunks",qe,'this option is not supported for "output.preserveModules"'))}return n||{}},fd=(e,t,s)=>e.minifyInternalExports??(s||"es"===t||"system"===t),md=(e,t,s)=>{const i=e.namespaceToStringTag;return null!=i?(Qt('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,s),i):t.symbols||!1},gd=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(s=t).endsWith("/")?s:s+"/":Xe(Ft("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var s};function yd(e,t){for(const[s,i]of e.entries())i.name||(i.name=`${t}${s+1}`)}async function xd(e,t,s,i,n){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,s,i){if(!e)throw new Error("You must supply an options object");const n=await eu(e.plugins);yd(n,Fh);const r=t.createOutputPluginDriver(n);return{...await Ed(s,i,e,r),outputPluginDriver:r}}(i,n.pluginDriver,t,s);return Pu(0,(async()=>{const s=new jl(r,a,t,o,n),i=await s.generate(e);if(e){if(Po("WRITE",1),!r.dir&&!r.file)return Xe({code:vt,message:'You must specify "output.file" or "output.dir" for the build.',url:De(Ve)});await Promise.all(Object.values(i).map((e=>n.fileOperationQueue.run((()=>async function(e,t){const s=_(t.dir||C(t.file),e.fileName);return await Lh(C(s),{recursive:!0}),Vh(s,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,i]),Co("WRITE",1)}return l=i,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>vd(e)-vd(t)))};var l}))}function Ed(e,t,s,i){return async function(e,t,s){const i=new Set(s),n=e.compact||!1,r=Xu(e),o=Qu(e,t),a=Zu(e,o,t),l=Yu(e,a,t),c=Ju(e,t),h=ld(e,c),u={amd:td(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:sd(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:n,dir:id(e,l),dynamicImportFunction:nd(e,t,r),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:rd(e,i),esModule:e.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:od(e,t),experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:ad(e,i),extend:e.extend||!1,externalImportAssertions:e.externalImportAssertions??!0,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:sd(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:h,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:cd(e,n),inlineDynamicImports:o,interop:ud(e),intro:sd(e,"intro"),manualChunks:pd(e,o,a,t),minifyInternalExports:fd(e,r,n),name:e.name,namespaceToStringTag:md(e,h,t),noConflict:e.noConflict||!1,outro:sd(e,"outro"),paths:e.paths||{},plugins:await eu(e.plugins),preferConst:c,preserveModules:a,preserveModulesRoot:ed(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Ku,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:gd(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return Xh(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:i}}(i.hookReduceArg0Sync("outputOptions",[s],((e,t)=>t||e),(e=>{const t=()=>e.error({code:st,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var bd;function vd(e){return"asset"===e.type?bd.ASSET:e.isEntry?bd.ENTRY_CHUNK:bd.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(bd||(bd={})),e.VERSION=t,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,s){const{options:i,unsetOptions:n}=await async function(e,s){if(!e)throw new Error("You must supply an options object to rollup");const i=await async function(e,s){const i=vu("options",await eu(e.plugins)),n=e.logLevel||Ae,r=Cu(i,Gh(e,n),s,n);for(const o of i){const{name:i,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:yu(ke,"PLUGIN_LOG",r,i,n),error:e=>Xe(Wt(Hh(e),i,{hook:"onLog"})),info:yu(Ae,"PLUGIN_LOG",r,i,n),meta:{rollupVersion:t,watchMode:s},warn:yu(Se,"PLUGIN_WARNING",r,i,n)},e);c&&(e=c)}return e}(e,s),{options:n,unsetOptions:r}=await async function(e,t){const s=new Set,i=e.context??"undefined",n=await eu(e.plugins),r=e.logLevel||Ae,o=Cu(n,Gh(e,r),t,r),a=e.strictDeprecations||!1,l=Fu(e,o,a),c={acorn:Du(e),acornInjectPlugins:Tu(e),cache:Lu(e),context:i,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Mu(e.external),inlineDynamicImports:Vu(e,o,a),input:Bu(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:zu(e,o,a),maxParallelFileOps:l,maxParallelFileReads:l,moduleContext:ju(e,i),onLog:o,onwarn:e=>o(Se,e),perf:e.perf||!1,plugins:n,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveModules:Uu(e,o,a),preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Gu(e)};return Xh(e,[...Object.keys(c),"watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:s}}(i,s);return yd(n.plugins,zh),{options:n,unsetOptions:r}}(e,null!==s);!function(e){e.perf?(So=new Map,Po=ko,Co=Io,e.plugins=e.plugins.map(No)):(Po=Ui,Co=Ui)}(i);const r=new wu(i,s),o=!1!==e.cache;e.cache&&(i.cache=void 0,e.cache=void 0);Po("BUILD",1),await Pu(r.pluginDriver,(async()=>{try{Po("initialize",2),await r.pluginDriver.hookParallel("buildStart",[i]),Co("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Co("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?Xe(Rt()):xd(!1,i,n,e,r),watchFiles:Object.keys(r.watchFiles),write:async e=>a.closed?Xe(Rt()):xd(!0,i,n,e,r)};i.perf&&(a.getTimings=wo);return a}(e,null)}})); ++!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t="3.26.2";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}};!function(e,t){!function(e){const t=",".charCodeAt(0),s=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;eBuffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let s=0;s>>=1,l&&(n=-2147483648|-n),s[i]+=n,t}function h(e,s,i){return!(s>=i)&&e.charCodeAt(s)!==t}function u(e){e.sort(d)}function d(e,t){return e[0]-t[0]}function p(e){const i=new Int32Array(5),n=16384,r=n-36,a=new Uint8Array(n),l=a.subarray(0,r);let c=0,h="";for(let u=0;u0&&(c===n&&(h+=o.decode(a),c=0),a[c++]=s),0!==d.length){i[0]=0;for(let e=0;er&&(h+=o.decode(l),a.copyWithin(0,r,c),c-=r),e>0&&(a[c++]=t),c=f(a,c,i,s,0),1!==s.length&&(c=f(a,c,i,s,1),c=f(a,c,i,s,2),c=f(a,c,i,s,3),4!==s.length&&(c=f(a,c,i,s,4)))}}}return h+o.decode(a.subarray(0,c))}function f(e,t,s,i,r){const o=i[r];let a=o-s[r];s[r]=o,a=a<0?-a<<1|1:a<<1;do{let s=31&a;a>>>=5,a>0&&(s|=32),e[t++]=n[s]}while(a>0);return t}e.decode=a,e.encode=p,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports);var n=i.exports;class r{constructor(e){this.bits=e instanceof r?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let o=class e{constructor(e,t,s){this.start=e,this.end=t,this.original=s,this.intro="",this.outro="",this.content=s,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.startwindow.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const l=a();class c{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=n.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+l(this.toString())}}function h(e,t){const s=e.split(/[/\\]/),i=t.split(/[/\\]/);for(s.pop();s[0]===i[0];)s.shift(),i.shift();if(s.length){let e=s.length;for(;e--;)s[e]=".."}return s.concat(i).join("/")}const u=Object.prototype.toString;function d(e){return"[object Object]"===u.call(e)}function p(e){const t=e.split("\n"),s=[];for(let e=0,i=0;e>1;e=0&&t.push(i),this.rawSegments.push(t)}else this.pending&&this.rawSegments.push(this.pending);this.advance(t),this.pending=null}addUneditedChunk(e,t,s,i,n){let r=t.start,o=!0;for(;r1){for(let e=0;e{const n=i(e.start);e.intro.length&&s.advance(e.intro),e.edited?s.addEdit(0,e.content,n,e.storeName?t.indexOf(e.original):-1):s.addUneditedChunk(0,e,this.original,n,this.sourcemapLocations),e.outro.length&&s.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?h(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new c(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return new Array(n+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const s=/^[^\r\n]/gm;if(d(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const i={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];tn?`${e}${t}`:(n=!0,t);this.intro=this.intro.replace(s,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)i[o]||(a.content=a.content.replace(s,r),a.content.length&&(n="\n"===a.content[a.content.length-1]));else for(o=a.start;o=e&&s<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(s);const i=this.byStart[e],n=this.byEnd[t],r=i.previous,o=n.next,a=this.byStart[s];if(!a&&n===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=i),a&&(a.previous=n),i.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,n.next=a||null,l||(this.firstChunk=i),a||(this.lastChunk=n),this}overwrite(e,t,s,i){return i=i||{},this.update(e,t,s,{...i,overwrite:!i.contentOnly})}update(e,t,s,i){if("string"!=typeof s)throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===i&&(g.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),g.storeName=!0),i={storeName:!0});const n=void 0!==i&&i.storeName,r=void 0!==i&&i.overwrite;if(n){const s=this.original.slice(e,t);Object.defineProperty(this.storedNames,s,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(s,n,!r)}else{const i=new o(e,t,"").edit(s,n);l.next=i,i.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(t):this.outro=t+this.outro,this}remove(e,t){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=t>s.end?this.byStart[s.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(m);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(m),-1!==e)return s.outro.substr(e+1)+t;t=s.outro+t}if(s.content.length>0){if(e=s.content.lastIndexOf(m),-1!==e)return s.content.substr(e+1)+t;t=s.content+t}if(s.intro.length>0){if(e=s.intro.lastIndexOf(m),-1!==e)return s.intro.substr(e+1)+t;t=s.intro+t}}while(s=s.previous);return e=this.intro.lastIndexOf(m),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length;let s="",i=this.firstChunk;for(;i&&(i.start>e||i.end<=e);){if(i.start=t)return s;i=i.next}if(i&&i.edited&&i.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=i;for(;i;){!i.intro||n===i&&i.start!==e||(s+=i.intro);const r=i.start=t;if(r&&i.edited&&i.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=n===i?e-i.start:0,a=r?i.content.length+t-i.end:i.content.length;if(s+=i.content.slice(o,a),!i.outro||r&&i.end!==t||(s+=i.outro),r)break;i=i.next}return s}snip(e,t){const s=this.clone();return s.remove(0,e),s.remove(t,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=s?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const s=p(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${s.line}:${s.column} – "${e.original}")`)}const s=e.split(t);return this.byEnd[t]=e,this.byStart[t]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(e=e.next);return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let s=this.lastChunk;do{const e=s.end,i=s.trimEnd(t);if(s.end!==e&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let s=this.firstChunk;do{const e=s.end,i=s.trimStart(t);if(s.end!==e&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function s(e,s){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,s)=>{if("$"===s)return"$";if("&"===s)return e[0];return+s{null!=e.index&&this.overwrite(e.index,e.index+e[0].length,s(e,this.original))}))}else{const t=this.original.match(e);t&&null!=t.index&&this.overwrite(t.index,t.index+t[0].length,s(t,this.original))}return this}_replaceString(e,t){const{original:s}=this,i=s.indexOf(e);return-1!==i&&this.overwrite(i,i+e.length,t),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:s}=this,i=e.length;for(let n=s.indexOf(e);-1!==n;n=s.indexOf(e,n+i))this.overwrite(n,n+i,t);return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const x=Object.prototype.hasOwnProperty;const E=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,b=/^\.?\.\//,v=/\\/g,S=/[/\\]/,A=/\.[^.]+$/;function k(e){return E.test(e)}function I(e){return b.test(e)}function w(e){return e.replace(v,"/")}function P(e){return e.split(S).pop()||""}function C(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function $(e){const t=A.exec(P(e));return t?t[0]:""}function N(e,t){const s=e.split(S).filter(Boolean),i=t.split(S).filter(Boolean);for("."===s[0]&&s.shift(),"."===i[0]&&i.shift();s[0]&&i[0]&&s[0]===i[0];)s.shift(),i.shift();for(;".."===i[0]&&s.length>0;)i.shift(),s.pop();for(;s.pop();)i.unshift("..");return i.join("/")}function _(...e){const t=e.shift();if(!t)return"/";let s=t.split(S);for(const t of e)if(k(t))s=t.split(S);else{const e=t.split(S);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&s.pop()}s.push(...e)}return s.join("/")}const R=/[\n\r'\\\u2028\u2029]/,O=/([\n\r'\u2028\u2029])/g,D=/\\/g;function T(e){return R.test(e)?e.replace(D,"\\\\").replace(O,"\\$1"):e}function L(e){const t=P(e);return t.slice(0,Math.max(0,t.length-$(e).length))}function M(e){return k(e)?N(_(),e):e}function V(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||k(e)}const B=/^(\.\.\/)*\.\.$/;function z(e,t,s,i){let n=w(N(C(e),t));if(s&&n.endsWith(".js")&&(n=n.slice(0,-3)),i){if(""===n)return"../"+P(t);if(B.test(n))return[...n.split("/"),"..",P(t)].join("/")}return n?n.startsWith("..")?n:"./"+n:"."}class F{constructor(e,t,s){this.options=t,this.inputBase=s,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAssertions=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?w(N(this.inputBase,this.id)):this.id)}getImportAssertions(e){return this.importAssertions||(this.importAssertions=function(e,{getObject:t}){if(!e)return null;const s=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(s.length>0)return t(s,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAssertions&&this.moduleInfo.assertions,e))}getImportPath(e){return T(this.renormalizeRenderPath?z(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function j(e,t,s){const i=e.get(t);if(void 0!==i)return i;const n=s();return e.set(t,n),n}function U(){return new Set}function G(){return[]}const W=Symbol("Unknown Key"),q=Symbol("Unknown Non-Accessor Key"),H=Symbol("Unknown Integer"),K=Symbol("Symbol.toStringTag"),Y=[],X=[W],Q=[q],Z=[H],J=Symbol("Entities");class ee{constructor(){this.entityPaths=Object.create(null,{[J]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const s=this.getEntities(e);return!!s.has(t)||(s.add(t),!1)}withTrackedEntityAtPath(e,t,s,i){const n=this.getEntities(e);if(n.has(t))return i;n.add(t);const r=s();return n.delete(t),r}getEntities(e){let t=this.entityPaths;for(const s of e)t=t[s]=t[s]||Object.create(null,{[J]:{value:new Set}});return t[J]}}const te=new ee;class se{constructor(){this.entityPaths=Object.create(null,{[J]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,s){let i=this.entityPaths;for(const t of e)i=i[t]=i[t]||Object.create(null,{[J]:{value:new Map}});const n=j(i[J],t,U);return!!n.has(s)||(n.add(s),!1)}}const ie=Symbol("Unknown Value"),ne=Symbol("Unknown Truthy Value");class re{constructor(){this.included=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){le(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,s){return ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){return ae}hasEffectsOnInteractionAtPath(e,t,s){return!0}include(e,t,s){this.included=!0}includeCallArguments(e,t){for(const s of t)s.include(e,!1)}shouldBeIncluded(e){return!0}}const oe=new class extends re{},ae=[oe,!1],le=e=>{for(const t of e.args)t?.deoptimizePath(X)},ce={args:[null],type:0},he={args:[null,oe],type:1},ue={args:[null],type:2,withNew:!1};class de extends re{constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.initReached=!1,this.isId=!1,this.isReassigned=!1,this.kind=null,this.renderBaseName=null,this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(e)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this))return this.name;const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:t},s){return 0!==t||e.length>0}include(){this.included=!0}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class pe extends de{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){this.included||(this.included=!0,this.module.used=!0)}}const fe=Object.freeze(Object.create(null)),me=Object.freeze({}),ge=Object.freeze([]),ye=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});var xe=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);const Ee=/[^\w$]/g,be=e=>(e=>/\d/.test(e[0]))(e)||xe.has(e)||"arguments"===e;function ve(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Ee,"_"),be(e)&&(e=`_${e}`),e||"_"}const Se="warn",Ae="info",ke="debug",Ie={[ke]:0,[Ae]:1,silent:3,[Se]:2};function we(e,t){return e.start<=t&&t{const s=n+e.length+1,i={start:n,end:s,line:t};return n=s,i}));let o=0;return function(t,n){if("string"==typeof t&&(t=e.indexOf(t,n??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(we(a,t))return{line:s+a.line,column:i+t-a.start,character:t};o+=l,a=r[o]}}}(e,s)(t,s&&s.startIndex)}function Ce(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const $e=120,Ne=10,_e="...";function Re(e,t,s){let i=e.split("\n");if(t>i.length)return"";const n=Math.max(Ce(i[t-1].slice(0,s)).length+Ne+_e.length,$e),r=Math.max(0,t-3);let o=Math.min(t+2,i.length);for(i=i.slice(r,o);!/\S/.test(i[i.length-1]);)i.pop(),o-=1;const a=String(o).length;return i.map(((e,i)=>{const o=r+i+1===t;let l=String(i+r+1);for(;l.lengthn&&(c=`${c.slice(0,n-_e.length)}${_e}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Ce(e.slice(0,s)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function Oe(e,t){const s=e.length<=1,i=e.map((e=>`"${e}"`));let n=s?i[0]:`${i.slice(0,-1).join(", ")} and ${i.slice(-1)[0]}`;return t&&(n+=` ${s?t[0]:t[1]}`),n}function De(e){return`https://rollupjs.org/${e}`}const Te="troubleshooting/#error-name-is-not-exported-by-module",Le="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect",Me="configuration-options/#output-amd-id",Ve="configuration-options/#output-dir",Be="configuration-options/#output-exports",ze="configuration-options/#output-extend",Fe="configuration-options/#output-format",je="configuration-options/#output-experimentaldeepdynamicchunkoptimization",Ue="configuration-options/#output-globals",Ge="configuration-options/#output-inlinedynamicimports",We="configuration-options/#output-interop",qe="configuration-options/#output-manualchunks",He="configuration-options/#output-name",Ke="configuration-options/#output-sourcemapfile",Ye="plugin-development/#this-getmoduleinfo";function Xe(e){throw e instanceof Error||(e=Object.assign(new Error(e.message),e),Object.defineProperty(e,"name",{value:"RollupError"})),e}function Qe(e,t,s,i){if("object"==typeof t){const{line:s,column:n}=t;e.loc={column:n,file:i,line:s}}else{e.pos=t;const{line:n,column:r}=Pe(s,t,{offsetLine:1});e.loc={column:r,file:i,line:n}}if(void 0===e.frame){const{line:t,column:i}=e.loc;e.frame=Re(s,t,i)}}const Ze="ADDON_ERROR",Je="ALREADY_CLOSED",et="ANONYMOUS_PLUGIN_CACHE",tt="ASSET_NOT_FINALISED",st="CANNOT_EMIT_FROM_OPTIONS_HOOK",it="CHUNK_NOT_GENERATED",nt="CIRCULAR_REEXPORT",rt="DEPRECATED_FEATURE",ot="DUPLICATE_PLUGIN_NAME",at="FILE_NAME_CONFLICT",lt="ILLEGAL_IDENTIFIER_AS_NAME",ct="INVALID_CHUNK",ht="INVALID_EXPORT_OPTION",ut="INVALID_LOG_POSITION",dt="INVALID_OPTION",pt="INVALID_PLUGIN_HOOK",ft="INVALID_ROLLUP_PHASE",mt="INVALID_SETASSETSOURCE",gt="MISSING_EXPORT",yt="MISSING_GLOBAL_NAME",xt="MISSING_IMPLICIT_DEPENDANT",Et="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",bt="MISSING_NODE_BUILTINS",vt="MISSING_OPTION",St="MIXED_EXPORTS",At="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",kt="OPTIMIZE_CHUNK_STATUS",It="PLUGIN_ERROR",wt="SOURCEMAP_BROKEN",Pt="UNEXPECTED_NAMED_IMPORT",Ct="UNKNOWN_OPTION",$t="UNRESOLVED_ENTRY",Nt="UNRESOLVED_IMPORT",_t="VALIDATION_ERROR";function Rt(){return{code:Je,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function Ot(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Dt({fileName:e,code:t},s){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s.message}.`};return Qe(i,s.loc,t,e),i}function Tt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(M).join(" -> ")}`}}function Lt(e,t,{line:s,column:i}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${M(t)} is at (${s}:${i})\n${Re(e,s,i)}`}}function Mt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${M(t)}".`}}function Vt(e,t,s,i){return{code:"INCONSISTENT_IMPORT_ASSERTIONS",message:`Module "${M(i)}" tried to import "${M(s)}" with ${Bt(t)} assertions, but it was already imported elsewhere with ${Bt(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const Bt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function zt(e,t,s){return{code:ht,message:`"${e}" was specified for "output.exports", but entry module "${M(s)}" has the following exports: ${Oe(t)}`,url:De(Be)}}function Ft(e,t,s,i){return{code:dt,message:`Invalid value ${void 0===i?"":`${JSON.stringify(i)} `}for option "${e}" - ${s}.`,url:De(t)}}function jt(e,t,s){const i=".json"===$(s);return{binding:e,code:gt,exporter:s,id:t,message:`"${e}" is not exported by "${M(s)}", imported by "${M(t)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:De(Te)}}function Ut(e){const t=[...e.implicitlyLoadedBefore].map((e=>M(e.id))).sort();return{code:xt,message:`Module "${M(e.id)}" that should be implicitly loaded before ${Oe(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Gt(e,t,s){return{code:kt,message:`${s}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Wt(e,t,{hook:s,id:i}={}){const n=e.code;return e.pluginCode||null==n||"string"==typeof n&&("string"!=typeof n||n.startsWith("PLUGIN_"))||(e.pluginCode=n),e.code=It,e.plugin=t,s&&(e.hook=s),i&&(e.id=i),e}function qt(e){return{code:wt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Ht(e,t,s){const i=s?"reexport":"import";return{code:Pt,exporter:e,message:`The named export "${t}" was ${i}ed from the external module "${M(e)}" even though its interop type is "defaultOnly". Either remove or change this ${i} or change the value of the "output.interop" option.`,url:De(We)}}function Kt(e){return{code:Pt,exporter:e,message:`There was a namespace "*" reexport from the external module "${M(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:De(We)}}function Yt(e){return{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}}function Xt(e){return{code:_t,message:e}}function Qt(e,t,s,i,n){Zt(e,t,s,i.onLog,i.strictDeprecations,n)}function Zt(e,t,s,i,n,r){if(s||n){const s=function(e,t,s){return{code:rt,message:e,url:De(t),...s?{plugin:s}:{}}}(e,t,r);if(n)return Xe(s);i(Se,s)}}class Jt{constructor(e,t,s,i,n,r){this.options=e,this.id=t,this.renormalizeRenderPath=n,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=ve(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this,l=this.info={assertions:r,ast:null,code:null,dynamicallyImportedIdResolutions:ge,dynamicallyImportedIds:ge,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){return Qt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ye,!0,e),l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:ge,implicitlyLoadedBefore:ge,importedIdResolutions:ge,importedIds:ge,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,syntheticNamedExports:!1};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const s=new pe(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter((([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(0===e.length)return;const t=new Set;for(const s of e)for(const e of this.declarations.get(s).module.importers)t.add(e);const s=[...t];var i,n,r;this.options.onLog(Se,{code:"UNUSED_EXTERNAL_IMPORT",exporter:i=this.id,ids:r=s,message:`${Oe(n=e,["is","are"])} imported from external module "${i}" but never used in ${Oe(r.map((e=>M(e))))}.`,names:n})}}const es={ArrayPattern(e,t){for(const s of t.elements)s&&es[s.type](e,s)},AssignmentPattern(e,t){es[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const s of t.properties)"RestElement"===s.type?es.RestElement(e,s):es[s.value.type](e,s.value)},RestElement(e,t){es[t.argument.type](e,t.argument)}},ts=function(e){const t=[];return es[e.type](t,e),t};function ss(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function is(){return{accessed:new ee,assigned:new ee,brokenFlow:!1,called:new se,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new se,replacedVariableInits:new Map}}function ns(e,t=null){return Object.create(t,e)}new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");const rs=new class extends re{getLiteralValueAtPath(){}},os={value:{hasEffectsWhenCalled:null,returns:oe}},as=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(ms,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(ms,e[0],t,s)}},ls={value:{hasEffectsWhenCalled:null,returns:as}},cs=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(gs,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(gs,e[0],t,s)}},hs={value:{hasEffectsWhenCalled:null,returns:cs}},us=new class extends re{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?bs(xs,e[0]):ae}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(xs,e[0],t,s)}},ds={value:{hasEffectsWhenCalled:null,returns:us}},ps={value:{hasEffectsWhenCalled({args:e},t){const s=e[2];return e.length<3||"symbol"==typeof s.getLiteralValueAtPath(Y,te,{deoptimizeCache(){}})&&s.hasEffectsOnInteractionAtPath(Y,ue,t)},returns:us}},fs=ns({hasOwnProperty:ls,isPrototypeOf:ls,propertyIsEnumerable:ls,toLocaleString:ds,toString:ds,valueOf:os}),ms=ns({valueOf:ls},fs),gs=ns({toExponential:ds,toFixed:ds,toLocaleString:ds,toPrecision:ds,valueOf:hs},fs),ys=ns({exec:os,test:ls},fs),xs=ns({anchor:ds,at:os,big:ds,blink:ds,bold:ds,charAt:ds,charCodeAt:hs,codePointAt:os,concat:ds,endsWith:ls,fixed:ds,fontcolor:ds,fontsize:ds,includes:ls,indexOf:hs,italics:ds,lastIndexOf:hs,link:ds,localeCompare:hs,match:os,matchAll:os,normalize:ds,padEnd:ds,padStart:ds,repeat:ds,replace:ps,replaceAll:ps,search:hs,slice:ds,small:ds,split:os,startsWith:ls,strike:ds,sub:ds,substr:ds,substring:ds,sup:ds,toLocaleLowerCase:ds,toLocaleUpperCase:ds,toLowerCase:ds,toString:ds,toUpperCase:ds,trim:ds,trimEnd:ds,trimLeft:ds,trimRight:ds,trimStart:ds,valueOf:ds},fs);function Es(e,t,s,i){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(s,i)||!1)}function bs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:ae}function vs(e,t,s){s(e,t)}function Ss(e,t,s){}var As={};As.Program=As.BlockStatement=As.StaticBlock=function(e,t,s){for(var i=0,n=e.body;i=r.end;)Ks(e,r,n),r=i[++t.annotationIndex];if(r&&r.end<=e.end)for(As[s](e,t,Ws);(r=i[t.annotationIndex])&&r.end<=e.end;)++t.annotationIndex,Qs(e,r,!1)}const qs=/[^\s(]/g,Hs=/\S/g;function Ks(e,t,s){const i=[];let n;if(Ys(s.slice(t.end,e.start),qs)){const t=e.start;for(;;){switch(i.push(e),e.type){case Rs:case Cs:e=e.expression;continue;case Vs:if(Ys(s.slice(t,e.start),Hs)){e=e.expressions[0];continue}n=!0;break;case $s:if(Ys(s.slice(t,e.start),Hs)){e=e.test;continue}n=!0;break;case Ts:case Is:if(Ys(s.slice(t,e.start),Hs)){e=e.left;continue}n=!0;break;case _s:case Ns:e=e.declaration;continue;case zs:{const t=e;if("const"===t.kind){e=t.declarations[0].init;continue}n=!0;break}case Bs:e=e.init;continue;case Os:case ks:case Ps:case Ls:break;default:n=!0}break}}else n=!0;if(n)Qs(e,t,!1);else for(const e of i)Qs(e,t,!0)}function Ys(e,t){let s;for(;null!==(s=t.exec(e));){if("/"===s[0]){const s=e.charCodeAt(t.lastIndex);if(42===s){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}if(47===s){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}return t.lastIndex=0,!1}return!0}const Xs=[["pure",/[#@]__PURE__/],["noSideEffects",/[#@]__NO_SIDE_EFFECTS__/]];function Qs(e,t,s){const i=s?Us:Gs,n=e[i];n?n.push(t):e[i]=[t]}const Zs={ImportExpression:["arguments"],Literal:[],Program:["body"]};const Js="variables";class ei extends re{constructor(e,t,s,i=!1){super(),this.deoptimized=!1,this.esTreeNode=i?e:null,this.keys=Zs[e.type]||function(e){return Zs[e.type]=Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))),Zs[e.type]}(e),this.parent=t,this.context=t.context,this.createScope(s),this.parseNode(e),this.initialise(),this.context.magicString.addSourcemapLocation(this.start),this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.keys){const s=this[t];if(null!==s)if(Array.isArray(s)){for(const t of s)if(t?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Y,this.assignmentInteraction,e)}include(e,t,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.include(e,t);else i.include(e,t)}}includeAsAssignmentTarget(e,t,s){this.include(e,t)}initialise(){}insertSemicolon(e){";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}parseNode(e,t){for(const[s,i]of Object.entries(e))if(!this.hasOwnProperty(s))if(95===s.charCodeAt(0)){if(s===Us){const e=i;this.annotations=e,this.context.options.treeshake.annotations&&(this.annotationNoSideEffects=e.some((e=>"noSideEffects"===e.annotationType)),this.annotationPure=e.some((e=>"pure"===e.annotationType)))}else if(s===Gs)for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}else if("object"!=typeof i||null===i)this[s]=i;else if(Array.isArray(i)){this[s]=[];for(const e of i)this[s].push(null===e?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(s)))}else this[s]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope,t?.includes(s))}render(e,t){for(const s of this.keys){const i=this[s];if(null!==i)if(Array.isArray(i))for(const s of i)s?.render(e,t);else i.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(is())}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.keys){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(X);else t.deoptimizePath(X)}this.context.requestTreeshakingPass()}}class ti extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[W,...t],s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(X,ce,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([W,W]),this.context.requestTreeshakingPass()}}class si extends re{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},s){2===t&&0===s.length&&this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Z)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?ae:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||oe:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(e.length>(0===i?1:0))return!0;if(2===i){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Z,he,s))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Y,ue,s))return!0}return!1}}const ii=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:as})],ni=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:us})],ri=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:cs})],oi=[new si({callsArgs:null,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:oe})],ai=/^\d+$/;class li extends re{constructor(e,t,s=!1){if(super(),this.prototypeExpression=t,this.immutable=s,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.hasLostTrack=!1,this.hasUnknownDeoptimizedInteger=!1,this.hasUnknownDeoptimizedProperty=!1,this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(X);this.prototypeExpression?.deoptimizePath([W,W]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,s){const[i,...n]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof i&&this.deoptimizedPaths[i]))return void le(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(a[i]){const t=l[i];if(t)for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s);if(ai.test(i))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}else{for(const t of[...Object.values(l),c])for(const i of t)i.deoptimizeArgumentsOnInteractionAtPath(e,n,s);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,n,s)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(ai.test(e))for(const e of t)e.deoptimizePath(X);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if("string"!=typeof t)return t===H?this.deoptimizeIntegerProperties():this.deoptimizeAllProperties(t===q);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const s=1===e.length?X:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(s);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,W]:e)}getLiteralValueAtPath(e,t,s){if(0===e.length)return ne;const i=e[0],n=this.getMemberExpressionAndTrackDeopt(i,s);return n?n.getLiteralValueAtPath(e.slice(1),t,s):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,s):1!==e.length?ie:void 0}getReturnExpressionWhenCalledAtPath(e,t,s,i){if(0===e.length)return ae;const[n,...r]=e,o=this.getMemberExpressionAndTrackDeopt(n,i);return o?o.getReturnExpressionWhenCalledAtPath(r,t,s,i):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,s,i):ae}hasEffectsOnInteractionAtPath(e,t,s){const[i,...n]=e;if(n.length>0||2===t.type){const r=this.getMemberExpression(i);return r?r.hasEffectsOnInteractionAtPath(n,t,s):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}if(i===q)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if("string"==typeof i){if(r[i]){const e=o[i];if(e)for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(n,t,s))return!0}else for(const e of[...Object.values(o),a])for(const i of e)if(i.hasEffectsOnInteractionAtPath(n,t,s))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,s)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,h=[];for(let u=e.length-1;u>=0;u--){const{key:d,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof d)"set"===p?i[d]||(i[d]=[f,...h],n[d]=[f,...c]):"get"===p?s[d]||(s[d]=[f,...a],r[d]=[f,...l]):(i[d]||(i[d]=[f,...h]),s[d]||(s[d]=[f,...a]));else{if(d===H){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&h.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(X)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(ai.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Z)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&ai.test(e)||this.deoptimizedPaths[e])return oe;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&ai.test(e)?oe:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return oe;const s=this.getMemberExpression(e);if(s!==oe&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return s}}const ci=e=>"string"==typeof e&&/^\d+$/.test(e),hi=new class extends re{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||ci(t[0])||le(e)}getLiteralValueAtPath(e){return 1===e.length&&ci(e[0])?void 0:ie}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ui=new li({__proto__:null,hasOwnProperty:ii,isPrototypeOf:ii,propertyIsEnumerable:ii,toLocaleString:ni,toString:ni,valueOf:oi},hi,!0),di=[{key:H,kind:"init",property:oe},{key:"length",kind:"init",property:cs}],pi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:as})],fi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:cs})],mi=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:()=>new li(di,ki),returnsPrimitive:null})],gi=[new si({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new li(di,ki),returnsPrimitive:null})],yi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new li(di,ki),returnsPrimitive:null})],xi=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:cs})],Ei=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:oe})],bi=[new si({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:oe})],vi=[new si({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:oe})],Si=[new si({callsArgs:null,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ai=[new si({callsArgs:[0],mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ki=new li({__proto__:null,at:bi,concat:gi,copyWithin:Si,entries:gi,every:pi,fill:Si,filter:yi,find:vi,findIndex:fi,findLast:vi,findLastIndex:fi,flat:gi,flatMap:yi,forEach:vi,includes:ii,indexOf:ri,join:ni,keys:oi,lastIndexOf:ri,map:yi,pop:Ei,push:xi,reduce:vi,reduceRight:vi,reverse:Si,shift:Ei,slice:gi,some:pi,sort:Ai,splice:mi,toLocaleString:ni,toString:ni,unshift:xi,values:bi},ui,!0);class Ii extends ei{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;tthis.init.deoptimizeArgumentsOnInteractionAtPath(e,t,s)),void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){if(!this.isReassigned){this.isReassigned=!0;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=ge;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(X)}}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.isReassigned?ie:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getLiteralValueAtPath(e,t,s))),ie)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.isReassigned?ae:s.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(i),this.init.getReturnExpressionWhenCalledAtPath(e,t,s,i))),ae)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return!!this.isReassigned||!s.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!s.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s));case 2:return!!this.isReassigned||!(t.withNew?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,s)}}include(){if(!this.included){this.included=!0;for(const e of this.declarations){e.included||e.include(ss(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==Ms);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const s of t)s.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=oe,this.isReassigned=!0),this.additionalInitializers}mergeDeclarations(e){const{declarations:t}=this;for(const s of e.declarations)t.push(s);const s=this.markInitializersForDeoptimization();if(s.push(e.init),e.additionalInitializers)for(const t of e.additionalInitializers)s.push(t)}}const Ci=ge,$i=new Set([W]),Ni=new ee,_i=new Set([oe]);class Ri extends Pi{constructor(e,t,s){super(e,t,oe,s),this.deoptimizationInteractions=[],this.deoptimizations=new ee,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===oe){if(!this.entitiesToBeDeoptimized.has(oe)){this.entitiesToBeDeoptimized.add(oe);for(const{interaction:e}of this.deoptimizationInteractions)le(e);this.deoptimizationInteractions=Ci}}else if(this.deoptimizedFields.has(W))e.deoptimizePath(X);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:s}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,s,te)}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(oe)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(W)||2===e.type&&this.deoptimizedFields.has(t[0])))le(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const s of this.entitiesToBeDeoptimized)s.deoptimizeArgumentsOnInteractionAtPath(e,t,te);this.entitiesToBeDeoptimized.has(oe)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length||this.deoptimizedFields.has(W))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const t of this.entitiesToBeDeoptimized)t.deoptimizePath(e);t===W&&(this.deoptimizationInteractions=Ci,this.deoptimizations=Ni,this.deoptimizedFields=$i,this.entitiesToBeDeoptimized=_i)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(X):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),ae}}const Oi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$",Di=64;function Ti(e){let t="";do{const s=e%Di;e=e/Di|0,t=Oi[s]+t}while(0!==e);return t}function Li(e,t,s){let i=e,n=1;for(;t.has(i)||xe.has(i)||s?.has(i);)i=`${e}$${Ti(n++)}`;return t.add(i),i}let Mi=class{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,s,i){const n=e.name;let r=this.variables.get(n);return r?r.addDeclaration(e,s):(r=new Pi(e.name,e,s||rs,t),this.variables.set(n,r)),r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class Vi extends Mi{constructor(e){super(),this.accessedOutsideVariables=new Map,this.parent=e,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Vi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const s=t.get(this)||new Set;for(const t of e)s.add(t);t.set(this,s),this.parent instanceof Vi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Vi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,s,i){for(const i of this.accessedOutsideVariables.values())i.included&&(e.add(i.getBaseVariableName()),"system"===t&&s.has(i)&&e.add("exports"));const n=i.get(this);if(n)for(const t of n)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,s){const i=new Set;if(this.addUsedOutsideNames(i,e,t,s),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&i.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,Li(e,i,t.forbiddenNames));for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,s),s}}class Bi extends Vi{constructor(e,t){super(e),this.parameters=[],this.hasRest=!1,this.context=t,this.hoistedBodyVarScope=new Vi(this)}addParameterDeclaration(e){const{name:t}=e,s=new Ri(t,e,this.context),i=this.hoistedBodyVarScope.variables.get(t);return i&&(this.hoistedBodyVarScope.variables.set(t,s),s.mergeDeclarations(i)),this.variables.set(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let s=!1,i=!1;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const s of t)if(s instanceof ti){for(const s of t)s.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n,a=t[r];if(o)if(s=!1,0===o.length)i=!0;else for(const e of o)e.included&&(i=!0),e.calledFromTryStatement&&(s=!0);!i&&a.shouldBeIncluded(e)&&(i=!0),i&&a.include(e,s)}}}class zi extends Bi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=oe;for(const e of this.returnExpressions)e.deoptimizePath(X)}}}function Fi(e,t){if("MemberExpression"===e.type)return!e.computed&&Fi(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const ji=Symbol("PureFunction"),Ui=()=>{},Gi=Symbol("Value Properties"),Wi=()=>ne,qi=()=>!0,Hi={deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:()=>!1},Ki={deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:qi},Yi={__proto__:null,[Gi]:Ki},Xi={__proto__:null,[Gi]:Hi},Qi={__proto__:null,[Gi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(X)},getLiteralValue:Wi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Q,he,t)}},Zi={__proto__:null,[Gi]:Ki,prototype:Yi},Ji={__proto__:null,[Gi]:Hi,prototype:Yi},en={__proto__:null,[Gi]:{deoptimizeArgumentsOnCall:Ui,getLiteralValue:Wi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Ii)},prototype:Yi},tn={__proto__:null,[Gi]:Hi,from:Yi,of:Xi,prototype:Yi},sn={__proto__:null,[Gi]:Hi,supportedLocalesOf:Ji},nn={global:Yi,globalThis:Yi,self:Yi,window:Yi,__proto__:null,[Gi]:Ki,Array:{__proto__:null,[Gi]:Ki,from:Yi,isArray:Xi,of:Xi,prototype:Yi},ArrayBuffer:{__proto__:null,[Gi]:Hi,isView:Xi,prototype:Yi},Atomics:Yi,BigInt:Zi,BigInt64Array:Zi,BigUint64Array:Zi,Boolean:Ji,constructor:Zi,DataView:Ji,Date:{__proto__:null,[Gi]:Hi,now:Xi,parse:Xi,prototype:Yi,UTC:Xi},decodeURI:Xi,decodeURIComponent:Xi,encodeURI:Xi,encodeURIComponent:Xi,Error:Ji,escape:Xi,eval:Yi,EvalError:Ji,Float32Array:tn,Float64Array:tn,Function:Zi,hasOwnProperty:Yi,Infinity:Yi,Int16Array:tn,Int32Array:tn,Int8Array:tn,isFinite:Xi,isNaN:Xi,isPrototypeOf:Yi,JSON:Yi,Map:en,Math:{__proto__:null,[Gi]:Ki,abs:Xi,acos:Xi,acosh:Xi,asin:Xi,asinh:Xi,atan:Xi,atan2:Xi,atanh:Xi,cbrt:Xi,ceil:Xi,clz32:Xi,cos:Xi,cosh:Xi,exp:Xi,expm1:Xi,floor:Xi,fround:Xi,hypot:Xi,imul:Xi,log:Xi,log10:Xi,log1p:Xi,log2:Xi,max:Xi,min:Xi,pow:Xi,random:Xi,round:Xi,sign:Xi,sin:Xi,sinh:Xi,sqrt:Xi,tan:Xi,tanh:Xi,trunc:Xi},NaN:Yi,Number:{__proto__:null,[Gi]:Hi,isFinite:Xi,isInteger:Xi,isNaN:Xi,isSafeInteger:Xi,parseFloat:Xi,parseInt:Xi,prototype:Yi},Object:{__proto__:null,[Gi]:Hi,create:Xi,defineProperty:Qi,defineProperties:Qi,freeze:Qi,getOwnPropertyDescriptor:Xi,getOwnPropertyDescriptors:Xi,getOwnPropertyNames:Xi,getOwnPropertySymbols:Xi,getPrototypeOf:Xi,hasOwn:Xi,is:Xi,isExtensible:Xi,isFrozen:Xi,isSealed:Xi,keys:Xi,fromEntries:Yi,entries:Xi,prototype:Yi},parseFloat:Xi,parseInt:Xi,Promise:{__proto__:null,[Gi]:Ki,all:Yi,allSettled:Yi,any:Yi,prototype:Yi,race:Yi,reject:Yi,resolve:Yi},propertyIsEnumerable:Yi,Proxy:Yi,RangeError:Ji,ReferenceError:Ji,Reflect:Yi,RegExp:Ji,Set:en,SharedArrayBuffer:Zi,String:{__proto__:null,[Gi]:Hi,fromCharCode:Xi,fromCodePoint:Xi,prototype:Yi,raw:Xi},Symbol:{__proto__:null,[Gi]:Hi,for:Xi,keyFor:Xi,prototype:Yi,toStringTag:{__proto__:null,[Gi]:{deoptimizeArgumentsOnCall:Ui,getLiteralValue:()=>K,hasEffectsWhenCalled:qi}}},SyntaxError:Ji,toLocaleString:Yi,toString:Yi,TypeError:Ji,Uint16Array:tn,Uint32Array:tn,Uint8Array:tn,Uint8ClampedArray:tn,unescape:Xi,URIError:Ji,valueOf:Yi,WeakMap:en,WeakSet:en,clearInterval:Zi,clearTimeout:Zi,console:{__proto__:null,[Gi]:Ki,assert:Zi,clear:Zi,count:Zi,countReset:Zi,debug:Zi,dir:Zi,dirxml:Zi,error:Zi,exception:Zi,group:Zi,groupCollapsed:Zi,groupEnd:Zi,info:Zi,log:Zi,table:Zi,time:Zi,timeEnd:Zi,timeLog:Zi,trace:Zi,warn:Zi},Intl:{__proto__:null,[Gi]:Ki,Collator:sn,DateTimeFormat:sn,ListFormat:sn,NumberFormat:sn,PluralRules:sn,RelativeTimeFormat:sn},setInterval:Zi,setTimeout:Zi,TextDecoder:Zi,TextEncoder:Zi,URL:Zi,URLSearchParams:Zi,AbortController:Zi,AbortSignal:Zi,addEventListener:Yi,alert:Yi,AnalyserNode:Zi,Animation:Zi,AnimationEvent:Zi,applicationCache:Yi,ApplicationCache:Zi,ApplicationCacheErrorEvent:Zi,atob:Yi,Attr:Zi,Audio:Zi,AudioBuffer:Zi,AudioBufferSourceNode:Zi,AudioContext:Zi,AudioDestinationNode:Zi,AudioListener:Zi,AudioNode:Zi,AudioParam:Zi,AudioProcessingEvent:Zi,AudioScheduledSourceNode:Zi,AudioWorkletNode:Zi,BarProp:Zi,BaseAudioContext:Zi,BatteryManager:Zi,BeforeUnloadEvent:Zi,BiquadFilterNode:Zi,Blob:Zi,BlobEvent:Zi,blur:Yi,BroadcastChannel:Zi,btoa:Yi,ByteLengthQueuingStrategy:Zi,Cache:Zi,caches:Yi,CacheStorage:Zi,cancelAnimationFrame:Yi,cancelIdleCallback:Yi,CanvasCaptureMediaStreamTrack:Zi,CanvasGradient:Zi,CanvasPattern:Zi,CanvasRenderingContext2D:Zi,ChannelMergerNode:Zi,ChannelSplitterNode:Zi,CharacterData:Zi,clientInformation:Yi,ClipboardEvent:Zi,close:Yi,closed:Yi,CloseEvent:Zi,Comment:Zi,CompositionEvent:Zi,confirm:Yi,ConstantSourceNode:Zi,ConvolverNode:Zi,CountQueuingStrategy:Zi,createImageBitmap:Yi,Credential:Zi,CredentialsContainer:Zi,crypto:Yi,Crypto:Zi,CryptoKey:Zi,CSS:Zi,CSSConditionRule:Zi,CSSFontFaceRule:Zi,CSSGroupingRule:Zi,CSSImportRule:Zi,CSSKeyframeRule:Zi,CSSKeyframesRule:Zi,CSSMediaRule:Zi,CSSNamespaceRule:Zi,CSSPageRule:Zi,CSSRule:Zi,CSSRuleList:Zi,CSSStyleDeclaration:Zi,CSSStyleRule:Zi,CSSStyleSheet:Zi,CSSSupportsRule:Zi,CustomElementRegistry:Zi,customElements:Yi,CustomEvent:Zi,DataTransfer:Zi,DataTransferItem:Zi,DataTransferItemList:Zi,defaultstatus:Yi,defaultStatus:Yi,DelayNode:Zi,DeviceMotionEvent:Zi,DeviceOrientationEvent:Zi,devicePixelRatio:Yi,dispatchEvent:Yi,document:Yi,Document:Zi,DocumentFragment:Zi,DocumentType:Zi,DOMError:Zi,DOMException:Zi,DOMImplementation:Zi,DOMMatrix:Zi,DOMMatrixReadOnly:Zi,DOMParser:Zi,DOMPoint:Zi,DOMPointReadOnly:Zi,DOMQuad:Zi,DOMRect:Zi,DOMRectReadOnly:Zi,DOMStringList:Zi,DOMStringMap:Zi,DOMTokenList:Zi,DragEvent:Zi,DynamicsCompressorNode:Zi,Element:Zi,ErrorEvent:Zi,Event:Zi,EventSource:Zi,EventTarget:Zi,external:Yi,fetch:Yi,File:Zi,FileList:Zi,FileReader:Zi,find:Yi,focus:Yi,FocusEvent:Zi,FontFace:Zi,FontFaceSetLoadEvent:Zi,FormData:Zi,frames:Yi,GainNode:Zi,Gamepad:Zi,GamepadButton:Zi,GamepadEvent:Zi,getComputedStyle:Yi,getSelection:Yi,HashChangeEvent:Zi,Headers:Zi,history:Yi,History:Zi,HTMLAllCollection:Zi,HTMLAnchorElement:Zi,HTMLAreaElement:Zi,HTMLAudioElement:Zi,HTMLBaseElement:Zi,HTMLBodyElement:Zi,HTMLBRElement:Zi,HTMLButtonElement:Zi,HTMLCanvasElement:Zi,HTMLCollection:Zi,HTMLContentElement:Zi,HTMLDataElement:Zi,HTMLDataListElement:Zi,HTMLDetailsElement:Zi,HTMLDialogElement:Zi,HTMLDirectoryElement:Zi,HTMLDivElement:Zi,HTMLDListElement:Zi,HTMLDocument:Zi,HTMLElement:Zi,HTMLEmbedElement:Zi,HTMLFieldSetElement:Zi,HTMLFontElement:Zi,HTMLFormControlsCollection:Zi,HTMLFormElement:Zi,HTMLFrameElement:Zi,HTMLFrameSetElement:Zi,HTMLHeadElement:Zi,HTMLHeadingElement:Zi,HTMLHRElement:Zi,HTMLHtmlElement:Zi,HTMLIFrameElement:Zi,HTMLImageElement:Zi,HTMLInputElement:Zi,HTMLLabelElement:Zi,HTMLLegendElement:Zi,HTMLLIElement:Zi,HTMLLinkElement:Zi,HTMLMapElement:Zi,HTMLMarqueeElement:Zi,HTMLMediaElement:Zi,HTMLMenuElement:Zi,HTMLMetaElement:Zi,HTMLMeterElement:Zi,HTMLModElement:Zi,HTMLObjectElement:Zi,HTMLOListElement:Zi,HTMLOptGroupElement:Zi,HTMLOptionElement:Zi,HTMLOptionsCollection:Zi,HTMLOutputElement:Zi,HTMLParagraphElement:Zi,HTMLParamElement:Zi,HTMLPictureElement:Zi,HTMLPreElement:Zi,HTMLProgressElement:Zi,HTMLQuoteElement:Zi,HTMLScriptElement:Zi,HTMLSelectElement:Zi,HTMLShadowElement:Zi,HTMLSlotElement:Zi,HTMLSourceElement:Zi,HTMLSpanElement:Zi,HTMLStyleElement:Zi,HTMLTableCaptionElement:Zi,HTMLTableCellElement:Zi,HTMLTableColElement:Zi,HTMLTableElement:Zi,HTMLTableRowElement:Zi,HTMLTableSectionElement:Zi,HTMLTemplateElement:Zi,HTMLTextAreaElement:Zi,HTMLTimeElement:Zi,HTMLTitleElement:Zi,HTMLTrackElement:Zi,HTMLUListElement:Zi,HTMLUnknownElement:Zi,HTMLVideoElement:Zi,IDBCursor:Zi,IDBCursorWithValue:Zi,IDBDatabase:Zi,IDBFactory:Zi,IDBIndex:Zi,IDBKeyRange:Zi,IDBObjectStore:Zi,IDBOpenDBRequest:Zi,IDBRequest:Zi,IDBTransaction:Zi,IDBVersionChangeEvent:Zi,IdleDeadline:Zi,IIRFilterNode:Zi,Image:Zi,ImageBitmap:Zi,ImageBitmapRenderingContext:Zi,ImageCapture:Zi,ImageData:Zi,indexedDB:Yi,innerHeight:Yi,innerWidth:Yi,InputEvent:Zi,IntersectionObserver:Zi,IntersectionObserverEntry:Zi,isSecureContext:Yi,KeyboardEvent:Zi,KeyframeEffect:Zi,length:Yi,localStorage:Yi,location:Yi,Location:Zi,locationbar:Yi,matchMedia:Yi,MediaDeviceInfo:Zi,MediaDevices:Zi,MediaElementAudioSourceNode:Zi,MediaEncryptedEvent:Zi,MediaError:Zi,MediaKeyMessageEvent:Zi,MediaKeySession:Zi,MediaKeyStatusMap:Zi,MediaKeySystemAccess:Zi,MediaList:Zi,MediaQueryList:Zi,MediaQueryListEvent:Zi,MediaRecorder:Zi,MediaSettingsRange:Zi,MediaSource:Zi,MediaStream:Zi,MediaStreamAudioDestinationNode:Zi,MediaStreamAudioSourceNode:Zi,MediaStreamEvent:Zi,MediaStreamTrack:Zi,MediaStreamTrackEvent:Zi,menubar:Yi,MessageChannel:Zi,MessageEvent:Zi,MessagePort:Zi,MIDIAccess:Zi,MIDIConnectionEvent:Zi,MIDIInput:Zi,MIDIInputMap:Zi,MIDIMessageEvent:Zi,MIDIOutput:Zi,MIDIOutputMap:Zi,MIDIPort:Zi,MimeType:Zi,MimeTypeArray:Zi,MouseEvent:Zi,moveBy:Yi,moveTo:Yi,MutationEvent:Zi,MutationObserver:Zi,MutationRecord:Zi,name:Yi,NamedNodeMap:Zi,NavigationPreloadManager:Zi,navigator:Yi,Navigator:Zi,NetworkInformation:Zi,Node:Zi,NodeFilter:Yi,NodeIterator:Zi,NodeList:Zi,Notification:Zi,OfflineAudioCompletionEvent:Zi,OfflineAudioContext:Zi,offscreenBuffering:Yi,OffscreenCanvas:Zi,open:Yi,openDatabase:Yi,Option:Zi,origin:Yi,OscillatorNode:Zi,outerHeight:Yi,outerWidth:Yi,PageTransitionEvent:Zi,pageXOffset:Yi,pageYOffset:Yi,PannerNode:Zi,parent:Yi,Path2D:Zi,PaymentAddress:Zi,PaymentRequest:Zi,PaymentRequestUpdateEvent:Zi,PaymentResponse:Zi,performance:Yi,Performance:Zi,PerformanceEntry:Zi,PerformanceLongTaskTiming:Zi,PerformanceMark:Zi,PerformanceMeasure:Zi,PerformanceNavigation:Zi,PerformanceNavigationTiming:Zi,PerformanceObserver:Zi,PerformanceObserverEntryList:Zi,PerformancePaintTiming:Zi,PerformanceResourceTiming:Zi,PerformanceTiming:Zi,PeriodicWave:Zi,Permissions:Zi,PermissionStatus:Zi,personalbar:Yi,PhotoCapabilities:Zi,Plugin:Zi,PluginArray:Zi,PointerEvent:Zi,PopStateEvent:Zi,postMessage:Yi,Presentation:Zi,PresentationAvailability:Zi,PresentationConnection:Zi,PresentationConnectionAvailableEvent:Zi,PresentationConnectionCloseEvent:Zi,PresentationConnectionList:Zi,PresentationReceiver:Zi,PresentationRequest:Zi,print:Yi,ProcessingInstruction:Zi,ProgressEvent:Zi,PromiseRejectionEvent:Zi,prompt:Yi,PushManager:Zi,PushSubscription:Zi,PushSubscriptionOptions:Zi,queueMicrotask:Yi,RadioNodeList:Zi,Range:Zi,ReadableStream:Zi,RemotePlayback:Zi,removeEventListener:Yi,Request:Zi,requestAnimationFrame:Yi,requestIdleCallback:Yi,resizeBy:Yi,ResizeObserver:Zi,ResizeObserverEntry:Zi,resizeTo:Yi,Response:Zi,RTCCertificate:Zi,RTCDataChannel:Zi,RTCDataChannelEvent:Zi,RTCDtlsTransport:Zi,RTCIceCandidate:Zi,RTCIceTransport:Zi,RTCPeerConnection:Zi,RTCPeerConnectionIceEvent:Zi,RTCRtpReceiver:Zi,RTCRtpSender:Zi,RTCSctpTransport:Zi,RTCSessionDescription:Zi,RTCStatsReport:Zi,RTCTrackEvent:Zi,screen:Yi,Screen:Zi,screenLeft:Yi,ScreenOrientation:Zi,screenTop:Yi,screenX:Yi,screenY:Yi,ScriptProcessorNode:Zi,scroll:Yi,scrollbars:Yi,scrollBy:Yi,scrollTo:Yi,scrollX:Yi,scrollY:Yi,SecurityPolicyViolationEvent:Zi,Selection:Zi,ServiceWorker:Zi,ServiceWorkerContainer:Zi,ServiceWorkerRegistration:Zi,sessionStorage:Yi,ShadowRoot:Zi,SharedWorker:Zi,SourceBuffer:Zi,SourceBufferList:Zi,speechSynthesis:Yi,SpeechSynthesisEvent:Zi,SpeechSynthesisUtterance:Zi,StaticRange:Zi,status:Yi,statusbar:Yi,StereoPannerNode:Zi,stop:Yi,Storage:Zi,StorageEvent:Zi,StorageManager:Zi,styleMedia:Yi,StyleSheet:Zi,StyleSheetList:Zi,SubtleCrypto:Zi,SVGAElement:Zi,SVGAngle:Zi,SVGAnimatedAngle:Zi,SVGAnimatedBoolean:Zi,SVGAnimatedEnumeration:Zi,SVGAnimatedInteger:Zi,SVGAnimatedLength:Zi,SVGAnimatedLengthList:Zi,SVGAnimatedNumber:Zi,SVGAnimatedNumberList:Zi,SVGAnimatedPreserveAspectRatio:Zi,SVGAnimatedRect:Zi,SVGAnimatedString:Zi,SVGAnimatedTransformList:Zi,SVGAnimateElement:Zi,SVGAnimateMotionElement:Zi,SVGAnimateTransformElement:Zi,SVGAnimationElement:Zi,SVGCircleElement:Zi,SVGClipPathElement:Zi,SVGComponentTransferFunctionElement:Zi,SVGDefsElement:Zi,SVGDescElement:Zi,SVGDiscardElement:Zi,SVGElement:Zi,SVGEllipseElement:Zi,SVGFEBlendElement:Zi,SVGFEColorMatrixElement:Zi,SVGFEComponentTransferElement:Zi,SVGFECompositeElement:Zi,SVGFEConvolveMatrixElement:Zi,SVGFEDiffuseLightingElement:Zi,SVGFEDisplacementMapElement:Zi,SVGFEDistantLightElement:Zi,SVGFEDropShadowElement:Zi,SVGFEFloodElement:Zi,SVGFEFuncAElement:Zi,SVGFEFuncBElement:Zi,SVGFEFuncGElement:Zi,SVGFEFuncRElement:Zi,SVGFEGaussianBlurElement:Zi,SVGFEImageElement:Zi,SVGFEMergeElement:Zi,SVGFEMergeNodeElement:Zi,SVGFEMorphologyElement:Zi,SVGFEOffsetElement:Zi,SVGFEPointLightElement:Zi,SVGFESpecularLightingElement:Zi,SVGFESpotLightElement:Zi,SVGFETileElement:Zi,SVGFETurbulenceElement:Zi,SVGFilterElement:Zi,SVGForeignObjectElement:Zi,SVGGElement:Zi,SVGGeometryElement:Zi,SVGGradientElement:Zi,SVGGraphicsElement:Zi,SVGImageElement:Zi,SVGLength:Zi,SVGLengthList:Zi,SVGLinearGradientElement:Zi,SVGLineElement:Zi,SVGMarkerElement:Zi,SVGMaskElement:Zi,SVGMatrix:Zi,SVGMetadataElement:Zi,SVGMPathElement:Zi,SVGNumber:Zi,SVGNumberList:Zi,SVGPathElement:Zi,SVGPatternElement:Zi,SVGPoint:Zi,SVGPointList:Zi,SVGPolygonElement:Zi,SVGPolylineElement:Zi,SVGPreserveAspectRatio:Zi,SVGRadialGradientElement:Zi,SVGRect:Zi,SVGRectElement:Zi,SVGScriptElement:Zi,SVGSetElement:Zi,SVGStopElement:Zi,SVGStringList:Zi,SVGStyleElement:Zi,SVGSVGElement:Zi,SVGSwitchElement:Zi,SVGSymbolElement:Zi,SVGTextContentElement:Zi,SVGTextElement:Zi,SVGTextPathElement:Zi,SVGTextPositioningElement:Zi,SVGTitleElement:Zi,SVGTransform:Zi,SVGTransformList:Zi,SVGTSpanElement:Zi,SVGUnitTypes:Zi,SVGUseElement:Zi,SVGViewElement:Zi,TaskAttributionTiming:Zi,Text:Zi,TextEvent:Zi,TextMetrics:Zi,TextTrack:Zi,TextTrackCue:Zi,TextTrackCueList:Zi,TextTrackList:Zi,TimeRanges:Zi,toolbar:Yi,top:Yi,Touch:Zi,TouchEvent:Zi,TouchList:Zi,TrackEvent:Zi,TransitionEvent:Zi,TreeWalker:Zi,UIEvent:Zi,ValidityState:Zi,visualViewport:Yi,VisualViewport:Zi,VTTCue:Zi,WaveShaperNode:Zi,WebAssembly:Yi,WebGL2RenderingContext:Zi,WebGLActiveInfo:Zi,WebGLBuffer:Zi,WebGLContextEvent:Zi,WebGLFramebuffer:Zi,WebGLProgram:Zi,WebGLQuery:Zi,WebGLRenderbuffer:Zi,WebGLRenderingContext:Zi,WebGLSampler:Zi,WebGLShader:Zi,WebGLShaderPrecisionFormat:Zi,WebGLSync:Zi,WebGLTexture:Zi,WebGLTransformFeedback:Zi,WebGLUniformLocation:Zi,WebGLVertexArrayObject:Zi,WebSocket:Zi,WheelEvent:Zi,Window:Zi,Worker:Zi,WritableStream:Zi,XMLDocument:Zi,XMLHttpRequest:Zi,XMLHttpRequestEventTarget:Zi,XMLHttpRequestUpload:Zi,XMLSerializer:Zi,XPathEvaluator:Zi,XPathExpression:Zi,XPathResult:Zi,XSLTProcessor:Zi};for(const e of["window","global","self","globalThis"])nn[e]=nn;function rn(e){let t=nn;for(const s of e){if("string"!=typeof s)return null;if(t=t[s],!t)return null}return t[Gi]}class on extends de{constructor(){super(...arguments),this.isReassigned=!0}deoptimizeArgumentsOnInteractionAtPath(e,t,s){switch(e.type){case 0:case 1:return void(rn([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,s));case 2:{const i=rn([this.name,...t]);return void(i?i.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,s))}}}getLiteralValueAtPath(e,t,s){const i=rn([this.name,...e]);return i?i.getLiteralValue():ie}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!rn([this.name]):!rn([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const i=rn([this.name,...e]);return!i||i.hasEffectsWhenCalled(t,s)}}}}const an={__proto__:null,class:!0,const:!0,let:!0,var:!0};class ln extends ei{constructor(){super(...arguments),this.variable=null,this.isTDZAccess=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Fi(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this))}declare(e,t){let s;const{treeshake:i}=this.context.options;switch(e){case"var":s=this.scope.addDeclaration(this,this.context,t,!0),i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"class":s=this.scope.addDeclaration(this,this.context,t,!1);break;case"parameter":s=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return s.kind=e,[this.variable=s]}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const[n,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,s,i);return[n,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof on&&!this.isPureFunction(Y)&&this.variable.hasEffectsOnInteractionAtPath(Y,ce,e)}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,s);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,s)}}include(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(null!==this.isTDZAccess)return this.isTDZAccess;if(!(this.variable instanceof Pi&&this.variable.kind&&this.variable.kind in an&&this.variable.module===this.context.module))return this.isTDZAccess=!1;let e;return this.variable.declarations&&1===this.variable.declarations.length&&(e=this.variable.declarations[0])&&this.start=i)return i;n=e.charCodeAt(++s),++s,(s=47===n?e.indexOf("\n",s)+1:e.indexOf("*/",s)+2)>i&&(i=e.indexOf(t,s))}}const fn=/\S/g;function mn(e,t){fn.lastIndex=t;return fn.exec(e).index}function gn(e){let t,s,i=0;for(t=e.indexOf("\n",i);;){if(i=e.indexOf("/",i),-1===i||i>t)return[t,t+1];if(s=e.charCodeAt(i+1),47===s)return[i,t+1];i=e.indexOf("*/",i+3)+2,i>t&&(t=e.indexOf("\n",i))}}function yn(e,t,s,i,n){let r,o,a,l,c=e[0],h=!c.included||c.needsBoundaries;h&&(l=s+gn(t.original.slice(s,c.start))[1]);for(let s=1;s<=e.length;s++)r=c,o=l,a=h,c=e[s],h=void 0!==c&&(!c.included||c.needsBoundaries),a||h?(l=r.end+gn(t.original.slice(r.end,void 0===c?i:c.start))[1],r.included?a?r.render(t,n,{end:l,start:o}):r.render(t,n):hn(r,t,o,l)):r.render(t,n)}function xn(e,t,s,i){const n=[];let r,o,a,l,c=s-1;for(const i of e){for(void 0!==r&&(c=r.end+pn(t.original.slice(r.end,i.start),",")),o=a=c+1+gn(t.original.slice(c+1,i.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&n.push({contentEnd:a,end:o,node:r,separator:c,start:s}),r=i,s=o}return n.push({contentEnd:i,end:i,node:r,separator:null,start:s}),n}function En(e,t,s){for(;;){const[i,n]=gn(e.original.slice(t,s));if(-1===i)break;e.remove(t+i,t+=n)}}class bn extends Vi{addDeclaration(e,t,s,i){if(i){const n=this.parent.addDeclaration(e,t,s,i);return n.markInitializersForDeoptimization(),n}return super.addDeclaration(e,t,s,!1)}}class vn extends ei{initialise(){var e,t;this.directive&&"use strict"!==this.directive&&this.parent.type===Ms&&this.context.log(Se,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${M(t)}" was ignored.`}),this.start)}render(e,t){super.render(e,t),this.included&&this.insertSemicolon(e)}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ms:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class Sn extends ei{constructor(){super(...arguments),this.directlyIncluded=!1}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(oe)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new bn(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof vn&&"use asm"===e.directive}render(e,t){this.body.length>0?yn(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class An extends ei{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,oe)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Y)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Y,t,s)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([W,W]),this.context.requestTreeshakingPass())}}class kn extends ei{constructor(){super(...arguments),this.objectEntity=null,this.deoptimizedReturn=!1}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(2===e.type){const{parameters:t}=this.scope,{args:s}=e;let i=!1;for(let e=0;e0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(X),this.context.requestTreeshakingPass()),ae):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,s){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ue,s)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],ce,s)))return!0}for(const e of this.params)if(e.hasEffects(s))return!0;return!1}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:s}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=s}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",oe))),this.params[this.params.length-1]instanceof An),this.body instanceof Sn?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body)}parseNode(e){e.body.type===ws&&(this.body=new Sn(e.body,this,this.scope.hoistedBodyVarScope)),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}kn.prototype.preventChildBlockScope=!0;class In extends kn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new zi(e,this.context)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const{ignore:e,brokenFlow:t}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(s))return!0;s.ignore=e,s.brokenFlow=t}return!1}include(e,t){super.include(e,t);for(const s of this.params)s instanceof ln||s.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new li([],ui)}}function wn(e,{exportNamesByVariable:t,snippets:{_:s,getObject:i,getPropertyAccess:n}},r=""){if(1===e.length&&1===t.get(e[0]).length){const i=e[0];return`exports('${t.get(i)}',${s}${i.getName(n)}${r})`}{const s=[];for(const i of e)for(const e of t.get(i))s.push([e,i.getName(n)+r]);return`exports(${i(s,{lineBreakIndent:null})})`}}function Pn(e,t,s,i,{exportNamesByVariable:n,snippets:{_:r}}){i.prependRight(t,`exports('${n.get(e)}',${r}`),i.appendLeft(s,")")}function Cn(e,t,s,i,n,r){const{_:o,getPropertyAccess:a}=r.snippets;n.appendLeft(s,`,${o}${wn([e],r)},${o}${e.getName(a)}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}class $n extends ei{addExportedVariables(e,t){for(const s of this.properties)"Property"===s.type?s.value.addExportedVariables(e,t):s.argument.addExportedVariables(e,t)}declare(e,t){const s=[];for(const i of this.properties)s.push(...i.declare(e,t));return s}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Y,t,s))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class Nn extends Pi{constructor(e){super("arguments",null,oe,e),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(X):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(X);this.deoptimizedArguments.length=0}}class _n extends Ri{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,s){return(s.replacedVariableInits.get(this)||oe).hasEffectsOnInteractionAtPath(e,t,s)}}class Rn extends zi{constructor(e,t){super(e,t),this.variables.set("arguments",this.argumentsVariable=new Nn(t)),this.variables.set("this",this.thisVariable=new _n(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const s of t)s.included||s.include(e,!1)}}class On extends kn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Rn(e,this.context),this.constructedEntity=new li(Object.create(null),ui),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){super.deoptimizeArgumentsOnInteractionAtPath(e,t,s),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){if(super.hasEffectsOnInteractionAtPath(e,t,s))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=s.replacedVariableInits.get(this.scope.thisVariable);s.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:oe);const{brokenFlow:i,ignore:n,replacedVariableInits:r}=s;if(s.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(s))return!0;s.brokenFlow=i,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),s.ignore=n}return!1}include(e,t){super.include(e,t),this.id?.include();const s=this.scope.argumentsVariable.included;for(const i of this.params)i instanceof ln&&!s||i.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new li([{key:"prototype",kind:"init",property:new li([],ui)}],ui)}}class Dn extends ei{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof On||e instanceof In)break e}while(e=e.parent);this.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Tn={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>ee<e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,"|":(e,t)=>e|t};function Ln(e,t,s){if(s.arguments.length>0)if(s.arguments[s.arguments.length-1].included)for(const i of s.arguments)i.render(e,t);else{let i=s.arguments.length-2;for(;i>=0&&!s.arguments[i].included;)i--;if(i>=0){for(let n=0;n<=i;n++)s.arguments[n].render(e,t);e.remove(pn(e.original,",",s.arguments[i].end),s.end-1)}else e.remove(pn(e.original,"(",s.callee.end)+1,s.end-1)}}class Mn extends ei{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.context.code.charCodeAt(this.start)?ie:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ae:bs(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,s){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||(1!==e.length||Es(this.members,e[0],t,s))}}initialise(){this.members=function(e){if(e instanceof RegExp)return ys;switch(typeof e){case"boolean":return ms;case"number":return gs;case"string":return xs}return Object.create(null)}(this.value)}parseNode(e){this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Vn(e){return e.computed?function(e){if(e instanceof Mn)return String(e.value);return null}(e.property):e.property.name}function Bn(e){const t=e.propertyKey,s=e.object;if("string"==typeof t){if(s instanceof ln)return[{key:s.name,pos:s.start},{key:t,pos:e.property.start}];if(s instanceof zn){const i=Bn(s);return i&&[...i,{key:t,pos:e.property.start}]}}return null}class zn extends ei{constructor(){super(...arguments),this.variable=null,this.assignmentDeoptimized=!1,this.bound=!1,this.expressionsToBeDeoptimized=[],this.isUndefined=!1}bind(){this.bound=!0;const e=Bn(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const s=Fn(t,e.slice(1),this.context);s?"undefined"===s?this.isUndefined=!0:(this.variable=s,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let s=1;s!!e&&e!==oe));if(0!==o.length)if(n===oe)for(const e of o)e.deoptimizePath(X);else s.withTrackedEntityAtPath(t,n,(()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);n.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}),null)}deoptimizeCache(){if(this.returnExpression?.[0]!==oe){this.returnExpression=ae;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ye,this.deoptimizableDependentExpressions=ge;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(X)}}deoptimizePath(e){if(0===e.length||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==oe&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){const[i]=this.getReturnExpression(t);return i===oe?ie:t.withTrackedEntityAtPath(e,i,(()=>(this.deoptimizableDependentExpressions.push(s),i.getLiteralValueAtPath(e,t,s))),ie)}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getReturnExpression(s);return n[0]===oe?n:s.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(i);const[r,o]=n[0].getReturnExpressionWhenCalledAtPath(e,t,s,i);return[r,o||n[1]]}),ae)}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(2===i){const{args:i,withNew:n}=t;if((n?s.instantiated:s.called).trackEntityAtPathAndGetIfTracked(e,i,this))return!1}else if((1===i?s.assigned:s.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[n,r]=this.getReturnExpression();return(1===i||!r)&&n.hasEffectsOnInteractionAtPath(e,t,s)}}class Un extends jn{bind(){if(super.bind(),this.callee instanceof ln){this.scope.findVariable(this.callee.name).isNamespace&&this.context.log(Se,Ot(this.callee.name),this.start),"eval"===this.callee.name&&this.context.log(Se,{code:"EVAL",id:e=this.context.module.id,message:`Use of eval in "${M(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:De("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof zn&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Y,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Js&&this.callee instanceof ln&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&null==this.callee.getLiteralValueAtPath(Y,te,e)}render(e,t,{renderedSurroundingElement:s}=fe){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:s}),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}getReturnExpression(e=te){return null===this.returnExpression?(this.returnExpression=ae,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Y,this.interaction,e,this)):this.returnExpression}}class Gn extends Bi{addDeclaration(e,t,s,i){const n=this.variables.get(e.name);return n?(this.parent.addDeclaration(e,t,rs,i),n.addDeclaration(e,s),n):this.parent.addDeclaration(e,t,s,i)}}class Wn extends Vi{constructor(e,t,s){super(e),this.variables.set("this",this.thisVariable=new Pi("this",null,t,s)),this.instanceScope=new Vi(this),this.instanceScope.variables.set("this",new _n(s))}findLexicalBoundary(){return this}}class qn extends ei{constructor(){super(...arguments),this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Y,s):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Y,{args:t.args,type:2,withNew:!1},s):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=ae,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Y,ue,te,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Hn extends qn{applyDeoptimizations(){}}class Kn extends re{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],s)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,s){return this.object.getLiteralValueAtPath([this.key,...e],t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,s)}}class Yn extends ei{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Vi(e)}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,s):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,s))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.include(e,t),this.body.include(e,t),this.id&&(this.id.markDeclarationReached(),this.id.include())}initialise(){this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof Hn&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.static||e instanceof Hn&&"constructor"===e.kind||e.deoptimizePath(X);this.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const s of this.body.body){const i=s.static?e:t,n=s.kind;if(i===t&&!n)continue;const r="set"===n||"get"===n?n:"init";let o;if(s.computed){const e=s.key.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e){i.push({key:W,kind:r,property:s});continue}o=String(e)}else o=s.key instanceof ln?s.key.name:String(s.key.value);i.push({key:o,kind:r,property:s})}return e.unshift({key:"prototype",kind:"init",property:new li(t,this.superClass?new Kn(this.superClass,"prototype"):ui)}),this.objectEntity=new li(e,this.superClass||ui)}}class Xn extends Yn{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ln(e.id,this,this.scope.parent)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===i&&s.has(o)&&e.appendLeft(this.end,`${n}${wn([o],t)};`);const l=o.getName(r);if(l!==a)return this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${n}=${n}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:s,variable:i}=e;for(const e of t.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}class Qn extends Yn{render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s===Rs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Zn extends re{constructor(e){super(),this.expressions=e,this.included=!1}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return[new Zn(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]))),!1]}hasEffectsOnInteractionAtPath(e,t,s){for(const i of this.expressions)if(i.hasEffectsOnInteractionAtPath(e,t,s))return!0;return!1}}function Jn(e,t){const{brokenFlow:s,hasBreak:i,hasContinue:n,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=i,e.hasContinue=n,e.brokenFlow=s,!1)}function er(e,t,s){const{brokenFlow:i,hasBreak:n,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,s,{asSingleStatement:!0}),e.hasBreak=n,e.hasContinue=r,e.brokenFlow=i}class tr extends ei{hasEffects(){return!1}initialise(){this.context.addExport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}tr.prototype.needsBoundaries=!0;class sr extends On{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){null!==e.id&&(this.id=new ln(e.id,this,this.scope.parent)),super.parseNode(e)}}class ir extends ei{include(e,t){super.include(e,t),t&&this.context.includeVariableInModule(this.variable)}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context),this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s,r=function(e,t){return mn(e,pn(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof sr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const s=pn(e,"function",t)+8;e=e.slice(s,pn(e,"(",s));const i=pn(e,"*");return-1===i?s:s+i+1}(e.original,r):null,t);else if(this.declaration instanceof Xn)this.renderNamedDeclaration(e,r,null===this.declaration.id?pn(e.original,"class",i)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void hn(this,e,i,n);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Rs}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,s,i){const{exportNamesByVariable:n,format:r,snippets:{getPropertyAccess:o}}=i,a=this.variable.getName(o);e.remove(this.start,t),null!==s&&e.appendLeft(s,` ${a}`),"system"===r&&this.declaration instanceof Xn&&n.has(this.variable)&&e.appendLeft(this.end,` ${wn([this.variable],i)};`)}renderVariableDeclaration(e,t,{format:s,exportNamesByVariable:i,snippets:{cnst:n,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===s&&i.get(this.variable);a?(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${a[0]}', `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}ir.prototype.needsBoundaries=!0;class nr extends ei{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.context.addExport(this)}render(e,t,s){const{start:i,end:n}=s;null===this.declaration?e.remove(i,n):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:n,start:i}))}applyDeoptimizations(){}}nr.prototype.needsBoundaries=!0;class rr extends On{render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s===Rs&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class or extends bn{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,s,i)}}const ar=Symbol("unset");class lr extends ei{constructor(){super(...arguments),this.testValue=ar}deoptimizeCache(){this.testValue=ie}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const s=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&s,!1)}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}parseNode(e){this.consequentScope=new or(this.scope),this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope),e.alternate&&(this.alternateScope=new or(this.scope),this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:s}}=t,i=this.getTestValue(),n=[],r=this.test.included,o=!this.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof i||i)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),n.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof i&&i?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),n.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(n,e,s)}applyDeoptimizations(){}getTestValue(){return this.testValue===ar?this.testValue=this.test.getLiteralValueAtPath(Y,te,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let s=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),s=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&s)}renderHoistedDeclarations(e,t,s){const i=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(s):""})))].filter(Boolean).join(", ");if(i){const e=this.parent.type,s=e!==Ms&&e!==ws;t.prependRight(this.start,`${s?"{ ":""}var ${i}; `),s&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof lr&&e.alternate)return!0;if(e instanceof Sn)return!1;e=e.parent}while(e);return!1}}class cr extends ei{bind(){}hasEffects(){return!1}initialise(){this.context.addImport(this)}render(e,t,s){e.remove(s.start,s.end)}applyDeoptimizations(){}}cr.prototype.needsBoundaries=!0;class hr extends ei{applyDeoptimizations(){}}const ur="_interopDefault",dr="_interopDefaultCompat",pr="_interopNamespace",fr="_interopNamespaceCompat",mr="_interopNamespaceDefault",gr="_interopNamespaceDefaultOnly",yr="_mergeNamespaces",xr={auto:ur,compat:dr,default:null,defaultOnly:null,esModule:null},Er=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),br={auto:pr,compat:fr,default:mr,defaultOnly:gr,esModule:null},vr=(e,t)=>"esModule"!==e&&Er(e,t),Sr=(e,t,s,i,n,r,o)=>{const a=new Set(e);for(const e of Lr)t.has(e)&&a.add(e);return Lr.map((e=>a.has(e)?Ar[e](s,i,n,r,o,a):"")).join("")},Ar={[dr](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:dr});return`${o}${wr(t)}${i}?${i}${s?kr(t):Ir(t)}${a}${r}${r}`},[ur](e,t,s){const{_:i,getDirectReturnFunction:n,n:r}=t,[o,a]=n(["e"],{functionReturn:!0,lineBreakIndent:null,name:ur});return`${o}e${i}&&${i}e.__esModule${i}?${i}${s?kr(t):Ir(t)}${a}${r}${r}`},[fr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mr)){const[e,s]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:fr});return`${e}${wr(t)}${o}?${o}e${o}:${o}${mr}(e)${s}${l}${l}`}return`function ${fr}(e)${o}{${l}${e}if${o}(${wr(t)})${o}return e;${l}`+Pr(e,e,t,s,i,n)+`}${l}${l}`},[gr](e,t,s,i,n){const{getDirectReturnFunction:r,getObject:o,n:a}=t,[l,c]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:gr});return`${l}${Dr(i,Tr(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${c}${a}${a}`},[mr](e,t,s,i,n){const{_:r,n:o}=t;return`function ${mr}(e)${r}{${o}`+Pr(e,e,t,s,i,n)+`}${o}${o}`},[pr](e,t,s,i,n,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:pr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${mr}(e)${t}${l}${l}`}return`function ${pr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Pr(e,e,t,s,i,n)+`}${l}${l}`},[yr](e,t,s,i,n){const{_:r,cnst:o,n:a}=t,l="var"===o&&s;return`function ${yr}(n, m)${r}{${a}${e}${$r(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(s?l?_r:Rr:Or)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Dr(i,Tr(n,"n",t))};${a}}${a}${a}`}},kr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Ir=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,wr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Pr=(e,t,s,i,n,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}=s,d=`{${h}`+(i?Nr:Or)(e,t+e+e,s)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Mr(l)}${o}}`:""});${h}${t}if${o}(e)${o}{${h}${t}${e}${Cr(d,!i,s)}${h}${t}}${h}${t}n${c("default")}${o}=${o}e;${h}${t}return ${Dr(n,"n")}${u}${h}`},Cr=(e,t,{_:s,cnst:i,getFunctionIntro:n,s:r})=>"var"!==i||t?`for${s}(${i} k in e)${s}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:!1,name:null})}${e})${r}`,$r=(e,t,s,{_:i,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,n]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:s,t:s},name:null});return`m.forEach(${t}e${i}&&${i}typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e)${i}&&${i}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${n});`}return`for${i}(var i${i}=${i}0;${i}i${i}<${i}m.length;${i}i++)${i}{${a}${s}${s}${n} e${i}=${i}m[i];${a}${s}${s}if${i}(typeof e${i}!==${i}'string'${i}&&${i}!Array.isArray(e))${i}{${i}for${i}(${n} k in e)${i}${e}${i}}${a}${s}}`},Nr=(e,t,s)=>{const{_:i,n:n}=s;return`${t}if${i}(k${i}!==${i}'default')${i}{${n}`+_r(e,t+e,s)+`${t}}${n}`},_r=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}enumerable:${s}true,${r}${t}${e}get:${s}${o}e[k]${a}${r}${t}});${r}`},Rr=(e,t,{_:s,cnst:i,getDirectReturnFunction:n,n:r})=>{const[o,a]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${i} d${s}=${s}Object.getOwnPropertyDescriptor(e,${s}k);${r}${t}if${s}(d)${s}{${r}${t}${e}Object.defineProperty(n,${s}k,${s}d.get${s}?${s}d${s}:${s}{${r}${t}${e}${e}enumerable:${s}true,${r}${t}${e}${e}get:${s}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Or=(e,t,{_:s,n:i})=>`${t}n[k]${s}=${s}e[k];${i}`,Dr=(e,t)=>e?`Object.freeze(${t})`:t,Tr=(e,t,{_:s,getObject:i})=>e?`Object.defineProperty(${t},${s}Symbol.toStringTag,${s}${Mr(i)})`:t,Lr=Object.keys(Ar);function Mr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function Vr(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Br extends ei{declareDeclarator(e){this.id.declare(e,this.init||rs)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)}include(e,t){const{deoptimized:s,id:i,init:n}=this;s||this.applyDeoptimizations(),this.included=!0,n?.include(e,t),i.markDeclarationReached(),(t||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t){const{exportNamesByVariable:s,snippets:{_:i,getPropertyAccess:n}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included;if(c)o.render(e,t);else{const t=pn(e.original,"=",o.end);e.remove(l,mn(e.original,t+1))}if(a){if(o instanceof ln&&a instanceof Qn&&!a.id){o.variable.getName(n)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?fe:{renderedSurroundingElement:Rs})}else o instanceof ln&&Vr(o.variable,s)&&e.appendLeft(r,`${i}=${i}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof ln&&t instanceof Qn&&!t.id){const{name:s,variable:i}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==i&&e.forbidName(s)}}}function zr(e,t,s){return"external"===t?br[s(e instanceof Jt?e.id:null)]:"default"===t?gr:null}const Fr={amd:["require"],cjs:["require"],system:["module"]};function jr(e){const t=[];for(const s of e.properties){if("RestElement"===s.type||s.computed||"Identifier"!==s.key.type)return;t.push(s.key.name)}return t}class Ur extends ei{applyDeoptimizations(){}}const Gr="ROLLUP_FILE_URL_",Wr="import";const qr={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]},Hr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Kr=(e,t="URL")=>`new ${t}(${e}).href`,Yr=(e,t=!1)=>Kr(`'${T(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Xr=e=>(t,{chunkId:s})=>{const i=e(s);return null===t?`({ url: ${i} })`:"url"===t?i:"undefined"},Qr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Zr=e=>Qr(`__dirname + '/${e}'`),Jr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(document.currentScript && document.currentScript.src || new URL('${T(e)}', document.baseURI).href)`,eo={amd:e=>("."!==e[0]&&(e="./"+e),Kr(`require.toUrl('${e}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Zr(e)} : ${Yr(e)})`,es:e=>Kr(`'${e}', import.meta.url`),iife:e=>Yr(e),system:e=>Kr(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Zr(e)} : ${Yr(e,!0)})`},to={amd:Xr((()=>Kr("module.uri, document.baseURI"))),cjs:Xr((e=>`(typeof document === 'undefined' ? ${Qr("__filename")} : ${Jr(e)})`)),iife:Xr((e=>Jr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Xr((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Qr("__filename")} : ${Jr(e,!0)})`))};class so extends ei{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(is()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:s,module:i}=this.context;s(Ae,Lt(e,i.id,Pe(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){let s=this.start;if(e.original.startsWith("#!")&&(s=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,s)),this.body.length>0){for(;"/"===e.original[s]&&/[*/]/.test(e.original[s+1]);){const t=gn(e.original.slice(s,this.body[0].start));if(-1===t[0])break;s+=t[1]}yn(this.body,e,s,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class io extends ei{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const s of this.consequent)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t,s){if(this.consequent.length>0){this.test&&this.test.render(e,t);const i=this.test?this.test.end:pn(e.original,"default",this.start)+7,n=pn(e.original,":",i)+1;yn(this.consequent,e,n,s.end,t)}else super.render(e,t)}}io.prototype.needsBoundaries=!0;class no extends ei{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?ie:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?ae:bs(xs,e[0])}hasEffectsOnInteractionAtPath(e,t,s){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Es(xs,e[0],t,s)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class ro extends de{constructor(){super("undefined")}getLiteralValueAtPath(){}}class oo extends Pi{constructor(e,t,s){super(e,t,t.declaration,s),this.hasId=!1,this.originalId=null,this.originalVariable=null;const i=t.declaration;(i instanceof sr||i instanceof Xn)&&i.id?(this.hasId=!0,this.originalId=i.id):i instanceof ln&&(this.originalId=i)}addReference(e){this.hasId||(this.name=e.name)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof ro||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const s=new Set;do{s.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof oo&&!s.has(t));return this.originalVariable=t||e}}class ao extends Vi{constructor(e,t){super(e),this.context=t,this.variables.set("this",new Pi("this",null,rs,t))}addExportDefaultDeclaration(e,t,s){const i=new oo(e,t,s);return this.variables.set("default",i),i}addNamespaceMemberAccess(){}deconflict(e,t,s){for(const i of this.children)i.deconflict(e,t,s)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const s=this.context.traceVariable(e)||this.parent.findVariable(e);return s instanceof on&&this.accessedOutsideVariables.set(e,s),s}}const lo={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>ie,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class co extends ei{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Y)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:s}=fe){this.included=!0;for(const i of this.declarations){(t||i.shouldBeIncluded(e))&&i.include(e,t);const{id:n,init:r}=i;s&&n.include(e,t),r&&n.included&&!r.included&&(n instanceof $n||n instanceof wi)&&r.include(e,t)}}initialise(){for(const e of this.declarations)e.declareDeclarator(this.kind)}render(e,t,s=fe){if(function(e,t){for(const s of e){if(!s.id.included)return!1;if(s.id.type===Ds){if(t.has(s.id.variable))return!1}else{const e=[];if(s.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const s of this.declarations)s.render(e,t);s.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}applyDeoptimizations(){}renderDeclarationEnd(e,t,s,i,n,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===s?e.appendLeft(n,t):(10!==e.original.charCodeAt(i-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(i--,13===e.original.charCodeAt(i)&&i--),i===s+1?e.overwrite(s,n,t):(e.overwrite(s,s+1,t),e.remove(i,n))),r.length>0&&e.appendLeft(n,` ${wn(r,o)};`)}renderReplacedDeclarations(e,t){const s=xn(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let i,n;n=mn(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o,a,l=!1,c=!1,h="";const u=[],d=function(e,t,s){let i=null;if("system"===t.format){for(const{node:n}of e)n.id instanceof ln&&n.init&&0===s.length&&1===t.exportNamesByVariable.get(n.id.variable)?.length?(i=n.id.variable,s.push(i)):n.id.addExportedVariables(s,t.exportNamesByVariable);s.length>1?i=null:i&&(s.length=0)}return i}(s,t,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of s)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof ln&&Vr(u.id.variable,t.exportNamesByVariable))c&&(h+=";"),l=!1;else{if(d&&d===u.id.variable){const s=pn(e.original,"=",u.id.end);Pn(d,mn(e.original,s+1),null===f?m:f,e,t)}l?h+=",":(c&&(h+=";"),o+=`${this.kind} `,l=!0)}n===r+1?e.overwrite(r,n,h+o):(e.overwrite(r,r+1,h),e.appendLeft(n,o)),i=m,n=g,c=!0,r=f,h=""}else e.remove(p,g);this.renderDeclarationEnd(e,h,r,i,n,u,t)}}const ho={ArrayExpression:Ii,ArrayPattern:wi,ArrowFunctionExpression:In,AssignmentExpression:class extends ei{hasEffects(e){const{deoptimized:t,left:s,operator:i,right:n}=this;return t||this.applyDeoptimizations(),n.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)}hasEffectsOnInteractionAtPath(e,t,s){return this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){const{deoptimized:s,left:i,right:n,operator:r}=this;s||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||i.included||i.hasEffectsAsAssignmentTarget(is(),!1))&&i.includeAsAssignmentTarget(e,t,"="!==r),n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:s,renderedParentType:i,renderedSurroundingElement:n}=fe){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=mn(e.original,pn(e.original,"=",r.end)+1);e.remove(a,l),s&&En(e,l,o.start),o.render(e,t,{renderedParentType:i||c.type,renderedSurroundingElement:n||c.type})}if("system"===t.format)if(r instanceof ln){const s=r.variable,i=t.exportNamesByVariable.get(s);if(i)return void(1===i.length?Pn(s,a,l,e,t):Cn(s,a,l,c.type!==Rs,e,t))}else{const s=[];if(r.addExportedVariables(s,t.exportNamesByVariable),s.length>0)return void function(e,t,s,i,n,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;n.prependRight(t,a(["v"],`${wn(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:i})),n.appendLeft(s,")")}(s,a,l,n===Rs,e,t)}r.included&&r instanceof $n&&(n===Rs||n===ks)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},AssignmentPattern:class extends ei{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Y,t,s)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:s}=fe){this.left.render(e,t,{isShorthandProperty:s}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},AwaitExpression:Dn,BinaryExpression:class extends ei{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(e.length>0)return ie;const i=this.left.getLiteralValueAtPath(Y,t,s);if("symbol"==typeof i)return ie;const n=this.right.getLiteralValueAtPath(Y,t,s);if("symbol"==typeof n)return ie;const r=Tn[this.operator];return r?r(i,n):ie}hasEffects(e){return"+"===this.operator&&this.parent instanceof vn&&""===this.left.getLiteralValueAtPath(Y,te,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}render(e,t,{renderedSurroundingElement:s}=fe){this.left.render(e,t,{renderedSurroundingElement:s}),this.right.render(e,t)}},BlockStatement:Sn,BreakStatement:class extends ei{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}},CallExpression:Un,CatchClause:class extends ei{createScope(e){this.scope=new Gn(e,this.context)}parseNode(e){const{param:t}=e;t&&(this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope),this.param.declare("parameter",oe)),super.parseNode(e)}},ChainExpression:class extends ei{deoptimizeCache(){}getLiteralValueAtPath(e,t,s){if(!this.expression.isSkippedAsOptional(s))return this.expression.getLiteralValueAtPath(e,t,s)}hasEffects(e){return!this.expression.isSkippedAsOptional(this)&&this.expression.hasEffects(e)}},ClassBody:class extends ei{createScope(e){this.scope=new Wn(e,this.parent,this.context)}include(e,t){this.included=!0,this.context.includeVariableInModule(this.scope.thisVariable);for(const s of this.body)s.include(e,t)}parseNode(e){const t=this.body=[];for(const s of e.body)t.push(new(this.context.getNodeConstructor(s.type))(s,this,s.static?this.scope:this.scope.instanceScope));super.parseNode(e)}applyDeoptimizations(){}},ClassDeclaration:Xn,ClassExpression:Qn,ConditionalExpression:class extends ei{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(X);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ge;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Zn([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.consequent.hasEffectsOnInteractionAtPath(e,t,s)||this.alternate.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||this.test.shouldBeIncluded(e)||null===s?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):s.include(e,t)}includeCallArguments(e,t){const s=this.getUsedBranch();s?s.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=fe){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=pn(e.original,":",this.consequent.end),l=mn(e.original,(this.consequent.included?pn(e.original,"?",this.test.end):a)+1);i&&En(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),un(this,e),o.render(e,t,{isCalleeOfRenderedParent:s,preventASI:!0,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=this.test.getLiteralValueAtPath(Y,te,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}},ContinueStatement:class extends ei{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}},DoWhileStatement:class extends ei{hasEffects(e){return!!this.test.hasEffects(e)||Jn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),er(e,this.body,t)}},EmptyStatement:class extends ei{hasEffects(){return!1}},ExportAllDeclaration:tr,ExportDefaultDeclaration:ir,ExportNamedDeclaration:nr,ExportSpecifier:class extends ei{applyDeoptimizations(){}},ExpressionStatement:vn,ForInStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){const{body:t,deoptimized:s,left:i,right:n}=this;return s||this.applyDeoptimizations(),!(!i.hasEffectsAsAssignmentTarget(e,!1)&&!n.hasEffects(e))||Jn(e,t)}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),er(e,s,t)}initialise(){this.left.setAssignedValue(oe)}render(e,t){this.left.render(e,t,dn),this.right.render(e,t,dn),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.context.requestTreeshakingPass()}},ForOfStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:s,deoptimized:i,left:n,right:r}=this;i||this.applyDeoptimizations(),this.included=!0,n.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),er(e,s,t)}initialise(){this.left.setAssignedValue(oe)}render(e,t){this.left.render(e,t,dn),this.right.render(e,t,dn),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Y),this.right.deoptimizePath(X),this.context.requestTreeshakingPass()}},ForStatement:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Jn(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),er(e,this.body,t)}render(e,t){this.init?.render(e,t,dn),this.test?.render(e,t,dn),this.update?.render(e,t,dn),this.body.render(e,t)}},FunctionDeclaration:sr,FunctionExpression:rr,Identifier:ln,IfStatement:lr,ImportAttribute:class extends ei{},ImportDeclaration:cr,ImportDefaultSpecifier:hr,ImportExpression:class extends ei{constructor(){super(...arguments),this.inlineNamespace=null,this.assertions=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof vn)return ge;if(e instanceof Dn){const t=e.parent;if(t instanceof vn)return ge;if(t instanceof Br){const e=t.id;return e instanceof $n?jr(e):void 0}if(t instanceof zn){const e=t.property;if(!t.computed&&e instanceof ln)return[e.name]}}else if(e instanceof zn){const t=e.parent,s=e.property;if(!(t instanceof Un&&s instanceof ln))return;const i=s.name;if(t.parent instanceof vn&&["catch","finally"].includes(i))return ge;if("then"!==i)return;if(0===t.arguments.length)return ge;const n=t.arguments[0];if(1!==t.arguments.length||!(n instanceof In||n instanceof rr))return;if(0===n.params.length)return ge;const r=n.params[0];return 1===n.params.length&&r instanceof $n?jr(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:s,getDirectReturnFunction:i,getObject:n,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,s]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${s})`)}else{if(this.mechanism&&(e.overwrite(this.start,pn(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,s]=i(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${s})`)}}else this.source.render(e,t);!0!==this.assertions&&(this.arguments&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.assertions&&e.appendLeft(this.end-1,`,${s}${n([["assert",this.assertions]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,s,i,n,r,o,a,l){const{format:c}=s;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.assertions=l;const h=[...Fr[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,s,i,n)),u&&h.push(u),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:s,dynamicImportFunction:i,dynamicImportInCjs:n,format:r,generatedCode:{arrowFunctions:o},interop:a},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:h},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:r,moduleId:this.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const p=!this.resolution||"string"==typeof this.resolution;switch(r){case"cjs":{if(n&&(!e||"string"==typeof e||e instanceof Jt))return{helper:null,mechanism:null};const s=zr(e,t,a);let i="require(",r=")";s&&(i=`/*#__PURE__*/${s}(${i}`,r+=")");const[l,u]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${l}${i}`,r+=`${u})`,!o&&p&&(i=h(["t"],`${i}t${r}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),r=")"),{helper:s,mechanism:{left:i,right:r}}}case"amd":{const i=s?"c":"resolve",n=s?"e":"reject",r=zr(e,t,a),[u,d]=c(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=r?`${u}${i}(/*#__PURE__*/${r}(m))${d}`:i,[m,g]=c([i,n],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,x=`],${l}${f},${l}${n})${g})`;return!o&&p&&(y=h(["t"],`${y}t${x}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),x=")"),{helper:r,mechanism:{left:y,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(i)return{helper:null,mechanism:{left:`${i}(`,right:")"}}}return{helper:null,mechanism:null}}},ImportNamespaceSpecifier:Ur,ImportSpecifier:class extends ei{applyDeoptimizations(){}},LabeledStatement:class extends ei{hasEffects(e){const t=e.brokenFlow;return e.ignore.labels.add(this.label.name),!!this.body.hasEffects(e)||(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t),!1)}include(e,t){this.included=!0;const s=e.brokenFlow;this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(),e.includedLabels.delete(this.label.name),e.brokenFlow=s)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,mn(e.original,pn(e.original,":",this.label.end)+1)),this.body.render(e,t)}},Literal:Mn,LogicalExpression:class extends ei{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.isBranchResolutionAnalysed=!1,this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,s),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(X);const{context:t,expressionsToBeDeoptimized:s}=this;this.expressionsToBeDeoptimized=ge;for(const e of s)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getLiteralValueAtPath(e,t,s)):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){const n=this.getUsedBranch();return n?(this.expressionsToBeDeoptimized.push(i),n.getReturnExpressionWhenCalledAtPath(e,t,s,i)):[new Zn([this.left.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,s,i)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){const i=this.getUsedBranch();return i?i.hasEffectsOnInteractionAtPath(e,t,s):this.left.hasEffectsOnInteractionAtPath(e,t,s)||this.right.hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.getUsedBranch();t||s===this.right&&this.left.shouldBeIncluded(e)||!s?(this.left.include(e,t),this.right.include(e,t)):s.include(e,t)}render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n,renderedSurroundingElement:r}=fe){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:i,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=pn(e.original,this.operator,this.left.end);if(this.right.included){const t=mn(e.original,o+2);e.remove(this.start,t),i&&En(e,t,this.right.start)}else e.remove(o,this.end);un(this,e),this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:s,preventASI:i,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}},MemberExpression:zn,MetaProperty:class extends ei{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:s}=this;return t===Wr&&s?.startsWith(Gr)?e.getFileName(s.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Wr)){this.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof zn&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Gr)&&(this.referenceId=t.slice(16))}}render(e,{format:t,pluginDriver:s,snippets:i}){const{context:{module:{id:n}},meta:{name:r},metaProperty:o,parent:a,preliminaryChunkId:l,referenceId:c,start:h,end:u}=this;if(r!==Wr)return;const d=l;if(c){const i=s.getFileName(c),r=w(N(C(d),i)),o=s.hookFirstSync("resolveFileUrl",[{chunkId:d,fileName:i,format:t,moduleId:n,referenceId:c,relativePath:r}])||eo[t](r);return void e.overwrite(a.start,a.end,o,{contentOnly:!0})}const p=s.hookFirstSync("resolveImportMeta",[o,{chunkId:d,format:t,moduleId:n}])||to[t]?.(o,{chunkId:d,snippets:i});"string"==typeof p&&(a instanceof zn?e.overwrite(a.start,a.end,p,{contentOnly:!0}):e.overwrite(h,u,p,{contentOnly:!0}))}setResolution(e,t,s){this.preliminaryChunkId=s;const i=(this.metaProperty?.startsWith(Gr)?Hr:qr)[e];i.length>0&&this.scope.addAccessedGlobals(i,t)}},MethodDefinition:Hn,NewExpression:class extends ei{hasEffects(e){try{for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Y,this.interaction,e))}finally{this.deoptimized||this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:2,withNew:!0}}render(e,t){this.callee.render(e,t),Ln(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}},ObjectExpression:class extends ei{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.getObjectEntity().getLiteralValueAtPath(e,t,s)}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,s,i)}hasEffectsOnInteractionAtPath(e,t,s){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,s)}render(e,t,{renderedSurroundingElement:s}=fe){super.render(e,t),s!==Rs&&s!==ks||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ui;const t=[];for(const s of this.properties){if(s instanceof ti){t.push({key:W,kind:"init",property:s});continue}let i;if(s.computed){const e=s.key.getLiteralValueAtPath(Y,te,this);if("symbol"==typeof e){t.push({key:W,kind:s.kind,property:s});continue}i=String(e)}else if(i=s.key instanceof ln?s.key.name:String(s.key.value),"__proto__"===i&&"init"===s.kind){e=s.value instanceof Mn&&null===s.value.value?null:s.value;continue}t.push({key:i,kind:s.kind,property:s})}return this.objectEntity=new li(t,e)}},ObjectPattern:$n,PrivateIdentifier:class extends ei{},Program:so,Property:class extends qn{constructor(){super(...arguments),this.declarationInit=null}declare(e,t){return this.declarationInit=t,this.value.declare(e,oe)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([W,W]),this.context.requestTreeshakingPass())}},PropertyDefinition:class extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.value?this.value.getLiteralValueAtPath(e,t,s):ie}getReturnExpressionWhenCalledAtPath(e,t,s,i){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,s,i):ae}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,s){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,s)}applyDeoptimizations(){}},RestElement:An,ReturnStatement:class extends ei{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){this.scope.addReturnExpression(this.argument||oe)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}},SequenceExpression:class extends ei{deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,s){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,s)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,s){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,s)}include(e,t){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(t||i===s&&!(this.parent instanceof vn)||i.shouldBeIncluded(e))&&i.include(e,t)}render(e,t,{renderedParentType:s,isCalleeOfRenderedParent:i,preventASI:n}=fe){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:h,end:u}of xn(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&n&&En(e,h,l.start),1===r){const n=s||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:i&&l===a,renderedParentType:n,renderedSurroundingElement:n})}else l.render(e,t);else hn(l,e,h,u);o&&e.remove(o,this.end)}},SpreadElement:ti,StaticBlock:class extends ei{createScope(e){this.scope=new bn(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const s of this.body)(t||s.shouldBeIncluded(e))&&s.include(e,t)}render(e,t){if(this.body.length>0){const s=pn(e.original.slice(this.start,this.end),"{")+1;yn(this.body,e,this.start+s,this.end-1,t)}else super.render(e,t)}},Super:class extends ei{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}},SwitchCase:io,SwitchStatement:class extends ei{createScope(e){this.parentScope=e,this.scope=new bn(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:s,ignore:i}=e,{breaks:n}=i;i.breaks=!0,e.hasBreak=!1;let r=!0;for(const s of this.cases){if(s.hasEffects(e))return!0;r&&(r=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),i.breaks=n,e.hasBreak=s,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:s,hasBreak:i}=e;e.hasBreak=!1;let n=!0,r=t||null!==this.defaultCase&&this.defaultCase=0;i--){const o=this.cases[i];if(o.included&&(r=!0),!r){const e=is();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),n&&(n=e.brokenFlow&&!e.hasBreak),e.hasBreak=!1,e.brokenFlow=s):n=s}r&&null!==this.defaultCase&&(e.brokenFlow=n),e.hasBreak=i}initialise(){for(let e=0;e0&&yn(this.cases,e,this.cases[0].start,this.end-1,t)}},TaggedTemplateExpression:class extends jn{bind(){if(super.bind(),this.tag.type===Ds){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.context.log(Se,Ot(e),this.start)}}hasEffects(e){try{for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Y,this.interaction,e)}finally{this.deoptimized||this.applyDeoptimizations()}}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[s]=this.getReturnExpression();s.included||s.include(e,!1)}initialise(){this.args=[oe,...this.quasi.expressions],this.interaction={args:[this.tag instanceof zn&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Y,te),this.context.requestTreeshakingPass()}getReturnExpression(e=te){return null===this.returnExpression?(this.returnExpression=ae,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Y,this.interaction,e,this)):this.returnExpression}},TemplateElement:class extends ei{bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){this.value=e.value,super.parseNode(e)}render(){}},TemplateLiteral:no,ThisExpression:class extends ei{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,s){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,s)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,s){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,s)}include(){this.included||(this.included=!0,this.context.includeVariableInModule(this.variable))}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ao?this.context.moduleContext:null,"undefined"===this.alias&&this.context.log(Se,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:De("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},ThrowStatement:class extends ei{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},TryStatement:class extends ei{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const s=this.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:n}=e;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)n.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,s?Js:t),n.size>0&&(this.includedLabelsAfterBlock=[...n]),e.brokenFlow=i;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=i),this.finalizer?.include(e,t)}},UnaryExpression:class extends ei{getLiteralValueAtPath(e,t,s){if(e.length>0)return ie;const i=this.argument.getLiteralValueAtPath(Y,t,s);return"symbol"==typeof i?ie:lo[this.operator](i)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof ln)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Y,he,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Y),this.context.requestTreeshakingPass())}},UnknownNode:class extends ei{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:class extends ei{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){this.argument.setAssignedValue(oe)}render(e,t){const{exportNamesByVariable:s,format:i,snippets:{_:n}}=t;if(this.argument.render(e,t),"system"===i){const i=this.argument.variable,r=s.get(i);if(r)if(this.prefix)1===r.length?Pn(i,this.start,this.end,e,t):Cn(i,this.start,this.end,this.parent.type!==Rs,e,t);else{const s=this.operator[0];!function(e,t,s,i,n,r,o){const{_:a}=r.snippets;n.prependRight(t,`${wn([e],r,o)},${a}`),i&&(n.prependRight(t,"("),n.appendLeft(s,")"))}(i,this.start,this.end,this.parent.type!==Rs,e,t,`${n}${s}${n}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Y),this.argument instanceof ln){this.scope.findVariable(this.argument.name).isReassigned=!0}this.context.requestTreeshakingPass()}},VariableDeclaration:co,VariableDeclarator:Br,WhileStatement:class extends ei{hasEffects(e){return!!this.test.hasEffects(e)||Jn(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),er(e,this.body,t)}},YieldExpression:class extends ei{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}},uo="_missingExportShim";class po extends de{constructor(e){super(uo),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class fo extends de{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,s){if(t.length>1||1===t.length&&2===e.type){const i=t[0];"string"==typeof i?this.getMemberVariables()[i]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),s):le(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===K?"Module":ie}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const s of t)if("*"!==s[0]&&s!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(s);t&&(e[s]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,s){const{type:i}=t;if(0===e.length)return!0;if(1===e.length&&2!==i)return 1===i;const n=e[0];if("string"!=typeof n)return!0;const r=this.getMemberVariables()[n];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,s)}include(){this.included=!0,this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([yr],e)}renderBlock(e){const{exportNamesByVariable:t,format:s,freeze:i,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:h,s:u}}=e,d=this.getMemberVariables(),p=Object.entries(d).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${e}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${yr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Mr(l)})`),i&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===s&&t.has(this)&&(f+=`${h}${wn([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references)if(e.context.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}fo.prototype.isNamespace=!0;class mo extends de{constructor(e,t,s){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=s}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof oo||e instanceof mo;){if(e instanceof oo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof mo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=!0,this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var go;function yo(e){return e.id}!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(go||(go={}));const xo=e=>{const t=e.key;return t&&(t.name||t.value)};function Eo(e,t){const s=Object.keys(e);return s.length!==Object.keys(t).length||s.some((s=>e[s]!==t[s]))}var bo="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},vo={memoryUsage:()=>({heapUsed:0})};let So=new Map;function Ao(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function ko(e,t=3){e=Ao(e,t);const s=vo.memoryUsage().heapUsed,i=bo.now(),n=So.get(e);void 0===n?So.set(e,{memory:0,startMemory:s,startTime:i,time:0,totalMemory:0}):(n.startMemory=s,n.startTime=i)}function Io(e,t=3){e=Ao(e,t);const s=So.get(e);if(void 0!==s){const e=vo.memoryUsage().heapUsed;s.memory+=e-s.startMemory,s.time+=bo.now()-s.startTime,s.totalMemory=Math.max(s.totalMemory,e)}}function wo(){const e={};for(const[t,{memory:s,time:i,totalMemory:n}]of So)e[t]=[i,s,n];return e}let Po=Ui,Co=Ui;const $o=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function No(e,t){for(const s of $o)if(s in e){let i=`plugin ${t}`;e.name&&(i+=` (${e.name})`),i+=` - ${s}`;const n=function(...e){Po(i,4);const t=r.apply(this,e);return Co(i,4),t};let r;"function"==typeof e[s].handler?(r=e[s].handler,e[s].handler=n):(r=e[s],e[s]=n)}return e}function _o(e){e.isExecuted=!0;const t=[e],s=new Set;for(const e of t)for(const i of[...e.dependencies,...e.implicitlyLoadedBefore])i instanceof Jt||i.isExecuted||!i.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(i)||s.has(i.id)||(i.isExecuted=!0,s.add(i.id),t.push(i))}const Ro={identifier:null,localName:uo};function Oo(e,t,s,i,n=new Map){const r=n.get(t);if(r){if(r.has(e))return i?[null]:Xe((o=t,a=e.id,{code:nt,exporter:a,message:`"${o}" cannot be exported from "${M(a)}" as it is a reexport that references itself.`}));r.add(e)}else n.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:s,isExportAllSearch:i,searchedNamesAndModules:n})}function Do(e,t){const s=j(t.sideEffectDependenciesByVariable,e,U);let i=e;const n=new Set([i]);for(;;){const e=i.module;if(i=i instanceof oo?i.getDirectOriginalVariable():i instanceof mo?i.syntheticNamespace:null,!i||n.has(i))break;n.add(i),s.add(e);const t=e.sideEffectDependenciesByVariable.get(i);if(t)for(const e of t)s.add(e)}return s}class To{constructor(e,t,s,i,n,r,o,a){this.graph=e,this.id=t,this.options=s,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAssertions=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new po(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:h,exportAllSources:u,exports:d,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAssertions:y}=this;this.info={assertions:a,ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return h.sort()},get exportedBindings(){const e={".":[...d.keys()]};for(const[t,{source:s}]of g)(e[s]??(e[s]=[])).push(t);for(const t of u)(e[t]??(e[t]=[])).push("*");return e},get exports(){return[...d.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},get hasModuleSideEffects(){return Qt("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",Ye,!0,s),this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,yo).sort()},get implicitlyLoadedBefore(){return Array.from(f,yo).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==go.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r},Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:!1})}basename(){const e=P(this.id),t=$(this.id);return ve(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){return this.addLocationToLogProps(e,t),Xe(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof Jt)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,s=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of[...this.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&s.add(t)}for(let i of s){const s=this.sideEffectDependenciesByVariable.get(i);if(s)for(const e of s)t.add(e);i instanceof mo?i=i.getBaseVariable():i instanceof oo&&(i=i.getOriginalVariable()),e.add(i.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[s]=this.getVariableForExportName(t);if(s instanceof oo&&(s=s.getOriginalVariable()),!s||!(s.included||s instanceof pe))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof Jt)e.add(`*${t.id}`);else for(const s of[...t.getReexports(),...t.getExports()])"default"!==s&&e.add(s);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const s of this.exports.keys()){const[i]=this.getVariableForExportName(s);(i&&i.included?e:t).push(s)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Xe((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${M(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:n}=me){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=Oo(r.module,r.localName,t,!1,n);return e?(t&&(Lo(e,t,this),this.info.moduleSideEffects&&j(t.sideEffectDependenciesByVariable,e,U).add(this)),[e]):this.error(jt(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===Ro)return[this.exportShimVariable];const e=o.localName,s=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});return t&&(Lo(s,t,this),j(t.sideEffectDependenciesByVariable,s,U).add(this)),[s]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,n);if(this.namespaceReexportsByName.set(e,s),s[0])return s}return this.info.syntheticNamedExports?[j(this.syntheticExports,e,(()=>new mo(this.astContext,e,this.getSyntheticNamespace())))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=ss();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(_o(this),this.graph.needsTreeshakingPass=!0);for(const t of this.exports.keys())if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(X),e.included||this.includeVariable(e)}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(X),t.included||this.includeVariable(t),t instanceof pe&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(ss(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(_o(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(X),e.included||this.includeVariable(e)),this.exports.has(s)||this.reexportDescriptions.has(s)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const s=this.graph.modulesById.get(this.resolvedIds[t].id);s instanceof Jt?e.push(s):this.exportAllModules.push(s)}this.exportAllModules.push(...e)}log(e,t,s){this.addLocationToLogProps(t,s),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:s}=this.astContext;return s&&"iife"!==e.format&&"es"!==e.format&&"system"!==e.format?Xe((i=this.id,n=e.format,{code:"INVALID_TLA_FORMAT",id:i,message:`Module format "${n}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:s};var i,n}setSource({ast:e,code:t,customTransformCache:s,originalCode:i,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){Po("generate ast",3),this.info.code=t,this.originalCode=i,this.originalSourcemap=n,this.sourcemapChain=o,l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=s,this.updateOptions(c);const h=e??this.tryParse();Co("generate ast",3),Po("analyze ast",3),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new y(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>ho[e]||ho.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new ao(this.graph.scope,this.astContext),this.namespace=new fo(this.astContext),this.ast=new so(h,{context:this.astContext,type:"Module"},this.scope),e||!1!==this.options.cache?this.info.ast=h:Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return this.graph.astLru.set(u,e),e}}}),Co("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,yo),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:s,searchedNamesAndModules:i}=me){const n=this.scope.variables.get(e);if(n)return n;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof To&&"*"===r.name)return e.namespace;const[n]=Oo(e,r.name,t||this,s,i);return n||this.error(jt(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:s}){null!=t&&(this.info.moduleSideEffects=t),null!=s&&(this.info.syntheticNamedExports=s),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.source;t instanceof no?1===t.quasis.length&&t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):t instanceof Mn&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof ir)this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof tr){const t=e.source.value;if(this.addSource(t,e),e.exported){const s=e.exported.name;this.reexportDescriptions.set(s,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Mn){const t=e.source.value;this.addSource(t,e);for(const{exported:s,local:i,start:n}of e.specifiers){const e=s instanceof Mn?s.value:s.name;this.reexportDescriptions.set(e,{localName:i instanceof Mn?i.value:i.name,module:null,source:t,start:n})}}else if(e.declaration){const t=e.declaration;if(t instanceof co)for(const e of t.declarations)for(const t of ts(e.id))this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:s}of e.specifiers){const e=t.name,i=s instanceof ln?s.name:s.value;this.exports.set(i,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const s of e.specifiers){const e=s instanceof hr?"default":s instanceof Ur?"*":s.imported instanceof ln?s.imported.name:s.imported.value;this.importDescriptions.set(s.local.name,{module:null,name:e,source:t,start:s.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let s=this.info.code;const i=Pe(s,t,{offsetLine:1});if(i){let{column:n,line:r}=i;try{({column:n,line:r}=function(e,t){const s=e.filter((e=>!!e.mappings));e:for(;s.length>0;){const e=s.pop().mappings[t.line-1];if(e){const s=e.filter((e=>e.length>1)),i=s[s.length-1];for(const e of s)if(e[0]>=t.column||e===i){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:n,line:r})),s=this.originalCode}catch(e){this.options.onLog(Se,function(e,t,s,i,n){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:s,file:t,line:i},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:n}}(e,this.id,n,r,t))}Qe(e,{column:n,line:r},s,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,s){const i=new Set,n=r=>{for(const o of r)i.has(o)||(i.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||s.has(o))&&(o instanceof Jt||o.hasEffects()?e.add(o):n(o.dependencies)))};n(this.dependencies),n(s)}addSource(e,t){const s=(i=t.assertions,i?.length?Object.fromEntries(i.map((e=>[xo(e),e.value.value]))):me);var i;const n=this.sourcesWithAssertions.get(e);n?Eo(n,s)&&this.log(Se,Vt(n,s,e,this.id),t.start):this.sourcesWithAssertions.set(e,s)}getVariableFromNamespaceReexports(e,t,s){let i=null;const n=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Oo(o,e,t,!0,Mo(s));o instanceof Jt||l?r.add(a):a instanceof mo?i||(i=a):a&&n.set(a,o)}if(n.size>0){const t=[...n],s=t[0][0];return 1===t.length?[s]:(this.options.onLog(Se,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${M(a)}" re-exports "${o}" from one of the modules ${Oe(l.map((e=>M(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],s=t[0];return t.length>1&&this.options.onLog(Se,function(e,t,s,i){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:i,message:`Ambiguous external namespace resolution: "${M(t)}" re-exports "${e}" from one of the external modules ${Oe(i.map((e=>M(e))))}, guessing "${M(s)}".`,reexporter:t}}(e,this.id,s.module.id,t.map((e=>e.module.id)))),[s,!0]}return i?[i]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const s of[this,...this.exportAllModules])if(s instanceof Jt){const[t]=s.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(s.info.syntheticNamedExports){const e=s.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof To){t.includedDynamicImporters.push(this);const s=this.options.treeshake?e.getDeterministicImportedNames():void 0;s?t.includeExportsByNames(s):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof To&&t!==this&&Do(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof To&&(t.isExecuted||_o(t),t!==this)){const t=Do(e,this);for(const e of t)e.isExecuted||_o(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,s;this.options.onLog(Se,(t=this.id,{binding:s=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${s}" has been shimmed in module "${M(t)}".`})),this.exports.set(e,Ro)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){return this.error(function(e,t){let s=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?s+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(s+=" (Note that you need plugins to import files that are not JavaScript)"),{cause:e,code:"PARSE_ERROR",id:t,message:s}}(e,this.id),e.pos)}}}function Lo(e,t,s){if(e.module instanceof To&&e.module!==s){const i=e.module.cycles;if(i.size>0){const n=s.cycles;for(const r of n)if(i.has(r)){t.alternativeReexportModules.set(e,s);break}}}}const Mo=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function Vo(e){return e.endsWith(".js")?e.slice(0,-3):e}function Bo(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Vo(t)}`:e.id??""}function zo(e,t,s,i,n,r,o,a="return "){const{_:l,getDirectReturnFunction:c,getFunctionIntro:h,getPropertyAccess:u,n:d,s:p}=n;if(!s)return`${d}${d}${a}${function(e,t,s,i,n){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:h}of t)if(h)return Fo(a,h[0].imported,l,o,e,c,s,r,i,n)}(e,t,i,o,u)};`;let f="";for(const{defaultVariableName:e,importPath:n,isChunk:a,name:h,namedExportsMode:p,namespaceVariableName:m,reexports:g}of t)if(g&&s)for(const t of g)if("*"!==t.reexported){const s=Fo(h,t.imported,p,a,e,m,i,n,o,u);if(f&&(f+=d),"*"!==t.imported&&t.needsLiveBinding){const[e,i]=c([],{functionReturn:!0,lineBreakIndent:null,name:null});f+=`Object.defineProperty(exports,${l}'${t.reexported}',${l}{${d}${r}enumerable:${l}true,${d}${r}get:${l}${e}${s}${i}${d}});`}else f+=`exports${u(t.reexported)}${l}=${l}${s};`}for(const{exported:t,local:s}of e){const e=`exports${u(t)}`;e!==s&&(f&&(f+=d),f+=`${e}${l}=${l}${s};`)}for(const{name:e,reexports:i}of t)if(i&&s)for(const t of i)if("*"===t.reexported){f&&(f+=d);const s=`{${d}${r}if${l}(k${l}!==${l}'default'${l}&&${l}!Object.prototype.hasOwnProperty.call(exports,${l}k))${l}${Go(e,t.needsLiveBinding,r,n)}${p}${d}}`;f+=`Object.keys(${e}).forEach(${h(["k"],{isAsync:!1,name:null})}${s});`}return f?`${d}${d}${f}`:""}function Fo(e,t,s,i,n,r,o,a,l,c){if("default"===t){if(!i){const t=o(a),s=xr[t]?n:e;return Er(t,l)?`${s}${c("default")}`:s}return s?`${e}${c("default")}`:e}return"*"===t?(i?!s:br[o(a)])?r:e:`${e}${c(t)}`}function jo(e){return e([["value","true"]],{lineBreakIndent:null})}function Uo(e,t,s,{_:i,getObject:n}){if(e){if(t)return s?`Object.defineProperties(exports,${i}${n([["__esModule",jo(n)],[null,`[Symbol.toStringTag]:${i}${Mr(n)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${i}'__esModule',${i}${jo(n)});`;if(s)return`Object.defineProperty(exports,${i}Symbol.toStringTag,${i}${Mr(n)});`}return""}const Go=(e,t,s,{_:i,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${i}k,${i}{${r}${s}${s}enumerable:${i}true,${r}${s}${s}get:${i}${t}${e}[k]${o}${r}${s}})`}return`exports[k]${i}=${i}${e}[k]`};function Wo(e,t,s,i,n,r,o,a){const{_:l,cnst:c,n:h}=a,u=new Set,d=[],p=(e,t,s)=>{u.add(t),d.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${s});`)};for(const{defaultVariableName:s,imports:i,importPath:n,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...i||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,gr,o);break}}else{const e=t(n);let r=!1,a=!1;for(const{imported:t,reexported:n}of[...i||[],...c||[]]){let i,c;"default"===t?r||(r=!0,s!==l&&(c=s,i=xr[e])):"*"!==t||"*"===n||a||(a=!0,i=br[e],c=l),i&&p(c,i,o)}}return`${Sr(u,r,o,a,s,i,n)}${d.length>0?`${d.join(h)}${h}${h}`:""}`}function qo(e,t){return"."!==e[0]?e:t?(s=e).endsWith(".js")?s:s+".js":Vo(e);var s}const Ho=new Set([...s(["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"]),"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function Ko(e,t){const s=t.map((({importPath:e})=>e)).filter((e=>Ho.has(e)||e.startsWith("node:")));0!==s.length&&e(Se,function(e){return{code:bt,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Oe(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(s))}const Yo=(e,t)=>e.split(".").map(t).join("");function Xo(e,t,s,i,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=("function"==typeof s?s(o[0]):s[o[0]])||o[0];const a=o.pop();let l=t,c=[...o.map((e=>(l+=r(e),`${l}${n}=${n}${l}${n}||${n}{}`))),`${l}${r(a)}`].join(`,${n}`)+`${n}=${n}${i}`;return o.length>0&&(c=`(${c})`),c}function Qo(e){let t=e.length;for(;t--;){const{imports:s,reexports:i}=e[t];if(s||i)return e.slice(0,t+1)}return[]}const Zo=({dependencies:e,exports:t})=>{const s=new Set(t.map((e=>e.exported)));s.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&s.add(e.reexported);return s},Jo=(e,t,{_:s,cnst:i,getObject:n,n:r})=>e?`${r}${t}${i} _starExcludes${s}=${s}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"",ea=(e,t,{_:s,n:i})=>e.length>0?`${i}${t}var ${e.join(`,${s}`)};`:"",ta=(e,t,s)=>sa(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,s);function sa(e,t,{_:s,n:i}){return 0===e.length?"":1===e.length?`exports('${e[0].name}',${s}${e[0].value});${i}${i}`:`exports({${i}`+e.map((({name:e,value:i})=>`${t}${e}:${s}${i}`)).join(`,${i}`)+`${i}});${i}${i}`}const ia=(e,t,s)=>sa(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,s),na=(e,t,s)=>sa(e.filter((e=>e.local===uo)).map((e=>({name:e.exported,value:uo}))),t,s);function ra(e,t,s){return e?`${t}${Yo(e,s)}`:"null"}var oa={amd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:h,namedExportsMode:u,log:d,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:x,interop:E,namespaceToStringTag:b,strict:v}){Ko(d,s);const S=s.map((e=>`'${qo(e.importPath,m.forceJsExtensionForImports)}'`)),A=s.map((e=>e.name)),{n:k,getNonArrowFunctionIntro:I,_:w}=f;u&&r&&(A.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(A.unshift("require"),S.unshift("'require'")),t.has("module")&&(A.unshift("module"),S.unshift("'module'"));const P=Bo(m,o),C=(P?`'${P}',${w}`:"")+(S.length>0?`[${S.join(`,${w}`)}],${w}`:""),$=v?`${w}'use strict';`:"";e.prepend(`${l}${Wo(s,E,y,x,b,t,a,f)}`);const N=zo(i,s,u,E,f,a,y);let _=Uo(u&&r,c&&(!0===g||"if-default-prop"===g&&n),h&&b,f);_&&(_=k+k+_),e.append(`${N}${_}${p}`).indent(a).prepend(`${m.define}(${C}(${I(A,{isAsync:!1,name:null})}{${$}${k}${k}`).append(`${k}${k}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:h,outro:u,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:x,strict:E}){const{_:b,n:v}=d,S=E?`'use strict';${v}${v}`:"";let A=Uo(h&&r,l&&(!0===f||"if-default-prop"===f&&n),c&&x,d);A&&(A+=v+v);const k=function(e,{_:t,cnst:s,n:i},n){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:h}of e)c||h?(r+=n&&o?",":`${r?`;${i}`:""}${s} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=n&&!o?",":`;${i}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${i}${i}`;return""}(s,d,p),I=Wo(s,y,m,g,x,t,o,d);e.prepend(`${S}${a}${A}${k}${I}`);const w=zo(i,s,h,y,d,o,m,`module.exports${b}=${b}`);e.append(`${w}${u}`)},es:function(e,{accessedGlobals:t,indent:s,intro:i,outro:n,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,namespaceToStringTag:h}){const{n:u}=a,d=function(e,{_:t}){const s=[];for(const{importPath:i,reexports:n,imports:r,name:o,assertions:a}of e){const e=`'${i}'${a?`${t}assert${t}${a}`:""};`;if(n||r){if(r){let i=null,n=null;const o=[];for(const e of r)"default"===e.imported?i=e:"*"===e.imported?n=e:o.push(e);n&&s.push(`import${t}*${t}as ${n.local} from${t}${e}`),i&&0===o.length?s.push(`import ${i.local} from${t}${e}`):o.length>0&&s.push(`import ${i?`${i.local},${t}`:""}{${t}${o.map((e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}if(n){let i=null;const a=[],l=[];for(const e of n)"*"===e.reexported?i=e:"*"===e.imported?a.push(e):l.push(e);if(i&&s.push(`export${t}*${t}from${t}${e}`),a.length>0){r&&r.some((e=>"*"===e.imported&&e.local===o))||s.push(`import${t}*${t}as ${o} from${t}${e}`);for(const e of a)s.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}l.length>0&&s.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`)).join(`,${t}`)}${t}}${t}from${t}${e}`)}}else s.push(`import${t}${e}`)}return s}(r,a);d.length>0&&(i+=d.join(u)+u+u),(i+=Sr(null,t,s,a,l,c,h))&&e.prepend(i);const p=function(e,{_:t,cnst:s}){const i=[],n=[];for(const r of e)r.expression&&i.push(`${s} ${r.local}${t}=${t}${r.expression};`),n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`);n.length>0&&i.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`);return i}(o,a);p.length>0&&e.append(u+u+p.join(u).trim()),n&&e.append(n),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:h,snippets:u},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:x,name:E,namespaceToStringTag:b,strict:v}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:k,n:I}=u,w=E&&E.includes("."),P=!f&&!w;if(E&&P&&(be(C=E)||Ee.test(C)))return Xe(function(e){return{code:lt,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:De(ze)}}(E));var C;Ko(c,s);const $=Qo(s),N=$.map((e=>e.globalName||"null")),_=$.map((e=>e.name));r&&!E&&c(Se,{code:Et,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:De(He)}),l&&r&&(f?(N.unshift(`this${Yo(E,k)}${S}=${S}this${Yo(E,k)}${S}||${S}{}`),_.unshift("exports")):(N.unshift("{}"),_.unshift("exports")));const R=v?`${o}'use strict';${I}`:"",O=Wo(s,x,g,m,b,t,o,u);e.prepend(`${a}${O}`);let D=`(${A(_,{isAsync:!1,name:null})}{${I}${R}${I}`;r&&(!E||f&&l||(D=(P?`var ${E}`:`this${Yo(E,k)}`)+`${S}=${S}${D}`),w&&(D=function(e,t,s,{_:i,getPropertyAccess:n,s:r},o){const a=e.split(".");a[0]=("function"==typeof s?s(a[0]):s[a[0]])||a[0],a.pop();let l=t;return a.map((e=>(l+=n(e),`${l}${i}=${i}${l}${i}||${i}{}${r}`))).join(o?",":"\n")+(o&&a.length>0?";":"\n")}(E,"this",y,u,d)+D));let T=`${I}${I}})(${N.join(`,${S}`)});`;r&&!f&&l&&(T=`${I}${I}${o}return exports;${T}`);const L=zo(i,s,l,x,u,o,g);let M=Uo(l&&r,!0===p||"if-default-prop"===p&&n,b,u);M&&(M=I+I+M),e.append(`${L}${M}${h}`).indent(o).prepend(D).append(T)},system:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasExports:n,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:h,freeze:u,name:d,namespaceToStringTag:p,strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:x,n:E,s:b}=a,{importBindings:v,setters:S,starExcludes:A}=function(e,t,s,{_:i,cnst:n,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let h=null;for(const{imports:u,reexports:d}of e){const p=[];if(u)for(const e of u)l.push(e.local),"*"===e.imported?p.push(`${e.local}${i}=${i}module;`):p.push(`${e.local}${i}=${i}module${o(e.imported)};`);if(d){const a=[];let l=!1;for(const{imported:e,reexported:t}of d)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l){const o=r(a,{lineBreakIndent:null});l?(h||(h=Zo({dependencies:e,exports:t})),p.push(`${n} setter${i}=${i}${o};`,`for${i}(${n} name in module)${i}{`,`${s}if${i}(!_starExcludes[name])${i}setter[name]${i}=${i}module[name];`,"}","exports(setter);")):p.push(`exports(${o});`)}else{const[e,t]=a[0];p.push(`exports('${e}',${i}${t});`)}}c.push(p.join(`${a}${s}${s}${s}`))}return{importBindings:l,setters:c,starExcludes:h}}(s,i,r,a),k=d?`'${d}',${g}`:"",I=t.has("module")?["exports","module"]:n?["exports"]:[];let w=`System.register(${k}[`+s.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${x(I,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Jo(A,r,a)+ea(v,r,a)+`${E}${r}return${g}{${S.length>0?`${E}${r}${r}setters:${g}[${S.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;w+=`${r}${r}execute:${g}(${x([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${b}${E}}));`;e.prepend(o+Sr(null,t,r,a,h,u,p)+ta(i,r,a)).append(`${l}${E}${E}`+ia(i,r,a)+na(i,r,a)).indent(`${r}${r}${r}`).append(P).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:s,exports:i,hasDefaultExport:n,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:h,outro:u,snippets:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:x,interop:E,name:b,namespaceToStringTag:v,globals:S,noConflict:A,strict:k}){const{_:I,cnst:w,getFunctionIntro:P,getNonArrowFunctionIntro:C,getPropertyAccess:$,n:N,s:_}=d,R=f?"f":"factory",O=f?"g":"global";if(r&&!b)return Xe({code:Et,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:De(He)});Ko(h,s);const D=s.map((e=>`'${qo(e.importPath,p.forceJsExtensionForImports)}'`)),T=s.map((e=>`require('${e.importPath}')`)),L=Qo(s),M=L.map((e=>ra(e.globalName,O,$))),V=L.map((e=>e.name));c&&(r||A)&&(D.unshift("'exports'"),T.unshift("exports"),M.unshift(Xo(b,O,S,(g?`${ra(b,O,$)}${I}||${I}`:"")+"{}",d)),V.unshift("exports"));const B=Bo(p,o),z=(B?`'${B}',${I}`:"")+(D.length>0?`[${D.join(`,${I}`)}],${I}`:""),F=p.define,j=!c&&r?`module.exports${I}=${I}`:"",U=k?`${I}'use strict';${N}`:"";let G;if(A){const e=f?"e":"exports";let t;if(!c&&r)t=`${w} ${e}${I}=${I}${Xo(b,O,S,`${R}(${M.join(`,${I}`)})`,d)};`;else{t=`${w} ${e}${I}=${I}${M.shift()};${N}${a}${a}${R}(${[e,...M].join(`,${I}`)});`}G=`(${P([],{isAsync:!1,name:null})}{${N}${a}${a}${w} current${I}=${I}${function(e,t,{_:s,getPropertyAccess:i}){let n=t;return e.split(".").map((e=>n+=i(e))).join(`${s}&&${s}`)}(b,O,d)};${N}${a}${a}${t}${N}${a}${a}${e}.noConflict${I}=${I}${P([],{isAsync:!1,name:null})}{${I}${ra(b,O,$)}${I}=${I}current;${I}return ${e}${_}${I}};${N}${a}})()`}else G=`${R}(${M.join(`,${I}`)})`,!c&&r&&(G=Xo(b,O,S,G,d));const W=r||A&&c||M.length>0,q=[R];W&&q.unshift(O);const H=W?`this,${I}`:"",K=W?`(${O}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${O}${I}||${I}self,${I}`:"",Y=W?")":"",X=W?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${j}${R}(${T.join(`,${I}`)})${I}:${N}`:"",Q=`(${C(q,{isAsync:!1,name:null})}{${N}`+X+`${a}typeof ${F}${I}===${I}'function'${I}&&${I}${F}.amd${I}?${I}${F}(${z}${R})${I}:${N}`+`${a}${K}${G}${Y};${N}`+`})(${H}(${C(V,{isAsync:!1,name:null})}{${U}${N}`,Z=N+N+"}));";e.prepend(`${l}${Wo(s,E,y,x,v,t,a,d)}`);const J=zo(i,s,c,E,d,a,y);let ee=Uo(c&&r,!0===m||"if-default-prop"===m&&n,v,d);ee&&(ee=N+N+ee),e.append(`${J}${ee}${u}`).trim().indent(a).append(Z).prepend(Q)}};const aa=(e,t)=>t?`${e}\n${t}`:e,la=(e,t)=>t?`${e}\n\n${t}`:e;async function ca(e,t,s){try{let[i,n,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(s),[s],aa),t.hookReduceValue("footer",e.footer(s),[s],aa),t.hookReduceValue("intro",e.intro(s),[s],la),t.hookReduceValue("outro",e.outro(s),[s],la)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),i&&(i+="\n"),n&&(n="\n"+n),{banner:i,footer:n,intro:r,outro:o}}catch(e){return Xe((i=e.message,n=e.hook,r=e.plugin,{code:Ze,message:`Could not retrieve "${n}". Check configuration of plugin "${r}".\n\tError Message: ${i}`}))}var i,n,r}const ha={amd:pa,cjs:pa,es:da,iife:pa,system:da,umd:pa};function ua(e,t,s,i,n,r,o,a,l,c,h,u,d,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(i,n,u,d);!function(e,t,s){for(const i of t){for(const t of i.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof oo&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Li(t.name,e,t.forbiddenNames));if(s.has(i)){const t=i.namespace;t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}}}(i,f,p),ha[n](i,s,t,r,o,a,l,c,h);for(const e of f)e.scope.deconflict(n,u,d)}function da(e,t,s,i,n,r,o,a,l){for(const t of s.dependencies)(n||t instanceof F)&&(t.variableName=Li(t.suggestedVariableName,e,null));for(const s of t){const t=s.module,i=s.name;s.isNamespace&&(n||t instanceof Jt)?s.setRenderNames(null,(t instanceof Jt?a.get(t):o.get(t)).variableName):t instanceof Jt&&"default"===i?s.setRenderNames(null,Li([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,s.forbiddenNames)):s.setRenderNames(null,Li(i,e,s.forbiddenNames))}for(const t of l)t.setRenderNames(null,Li(t.name,e,t.forbiddenNames))}function pa(e,t,{deconflictedDefault:s,deconflictedNamespace:i,dependencies:n},r,o,a,l,c){for(const t of n)t.variableName=Li(t.suggestedVariableName,e,null);for(const t of i)t.namespaceVariableName=Li(`${t.suggestedVariableName}__namespace`,e,null);for(const t of s)t.defaultVariableName=i.has(t)&&vr(r(t.id),a)?t.namespaceVariableName:Li(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Jt){const s=c.get(t),i=e.name;if("default"===i){const i=r(t.id),n=xr[i]?s.defaultVariableName:s.variableName;Er(i,a)?e.setRenderNames(n,"default"):e.setRenderNames(null,n)}else"*"===i?e.setRenderNames(null,br[r(t.id)]?s.namespaceVariableName:s.variableName):e.setRenderNames(s.variableName,null)}else{const s=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===s.exportMode?s.namespaceVariableName:s.variableName):"default"===s.exportMode?e.setRenderNames(null,s.variableName):e.setRenderNames(s.variableName,s.getVariableExportName(e))}}}function fa(e,{exports:t,name:s,format:i},n,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Xe(zt("default",o,n))}else if("none"===t&&o.length>0)return Xe(zt("none",o,n));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==i&&"system"!==i&&o.includes("default")&&r(Se,function(e,t){return{code:St,id:e,message:`Entry module "${M(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:De(Be)}}(n,s)),t="named")),t}function ma(e){const t=e.split("\n"),s=t.filter((e=>/^\t+/.test(e))),i=t.filter((e=>/^ {2,}/.test(e)));if(0===s.length&&0===i.length)return null;if(s.length>=i.length)return"\t";const n=i.reduce(((e,t)=>{const s=/^ +/.exec(t)[0].length;return Math.min(s,e)}),1/0);return" ".repeat(n)}function ga(e,t,s,i,n,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Jt){t.push(r.get(e));continue}const o=n.get(e);o===i?s.has(e)||(s.add(e),ga(e,t,s,i,n,r)):t.push(o)}}const ya="!~{",xa="}~",Ea=new RegExp(`${ya}[0-9a-zA-Z_$]{1,59}${xa}`,"g"),ba=(e,t)=>e.replace(Ea,(e=>t.get(e)||e)),va=(e,t,s)=>e.replace(Ea,(e=>e===t?s:e)),Sa=(e,t)=>{const s=new Set,i=e.replace(Ea,(e=>t.has(e)?(s.add(e),`${ya}${"0".repeat(e.length-5)}${xa}`):e));return{containedPlaceholders:s,transformedCode:i}},Aa=Symbol("bundleKeys"),ka={type:"placeholder"};function Ia(e,t,s){return V(e)?Xe(Xt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,i,n)=>{if(!s.hasOwnProperty(i)||n&&"hash"!==i)return Xe(Xt(`"[${i}${n||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=s[i](n&&Number.parseInt(n.slice(1)));return V(r)?Xe(Xt(`Invalid substitution "${r}" for placeholder "[${i}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function wa(e,{[Aa]:t}){if(!t.has(e.toLowerCase()))return e;const s=$(e);e=e.slice(0,Math.max(0,e.length-s.length));let i,n=1;for(;t.has((i=e+ ++n+s).toLowerCase()););return i}const Pa=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Ca(e,t,s,i){const n="function"==typeof t?t(e.id):t[e.id];return n||(s?(i(Se,(r=e.id,o=e.variableName,{code:yt,id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:De(Ue)})),e.variableName):void 0);var r,o}class $a{constructor(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=s,this.unsetOptions=i,this.pluginDriver=n,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=h,this.getPlaceholder=u,this.bundle=d,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!s.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||s.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=ve(this.generateVariableName())}static generateFacade(e,t,s,i,n,r,o,a,l,c,h,u,d,p,f){const m=new $a([],e,t,s,i,n,r,o,a,l,null,u,d,p,f);m.assignFacadeName(h,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof To?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const s=e.getExportNamesByVariable();for(const e of this.exports)if(!s.has(e))return!1;for(const i of t)if(!(i.module===e||s.has(i)||i instanceof mo&&s.has(i.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,s){const i=this.getRenderedChunkInfo(),n=e=>ba(e,s),r=this.fileName=n(i.fileName);return{...i,code:e,dynamicImports:i.dynamicImports.map(n),fileName:r,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(n),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map((([e,t])=>[n(e),t]))),imports:i.imports.map(n),map:t,referencedFiles:i.referencedFiles.map(n)}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[s,i]of t){this.exportNamesByVariable.set(s,[...i]);for(const e of i)this.exportsByName.set(e,s);e.delete(s)}}this.outputOptions.minifyInternalExports?function(e,t,s){let i=0;for(const n of e){let[e]=n.name;if(t.has(e))do{e=Ti(++i),49===e.charCodeAt(0)&&(i+=9*64**(e.length-1),e=Ti(i))}while(xe.has(e)||t.has(e));t.set(e,n),s.set(n,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,s){for(const i of e){let e=0,n=i.name;for(;t.has(n);)n=i.name+"$"+ ++e;t.set(n,i),s.set(i,[n])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=fa(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&s.add(t);for(const i of t){const t=Array.from(new Set(i.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(0===t.length&&i.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(i.chunkFileNames,(e=>({fileName:e})))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===i.preserveSignature||"exports-only"===i.preserveSignature&&i.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(i,s)||(this.facadeModule=i,this.facadeChunkByModule.set(i,this),i.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),i,this.outputOptions.preserveModules))}for(const s of t)e.push($a.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,i,s,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,s)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=Na(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,s)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return T(z(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:s,entryFileNames:i,file:n,format:r,preserveModules:o}=this.outputOptions;if(n)e=P(n);else if(null===this.fileName){const[n,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[i,"output.entryFileNames"]:[s,"output.chunkFileNames"];e=Ia("function"==typeof n?n(this.getPreRenderedChunkInfo()):n,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e)),name:()=>this.getChunkName()}),t||(e=wa(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=ka),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Da),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Da),importedBindings:Ra(this.getRenderedDependencies(),Da),imports:Array.from(this.dependencies,Da),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof fo?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,s,i){const n=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];ga(a,t,r,e,s,i),n.unshift(t)}}const o=new Set;for(const e of n)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}async render(){const{dependencies:e,exportMode:t,facadeModule:s,inputOptions:{onLog:i},outputOptions:n,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=n;if(l&&!c&&null!==s)for(const t of e)t instanceof $a&&this.inlineChunkDependencies(t);const h=this.getPreliminaryFileName(),{accessedGlobals:u,indent:d,magicString:p,renderedSource:f,usedModules:m,usesTopLevelAwait:g}=this.renderModules(h.fileName),y=[...this.getRenderedDependencies().values()],x="none"===t?[]:this.getChunkExportDeclarations(a);let E=x.length>0,b=!1;for(const e of y){const{reexports:t}=e;t?.length&&(E=!0,!b&&t.some((e=>"default"===e.reexported))&&(b=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!x.find((({exported:t})=>t===e))))))}if(!b)for(const{exported:e}of x)if("default"===e){b=!0;break}const{intro:v,outro:S,banner:A,footer:k}=await ca(n,r,this.getRenderedChunkInfo());return oa[a](f,{accessedGlobals:u,dependencies:y,exports:x,hasDefaultExport:b,hasExports:E,id:h.fileName,indent:d,intro:v,isEntryFacade:c||null!==s&&s.info.isEntry,isModuleFacade:null!==s,log:i,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:g},n),A&&p.prepend(A),k&&p.append(k),{chunk:this,magicString:p,preliminaryFileName:h,usedModules:m}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:s}=this;for(const i of e.implicitlyLoadedBefore){const e=t.get(i);e&&e!==this&&s.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},s,i){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(i?this.getPreserveModulesChunkNameFromModule(s):Na(s)))}checkCircularDependencyImport(e,t){const s=e.module;if(s instanceof To){const l=this.chunkByModule.get(s);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(Se,(i=s.getExportNamesByVariable().get(e)?.[0]||"*",n=s.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:n,id:o,message:`Export "${i}" of module "${M(n)}" was reexported through module "${M(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${M(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var i,n,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],s=e.getExportNamesByVariable();for(const i of s.keys()){const s=i instanceof mo,n=s?i.getBaseVariable():i;if(this.checkCircularDependencyImport(n,e),!(n instanceof fo&&this.outputOptions.preserveModules)){const e=n.module;if(e instanceof To){const i=this.chunkByModule.get(e);i&&i!==this&&(i.exports.add(n),t.push(n),s&&this.imports.add(n))}}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?Na(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const s of this.getExportNames()){if("*"===s[0])continue;const i=this.exportsByName.get(s);if(!(i instanceof mo)){const t=i.module;if(t){const i=this.chunkByModule.get(t);if(i!==this){if(!i||"es"!==e)continue;const t=this.renderedDependencies.get(i);if(!t)continue;const{imports:n,reexports:r}=t,o=r?.find((({reexported:e})=>e===s)),a=n?.find((({imported:e})=>e===o?.imported));if(!a)continue}}}let n=null,r=!1,o=i.getName(this.snippets.getPropertyAccess);if(i instanceof Pi){for(const e of i.declarations)if(e.parent instanceof sr||e instanceof ir&&e.declaration instanceof sr){r=!0;break}}else i instanceof mo&&(n=o,"es"===e&&(o=i.renderName));t.push({exported:s,expression:n,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,s){const i=new Set,n=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Jt){const a=this.externalChunkByModule.get(o);i.add(a),e&&("default"===t.name?xr[s(o.id)]&&n.add(a):"*"===t.name&&br[s(o.id)]&&r.add(a))}else{const s=this.chunkByModule.get(o);s!==this&&(i.add(s),e&&"default"===s.exportMode&&t.isNamespace&&r.add(s))}}if(t)for(const e of this.dependencies)i.add(e);return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:i}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof $a||e instanceof F)))}getDynamicImportStringAndAssertions(e,t){if(e instanceof Jt){const s=this.externalChunkByModule.get(e);return[`'${s.getImportPath(t)}'`,s.getImportAssertions(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?L(this.fileName):L(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const s of this.imports){const i=s.module;let n,r;if(i instanceof Jt){if(n=this.externalChunkByModule.get(i),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(i.id))return Xe(Ht(i.id,r,!1))}else n=this.chunkByModule.get(i),r=n.getVariableExportName(s);j(t,n,G).push({imported:r,local:s.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:s,resolution:i}of t.dynamicImports)s.included&&e.push(i instanceof To?{chunk:this.chunkByModule.get(i),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(i),node:s,resolution:i}:i instanceof Jt?{chunk:null,externalChunk:this.externalChunkByModule.get(i),facadeChunk:null,node:s,resolution:i}:{chunk:null,externalChunk:null,facadeChunk:null,node:s,resolution:i});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:s,orderedModules:i}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:s.length>0,moduleIds:i.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=_a(e);if(t)return t;const{preserveModulesRoot:s,sanitizeFileName:i}=this.outputOptions,n=i(w(e.id.split(Oa,1)[0])),r=$(n),o=Pa.has(r)?n.slice(0,-r.length):n;return k(o)?s&&_(o).startsWith(s)?o.slice(s.length).replace(/^[/\\]/,""):N(this.inputBase,o):`_virtual/${P(o)}`}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,s=new Map;for(let i of this.getExportNames()){let n,r,o=!1;if("*"===i[0]){const s=i.slice(1);"defaultOnly"===t(s)&&this.inputOptions.onLog(Se,Kt(s)),o=e,n=this.externalChunkByModule.get(this.modulesById.get(s)),r=i="*"}else{const s=this.exportsByName.get(i);if(s instanceof mo)continue;const a=s.module;if(a instanceof To){if(n=this.chunkByModule.get(a),n===this)continue;r=n.getVariableExportName(s),o=s.isReassigned}else{if(n=this.externalChunkByModule.get(a),r=s.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Xe(Ht(a.id,r,!0));o=e&&("default"!==r||Er(t(a.id),!0))}}j(s,n,G).push({imported:r,needsLiveBinding:o,reexported:i})}return s}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const s of t.importMetas){const t=s.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),s=new Map,i=this.getFileName();for(const n of this.dependencies){const r=e.get(n)||null,o=t.get(n)||null,a=n instanceof F||"default"!==n.exportMode,l=n.getImportPath(i);s.set(n,{assertions:n instanceof F?n.getImportAssertions(this.snippets):null,defaultVariableName:n.defaultVariableName,globalName:n instanceof F&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Ca(n,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:n instanceof $a,name:n.variableName,namedExportsMode:a,namespaceVariableName:n.namespaceVariableName,reexports:o})}return this.renderedDependencies=s}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof $a&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:s,exportNamesByVariable:i,includedNamespaces:n,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:u,renderedModules:m,snippets:g}=this,{compact:E,dynamicImportFunction:b,format:v,freeze:S,namespaceToStringTag:A}=l,{_:k,cnst:I,n:w}=g;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const P=new class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof y)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!d(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{x.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(x.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new y(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach((e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let s;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const i=new f(e.hires);return this.intro&&i.advance(this.intro),this.sources.forEach(((e,n)=>{n>0&&i.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=p(o.original);o.intro&&i.advance(o.intro),o.firstChunk.eachNext((s=>{const n=a(s.start);s.intro.length&&i.advance(s.intro),e.filename?s.edited?i.addEdit(r,s.content,n,s.storeName?t.indexOf(s.original):-1):i.addUneditedChunk(r,s,o.original,n,o.sourcemapLocations):i.advance(s.content),s.outro.length&&i.advance(s.outro)})),o.outro&&i.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===s&&(s=[]),s.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?h(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw,x_google_ignoreList:s}}generateMap(e){return new c(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach((t=>{const s=t.content._getRawIndentString();null!==s&&(e[s]||(e[s]=0),e[s]+=1)})),Object.keys(e).sort(((t,s)=>e[t]-e[s]))[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach(((s,i)=>{const n=void 0!==s.separator?s.separator:this.separator,r=t||i>0&&/\r?\n$/.test(n);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:r}),t="\n"===s.content.lastChar()})),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,((t,s)=>s>0?e+t:t))),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map(((e,t)=>{const s=void 0!==e.separator?e.separator:this.separator;return(t>0?s:"")+e.content.toString()})).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e=>!e.content.isEmpty())))}length(){return this.sources.reduce(((e,t)=>e+t.content.length()),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(t,""),!this.intro){let t,s=0;do{if(t=this.sources[s++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let s,i=this.sources.length-1;do{if(s=this.sources[i--],!s){this.intro=this.intro.replace(t,"");break}}while(!s.content.trimEndAborted(e));return this}}({separator:`${w}${w}`}),C=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=ma(t.originalCode);if(null!==e)return e}return"\t"}(a,l),$=[];let N="";const _=new Set,R=new Map,O={dynamicImportFunction:b,exportNamesByVariable:i,format:v,freeze:S,indent:C,namespaceToStringTag:A,pluginDriver:u,snippets:g,useOriginalName:null};let D=!1;for(const e of a){let s,i=0;if(e.isIncluded()||n.has(e)){const r=e.render(O);({source:s}=r),D||(D=r.usesTopLevelAwait),i=s.length(),i&&(E&&s.lastLine().includes("//")&&s.append("\n"),R.set(e,s),P.addSource(s),$.push(e));const o=e.namespace;if(n.has(e)){const e=o.renderBlock(O);o.renderFirst()?N+=w+e:P.addSource(new y(e))}const a=t.get(e.scope);if(a)for(const e of a)_.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();m[e.id]={get code(){return s?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:i}}N&&P.prepend(N+w+w),this.needsExportsShim&&P.prepend(`${w}${I} ${uo}${k}=${k}void 0;${w}${w}`);const T=E?P:P.trim();var L;return o&&0===this.getExportNames().length&&0===s.size&&r(Se,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${L=this.getChunkName()}".`,names:[L]}),{accessedGlobals:_,indent:C,magicString:P,renderedSource:T,usedModules:$,usesTopLevelAwait:D}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:s,pluginDriver:i,snippets:n}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,c,s,n,i,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAssertions(a,e);o.setExternalResolution("external",a,s,n,i,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,interop:t,namespaceToStringTag:s,preserveModules:i,externalLiveBindings:n}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const s=this.exportsByName.get(t);"es"!==e&&"system"!==e&&s.isReassigned&&!s.isId?s.setRenderNames("exports",t):s instanceof mo?r.add(s):s.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(uo),s&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Lr)o.add(e)}ua(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,t),this.imports,o,e,t,i,n,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:s,orderedModules:i,outputOptions:{format:n}}=this;for(const r of i){for(const s of r.importMetas)s.setResolution(n,t,e);s.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const s=e.namespace.getMemberVariables();for(const e of Object.values(s))e.included&&t.add(e)}for(let s of t){s instanceof oo&&(s=s.getOriginalVariable()),s instanceof mo&&(s=s.getBaseVariable());const t=this.chunkByModule.get(s.module);t!==this&&(this.imports.add(s),s.module instanceof To&&(this.checkCircularDependencyImport(s,e),s instanceof fo&&this.outputOptions.preserveModules||t.exports.add(s)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this)))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:t,resolution:s}of e.dynamicImports)t.included&&s instanceof To&&this.chunkByModule.get(s)===this&&!this.includedNamespaces.has(s)&&(this.includedNamespaces.add(s),this.ensureReexportsAreAvailableForModule(s))}}function Na(e){return _a(e)??L(e.id)}function _a(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function Ra(e,t){const s={};for(const[i,n]of e){const e=new Set;if(n.imports)for(const{imported:t}of n.imports)e.add(t);if(n.reexports)for(const{imported:t}of n.reexports)e.add(t);s[t(i)]=[...e]}return s}const Oa=/[#?]/,Da=e=>e.getFileName();function*Ta(e){for(const t of e)yield*t}function La(e,t,s,i){const{chunkDefinitions:n,modulesInManualChunks:r}=function(e){const t=[],s=new Set(e.keys()),i=Object.create(null);for(const[t,n]of e)Ma(t,i[n]||(i[n]=[]),s);for(const[e,s]of Object.entries(i))t.push({alias:e,modules:s});return{chunkDefinitions:t,modulesInManualChunks:s}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,s=new Map,i=[],n=new Set(e);let r=0;for(const e of n){const o=new Set;i.push(o);const a=new Set([e]);for(const e of a){j(s,e,U).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof Jt||a.add(t);for(const{resolution:s}of e.dynamicImports)s instanceof To&&s.includedDynamicImporters.length>0&&!n.has(s)&&(t.add(s),n.add(s),o.add(s));for(const s of e.implicitlyLoadedBefore)n.has(s)||(t.add(s),n.add(s))}r++}const o=[...n],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,s){const i=new Map,n=new Set;for(const[s,r]of e.entries())i.set(r,s),t.has(r)&&n.add(s);const r=[];for(const e of s){const t=new Set;for(const s of e)t.add(i.get(s));r.push(t)}return{dynamicEntries:n,dynamicImportsByEntry:r}}(o,t,i);return{allEntries:o,dependentEntriesByModule:s,dynamicallyDependentEntriesByDynamicEntry:Va(s,a,o),dynamicImportsByEntry:l}}(e),h=Ba(function*(e,t){for(const[s,i]of e)t.has(s)||(yield{dependentEntries:i,modules:[s]})}(a,r));return function(e,t,s,i){const n=i.map((()=>0n)),r=i.map(((e,s)=>t.has(s)?-1n:0n));let o=1n;for(const{dependentEntries:t}of e){for(const e of t)n[e]|=o;o<<=1n}const a=t;for(const[e,t]of a){a.delete(e);const i=r[e];let o=i;for(const e of t)o&=n[e]|r[e];if(o!==i){r[e]=o;for(const t of s[e])j(a,t,U).add(e)}}o=1n;for(const{dependentEntries:t}of e){for(const e of t)(r[e]&o)===o&&t.delete(e);o<<=1n}}(h,l,c,o),n.push(...function(e,t,s,i){Po("optimize chunks",3);const n=function(e,t,s){const i=[],n=[],r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:t,modules:c}of e){const e={containedAtoms:l,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:t,modules:c,pure:!0,size:0};let h=0,u=!0;for(const t of c)r.set(t,e),t.isIncluded()&&(u&&(u=!t.hasEffects()),h+=s>1?t.estimateSize():1);e.pure=u,e.size=h,o.push(h),u||(a|=l),(h{const e=i;return i<<=1n,r|=e,e})));else{const i=t.get(a);i&&i!==e&&(s.add(i),i.dependentChunks.add(e))}const{containedAtoms:c}=e;for(const e of a)o[e]|=c}}for(const t of e)for(const e of t){const{dependentEntries:t}=e;e.correlatedAtoms=-1n;for(const s of t)e.correlatedAtoms&=o[s]}return r}([n,i],r,t,l),{big:new Set(n),sideEffectAtoms:a,sizeByAtom:o,small:new Set(i)}}(e,t,s);if(!n)return Co("optimize chunks",3),e;return s>1&&i("info",Gt(e.length,n.small.size,"Initially")),function(e,t){const{small:s}=e;for(const i of s){const n=za(i,e,t<=1?1:1/0);if(n){const{containedAtoms:r,correlatedAtoms:o,modules:a,pure:l,size:c}=i;s.delete(i),Fa(n,t,e).delete(n),n.modules.push(...a),n.size+=c,n.pure&&(n.pure=l);const{dependencies:h,dependentChunks:u,dependentEntries:d}=n;n.correlatedAtoms&=o,n.containedAtoms|=r;for(const e of i.dependentEntries)d.add(e);for(const e of i.dependencies)h.add(e),e.dependentChunks.delete(i),e.dependentChunks.add(n);for(const e of i.dependentChunks)u.add(e),e.dependencies.delete(i),e.dependencies.add(n);h.delete(n),u.delete(n),Fa(n,t,e).add(n)}}}(n,s),s>1&&i("info",Gt(n.small.size+n.big.size,n.small.size,"After merging chunks")),Co("optimize chunks",3),[...n.small,...n.big]}(Ba(h),o.length,s,i).map((({modules:e})=>({alias:null,modules:e})))),n}function Ma(e,t,s){const i=new Set([e]);for(const e of i){s.add(e),t.push(e);for(const t of e.dependencies)t instanceof Jt||s.has(t)||i.add(t)}}function Va(e,t,s){const i=new Map;for(const n of t){const t=j(i,n,U),r=s[n];for(const s of Ta([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const i of e.get(s))t.add(i)}return i}function Ba(e){var t;const s=Object.create(null);for(const{dependentEntries:i,modules:n}of e){let e=0n;for(const t of i)e|=1n<=t)return 1/0;return i}(o&~r,s,n)}const Wa=(e,t)=>e.execIndex>t.execIndex?1:-1;function qa(e,t,s){const i=Symbol(e.id),n=[e.id];let r=t;for(e.cycles.add(i);r!==e;)r.cycles.add(i),n.push(r.id),r=s.get(r);return n.push(n[0]),n.reverse(),n}const Ha=(e,t)=>t?`(${e})`:e,Ka=/^(?!\d)[\w$]+$/;class Ya{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,s){return{column:t,line:e,name:s,source:this}}}class Xa{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,s=[],i=[],n=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:h,source:{content:u,filename:d}}=l;let p=t.get(d);if(void 0===p)p=e.length,e.push(d),t.set(d,p),s[p]=u;else if(null==s[p])s[p]=u;else if(null!=u&&s[p]!==u)return Xe(qt(d));const f=[r[0],p,c,o];if(h){let e=n.get(h);void 0===e&&(e=i.length,i.push(h),n.set(h,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:i,sources:e,sourcesContent:s}}traceSegment(e,t,s){const i=this.mappings[e];if(!i)return null;let n=0,r=i.length-1;for(;n<=r;){const e=n+r>>1,o=i[e];if(o[0]===t||n===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:s):null}o[0]>t?r=e-1:n=e+1}return null}}function Qa(e){return function(t,s){return s.mappings?new Xa(s,[t]):(e(Se,(i=s.plugin,{code:wt,message:`Sourcemap is likely to be incorrect: a plugin (${i}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:i,url:De(Le)})),new Xa({mappings:[],names:[]},[t]));var i}}function Za(e,t,s,i,n){let r;if(s){const t=s.sources,i=s.sourcesContent||[],n=C(e)||".",o=s.sourceRoot||".",a=t.map(((e,t)=>new Ya(_(n,o,e),i[t])));r=new Xa(s,a)}else r=new Ya(e,t);return i.reduce(n,r)}var Ja={},el=tl;function tl(e,t){if(!e)throw new Error(t||"Assertion failed")}tl.equal=function(e,t,s){if(e!=t)throw new Error(s||"Assertion failed: "+e+" != "+t)};var sl={exports:{}};"function"==typeof Object.create?sl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:sl.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var il=sl.exports,nl=el,rl=il;function ol(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function al(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function ll(e){return 1===e.length?"0"+e:e}function cl(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}Ja.inherits=rl,Ja.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var s=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>6|192,s[i++]=63&r|128):ol(e,n)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n)),s[i++]=r>>18|240,s[i++]=r>>12&63|128,s[i++]=r>>6&63|128,s[i++]=63&r|128):(s[i++]=r>>12|224,s[i++]=r>>6&63|128,s[i++]=63&r|128)}else for(n=0;n>>0}return r},Ja.split32=function(e,t){for(var s=new Array(4*e.length),i=0,n=0;i>>24,s[n+1]=r>>>16&255,s[n+2]=r>>>8&255,s[n+3]=255&r):(s[n+3]=r>>>24,s[n+2]=r>>>16&255,s[n+1]=r>>>8&255,s[n]=255&r)}return s},Ja.rotr32=function(e,t){return e>>>t|e<<32-t},Ja.rotl32=function(e,t){return e<>>32-t},Ja.sum32=function(e,t){return e+t>>>0},Ja.sum32_3=function(e,t,s){return e+t+s>>>0},Ja.sum32_4=function(e,t,s,i){return e+t+s+i>>>0},Ja.sum32_5=function(e,t,s,i,n){return e+t+s+i+n>>>0},Ja.sum64=function(e,t,s,i){var n=e[t],r=i+e[t+1]>>>0,o=(r>>0,e[t+1]=r},Ja.sum64_hi=function(e,t,s,i){return(t+i>>>0>>0},Ja.sum64_lo=function(e,t,s,i){return t+i>>>0},Ja.sum64_4_hi=function(e,t,s,i,n,r,o,a){var l=0,c=t;return l+=(c=c+i>>>0)>>0)>>0)>>0},Ja.sum64_4_lo=function(e,t,s,i,n,r,o,a){return t+i+r+a>>>0},Ja.sum64_5_hi=function(e,t,s,i,n,r,o,a,l,c){var h=0,u=t;return h+=(u=u+i>>>0)>>0)>>0)>>0)>>0},Ja.sum64_5_lo=function(e,t,s,i,n,r,o,a,l,c){return t+i+r+a+c>>>0},Ja.rotr64_hi=function(e,t,s){return(t<<32-s|e>>>s)>>>0},Ja.rotr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0},Ja.shr64_hi=function(e,t,s){return e>>>s},Ja.shr64_lo=function(e,t,s){return(e<<32-s|t>>>s)>>>0};var hl={},ul=Ja,dl=el;function pl(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}hl.BlockHash=pl,pl.prototype.update=function(e,t){if(e=ul.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var s=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-s,e.length),0===this.pending.length&&(this.pending=null),e=ul.join32(e,0,e.length-s,this.endian);for(var i=0;i>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,r=8;r>>3},fl.g1_256=function(e){return ml(e,17)^ml(e,19)^e>>>10};var El=Ja,bl=hl,vl=fl,Sl=el,Al=El.sum32,kl=El.sum32_4,Il=El.sum32_5,wl=vl.ch32,Pl=vl.maj32,Cl=vl.s0_256,$l=vl.s1_256,Nl=vl.g0_256,_l=vl.g1_256,Rl=bl.BlockHash,Ol=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Dl(){if(!(this instanceof Dl))return new Dl;Rl.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ol,this.W=new Array(64)}El.inherits(Dl,Rl);var Tl=Dl;Dl.blockSize=512,Dl.outSize=256,Dl.hmacStrength=192,Dl.padLength=64,Dl.prototype._update=function(e,t){for(var s=this.W,i=0;i<16;i++)s[i]=e[t+i];for(;iLl();function Vl(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),""===e.mappings)return{mappings:[],names:[],sources:[],version:3};const t="string"==typeof e.mappings?n.decode(e.mappings):e.mappings;return{...e,mappings:t}}async function Bl(e,t,s,i,n){Po("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map((e=>e.render())));Co("render chunks",2),Po("transform chunks",2);const o=function(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}(e),{nonHashedChunksWithPlaceholders:a,renderedChunksByPlaceholder:l,hashDependenciesByPlaceholder:c}=await async function(e,t,s,i,n){const r=[],o=new Map,a=new Map,l=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&l.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:c,hashPlaceholder:h},magicString:u,usedModules:d})=>{const p={chunk:e,fileName:c,...await zl(u,c,d,t,s,i,n)},{code:f}=p;if(h){const{containedPlaceholders:t,transformedCode:s}=Sa(f,l),n=Ml().update(s),r=i.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>(t&&(e+=t),e)));r&&n.update(r),o.set(h,p),a.set(h,{containedPlaceholders:t,contentHash:n.digest("hex")})}else r.push(p)}))),{hashDependenciesByPlaceholder:a,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}(r,o,i,s,n),h=function(e,t,s){const i=new Map;for(const[n,{fileName:r}]of e){let e=Ml();const o=new Set([n]);for(const s of o){const{containedPlaceholders:i,contentHash:n}=t.get(s);e.update(n);for(const e of i)o.add(e)}let a,l;do{l&&(e=Ml().update(l)),l=e.digest("hex").slice(0,n.length),a=va(r,n,l)}while(s[Aa].has(a.toLowerCase()));s[a]=ka,i.set(n,l)}return i}(l,c,t);!function(e,t,s,i,n,r){for(const{chunk:i,code:o,fileName:a,map:l}of e.values()){let e=ba(o,t);const c=ba(a,t);l&&(l.file=ba(l.file,t),e+=Fl(c,l,n,r)),s[c]=i.finalizeChunk(e,l,t)}for(const{chunk:e,code:o,fileName:a,map:l}of i){let i=t.size>0?ba(o,t):o;l&&(i+=Fl(a,l,n,r)),s[a]=e.finalizeChunk(i,l,t)}}(l,h,t,a,s,i),Co("transform chunks",2)}async function zl(e,t,s,i,n,r,o){let a=null;const l=[];let h=await r.hookReduceArg0("renderChunk",[e.toString(),i[t],n,{chunks:i}],((e,t,s)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Vl(t.map);l.push(e||{missing:!0,plugin:s.name})}return t.code}));const{compact:u,dir:d,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:x}=n;if(u||"\n"===h[h.length-1]||(h+="\n"),f){let i;Po("sourcemaps",3),i=p?_(g||p):d?_(d,t):_(t);a=function(e,t,s,i,n,r){const o=Qa(r),a=s.filter((e=>!e.excludeFromSourcemap)).map((e=>Za(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new Xa(t,a),h=i.reduce(o,l);let{sources:u,sourcesContent:d,names:p,mappings:f}=h.traceMappings();if(e){const t=C(e);u=u.map((e=>N(t,e))),e=P(e)}return d=n?null:d,new c({file:e,mappings:f,names:p,sources:u,sourcesContent:d})}(i,e.generateDecodedMap({}),s,l,m,o);for(let e=0;e{const t=new Set;return new Proxy(e,{deleteProperty:(e,s)=>("string"==typeof s&&t.delete(s.toLowerCase()),Reflect.deleteProperty(e,s)),get:(e,s)=>s===Aa?t:Reflect.get(e,s),set:(e,s,i)=>("string"==typeof s&&t.add(s.toLowerCase()),Reflect.set(e,s,i))})})(t);this.pluginDriver.setOutputBundle(s,this.outputOptions);try{Po("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Co("initialize render",2),Po("generate chunks",2);const e=(()=>{let e=0;return(t,s=8)=>{if(s>64)return Xe(Xt(`Hashes cannot be longer than 64 characters, received ${s}. Check the "${t}" option.`));const i=`${ya}${Ti(++e).padStart(s-5,"0")}${xa}`;return i.length>s?Xe(Xt(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${i.length}, received ${s}. Check the "${t}" option.`)):i}})(),t=await this.generateChunks(s,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Xe(Ft("output.format",Fe,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Xe(Ft("output.file",Ve,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return Xe(Ft("output.sourcemapFile",Ke,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Se,Ft("output.amd.id",Me,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();Co("generate chunks",2),await Bl(t,s,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,s=Object.values(e);for(const e of s)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of s)if("chunk"===e.type)for(const s of e.referencedFiles)t.has(s)&&t.delete(s);for(const s of t)delete e[s]})(s),Po("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,s,e]),this.finaliseAssets(s),Co("generate bundle",2),Co("GENERATE",1),t}async addManualChunks(e){const t=new Map,s=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)}))));for(const{alias:e,entries:i}of s)for(const s of i)Ul(e,s,t);return t}assignManualChunks(e){const t=[],s={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const i of this.graph.modulesById.values()){const n=e(i.id,s);if("string"==typeof n){if(!(i instanceof To))return Xe(Yt(i.id));t.push([n,i])}}t.sort((([e],[t])=>e>t?1:e`${t?"async ":""}function${s?` ${s}`:""}${r}(${e.join(`,${r}`)})${r}`,h=t?(e,{isAsync:t,name:s})=>{const i=1===e.length;return`${s?`${l} ${s}${r}=${r}`:""}${t?`async${i?" ":r}`:""}${i?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,u=(e,{functionReturn:s,lineBreakIndent:i,name:n})=>[`${h(e,{isAsync:!1,name:n})}${t?i?`${o}${i.base}${i.t}`:"":`{${i?`${o}${i.base}${i.t}`:r}${s?"return ":""}`}`,t?`${n?";":""}${i?`${o}${i.base}`:""}`:`${a}${i?`${o}${i.base}`:r}}`],d=n?e=>Ka.test(e):e=>!xe.has(e)&&Ka.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,s,{needsArrowReturnParens:i,needsWrappedFunction:n})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Ha(`${r}${Ha(s,t&&i)}${o}`,t||n)}(`},getFunctionIntro:h,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const s=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(null===e)return`${s}${t}`;const n=!d(e);return e===t&&i&&!n?s+e:`${s}${n?`'${e}'`:e}:${r}${t}`})).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>d(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const s of e.values())s instanceof To&&(s.isIncluded()||s.info.isEntry||s.includedDynamicImporters.length>0)&&t.push(s);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return C(e[0]);const t=e.slice(1).reduce(((e,t)=>{const s=t.split(/\/+|\\+/);let i;for(i=0;e[i]===s[i]&&i1?t.join("/"):"/"}(function(e,t){const s=[];for(const i of e)(i.info.isEntry||t)&&k(i.id)&&s.push(i.id);return s}(l,r)),h=function(e,t,s){const i=new Map;for(const n of e.values())n instanceof Jt&&i.set(n,new F(n,t,s));return i}(this.graph.modulesById,this.outputOptions,c),u=[],d=new Map;for(const{alias:n,modules:p}of i?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):La(this.graph.entryModules,o,s,this.inputOptions.onLog)){p.sort(Wa);const s=new $a(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,d,h,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);u.push(s)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function Ul(e,t,s){const i=s.get(t);if("string"==typeof i&&i!==e)return Xe((n=t.id,r=e,o=i,{code:ct,message:`Cannot assign "${M(n)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var n,r,o;s.set(t,e)}var Gl=[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,81,2,71,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,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Wl=[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,20,1,64,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,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,16,0,30,2,3,0,15,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,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,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,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],ql="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Hl={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"},Kl="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",Yl={5:Kl,"5module":Kl+" export import",6:Kl+" const class extends export import super"},Xl=/^in(stanceof)?$/,Ql=new RegExp("["+ql+"]"),Zl=new RegExp("["+ql+"‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_]");function Jl(e,t){for(var s=65536,i=0;ie)return!1;if((s+=t[i+1])>=e)return!0}return!1}function ec(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Ql.test(String.fromCharCode(e)):!1!==t&&Jl(e,Wl)))}function tc(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&Zl.test(String.fromCharCode(e)):!1!==t&&(Jl(e,Wl)||Jl(e,Gl)))))}var sc=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function ic(e,t){return new sc(e,{beforeExpr:!0,binop:t})}var nc={beforeExpr:!0},rc={startsExpr:!0},oc={};function ac(e,t){return void 0===t&&(t={}),t.keyword=e,oc[e]=new sc(e,t)}var lc={num:new sc("num",rc),regexp:new sc("regexp",rc),string:new sc("string",rc),name:new sc("name",rc),privateId:new sc("privateId",rc),eof:new sc("eof"),bracketL:new sc("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new sc("]"),braceL:new sc("{",{beforeExpr:!0,startsExpr:!0}),braceR:new sc("}"),parenL:new sc("(",{beforeExpr:!0,startsExpr:!0}),parenR:new sc(")"),comma:new sc(",",nc),semi:new sc(";",nc),colon:new sc(":",nc),dot:new sc("."),question:new sc("?",nc),questionDot:new sc("?."),arrow:new sc("=>",nc),template:new sc("template"),invalidTemplate:new sc("invalidTemplate"),ellipsis:new sc("...",nc),backQuote:new sc("`",rc),dollarBraceL:new sc("${",{beforeExpr:!0,startsExpr:!0}),eq:new sc("=",{beforeExpr:!0,isAssign:!0}),assign:new sc("_=",{beforeExpr:!0,isAssign:!0}),incDec:new sc("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new sc("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ic("||",1),logicalAND:ic("&&",2),bitwiseOR:ic("|",3),bitwiseXOR:ic("^",4),bitwiseAND:ic("&",5),equality:ic("==/!=/===/!==",6),relational:ic("/<=/>=",7),bitShift:ic("<>/>>>",8),plusMin:new sc("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ic("%",10),star:ic("*",10),slash:ic("/",10),starstar:new sc("**",{beforeExpr:!0}),coalesce:ic("??",1),_break:ac("break"),_case:ac("case",nc),_catch:ac("catch"),_continue:ac("continue"),_debugger:ac("debugger"),_default:ac("default",nc),_do:ac("do",{isLoop:!0,beforeExpr:!0}),_else:ac("else",nc),_finally:ac("finally"),_for:ac("for",{isLoop:!0}),_function:ac("function",rc),_if:ac("if"),_return:ac("return",nc),_switch:ac("switch"),_throw:ac("throw",nc),_try:ac("try"),_var:ac("var"),_const:ac("const"),_while:ac("while",{isLoop:!0}),_with:ac("with"),_new:ac("new",{beforeExpr:!0,startsExpr:!0}),_this:ac("this",rc),_super:ac("super",rc),_class:ac("class",rc),_extends:ac("extends",nc),_export:ac("export"),_import:ac("import",rc),_null:ac("null",rc),_true:ac("true",rc),_false:ac("false",rc),_in:ac("in",{beforeExpr:!0,binop:7}),_instanceof:ac("instanceof",{beforeExpr:!0,binop:7}),_typeof:ac("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ac("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ac("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},cc=/\r\n?|\n|\u2028|\u2029/,hc=new RegExp(cc.source,"g");function uc(e){return 10===e||13===e||8232===e||8233===e}function dc(e,t,s){void 0===s&&(s=e.length);for(var i=t;i>10),56320+(1023&e)))}var Sc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ac=function(e,t){this.line=e,this.column=t};Ac.prototype.offset=function(e){return new Ac(this.line,this.column+e)};var kc=function(e,t,s){this.start=t,this.end=s,null!==e.sourceFile&&(this.source=e.sourceFile)};function Ic(e,t){for(var s=1,i=0;;){var n=dc(e,i,t);if(n<0)return new Ac(s,t-i);++s,i=n}}var wc={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},Pc=!1;function Cc(e){var t={};for(var s in wc)t[s]=e&&xc(e,s)?e[s]:wc[s];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!Pc&&"object"==typeof console&&console.warn&&(Pc=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),Ec(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return Ec(t.onComment)&&(t.onComment=function(e,t){return function(s,i,n,r,o,a){var l={type:s?"Block":"Line",value:i,start:n,end:r};e.locations&&(l.loc=new kc(this,o,a)),e.ranges&&(l.range=[n,r]),t.push(l)}}(t,t.onComment)),t}var $c=256;function Nc(e,t){return 2|(e?4:0)|(t?8:0)}var _c=function(e,t,s){this.options=e=Cc(e),this.sourceFile=e.sourceFile,this.keywords=bc(Yl[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var i="";!0!==e.allowReserved&&(i=Hl[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(i+=" await")),this.reservedWords=bc(i);var n=(i?i+" ":"")+Hl.strict;this.reservedWordsStrict=bc(n),this.reservedWordsStrictBind=bc(n+" "+Hl.strictBind),this.input=String(t),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf("\n",s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(cc).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=lc.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},Rc={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};_c.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},Rc.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},Rc.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Rc.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},Rc.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&$c)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Rc.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(64&t)>0||s||this.options.allowSuperOutsideMethod},Rc.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},Rc.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Rc.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,s=e.inClassFieldInit;return(258&t)>0||s},Rc.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&$c)>0},_c.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var s=this,i=0;i=,?^&]/.test(n)||"!"===n&&"="===this.input.charAt(i+1))}e+=t[0].length,fc.lastIndex=e,e+=fc.exec(this.input)[0].length,";"===this.input[e]&&e++}},Oc.eat=function(e){return this.type===e&&(this.next(),!0)},Oc.isContextual=function(e){return this.type===lc.name&&this.value===e&&!this.containsEsc},Oc.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},Oc.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},Oc.canInsertSemicolon=function(){return this.type===lc.eof||this.type===lc.braceR||cc.test(this.input.slice(this.lastTokEnd,this.start))},Oc.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Oc.semicolon=function(){this.eat(lc.semi)||this.insertSemicolon()||this.unexpected()},Oc.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},Oc.expect=function(e){this.eat(e)||this.unexpected()},Oc.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Tc=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Oc.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var s=t?e.parenthesizedAssign:e.parenthesizedBind;s>-1&&this.raiseRecoverable(s,t?"Assigning to rvalue":"Parenthesized pattern")}},Oc.checkExpressionErrors=function(e,t){if(!e)return!1;var s=e.shorthandAssign,i=e.doubleProto;if(!t)return s>=0||i>=0;s>=0&&this.raise(s,"Shorthand property assignments are valid only in destructuring patterns"),i>=0&&this.raiseRecoverable(i,"Redefinition of __proto__ property")},Oc.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&i<56320)return!0;if(ec(i,!0)){for(var n=s+1;tc(i=this.input.charCodeAt(n),!0);)++n;if(92===i||i>55295&&i<56320)return!0;var r=this.input.slice(s,n);if(!Xl.test(r))return!0}return!1},Lc.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;fc.lastIndex=this.pos;var e,t=fc.exec(this.input),s=this.pos+t[0].length;return!(cc.test(this.input.slice(this.pos,s))||"function"!==this.input.slice(s,s+8)||s+8!==this.input.length&&(tc(e=this.input.charCodeAt(s+8))||e>55295&&e<56320))},Lc.parseStatement=function(e,t,s){var i,n=this.type,r=this.startNode();switch(this.isLet(e)&&(n=lc._var,i="let"),n){case lc._break:case lc._continue:return this.parseBreakContinueStatement(r,n.keyword);case lc._debugger:return this.parseDebuggerStatement(r);case lc._do:return this.parseDoStatement(r);case lc._for:return this.parseForStatement(r);case lc._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case lc._class:return e&&this.unexpected(),this.parseClass(r,!0);case lc._if:return this.parseIfStatement(r);case lc._return:return this.parseReturnStatement(r);case lc._switch:return this.parseSwitchStatement(r);case lc._throw:return this.parseThrowStatement(r);case lc._try:return this.parseTryStatement(r);case lc._const:case lc._var:return i=i||this.value,e&&"var"!==i&&this.unexpected(),this.parseVarStatement(r,i);case lc._while:return this.parseWhileStatement(r);case lc._with:return this.parseWithStatement(r);case lc.braceL:return this.parseBlock(!0,r);case lc.semi:return this.parseEmptyStatement(r);case lc._export:case lc._import:if(this.options.ecmaVersion>10&&n===lc._import){fc.lastIndex=this.pos;var o=fc.exec(this.input),a=this.pos+o[0].length,l=this.input.charCodeAt(a);if(40===l||46===l)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'")),n===lc._import?this.parseImport(r):this.parseExport(r,s);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var c=this.value,h=this.parseExpression();return n===lc.name&&"Identifier"===h.type&&this.eat(lc.colon)?this.parseLabeledStatement(r,c,h,e):this.parseExpressionStatement(r,h)}},Lc.parseBreakContinueStatement=function(e,t){var s="break"===t;this.next(),this.eat(lc.semi)||this.insertSemicolon()?e.label=null:this.type!==lc.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(lc.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},Lc.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Mc),this.enterScope(0),this.expect(lc.parenL),this.type===lc.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var s=this.isLet();if(this.type===lc._var||this.type===lc._const||s){var i=this.startNode(),n=s?"let":this.value;return this.next(),this.parseVar(i,!0,n),this.finishNode(i,"VariableDeclaration"),(this.type===lc._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===i.declarations.length?(this.options.ecmaVersion>=9&&(this.type===lc._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,i)):(t>-1&&this.unexpected(t),this.parseFor(e,i))}var r=this.isContextual("let"),o=!1,a=new Tc,l=this.parseExpression(!(t>-1)||"await",a);return this.type===lc._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===lc._in?t>-1&&this.unexpected(t):e.await=t>-1),r&&o&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,a),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},Lc.parseFunctionStatement=function(e,t,s){return this.next(),this.parseFunction(e,zc|(s?0:Fc),!1,t)},Lc.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(lc._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},Lc.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(lc.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},Lc.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(lc.braceL),this.labels.push(Vc),this.enterScope(0);for(var s=!1;this.type!==lc.braceR;)if(this.type===lc._case||this.type===lc._default){var i=this.type===lc._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),s=!0,t.test=null),this.expect(lc.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")},Lc.parseThrowStatement=function(e){return this.next(),cc.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 Bc=[];Lc.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(lc.parenR),e},Lc.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===lc._catch){var t=this.startNode();this.next(),this.eat(lc.parenL)?t.param=this.parseCatchClauseParam():(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(lc._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},Lc.parseVarStatement=function(e,t,s){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")},Lc.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Mc),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},Lc.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")},Lc.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},Lc.parseLabeledStatement=function(e,t,s,i){for(var n=0,r=this.labels;n=0;a--){var l=this.labels[a];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")},Lc.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Lc.parseBlock=function(e,t,s){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(lc.braceL),e&&this.enterScope(0);this.type!==lc.braceR;){var i=this.parseStatement(null);t.body.push(i)}return s&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},Lc.parseFor=function(e,t){return e.init=t,this.expect(lc.semi),e.test=this.type===lc.semi?null:this.parseExpression(),this.expect(lc.semi),e.update=this.type===lc.parenR?null:this.parseExpression(),this.expect(lc.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},Lc.parseForIn=function(e,t){var s=this.type===lc._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!s||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(s?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=s?this.parseExpression():this.parseMaybeAssign(),this.expect(lc.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,s?"ForInStatement":"ForOfStatement")},Lc.parseVar=function(e,t,s,i){for(e.declarations=[],e.kind=s;;){var n=this.startNode();if(this.parseVarId(n,s),this.eat(lc.eq)?n.init=this.parseMaybeAssign(t):i||"const"!==s||this.type===lc._in||this.options.ecmaVersion>=6&&this.isContextual("of")?i||"Identifier"===n.id.type||t&&(this.type===lc._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(lc.comma))break}return e},Lc.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var zc=1,Fc=2;function jc(e,t){var s=t.key.name,i=e[s],n="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(n=(t.static?"s":"i")+t.kind),"iget"===i&&"iset"===n||"iset"===i&&"iget"===n||"sget"===i&&"sset"===n||"sset"===i&&"sget"===n?(e[s]="true",!1):!!i||(e[s]=n,!1)}function Uc(e,t){var s=e.computed,i=e.key;return!s&&("Identifier"===i.type&&i.name===t||"Literal"===i.type&&i.value===t)}Lc.parseFunction=function(e,t,s,i,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i)&&(this.type===lc.star&&t&Fc&&this.unexpected(),e.generator=this.eat(lc.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&zc&&(e.id=4&t&&this.type!==lc.name?null:this.parseIdent(),!e.id||t&Fc||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nc(e.async,e.generator)),t&zc||(e.id=this.type===lc.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,s,!1,n),this.yieldPos=r,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,t&zc?"FunctionDeclaration":"FunctionExpression")},Lc.parseFunctionParams=function(e){this.expect(lc.parenL),e.params=this.parseBindingList(lc.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Lc.parseClass=function(e,t){this.next();var s=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),n=this.startNode(),r=!1;for(n.body=[],this.expect(lc.braceL);this.type!==lc.braceR;){var o=this.parseClassElement(null!==e.superClass);o&&(n.body.push(o),"MethodDefinition"===o.type&&"constructor"===o.kind?(r&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),r=!0):o.key&&"PrivateIdentifier"===o.key.type&&jc(i,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=s,this.next(),e.body=this.finishNode(n,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Lc.parseClassElement=function(e){if(this.eat(lc.semi))return null;var t=this.options.ecmaVersion,s=this.startNode(),i="",n=!1,r=!1,o="method",a=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(lc.braceL))return this.parseClassStaticBlock(s),s;this.isClassElementNameStart()||this.type===lc.star?a=!0:i="static"}if(s.static=a,!i&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==lc.star||this.canInsertSemicolon()?i="async":r=!0),!i&&(t>=9||!r)&&this.eat(lc.star)&&(n=!0),!i&&!r&&!n){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=l:i=l)}if(i?(s.computed=!1,s.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),s.key.name=i,this.finishNode(s.key,"Identifier")):this.parseClassElementName(s),t<13||this.type===lc.parenL||"method"!==o||n||r){var c=!s.static&&Uc(s,"constructor"),h=c&&e;c&&"method"!==o&&this.raise(s.key.start,"Constructor can't have get/set modifier"),s.kind=c?"constructor":o,this.parseClassMethod(s,n,r,h)}else this.parseClassField(s);return s},Lc.isClassElementNameStart=function(){return this.type===lc.name||this.type===lc.privateId||this.type===lc.num||this.type===lc.string||this.type===lc.bracketL||this.type.keyword},Lc.parseClassElementName=function(e){this.type===lc.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Lc.parseClassMethod=function(e,t,s,i){var n=e.key;"constructor"===e.kind?(t&&this.raise(n.start,"Constructor can't be a generator"),s&&this.raise(n.start,"Constructor can't be an async method")):e.static&&Uc(e,"prototype")&&this.raise(n.start,"Classes may not have a static property named prototype");var r=e.value=this.parseMethod(t,s,i);return"get"===e.kind&&0!==r.params.length&&this.raiseRecoverable(r.start,"getter should have no params"),"set"===e.kind&&1!==r.params.length&&this.raiseRecoverable(r.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===r.params[0].type&&this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},Lc.parseClassField=function(e){if(Uc(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&Uc(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(lc.eq)){var t=this.currentThisScope(),s=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=s}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},Lc.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==lc.braceR;){var s=this.parseStatement(null);e.body.push(s)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},Lc.parseClassId=function(e,t){this.type===lc.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},Lc.parseClassSuper=function(e){e.superClass=this.eat(lc._extends)?this.parseExprSubscripts(null,!1):null},Lc.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Lc.exitClassBody=function(){for(var e=this.privateNameStack.pop(),t=e.declared,s=e.used,i=this.privateNameStack.length,n=0===i?null:this.privateNameStack[i-1],r=0;r=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==lc.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},Lc.parseExport=function(e,t){if(this.next(),this.eat(lc.star))return this.parseExportAllDeclaration(e,t);if(this.eat(lc._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==lc.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var s=0,i=e.specifiers;s=13&&this.type===lc.string){var e=this.parseLiteral(this.value);return Sc.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},Lc.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var Gc=_c.prototype;Gc.toAssignable=function(e,t,s){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",s&&this.checkPatternErrors(s,!0);for(var i=0,n=e.properties;i=8&&!a&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(lc._function))return this.overrideContext(qc.f_expr),this.parseFunction(this.startNodeAt(r,o),0,!1,!0,t);if(n&&!this.canInsertSemicolon()){if(this.eat(lc.arrow))return this.parseArrowExpression(this.startNodeAt(r,o),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===lc.name&&!a&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(lc.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,o),[l],!0,t)}return l;case lc.regexp:var c=this.value;return(i=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},i;case lc.num:case lc.string:return this.parseLiteral(this.value);case lc._null:case lc._true:case lc._false:return(i=this.startNode()).value=this.type===lc._null?null:this.type===lc._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case lc.parenL:var h=this.start,u=this.parseParenAndDistinguishExpression(n,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),u;case lc.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(lc.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case lc.braceL:return this.overrideContext(qc.b_expr),this.parseObj(!1,e);case lc._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case lc._class:return this.parseClass(this.startNode(),!1);case lc._new:return this.parseNew();case lc.backQuote:return this.parseTemplate();case lc._import:return this.options.ecmaVersion>=11?this.parseExprImport(s):this.unexpected();default:return this.parseExprAtomDefault()}},Kc.parseExprAtomDefault=function(){this.unexpected()},Kc.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var s=this.parseIdent(!0);return this.type!==lc.parenL||e?this.type===lc.dot?(t.meta=s,this.parseImportMeta(t)):void this.unexpected():this.parseDynamicImport(t)},Kc.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(lc.parenR)){var t=this.start;this.eat(lc.comma)&&this.eat(lc.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},Kc.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},Kc.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},Kc.parseParenExpression=function(){this.expect(lc.parenL);var e=this.parseExpression();return this.expect(lc.parenR),e},Kc.shouldParseArrow=function(e){return!this.canInsertSemicolon()},Kc.parseParenAndDistinguishExpression=function(e,t){var s,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a=this.start,l=this.startLoc,c=[],h=!0,u=!1,d=new Tc,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==lc.parenR;){if(h?h=!1:this.expect(lc.comma),r&&this.afterTrailingComma(lc.parenR,!0)){u=!0;break}if(this.type===lc.ellipsis){o=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===lc.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(lc.parenR),e&&this.shouldParseArrow(c)&&this.eat(lc.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(i,n,c,t);c.length&&!u||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(d,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((s=this.startNodeAt(a,l)).expressions=c,this.finishNodeAt(s,"SequenceExpression",m,g)):s=c[0]}else s=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(i,n);return y.expression=s,this.finishNode(y,"ParenthesizedExpression")}return s},Kc.parseParenItem=function(e){return e},Kc.parseParenArrowList=function(e,t,s,i){return this.parseArrowExpression(this.startNodeAt(e,t),s,!1,i)};var Xc=[];Kc.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(lc.dot)){e.meta=t;var s=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),s&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var i=this.start,n=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,n,!0,!1),this.eat(lc.parenL)?e.arguments=this.parseExprList(lc.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Xc,this.finishNode(e,"NewExpression")},Kc.parseTemplateElement=function(e){var t=e.isTagged,s=this.startNode();return this.type===lc.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),s.value={raw:this.value,cooked:null}):s.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),s.tail=this.type===lc.backQuote,this.finishNode(s,"TemplateElement")},Kc.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var s=this.startNode();this.next(),s.expressions=[];var i=this.parseTemplateElement({isTagged:t});for(s.quasis=[i];!i.tail;)this.type===lc.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(lc.dollarBraceL),s.expressions.push(this.parseExpression()),this.expect(lc.braceR),s.quasis.push(i=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(s,"TemplateLiteral")},Kc.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===lc.name||this.type===lc.num||this.type===lc.string||this.type===lc.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===lc.star)&&!cc.test(this.input.slice(this.lastTokEnd,this.start))},Kc.parseObj=function(e,t){var s=this.startNode(),i=!0,n={};for(s.properties=[],this.next();!this.eat(lc.braceR);){if(i)i=!1;else if(this.expect(lc.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(lc.braceR))break;var r=this.parseProperty(e,t);e||this.checkPropClash(r,n,t),s.properties.push(r)}return this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Kc.parseProperty=function(e,t){var s,i,n,r,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(lc.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===lc.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(o.argument=this.parseMaybeAssign(!1,t),this.type===lc.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(n=this.start,r=this.startLoc),e||(s=this.eat(lc.star)));var a=this.containsEsc;return this.parsePropertyName(o),!e&&!a&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(o)?(i=!0,s=this.options.ecmaVersion>=9&&this.eat(lc.star),this.parsePropertyName(o)):i=!1,this.parsePropertyValue(o,e,s,i,n,r,t,a),this.finishNode(o,"Property")},Kc.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var s=e.value.start;"get"===e.kind?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},Kc.parsePropertyValue=function(e,t,s,i,n,r,o,a){(s||i)&&this.type===lc.colon&&this.unexpected(),this.eat(lc.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===lc.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(s,i)):t||a||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===lc.comma||this.type===lc.braceR||this.type===lc.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((s||i)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=n),e.kind="init",t?e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key)):this.type===lc.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((s||i)&&this.unexpected(),this.parseGetterSetter(e))},Kc.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(lc.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(lc.bracketR),e.key;e.computed=!1}return e.key=this.type===lc.num||this.type===lc.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},Kc.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Kc.parseMethod=function(e,t,s){var i=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(i),this.options.ecmaVersion>=6&&(i.generator=e),this.options.ecmaVersion>=8&&(i.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|Nc(t,i.generator)|(s?128:0)),this.expect(lc.parenL),i.params=this.parseBindingList(lc.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(i,"FunctionExpression")},Kc.parseArrowExpression=function(e,t,s,i){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(16|Nc(s,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!s),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")},Kc.parseFunctionBody=function(e,t,s,i){var n=t&&this.type!==lc.braceL,r=this.strict,o=!1;if(n)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!a||(o=this.strictDirective(this.end))&&a&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!r&&!o&&!t&&!s&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,o&&!r),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},Kc.isSimpleParamList=function(e){for(var t=0,s=e;t-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1,n.lexical.push(e),this.inModule&&1&n.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var r=this.currentScope();i=this.treatFunctionsAsVar?r.lexical.indexOf(e)>-1:r.lexical.indexOf(e)>-1||r.var.indexOf(e)>-1,r.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(32&a.flags&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&1&a.flags&&delete this.undefinedExports[e],259&a.flags)break}i&&this.raiseRecoverable(s,"Identifier '"+e+"' has already been declared")},Zc.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Zc.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Zc.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},Zc.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var eh=function(e,t,s){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new kc(e,s)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},th=_c.prototype;function sh(e,t,s,i){return e.type=t,e.end=s,this.options.locations&&(e.loc.end=i),this.options.ranges&&(e.range[1]=s),e}th.startNode=function(){return new eh(this,this.start,this.startLoc)},th.startNodeAt=function(e,t){return new eh(this,e,t)},th.finishNode=function(e,t){return sh.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},th.finishNodeAt=function(e,t,s,i){return sh.call(this,e,t,s,i)},th.copyNode=function(e){var t=new eh(this,e.start,this.startLoc);for(var s in e)t[s]=e[s];return t};var ih="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",nh=ih+" Extended_Pictographic",rh=nh+" EBase EComp EMod EPres ExtPict",oh={9:ih,10:nh,11:nh,12:rh,13:rh,14:rh},ah={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},lh="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",ch="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",hh=ch+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",uh=hh+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",dh=uh+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",ph=dh+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",fh={9:ch,10:hh,11:uh,12:dh,13:ph,14:ph+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},mh={};function gh(e){var t=mh[e]={binary:bc(oh[e]+" "+lh),binaryOfStrings:bc(ah[e]),nonBinary:{General_Category:bc(lh),Script:bc(fh[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var yh=0,xh=[9,10,11,12,13,14];yh=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=mh[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function vh(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function Sh(e){return e>=65&&e<=90||e>=97&&e<=122}bh.prototype.reset=function(e,t,s){var i=-1!==s.indexOf("v"),n=-1!==s.indexOf("u");this.start=0|e,this.source=t+"",this.flags=s,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)},bh.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},bh.prototype.at=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return-1;var n=s.charCodeAt(e);if(!t&&!this.switchU||n<=55295||n>=57344||e+1>=i)return n;var r=s.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n},bh.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var s=this.source,i=s.length;if(e>=i)return i;var n,r=s.charCodeAt(e);return!t&&!this.switchU||r<=55295||r>=57344||e+1>=i||(n=s.charCodeAt(e+1))<56320||n>57343?e+1:e+2},bh.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},bh.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},bh.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},bh.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},bh.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var s=this.pos,i=0,n=e;i-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===o&&(i=!0),"v"===o&&(n=!0)}this.options.ecmaVersion>=15&&i&&n&&this.raise(e.start,"Invalid regular expression flag")},Eh.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Eh.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,s=e.backReferenceNames;t=9&&(s=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!s,!0}return e.pos=t,!1},Eh.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Eh.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Eh.regexp_eatBracedQuantifier=function(e,t){var s=e.pos;if(e.eat(123)){var i=0,n=-1;if(this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue),e.eat(125)))return-1!==n&&n=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Eh.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Eh.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Eh.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!vh(t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatPatternCharacters=function(e){for(var t=e.pos,s=0;-1!==(s=e.current())&&!vh(s);)e.advance();return e.pos!==t},Eh.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},Eh.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Eh.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Eh.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=vc(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=vc(e.lastIntValue);return!0}return!1},Eh.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return ec(e,!0)||36===e||95===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Eh.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,s=this.options.ecmaVersion>=11,i=e.current(s);return e.advance(s),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(e,s)&&(i=e.lastIntValue),function(e){return tc(e,!0)||36===e||95===e||8204===e||8205===e}(i)?(e.lastIntValue=i,!0):(e.pos=t,!1)},Eh.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Eh.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var s=e.lastIntValue;if(e.switchU)return s>e.maxBackReference&&(e.maxBackReference=s),!0;if(s<=e.numCapturingParens)return!0;e.pos=t}return!1},Eh.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Eh.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Eh.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Eh.regexp_eatZero=function(e){return 48===e.current()&&!Ih(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Eh.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Eh.regexp_eatControlLetter=function(e){var t=e.current();return!!Sh(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Eh.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var s,i=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(n&&r>=55296&&r<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(r-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=r}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((s=e.lastIntValue)>=0&&s<=1114111))return!0;n&&e.raise("Invalid unicode escape"),e.pos=i}return!1},Eh.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};function Ah(e){return Sh(e)||95===e}function kh(e){return Ah(e)||Ih(e)}function Ih(e){return e>=48&&e<=57}function wh(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ph(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function Ch(e){return e>=48&&e<=55}Eh.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var s=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((s=80===t)||112===t)){var i;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(i=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return s&&2===i&&e.raise("Invalid property name"),i;e.raise("Invalid property name")}return 0},Eh.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var s=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,s,i),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,n)}return 0},Eh.regexp_validateUnicodePropertyNameAndValue=function(e,t,s){xc(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(s)||e.raise("Invalid property value")},Eh.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Eh.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Ah(t=e.current());)e.lastStringValue+=vc(t),e.advance();return""!==e.lastStringValue},Eh.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";kh(t=e.current());)e.lastStringValue+=vc(t),e.advance();return""!==e.lastStringValue},Eh.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Eh.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),s=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===s&&e.raise("Negated character class may contain strings"),!0}return!1},Eh.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Eh.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var s=e.lastIntValue;!e.switchU||-1!==t&&-1!==s||e.raise("Invalid character class"),-1!==t&&-1!==s&&t>s&&e.raise("Range out of order in character class")}}},Eh.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var s=e.current();(99===s||Ch(s))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var i=e.current();return 93!==i&&(e.lastIntValue=i,e.advance(),!0)},Eh.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Eh.regexp_classSetExpression=function(e){var t,s=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(s=2);for(var i=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(s=1):e.raise("Invalid character in character class");if(i!==e.pos)return s;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(i!==e.pos)return s}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return s;2===t&&(s=2)}},Eh.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;return-1!==s&&-1!==i&&s>i&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Eh.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Eh.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var s=e.eat(94),i=this.regexp_classContents(e);if(e.eat(93))return s&&2===i&&e.raise("Negated character class may contain strings"),i;e.pos=t}if(e.eat(92)){var n=this.regexp_eatCharacterClassEscape(e);if(n)return n;e.pos=t}return null},Eh.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var s=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return s}else e.raise("Invalid escape");e.pos=t}return null},Eh.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Eh.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Eh.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e))||(e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1));var s=e.current();return!(s<0||s===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(s))&&(!function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(s)&&(e.advance(),e.lastIntValue=s,!0))},Eh.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Eh.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Ih(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},Eh.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Eh.regexp_eatDecimalDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;Ih(s=e.current());)e.lastIntValue=10*e.lastIntValue+(s-48),e.advance();return e.pos!==t},Eh.regexp_eatHexDigits=function(e){var t=e.pos,s=0;for(e.lastIntValue=0;wh(s=e.current());)e.lastIntValue=16*e.lastIntValue+Ph(s),e.advance();return e.pos!==t},Eh.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var s=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*s+e.lastIntValue:e.lastIntValue=8*t+s}else e.lastIntValue=t;return!0}return!1},Eh.regexp_eatOctalDigit=function(e){var t=e.current();return Ch(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Eh.regexp_eatFixedHexDigits=function(e,t){var s=e.pos;e.lastIntValue=0;for(var i=0;i=this.input.length?this.finishToken(lc.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Nh.readToken=function(e){return ec(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Nh.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},Nh.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,s=this.input.indexOf("*/",this.pos+=2);if(-1===s&&this.raise(this.pos-2,"Unterminated comment"),this.pos=s+2,this.options.locations)for(var i=void 0,n=t;(i=dc(this.input,n,this.pos))>-1;)++this.curLine,n=this.lineStart=i;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,s),t,this.pos,e,this.curPosition())},Nh.skipLineComment=function(e){for(var t=this.pos,s=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&pc.test(String.fromCharCode(e))))break e;++this.pos}}},Nh.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var s=this.type;this.type=e,this.value=t,this.updateContext(s)},Nh.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(lc.ellipsis)):(++this.pos,this.finishToken(lc.dot))},Nh.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(lc.assign,2):this.finishOp(lc.slash,1)},Nh.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),s=1,i=42===e?lc.star:lc.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++s,i=lc.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(lc.assign,s+1):this.finishOp(i,s)},Nh.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(lc.assign,3);return this.finishOp(124===e?lc.logicalOR:lc.logicalAND,2)}return 61===t?this.finishOp(lc.assign,2):this.finishOp(124===e?lc.bitwiseOR:lc.bitwiseAND,1)},Nh.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(lc.assign,2):this.finishOp(lc.bitwiseXOR,1)},Nh.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!cc.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(lc.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(lc.assign,2):this.finishOp(lc.plusMin,1)},Nh.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),s=1;return t===e?(s=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+s)?this.finishOp(lc.assign,s+1):this.finishOp(lc.bitShift,s)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(s=2),this.finishOp(lc.relational,s)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Nh.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(lc.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(lc.arrow)):this.finishOp(61===e?lc.eq:lc.prefix,1)},Nh.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var s=this.input.charCodeAt(this.pos+2);if(s<48||s>57)return this.finishOp(lc.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(lc.assign,3);return this.finishOp(lc.coalesce,2)}}return this.finishOp(lc.question,1)},Nh.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,ec(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(lc.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+vc(e)+"'")},Nh.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(lc.parenL);case 41:return++this.pos,this.finishToken(lc.parenR);case 59:return++this.pos,this.finishToken(lc.semi);case 44:return++this.pos,this.finishToken(lc.comma);case 91:return++this.pos,this.finishToken(lc.bracketL);case 93:return++this.pos,this.finishToken(lc.bracketR);case 123:return++this.pos,this.finishToken(lc.braceL);case 125:return++this.pos,this.finishToken(lc.braceR);case 58:return++this.pos,this.finishToken(lc.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(lc.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(lc.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+vc(e)+"'")},Nh.finishOp=function(e,t){var s=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,s)},Nh.readRegexp=function(){for(var e,t,s=this.pos;;){this.pos>=this.input.length&&this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(cc.test(i)&&this.raise(s,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++this.pos}var n=this.input.slice(s,this.pos);++this.pos;var r=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(r);var a=this.regexpState||(this.regexpState=new bh(this));a.reset(s,n,o),this.validateRegExpFlags(a),this.validateRegExpPattern(a);var l=null;try{l=new RegExp(n,o)}catch(e){}return this.finishToken(lc.regexp,{pattern:n,flags:o,value:l})},Nh.readInt=function(e,t,s){for(var i=this.options.ecmaVersion>=12&&void 0===t,n=s&&48===this.input.charCodeAt(this.pos),r=this.pos,o=0,a=0,l=0,c=null==t?1/0:t;l=97?h-97+10:h>=65?h-65+10:h>=48&&h<=57?h-48:1/0)>=e)break;a=h,o=o*e+u}}return i&&95===a&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===r||null!=t&&this.pos-r!==t?null:o},Nh.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var s=this.readInt(e);return null==s&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(s=_h(this.input.slice(t,this.pos)),++this.pos):ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(lc.num,s)},Nh.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var s=this.pos-t>=2&&48===this.input.charCodeAt(t);s&&this.strict&&this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!s&&!e&&this.options.ecmaVersion>=11&&110===i){var n=_h(this.input.slice(t,this.pos));return++this.pos,ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(lc.num,n)}s&&/[89]/.test(this.input.slice(t,this.pos))&&(s=!1),46!==i||s||(++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos)),69!==i&&101!==i||s||(43!==(i=this.input.charCodeAt(++this.pos))&&45!==i||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),ec(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=(r=this.input.slice(t,this.pos),s?parseInt(r,8):parseFloat(r.replace(/_/g,"")));return this.finishToken(lc.num,o)},Nh.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Nh.readString=function(e){for(var t="",s=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(s,this.pos),t+=this.readEscapedChar(!1),s=this.pos):8232===i||8233===i?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(uc(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(s,this.pos++),this.finishToken(lc.string,t)};var Rh={};Nh.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==Rh)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Nh.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Rh;this.raise(e,t)},Nh.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var s=this.input.charCodeAt(this.pos);if(96===s||36===s&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==lc.template&&this.type!==lc.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(lc.template,e)):36===s?(this.pos+=2,this.finishToken(lc.dollarBraceL)):(++this.pos,this.finishToken(lc.backQuote));if(92===s)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(uc(s)){switch(e+=this.input.slice(t,this.pos),++this.pos,s){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(s)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Nh.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),"0"===i&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return uc(t)?"":String.fromCharCode(t)}},Nh.readHexChar=function(e){var t=this.pos,s=this.readInt(16,e);return null===s&&this.invalidStringToken(t,"Bad character escape sequence"),s},Nh.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,s=this.pos,i=this.options.ecmaVersion>=6;this.pos()=>Xe(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:De("plugin-development/#a-simple-example")}}(e)),Lh=Th("fs.mkdir"),Mh=Th("fs.readFile"),Vh=Th("fs.writeFile");async function Bh(e,t,s,i,n,r,o,a,l){const c=await function(e,t,s,i,n,r,o,a){let l=null,c=null;if(n){l=new Set;for(const s of n)e===s.source&&t===s.importer&&l.add(s.plugin);c=(e,t)=>({...e,resolve:(e,s,{assertions:r,custom:o,isEntry:a,skipSelf:l}=fe)=>i(e,s,o,a,r||me,l?[...n,{importer:s,plugin:t,source:e}]:n)})}return s.hookFirstAndGetPlugin("resolveId",[e,t,{assertions:a,custom:r,isEntry:o}],c,l)}(e,t,i,n,r,o,a,l);return null==c?Th("path.resolve")():c[0]}const zh="at position ",Fh="at output position ";const jh={delete:()=>!1,get(){},has:()=>!1,set(){}};function Uh(e){return e.startsWith(zh)||e.startsWith(Fh)?Xe({code:et,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Xe({code:ot,message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Gh=(e,t,s=Yh)=>{const{onwarn:i,onLog:n}=e,r=Wh(s,i);if(n){const e=Ie[t];return(t,s)=>n(t,qh(s),((t,s)=>{if("error"===t)return Xe(Hh(s));Ie[t]>=e&&r(t,Hh(s))}))}return r},Wh=(e,t)=>t?(s,i)=>{s===Se?t(qh(i),(t=>e(Se,Hh(t)))):e(s,i)}:e,qh=e=>(Object.defineProperty(e,"toString",{value:()=>Kh(e),writable:!0}),e),Hh=e=>"string"==typeof e?{message:e}:"function"==typeof e?Hh(e()):e,Kh=e=>{let t="";return e.plugin&&(t+=`(${e.plugin} plugin) `),e.loc&&(t+=`${M(e.loc.file)} (${e.loc.line}:${e.loc.column}) `),t+e.message},Yh=(e,t)=>{const s=Kh(t);switch(e){case Se:return console.warn(s);case ke:return console.debug(s);default:return console.info(s)}};function Xh(e,t,s,i,n=/$./){const r=new Set(t),o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));o.length>0&&i(Se,function(e,t,s){return{code:Ct,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${s.join(", ")}`}}(s,o,[...r].sort()))}const Qh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ge,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:ge,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ge,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Zh={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Jh=(e,t,s,i,n)=>{const r=e?.preset;if(r){const n=t[r];if(n)return{...n,...e};Xe(Ft(`${s}.preset`,i,`valid values are ${Oe(Object.keys(t))}`,r))}return((e,t,s,i)=>n=>{if("string"==typeof n){const r=e[n];if(r)return r;Xe(Ft(t,s,`valid values are ${i}${Oe(Object.keys(e))}. You can also supply an object for more fine-grained control`,n))}return(e=>e&&"object"==typeof e?e:{})(n)})(t,s,i,n)(e)},eu=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some((e=>e?.then)));return e}([e])).filter(Boolean);async function tu(e,t,s,i){const n=t.id,r=[];let o=null===e.map?null:Vl(e.map);const a=e.code;let l=e.ast;const h=[],u=[];let d=!1;const p=()=>d=!0;let f="",m=e.code;const g=e=>(t,s)=>{t=Hh(t),s&&Qe(t,s,m,n),t.id=n,t.hook="transform",e(t)};let x;try{x=await s.hookReduceArg0("transform",[m,n],(function(e,s,n){let o,a;if("string"==typeof s)o=s;else{if(!s||"object"!=typeof s)return e;if(t.updateOptions(s),null==s.code)return(s.map||s.ast)&&i(Se,function(e){return{code:At,message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(n.name)),e;({code:o,map:a,ast:l}=s)}return null!==a&&r.push(Vl("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:n.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){h.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,x=p,{delete:e=>(x(),l.delete(e)),get:e=>(x(),l.get(e)),has:e=>(x(),l.has(e)),set:(e,t)=>(x(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(u.push(e),s.emitFile(e)),error:(t,s)=>("string"==typeof t&&(t={message:t}),s&&Qe(t,s,m,n),t.id=n,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,s,i,n){return 0===i.length?s:{version:3,...Za(e,t,s,i,Qa(n)).traceMappings()}}(n,a,o,r,i);if(!e){return new y(a).generateMap({hires:!0,includeContent:!0,source:n})}return o!==e&&(o=e,r.length=0),new c({...e,file:null,sourcesContent:e.sourcesContent})},info:g(e.info),setAssetSource(){return this.error({code:mt,message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:g(e.warn)};var l,x}))}catch(e){return Xe(Wt(e,f,{hook:"transform",id:n}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:x,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:h}}const su="resolveDependencies";class iu{constructor(e,t,s,i){this.graph=e,this.modulesById=t,this.options=s,this.pluginDriver=i,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,s,i,n,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Bh(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,s,"boolean"==typeof i?i:!t,n),t,e),n),this.hasModuleSideEffects=s.treeshake?s.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const s=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,!1,void 0,null,t)))));return await this.awaitLoadModulesPromise(),s}async addEntryModules(e,t){const s=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const i=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((n=>{for(const[r,o]of n.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,ru(o,e[r],t,i+r);const n=this.indexedEntryModules.find((e=>e.module===o));n?n.index=Math.min(n.index,s+r):this.indexedEntryModules.push({index:s+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),n})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:s,name:i,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:s,name:i||null},a=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,me),void 0,!1,!e.resolveDependencies||su)).info}addEntryWithImplicitDependants(e,t){const s=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async i=>{if(ru(i,e,!1,s),!i.info.isEntry){this.implicitEntryModules.add(i);const s=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,i.id))));for(const e of s)i.implicitlyLoadedAfter.add(e);for(const e of i.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(i)}return i})))}async addModuleSource(e,t,s){let i;try{i=await this.graph.fileOperationQueue.run((async()=>await this.pluginDriver.hookFirst("load",[e])??await Mh(e,"utf8")))}catch(s){let i=`Could not load ${e}`;throw t&&(i+=` (imported by ${M(t)})`),i+=`: ${s.message}`,s.message=i,s}const n="string"==typeof i?{code:i}:null!=i&&"object"==typeof i&&"string"==typeof i.code?i:Xe(function(e){return{code:"BAD_LOADER",message:`Error loading "${M(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==n.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}]))s.updateOptions(n),s.setSource(await tu(n,s,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);s.setSource(r)}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch((()=>{})),e}async fetchDynamicDependencies(e,t){const s=await Promise.all(t.map((t=>t.then((async([t,s])=>null===s?null:"string"==typeof s?(t.resolution=s,null):t.resolution=await this.fetchResolvedDependency(M(s.id),e.id,s))))));for(const t of s)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({assertions:e,id:t,meta:s,moduleSideEffects:i,syntheticNamedExports:n},r,o,a){const l=this.modulesById.get(t);if(l instanceof To)return r&&Eo(e,l.info.assertions)&&this.options.onLog(Se,Vt(l.info.assertions,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof Jt)return Xe({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const c=new To(this.graph,t,this.options,o,i,n,s,e);this.modulesById.set(t,c),this.graph.watchFiles[t]=!0;const h=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=au(h).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,h);const d=await h;return a?a===su&&await u:await this.fetchModuleDependencies(c,...d),c}async fetchModuleDependencies(e,t,s,i){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,s)]),e.linkImports(),await i)}fetchResolvedDependency(e,t,s){if(s.external){const{assertions:i,external:n,id:r,moduleSideEffects:o,meta:a}=s;let l=this.modulesById.get(r);if(l){if(!(l instanceof Jt))return Xe(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${M(t)}", but is already an existing non-external module id.`}}(e,t));Eo(l.info.assertions,i)&&this.options.onLog(Se,Vt(l.info.assertions,i,e,t))}else l=new Jt(this.options,r,o,a,"absolute"!==n&&k(r),i),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(s,t,!1,!1)}async fetchStaticDependencies(e,t){for(const s of await Promise.all(t.map((t=>t.then((([t,s])=>this.fetchResolvedDependency(t,e.id,s)))))))e.dependencies.add(s),s.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof To&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,s){const{makeAbsoluteExternalsRelative:i}=this.options;if(e){if("object"==typeof e){const n=e.external||this.options.external(e.id,t,!0);return{...e,external:n&&("relative"===n||!k(e.id)||!0===n&&ou(e.id,s,i)||"absolute")}}const n=this.options.external(e,t,!0);return{external:n&&(ou(e,s,i)||"absolute"),id:n&&i?nu(e,t):e}}const n=i?nu(s,t):s;return!1===e||this.options.external(n,t,!0)?{external:ou(n,s,i)||"absolute",id:n}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const s=await this.resolveDynamicImport(e,"string"==typeof t.argument?t.argument:t.argument.esTreeNode,e.id,function(e){const t=e.arguments?.[0]?.properties.find((e=>"assert"===xo(e)))?.value;if(!t)return me;const s=t.properties.map((e=>{const t=xo(e);return"string"==typeof t&&"string"==typeof e.value.value?[t,e.value.value]:null})).filter((e=>!!e));return s.length>0?Object.fromEntries(s):me}(t.node));return s&&"object"==typeof s&&(t.id=s.id),[t,s]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAssertions,(async([t,s])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,me,!1,s),t,e.id,s)]))}getResolvedIdWithDefaults(e,t){if(!e)return null;const s=e.external||!1;return{assertions:e.assertions||t,external:s,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!s),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,s){const i=this.moduleLoadPromises.get(e);if(s)return s===su?au(i):i;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await i)}handleInvalidResolvedId(e,t,s,i){return null===e?I(t)?Xe(function(e,t){return{code:Nt,exporter:e,id:t,message:`Could not resolve "${e}" from "${M(t)}"`}}(t,s)):(this.options.onLog(Se,function(e,t){return{code:Nt,exporter:e,id:t,message:`"${e}" is imported by "${M(t)}", but could not be resolved – treating it as an external dependency.`,url:De("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,s)),{assertions:i,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(Se,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${M(t)}").`}}(t,s)),e)}async loadEntryModule(e,t,s,i,n=!1){const r=await Bh(e,s,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,me,!0,me);if(null==r)return Xe(null===i?function(e){return{code:$t,message:`Could not resolve entry module "${M(e)}".`}}(e):function(e,t){return{code:xt,message:`Module "${M(e)}" that should be implicitly loaded before "${M(t)}" could not be resolved.`}}(e,i));const o="object"==typeof r&&r.external;return!1===r||o?Xe(null===i?o&&n?Yt(e):function(e){return{code:$t,message:`Entry module "${M(e)}" cannot be external.`}}(e):function(e,t){return{code:xt,message:`Module "${M(e)}" that should be implicitly loaded before "${M(t)}" cannot be external.`}}(e,i)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},me),void 0,t,!1)}async resolveDynamicImport(e,t,s,i){const n=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,s,{assertions:i}]);if("string"!=typeof t)return"string"==typeof n?n:n?this.getResolvedIdWithDefaults(n,i):null;if(null==n){const n=e.resolvedIds[t];return n?(Eo(n.assertions,i)&&this.options.onLog(Se,Vt(n.assertions,i,t,s)),n):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,me,!1,i),t,e.id,i)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(n,s,t),i),t,s,i)}}function nu(e,t){return I(e)?t?_(t,"..",e):_(e):e}function ru(e,{fileName:t,name:s},i,n){if(null!==t)e.chunkFileNames.add(t);else if(null!==s){let t=0;for(;e.chunkNames[t]?.priority$(r).slice(1),extname:()=>$(r),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>r.slice(0,Math.max(0,r.length-$(r).length))}),n)}function uu(e,{bundle:t},s){t[Aa].has(e.toLowerCase())?s(Se,function(e){return{code:at,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=ka}const du=new Set(["chunk","asset","prebuilt-chunk"]);function pu(e,t,s){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||s;return Xe(Xt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function fu(e,t){return"string"!=typeof e.fileName?Xe((s=e.name||t,{code:tt,message:`Plugin error - Unable to get file name for asset "${s}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`})):e.fileName;var s}function mu(e,t){return e.fileName?e.fileName:t?t.get(e.module).getFileName():Xe((s=e.fileName||e.name,{code:it,message:`Plugin error - Unable to get file name for emitted chunk "${s}". You can only get file names once chunks have been generated after the "renderStart" hook.`}));var s}class gu{constructor(e,t,s){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&du.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!V(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Xe(Xt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Xe(Xt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Xe({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?mu(t,this.facadeChunkByModule):"prebuilt-chunk"===t.type?t.fileName:fu(t,e):Xe({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`})},this.setAssetSource=(e,t)=>{const s=this.filesByReferenceId.get(e);if(!s)return Xe({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==s.type)return Xe(Xt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==s.source)return Xe({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${s.name||e}", source already set.`});const i=pu(t,s,e);if(this.output)this.finalizeAdditionalAsset(s,i,this.output);else{s.source=i;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(s,i,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const s=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&uu(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{j(i,cu(e.source),(()=>[])).push(e)}else"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=s?new Map(s.filesByReferenceId):new Map,s?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let s=t;do{s=Ml().update(s).digest("hex").slice(0,8)}while(this.filesByReferenceId.has(s)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(s))));e.referenceId=s,this.filesByReferenceId.set(s,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(s,e);return s}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,referencedFiles:[],type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:pu(e.source,e,null),s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:s,source:i}=e;s&&uu(s,t,this.options.onLog),void 0!==i&&this.finalizeAdditionalAsset(e,i,t)}emitChunk(e){if(this.graph.phase>go.LOAD_AND_PARSE)return Xe({code:ft,message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Xe(Xt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Xe(Xt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||V(e.fileName))return Xe(Xt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},s=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),s}finalizeAdditionalAsset(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let{fileName:r,needsCodeReference:o,referenceId:a}=e;if(!r){const o=cu(t);r=i.get(o),r||(r=hu(e.name,t,o,n,s),i.set(o,r))}const l={...e,fileName:r,source:t};this.filesByReferenceId.set(a,l);const c=s[r];"asset"===c?.type?c.needsCodeReference&&(c.needsCodeReference=o):s[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:s,fileNamesBySource:i,outputOptions:n}){let r,o="",a=!0;for(const i of e){a&&(a=i.needsCodeReference);const e=hu(i.name,i.source,t,n,s);(!o||e.length{null!=r&&s(Se,{code:ut,message:`Plugin "${i}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(n=Hh(n)).code&&!n.pluginCode&&(n.pluginCode=n.code),n.code=t,n.plugin=i,s(e,n)}}function xu(e,s,i,n,r,o){const{logLevel:a,onLog:l}=n;let c,h=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(zh)||e.name.startsWith(Fh)||o.has(e.name)?h=!1:o.add(e.name)),s)if(h){const t=e.cacheKey||e.name;d=s[t]||(s[t]=Object.create(null)),c={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,c={delete:()=>Uh(u),get:()=>Uh(u),has:()=>Uh(u),set:()=>Uh(u)};else c=jh;var u,d;return{addWatchFile(e){if(i.phase>=go.GENERATE)return this.error({code:ft,message:'Cannot call "addWatchFile" after the build has finished.'});i.watchFiles[e]=!0},cache:c,debug:yu(ke,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>Xe(Wt(Hh(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),info:yu(Ae,"PLUGIN_LOG",l,e.name,a),load:e=>i.moduleLoader.preloadModule(e),meta:{rollupVersion:t,watchMode:i.watchMode},get moduleIds(){const t=i.modulesById.keys();return function*(){Qt(`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,"plugin-development/#this-getmoduleids",!0,n,e.name),yield*t}()},parse:i.contextParse.bind(i),resolve:(t,s,{assertions:n,custom:r,isEntry:o,skipSelf:a}=fe)=>i.moduleLoader.resolveId(t,s,r,o,n||me,a?[{importer:s,plugin:e,source:t}]:null),setAssetSource:r.setAssetSource,warn:yu(Se,"PLUGIN_WARNING",l,e.name,a)}}const Eu=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class bu{constructor(e,t,s,i,n){this.graph=e,this.options=t,this.pluginCache=i,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new gu(e,t,n&&n.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...n?n.plugins:[],...s];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map((s=>[s,xu(s,i,e,t,this.fileEmitter,r)]))),n)for(const e of s)for(const s of Eu)s in e&&t.onLog(Se,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${s}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new bu(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,s,i){return this.hookFirstAndGetPlugin(e,t,s,i).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,s,i){for(const n of this.getSortedPlugins(e)){if(i?.has(n))continue;const r=await this.runHook(e,t,n,s);if(null!=r)return[r,n]}return null}hookFirstSync(e,t,s){for(const i of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,i,s);if(null!=n)return n}return null}async hookParallel(e,t,s){const i=[];for(const n of this.getSortedPlugins(e))n[e].sequential?(await Promise.all(i),i.length=0,await this.runHook(e,t,n,s)):i.push(this.runHook(e,t,n,s));await Promise.all(i)}hookReduceArg0(e,[t,...s],i,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then((r=>this.runHook(e,[r,...s],t,n).then((e=>i.call(this.pluginContexts.get(t),r,e,t)))));return r}hookReduceArg0Sync(e,[t,...s],i,n){for(const r of this.getSortedPlugins(e)){const o=[t,...s],a=this.runHookSync(e,o,r,n);t=i.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,s,i){const n=[],r=[];for(const t of this.getSortedPlugins(e,Au))t[e].sequential?(n.push(...await Promise.all(r)),r.length=0,n.push(await this.runHook(e,s,t))):r.push(this.runHook(e,s,t));return n.push(...await Promise.all(r)),n.reduce(i,await t)}hookReduceValueSync(e,t,s,i,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,s,t,n);r=i.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,s){let i=Promise.resolve();for(const n of this.getSortedPlugins(e))i=i.then((()=>this.runHook(e,t,n,s)));return i.then(ku)}getSortedPlugins(e,t){return j(this.sortedPlugins,e,(()=>vu(e,this.plugins,t)))}runHook(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));let a=null;return Promise.resolve().then((()=>{if("function"!=typeof r)return r;const i=r.apply(o,t);return i?.then?(a=[s.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(i).then((e=>(this.unfulfilledActions.delete(a),e)))):i})).catch((t=>(null!==a&&this.unfulfilledActions.delete(a),Xe(Wt(t,s.name,{hook:e})))))}runHookSync(e,t,s,i){const n=s[e],r="object"==typeof n?n.handler:n;let o=this.pluginContexts.get(s);i&&(o=i(o,s));try{return r.apply(o,t)}catch(t){return Xe(Wt(t,s.name,{hook:e}))}}}function vu(e,t,s=Su){const i=[],n=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(s(t.handler,e,o),"pre"===t.order){i.push(o);continue}if("post"===t.order){r.push(o);continue}}else s(t,e,o);n.push(o)}}return[...i,...n,...r]}function Su(e,t,s){"function"!=typeof e&&Xe(function(e,t){return{code:pt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,s.name))}function Au(e,t,s){if("string"!=typeof e&&"function"!=typeof e)return Xe(function(e,t){return{code:pt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,s.name))}function ku(){}class Iu{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise(((t,s)=>{this.queue.push({reject:s,resolve:t,task:e}),this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:s,task:i}=e;try{s(await i())}catch(e){t(e)}}this.workerCount--}}class wu{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,s,i,n=e||1;function r(e,r){++t>n&&(i=s,o(1),++t),s[e]=r}function o(e){t=0,s=Object.create(null),e||(i=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==s[e]||void 0!==i[e]},get:function(e){var t=s[e];return void 0!==t?t:void 0!==(t=i[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==s[e]?s[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new ee,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=go.LOAD_AND_PARSE,this.scope=new lu,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),s=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",s)}this.pluginDriver=new bu(this,e,e.plugins,this.pluginCache),this.acornParser=_c.extend(...e.acornInjectPlugins),this.moduleLoader=new iu(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Iu(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const s of e?e.manualPureFunctions:[]){let e=t;for(const t of s.split("."))e=e[t]||(e[t]=Object.create(null));e[ji]=!0}return t})(e)}async build(){Po("generate module graph",2),await this.generateModuleGraph(),Co("generate module graph",2),Po("sort and bind modules",2),this.phase=go.ANALYSE,this.sortModules(),Co("sort and bind modules",2),Po("mark included statements",2),this.includeStatements(),Co("mark included statements",2),this.phase=go.GENERATE}contextParse(e,t={}){const s=t.onComment,i=[];t.onComment=s&&"function"==typeof s?(e,n,r,o,...a)=>(i.push({end:o,start:r,type:e?"Block":"Line",value:n}),s.call(t,e,n,r,o,...a)):i;const n=this.acornParser.parse(e,{...this.options.acorn,...t});return"object"==typeof s&&s.push(...i),t.onComment=s,function(e,t,s){const i=[],n=[];for(const t of e){for(const[e,s]of Xs)s.test(t.value)&&i.push({...t,annotationType:e});js.test(t.value)&&n.push(t)}for(const e of n)Qs(t,e,!1);Ws(t,{annotationIndex:0,annotations:i,code:s})}(i,n,e),n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let s=!0;for(const[e,i]of Object.entries(t))i[0]>=this.options.experimentalCacheExpiry?delete t[e]:s=!1;s&&delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null}))):Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e})))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e instanceof To?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)_o(t);if(this.options.treeshake){let t=1;do{Po(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Co("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Xe(Ut(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const s=[],i=new Set,n=new Set,r=new Map,o=[],a=e=>{if(e instanceof To){for(const t of e.dependencies)r.has(t)?i.has(t)||s.push(qa(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)n.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof To&&n.add(t);o.push(e)}e.execIndex=t++,i.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of n)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:s,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(Se,Tt(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(Se,jt(t.name,e.id,t.module.id),t.start)}}function Pu(e,t){return t()}function Cu(e,s,i,n){e=vu("onLog",e);const r=Ie[n],o=(n,a,l=ye)=>{if(!(Ie[n]Ie[e]o(e,Hh(t),new Set(l).add(s));if(!1===("handler"in e?e.handler:e).call({debug:c(ke),error:e=>Xe(Hh(e)),info:c(Ae),meta:{rollupVersion:t,watchMode:i},warn:c(Se)},n,a))return}s(n,a)}};return o}const $u="{".charCodeAt(0),Nu=" ".charCodeAt(0),_u="assert";function Ru(e){const t=e.acorn||Dh,{tokTypes:s,TokenType:i}=t;return class extends e{constructor(...e){super(...e),this.assertToken=new i(_u)}_codeAt(e){return this.input.charCodeAt(e)}_eat(e){this.type!==e&&this.unexpected(),this.next()}readToken(e){let t=0;for(;t<6;t++)if(this._codeAt(this.pos+t)!==_u.charCodeAt(t))return super.readToken(e);for(;this._codeAt(this.pos+t)!==$u;t++)if(this._codeAt(this.pos+t)!==Nu)return super.readToken(e);return"{"===this.type.label?super.readToken(e):(this.pos+=6,this.finishToken(this.assertToken))}parseDynamicImport(e){if(this.next(),e.source=this.parseMaybeAssign(),this.eat(s.comma)){const t=this.parseObj(!1);e.arguments=[t]}return this._eat(s.parenR),this.finishNode(e,"ImportExpression")}parseExport(e,t){if(this.next(),this.eat(s.star)){if(this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")}if(this.eat(s._default)){var i;if(this.checkExport(t,"default",this.lastTokStart),this.type===s._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),e.declaration=this.parseFunction(n,5,!1,i)}else if(this.type===s._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==s.string&&this.unexpected(),e.source=this.parseExprAtom(),this.type===this.assertToken||this.type===s._with){this.next();const t=this.parseImportAssertions();t&&(e.assertions=t)}}else{for(var o=0,a=e.specifiers;o({ecmaVersion:"latest",sourceType:"module",...e.acorn}),Tu=e=>[Ru,...Ou(e.acornInjectPlugins)],Lu=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Mu=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...s)=>!t.startsWith("\0")&&e(t,...s)||!1;if(e){const t=new Set,s=[];for(const i of Ou(e))i instanceof RegExp?s.push(i):t.add(i);return(e,...i)=>t.has(e)||s.some((t=>t.test(e)))}return()=>!1},Vu=(e,t,s)=>{const i=e.inlineDynamicImports;return i&&Zt('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',Ge,!0,t,s),i},Bu=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},zu=(e,t,s)=>{const i=e.manualChunks;return i&&Zt('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',qe,!0,t,s),i},Fu=(e,t,s)=>{const i=e.maxParallelFileReads;"number"==typeof i&&Zt('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',"configuration-options/#maxparallelfileops",!0,t,s);const n=e.maxParallelFileOps??i;return"number"==typeof n?n<=0?1/0:n:20},ju=(e,t)=>{const s=e.moduleContext;if("function"==typeof s)return e=>s(e)??t;if(s){const e=Object.create(null);for(const[t,i]of Object.entries(s))e[_(t)]=i;return s=>e[s]??t}return()=>t},Uu=(e,t,s)=>{const i=e.preserveModules;return i&&Zt('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',"configuration-options/#output-preservemodules",!0,t,s),i},Gu=e=>{if(!1===e.treeshake)return!1;const t=Jh(e.treeshake,Qh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??ge,moduleSideEffects:Wu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Wu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,s)=>!!t.startsWith("\0")||!1!==e(t,s);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Xe(Ft("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},qu=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,Hu=/^[a-z]:/i;function Ku(e){const t=Hu.exec(e),s=t?t[0]:"";return s+e.slice(s.length).replace(qu,"_")}const Yu=(e,t,s)=>{const{file:i}=e;if("string"==typeof i){if(t)return Xe(Ft("output.file",Ve,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(s.input))return Xe(Ft("output.file",Ve,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return i},Xu=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Xe(Ft("output.format",Fe,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Qu=(e,t)=>{const s=(e.inlineDynamicImports??t.inlineDynamicImports)||!1,{input:i}=t;return s&&(Array.isArray(i)?i:Object.keys(i)).length>1?Xe(Ft("output.inlineDynamicImports",Ge,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):s},Zu=(e,t,s)=>{const i=(e.preserveModules??s.preserveModules)||!1;if(i){if(t)return Xe(Ft("output.inlineDynamicImports",Ge,'this option is not supported for "output.preserveModules"'));if(!1===s.preserveEntrySignatures)return Xe(Ft("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return i},Ju=(e,t)=>{const s=e.preferConst;return null!=s&&Qt('The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.',"configuration-options/#output-generatedcode-constbindings",!0,t),!!s},ed=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return _(t)},td=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Xe(Ft("output.amd.id",Me,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Xe(Ft("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},sd=(e,t)=>{const s=e[t];return"function"==typeof s?s:()=>s||""},id=(e,t)=>{const{dir:s}=e;return"string"==typeof s&&"string"==typeof t?Xe(Ft("output.dir",Ve,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):s},nd=(e,t,s)=>{const i=e.dynamicImportFunction;return i&&(Qt('The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.',"plugin-development/#renderdynamicimport",!0,t),"es"!==s&&t.onLog(Se,Ft("output.dynamicImportFunction","configuration-options/#output-dynamicimportfunction",'this option is ignored for formats other than "es"'))),i},rd=(e,t)=>{const s=e.entryFileNames;return null==s&&t.add("entryFileNames"),s??"[name].js"};function od(e,t){const s=e.experimentalDeepDynamicChunkOptimization;return null!=s&&Qt('The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.',je,!0,t),s||!1}function ad(e,t){const s=e.exports;if(null==s)t.add("exports");else if(!["default","named","none","auto"].includes(s))return Xe({code:ht,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${s}".`,url:De(Be)});return s||"auto"}const ld=(e,t)=>{const s=Jh(e.generatedCode,Zh,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===s.arrowFunctions,constBindings:!0===s.constBindings||t,objectShorthand:!0===s.objectShorthand,reservedNamesAsProps:!1!==s.reservedNamesAsProps,symbols:!0===s.symbols}},cd=(e,t)=>{if(t)return"";const s=e.indent;return!1===s?"":s??!0},hd=new Set(["compat","auto","esModule","default","defaultOnly"]),ud=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let s=null;return i=>null===i?s||dd(s=t(i)):i in e?e[i]:dd(e[i]=t(i))}return void 0===t?()=>"default":()=>dd(t)},dd=e=>hd.has(e)?e:Xe(Ft("output.interop",We,`use one of ${Array.from(hd,(e=>JSON.stringify(e))).join(", ")}`,e)),pd=(e,t,s,i)=>{const n=e.manualChunks||i.manualChunks;if(n){if(t)return Xe(Ft("output.manualChunks",qe,'this option is not supported for "output.inlineDynamicImports"'));if(s)return Xe(Ft("output.manualChunks",qe,'this option is not supported for "output.preserveModules"'))}return n||{}},fd=(e,t,s)=>e.minifyInternalExports??(s||"es"===t||"system"===t),md=(e,t,s)=>{const i=e.namespaceToStringTag;return null!=i?(Qt('The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.',"configuration-options/#output-generatedcode-symbols",!0,s),i):t.symbols||!1},gd=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(s=t).endsWith("/")?s:s+"/":Xe(Ft("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var s};function yd(e,t){for(const[s,i]of e.entries())i.name||(i.name=`${t}${s+1}`)}async function xd(e,t,s,i,n){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,s,i){if(!e)throw new Error("You must supply an options object");const n=await eu(e.plugins);yd(n,Fh);const r=t.createOutputPluginDriver(n);return{...await Ed(s,i,e,r),outputPluginDriver:r}}(i,n.pluginDriver,t,s);return Pu(0,(async()=>{const s=new jl(r,a,t,o,n),i=await s.generate(e);if(e){if(Po("WRITE",1),!r.dir&&!r.file)return Xe({code:vt,message:'You must specify "output.file" or "output.dir" for the build.',url:De(Ve)});await Promise.all(Object.values(i).map((e=>n.fileOperationQueue.run((()=>async function(e,t){const s=_(t.dir||C(t.file),e.fileName);return await Lh(C(s),{recursive:!0}),Vh(s,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,i]),Co("WRITE",1)}return l=i,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>vd(e)-vd(t)))};var l}))}function Ed(e,t,s,i){return async function(e,t,s){const i=new Set(s),n=e.compact||!1,r=Xu(e),o=Qu(e,t),a=Zu(e,o,t),l=Yu(e,a,t),c=Ju(e,t),h=ld(e,c),u={amd:td(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:sd(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:n,dir:id(e,l),dynamicImportFunction:nd(e,t,r),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:rd(e,i),esModule:e.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:od(e,t),experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:ad(e,i),extend:e.extend||!1,externalImportAssertions:e.externalImportAssertions??!0,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:sd(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:h,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??!0,indent:cd(e,n),inlineDynamicImports:o,interop:ud(e),intro:sd(e,"intro"),manualChunks:pd(e,o,a,t),minifyInternalExports:fd(e,r,n),name:e.name,namespaceToStringTag:md(e,h,t),noConflict:e.noConflict||!1,outro:sd(e,"outro"),paths:e.paths||{},plugins:await eu(e.plugins),preferConst:c,preserveModules:a,preserveModulesRoot:ed(e),sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Ku,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:gd(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1};return Xh(e,Object.keys(u),"output options",t.onLog),{options:u,unsetOptions:i}}(i.hookReduceArg0Sync("outputOptions",[s],((e,t)=>t||e),(e=>{const t=()=>e.error({code:st,message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}})),e,t)}var bd;function vd(e){return"asset"===e.type?bd.ASSET:e.isEntry?bd.ENTRY_CHUNK:bd.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(bd||(bd={})),e.VERSION=t,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,s){const{options:i,unsetOptions:n}=await async function(e,s){if(!e)throw new Error("You must supply an options object to rollup");const i=await async function(e,s){const i=vu("options",await eu(e.plugins)),n=e.logLevel||Ae,r=Cu(i,Gh(e,n),s,n);for(const o of i){const{name:i,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:yu(ke,"PLUGIN_LOG",r,i,n),error:e=>Xe(Wt(Hh(e),i,{hook:"onLog"})),info:yu(Ae,"PLUGIN_LOG",r,i,n),meta:{rollupVersion:t,watchMode:s},warn:yu(Se,"PLUGIN_WARNING",r,i,n)},e);c&&(e=c)}return e}(e,s),{options:n,unsetOptions:r}=await async function(e,t){const s=new Set,i=e.context??"undefined",n=await eu(e.plugins),r=e.logLevel||Ae,o=Cu(n,Gh(e,r),t,r),a=e.strictDeprecations||!1,l=Fu(e,o,a),c={acorn:Du(e),acornInjectPlugins:Tu(e),cache:Lu(e),context:i,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Mu(e.external),inlineDynamicImports:Vu(e,o,a),input:Bu(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:zu(e,o,a),maxParallelFileOps:l,maxParallelFileReads:l,moduleContext:ju(e,i),onLog:o,onwarn:e=>o(Se,e),perf:e.perf||!1,plugins:n,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveModules:Uu(e,o,a),preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:Gu(e)};return Xh(e,[...Object.keys(c),"watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:s}}(i,s);return yd(n.plugins,zh),{options:n,unsetOptions:r}}(e,null!==s);!function(e){e.perf?(So=new Map,Po=ko,Co=Io,e.plugins=e.plugins.map(No)):(Po=Ui,Co=Ui)}(i);const r=new wu(i,s),o=!1!==e.cache;e.cache&&(i.cache=void 0,e.cache=void 0);Po("BUILD",1),await Pu(r.pluginDriver,(async()=>{try{Po("initialize",2),await r.pluginDriver.hookParallel("buildStart",[i]),Co("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Co("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?Xe(Rt()):xd(!1,i,n,e,r),watchFiles:Object.keys(r.watchFiles),write:async e=>a.closed?Xe(Rt()):xd(!0,i,n,e,r)};i.perf&&(a.getTimings=wo);return a}(e,null)}})); + //# sourceMappingURL=rollup.browser.js.map diff --git a/src/.yarnrc.yml b/src/.yarnrc.yml new file mode 100644 index 000000000..041e52bca --- /dev/null +++ b/src/.yarnrc.yml @@ -0,0 +1,3 @@ +pnpMode: loose + +yarnPath: .yarn/releases/yarn-3.6.1.cjs diff --git a/src/README.md b/src/README.md new file mode 100644 index 000000000..c460e209c --- /dev/null +++ b/src/README.md @@ -0,0 +1,76 @@ +# Haxidraw Turborepo + +This is a Turborepo that holds the libraries/code for Haxidraw. Using a Turborepo means it's super easy to turn things into individual packages but still have others that depend on them. + +## What's inside? + +This Turborepo includes the following packages/apps: + +### Apps and Packages + +- `docs`: a [Next.js](https://nextjs.org/) app +- `editor`: an Astro/Preact app +- `haxidraw-client`: a TypeScript library allowing you to interface with the Haxidraw device - also includes the Turtle library +- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) +- `tsconfig`: `tsconfig.json`s used throughout the monorepo + +Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). + +### Setup + +This Turborepo uses Yarn 3.x - if you have [Corepack](https://github.com/nodejs/corepack) enabled, you shouldn't have to worry about what version you have installed (Corepack will read the requested version from the `packageManager` property of `package.json` and configure it automatically). Otherwise, make sure you have the correct Yarn version by running `yarn --version`. + +We aren't using Yarn's zero-install system so the repo isn't hundreds of megabytes, which means you'll have to manually run commands to install dependencies and set up IDE integration: + +```sh +yarn install +yarn dlx @yarnpkg/sdks vscode +``` + +If VS Code doesn't prompt you, manually make it use the workspace version of TypeScript by pressing `ctrl+shift+p`, choosing "Select TypeScript Version", then "Use Workspace Version". + +### Build + +To build all apps and packages, run the following command: + +``` +yarn build +``` + +### Develop + +To develop all apps and packages, run the following command: + +``` +pnpm dev +``` + +### Remote Caching + +Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. + +By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands: + +``` +cd my-turborepo +npx turbo login +``` + +This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). + +Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: + +``` +npx turbo link +``` + +## Useful Links + +Learn more about the power of Turborepo: + +- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) +- [Caching](https://turbo.build/repo/docs/core-concepts/caching) +- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) +- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) +- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) +- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) diff --git a/src/apps/docs/.eslintrc.js b/src/apps/docs/.eslintrc.js new file mode 100644 index 000000000..831f92a68 --- /dev/null +++ b/src/apps/docs/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ["custom"] +}; \ No newline at end of file diff --git a/website/.gitignore b/src/apps/docs/.gitignore similarity index 100% rename from website/.gitignore rename to src/apps/docs/.gitignore diff --git a/website/LICENSE b/src/apps/docs/LICENSE similarity index 100% rename from website/LICENSE rename to src/apps/docs/LICENSE diff --git a/website/README.md b/src/apps/docs/README.md similarity index 100% rename from website/README.md rename to src/apps/docs/README.md diff --git a/website/components/HImg.module.css b/src/apps/docs/components/HImg.module.css similarity index 100% rename from website/components/HImg.module.css rename to src/apps/docs/components/HImg.module.css diff --git a/website/components/HImg.tsx b/src/apps/docs/components/HImg.tsx similarity index 100% rename from website/components/HImg.tsx rename to src/apps/docs/components/HImg.tsx diff --git a/website/next-env.d.ts b/src/apps/docs/next-env.d.ts similarity index 100% rename from website/next-env.d.ts rename to src/apps/docs/next-env.d.ts diff --git a/website/next.config.js b/src/apps/docs/next.config.js similarity index 100% rename from website/next.config.js rename to src/apps/docs/next.config.js diff --git a/website/package.json b/src/apps/docs/package.json similarity index 91% rename from website/package.json rename to src/apps/docs/package.json index 024c919f1..fdab72f3d 100644 --- a/website/package.json +++ b/src/apps/docs/package.json @@ -1,6 +1,7 @@ { "name": "haxidraw-docs", "version": "0.0.1", + "private": true, "description": "Documentation for the Haxidraw", "scripts": { "dev": "next dev", @@ -26,6 +27,8 @@ }, "devDependencies": { "@types/node": "18.11.10", + "@types/react": "18.2.14", + "tsconfig": "*", "typescript": "^4.9.3" } } diff --git a/website/pages/_meta.json b/src/apps/docs/pages/_meta.json similarity index 100% rename from website/pages/_meta.json rename to src/apps/docs/pages/_meta.json diff --git a/website/pages/assembly/_meta.json b/src/apps/docs/pages/assembly/_meta.json similarity index 100% rename from website/pages/assembly/_meta.json rename to src/apps/docs/pages/assembly/_meta.json diff --git a/website/pages/assembly/bill-of-materials.mdx b/src/apps/docs/pages/assembly/bill-of-materials.mdx similarity index 100% rename from website/pages/assembly/bill-of-materials.mdx rename to src/apps/docs/pages/assembly/bill-of-materials.mdx diff --git a/website/pages/assembly/img/belt-clamp-cap.png b/src/apps/docs/pages/assembly/img/belt-clamp-cap.png similarity index 100% rename from website/pages/assembly/img/belt-clamp-cap.png rename to src/apps/docs/pages/assembly/img/belt-clamp-cap.png diff --git a/website/pages/assembly/img/belt-clamp.png b/src/apps/docs/pages/assembly/img/belt-clamp.png similarity index 100% rename from website/pages/assembly/img/belt-clamp.png rename to src/apps/docs/pages/assembly/img/belt-clamp.png diff --git a/website/pages/assembly/img/carriage.png b/src/apps/docs/pages/assembly/img/carriage.png similarity index 100% rename from website/pages/assembly/img/carriage.png rename to src/apps/docs/pages/assembly/img/carriage.png diff --git a/website/pages/assembly/img/foot.png b/src/apps/docs/pages/assembly/img/foot.png similarity index 100% rename from website/pages/assembly/img/foot.png rename to src/apps/docs/pages/assembly/img/foot.png diff --git a/website/pages/assembly/img/idler-front.png b/src/apps/docs/pages/assembly/img/idler-front.png similarity index 100% rename from website/pages/assembly/img/idler-front.png rename to src/apps/docs/pages/assembly/img/idler-front.png diff --git a/website/pages/assembly/img/motor-bracket.png b/src/apps/docs/pages/assembly/img/motor-bracket.png similarity index 100% rename from website/pages/assembly/img/motor-bracket.png rename to src/apps/docs/pages/assembly/img/motor-bracket.png diff --git a/website/pages/assembly/img/pen-holder.png b/src/apps/docs/pages/assembly/img/pen-holder.png similarity index 100% rename from website/pages/assembly/img/pen-holder.png rename to src/apps/docs/pages/assembly/img/pen-holder.png diff --git a/website/pages/assembly/img/printed-rail.png b/src/apps/docs/pages/assembly/img/printed-rail.png similarity index 100% rename from website/pages/assembly/img/printed-rail.png rename to src/apps/docs/pages/assembly/img/printed-rail.png diff --git a/website/pages/assembly/parts/_meta.json b/src/apps/docs/pages/assembly/parts/_meta.json similarity index 100% rename from website/pages/assembly/parts/_meta.json rename to src/apps/docs/pages/assembly/parts/_meta.json diff --git a/website/pages/assembly/parts/belt-tensioner.mdx b/src/apps/docs/pages/assembly/parts/belt-tensioner.mdx similarity index 100% rename from website/pages/assembly/parts/belt-tensioner.mdx rename to src/apps/docs/pages/assembly/parts/belt-tensioner.mdx diff --git a/website/pages/assembly/parts/calibration.mdx b/src/apps/docs/pages/assembly/parts/calibration.mdx similarity index 100% rename from website/pages/assembly/parts/calibration.mdx rename to src/apps/docs/pages/assembly/parts/calibration.mdx diff --git a/website/pages/assembly/parts/carriage.mdx b/src/apps/docs/pages/assembly/parts/carriage.mdx similarity index 100% rename from website/pages/assembly/parts/carriage.mdx rename to src/apps/docs/pages/assembly/parts/carriage.mdx diff --git a/website/pages/assembly/parts/electronics.mdx b/src/apps/docs/pages/assembly/parts/electronics.mdx similarity index 100% rename from website/pages/assembly/parts/electronics.mdx rename to src/apps/docs/pages/assembly/parts/electronics.mdx diff --git a/website/pages/assembly/parts/firmware.mdx b/src/apps/docs/pages/assembly/parts/firmware.mdx similarity index 100% rename from website/pages/assembly/parts/firmware.mdx rename to src/apps/docs/pages/assembly/parts/firmware.mdx diff --git a/website/pages/assembly/parts/front-idler.mdx b/src/apps/docs/pages/assembly/parts/front-idler.mdx similarity index 100% rename from website/pages/assembly/parts/front-idler.mdx rename to src/apps/docs/pages/assembly/parts/front-idler.mdx diff --git a/website/pages/assembly/parts/img/belt-2.jpg b/src/apps/docs/pages/assembly/parts/img/belt-2.jpg similarity index 100% rename from website/pages/assembly/parts/img/belt-2.jpg rename to src/apps/docs/pages/assembly/parts/img/belt-2.jpg diff --git a/website/pages/assembly/parts/img/belt-clamp.jpg b/src/apps/docs/pages/assembly/parts/img/belt-clamp.jpg similarity index 100% rename from website/pages/assembly/parts/img/belt-clamp.jpg rename to src/apps/docs/pages/assembly/parts/img/belt-clamp.jpg diff --git a/website/pages/assembly/parts/img/belt-path.jpg b/src/apps/docs/pages/assembly/parts/img/belt-path.jpg similarity index 100% rename from website/pages/assembly/parts/img/belt-path.jpg rename to src/apps/docs/pages/assembly/parts/img/belt-path.jpg diff --git a/website/pages/assembly/parts/img/belt-tensioner-2.jpg b/src/apps/docs/pages/assembly/parts/img/belt-tensioner-2.jpg similarity index 100% rename from website/pages/assembly/parts/img/belt-tensioner-2.jpg rename to src/apps/docs/pages/assembly/parts/img/belt-tensioner-2.jpg diff --git a/website/pages/assembly/parts/img/belt-tensioner-position.jpg b/src/apps/docs/pages/assembly/parts/img/belt-tensioner-position.jpg similarity index 100% rename from website/pages/assembly/parts/img/belt-tensioner-position.jpg rename to src/apps/docs/pages/assembly/parts/img/belt-tensioner-position.jpg diff --git a/website/pages/assembly/parts/img/carriage-idlers.jpg b/src/apps/docs/pages/assembly/parts/img/carriage-idlers.jpg similarity index 100% rename from website/pages/assembly/parts/img/carriage-idlers.jpg rename to src/apps/docs/pages/assembly/parts/img/carriage-idlers.jpg diff --git a/website/pages/assembly/parts/img/carriage-nut-holes-1.jpg b/src/apps/docs/pages/assembly/parts/img/carriage-nut-holes-1.jpg similarity index 100% rename from website/pages/assembly/parts/img/carriage-nut-holes-1.jpg rename to src/apps/docs/pages/assembly/parts/img/carriage-nut-holes-1.jpg diff --git a/website/pages/assembly/parts/img/carriage-nut-holes-2.jpg b/src/apps/docs/pages/assembly/parts/img/carriage-nut-holes-2.jpg similarity index 100% rename from website/pages/assembly/parts/img/carriage-nut-holes-2.jpg rename to src/apps/docs/pages/assembly/parts/img/carriage-nut-holes-2.jpg diff --git a/website/pages/assembly/parts/img/carriage-v-wheels-1.jpg b/src/apps/docs/pages/assembly/parts/img/carriage-v-wheels-1.jpg similarity index 100% rename from website/pages/assembly/parts/img/carriage-v-wheels-1.jpg rename to src/apps/docs/pages/assembly/parts/img/carriage-v-wheels-1.jpg diff --git a/website/pages/assembly/parts/img/carriage-v-wheels-2.jpg b/src/apps/docs/pages/assembly/parts/img/carriage-v-wheels-2.jpg similarity index 100% rename from website/pages/assembly/parts/img/carriage-v-wheels-2.jpg rename to src/apps/docs/pages/assembly/parts/img/carriage-v-wheels-2.jpg diff --git a/website/pages/assembly/parts/img/control-board.png b/src/apps/docs/pages/assembly/parts/img/control-board.png similarity index 100% rename from website/pages/assembly/parts/img/control-board.png rename to src/apps/docs/pages/assembly/parts/img/control-board.png diff --git a/website/pages/assembly/parts/img/firmware-boards-manager.png b/src/apps/docs/pages/assembly/parts/img/firmware-boards-manager.png similarity index 100% rename from website/pages/assembly/parts/img/firmware-boards-manager.png rename to src/apps/docs/pages/assembly/parts/img/firmware-boards-manager.png diff --git a/website/pages/assembly/parts/img/firmware-boot-button.jpg b/src/apps/docs/pages/assembly/parts/img/firmware-boot-button.jpg similarity index 100% rename from website/pages/assembly/parts/img/firmware-boot-button.jpg rename to src/apps/docs/pages/assembly/parts/img/firmware-boot-button.jpg diff --git a/website/pages/assembly/parts/img/firmware-disk.png b/src/apps/docs/pages/assembly/parts/img/firmware-disk.png similarity index 100% rename from website/pages/assembly/parts/img/firmware-disk.png rename to src/apps/docs/pages/assembly/parts/img/firmware-disk.png diff --git a/website/pages/assembly/parts/img/firmware-select-board.png b/src/apps/docs/pages/assembly/parts/img/firmware-select-board.png similarity index 100% rename from website/pages/assembly/parts/img/firmware-select-board.png rename to src/apps/docs/pages/assembly/parts/img/firmware-select-board.png diff --git a/website/pages/assembly/parts/img/firmware-serial-port.png b/src/apps/docs/pages/assembly/parts/img/firmware-serial-port.png similarity index 100% rename from website/pages/assembly/parts/img/firmware-serial-port.png rename to src/apps/docs/pages/assembly/parts/img/firmware-serial-port.png diff --git a/website/pages/assembly/parts/img/firmware-upload.png b/src/apps/docs/pages/assembly/parts/img/firmware-upload.png similarity index 100% rename from website/pages/assembly/parts/img/firmware-upload.png rename to src/apps/docs/pages/assembly/parts/img/firmware-upload.png diff --git a/website/pages/assembly/parts/img/front-idler-bearing.jpg b/src/apps/docs/pages/assembly/parts/img/front-idler-bearing.jpg similarity index 100% rename from website/pages/assembly/parts/img/front-idler-bearing.jpg rename to src/apps/docs/pages/assembly/parts/img/front-idler-bearing.jpg diff --git a/website/pages/assembly/parts/img/front-idler-pen-holder.jpg b/src/apps/docs/pages/assembly/parts/img/front-idler-pen-holder.jpg similarity index 100% rename from website/pages/assembly/parts/img/front-idler-pen-holder.jpg rename to src/apps/docs/pages/assembly/parts/img/front-idler-pen-holder.jpg diff --git a/website/pages/assembly/parts/img/idler-assembly.jpg b/src/apps/docs/pages/assembly/parts/img/idler-assembly.jpg similarity index 100% rename from website/pages/assembly/parts/img/idler-assembly.jpg rename to src/apps/docs/pages/assembly/parts/img/idler-assembly.jpg diff --git a/website/pages/assembly/parts/img/motors-bracket.jpg b/src/apps/docs/pages/assembly/parts/img/motors-bracket.jpg similarity index 100% rename from website/pages/assembly/parts/img/motors-bracket.jpg rename to src/apps/docs/pages/assembly/parts/img/motors-bracket.jpg diff --git a/website/pages/assembly/parts/img/motors-carriage-extrusion.jpg b/src/apps/docs/pages/assembly/parts/img/motors-carriage-extrusion.jpg similarity index 100% rename from website/pages/assembly/parts/img/motors-carriage-extrusion.jpg rename to src/apps/docs/pages/assembly/parts/img/motors-carriage-extrusion.jpg diff --git a/website/pages/assembly/parts/img/motors-feet.jpg b/src/apps/docs/pages/assembly/parts/img/motors-feet.jpg similarity index 100% rename from website/pages/assembly/parts/img/motors-feet.jpg rename to src/apps/docs/pages/assembly/parts/img/motors-feet.jpg diff --git a/website/pages/assembly/parts/img/motors-stepper.jpg b/src/apps/docs/pages/assembly/parts/img/motors-stepper.jpg similarity index 100% rename from website/pages/assembly/parts/img/motors-stepper.jpg rename to src/apps/docs/pages/assembly/parts/img/motors-stepper.jpg diff --git a/website/pages/assembly/parts/img/pen-holder.jpg b/src/apps/docs/pages/assembly/parts/img/pen-holder.jpg similarity index 100% rename from website/pages/assembly/parts/img/pen-holder.jpg rename to src/apps/docs/pages/assembly/parts/img/pen-holder.jpg diff --git a/website/pages/assembly/parts/motors-and-feet.mdx b/src/apps/docs/pages/assembly/parts/motors-and-feet.mdx similarity index 100% rename from website/pages/assembly/parts/motors-and-feet.mdx rename to src/apps/docs/pages/assembly/parts/motors-and-feet.mdx diff --git a/website/pages/assembly/parts/pen-holder.mdx b/src/apps/docs/pages/assembly/parts/pen-holder.mdx similarity index 100% rename from website/pages/assembly/parts/pen-holder.mdx rename to src/apps/docs/pages/assembly/parts/pen-holder.mdx diff --git a/website/pages/img/drawing-machine.png b/src/apps/docs/pages/img/drawing-machine.png similarity index 100% rename from website/pages/img/drawing-machine.png rename to src/apps/docs/pages/img/drawing-machine.png diff --git a/website/pages/index.mdx b/src/apps/docs/pages/index.mdx similarity index 100% rename from website/pages/index.mdx rename to src/apps/docs/pages/index.mdx diff --git a/website/pages/operation.mdx b/src/apps/docs/pages/operation.mdx similarity index 100% rename from website/pages/operation.mdx rename to src/apps/docs/pages/operation.mdx diff --git a/website/pages/operation/_meta.json b/src/apps/docs/pages/operation/_meta.json similarity index 100% rename from website/pages/operation/_meta.json rename to src/apps/docs/pages/operation/_meta.json diff --git a/website/pages/operation/functions.mdx b/src/apps/docs/pages/operation/functions.mdx similarity index 100% rename from website/pages/operation/functions.mdx rename to src/apps/docs/pages/operation/functions.mdx diff --git a/website/pages/operation/write-and-run-code.mdx b/src/apps/docs/pages/operation/write-and-run-code.mdx similarity index 100% rename from website/pages/operation/write-and-run-code.mdx rename to src/apps/docs/pages/operation/write-and-run-code.mdx diff --git a/website/pages/troubleshooting.mdx b/src/apps/docs/pages/troubleshooting.mdx similarity index 100% rename from website/pages/troubleshooting.mdx rename to src/apps/docs/pages/troubleshooting.mdx diff --git a/website/theme.config.tsx b/src/apps/docs/theme.config.tsx similarity index 100% rename from website/theme.config.tsx rename to src/apps/docs/theme.config.tsx diff --git a/src/apps/docs/tsconfig.json b/src/apps/docs/tsconfig.json new file mode 100644 index 000000000..db0124551 --- /dev/null +++ b/src/apps/docs/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "tsconfig/nextjs.json", + "compilerOptions": { + "plugins": [{ "name": "next" }] + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/website/vercel.json b/src/apps/docs/vercel.json similarity index 100% rename from website/vercel.json rename to src/apps/docs/vercel.json diff --git a/src/apps/editor/.gitignore b/src/apps/editor/.gitignore new file mode 100644 index 000000000..6d4c0aa06 --- /dev/null +++ b/src/apps/editor/.gitignore @@ -0,0 +1,21 @@ +# build output +dist/ + +# generated types +.astro/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/src/apps/editor/.prettierrc.json b/src/apps/editor/.prettierrc.json new file mode 100644 index 000000000..cb1368802 --- /dev/null +++ b/src/apps/editor/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "useTabs": false, + "trailingComma": "none", + "semi": true, + "singleQuote": false, + "tabWidth": 4 +} \ No newline at end of file diff --git a/src/apps/editor/.vscode/extensions.json b/src/apps/editor/.vscode/extensions.json new file mode 100644 index 000000000..22a15055d --- /dev/null +++ b/src/apps/editor/.vscode/extensions.json @@ -0,0 +1,4 @@ +{ + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] +} diff --git a/src/apps/editor/.vscode/launch.json b/src/apps/editor/.vscode/launch.json new file mode 100644 index 000000000..d64220976 --- /dev/null +++ b/src/apps/editor/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] +} diff --git a/src/apps/editor/README.md b/src/apps/editor/README.md new file mode 100644 index 000000000..75d44e0da --- /dev/null +++ b/src/apps/editor/README.md @@ -0,0 +1,54 @@ +# Astro Starter Kit: Basics + +``` +npm create astro@latest -- --template basics +``` + +[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics) +[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics) +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json) + +> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! + +![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png) + +## 🚀 Project Structure + +Inside of your Astro project, you'll see the following folders and files: + +``` +/ +├── public/ +│ └── favicon.svg +├── src/ +│ ├── components/ +│ │ └── Card.astro +│ ├── layouts/ +│ │ └── Layout.astro +│ └── pages/ +│ └── index.astro +└── package.json +``` + +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. + +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. + +Any static assets, like images, can be placed in the `public/` directory. + +## 🧞 Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :------------------------ | :----------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:3000` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | +| `npm run astro -- --help` | Get help using the Astro CLI | + +## 👀 Want to learn more? + +Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). diff --git a/src/apps/editor/astro.config.mjs b/src/apps/editor/astro.config.mjs new file mode 100644 index 000000000..d8f8db0e0 --- /dev/null +++ b/src/apps/editor/astro.config.mjs @@ -0,0 +1,33 @@ +import { defineConfig } from 'astro/config'; +import preact from "@astrojs/preact"; +import vercel from "@astrojs/vercel/serverless"; +import prefresh from "@prefresh/vite"; +import node from "@astrojs/node"; + +// https://astro.build/config +export default defineConfig({ + site: "https://editor.haxidraw.hackclub.com", + integrations: [preact({ compat: true })], + output: "server", + adapter: vercel(), + // adapter: node({ + // mode: "standalone" + // }), + vite: { + plugins: [prefresh()], + ssr: { + noExternal: ["niue"] + }, + esbuild: { + target: "es2020" + }, + optimizeDeps: { + esbuildOptions: { + target: "es2020" + } + }, + build: { + target: "es2020" + } + } +}); \ No newline at end of file diff --git a/src/apps/editor/package.json b/src/apps/editor/package.json new file mode 100644 index 000000000..9271af1a9 --- /dev/null +++ b/src/apps/editor/package.json @@ -0,0 +1,46 @@ +{ + "name": "editor", + "private": true, + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/preact": "^2.2.1", + "@astrojs/vercel": "^3.6.0", + "@codemirror/commands": "^6.2.4", + "@codemirror/lang-javascript": "^6.1.9", + "@codemirror/language": "^6.8.0", + "@codemirror/state": "^6.2.1", + "@codemirror/view": "^6.14.0", + "@lezer/common": "^1.0.3", + "@preact/compat": "^17.1.2", + "@prefresh/vite": "^2.4.1", + "@replit/codemirror-vim": "^6.0.14", + "@rollup/browser": "^3.26.0", + "astro": "^2.7.3", + "classnames": "^2.3.2", + "cm6-theme-basic-dark": "^0.2.0", + "codemirror": "^6.0.1", + "haxidraw-client": "*", + "nanoid": "^4.0.2", + "niue": "^0.2.0", + "preact": "^10.6.5", + "source-map-js": "^1.0.2" + }, + "devDependencies": { + "@astrojs/node": "^5.3.0", + "@types/w3c-web-serial": "^1.0.3", + "prettier": "^3.0.0", + "typescript": "^5.1.6" + }, + "overrides": { + "react": "npm:@preact/compat@latest", + "react-dom": "npm:@preact/compat@latest" + } +} diff --git a/src/apps/editor/public/favicon.svg b/src/apps/editor/public/favicon.svg new file mode 100644 index 000000000..f157bd1c5 --- /dev/null +++ b/src/apps/editor/public/favicon.svg @@ -0,0 +1,9 @@ + + + + diff --git a/src/apps/editor/src/Editor.module.css b/src/apps/editor/src/Editor.module.css new file mode 100644 index 000000000..750a34e04 --- /dev/null +++ b/src/apps/editor/src/Editor.module.css @@ -0,0 +1,29 @@ +.root { + display: flex; + flex-direction: column; + height: 100vh; + overflow-y: hidden; +} + +.inner { + display: flex; + flex: 1; + min-height: 0; + position: relative; +} + +.editor { + flex: 1; + min-width: 0; +} + +.right { + width: min(800px, max(400px, 50%)); + border-left: 1px solid rgba(0, 0, 0, 0.25); + display: flex; + flex-direction: column; +} +.right > *:first-child { + flex: 1; + overflow-x: auto; /* fix resizing the canvas */ +} \ No newline at end of file diff --git a/src/apps/editor/src/Editor.tsx b/src/apps/editor/src/Editor.tsx new file mode 100644 index 000000000..f41235228 --- /dev/null +++ b/src/apps/editor/src/Editor.tsx @@ -0,0 +1,28 @@ +import AutoBackup from "./components/AutoBackup.tsx"; +import CompatWarning from "./components/CompatWarning.tsx"; +import Preview from "./components/Preview.tsx"; +import Toolbar from "./components/Toolbar.tsx"; +import InnerEditor from "./components/Editor.tsx"; +import styles from "./Editor.module.css"; +import Error from "./components/Error.tsx"; +import Console from "./components/Console.tsx"; + +export default function Editor() { + return ( + <> + {/* doesn't render anything */} +
+ +
+ +
+ + + +
+
+
+ + + ); +} diff --git a/src/apps/editor/src/components/AutoBackup.tsx b/src/apps/editor/src/components/AutoBackup.tsx new file mode 100644 index 000000000..461bc67d9 --- /dev/null +++ b/src/apps/editor/src/components/AutoBackup.tsx @@ -0,0 +1,17 @@ +import { useEffect } from "preact/hooks"; +import { useStore, serializeState, getStore } from "../lib/state.ts"; +import { useOnEditorChange } from "../lib/events.ts"; + +function backup() { + const backup = serializeState(getStore()); + localStorage.setItem("backup", JSON.stringify(backup)); +} + +export default function AutoBackup() { + useStore(); + + useOnEditorChange(backup, []); + useEffect(backup); + + return null; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/CodeMirror.module.css b/src/apps/editor/src/components/CodeMirror.module.css new file mode 100644 index 000000000..a2f89258a --- /dev/null +++ b/src/apps/editor/src/components/CodeMirror.module.css @@ -0,0 +1,9 @@ +.cmWrapper > * { + height: 100%; + width: 100%; +} + +.cmWrapper :global .cm-number-scrubber:hover { + outline: 1px solid; + cursor: ew-resize; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/CodeMirror.tsx b/src/apps/editor/src/components/CodeMirror.tsx new file mode 100644 index 000000000..4d391da7b --- /dev/null +++ b/src/apps/editor/src/components/CodeMirror.tsx @@ -0,0 +1,172 @@ +import { EditorView, basicSetup } from "codemirror" +import { keymap, ViewUpdate } from "@codemirror/view"; +import { javascript } from "@codemirror/lang-javascript" +import { EditorState } from "@codemirror/state"; +import { indentUnit } from "@codemirror/language"; +import { indentWithTab } from "@codemirror/commands"; +import { useCallback, useEffect, useState } from "preact/hooks"; +import cx from "classnames"; +import styles from "./CodeMirror.module.css"; +import { CodePosition, getStore, useStore } from "../lib/state.ts"; +import { dispatchEditorChange } from "../lib/events.ts"; +import { themeExtension, useCMTheme } from "../lib/codemirror/cmTheme.ts"; +import { createEvent } from "niue"; +import { useVimMode, vimModeExtension } from "../lib/codemirror/cmVimMode.ts"; +import { numberScrubbingPlugin } from "../lib/codemirror/numberScrubbing.ts"; +import { manualChangeSinceLiveUpdate } from "../lib/run.js"; + +// this is a terrible hack but strange bugs are about this one +//@ts-expect-error +const autocompleteRemoved = basicSetup.filter((_, i) => ![11, 12].includes(i)); + +export function getCode() { + return (document.querySelector(".cm-editor") as (Element & { + view: EditorView + }) | undefined)?.view.state.doc.toString(); +} + +const theme = EditorView.theme({ + ".cm-content": { + fontFamily: "var(--font-mono)", + fontSize: "14px" + } +}); + +export const liveUpdating = { + value: false +}; + +const cmExtensions = [ + autocompleteRemoved, + javascript(), + keymap.of([indentWithTab]), // TODO: We should put a note about Esc+Tab for accessibility somewhere. + indentUnit.of(" "), + theme, + EditorView.updateListener.of((v: ViewUpdate) => { + const { code } = getStore(); + code.cmState = v.state; + if(v.docChanged) { + code.content = v.state.doc.toString(); + if(!liveUpdating.value) manualChangeSinceLiveUpdate.value = true; + dispatchEditorChange(); + } + }), + themeExtension(), + vimModeExtension(), + numberScrubbingPlugin +]; + +export const createCMState = (content: string) => EditorState.create({ extensions: cmExtensions, doc: content }); + +export const deserializeCMState = (state: any) => EditorState.fromJSON(state, { extensions: cmExtensions }); + +export const [useOnJumpTo, dispatchJumpTo] = createEvent(); + +export default function CodeMirror({ className }: { className?: string }) { + const [view, setView] = useState(); + const { code: codeState, error } = useStore(["code", "error"]); + const [errorLine, setErrorLine] = useState(); + const [lineDOMIndex, setLineDOMIndex] = useState(); + useCMTheme(view); + useVimMode(view); + + const updateLineDOMIndex = useCallback((errorLine: number | undefined) => { + if(errorLine === undefined) { + setLineDOMIndex(undefined); + return; + } + // search through to find the index of line with innertext equal to the line + const cmLineGutters = document.querySelectorAll(`.${styles.cmWrapper} .cm-lineNumbers > .cm-gutterElement`); // Get all the line gutters + if(cmLineGutters.length === 0) { + // cm hasn't rendered yet + setTimeout(updateLineDOMIndex, 1, errorLine); + } + // Find the gutter that matches the line number and is not hidden + for (let i = 0; i < cmLineGutters.length; i++) { + const cmLineGutter = cmLineGutters[i] as HTMLElement; + const innerNumber = cmLineGutter.innerText; + const height = cmLineGutter.style.height; + if (Number(innerNumber) === errorLine + 1 && height !== "0px") { + setLineDOMIndex(i); + return; + } + } + setLineDOMIndex(undefined); + }, [view, setLineDOMIndex]); + + useEffect(() => updateLineDOMIndex(errorLine), [errorLine, updateLineDOMIndex]); + + const updateCMState = useCallback(() => { + if(!view) return; + view.setState(codeState.cmState); + }, [view, codeState]); + + useEffect(updateCMState, [view, codeState]); + + useOnJumpTo((pos) => { + if(!view) return; + const offset = view.state.doc.line(pos.line).from + pos.column; + view.dispatch({ + selection: { + anchor: offset, + head: offset + }, + effects: EditorView.scrollIntoView(offset, { + y: "center" + }) + }); + // focus the editor + view.focus(); + }, [view]); + + useEffect(() => { + if(!error) { setErrorLine(undefined); setLineDOMIndex(undefined); return; } + const { line } = error.stack[0]; + setErrorLine(line); + }, [error]); + + const editorRef = useCallback((node: HTMLDivElement | null) => { + if(!node) return; + + const view = new EditorView({ + parent: node + }); + + //@ts-expect-error + node.children[0]["view"] = view; + setView(view); + }, []); + + useEffect(() => { + const scrollHandler = () => { + if(!errorLine) return; + updateLineDOMIndex(errorLine); + }; + const el = view?.dom.querySelector(".cm-scroller"); + if(!el) return; + el.addEventListener("scroll", scrollHandler); + return () => el.removeEventListener("scroll", scrollHandler); + }, [errorLine]); + + return ( + <> + {errorLine !== undefined && ( + + )} +
+ + ); +} \ No newline at end of file diff --git a/src/apps/editor/src/components/CompatWarning.tsx b/src/apps/editor/src/components/CompatWarning.tsx new file mode 100644 index 000000000..c616bc9db --- /dev/null +++ b/src/apps/editor/src/components/CompatWarning.tsx @@ -0,0 +1,18 @@ +import { useEffect, useState } from "preact/hooks"; +import Button from "../ui/Button.tsx"; +import Dialog from "../ui/Dialog.tsx"; + +export default function CompatWarning() { + const [show, setShow] = useState(false); + useEffect(() => { + setShow(!navigator.serial); + }, []); + + return ( + setShow(false)}>Continue + } close={() => setShow(false)}> + Your browser doesn't seem to support the Web Serial API, which is required for the editor to be able to connect to hardware. You can still use the site to write code, but for full functionality, use Chrome or Edge version 89 or above. + + ) +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Console.module.css b/src/apps/editor/src/components/Console.module.css new file mode 100644 index 000000000..facc1567f --- /dev/null +++ b/src/apps/editor/src/components/Console.module.css @@ -0,0 +1,89 @@ +.root { + border-top: 3px solid var(--primary); + display: flex; + flex-direction: column; + gap: 0.25rem; + + max-height: min(15rem, 40vh); + padding-bottom: 1rem; +} + +body:not([data-theme=Dark]) .root { + background-color: rgba(var(--primary-rgb), 0.1); +} + +.lines { + overflow-y: auto; + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.header { + padding: 1rem; + padding-bottom: 0; + display: flex; + color: var(--text); + align-items: center; +} +.header span { + font-weight: bold; + flex: 1; +} + +.line { + display: flex; + gap: 0.5rem; + color: var(--text); + align-items: center; + margin: -0.2rem 0.5rem; + padding: 0.25rem 0.5rem; + border-radius: 0.25rem; +} + +.line:first-child { + margin-top: 0; +} + +.line:last-child { + margin-bottom: 0; +} + +.pos { + border: none; + background: none; + cursor: pointer; + text-decoration: underline; + color: inherit; +} + +body:not([data-theme=Dark]) .pos { + color: var(--primary); +} + +.values { + flex: 1; + display: flex; + gap: 0.5rem; +} + +.time { + color: rgba(var(--text-rgb), 0.5); + font-size: 0.8rem; +} + +.clearButton svg { + width: 1rem; +} + +.clearButton { + padding: 0.25rem; +} + +.tWarn { + background-color: rgba(255, 255, 0, 0.1); +} + +.tError { + background-color: rgba(255, 0, 0, 0.1); +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Console.tsx b/src/apps/editor/src/components/Console.tsx new file mode 100644 index 000000000..d77b82f0d --- /dev/null +++ b/src/apps/editor/src/components/Console.tsx @@ -0,0 +1,50 @@ +import { useEffect, useRef } from "preact/hooks"; +import { patchStore, useStore } from "../lib/state.ts" +import { dispatchJumpTo } from "./CodeMirror.tsx"; +import styles from "./Console.module.css"; +import cx from "classnames"; +import Button from "../ui/Button.tsx"; +import TrashCanIcon from "../ui/TrashCanIcon.tsx"; + +export default function Console() { + const { console } = useStore(["console"]); + const lines = useRef(null); + + useEffect(() => { + if(!lines.current) return; + + lines.current.scrollTop = lines.current.scrollHeight; + }, [console]); + + if(console.length === 0) return null; + + return ( +
+
+ console + +
+
+ {console.map(({ type, time, values, pos }, index) => ( +
+
{new Date(time).toLocaleTimeString()}
+
+ {values.map((value, i) => ( +
+ {typeof value === "string" ? value : JSON.stringify(value)} +
+ ))} +
+ {pos && ( + + )} +
+ ))} +
+
+ ) +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Editor.module.css b/src/apps/editor/src/components/Editor.module.css new file mode 100644 index 000000000..976791301 --- /dev/null +++ b/src/apps/editor/src/components/Editor.module.css @@ -0,0 +1,9 @@ +.root { + display: flex; + flex-direction: column; +} + +.cm { + flex: 1; + min-height: 0; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Editor.tsx b/src/apps/editor/src/components/Editor.tsx new file mode 100644 index 000000000..6e1f02a1f --- /dev/null +++ b/src/apps/editor/src/components/Editor.tsx @@ -0,0 +1,11 @@ +import CodeMirror from "./CodeMirror.tsx"; +import cx from "classnames"; +import styles from "./Editor.module.css"; + +export default function Editor(props: { className?: string }) { + return ( +
+ +
+ ) +} diff --git a/src/apps/editor/src/components/Error.module.css b/src/apps/editor/src/components/Error.module.css new file mode 100644 index 000000000..16a225816 --- /dev/null +++ b/src/apps/editor/src/components/Error.module.css @@ -0,0 +1,114 @@ +.root { + padding: 1rem; + border-top: 3px solid red; + background-color: rgba(255, 0, 0, 0.1); + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.stack { + display: flex; + flex-direction: column; + gap: 0.5rem; + max-height: 300px; + overflow-y: auto; + font-size: 0.9rem; +} + +.stack .context { + font-size: 0.7rem; +} + +.stackLabel { + cursor: pointer; + user-select: none; + margin-bottom: 0.5rem; + color: var(--text); +} + +.name { + font-family: var(--font-mono); + font-weight: bold; + color: red; +} + +.snippet { + font-family: var(--font-mono); + padding: 0.5rem; + border-radius: 0.25rem; + background-color: white; + display: flex; + position: relative; +} + +body[data-theme=Dark] .snippet { + background-color: rgba(50, 50, 50, 1); + color: white; +} + +.snippet > :first-child { + border-right: 1px solid rgba(255, 255, 255, 0.1); + flex: 0; + padding-right: 0.5rem; + margin-right: 0.5rem; +} + +.snippet > :first-child > :first-child { + color: rgba(0, 0, 0, 0.7); +} + +body[data-theme=Dark] .snippet > :first-child > :first-child { + color: rgba(255, 255, 255, 0.7); +} + +.message { + font-family: var(--font-body); + padding: 0.125rem 0.25rem; + margin-left: 0.25rem; + background-color: rgb(255, 67, 67); + border-radius: 0.25rem; + color: white; +} + +.arrow { + color: rgb(255, 67, 67); +} + +.context { + color: rgba(0, 0, 0, 0.7); + font-size: 0.8rem; +} + +body[data-theme=Dark] .context { + color: rgba(255, 255, 255, 0.7); +} + +.cm > div { + background-color: unset; +} + +.jumpTo { + background-color: rgba(0, 0, 0, 0.25); + position: absolute; + top: 0; right: 0; + display: flex; + font-family: var(--font-body); + font-size: 0.9rem; + border-radius: 0 0.25rem; + padding: 0.125rem 0.25rem; + cursor: pointer; + border: 0; + color: inherit; + gap: 0.25rem; +} + +body[data-theme=Light] .jumpTo { + background-color: rgba(0, 0, 0, 0.1); +} + +.jumpTo svg { + width: 1rem; + fill: currentColor; + transform: rotate(270deg); +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Error.tsx b/src/apps/editor/src/components/Error.tsx new file mode 100644 index 000000000..752242f29 --- /dev/null +++ b/src/apps/editor/src/components/Error.tsx @@ -0,0 +1,114 @@ +import { CodePosition, useStore } from "../lib/state.ts"; +import styles from "./Error.module.css"; +import { useCallback, useEffect, useRef } from "preact/hooks"; +import { EditorView } from "codemirror"; +import { EditorState } from "@codemirror/state"; +import { javascript } from "@codemirror/lang-javascript"; +import { defaultHighlightStyle, syntaxHighlighting } from "@codemirror/language"; +import { themeExtension, useCMTheme } from "../lib/codemirror/cmTheme.ts"; +import JumpLinkIcon from "../ui/JumpLinkIcon.tsx"; +import { dispatchJumpTo } from "./CodeMirror.tsx"; + +const Snippet = ({ pos, code, message }: { pos: CodePosition, code: string, message?: string }) => { + const view = useRef(); + useCMTheme(view.current); + + const cmRef = useCallback((node: HTMLDivElement | null) => { + if(!node) return; + + if(node.children[0]) { + // destroy existing view + //@ts-expect-error + if(node.children[0]) node.children[0]["view"].destroy(); + } + + const extensions = [ + syntaxHighlighting(defaultHighlightStyle, { fallback: true }), + javascript(), + EditorState.readOnly.of(true), + EditorView.editable.of(false), + EditorView.theme({ + ".cm-content": { + padding: "0" + }, + ".cm-line": { + padding: "0" + }, + ".cm-scroller": { + fontFamily: "inherit", + lineHeight: "inherit" + }, + ".ͼp": { + backgroundColor: "transparent" + } + }), + themeExtension() + ]; + + const newView = new EditorView({ + doc: code.split("\n")[pos.line - 1], + parent: node, + extensions + }); + + //@ts-expect-error + node.children[0]["view"] = newView; + view.current = newView; + }, [code]); + + useEffect(() => { + if(!view.current) return; + // set the document to current line + view.current.dispatch({ + changes: { + from: 0, + to: view.current.state.doc.length, + insert: code.split("\n")[pos.line - 1] + } + }); + }, [code]); + + const hasContext = pos.line !== 1; + const lines = code.split("\n"); + const context = hasContext ? lines[pos.line - 2].trimStart() : undefined; + return
+        
+ {hasContext &&
{pos.line - 1}
} +
{pos.line}
+
+ + {hasContext && <> + {" ".repeat(lines[pos.line - 2].length - context!.length)}{context} + } +
+ {" ".repeat(pos.column)}{message && {message}} + + +
+} + +export default function Error() { + const { error } = useStore(["error"]); + + if(!error) return null; + + return ( +
+ {error.name} + + {error.stack.length > 1 && ( +
+ stack trace +
+ {error.stack.slice(1).map((pos, i) => ( + + ))} +
+
+ )} +
+ ) +} \ No newline at end of file diff --git a/src/apps/editor/src/components/GlobalStateDebugger.tsx b/src/apps/editor/src/components/GlobalStateDebugger.tsx new file mode 100644 index 000000000..4fdc3ae30 --- /dev/null +++ b/src/apps/editor/src/components/GlobalStateDebugger.tsx @@ -0,0 +1,13 @@ +import { useEffect } from "preact/hooks"; +import { useStore } from "../lib/state.ts"; + +export default function GlobalStateDebugger() { + const state = useStore(); + + useEffect(() => { + //@ts-expect-error + globalThis["_globalState"] = state; + }, [state]); + + return null; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Help.module.css b/src/apps/editor/src/components/Help.module.css new file mode 100644 index 000000000..b9a09570c --- /dev/null +++ b/src/apps/editor/src/components/Help.module.css @@ -0,0 +1,5 @@ +.root { + display: flex; + flex-direction: column; + gap: 0.5rem; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Help.tsx b/src/apps/editor/src/components/Help.tsx new file mode 100644 index 000000000..f5f8c8443 --- /dev/null +++ b/src/apps/editor/src/components/Help.tsx @@ -0,0 +1,10 @@ +import { compiledContent } from "./HelpContents.md"; +import styles from "./Help.module.css"; + +const html = compiledContent(); + +export default function Help() { + return ( +
+ ) +} \ No newline at end of file diff --git a/src/apps/editor/src/components/HelpContents.md b/src/apps/editor/src/components/HelpContents.md new file mode 100644 index 000000000..ba0884861 --- /dev/null +++ b/src/apps/editor/src/components/HelpContents.md @@ -0,0 +1,70 @@ +## API reference + +##### `async loop(fn, minInterval = 0)` + +Run a function `fn` at least every `minInterval` milliseconds. + +##### `async sleep(ms)` + +Delay for `ms` milliseconds. + +##### `render(node)` + +Render the DOM node `node` to the View tab. + +##### `viewEl` + +A reference to the root node of the View tab. + +##### `createSynchronizer(actuators)` + +Create a "synchronizer" out of an array of `actuator`s (`Thing`s that support various motion commands). Returns an object with the following properties: + +###### `actuators` + +The array of `actuator`s passed to `createSynchronizer`. + +###### `async target(pos, vels?, accels?)` + +Go to the `pos` position without awaiting the end of the movement. + + +###### `async absolute(pos, vel?, accel?)` + +Go to the absolute specified actuator position `pos`, and optionally change the velocity and acceleration to `vel` and `accel` respectively. + +###### `async relative(deltas, vel?, accel?)` + +Move relative by the `deltas` specified, and optionally change the velocity and acceleration to `vel` and `accel` respectively. + +###### `async velocity(vels, accel?)` + +Set the velocity vector to `vels`, and optionally change the acceleration to `accel`. + +###### `async stop()` + +Stop all actuators. + +###### `async awaitMotionEnd()` + +Wait for all actuators to stop moving. + +###### `async setPosition(pos)` + +Set the position of all actuators to the respective value in `pos`. + +###### `setVelocity(vel)` + +Set the velocity to `vel`. + +###### `setAccel(accel)` + +Set the acceleration to `accel`. + +###### `async getPosition()` + +Get the current position of all actuators. + +###### `async getVelocity()` + +Get the current velocity of all actuators. \ No newline at end of file diff --git a/src/apps/editor/src/components/Preview.module.css b/src/apps/editor/src/components/Preview.module.css new file mode 100644 index 000000000..416bc14e3 --- /dev/null +++ b/src/apps/editor/src/components/Preview.module.css @@ -0,0 +1,9 @@ +.root { + width: 100%; + height: 100%; + image-rendering: crisp-edges; +} + +body[data-theme=Dark] .root { + filter: invert(1); +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Preview.tsx b/src/apps/editor/src/components/Preview.tsx new file mode 100644 index 000000000..49f0bd62a --- /dev/null +++ b/src/apps/editor/src/components/Preview.tsx @@ -0,0 +1,149 @@ +import { useRef, useEffect, useCallback } from "preact/hooks"; +import styles from "./Preview.module.css"; +import { getStore, useStore } from "../lib/state.ts"; +import cx from "classnames"; + +const panZoomParams = { + panX: 200, + panY: 200, + scale: 100 +}; + +let dpr = typeof window === 'undefined' ? 1 : window.devicePixelRatio || 1; + +export default function Preview(props: { className?: string }) { + const canvasRef = useRef(null); + const { turtles, console } = useStore(["turtles", "console"]); + + const redraw = useCallback(() => { + const canvas = canvasRef.current; + const { turtlePos, turtles } = getStore(); + if(!canvas || !turtlePos) return; + + // we want to only work in virtual pixels, and just deal with device pixels in rendering + const width = canvas.width / dpr; + const height = canvas.height / dpr; + + // turtle canvas + const ctx = canvas.getContext("2d")!; + ctx.scale(dpr, dpr); // handles most high dpi stuff for us (see https://web.dev/canvas-hidipi/) + + ctx.clearRect(0, 0, width, height); + ctx.beginPath(); + ctx.arc( + panZoomParams.panX + turtlePos[0] * panZoomParams.scale, + panZoomParams.panY + (-1 * turtlePos[1]) * panZoomParams.scale, + 7, + 0, + 2 * Math.PI + ); + ctx.strokeStyle = "white"; + ctx.stroke(); + ctx.fillStyle = "#ffa500"; + ctx.fill(); + + ctx.strokeStyle = "black"; + ctx.lineWidth = 1.5; + ctx.lineJoin = "round"; + ctx.lineCap = "round"; + + // turtle path + // if(turtles.length === 0) return; + const { panX, panY, scale } = panZoomParams; + + ctx.beginPath(); + + turtles.forEach(turtle => { + for (const polyline of turtle.path) { + for (let i = 0; i < polyline.length; i++) { + let [x, y] = polyline[i]; + x = panX + x * scale; + y = -panY + y * scale; + if (i === 0) ctx.moveTo(x, -y); + else ctx.lineTo(x, -y); + } + } + }) + + ctx.stroke(); + + ctx.setTransform(1, 0, 0, 1, 0, 0); // reset the transform matrix so we can set scale with a new dpr later + }, [canvasRef.current]); + + const onResize = useCallback(() => { + const canvas = canvasRef.current; + if(!canvas) return; + // resize canvas, taking the pixel density of the screen into account + dpr = window.devicePixelRatio || 1; + canvas.width = canvas.clientWidth * dpr; + canvas.height = canvas.clientHeight * dpr; + redraw(); + }, [canvasRef.current]); + + useEffect(() => { + onResize(); + window.addEventListener("resize", onResize); + return () => { + window.removeEventListener("resize", onResize); + } + }, [onResize]); + + useEffect(() => { + if(!canvasRef.current) return; + const ctx = canvasRef.current.getContext("2d")!; + ctx.imageSmoothingEnabled = false; + }, [canvasRef.current]); + + useEffect(() => { + onResize(); + }, [turtles, canvasRef.current, console, onResize]); + + // controls + + useEffect(() => { + if(!canvasRef.current) return; + const canvas = canvasRef.current; + + const onWheel = (e: WheelEvent) => { + e.preventDefault(); + + const ZOOM_SPEED = 0.02; + const MIN_ZOOM = 10; + const MAX_ZOOM = 1000; + + const { panX, panY, scale } = panZoomParams; + + const newScale = Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, scale + e.deltaY * -ZOOM_SPEED)); + + const br = canvas.getBoundingClientRect(); + const fixedPoint = { x: e.clientX - br.left, y: e.clientY - br.top }; + panZoomParams.panX = fixedPoint.x + (newScale / scale) * (panX - fixedPoint.x); + panZoomParams.panY = fixedPoint.y + (newScale / scale) * (panY - fixedPoint.y); + panZoomParams.scale = newScale; + + redraw(); + }; + + const onMouseMove = (e: MouseEvent) => { + if(e.buttons !== 1) return; + e.preventDefault(); + + panZoomParams.panX += e.movementX; + panZoomParams.panY += e.movementY; + + redraw(); + }; + + canvas.addEventListener("wheel", onWheel); + canvas.addEventListener("mousemove", onMouseMove); + + return () => { + canvas.removeEventListener("wheel", onWheel); + canvas.removeEventListener("mousemove", onMouseMove); + }; + }, [canvasRef.current, redraw]); + + return ( + + ) +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Toolbar.module.css b/src/apps/editor/src/components/Toolbar.module.css new file mode 100644 index 000000000..3c1e7217e --- /dev/null +++ b/src/apps/editor/src/components/Toolbar.module.css @@ -0,0 +1,74 @@ +.root { + display: flex; + background-color: var(--primary); + color: white; + padding: 0.25rem 0.5rem; + align-items: center; +} + +.heading { + font-size: 1.1rem; + padding: 0 0.25rem; +} + +.right { + flex: 1; + display: flex; + align-items: stretch; + justify-content: flex-end; +} + +.right > * { + display: flex; + align-items: center; + gap: 0.125rem; +} + +.settingsDropdown > * { + min-width: max-content; + width: 100%; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.icon { + display: inline-block; + width: 1.25rem; + height: 1.25rem; + fill: currentColor; +} + +.disconnectedIcon * { + fill: red; +} + +.connectedIcon * { + fill: lightgreen; +} + +.separator { + width: 1px; + margin: 0.25rem 0.125rem; + background-color: rgba(255, 255, 255, 0.2); +} + +.settingsWrapper { + position: relative; +} + +.settingsDropdown { + position: absolute; + top: 100%; + right: 0; + background-color: var(--primary); + color: white; + border-radius: 0.25rem; + /* box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2); */ + border: 1px solid rgba(255, 255, 255, 0.2); + z-index: 1; + padding: 0.25rem; + + display: flex; + flex-direction: column; +} \ No newline at end of file diff --git a/src/apps/editor/src/components/Toolbar.tsx b/src/apps/editor/src/components/Toolbar.tsx new file mode 100644 index 000000000..e88ec936f --- /dev/null +++ b/src/apps/editor/src/components/Toolbar.tsx @@ -0,0 +1,170 @@ +import { useEffect, useState } from "preact/hooks"; +import download from "../lib/download.ts"; +import runCode from "../lib/run.ts"; +import { loadCodeFromString, loadSerializedState, makeNewState, patchStore, serializeState, useStore } from "../lib/state.ts"; +import styles from "./Toolbar.module.css"; +import Button from "../ui/Button.tsx"; +import cx from "classnames"; +// import CheckmarkIcon from "../ui/CheckmarkIcon.tsx"; +import PlugIcon from "../ui/PlugIcon.tsx"; +import { connect, disconnect, runMachine, tryAutoConnect } from "../lib/machine.ts"; +import BrightnessContrastIcon from "../ui/BrightnessContrastIcon.tsx"; +import { Theme, patchSettings, useSettings } from "../lib/settings.ts"; +import SettingsIcon from "../ui/SettingsIcon.tsx"; +import KeyboardIcon from "../ui/KeyboardIcon.tsx"; + +export default function Toolbar() { + return ( +
+

Haxidraw

+ + + + + + +
+ ); +} + +function RunButton() { + // keyboard shortcut - shift+enter + useEffect(() => { + async function handleKeyDown(e: KeyboardEvent) { + if(e.shiftKey && e.key === "Enter") { + e.preventDefault(); + e.stopPropagation(); + await runCode(); + } + } + window.addEventListener("keydown", handleKeyDown); + return () => { + window.removeEventListener("keydown", handleKeyDown); + } + }, []); + + return ( + + ); +} + +function DownloadButton() { + const state = useStore(); + return ( + + ); +} + +function NewButton() { + return ( + + ) +} + +function OpenButton() { + return ( + + ); +} + +function MachineControls() { + const { inst, running } = useStore(["inst", "running"]); + + useEffect(() => { + tryAutoConnect(); + }, []); + + return ( +
+ {inst ? ( + <> + + {/* separator */} +
+ + + ) : ( + + )} +
+ ); +} + +function SettingsButton() { + const { theme, vimMode } = useSettings(["theme", "vimMode"]); + const [dropdownOpen, setDropdownOpen] = useState(false); + + useEffect(() => { + if(!dropdownOpen) return; + // make it so when you click anywhere else the dialog closes + function handleClick(e: MouseEvent) { + const target = e.target as HTMLElement; + if(!target.closest(`.${styles.settingsWrapper}`)) { + setDropdownOpen(false); + } + } + + window.addEventListener("click", handleClick); + return () => { + window.removeEventListener("click", handleClick); + }; + }, [dropdownOpen]); + + return ( +
+ + {dropdownOpen && ( +
+ + +
+ )} +
+ ) +} \ No newline at end of file diff --git a/src/apps/editor/src/env.d.ts b/src/apps/editor/src/env.d.ts new file mode 100644 index 000000000..f964fe0cf --- /dev/null +++ b/src/apps/editor/src/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/src/apps/editor/src/layouts/Layout.astro b/src/apps/editor/src/layouts/Layout.astro new file mode 100644 index 000000000..a61cc29d9 --- /dev/null +++ b/src/apps/editor/src/layouts/Layout.astro @@ -0,0 +1,24 @@ +--- +import "../ui/theme.css"; + +export interface Props { + title: string; +} + +const { title } = Astro.props; +--- + + + + + + + + + + {title} + + + + + \ No newline at end of file diff --git a/src/apps/editor/src/lib/codemirror/cmTheme.ts b/src/apps/editor/src/lib/codemirror/cmTheme.ts new file mode 100644 index 000000000..1ca01d80c --- /dev/null +++ b/src/apps/editor/src/lib/codemirror/cmTheme.ts @@ -0,0 +1,22 @@ +import { Compartment } from "@codemirror/state"; +import { basicDark } from "cm6-theme-basic-dark"; +import type { EditorView } from "@codemirror/view"; +import { useEffect } from "preact/hooks"; +import { Theme, getSettings, useSettings } from "../settings.ts"; + +const getCMThemeExtension = (theme: Theme) => theme === Theme.Dark ? basicDark : []; + +const themeCompartment = new Compartment(); +export const themeExtension = () => themeCompartment.of(getCMThemeExtension(getSettings().theme)); + +export function useCMTheme(view: EditorView | undefined) { + const { theme } = useSettings(["theme"]); + + useEffect(() => { + // update cm theme by adding or removing the extension + if(!view) return; + view.dispatch({ + effects: themeCompartment.reconfigure(getCMThemeExtension(theme)) + }); + }, [theme]); +} \ No newline at end of file diff --git a/src/apps/editor/src/lib/codemirror/cmVimMode.ts b/src/apps/editor/src/lib/codemirror/cmVimMode.ts new file mode 100644 index 000000000..5b88133a2 --- /dev/null +++ b/src/apps/editor/src/lib/codemirror/cmVimMode.ts @@ -0,0 +1,19 @@ +import { Compartment } from "@codemirror/state"; +import { getSettings, useSettings } from "../settings.ts"; +import { vim } from "@replit/codemirror-vim"; +import type { EditorView } from "@codemirror/view"; +import { useEffect } from "preact/hooks"; + +const vimModeCompartment = new Compartment(); +export const vimModeExtension = () => vimModeCompartment.of(getSettings().vimMode ? vim() : []); + +export function useVimMode(view: EditorView | undefined) { + const { vimMode } = useSettings(["vimMode"]); + + useEffect(() => { + if(!view) return; + view.dispatch({ + effects: vimModeCompartment.reconfigure(vimMode ? vim() : []) + }); + }, [vimMode]); +} \ No newline at end of file diff --git a/src/apps/editor/src/lib/codemirror/numberScrubbing.ts b/src/apps/editor/src/lib/codemirror/numberScrubbing.ts new file mode 100644 index 000000000..eca04cb21 --- /dev/null +++ b/src/apps/editor/src/lib/codemirror/numberScrubbing.ts @@ -0,0 +1,140 @@ +import { syntaxTree } from "@codemirror/language"; +import type { Range } from "@codemirror/state"; +import { Decoration, DecorationSet, EditorView, ViewPlugin, ViewUpdate } from "@codemirror/view"; +import type { TreeCursor, SyntaxNode } from "@lezer/common"; +import runCode, { liveUpdateBundle, manualChangeSinceLiveUpdate } from "../run.js"; +import type { CodePosition } from "../state.js"; +import { liveUpdating } from "../../components/CodeMirror.js"; + +function numberScrubbers(view: EditorView): DecorationSet { + const decos: Range[] = []; + for(const { from, to } of view.visibleRanges) { + syntaxTree(view.state).iterate({ + from, to, + enter: (cur: TreeCursor) => { + if(cur.name === "Number") { + const parent: SyntaxNode = cur.node.parent; + + const from = + parent.name === "UnaryExpression" && + parent.firstChild.name === "ArithOp" && + view.state.doc.sliceString( + parent.firstChild.from, + parent.firstChild.to + ) === "-" + ? parent.from + : cur.from; + + // console.log(node, node.from, node.to, node.parent()?.name); + const deco = Decoration.mark({ + tagName: "span", + class: "cm-number-scrubber", + attributes: { + "data-from": from, + "data-to": cur.to + } + }); + decos.push(deco.range(from, cur.to)); + } + } + }); + } + + return Decoration.set(decos); +} + +export const numberScrubbingPlugin = ViewPlugin.fromClass(class { + decorations: DecorationSet; + // dragging: boolean = false; + #dragging: boolean = false; + get dragging() { return this.#dragging; } + set dragging(val) { + const old = this.#dragging; + this.#dragging = val; + if(!val && old) { + // rebuild + runCode(); + liveUpdating.value = false; + } + } + from: number = 0; + to: number = 0; + origTo: number = 0; + num: number = 0; + sigfigs: number = 0; + isRunning: boolean = false; + + constructor(view: EditorView) { + this.decorations = numberScrubbers(view); + } + + update(update: ViewUpdate) { + if(update.docChanged || update.viewportChanged) { + this.decorations = numberScrubbers(update.view); + } + } +}, { + decorations: v => v.decorations, + eventHandlers: { + mousedown(e, view) { + const target = e.target as HTMLElement; + const ns = target.closest(".cm-number-scrubber"); + if(ns) { + this.from = Number(ns.dataset.from); + this.to = Number(ns.dataset.to); + this.origTo = this.to; + this.dragging = true; + const numStr = view.state.doc.sliceString(this.from, this.to).replaceAll(" ", "") /* handle numbers like `- 5` */; + this.num = Number(numStr); + this.sigfigs = numStr.split(".")[1]?.length ?? 0; + } + }, + mouseup(e, view) { + this.dragging = false; + }, + mousemove(e, view) { + if(!this.dragging) return false; + + // if we're not clicking, end dragging + if(e.buttons === 0) { + this.dragging = false; + return false; + } + + e.preventDefault(); + e.stopPropagation(); + + liveUpdating.value = true; + + this.num += this.sigfigs ? e.movementX * 10**(-1 * this.sigfigs) : e.movementX; + const newValue = this.num.toFixed(this.sigfigs); + + view.dispatch({ + changes: [{ + from: this.from, + to: this.to, + insert: newValue + }] + }); + + if(this.to - this.from !== newValue.length) { + this.to += newValue.length - (this.to - this.from); + } + + if(!this.isRunning) { + this.isRunning = true; + liveUpdateBundle(...([this.from, this.origTo].map(offset => { + const cmLine = view.state.doc.lineAt(offset); + return { + line: cmLine.number, + column: offset - cmLine.from + }; + }) as [CodePosition, CodePosition]), newValue).then(async () => { await runCode(true); this.isRunning = false; }); + } + + manualChangeSinceLiveUpdate.value = false; + + return true; + } + } +}); \ No newline at end of file diff --git a/src/apps/editor/src/lib/download.ts b/src/apps/editor/src/lib/download.ts new file mode 100644 index 000000000..e35b6136d --- /dev/null +++ b/src/apps/editor/src/lib/download.ts @@ -0,0 +1,9 @@ +export default function download(filename: string, text: string) { + const blob = new Blob([text], { type: "text/plain" }); + + const link = document.createElement("a"); // Or maybe get it from the current document + link.href = URL.createObjectURL(blob); + link.download = `${filename}`; + link.click(); + URL.revokeObjectURL(link.href); +} \ No newline at end of file diff --git a/src/apps/editor/src/lib/events.ts b/src/apps/editor/src/lib/events.ts new file mode 100644 index 000000000..93d6bc2e6 --- /dev/null +++ b/src/apps/editor/src/lib/events.ts @@ -0,0 +1,4 @@ +import { createEvent } from "niue"; + +// used for auto backup, dispatched on every change to editor content +export const [useOnEditorChange, dispatchEditorChange] = createEvent(); \ No newline at end of file diff --git a/src/apps/editor/src/lib/machine.ts b/src/apps/editor/src/lib/machine.ts new file mode 100644 index 000000000..e2876f34b --- /dev/null +++ b/src/apps/editor/src/lib/machine.ts @@ -0,0 +1,61 @@ +import { Point, createHaxidraw } from "haxidraw-client"; +import { getStore, patchStore } from "./state.ts"; +import { sleep } from "./run.ts"; + +export async function connect() { + if(getStore().inst) throw new Error("Already connected to an instance"); + const port = await navigator.serial.requestPort(); + const inst = await createHaxidraw(port); + + patchStore({ + inst + }); +} + +export async function disconnect() { + if(!getStore().inst) throw new Error("Not connected to an instance"); + const { inst } = getStore(); + inst!.close(); + patchStore({ + inst: null + }); +} + +export async function tryAutoConnect() { + const p = (await navigator.serial.getPorts()).find(p => p.getInfo().usbVendorId === 11914); + if(!p) return; + patchStore({ + inst: await createHaxidraw(p) + }); +} + +export async function runMachine(scaleX: number = 1, scaleY: number = 1) { + patchStore({ running: true }); + try { + const { inst, turtles } = getStore(); + if(!inst) throw new Error("Not connected to an instance"); + + const goToScaled = async (...[x, y]: Point) => await inst.goTo(x * scaleX, y * scaleY); + + await inst.servo(1000); + await sleep(200); + + const polylines = turtles.map(t => t.path).flat(); + for(const polyline of polylines) { + const [p0, p1] = polyline; + await inst.servo(1000); + await sleep(200); + await goToScaled(...p0); + + await inst.servo(1700); + await sleep(100); + await goToScaled(...p1); + } + + await inst.servo(1000); + await sleep(200); + await inst.goTo(0, 0); + } finally { + patchStore({ running: false }); + } +} \ No newline at end of file diff --git a/src/apps/editor/src/lib/run.ts b/src/apps/editor/src/lib/run.ts new file mode 100644 index 000000000..3a7d621de --- /dev/null +++ b/src/apps/editor/src/lib/run.ts @@ -0,0 +1,313 @@ +// haxidraw code runtime environment + +import { CodePosition, ErrorState, getStore, patchStore } from "./state.ts"; +import { RollupError, rollup } from "@rollup/browser"; +import { Turtle as BaseTurtle, Point } from "haxidraw-client"; +import * as drawingUtils from "haxidraw-client/utils"; +import { type FindPosition, SourceMapConsumer } from "source-map-js"; + +let intervals: number[] = []; +let timeouts: number[] = []; +let loops: boolean[] = []; + +// https://stackoverflow.com/a/62507199 +// what a beautiful solution to this problem +const resolvePath = (path: string) => ( + path.split("/") + .reduce((a, v) => { + if(v === ".") {} // do nothing + else if(v === "..") { + if(a.pop() === undefined) throw new Error(`Unable to resolve path: ${path}`) + } else a.push(v); + return a; + }, []) + .join("/") +); + +// not very good, but it works +const isURL = (id: string) => ["http://", "https://"].find(s => id.startsWith(s)); + +async function getBundle(): Promise { + const { code } = getStore(); + + const build = await rollup({ + input: "/index.js", + plugins: [ + { + name: "fs-resolver", + resolveId(source, importer) { + if(["./", "../"].find(s => source.startsWith(s))) { + if(importer) { + const s = importer.split("/"); + s.pop(); + importer = s.join("/"); + return resolvePath(importer + "/" + source); + } + return resolvePath(source); + } else if(source.startsWith("/")) { + if(importer && isURL(importer)) { + const url = new URL(importer); + return resolvePath(url.origin + source); + } + return resolvePath(source); + } else if(isURL(source)){ + return source; + } + return { id: source, external: true }; + }, + async load(id) { + if(isURL(id)) { + const res = await fetch(id); + return await res.text(); + } else if(id === "/index.js") { + return code.content; + } + return null; + } + } + ] + }); + const bundle = await build.generate({ + format: "iife", + sourcemap: "inline", + inlineDynamicImports: true + }); + return bundle.output[0].code; +} + +const getPosFromStackLine = (line: string): CodePosition | undefined => { + const match = line.match(/:(\d+):(\d+)(?![^\n]*:)/gm); + if(match) { + const groups = match[0].match(/:(\d+):(\d+)/); + if(!groups) return; + return { line: Number(groups[1]) - 2, column: Number(groups[2]) }; + } else return; +}; + +const AsyncFunction = Object.getPrototypeOf(async function () { }).constructor; +export const sleep = (ms: number) => new Promise((resolve) => window.setTimeout(resolve, ms)); + +const getActualFirstStackLine = (lines: string[]) => { + let i = 0; while(!["", "AsyncFunction"].find(e => lines[i].includes(e))) i++; + return i; +}; + +function decodeUnicodeBase64(base64: string) { + const binString = atob(base64); + const bytes = Uint8Array.from(binString, m => m.codePointAt(0)!); + return new TextDecoder().decode(bytes); +} + +const getSourceMapConsumer = (code: string) => { + const sourcemap = JSON.parse(decodeUnicodeBase64(code.match(/\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([A-Za-z0-9+\/=]+)/)![1])); + return new SourceMapConsumer(sourcemap); +}; + +let origBundle: string | null = null; +let bundle: string | null = null; +let smc: SourceMapConsumer | null = null; + +async function build() { + console.log("full rebuild"); + try { + origBundle = bundle = await getBundle(); + smc = getSourceMapConsumer(bundle!); + return true; + } catch(caught: any) { + if(caught.name !== "RollupError" || !caught.cause) throw caught; + const err = (caught as RollupError).cause as RollupError; + if(!err || !err.loc) throw err; + // rollup error - probably a syntax error + + patchStore({ + turtles: [], + turtlePos: [0, 0], + error: { + stack: [{ + line: err.loc.line, + column: err.loc.column + }], + code: getStore().code.content, + name: err.name ?? caught.name, + message: err.message.replace(/\((\d+):(\d+)(?![^\n]*:)\)/gm, "").trim() + } + }); + + return false; + } +} + +export const manualChangeSinceLiveUpdate = { + value: false +}; + +const lineColToStringPos = (str: string, line: number, col: number) => { + return str.split("\n").slice(0, line - 1).map(l => l.length).reduce((a, c) => a + 1 + c, -1) + col + 1; +} + +export async function liveUpdateBundle(from: CodePosition, to: CodePosition, replaceWith: string) { + if(manualChangeSinceLiveUpdate.value || !origBundle) { await build(); return; } + console.log("attempting live update"); + + const bundlePos = [from, to] + .map(p => ({ ...p, source: "index.js" })) + .map(p => smc!.generatedPositionFor(p)) + .map(p => lineColToStringPos(origBundle!, p.line, p.column)); + + bundle = origBundle!.slice(0, bundlePos[0]) + replaceWith + origBundle!.slice(bundlePos[1]); + console.log(bundle); +} + +export default async function runCode(cached: boolean = false) { + const turtles: Turtle[] = []; + let turtlePos: Point = [0, 0]; + let errorState: ErrorState | null = null; + + if(!cached && !(await build())) return; + // console.debug(bundle); + + intervals.forEach(clearInterval); + timeouts.forEach(clearTimeout); + loops.forEach((_, i) => { + loops[i] = false; + }); + + const patchedInterval = (callback: (...args: any[]) => void, time: number, ...args: any[]) => { + const interval = window.setInterval(callback, time, ...args); + intervals.push(interval); + return interval; + }; + + const patchedTimeout = (callback: (...args: any[]) => void, time: number, ...args: any[]) => { + const timeout = window.setTimeout(callback, time, ...args); + timeouts.push(timeout); + return timeout; + }; + + const loop = async (fn: (...args: any) => any, minterval = 0) => { + let n = loops.length; + loops.push(true); + while (loops[n]) { + const date = new Date(); + const start = date.getTime(); + await fn(); + const elapsed = date.getTime() - start; + if (elapsed < minterval) await sleep(minterval - elapsed); + } + }; + + class Turtle extends BaseTurtle { + constructor() { + super(); + turtles.push(this); + } + goto([x, y]: Point): this { + turtlePos = [x, y]; + return super.goto([x, y]); + } + } + + const baseLogger = (type: "log" | "error" | "warn", ...args: [any, ...any[]]) => { + console[type](...args); + + // get code location + const stackLines = new Error().stack!.split("\n"); + const mappedPos = getPosFromStackLine(stackLines[getActualFirstStackLine(stackLines)]); // zeroth is line in baselogger, first is call to baseLogger, second is call to actual log function (although getActual gets the first one from the actual eval'ed function so we don't need to worry about this) + const pos = mappedPos && smc!.originalPositionFor(mappedPos); + + patchStore({ + console: [ + ...getStore().console, + { + type, + pos, + time: Number(new Date()), + values: args + } + ] + }); + }; + + const hConsole = { + log: (...args: [any, ...any[]]) => baseLogger("log", ...args), + error: (...args: [any, ...any[]]) => baseLogger("error", ...args), + warn: (...args: [any, ...any[]]) => baseLogger("warn", ...args) + }; + + // inject items into global scope, or replace existing properties with our own + const customGlobal = { + setTimeout: patchedTimeout, + setInterval: patchedInterval, + loop, + sleep, + // drawing functions + Turtle, + console: hConsole, + ...drawingUtils, + lerp(start: number, end: number, t: number) { + return (1 - t) * start + t * end; + }, + // compat - not actually necessary + drawTurtles: function noop() {} + }; + + const globalProxy = new Proxy(window, { + get: (w, prop) => ( + //@ts-ignore + prop in customGlobal ? customGlobal[prop] : w[prop].bind(w) + ) + }); + + const args = { + ...customGlobal, + global: globalProxy, + globalThis: globalProxy, + window: globalProxy + } + + const names = Object.keys(args); + const values = Object.values(args); + + const f = new AsyncFunction( + ...names, + "await (async " + bundle!.slice(1) + ); + + // console.log(f, f.toString()); + + patchStore({ + console: [] + }); + + try { + await f( + ...values + ); + } catch(err: any) { + // extract actual position from sourcemap + // stack trace parsing time + const stackLines: string[] = err.stack.split("\n"); + let i = getActualFirstStackLine(stackLines); + let positions: FindPosition[] = []; + do { + const line = stackLines[i]; + const pos = getPosFromStackLine(line); + if(!pos) break; + positions.push(pos); + i++; + } while(i < stackLines.length && [0, 1 /* iife call */, 2 /* AsyncFunction call */].map(n => stackLines[i + n]).every(l => l && l.includes("run.ts"))); + const mapped = positions.map(smc!.originalPositionFor.bind(smc)); + errorState = { + stack: mapped, + code: getStore().code.content, + name: err.name, + message: err.message + }; + } + + patchStore({ + turtles, + turtlePos, + error: errorState + }); +} diff --git a/src/apps/editor/src/lib/settings.ts b/src/apps/editor/src/lib/settings.ts new file mode 100644 index 000000000..cc0de6d69 --- /dev/null +++ b/src/apps/editor/src/lib/settings.ts @@ -0,0 +1,43 @@ +import { createState } from "niue"; + +export enum Theme { + Light, + Dark +} + +type Settings = { + theme: Theme, + vimMode: boolean +}; + +const getSettingsFromLS = (): Settings => typeof window === "undefined" ? { + theme: Theme.Light, + vimMode: false +} : { + theme: Number(localStorage.getItem("colorTheme")) ?? window.matchMedia("(prefers-color-scheme: dark)") ? Theme.Dark : Theme.Light, + vimMode: localStorage.getItem("vimMode") === "true" +}; + +const updateBodyTheme = (theme: Theme) => { document.body.dataset.theme = Theme[theme] }; + +const settingsStore = createState(getSettingsFromLS()); + +export const [useSettings, , getSettings] = settingsStore; + +if(typeof window !== "undefined") { + updateBodyTheme(getSettings().theme); +} + +const [, _patchSettings] = settingsStore; + +export const patchSettings = (...args: Parameters) => { + const oldTheme = getSettings().theme; + _patchSettings(...args); + // update ls + const settings = getSettings(); + if(settings.theme !== oldTheme) { + updateBodyTheme(settings.theme); + } + localStorage.setItem("colorTheme", settings.theme.toString()); + localStorage.setItem("vimMode", settings.vimMode.toString()); +}; \ No newline at end of file diff --git a/src/apps/editor/src/lib/state.ts b/src/apps/editor/src/lib/state.ts new file mode 100644 index 000000000..09917df06 --- /dev/null +++ b/src/apps/editor/src/lib/state.ts @@ -0,0 +1,125 @@ +import type { EditorState } from "@codemirror/state"; +import { createState } from "niue"; +import { createCMState, deserializeCMState } from "../components/CodeMirror.tsx"; +import type { Haxidraw, Turtle, Point } from "haxidraw-client"; + +export type CodeState = { + content: string, + cmState: EditorState +}; + +export type CodePosition = { + line: number, + column: number +} + +export type ErrorState = { + stack: CodePosition[], + code: string, + name: string, + message: string +}; + +export type ConsoleMessage = { + values: [any, ...any[]], + type: "log" | "error" | "warn", + time: number, + pos?: CodePosition +}; + +export type GlobalState = { + code: CodeState, + inst: Haxidraw | null, + turtles: Turtle[], + turtlePos: Point | null, + error: ErrorState | null, + console: ConsoleMessage[], + running: boolean +}; + +export const makeNewState = (): GlobalState => { + const initialContent = `// welcome to haxidraw! + +const t = new Turtle(); + +for(let i = 0; i < 72; i++) { + t.forward(5); + t.left(85); +}` + + return { + code: { + content: initialContent, + cmState: createCMState(initialContent) + }, + inst: null, + turtles: [], + turtlePos: null, + error: null, + console: [], + running: false + }; +}; + +export type SerializedCodeState = { + content: string, + cmState: any +}; + +export type SerializedGlobalState = { + code: SerializedCodeState, + error: ErrorState | null, + formatVersion: 0 +}; + +export const serializeState = (state: GlobalState): SerializedGlobalState => { + return { + code: { + content: state.code.content, + cmState: state.code.cmState.toJSON() + }, + error: state.error, + formatVersion: 0 + }; +} + +export function loadSerializedState(state: SerializedGlobalState) { + patchStore(deserializeState(state)); +} + +export function loadCodeFromString(code: string) { + patchStore({ + code: { + content: code, + cmState: createCMState(code) + } + }); +} + +const deserializeState = (state: SerializedGlobalState): GlobalState => { + const code = deserializeCode(state.code); + return { + code, + inst: null, + turtles: [], + turtlePos: null, + error: state.error, + console: [], + running: false + }; +} + +function deserializeCode(serializedState: SerializedCodeState): CodeState { + return { + content: serializedState.content, + cmState: deserializeCMState(serializedState.cmState) + }; +} + + +const backup = typeof window !== "undefined" && localStorage.getItem("backup"); +const initialState = backup ? deserializeState(JSON.parse(backup)) : makeNewState(); + +export const [useStore, patchStore, getStore] = createState({ + ...initialState +} as GlobalState); diff --git a/src/apps/editor/src/pages/index.astro b/src/apps/editor/src/pages/index.astro new file mode 100644 index 000000000..cbb30c8f0 --- /dev/null +++ b/src/apps/editor/src/pages/index.astro @@ -0,0 +1,10 @@ +--- +import Layout from '../layouts/Layout.astro'; +import Editor from '../Editor.tsx'; +--- + + +
+ +
+
\ No newline at end of file diff --git a/src/apps/editor/src/ui/BrightnessContrastIcon.tsx b/src/apps/editor/src/ui/BrightnessContrastIcon.tsx new file mode 100644 index 000000000..23a679678 --- /dev/null +++ b/src/apps/editor/src/ui/BrightnessContrastIcon.tsx @@ -0,0 +1,39 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function BrightnessContrastIcon(props: { className?: string }) { + return ( + + + + + + + + + + + + ); +} diff --git a/src/apps/editor/src/ui/Button.module.css b/src/apps/editor/src/ui/Button.module.css new file mode 100644 index 000000000..c83c896f0 --- /dev/null +++ b/src/apps/editor/src/ui/Button.module.css @@ -0,0 +1,95 @@ +.button { + box-sizing: border-box; + margin: 0; + min-width: 0; + appearance: none; + display: inline-block; + text-align: center; + line-height: inherit; + text-decoration: none; + font-size: inherit; + padding-left: 16px; + padding-right: 16px; + padding-top: 8px; + padding-bottom: 8px; + color: white; + background-color: var(--primary); + border: 0; + border-radius: 4px; + transition: all 0.1s ease-in-out; +} + +.secondary { + color: var(--text); + background-color: var(--muted); +} +.secondary:hover, .icon:hover { + filter: brightness(0.9); +} + +.button:disabled { + cursor: not-allowed; + opacity: 0.6; +} + +.button.loading { + cursor: wait; + animation: shimmer 2.2s linear infinite forwards; + background-image: linear-gradient( + to right, + transparent 8%, + #ffffffa1 18%, + transparent 33% + ); + background-size: 1200px 100%; +} + + +.accent { + background: var(--accent); +} + +.accent:not(:disabled):hover { + background: var(--accent-dark); +} + +.ghost { + border: none; + background-color: transparent; + color: inherit; +} + +.ghost:hover { + background-color: rgba(255, 255, 255, 0.1); +} + +.icon { + padding: 8px; + display: flex; + align-items: center; + justify-content: center; +} + +.icon svg { + width: 1.25rem; + fill: currentColor; + display: inline; +} + +@keyframes shimmer { + 0% { + background-position: -1200px 0; + } + 100% { + background-position: 1200px 0; + } +} + +@keyframes spin { + 0% { + transform: var(--base-transform) rotate(0deg); + } + 100% { + transform: var(--base-transform) rotate(360deg); + } +} diff --git a/src/apps/editor/src/ui/Button.tsx b/src/apps/editor/src/ui/Button.tsx new file mode 100644 index 000000000..4b6b7e643 --- /dev/null +++ b/src/apps/editor/src/ui/Button.tsx @@ -0,0 +1,43 @@ +import styles from "./Button.module.css"; +import type { ComponentChild, JSX } from "preact"; +import cx from "classnames"; + +type ButtonProps = { + type?: "button" | "submit" | "reset", + variant?: "primary" | "secondary" | "accent" | "ghost", + icon?: boolean, + class?: string | undefined, + disabled?: boolean, + loading?: boolean, + children?: ComponentChild, + role?: JSX.HTMLAttributes["role"], + onClick?: () => void +} & ( + { + icon: true, + "aria-label": string + } | { + icon?: false + } +) + +export default function Button(props: ButtonProps) { + return ( + + ); +} diff --git a/src/apps/editor/src/ui/CheckmarkIcon.tsx b/src/apps/editor/src/ui/CheckmarkIcon.tsx new file mode 100644 index 000000000..88f004377 --- /dev/null +++ b/src/apps/editor/src/ui/CheckmarkIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function CheckmarkIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/Dialog.module.css b/src/apps/editor/src/ui/Dialog.module.css new file mode 100644 index 000000000..84d78e318 --- /dev/null +++ b/src/apps/editor/src/ui/Dialog.module.css @@ -0,0 +1,26 @@ +.root { + position: fixed; + inset: 0; + z-index: 100; + background-color: rgba(0, 0, 0, 0.2); + display: flex; + align-items: center; + justify-content: center; +} + +.box { + background-color: white; + border-radius: 0.25rem; + padding: 1rem; + margin-left: 1rem; + margin-right: 1rem; + max-width: 35rem; + display: flex; + flex-direction: column; + gap: 1rem; +} + +.actions { + display: flex; + justify-content: flex-end; +} \ No newline at end of file diff --git a/src/apps/editor/src/ui/Dialog.tsx b/src/apps/editor/src/ui/Dialog.tsx new file mode 100644 index 000000000..572e0c9ff --- /dev/null +++ b/src/apps/editor/src/ui/Dialog.tsx @@ -0,0 +1,51 @@ +import { useCallback, useEffect, useMemo } from "preact/hooks"; +import styles from "./Dialog.module.css"; +import cx from "classnames"; +import { nanoid } from "nanoid"; +import type { VNode } from "preact"; + +type DialogProps = { + title: string, + className?: string, + children: React.ReactNode, + show: boolean, + actions: VNode, + close: () => void +}; + +export default function Dialog({ show, className, title, children, actions, close }: DialogProps) { + const id = useMemo(() => nanoid(), []); + + const keyHandler = useCallback(() => { + close(); + }, []); + + useEffect(() => { + if(show) { + window.addEventListener("keydown", keyHandler); + } else { + window.removeEventListener("keydown", keyHandler); + } + return () => { + window.removeEventListener("keydown", keyHandler); + } + }, [show, keyHandler]); + + return show ? ( +
{ + if(e.key === "Escape") { + close(); + } + }} onClickCapture={e => { + if(e.target === e.currentTarget) { + close(); + } + }}> + +
+ ) : null; +} \ No newline at end of file diff --git a/src/apps/editor/src/ui/JumpLinkIcon.tsx b/src/apps/editor/src/ui/JumpLinkIcon.tsx new file mode 100644 index 000000000..86ae35c92 --- /dev/null +++ b/src/apps/editor/src/ui/JumpLinkIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function JumpLinkIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/KeyboardIcon.tsx b/src/apps/editor/src/ui/KeyboardIcon.tsx new file mode 100644 index 000000000..9589caf6b --- /dev/null +++ b/src/apps/editor/src/ui/KeyboardIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function KeyboardIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/PlugIcon.tsx b/src/apps/editor/src/ui/PlugIcon.tsx new file mode 100644 index 000000000..221c6e864 --- /dev/null +++ b/src/apps/editor/src/ui/PlugIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function PlugIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/SettingsIcon.tsx b/src/apps/editor/src/ui/SettingsIcon.tsx new file mode 100644 index 000000000..49391f9ad --- /dev/null +++ b/src/apps/editor/src/ui/SettingsIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function SettingsIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/TrashCanIcon.tsx b/src/apps/editor/src/ui/TrashCanIcon.tsx new file mode 100644 index 000000000..82a3470b7 --- /dev/null +++ b/src/apps/editor/src/ui/TrashCanIcon.tsx @@ -0,0 +1,9 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function TrashCanIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/XIcon.tsx b/src/apps/editor/src/ui/XIcon.tsx new file mode 100644 index 000000000..086be4376 --- /dev/null +++ b/src/apps/editor/src/ui/XIcon.tsx @@ -0,0 +1,11 @@ +// taken from https://carbondesignsystem.com/guidelines/icons/library/ + +export default function XIcon(props: { className?: string }) { + return ( + + + + ); +} diff --git a/src/apps/editor/src/ui/theme.css b/src/apps/editor/src/ui/theme.css new file mode 100644 index 000000000..8b901533c --- /dev/null +++ b/src/apps/editor/src/ui/theme.css @@ -0,0 +1,81 @@ +@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=JetBrains+Mono:ital@0;1&display=swap'); + +:root { + --primary: #33e; + --primary-rgb: 51, 51, 238; + --text: #000; + --text-rgb: 0, 0, 0; + --background: #fff; + --background-rgb: 255, 255, 255; + --muted: #e5e5e5; + --muted-rgb: 229, 229, 229; + --accent: #f0f; + --accent-rgb: 255, 0, 255; + --accent-dark: #900090; + --accent-dark-rgb: 144, 0, 144; + --font-body: "Atkinson Hyperlegible", sans-serif; + --font-mono: "JetBrains Mono", monospace; + + --font-0: 1rem; + --font-1: 1.125rem; + --font-2: 1.25rem; + --font-3: 1.5rem; + --font-4: 2rem; + --font-5: 3rem; + --font-6: 4rem; + --font-7: 6rem; +} + +body { + font-family: var(--font-body); + font-size: var(--font-0); + min-height: 100vh; + margin: 0; +} + +body[data-theme=Dark] { + --background: #292d30; + --background-rgb: 41, 45, 48; + --text: #fff; + --text-rgb: 255, 255, 255; + background-color: var(--background); +} + +* { + font-family: inherit; + box-sizing: border-box; +} + +h1, h2, h3, h4, h5, h6, p, pre { + margin: 0; +} + +h1 { + font-size: var(--font-4); +} + +h2 { + font-size: var(--font-3); +} + +h3 { + font-size: var(--font-2); +} + +h4 { + font-size: var(--font-1); +} + +h5 { + font-size: var(--font-0); + color: var(--primary); +} + +h6 { + font-size: 0.9rem; + font-weight: 500; +} + +pre, code { + font-family: var(--font-mono); +} diff --git a/src/apps/editor/tsconfig.json b/src/apps/editor/tsconfig.json new file mode 100644 index 000000000..d305a4a72 --- /dev/null +++ b/src/apps/editor/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "astro/tsconfigs/strict", + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "preact", + "lib": ["ES2015"], + "moduleResolution": "NodeNext", + "allowImportingTsExtensions": true, + "target": "ES2020", + // "paths": { + // "@/*": ["./src/*"] + // } + // "paths": { + // "react": ["./node_modules/preact/compat/"], + // "react-dom": ["./node_modules/preact/compat/"] + // } + } +} \ No newline at end of file diff --git a/src/package.json b/src/package.json new file mode 100644 index 000000000..a19032ae5 --- /dev/null +++ b/src/package.json @@ -0,0 +1,26 @@ +{ + "private": true, + "scripts": { + "build": "turbo run build", + "dev": "turbo run dev", + "lint": "turbo run lint", + "format": "prettier --write \"**/*.{ts,tsx,md}\"" + }, + "devDependencies": { + "@turbo/gen": "^1.9.7", + "eslint": "^7.32.0", + "eslint-config-custom": "*", + "prettier": "^2.5.1", + "turbo": "latest", + "typescript": "^5.1.6" + }, + "name": "haxidraw", + "packageManager": "yarn@3.6.1", + "workspaces": [ + "apps/*", + "packages/*" + ], + "resolutions": { + "@rollup/browser@^3.26.0": "patch:@rollup/browser@npm%3A3.26.2#./.yarn/patches/@rollup-browser-npm-3.26.2-ec96fc6979.patch" + } +} diff --git a/src/packages/eslint-config-custom/index.js b/src/packages/eslint-config-custom/index.js new file mode 100644 index 000000000..c9523f13c --- /dev/null +++ b/src/packages/eslint-config-custom/index.js @@ -0,0 +1,11 @@ +module.exports = { + extends: ["next", "turbo", "prettier"], + rules: { + "@next/next/no-html-link-for-pages": "off", + }, + parserOptions: { + babelOptions: { + presets: [require.resolve("next/babel")], + }, + }, +}; diff --git a/src/packages/eslint-config-custom/package.json b/src/packages/eslint-config-custom/package.json new file mode 100644 index 000000000..94c0543c2 --- /dev/null +++ b/src/packages/eslint-config-custom/package.json @@ -0,0 +1,15 @@ +{ + "name": "eslint-config-custom", + "version": "0.0.0", + "main": "index.js", + "license": "MIT", + "dependencies": { + "eslint-config-next": "^13.4.1", + "eslint-config-prettier": "^8.3.0", + "eslint-config-turbo": "^1.9.3", + "eslint-plugin-react": "7.28.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/src/packages/haxidraw-client/.gitignore b/src/packages/haxidraw-client/.gitignore new file mode 100644 index 000000000..4c9d7c35a --- /dev/null +++ b/src/packages/haxidraw-client/.gitignore @@ -0,0 +1,4 @@ +*.log +.DS_Store +node_modules +dist diff --git a/src/packages/haxidraw-client/.prettierrc.json b/src/packages/haxidraw-client/.prettierrc.json new file mode 100644 index 000000000..cb1368802 --- /dev/null +++ b/src/packages/haxidraw-client/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "useTabs": false, + "trailingComma": "none", + "semi": true, + "singleQuote": false, + "tabWidth": 4 +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/LICENSE b/src/packages/haxidraw-client/LICENSE new file mode 100644 index 000000000..169e4ed1d --- /dev/null +++ b/src/packages/haxidraw-client/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Merlin04 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/packages/haxidraw-client/README.md b/src/packages/haxidraw-client/README.md new file mode 100644 index 000000000..e6c3f8144 --- /dev/null +++ b/src/packages/haxidraw-client/README.md @@ -0,0 +1,103 @@ +# DTS User Guide + +Congrats! You just saved yourself hours of work by bootstrapping this project with DTS. Let’s get you oriented with what’s here and how to use it. + +> This DTS setup is meant for developing libraries (not apps!) that can be published to NPM. If you’re looking to build a Node app, you could use `ts-node-dev`, plain `ts-node`, or simple `tsc`. + +> If you’re new to TypeScript, checkout [this handy cheatsheet](https://devhints.io/typescript) + +## Commands + +DTS scaffolds your new library inside `/src`. + +To run DTS, use: + +```bash +npm start # or yarn start +``` + +This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`. + +To do a one-off build, use `npm run build` or `yarn build`. + +To run tests, use `npm test` or `yarn test`. + +## Configuration + +Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly. + +### Jest + +Jest tests are set up to run with `npm test` or `yarn test`. + +### Bundle Analysis + +[`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`. + +#### Setup Files + +This is the folder structure we set up for you: + +```txt +/src + index.ts # EDIT THIS +/test + index.test.ts # EDIT THIS +.gitignore +package.json +README.md # EDIT THIS +tsconfig.json +``` + +### Rollup + +DTS uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details. + +### TypeScript + +`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs. + +## Continuous Integration + +### GitHub Actions + +Two actions are added by default: + +- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix +- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit) + +## Optimizations + +Please see the main `dts` [optimizations docs](https://github.com/weiran-zsd/dts-cli#optimizations). In particular, know that you can take advantage of development-only optimizations: + +```js +// ./types/index.d.ts +declare var __DEV__: boolean; + +// inside your code... +if (__DEV__) { + console.log('foo'); +} +``` + +You can also choose to install and use [invariant](https://github.com/weiran-zsd/dts-cli#invariant) and [warning](https://github.com/weiran-zsd/dts-cli#warning) functions. + +## Module Formats + +CJS, ESModules, and UMD module formats are supported. + +The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found. + +## Named Exports + +Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library. + +## Including Styles + +There are many ways to ship styles, including with CSS-in-JS. DTS has no opinion on this, configure how you like. + +For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader. + +## Publishing to NPM + +We recommend using [np](https://github.com/sindresorhus/np). diff --git a/src/packages/haxidraw-client/package.json b/src/packages/haxidraw-client/package.json new file mode 100644 index 000000000..ff7b800bb --- /dev/null +++ b/src/packages/haxidraw-client/package.json @@ -0,0 +1,53 @@ +{ + "name": "haxidraw-client", + "version": "0.1.0", + "license": "MIT", + "author": "hackclub", + "main": "dist/index.js", + "module": "dist/haxidraw-client.esm.js", + "typings": "dist/index.d.ts", + "files": [ + "dist", + "src" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.js", + "default": "./dist/index.esm.js" + }, + "./utils": { + "types": "./dist/utils.d.ts", + "require": "./dist/utils.js", + "default": "./dist/utils.esm.js" + } + }, + "scripts": { + "analyze": "size-limit --why", + "build": "dts build --entry ./src/index.ts --entry ./src/utils.ts", + "lint": "dts lint", + "prepare": "dts build", + "size": "size-limit", + "dev": "dts watch --entry ./src/index.ts --entry ./src/utils.ts", + "test": "dts test" + }, + "jest": { + "testEnvironment": "node" + }, + "engines": { + "node": ">=12" + }, + "devDependencies": { + "@size-limit/preset-small-lib": "^8.2.6", + "@tsconfig/recommended": "^1.0.2", + "@types/w3c-web-serial": "^1.0.3", + "dts-cli": "^2.0.3", + "husky": "^8.0.3", + "size-limit": "^8.2.6", + "tslib": "^2.6.0", + "typescript": "^5.1.6" + }, + "dependencies": { + "@types/node": "^20.4.0" + } +} diff --git a/src/packages/haxidraw-client/src/comms/cobs.ts b/src/packages/haxidraw-client/src/comms/cobs.ts new file mode 100644 index 000000000..b881b42e5 --- /dev/null +++ b/src/packages/haxidraw-client/src/comms/cobs.ts @@ -0,0 +1,51 @@ +export function encode(buf: Uint8Array | number[]) { + const dest: number[] = [0]; + // vfpt starts @ 1, + let code_ptr = 0; + let code = 0x01; + + function finish(incllast?: boolean) { + dest[code_ptr] = code; + code_ptr = dest.length; + incllast && dest.push(0x00); + code = 0x01; + } + + for (let i = 0; i < buf.length; i++) { + if (buf[i] == 0) { + finish(); + } else { + dest.push(buf[i]); + code += 1; + if (code == 0xff) { + finish(); + } + } + } + finish(false); + + // close w/ zero + dest.push(0x00); + + // return Uint8Array.from(dest); + return dest; +} + +// COBS decode, tailing zero, that was used to delineate this buffer, +// is assumed to already be chopped, thus the end is the end + +export function decode(buf: Uint8Array | number[]) { + const dest: number[] = []; + for (let i = 0; i < buf.length; ) { + const code = buf[i++]; + for (let j = 1; j < code; j++) { + dest.push(buf[i++]); + } + if (code < 0xff && i < buf.length) { + dest.push(0); + } + } + + // return Uint8Array.from(dest); + return dest; +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/comms/converters.ts b/src/packages/haxidraw-client/src/comms/converters.ts new file mode 100644 index 000000000..387f7fd04 --- /dev/null +++ b/src/packages/haxidraw-client/src/comms/converters.ts @@ -0,0 +1,20 @@ +export function floatsToBytes(arr: number[]) { + const data = new Float32Array(arr); + const buffer = new ArrayBuffer(data.byteLength); + new Float32Array(buffer).set(data); + return new Uint8Array(buffer); +} + +export function intsToBytes(arr: number[]) { + const data = new Uint32Array(arr); + const buffer = new ArrayBuffer(data.byteLength); + new Uint32Array(buffer).set(data); + return new Uint8Array(buffer); +} + +export function uint16ToBytes(arr: number[]) { + const data = new Uint16Array(arr); + const buffer = new ArrayBuffer(data.byteLength); + new Uint16Array(buffer).set(data); + return new Uint8Array(buffer); +} diff --git a/src/packages/haxidraw-client/src/comms/webSerialDispatcher.ts b/src/packages/haxidraw-client/src/comms/webSerialDispatcher.ts new file mode 100644 index 000000000..a85861f3f --- /dev/null +++ b/src/packages/haxidraw-client/src/comms/webSerialDispatcher.ts @@ -0,0 +1,58 @@ +export class WebSerialDispatcher { + #port: SerialPort; + #baudRate: number; + #handler: (msg: Uint8Array) => any; + #reader: ReadableStreamDefaultReader | null = null; + #keepReading = true; + #loopPromise: Promise | null = null; + + constructor(port: SerialPort, handler: (msg: Uint8Array) => any, baudRate: number = 115200) { + this.#port = port; + this.#baudRate = baudRate; + this.#handler = handler; + } + + async init() { + await this.#port.open({ baudRate: this.#baudRate }); + + this.#loopPromise = this.#loop(); + } + + async #loop() { + while(this.#port.readable && this.#keepReading) { + this.#reader = this.#port.readable.getReader(); + console.log("reader lock"); + try { + let value: Uint8Array | undefined, done: boolean; + do { + ({ value, done } = await this.#reader.read()); + console.log(done); + if(value) this.#handler(value); + } while(!done); + } finally { + this.#reader.releaseLock(); + console.log("reader unlock"); + } + } + } + + async write(msg: Uint8Array) { + const writer = this.#port.writable?.getWriter(); + console.log("writer lock"); + if(!writer) throw new Error("Port is not writable"); + try { + await writer.write(msg); + } finally { + writer.releaseLock(); + console.log("writer unlock"); + } + } + + async close() { this.#keepReading = false; this.#reader?.cancel(); await this.#loopPromise; await this.#port.close(); } +} + +export async function createWebSerialDispatcher(port: SerialPort, handler: (msg: Uint8Array) => any, baudRate?: number) { + const buffer = new WebSerialDispatcher(port, handler, baudRate); + await buffer.init(); + return buffer; +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/comms/webSerialPort.ts b/src/packages/haxidraw-client/src/comms/webSerialPort.ts new file mode 100644 index 000000000..789c1110d --- /dev/null +++ b/src/packages/haxidraw-client/src/comms/webSerialPort.ts @@ -0,0 +1,119 @@ +import { WebSerialDispatcher, createWebSerialDispatcher } from "./webSerialDispatcher"; +import * as cobs from "./cobs"; +import { C, I, _, pipe } from "../pipe"; + +const TERMINATOR = 0x0A; + +type MsgHandler = (payload: number[]) => void; + +interface HXSerialPort { + on: (msg: string, func: MsgHandler) => void; + send: (msg: string, payload: Uint8Array) => Promise; + close: () => Promise; +} + +export class WebSerialPort implements HXSerialPort { + #dispatcher: WebSerialDispatcher = null!; + #msgHandlers: Record = {}; + #msgResolves: Record void> = {}; + #msgCount = 0; + + constructor() {} + + async init(rawPort: SerialPort) { + let msg: number[] = []; + this.#dispatcher = await createWebSerialDispatcher(rawPort, async data => { + for(const byte of data) { + msg.push(byte); + + if(byte === TERMINATOR) { + const data = unpack(msg); + + if(data.msg === "ack") { + this.#msgResolves[data.msgCount](data.payload); + } else if(data.msg in this.#msgHandlers) { + this.#msgHandlers[data.msg](data.payload); + // await this.#dispatcher.write(Uint8Array.from(cobs.encode(pack("ack", new Uint8Array(0), data.msgCount)))); + await pipe( + I(pack("ack", new Uint8Array(0), data.msgCount)), + cobs.encode, + d => Uint8Array.from(d), + d => this.#dispatcher.write(d) + )(); + } else { + console.warn("Unknown message", data.msg); + } + + msg = []; + } + } + }); + } + + on(msg: string, func: MsgHandler) { + this.#msgHandlers[msg] = func; + } + + send(msg: string, payload: Uint8Array) { + const packedMsg = cobs.encode(pack(msg, payload, this.#msgCount)); + + const promise = new Promise((res) => { + const timeout = setTimeout(() => { + console.warn("No response received for msg", msg); + res(); + }, 5000); + this.#msgResolves[this.#msgCount] = () => { + clearTimeout(timeout); + res(); + } + }); + + this.#dispatcher.write(Uint8Array.from(packedMsg)); + this.#msgCount = (this.#msgCount + 1) % 9; + + return promise; + } + + async close() { + await this.#dispatcher.close(); + } +} + +function pack(msg: string, payload: Uint8Array | number[], msgCount: number) { + const buffer: number[] = []; + + if(msg.length > 255) throw new Error("Message too long"); + buffer.push(msg.length); + msg.split("").forEach(char => buffer.push(char.charCodeAt(0))); + if(payload.length > 255) throw new Error("Payload too long"); + buffer.push(payload.length); + payload.forEach(byte => buffer.push(byte)); + buffer.push(msgCount); + + // return new Uint8Array(buffer); + return buffer; +} + +function unpack(bytes: number[]) { + let i = 0; + // skip length byte + const msgLength = bytes[i++]; + const msgBytes = bytes.slice(i, i + msgLength); + i += msgLength; + const payloadLength = bytes[i++]; + const payloadBytes = bytes.slice(i, i + payloadLength); + const msgCount = bytes[i++]; + const msgString = String.fromCharCode.apply(null, msgBytes); + + return { + msg: msgString, + payload: payloadBytes, + msgCount + }; +} + +export async function createWebSerialPort(rawPort: SerialPort) { + const port = new WebSerialPort(); + await port.init(rawPort); + return port; +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/drawingFns/displace.ts b/src/packages/haxidraw-client/src/drawingFns/displace.ts new file mode 100644 index 000000000..ecc363bba --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/displace.ts @@ -0,0 +1,19 @@ +import { Point } from "../types"; + +export function displace(pts: Point[], fn: (t: number) => number) { + for (let i = 0; i < pts.length - 1; i++) { + let [x0, y0] = pts[i]; + let [x1, y1] = pts[i + 1]; + let dx = x1 - x0; + let dy = y1 - y0; + let ex = -dy; + let ey = dx; + let d = Math.sqrt(dx * dx + dy * dy); + ex /= d; + ey /= d; + let t = i; + let s = fn(t); + pts[i][0] += ex * s; + pts[i][1] += ey * s; + } +} diff --git a/src/packages/haxidraw-client/src/drawingFns/filterBreakPolylines.ts b/src/packages/haxidraw-client/src/drawingFns/filterBreakPolylines.ts new file mode 100644 index 000000000..350af7fd5 --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/filterBreakPolylines.ts @@ -0,0 +1,37 @@ +import { Polyline } from "../types"; + +export function filterBreakPolylines( + polylines: Polyline[], + filterFunction: (x: number, y: number, polylines: Polyline[]) => boolean, + breakFunction: (x: number, y: number, polylines: Polyline[]) => boolean +) { + for (let i = polylines.length - 1; i >= 0; i--) { + for (let j = polylines[i].length - 1; j >= 0; j--) { + // Call the filter function, if it returns false, remove the point + if (filterFunction(i, j, polylines)) { + polylines[i].splice(j, 1); + } else if (breakFunction(i, j, polylines)) { + // Call the break function, if it returns true, break the polyline at this point + // If the break point is at the start or end of the polyline, just remove it + if (j === 0 || j === polylines[i].length - 1) { + polylines[i].splice(j, 1); + } else { + // Otherwise, split the polyline into two at the break point + let polyline1 = polylines[i].slice(0, j); + let polyline2 = polylines[i].slice(j + 1); + + // Replace the original polyline with the first part + polylines[i] = polyline1; + + // Insert the second part after the first part + polylines.splice(i + 1, 0, polyline2); + } + } + } + + // If a polyline has only one point, remove it + if (polylines[i].length === 1) { + polylines.splice(i, 1); + } + } +} diff --git a/src/packages/haxidraw-client/src/drawingFns/getAngle.ts b/src/packages/haxidraw-client/src/drawingFns/getAngle.ts new file mode 100644 index 000000000..0abebcfa7 --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/getAngle.ts @@ -0,0 +1,52 @@ +import { Polyline } from "../types"; + +export function getAngle(polylines: Polyline[], t: number) { + // Calculate the total length of all polylines + let totalLength = 0; + let lengths = polylines.map((polyline) => { + let length = 0; + for (let i = 1; i < polyline.length; i++) { + let dx = polyline[i][0] - polyline[i - 1][0]; + let dy = polyline[i][1] - polyline[i - 1][1]; + length += Math.sqrt(dx * dx + dy * dy); + } + totalLength += length; + return length; + }); + + // Find the target length at 't' + let targetLength = totalLength * t; + + // Find the polyline and the segment where the target point is located + let accumulatedLength = 0; + for (let i = 0; i < polylines.length; i++) { + if (targetLength <= accumulatedLength + lengths[i]) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + let segmentLength = Math.sqrt(dx * dx + dy * dy); + + if (targetLength <= accumulatedLength + segmentLength) { + // Calculate the angle + let angle = Math.atan2(dy, dx); // Angle in radians + return angle * (180 / Math.PI); // Convert to degrees + } + + accumulatedLength += segmentLength; + } + } + accumulatedLength += lengths[i]; + } + + // If 't' is 1, calculate the angle at the last point + let lastPolyline = polylines[polylines.length - 1]; + let dx = + lastPolyline[lastPolyline.length - 1][0] - + lastPolyline[lastPolyline.length - 2][0]; + let dy = + lastPolyline[lastPolyline.length - 1][1] - + lastPolyline[lastPolyline.length - 2][1]; + let angle = Math.atan2(dy, dx); // Angle in radians + return angle * (180 / Math.PI); // Convert to degrees +} diff --git a/src/packages/haxidraw-client/src/drawingFns/getNormal.ts b/src/packages/haxidraw-client/src/drawingFns/getNormal.ts new file mode 100644 index 000000000..11c08cf4b --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/getNormal.ts @@ -0,0 +1,42 @@ +import { Polyline } from "../types"; + +export function getNormal(polylines: Polyline[], t: number) { + // Calculate the total length of all polylines + let totalLength = 0; + let lengths = polylines.map((polyline) => { + let length = 0; + for (let i = 1; i < polyline.length; i++) { + let dx = polyline[i][0] - polyline[i - 1][0]; + let dy = polyline[i][1] - polyline[i - 1][1]; + length += Math.sqrt(dx * dx + dy * dy); + } + totalLength += length; + return length; + }); + + // Find the target length at 't' + let targetLength = totalLength * t; + + // Find the polyline and the segment where the target point is located + let accumulatedLength = 0; + for (let i = 0; i < polylines.length; i++) { + if (targetLength <= accumulatedLength + lengths[i]) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + let segmentLength = Math.sqrt(dx * dx + dy * dy); + + if (targetLength <= accumulatedLength + segmentLength) { + // Calculate the normal + let magnitude = Math.sqrt(dx * dx + dy * dy); + let normal = [dy / magnitude, -dx / magnitude]; // [dy, -dx] gives a normal. We normalize it by dividing by the magnitude + return normal; + } + + accumulatedLength += segmentLength; + } + } + accumulatedLength += lengths[i]; + } +} diff --git a/src/packages/haxidraw-client/src/drawingFns/interpolatePolylines.ts b/src/packages/haxidraw-client/src/drawingFns/interpolatePolylines.ts new file mode 100644 index 000000000..ad0d5be72 --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/interpolatePolylines.ts @@ -0,0 +1,52 @@ +import { Polyline } from "../types"; + +export function interpolatePolylines(polylines: Polyline[], t: number) { + t = Math.max(t, 0); + t = Math.min(t, 1); + + // Calculate the total length of all polylines + let totalLength = 0; + let lengths = polylines.map((polyline) => { + let length = 0; + for (let i = 1; i < polyline.length; i++) { + let dx = polyline[i][0] - polyline[i - 1][0]; + let dy = polyline[i][1] - polyline[i - 1][1]; + length += Math.sqrt(dx * dx + dy * dy); + } + totalLength += length; + return length; + }); + + // Find the target length at 't' + let targetLength = totalLength * t; + + // Find the polyline where the target point is located + let accumulatedLength = 0; + for (let i = 0; i < polylines.length; i++) { + if (targetLength <= accumulatedLength + lengths[i]) { + // Find the exact point within this polyline + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + let segmentLength = Math.sqrt(dx * dx + dy * dy); + + if (targetLength <= accumulatedLength + segmentLength) { + // Interpolate between the two points in this segment + let segmentT = + (targetLength - accumulatedLength) / segmentLength; + let x = polyline[j - 1][0] + dx * segmentT; + let y = polyline[j - 1][1] + dy * segmentT; + return [x, y]; + } + + accumulatedLength += segmentLength; + } + } + accumulatedLength += lengths[i]; + } + + // If 't' is 1, return the last point + let lastPolyline = polylines[polylines.length - 1]; + return lastPolyline[lastPolyline.length - 1]; +} diff --git a/src/packages/haxidraw-client/src/drawingFns/mergePolylines.ts b/src/packages/haxidraw-client/src/drawingFns/mergePolylines.ts new file mode 100644 index 000000000..f8d833a12 --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/mergePolylines.ts @@ -0,0 +1,65 @@ +import { Point, Polyline } from "../types"; + +function calculateDistance(point1: Point, point2: Point) { + // Use Euclidean distance formula + let dx = point2[0] - point1[0]; + let dy = point2[1] - point1[1]; + return Math.sqrt(dx * dx + dy * dy); +} + +function isClosed(polyline: Polyline, epsilon = 1e-3) { + let start = polyline[0]; + let end = polyline[polyline.length - 1]; + return Math.abs(start[0] - end[0]) < epsilon && Math.abs(start[1] - end[1]) < epsilon; +} + +export function mergePolylines(polylines: Polyline[], threshold: number): Polyline[] { + let n = polylines.length; + for (let i = 0; i < n - 1; i++) { + if (isClosed(polylines[i])) continue; // Skip if polyline i is already closed + + for (let j = i + 1; j < n; j++) { + if (isClosed(polylines[j])) continue; // Skip if polyline j is already closed + + // Check if the end of polyline i is close to the start of polyline j + let d1 = calculateDistance(polylines[i][polylines[i].length - 1], polylines[j][0]); + if (d1 <= threshold) { + polylines[i] = polylines[i].concat(polylines[j]); + polylines.splice(j, 1); // remove polyline j + n--; + j--; + continue; + } + + // Check if the end of polyline i is close to the end of polyline j + let d2 = calculateDistance(polylines[i][polylines[i].length - 1], polylines[j][polylines[j].length - 1]); + if (d2 <= threshold) { + polylines[i] = polylines[i].concat(polylines[j].reverse()); + polylines.splice(j, 1); // remove polyline j + n--; + j--; + continue; + } + + // Check if the start of polyline i is close to the start of polyline j + let d3 = calculateDistance(polylines[i][0], polylines[j][0]); + if (d3 <= threshold) { + polylines[i] = polylines[j].concat(polylines[i]); + polylines.splice(j, 1); // remove polyline j + n--; + j--; + continue; + } + + // Check if the start of polyline i is close to the end of polyline j + let d4 = calculateDistance(polylines[i][0], polylines[j][polylines[j].length - 1]); + if (d4 <= threshold) { + polylines[i] = polylines[j].reverse().concat(polylines[i]); + polylines.splice(j, 1); // remove polyline j + n--; + j--; + } + } + } + return polylines; +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/drawingFns/resample.ts b/src/packages/haxidraw-client/src/drawingFns/resample.ts new file mode 100644 index 000000000..0dd1c62bd --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/resample.ts @@ -0,0 +1,100 @@ +import { Point, Polyline } from "../types"; + +function isect_circ_line(cx: number, cy: number, r: number, x0: number, y0: number, x1: number, y1: number) { + //https://stackoverflow.com/a/1084899 + let dx = x1 - x0; + let dy = y1 - y0; + let fx = x0 - cx; + let fy = y0 - cy; + let a = dx * dx + dy * dy; + let b = 2 * (fx * dx + fy * dy); + let c = fx * fx + fy * fy - r * r; + let discriminant = b * b - 4 * a * c; + if (discriminant < 0) { + return null; + } + discriminant = Math.sqrt(discriminant); + let t0 = (-b - discriminant) / (2 * a); + if (0 <= t0 && t0 <= 1) { + return t0; + } + let t = (-b + discriminant) / (2 * a); + if (t > 1 || t < 0) { + return null; + } + return t; +} + +export function resample(polyline: Polyline, step: number): Polyline { + if (polyline.length < 2) { + return polyline.slice(); + } + polyline = polyline.slice(); + let out: Polyline = [polyline[0].slice() as Point]; + let next = null; + let i = 0; + while (i < polyline.length - 1) { + let a = polyline[i]; + let b = polyline[i + 1]; + let dx = b[0] - a[0]; + let dy = b[1] - a[1]; + let d = Math.sqrt(dx * dx + dy * dy); + if (d == 0) { + i++; + continue; + } + let n = ~~(d / step); + let rest = (n * step) / d; + let rpx = a[0] * (1 - rest) + b[0] * rest; + let rpy = a[1] * (1 - rest) + b[1] * rest; + for (let j = 1; j <= n; j++) { + let t = j / n; + let x = a[0] * (1 - t) + rpx * t; + let y = a[1] * (1 - t) + rpy * t; + let xy: Point = [x, y]; + for (let k = 2; k < a.length; k++) { + xy.push(a[k] * (1 - t) + (a[k] * (1 - rest) + b[k] * rest) * t); + } + out.push(xy); + } + + next = null; + for (let j = i + 2; j < polyline.length; j++) { + let b = polyline[j - 1]; + let c = polyline[j]; + if (b[0] == c[0] && b[1] == c[1]) { + continue; + } + let t = isect_circ_line(rpx, rpy, step, b[0], b[1], c[0], c[1]); + if (t == null) { + continue; + } + + let q: Point = [b[0] * (1 - t) + c[0] * t, b[1] * (1 - t) + c[1] * t]; + for (let k = 2; k < b.length; k++) { + q.push(b[k] * (1 - t) + c[k] * t); + } + out.push(q); + polyline[j - 1] = q; + next = j - 1; + break; + } + if (next == null) { + break; + } + i = next; + } + + if (out.length > 1) { + let lx = out[out.length - 1][0]; + let ly = out[out.length - 1][1]; + let mx = polyline[polyline.length - 1][0]; + let my = polyline[polyline.length - 1][1]; + let d = Math.sqrt((mx - lx) ** 2 + (my - ly) ** 2); + if (d < step * 0.5) { + out.pop(); + } + } + out.push(polyline[polyline.length - 1].slice() as Point); + return out; +} diff --git a/src/packages/haxidraw-client/src/drawingFns/trimPolylines.ts b/src/packages/haxidraw-client/src/drawingFns/trimPolylines.ts new file mode 100644 index 000000000..0d3d5b28a --- /dev/null +++ b/src/packages/haxidraw-client/src/drawingFns/trimPolylines.ts @@ -0,0 +1,63 @@ +import { Polyline } from "../types"; + +export function trimPolylines(polylines: Polyline[], t1: number, t2: number) { + t1 = Math.min(1, t1); + t1 = Math.max(0, t1); + t2 = Math.min(1, t2); + t2 = Math.max(0, t2); + + let totalLength = getTotalLength(polylines); + let targetLength1 = totalLength * t1; + let targetLength2 = totalLength * t2; + + let accumulatedLength = 0; + let startIndex, endIndex, startPolylineIndex, endPolylineIndex; + + // Find the start and end indices + for (let i = 0; i < polylines.length; i++) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + let segmentLength = Math.sqrt(dx * dx + dy * dy); + + if ( + !startIndex && + accumulatedLength + segmentLength >= targetLength1 + ) { + startIndex = j; + startPolylineIndex = i; + } + + if ( + !endIndex && + accumulatedLength + segmentLength >= targetLength2 + ) { + endIndex = j; + endPolylineIndex = i; + break; + } + + accumulatedLength += segmentLength; + } + } + + // Modify the polylines array + polylines.splice(endPolylineIndex! + 1); + polylines[endPolylineIndex!].splice(endIndex! + 1); + polylines.splice(0, startPolylineIndex); + polylines[0].splice(0, startIndex! - 1); +} + +function getTotalLength(polylines: Polyline[]) { + let totalLength = 0; + for (let i = 0; i < polylines.length; i++) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + totalLength += Math.sqrt(dx * dx + dy * dy); + } + } + return totalLength; +} diff --git a/src/packages/haxidraw-client/src/ext-utils/bezierEasing3.ts b/src/packages/haxidraw-client/src/ext-utils/bezierEasing3.ts new file mode 100644 index 000000000..901e76346 --- /dev/null +++ b/src/packages/haxidraw-client/src/ext-utils/bezierEasing3.ts @@ -0,0 +1,72 @@ +import { Point } from "../types"; + +function calculateBezierPoint( + t: number, + p0: Point, + p1: Point, + p2: Point, + p3: Point +) { + let u = 1 - t; + let tt = t * t; + let uu = u * u; + let uuu = uu * u; + let ttt = tt * t; + + let p = [uuu * p0[0], uuu * p0[1]]; // u^3 * p0 + p[0] += 3 * uu * t * p1[0]; // 3u^2t * p1 + p[1] += 3 * uu * t * p1[1]; + p[0] += 3 * u * tt * p2[0]; // 3ut^2 * p2 + p[1] += 3 * u * tt * p2[1]; + p[0] += ttt * p3[0]; // t^3 * p3 + p[1] += ttt * p3[1]; + + return p; +} + +function findTForGivenX( + xTarget: number, + p0: Point, + p1: Point, + p2: Point, + p3: Point +) { + let tolerance = 0.00001; + let t = 0.5; // Start with approximate solution + let iterations = 0; + + while (iterations < 1000) { + // Max iterations to prevent infinite loop + let p = calculateBezierPoint(t, p0, p1, p2, p3); + let difference = p[0] - xTarget; + if (Math.abs(difference) < tolerance) { + return t; + } else { + t = t - difference / 2; // Approximate a new t value + } + iterations++; + } + return t; // Return the approximate t value +} + +function getYForX(x: number, p0: Point, p1: Point, p2: Point, p3: Point) { + let t = findTForGivenX(x, p0, p1, p2, p3); + let p = calculateBezierPoint(t, p0, p1, p2, p3); + return p[1]; +} + +export function bezierEasing( + initial: number, + p0: Point, + p1: Point, + final: number +) { + return (x: number) => + getYForX( + x, + [0, initial], + [Math.min(Math.max(0, p0[0]), 1), p0[1]], + [Math.min(Math.max(0, p1[0]), 1), p1[1]], + [1, final] + ); +} diff --git a/src/packages/haxidraw-client/src/ext-utils/isPointInPolyline.ts b/src/packages/haxidraw-client/src/ext-utils/isPointInPolyline.ts new file mode 100644 index 000000000..a5f7650ab --- /dev/null +++ b/src/packages/haxidraw-client/src/ext-utils/isPointInPolyline.ts @@ -0,0 +1,61 @@ +import { Point, Polyline } from "../types"; + +export function isPointInPolyline(point: Point, polyline: Polyline) { + if (!isClosed(polyline)) { + return false; // If the polyline is open, no point is inside it. + } + + let x = point[0], + y = point[1]; + let inside = false; + + // Iterate over polygon segments + for (let i = 0, j = polyline.length - 1; i < polyline.length; j = i++) { + let xi = polyline[i][0], + yi = polyline[i][1]; + let xj = polyline[j][0], + yj = polyline[j][1]; + + // Check if point is in polygon using the ray casting algorithm + let intersect = + yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + + return inside; +} + +export function inside(point: Point, polyline: Polyline) { + // ray-casting algorithm based on + // https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html + if (!isClosed(polyline)) { + return false; // If the polyline is open, no point is inside it. + } + + const x = point[0], + y = point[1]; + + let inside = false; + for (let i = 0, j = polyline.length - 1; i < polyline.length; j = i++) { + const xi = polyline[i][0], + yi = polyline[i][1]; + const xj = polyline[j][0], + yj = polyline[j][1]; + + const intersect = + yi > y != yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi; + if (intersect) inside = !inside; + } + + return inside; +} + +function isClosed(polyline: Polyline, epsilon = 1e-4) { + const start = polyline[0]; + const end = polyline[polyline.length - 1]; + + return ( + Math.abs(start[0] - end[0]) < epsilon && + Math.abs(start[1] - end[1]) < epsilon + ); +} diff --git a/src/packages/haxidraw-client/src/ext-utils/noise.ts b/src/packages/haxidraw-client/src/ext-utils/noise.ts new file mode 100644 index 000000000..f78f1fb67 --- /dev/null +++ b/src/packages/haxidraw-client/src/ext-utils/noise.ts @@ -0,0 +1,100 @@ +import { rand } from "./rand"; + +let PERLIN_YWRAPB = 4; +let PERLIN_YWRAP = 1 << PERLIN_YWRAPB; +let PERLIN_ZWRAPB = 8; +let PERLIN_ZWRAP = 1 << PERLIN_ZWRAPB; +let PERLIN_SIZE = 4095; + +let scaled_cosine = function (i: number) { + return 0.5 * (1.0 - Math.cos(i * Math.PI)); +}; + +let perlin: Float64Array; // will be initialized lazily by noise() or noiseSeed() + +type Vector3 = [number, number, number]; + +export function noise(vector: number | Vector3, options: Partial<{ + octaves: number, + falloff: number +}> = {}) { + if (typeof vector === "number") vector = [vector, 0, 0]; + let [x, y, z] = vector; + y = y || 0; + z = z || 0; + + const perlin_octaves = options?.octaves || 4; // default to medium smooth + const perlin_amp_falloff = options?.falloff || 0.5; // 50% reduction/octave + + if (perlin == null) { + perlin = Float64Array.from({ length: PERLIN_SIZE + 1 }, rand); + } + + if (x < 0) { + x = -x; + } + if (y < 0) { + y = -y; + } + if (z < 0) { + z = -z; + } + + let xi = Math.floor(x), + yi = Math.floor(y), + zi = Math.floor(z); + let xf = x - xi; + let yf = y - yi; + let zf = z - zi; + let rxf, ryf; + + let r = 0; + let ampl = 0.5; + + let n1, n2, n3; + + for (let o = 0; o < perlin_octaves; o++) { + let of = xi + (yi << PERLIN_YWRAPB) + (zi << PERLIN_ZWRAPB); + + rxf = scaled_cosine(xf); + ryf = scaled_cosine(yf); + + n1 = perlin[of & PERLIN_SIZE]; + n1 += rxf * (perlin[(of + 1) & PERLIN_SIZE] - n1); + n2 = perlin[(of + PERLIN_YWRAP) & PERLIN_SIZE]; + n2 += rxf * (perlin[(of + PERLIN_YWRAP + 1) & PERLIN_SIZE] - n2); + n1 += ryf * (n2 - n1); + + of += PERLIN_ZWRAP; + n2 = perlin[of & PERLIN_SIZE]; + n2 += rxf * (perlin[(of + 1) & PERLIN_SIZE] - n2); + n3 = perlin[(of + PERLIN_YWRAP) & PERLIN_SIZE]; + n3 += rxf * (perlin[(of + PERLIN_YWRAP + 1) & PERLIN_SIZE] - n3); + n2 += ryf * (n3 - n2); + + n1 += scaled_cosine(zf) * (n2 - n1); + + r += n1 * ampl; + ampl *= perlin_amp_falloff; + xi <<= 1; + xf *= 2; + yi <<= 1; + yf *= 2; + zi <<= 1; + zf *= 2; + + if (xf >= 1.0) { + xi++; + xf--; + } + if (yf >= 1.0) { + yi++; + yf--; + } + if (zf >= 1.0) { + zi++; + zf--; + } + } + return r; +} diff --git a/src/packages/haxidraw-client/src/ext-utils/rand.ts b/src/packages/haxidraw-client/src/ext-utils/rand.ts new file mode 100644 index 000000000..5f55b7847 --- /dev/null +++ b/src/packages/haxidraw-client/src/ext-utils/rand.ts @@ -0,0 +1,23 @@ +let jsr = 69; + +export function rand() { + const max = 4294967295; + jsr ^= jsr << 17; + jsr ^= jsr >>> 13; + jsr ^= jsr << 5; + return (jsr >>> 0) / max; +} + +export function setRandSeed(seed: number) { + jsr = seed; +} + +export function randInRange(min: number, max: number) { + return rand() * (max - min) + min; +} + +export function randIntInRange(min: number, max: number) { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(rand() * (max - min + 1) + min); +} diff --git a/src/packages/haxidraw-client/src/flatten-svg.d.ts b/src/packages/haxidraw-client/src/flatten-svg.d.ts new file mode 100644 index 000000000..78749b1b1 --- /dev/null +++ b/src/packages/haxidraw-client/src/flatten-svg.d.ts @@ -0,0 +1,11 @@ +// declare module "flatten-svg" { +// interface Options { +// maxError: number; +// } +// interface Line { +// points: Point[]; +// stroke?: string; +// groupId?: string; +// } +// export function flattenSVG(svg: SVGElement, options: Partial = {}): Line[]; +// } \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/flatten-svg/index.ts b/src/packages/haxidraw-client/src/flatten-svg/index.ts new file mode 100644 index 000000000..867e1b1f3 --- /dev/null +++ b/src/packages/haxidraw-client/src/flatten-svg/index.ts @@ -0,0 +1,250 @@ +import {getPathData} from './path-data-polyfill'; + +type Curve = [number, number, number, number, number, number, number, number] +function isFlatEnough([x0, y0, x1, y1, x2, y2, x3, y3]: Curve, flatness: number) { + // https://github.com/paperjs/paper.js/blob/a61e83edf2ed1870bd41bad135f4f6fc85b0f628/src/path/Curve.js#L806 + const ux = 3 * x1 - 2 * x0 - x3, + uy = 3 * y1 - 2 * y0 - y3, + vx = 3 * x2 - 2 * x3 - x0, + vy = 3 * y2 - 2 * y3 - y0; + return Math.max(ux * ux, vx * vx) + Math.max(uy * uy, vy * vy) + <= 16 * flatness * flatness; +} + +function subdivide([x0, y0, x1, y1, x2, y2, x3, y3]: Curve, t: number): [Curve, Curve] { + // https://github.com/paperjs/paper.js/blob/a61e83edf2ed1870bd41bad135f4f6fc85b0f628/src/path/Curve.js#L606 + if (t === undefined) + t = 0.5; + // Triangle computation, with loops unrolled. + let u = 1 - t, + // Interpolate from 4 to 3 points + x4 = u * x0 + t * x1, y4 = u * y0 + t * y1, + x5 = u * x1 + t * x2, y5 = u * y1 + t * y2, + x6 = u * x2 + t * x3, y6 = u * y2 + t * y3, + // Interpolate from 3 to 2 points + x7 = u * x4 + t * x5, y7 = u * y4 + t * y5, + x8 = u * x5 + t * x6, y8 = u * y5 + t * y6, + // Interpolate from 2 points to 1 point + x9 = u * x7 + t * x8, y9 = u * y7 + t * y8; + // We now have all the values we need to build the sub-curves: + return [ + [x0, y0, x4, y4, x7, y7, x9, y9], // left + [x9, y9, x8, y8, x6, y6, x3, y3] // right + ]; +} + +function flatten(v: Curve, flatness: number, maxRecursion = 32) { + const minSpan = 1 / maxRecursion + const parts: Curve[] = [] + + function computeParts(curve: Curve, t1: number, t2: number) { + if ((t2 - t1) > minSpan && !isFlatEnough(curve, flatness) /* && !isStraight(curve) */) { + const halves = subdivide(curve, 0.5); + const tMid = (t1 + t2) / 2; + computeParts(halves[0], t1, tMid); + computeParts(halves[1], tMid, t2); + } else { + const dx = curve[6] - curve[0]; + const dy = curve[7] - curve[1]; + const dist = Math.sqrt(dx * dx + dy * dy); + if (dist > 0) { + parts.push(curve) + } + } + } + + computeParts(v, 0, 1) + + return parts +} + +function* walkSvgShapes(svgEl: SVGElement): IterableIterator { + switch (svgEl.nodeName.toLowerCase()) { + case 'svg': + case 'g': + case 'a': + for (const child of svgEl.children) { + yield* walkSvgShapes(child as SVGElement) + } + break; + case 'rect': + case 'circle': + case 'ellipse': + case 'path': + case 'line': + case 'polyline': + case 'polygon': + yield svgEl + break; + } +} + +interface Options { + maxError: number; +} + +type Point = [number, number] & {x: number, y: number} + +interface Line { + points: Point[]; + stroke?: string; + groupId?: string; +} + +function getStroke(shape: SVGElement): string | undefined { + if (!shape) return undefined + const explicitStroke = shape.getAttribute('stroke') || shape.style.stroke + if (explicitStroke) { + return explicitStroke + } + if (shape === shape.ownerSVGElement || !shape.ownerSVGElement) return undefined + if (shape.parentNode) { + return getStroke(shape.parentNode as SVGElement) + } + return undefined +} + +function getGroupId(shape: SVGElement): string | undefined { + if (!shape) return undefined + if (shape.id && shape.nodeName.toLowerCase() === 'g') { + return shape.id + } + if (shape.parentNode) { + return getGroupId(shape.parentNode as SVGElement) + } + return undefined +} + +function point(x: number, y: number): Point { + const pt = [x, y]; + (pt as Point).x = x; + (pt as Point).y = y; + return pt as Point +} + +function ang(ux: number, uy: number, vx: number, vy: number) { + /* + (ux*vy - uy*vx < 0 ? -1 : 1) * + acos((ux*vx+uy*vy) / sqrt(ux*ux+uy*uy)*sqrt(vx*vx+vy*vy)) + */ + // https://github.com/paperjs/paper.js/blob/f5366fb3cb53bc1ea52e9792e2ec2584c0c4f9c1/src/path/Path.js#L2516 + return Math.atan2(ux * vy - uy * vx, ux * vx + uy * vy) +} + +export function flattenSVG(svg: SVGElement, options: Partial = {}): Line[] { + const {maxError = 0.1} = options; + const svgPoint = (svg as any).createSVGPoint() + const paths: Line[] = [] + for (const shape of walkSvgShapes(svg)) { + const ctm = (shape as SVGGraphicsElement).getCTM() + const xf = ctm == null + ? ([x,y]: [number, number]): Point => { return point(x, y); } + : ([x,y]: [number, number]): Point => { + svgPoint.x = x; + svgPoint.y = y; + const xfd = svgPoint.matrixTransform(ctm); + return point(xfd.x, xfd.y) + }; + const pathData = getPathData(shape, {normalize: true}) + let cur: Point | null = null + let closePoint: Point | null = null + for (const cmd of pathData) { + if (cmd.type === 'M') { + cur = xf(cmd.values) + closePoint = cur + paths.push({ + points: [cur], + stroke: getStroke(shape), + groupId: getGroupId(shape), + }); + } else if (cmd.type === 'L') { + cur = xf(cmd.values) + paths[paths.length-1].points.push(cur) + } else if (cmd.type === 'C') { + const [x1, y1, x2, y2, x3, y3] = cmd.values + if (cur === null) { + throw new Error(`C ${cmd.values} encountered without current point`) + } + const [x0, y0] = cur + const [tx1, ty1] = xf([x1, y1]) + const [tx2, ty2] = xf([x2, y2]) + const [tx3, ty3] = xf([x3, y3]) + const parts = flatten([x0, y0, tx1, ty1, tx2, ty2, tx3, ty3], maxError) + for (const part of parts) { + paths[paths.length-1].points.push(point(part[6], part[7])) + } + cur = point(tx3, ty3) + } else if (cmd.type === 'A') { + const [rx_, ry_, phi, fA, fS, x, y] = cmd.values + const {cos, sin, sqrt, acos, abs, ceil} = Math + if (cur === null) { + throw new Error(`A ${cmd.values} encountered without current point`) + } + // https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes + const mpx = (cur[0] - x)/2, + mpy = (cur[1] - y)/2 + const x1_ = cos(phi) * mpx + sin(phi) * mpy, + y1_ = -sin(phi) * mpx + cos(phi) * mpy + const x1_2 = x1_*x1_, + y1_2 = y1_*y1_ + // ... ensure radii are large enough + const L = x1_2/(rx_*rx_) + y1_2/(ry_*ry_) + const rx = L <= 1 ? sqrt(L) * rx_ : rx_ + const ry = L <= 1 ? sqrt(L) * ry_ : ry_ + const rx2 = rx*rx, + ry2 = ry*ry + let factor = (rx2*ry2 - rx2*y1_2 - ry2*x1_2) / (rx2*y1_2 + ry2*x1_2) + if (abs(factor) < 0.0001) + factor = 0 + if (factor < 0) throw new Error(`bad arc args ${factor}`) + const k = (fA === fS ? -1 : 1) * sqrt(factor) + const cx_ = k * rx * y1_ / ry, + cy_ = k * -ry * x1_ / rx + const cx = cos(phi) * cx_ - sin(phi) * cy_ + (cur[0] + x)/2, + cy = sin(phi) * cx_ + cos(phi) * cy_ + (cur[1] + y)/2 + + const t1 = ang(1, 0, (x1_-cx_)/rx, (y1_-cy_)/ry) + const dt_ = ang((x1_-cx_)/rx, (y1_-cy_)/ry, (-x1_-cx_)/rx, + (-y1_-cy_)/ry) % (Math.PI*2) + const dt = + fS === 0 && dt_ > 0 ? dt_ - Math.PI*2 : + fS === 1 && dt_ < 0 ? dt_ + Math.PI*2 : + dt_ + + // now: + // - (cx, cy) is the center of the ellipse + // - (rx, ry) is the radius + // - phi is the angle around the x-axis of the current + // coordinate system to the x-axis of the ellipse + // - t1 is the start angle of the elliptical arc prior to the stretch and rotate operations. + // - t1+dt is the end angle of the elliptical arc prior to the stretch and rotate operations. + + // parameterization: + // ( x ) = ( cos phi -sin phi ) . ( rx cos t ) + ( cx ) + // ( y ) = ( sin phi cos phi ) ( ry sin t ) ( cy ) + + // https://i.imgur.com/JORhNjU.jpg + // maximum error based on maximum deviation from true arc + const n = ceil(abs(dt) / acos(1-maxError/rx)) + + for (let i = 1; i <= n; i++) { + const theta = t1 + dt * i/n + const tx = cos(phi) * rx * cos(theta) - sin(phi) * ry * sin(theta) + cx + const ty = sin(phi) * rx * cos(theta) + cos(phi) * ry * sin(theta) + cy + paths[paths.length-1].points.push(point(tx, ty)) + } + cur = point(x, y) + } else if (cmd.type === 'Z') { + if (cur === null) { + throw new Error(`Z encountered without current point`) + } + if (closePoint && (cur[0] !== closePoint[0] || cur[1] !== closePoint[1])) { + paths[paths.length-1].points.push(closePoint) + } + } else { + throw Error(`Unexpected path command: "${cmd.type}" ${cmd.values}`) + } + } + } + return paths +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/flatten-svg/info.txt b/src/packages/haxidraw-client/src/flatten-svg/info.txt new file mode 100644 index 000000000..17294975b --- /dev/null +++ b/src/packages/haxidraw-client/src/flatten-svg/info.txt @@ -0,0 +1 @@ +This code is taken from the repo https://github.com/nornagon/flatten-svg/ - unfortunately the way the build is packaged doesn't work well with our compiler setup, but including the files directly bypasses that. \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/flatten-svg/path-data-polyfill.js b/src/packages/haxidraw-client/src/flatten-svg/path-data-polyfill.js new file mode 100644 index 000000000..809272c74 --- /dev/null +++ b/src/packages/haxidraw-client/src/flatten-svg/path-data-polyfill.js @@ -0,0 +1,1141 @@ +// @info +// Polyfill for SVG getPathData() and setPathData() methods. Based on: +// - SVGPathSeg polyfill by Philip Rogers (MIT License) +// https://github.com/progers/pathseg +// - SVGPathNormalizer by Tadahisa Motooka (MIT License) +// https://github.com/motooka/SVGPathNormalizer/tree/master/src +// - arcToCubicCurves() by Dmitry Baranovskiy (MIT License) +// https://github.com/DmitryBaranovskiy/raphael/blob/v2.1.1/raphael.core.js#L1837 +// @author +// Jarosław Foksa +// Jeremy Apthorp +// @license +// MIT License + +const commandsMap = { + Z: "Z", + M: "M", + L: "L", + C: "C", + Q: "Q", + A: "A", + H: "H", + V: "V", + S: "S", + T: "T", + z: "Z", + m: "m", + l: "l", + c: "c", + q: "q", + a: "a", + h: "h", + v: "v", + s: "s", + t: "t" +}; + +const Source = function (string) { + this._string = string; + this._currentIndex = 0; + this._endIndex = this._string.length; + this._prevCommand = null; + this._skipOptionalSpaces(); +}; + +Source.prototype = { + parseSegment: function () { + var char = this._string[this._currentIndex]; + var command = commandsMap[char] ? commandsMap[char] : null; + + if (command === null) { + // Possibly an implicit command. Not allowed if this is the first command. + if (this._prevCommand === null) { + return null; + } + + // Check for remaining coordinates in the current command. + if ( + (char === "+" || + char === "-" || + char === "." || + (char >= "0" && char <= "9")) && + this._prevCommand !== "Z" + ) { + if (this._prevCommand === "M") { + command = "L"; + } else if (this._prevCommand === "m") { + command = "l"; + } else { + command = this._prevCommand; + } + } else { + command = null; + } + + if (command === null) { + return null; + } + } else { + this._currentIndex += 1; + } + + this._prevCommand = command; + + var values = null; + var cmd = command.toUpperCase(); + + if (cmd === "H" || cmd === "V") { + values = [this._parseNumber()]; + } else if (cmd === "M" || cmd === "L" || cmd === "T") { + values = [this._parseNumber(), this._parseNumber()]; + } else if (cmd === "S" || cmd === "Q") { + values = [ + this._parseNumber(), + this._parseNumber(), + this._parseNumber(), + this._parseNumber() + ]; + } else if (cmd === "C") { + values = [ + this._parseNumber(), + this._parseNumber(), + this._parseNumber(), + this._parseNumber(), + this._parseNumber(), + this._parseNumber() + ]; + } else if (cmd === "A") { + values = [ + this._parseNumber(), + this._parseNumber(), + this._parseNumber(), + this._parseArcFlag(), + this._parseArcFlag(), + this._parseNumber(), + this._parseNumber() + ]; + } else if (cmd === "Z") { + this._skipOptionalSpaces(); + values = []; + } + + if (values === null || values.indexOf(null) >= 0) { + // Unknown command or known command with invalid values + return null; + } else { + return { type: command, values: values }; + } + }, + + hasMoreData: function () { + return this._currentIndex < this._endIndex; + }, + + peekSegmentType: function () { + var char = this._string[this._currentIndex]; + return commandsMap[char] ? commandsMap[char] : null; + }, + + initialCommandIsMoveTo: function () { + // If the path is empty it is still valid, so return true. + if (!this.hasMoreData()) { + return true; + } + + var command = this.peekSegmentType(); + // Path must start with moveTo. + return command === "M" || command === "m"; + }, + + _isCurrentSpace: function () { + var char = this._string[this._currentIndex]; + return ( + char <= " " && + (char === " " || + char === "\n" || + char === "\t" || + char === "\r" || + char === "\f") + ); + }, + + _skipOptionalSpaces: function () { + while (this._currentIndex < this._endIndex && this._isCurrentSpace()) { + this._currentIndex += 1; + } + + return this._currentIndex < this._endIndex; + }, + + _skipOptionalSpacesOrDelimiter: function () { + if ( + this._currentIndex < this._endIndex && + !this._isCurrentSpace() && + this._string[this._currentIndex] !== "," + ) { + return false; + } + + if (this._skipOptionalSpaces()) { + if ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] === "," + ) { + this._currentIndex += 1; + this._skipOptionalSpaces(); + } + } + return this._currentIndex < this._endIndex; + }, + + // Parse a number from an SVG path. This very closely follows genericParseNumber(...) from + // Source/core/svg/SVGParserUtilities.cpp. + // Spec: http://www.w3.org/TR/SVG11/single-page.html#paths-PathDataBNF + _parseNumber: function () { + var exponent = 0; + var integer = 0; + var frac = 1; + var decimal = 0; + var sign = 1; + var expsign = 1; + var startIndex = this._currentIndex; + + this._skipOptionalSpaces(); + + // Read the sign. + if ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] === "+" + ) { + this._currentIndex += 1; + } else if ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] === "-" + ) { + this._currentIndex += 1; + sign = -1; + } + + if ( + this._currentIndex === this._endIndex || + ((this._string[this._currentIndex] < "0" || + this._string[this._currentIndex] > "9") && + this._string[this._currentIndex] !== ".") + ) { + // The first character of a number must be one of [0-9+-.]. + return null; + } + + // Read the integer part, build right-to-left. + var startIntPartIndex = this._currentIndex; + + while ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] >= "0" && + this._string[this._currentIndex] <= "9" + ) { + this._currentIndex += 1; // Advance to first non-digit. + } + + if (this._currentIndex !== startIntPartIndex) { + var scanIntPartIndex = this._currentIndex - 1; + var multiplier = 1; + + while (scanIntPartIndex >= startIntPartIndex) { + integer += multiplier * (this._string[scanIntPartIndex] - "0"); + scanIntPartIndex -= 1; + multiplier *= 10; + } + } + + // Read the decimals. + if ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] === "." + ) { + this._currentIndex += 1; + + // There must be a least one digit following the . + if ( + this._currentIndex >= this._endIndex || + this._string[this._currentIndex] < "0" || + this._string[this._currentIndex] > "9" + ) { + return null; + } + + while ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] >= "0" && + this._string[this._currentIndex] <= "9" + ) { + frac *= 10; + decimal += + (this._string.charAt(this._currentIndex) - "0") / frac; + this._currentIndex += 1; + } + } + + // Read the exponent part. + if ( + this._currentIndex !== startIndex && + this._currentIndex + 1 < this._endIndex && + (this._string[this._currentIndex] === "e" || + this._string[this._currentIndex] === "E") && + this._string[this._currentIndex + 1] !== "x" && + this._string[this._currentIndex + 1] !== "m" + ) { + this._currentIndex += 1; + + // Read the sign of the exponent. + if (this._string[this._currentIndex] === "+") { + this._currentIndex += 1; + } else if (this._string[this._currentIndex] === "-") { + this._currentIndex += 1; + expsign = -1; + } + + // There must be an exponent. + if ( + this._currentIndex >= this._endIndex || + this._string[this._currentIndex] < "0" || + this._string[this._currentIndex] > "9" + ) { + return null; + } + + while ( + this._currentIndex < this._endIndex && + this._string[this._currentIndex] >= "0" && + this._string[this._currentIndex] <= "9" + ) { + exponent *= 10; + exponent += this._string[this._currentIndex] - "0"; + this._currentIndex += 1; + } + } + + var number = integer + decimal; + number *= sign; + + if (exponent) { + number *= Math.pow(10, expsign * exponent); + } + + if (startIndex === this._currentIndex) { + return null; + } + + this._skipOptionalSpacesOrDelimiter(); + + return number; + }, + + _parseArcFlag: function () { + if (this._currentIndex >= this._endIndex) { + return null; + } + + var flag = null; + var flagChar = this._string[this._currentIndex]; + + this._currentIndex += 1; + + if (flagChar === "0") { + flag = 0; + } else if (flagChar === "1") { + flag = 1; + } else { + return null; + } + + this._skipOptionalSpacesOrDelimiter(); + return flag; + } +}; + +const parsePathDataString = function (string) { + if (!string || string.length === 0) return []; + + var source = new Source(string); + var pathData = []; + + if (source.initialCommandIsMoveTo()) { + while (source.hasMoreData()) { + var pathSeg = source.parseSegment(); + + if (pathSeg === null) { + break; + } else { + pathData.push(pathSeg); + } + } + } + + return pathData; +}; + +const $cachedPathData = + typeof Symbol !== "undefined" ? Symbol() : "__cachedPathData"; +const $cachedNormalizedPathData = + typeof Symbol !== "undefined" ? Symbol() : "__cachedNormalizedPathData"; + +// @info +// Get an array of corresponding cubic bezier curve parameters for given arc curve paramters. +var arcToCubicCurves = function ( + x1, + y1, + x2, + y2, + r1, + r2, + angle, + largeArcFlag, + sweepFlag, + _recursive +) { + var degToRad = function (degrees) { + return (Math.PI * degrees) / 180; + }; + + var rotate = function (x, y, angleRad) { + var X = x * Math.cos(angleRad) - y * Math.sin(angleRad); + var Y = x * Math.sin(angleRad) + y * Math.cos(angleRad); + return { x: X, y: Y }; + }; + + var angleRad = degToRad(angle); + var params = []; + var f1, f2, cx, cy; + + if (_recursive) { + f1 = _recursive[0]; + f2 = _recursive[1]; + cx = _recursive[2]; + cy = _recursive[3]; + } else { + var p1 = rotate(x1, y1, -angleRad); + x1 = p1.x; + y1 = p1.y; + + var p2 = rotate(x2, y2, -angleRad); + x2 = p2.x; + y2 = p2.y; + + var x = (x1 - x2) / 2; + var y = (y1 - y2) / 2; + var h = (x * x) / (r1 * r1) + (y * y) / (r2 * r2); + + if (h > 1) { + h = Math.sqrt(h); + r1 = h * r1; + r2 = h * r2; + } + + var sign; + + if (largeArcFlag === sweepFlag) { + sign = -1; + } else { + sign = 1; + } + + var r1Pow = r1 * r1; + var r2Pow = r2 * r2; + + var left = r1Pow * r2Pow - r1Pow * y * y - r2Pow * x * x; + var right = r1Pow * y * y + r2Pow * x * x; + + var k = sign * Math.sqrt(Math.abs(left / right)); + + cx = (k * r1 * y) / r2 + (x1 + x2) / 2; + cy = (k * -r2 * x) / r1 + (y1 + y2) / 2; + + f1 = Math.asin(parseFloat(((y1 - cy) / r2).toFixed(9))); + f2 = Math.asin(parseFloat(((y2 - cy) / r2).toFixed(9))); + + if (x1 < cx) { + f1 = Math.PI - f1; + } + if (x2 < cx) { + f2 = Math.PI - f2; + } + + if (f1 < 0) { + f1 = Math.PI * 2 + f1; + } + if (f2 < 0) { + f2 = Math.PI * 2 + f2; + } + + if (sweepFlag && f1 > f2) { + f1 = f1 - Math.PI * 2; + } + if (!sweepFlag && f2 > f1) { + f2 = f2 - Math.PI * 2; + } + } + + var df = f2 - f1; + + if (Math.abs(df) > (Math.PI * 120) / 180) { + var f2old = f2; + var x2old = x2; + var y2old = y2; + + if (sweepFlag && f2 > f1) { + f2 = f1 + ((Math.PI * 120) / 180) * 1; + } else { + f2 = f1 + ((Math.PI * 120) / 180) * -1; + } + + x2 = cx + r1 * Math.cos(f2); + y2 = cy + r2 * Math.sin(f2); + params = arcToCubicCurves( + x2, + y2, + x2old, + y2old, + r1, + r2, + angle, + 0, + sweepFlag, + [f2, f2old, cx, cy] + ); + } + + df = f2 - f1; + + var c1 = Math.cos(f1); + var s1 = Math.sin(f1); + var c2 = Math.cos(f2); + var s2 = Math.sin(f2); + var t = Math.tan(df / 4); + var hx = (4 / 3) * r1 * t; + var hy = (4 / 3) * r2 * t; + + var m1 = [x1, y1]; + var m2 = [x1 + hx * s1, y1 - hy * c1]; + var m3 = [x2 + hx * s2, y2 - hy * c2]; + var m4 = [x2, y2]; + + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + + if (_recursive) { + return [m2, m3, m4].concat(params); + } else { + params = [m2, m3, m4].concat(params); + + var curves = []; + + for (var i = 0; i < params.length; i += 3) { + var r1 = rotate(params[i][0], params[i][1], angleRad); + var r2 = rotate(params[i + 1][0], params[i + 1][1], angleRad); + var r3 = rotate(params[i + 2][0], params[i + 2][1], angleRad); + curves.push([r1.x, r1.y, r2.x, r2.y, r3.x, r3.y]); + } + + return curves; + } +}; + +var clonePathData = function (pathData) { + return pathData.map(function (seg) { + return { + type: seg.type, + values: Array.prototype.slice.call(seg.values) + }; + }); +}; + +// @info +// Takes any path data, returns path data that consists only from absolute commands. +var absolutizePathData = function (pathData) { + var absolutizedPathData = []; + + var currentX = null; + var currentY = null; + + var subpathX = null; + var subpathY = null; + + pathData.forEach(function (seg) { + var type = seg.type; + + if (type === "M") { + var x = seg.values[0]; + var y = seg.values[1]; + + absolutizedPathData.push({ type: "M", values: [x, y] }); + + subpathX = x; + subpathY = y; + + currentX = x; + currentY = y; + } else if (type === "m") { + var x = currentX + seg.values[0]; + var y = currentY + seg.values[1]; + + absolutizedPathData.push({ type: "M", values: [x, y] }); + + subpathX = x; + subpathY = y; + + currentX = x; + currentY = y; + } else if (type === "L") { + var x = seg.values[0]; + var y = seg.values[1]; + + absolutizedPathData.push({ type: "L", values: [x, y] }); + + currentX = x; + currentY = y; + } else if (type === "l") { + var x = currentX + seg.values[0]; + var y = currentY + seg.values[1]; + + absolutizedPathData.push({ type: "L", values: [x, y] }); + + currentX = x; + currentY = y; + } else if (type === "C") { + var x1 = seg.values[0]; + var y1 = seg.values[1]; + var x2 = seg.values[2]; + var y2 = seg.values[3]; + var x = seg.values[4]; + var y = seg.values[5]; + + absolutizedPathData.push({ + type: "C", + values: [x1, y1, x2, y2, x, y] + }); + + currentX = x; + currentY = y; + } else if (type === "c") { + var x1 = currentX + seg.values[0]; + var y1 = currentY + seg.values[1]; + var x2 = currentX + seg.values[2]; + var y2 = currentY + seg.values[3]; + var x = currentX + seg.values[4]; + var y = currentY + seg.values[5]; + + absolutizedPathData.push({ + type: "C", + values: [x1, y1, x2, y2, x, y] + }); + + currentX = x; + currentY = y; + } else if (type === "Q") { + var x1 = seg.values[0]; + var y1 = seg.values[1]; + var x = seg.values[2]; + var y = seg.values[3]; + + absolutizedPathData.push({ type: "Q", values: [x1, y1, x, y] }); + + currentX = x; + currentY = y; + } else if (type === "q") { + var x1 = currentX + seg.values[0]; + var y1 = currentY + seg.values[1]; + var x = currentX + seg.values[2]; + var y = currentY + seg.values[3]; + + absolutizedPathData.push({ type: "Q", values: [x1, y1, x, y] }); + + currentX = x; + currentY = y; + } else if (type === "A") { + var x = seg.values[5]; + var y = seg.values[6]; + + absolutizedPathData.push({ + type: "A", + values: [ + seg.values[0], + seg.values[1], + seg.values[2], + seg.values[3], + seg.values[4], + x, + y + ] + }); + + currentX = x; + currentY = y; + } else if (type === "a") { + var x = currentX + seg.values[5]; + var y = currentY + seg.values[6]; + + absolutizedPathData.push({ + type: "A", + values: [ + seg.values[0], + seg.values[1], + seg.values[2], + seg.values[3], + seg.values[4], + x, + y + ] + }); + + currentX = x; + currentY = y; + } else if (type === "H") { + var x = seg.values[0]; + absolutizedPathData.push({ type: "H", values: [x] }); + currentX = x; + } else if (type === "h") { + var x = currentX + seg.values[0]; + absolutizedPathData.push({ type: "H", values: [x] }); + currentX = x; + } else if (type === "V") { + var y = seg.values[0]; + absolutizedPathData.push({ type: "V", values: [y] }); + currentY = y; + } else if (type === "v") { + var y = currentY + seg.values[0]; + absolutizedPathData.push({ type: "V", values: [y] }); + currentY = y; + } else if (type === "S") { + var x2 = seg.values[0]; + var y2 = seg.values[1]; + var x = seg.values[2]; + var y = seg.values[3]; + + absolutizedPathData.push({ type: "S", values: [x2, y2, x, y] }); + + currentX = x; + currentY = y; + } else if (type === "s") { + var x2 = currentX + seg.values[0]; + var y2 = currentY + seg.values[1]; + var x = currentX + seg.values[2]; + var y = currentY + seg.values[3]; + + absolutizedPathData.push({ type: "S", values: [x2, y2, x, y] }); + + currentX = x; + currentY = y; + } else if (type === "T") { + var x = seg.values[0]; + var y = seg.values[1]; + + absolutizedPathData.push({ type: "T", values: [x, y] }); + + currentX = x; + currentY = y; + } else if (type === "t") { + var x = currentX + seg.values[0]; + var y = currentY + seg.values[1]; + + absolutizedPathData.push({ type: "T", values: [x, y] }); + + currentX = x; + currentY = y; + } else if (type === "Z" || type === "z") { + absolutizedPathData.push({ type: "Z", values: [] }); + + currentX = subpathX; + currentY = subpathY; + } + }); + + return absolutizedPathData; +}; + +// @info +// Takes path data that consists only from absolute commands, returns path data that consists only from +// "M", "L", "C" and "Z" commands. +var reducePathData = function (pathData) { + var reducedPathData = []; + var lastType = null; + + var lastControlX = null; + var lastControlY = null; + + var currentX = null; + var currentY = null; + + var subpathX = null; + var subpathY = null; + + pathData.forEach(function (seg) { + if (seg.type === "M") { + var x = seg.values[0]; + var y = seg.values[1]; + + reducedPathData.push({ type: "M", values: [x, y] }); + + subpathX = x; + subpathY = y; + + currentX = x; + currentY = y; + } else if (seg.type === "C") { + var x1 = seg.values[0]; + var y1 = seg.values[1]; + var x2 = seg.values[2]; + var y2 = seg.values[3]; + var x = seg.values[4]; + var y = seg.values[5]; + + reducedPathData.push({ type: "C", values: [x1, y1, x2, y2, x, y] }); + + lastControlX = x2; + lastControlY = y2; + + currentX = x; + currentY = y; + } else if (seg.type === "L") { + var x = seg.values[0]; + var y = seg.values[1]; + + reducedPathData.push({ type: "L", values: [x, y] }); + + currentX = x; + currentY = y; + } else if (seg.type === "H") { + var x = seg.values[0]; + + reducedPathData.push({ type: "L", values: [x, currentY] }); + + currentX = x; + } else if (seg.type === "V") { + var y = seg.values[0]; + + reducedPathData.push({ type: "L", values: [currentX, y] }); + + currentY = y; + } else if (seg.type === "S") { + var x2 = seg.values[0]; + var y2 = seg.values[1]; + var x = seg.values[2]; + var y = seg.values[3]; + + var cx1, cy1; + + if (lastType === "C" || lastType === "S") { + cx1 = currentX + (currentX - lastControlX); + cy1 = currentY + (currentY - lastControlY); + } else { + cx1 = currentX; + cy1 = currentY; + } + + reducedPathData.push({ + type: "C", + values: [cx1, cy1, x2, y2, x, y] + }); + + lastControlX = x2; + lastControlY = y2; + + currentX = x; + currentY = y; + } else if (seg.type === "T") { + var x = seg.values[0]; + var y = seg.values[1]; + + var x1, y1; + + if (lastType === "Q" || lastType === "T") { + x1 = currentX + (currentX - lastControlX); + y1 = currentY + (currentY - lastControlY); + } else { + x1 = currentX; + y1 = currentY; + } + + var cx1 = currentX + (2 * (x1 - currentX)) / 3; + var cy1 = currentY + (2 * (y1 - currentY)) / 3; + var cx2 = x + (2 * (x1 - x)) / 3; + var cy2 = y + (2 * (y1 - y)) / 3; + + reducedPathData.push({ + type: "C", + values: [cx1, cy1, cx2, cy2, x, y] + }); + + lastControlX = x1; + lastControlY = y1; + + currentX = x; + currentY = y; + } else if (seg.type === "Q") { + var x1 = seg.values[0]; + var y1 = seg.values[1]; + var x = seg.values[2]; + var y = seg.values[3]; + + var cx1 = currentX + (2 * (x1 - currentX)) / 3; + var cy1 = currentY + (2 * (y1 - currentY)) / 3; + var cx2 = x + (2 * (x1 - x)) / 3; + var cy2 = y + (2 * (y1 - y)) / 3; + + reducedPathData.push({ + type: "C", + values: [cx1, cy1, cx2, cy2, x, y] + }); + + lastControlX = x1; + lastControlY = y1; + + currentX = x; + currentY = y; + } else if (seg.type === "A") { + var r1 = Math.abs(seg.values[0]); + var r2 = Math.abs(seg.values[1]); + var angle = seg.values[2]; + var largeArcFlag = seg.values[3]; + var sweepFlag = seg.values[4]; + var x = seg.values[5]; + var y = seg.values[6]; + + if (r1 === 0 || r2 === 0) { + reducedPathData.push({ + type: "C", + values: [currentX, currentY, x, y, x, y] + }); + + currentX = x; + currentY = y; + } else { + if (currentX !== x || currentY !== y) { + var curves = arcToCubicCurves( + currentX, + currentY, + x, + y, + r1, + r2, + angle, + largeArcFlag, + sweepFlag + ); + + curves.forEach(function (curve) { + reducedPathData.push({ type: "C", values: curve }); + }); + + currentX = x; + currentY = y; + } + } + } else if (seg.type === "Z") { + reducedPathData.push(seg); + + currentX = subpathX; + currentY = subpathY; + } + + lastType = seg.type; + }); + + return reducedPathData; +}; + +const getLength = (el, key) => { + if (key in el && "baseVal" in el[key]) { + return el[key].baseVal.value; + } else { + // svgdom doesn't support rect.x.baseVal, see https://github.com/svgdotjs/svgdom/issues/32 + return +el.getAttribute(key); + } +}; + +const path = function (options) { + if (options && options.normalize) { + if (this[$cachedNormalizedPathData]) { + return clonePathData(this[$cachedNormalizedPathData]); + } else { + var pathData; + + if (this[$cachedPathData]) { + pathData = clonePathData(this[$cachedPathData]); + } else { + pathData = parsePathDataString(this.getAttribute("d") || ""); + this[$cachedPathData] = clonePathData(pathData); + } + + var normalizedPathData = reducePathData( + absolutizePathData(pathData) + ); + this[$cachedNormalizedPathData] = clonePathData(normalizedPathData); + return normalizedPathData; + } + } else { + if (this[$cachedPathData]) { + return clonePathData(this[$cachedPathData]); + } else { + var pathData = parsePathDataString(this.getAttribute("d") || ""); + this[$cachedPathData] = clonePathData(pathData); + return pathData; + } + } +}; + +const rect = function (options) { + var x = getLength(this, "x"); + var y = getLength(this, "y"); + var width = getLength(this, "width"); + var height = getLength(this, "height"); + var rx = this.hasAttribute("rx") + ? getLength(this, "rx") + : getLength(this, "ry"); + var ry = this.hasAttribute("ry") + ? getLength(this, "ry") + : getLength(this, "rx"); + + if (rx > width / 2) { + rx = width / 2; + } + + if (ry > height / 2) { + ry = height / 2; + } + + var pathData = [ + { type: "M", values: [x + rx, y] }, + { type: "H", values: [x + width - rx] }, + { type: "A", values: [rx, ry, 0, 0, 1, x + width, y + ry] }, + { type: "V", values: [y + height - ry] }, + { type: "A", values: [rx, ry, 0, 0, 1, x + width - rx, y + height] }, + { type: "H", values: [x + rx] }, + { type: "A", values: [rx, ry, 0, 0, 1, x, y + height - ry] }, + { type: "V", values: [y + ry] }, + { type: "A", values: [rx, ry, 0, 0, 1, x + rx, y] }, + { type: "Z", values: [] } + ]; + + // Get rid of redundant "A" segs when either rx or ry is 0 + pathData = pathData.filter(function (s) { + return s.type === "A" && (s.values[0] === 0 || s.values[1] === 0) + ? false + : true; + }); + + if (options && options.normalize === true) { + pathData = reducePathData(pathData); + } + + return pathData; +}; + +const circle = function (options) { + var cx = getLength(this, "cx"); + var cy = getLength(this, "cy"); + var r = getLength(this, "r"); + + var pathData = [ + { type: "M", values: [cx + r, cy] }, + { type: "A", values: [r, r, 0, 0, 1, cx, cy + r] }, + { type: "A", values: [r, r, 0, 0, 1, cx - r, cy] }, + { type: "A", values: [r, r, 0, 0, 1, cx, cy - r] }, + { type: "A", values: [r, r, 0, 0, 1, cx + r, cy] }, + { type: "Z", values: [] } + ]; + + if (options && options.normalize === true) { + pathData = reducePathData(pathData); + } + + return pathData; +}; + +const ellipse = function (options) { + var cx = getLength(this, "cx"); + var cy = getLength(this, "cy"); + var rx = getLength(this, "rx"); + var ry = getLength(this, "ry"); + + var pathData = [ + { type: "M", values: [cx + rx, cy] }, + { type: "A", values: [rx, ry, 0, 0, 1, cx, cy + ry] }, + { type: "A", values: [rx, ry, 0, 0, 1, cx - rx, cy] }, + { type: "A", values: [rx, ry, 0, 0, 1, cx, cy - ry] }, + { type: "A", values: [rx, ry, 0, 0, 1, cx + rx, cy] }, + { type: "Z", values: [] } + ]; + + if (options && options.normalize === true) { + pathData = reducePathData(pathData); + } + + return pathData; +}; + +const line = function () { + const x1 = getLength(this, "x1"); + const x2 = getLength(this, "x2"); + const y1 = getLength(this, "y1"); + const y2 = getLength(this, "y2"); + return [ + { type: "M", values: [x1, y1] }, + { type: "L", values: [x2, y2] } + ]; +}; + +const polyline = function () { + var pathData = []; + + for (var i = 0; i < this.points.numberOfItems; i += 1) { + var point = this.points.getItem(i); + + pathData.push({ + type: i === 0 ? "M" : "L", + values: [point.x, point.y] + }); + } + + return pathData; +}; + +const polygon = function () { + var pathData = []; + + for (var i = 0; i < this.points.numberOfItems; i += 1) { + var point = this.points.getItem(i); + + pathData.push({ + type: i === 0 ? "M" : "L", + values: [point.x, point.y] + }); + } + + pathData.push({ + type: "Z", + values: [] + }); + + return pathData; +}; + +const pathDataGetters = { + circle, + ellipse, + path, + polygon, + polyline, + line, + rect +}; + +export function getPathData(svgElement, options) { + const type = svgElement.nodeName.toLowerCase(); + if (type in pathDataGetters) { + return pathDataGetters[type].call(svgElement, options); + } else { + throw new Error(`Unsupported SVG element type: '${type}'`); + } +} diff --git a/src/packages/haxidraw-client/src/haxidraw.ts b/src/packages/haxidraw-client/src/haxidraw.ts new file mode 100644 index 000000000..e7891ecb5 --- /dev/null +++ b/src/packages/haxidraw-client/src/haxidraw.ts @@ -0,0 +1,33 @@ +import { Point } from "./types"; +import { floatsToBytes, intsToBytes } from "./comms/converters"; +import { WebSerialPort, createWebSerialPort } from "./comms/webSerialPort"; + +export class Haxidraw { + port: WebSerialPort = null!; + rawPort: SerialPort = null!; + + constructor() {} + + async init(rawPort: SerialPort) { + this.port = await createWebSerialPort(rawPort); + this.rawPort = rawPort; + } + + async servo(angle: number) { + await this.port.send("servo", intsToBytes([angle])); + } + + async goTo(...point: Point) { + await this.port.send("go", floatsToBytes(point)) + } + + close() { + return this.port.close(); + } +} + +export async function createHaxidraw(rawPort: SerialPort) { + const haxidraw = new Haxidraw(); + await haxidraw.init(rawPort); + return haxidraw; +} \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/index.ts b/src/packages/haxidraw-client/src/index.ts new file mode 100644 index 000000000..9c0811d75 --- /dev/null +++ b/src/packages/haxidraw-client/src/index.ts @@ -0,0 +1,4 @@ +export { createHaxidraw, type Haxidraw } from "./haxidraw"; +export type { WebSerialPort } from "./comms/webSerialPort"; +export { Turtle } from "./turtle"; +export type { Point, Polyline } from "./types"; \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/pipe.ts b/src/packages/haxidraw-client/src/pipe.ts new file mode 100644 index 000000000..aa8a7c656 --- /dev/null +++ b/src/packages/haxidraw-client/src/pipe.ts @@ -0,0 +1,39 @@ +export const _ = Symbol(); + +type ExtendTupleTypes = T extends [ + infer First, + ...infer Rest +] + ? [First | G, ...ExtendTupleTypes] + : []; + +type FnArgsCondUnderscore< + T extends (...args: any) => any, + ParamMap extends ExtendTupleTypes, typeof _>, + MeansInclude extends boolean, + _depth extends unknown[] = [] +> = _depth["length"] extends Parameters["length"] + ? [] + : [ + ...(ParamMap[_depth["length"]] extends typeof _ + ? MeansInclude extends true + ? [Parameters[_depth["length"]]] + : [] + : MeansInclude extends true + ? [] + : [Parameters[_depth["length"]]]), + ...FnArgsCondUnderscore + ]; + +export const C = any, TArgs extends ExtendTupleTypes, typeof _>>( + f: T, + ...args: TArgs +): ((...a: FnArgsCondUnderscore) => ReturnType) => + (...a) => { let j = 0; return f(...args.map(v => v === _ ? a[j++] : v)); }; + +export const I = (a: T) => () => a; + +export const pipe = any, TLast extends (...args: any) => any>(...args: [TFirst, ...((...args: any) => any)[], TLast]): ((...args: Parameters) => ReturnType) => { + const [first, ...rest] = args; + return (...a) => rest.reduce((acc, f) => f(acc), first(...a as any)); +}; \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/turtle.ts b/src/packages/haxidraw-client/src/turtle.ts new file mode 100644 index 000000000..4e39ba2b9 --- /dev/null +++ b/src/packages/haxidraw-client/src/turtle.ts @@ -0,0 +1,493 @@ +import { flattenSVG } from "./flatten-svg/index"; +import { displace } from "./drawingFns/displace"; +import { resample } from "./drawingFns/resample"; +import { interpolatePolylines } from "./drawingFns/interpolatePolylines"; +import { getAngle } from "./drawingFns/getAngle"; +import { getNormal } from "./drawingFns/getNormal"; +import { trimPolylines } from "./drawingFns/trimPolylines"; +import { filterBreakPolylines } from "./drawingFns/filterBreakPolylines"; +import { mergePolylines } from "./drawingFns/mergePolylines"; +import type { Point, Polyline } from "./types"; + +export class Turtle { + drawing: boolean; + location: Point; + angle: number; + path: Polyline[]; + + constructor(start: Point = [0, 0]) { + this.drawing = true; + this.location = [...start]; + this.angle = 0; + this.path = [[start]]; + } + + up() { + if (!this.drawing) return this; + this.drawing = false; + this.path.push([[...this.location]]); + return this; + } + + down() { + this.drawing = true; + return this; + } + + goto([x, y]: Point) { + const lastPath = this.path.at(-1)!; + if (this.drawing) { + const [lastX, lastY] = this.location; + const dist = Math.sqrt((x - lastX) ** 2 + (y - lastY) ** 2); + if (dist < 0.0001) return this; + lastPath.push([x, y]); + } else { + if (lastPath.length === 1) lastPath[0] = [x, y]; + } + + this.location = [x, y]; + + return this; + } + + forward(distance: number) { + const last = this.location; + const a = (this.angle / 180) * Math.PI; + const x = last[0] + distance * Math.cos(a); + const y = last[1] + distance * Math.sin(a); + + this.goto([x, y]); + + return this; + } + + arc(angle: number, radius: number) { + const theta = Math.abs(angle); + + const length = ((radius * theta) / 180) * Math.PI; + + const ogAngle = this.angle; + const thetaStep = 1; + const steps = theta / thetaStep; + const distanceStep = length / steps; + + for (let i = 0; i < steps; i++) { + if (angle >= 0) this.right(thetaStep); + else this.left(thetaStep); + + this.forward(distanceStep); + } + + this.setAngle(ogAngle - angle); + + return this; + } + + setAngle(theta: number) { + this.angle = theta; + + return this; + } + + right(theta: number) { + this.angle -= theta; + + return this; + } + + left(theta: number) { + this.angle += theta; + + return this; + } + + translate(to: Point, origin: Point) { + this.location = translate(this.location, to, origin); + + iteratePath(this, (pt) => translate(pt, to, origin)); + return this; + } + + rotate(angle: number, origin: Point) { + if (!origin) origin = this.cc; + + this.location = rotate(this.location, angle, origin); + + iteratePath(this, (pt) => rotate(pt, angle, origin)); + return this; + } + + scale(factor: number, origin: Point) { + if (!origin) origin = this.cc; + + this.location = scale(this.location, factor, origin); + + iteratePath(this, (pt) => scale(pt, factor, origin)); + return this; + } + + displace(fn: Parameters[1]) { + this.path.forEach((pl) => displace(pl, fn)); + + return this; + } + + iteratePath(fn: Parameters[1]) { + iteratePath(this, fn); + return this; + } + + originate() { + this.translate([0, 0], this.cc); + return this; + } + + fromSVG(svgString: string) { + const parser = new DOMParser(); + const doc = parser.parseFromString(svgString, "image/svg+xml"); + const svg = doc.querySelector("svg")!; + const pls = flattenSVG(svg, { maxError: 0.001 }); + + pls.forEach((pl) => { + this.up(); + pl.points.forEach((pt, i) => { + this.goto([pt[0], pt[1]]); + if (i === 0) this.down(); + }); + }); + + return this; + } + + join(...turtles: Turtle[]) { + turtles.forEach((t) => { + this.path.push(...t.path); + }); + + return this; + } + + merge(threshold = 0.01) { + this.path = mergePolylines(this.path, threshold); + + return this; + } + + copy() { + const newPath = JSON.parse(JSON.stringify(this.path)); + const t = new Turtle(); + t.path = newPath; + return t; + } + + resample(resolution: number) { + this.path.forEach((pl) => { + const newPl = resample(pl, resolution); + while (pl.length > 0) pl.pop(); + + while (newPl.length > 0) { + pl.push(newPl.shift()!); + } + }); + + return this; + } + + interpolate(t: number) { + return interpolatePolylines(this.path, t); + } + + getAngle(t: number) { + return getAngle(this.path, t); + } + + getNormal(t: number) { + return getNormal(this.path, t); + } + + trim(t0: number, t1: number) { + trimPolylines(this.path, t0, t1); + return this; + } + + warp(fn: Turtle | ((t: number) => number), baseAngle: number | ((n: number) => number) | null = null) { + // TODO: if baseAngle is undefined then normal, if fn, pass normal, if number use number + + if (fn instanceof Turtle) { + const ogTurtle = fn; + fn = (t: number) => ogTurtle.interpolate(t)[1]; + } + + const tValues = tValuesForPoints(this.path); + + const newPts: Point[] = []; + + tValues.forEach((t, i) => { + const pt = this.path.flat()[i]; + + let angle = baseAngle ?? this.getAngle(t); + if (typeof angle === "function") { + angle = angle(this.getAngle(t)); + } else if (typeof angle === "number") { + angle = angle; + } + + // const normal = this.getNormal(t); + + const y = (fn as (t: number) => number)(t); + + // const newPt = displacePointAlongNormal(pt, normal, y); + // newPts.push(newPt); + + const newPoint = rotate([0, y], angle); + + newPts.push([pt[0] + newPoint[0], pt[1] + newPoint[1]]); + }); + + this.path.flat().forEach((pt, i, arr) => { + pt[0] = newPts[i][0]; + pt[1] = newPts[i][1]; + }); + + return this; + } + + extrema() { + return extrema(this.path.flat()); + } + + get width() { + const { xMin, xMax } = this.extrema(); + + return xMax - xMin; + } + + get height() { + const { yMin, yMax } = this.extrema(); + + return yMax - yMin; + } + + get length() { + return getTotalLength(this.path); + } + + get start(): Point { + if(!this.path.at(0)) throw new Error("Path is empty, so there is no start point"); + const pt = this.path.at(0)!.at(0)!; + + return [pt[0], pt[1]]; + } + + get end(): Point { + if(!this.path.at(-1)) throw new Error("Path is empty, so there is no end point"); + const pt = this.path.at(-1)!.at(-1)!; + + return [pt[0], pt[1]]; + } + + get lt(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMin, yMax]; + } + + get lc(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMin, (yMax + yMin) / 2]; + } + + get lb(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMin, yMin]; + } + + get ct(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [(xMax + xMin) / 2, yMax]; + } + + get cc(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [(xMax + xMin) / 2, (yMax + yMin) / 2]; + } + + get cb(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [(xMax + xMin) / 2, yMin]; + } + + get rt(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMax, yMax]; + } + + get rc(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMax, (yMax + yMin) / 2]; + } + + get rb(): Point { + const { xMin, xMax, yMin, yMax } = this.extrema(); + + return [xMax, yMin]; + } +} + +function iteratePath(turtle: Turtle, fn: (pt: Point, t: number) => Point | "REMOVE" | "BREAK" | void) { + const path = turtle.path; + const toRemove = new Set(); + const toBreak = new Set(); + + const tValues = tValuesForPoints(path); + + let ptIndex = 0; + + let newPts: Record = {}; + for (let i = 0; i < path.length; i++) { + for (let j = 0; j < path[i].length; j++) { + const pt = path[i][j]; + + const newPt = fn(pt, tValues[ptIndex]); + + if (newPt === "BREAK") { + toBreak.add(`${i},${j}`); + } else if (newPt === "REMOVE") { + toRemove.add(`${i},${j}`); + } else if (Array.isArray(newPt)) { + // const [ newX, newY ] = newPt; + // path[i][j] = [ newX, newY ]; + newPts[ptIndex] = newPt; + } + + ptIndex++; + } + } + + path.flat().forEach((pt, i) => { + if (i in newPts) { + pt[0] = newPts[i][0]; + pt[1] = newPts[i][1]; + } + }); + + filterBreakPolylines( + path, + (i, j, arr) => toRemove.has(`${i},${j}`), + (i, j, arr) => toBreak.has(`${i},${j}`) + ); + + turtle.path = path.filter((pl) => pl.length > 1); + + return turtle; +} + +function translate(pt: Point, [x, y]: Point, origin: Point = [0, 0]): Point { + return [pt[0] + x - origin[0], pt[1] + y - origin[1]]; +} + +function rotate(pt: Point, angle: number, origin: Point = [0, 0]): Point { + let delta = (angle / 180) * Math.PI; + + let hereX = pt[0] - origin[0]; + let hereY = pt[1] - origin[1]; + + let newPoint: Point = [ + hereX * Math.cos(delta) - hereY * Math.sin(delta) + origin[0], + hereY * Math.cos(delta) + hereX * Math.sin(delta) + origin[1] + ]; + + return newPoint; +} + +function scale(pt: Point, factor: Point | number, origin: Point): Point { + if (typeof factor === "number") factor = [factor, factor]; + const [xFactor, yFactor] = factor; + const [x, y] = origin; + const newPoint: Point = [ + (pt[0] - x) * xFactor + x, + (pt[1] - y) * yFactor + y + ]; + + return newPoint; +} + +function extrema(pts: Point[]) { + let xMin = Number.POSITIVE_INFINITY; + let xMax = Number.NEGATIVE_INFINITY; + let yMin = Number.POSITIVE_INFINITY; + let yMax = Number.NEGATIVE_INFINITY; + + pts.forEach((p) => { + const [x, y] = p; + + if (xMin > x) xMin = x; + if (xMax < x) xMax = x; + if (yMin > y) yMin = y; + if (yMax < y) yMax = y; + }); + + return { + xMin, + xMax, + yMin, + yMax + }; +} + +function tValuesForPoints(polylines: Polyline[]) { + let totalLength = 0; + let lengths = []; + let tValues = [0]; + + for (let i = 0; i < polylines.length; i++) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + let segmentLength = Math.sqrt(dx * dx + dy * dy); + totalLength += segmentLength; + lengths.push(segmentLength); + } + } + + let accumulatedLength = 0; + for (let i = 0; i < lengths.length; i++) { + accumulatedLength += lengths[i]; + tValues.push(accumulatedLength / totalLength); + } + + return tValues; +} + +function getTotalLength(polylines: Polyline[]) { + let totalLength = 0; + for (let i = 0; i < polylines.length; i++) { + let polyline = polylines[i]; + for (let j = 1; j < polyline.length; j++) { + let dx = polyline[j][0] - polyline[j - 1][0]; + let dy = polyline[j][1] - polyline[j - 1][1]; + totalLength += Math.sqrt(dx * dx + dy * dy); + } + } + return totalLength; +} + +function displacePointAlongNormal([px, py]: Point, normal: Point, magnitude: number): Point { + // Scale the normal by the magnitude + let dx = normal[0] * magnitude; + let dy = normal[1] * magnitude; + + // Translate the point by the scaled normal + let newPx = px + dx; + let newPy = py + dy; + + return [newPx, newPy]; +} diff --git a/src/packages/haxidraw-client/src/types.ts b/src/packages/haxidraw-client/src/types.ts new file mode 100644 index 000000000..93d834f67 --- /dev/null +++ b/src/packages/haxidraw-client/src/types.ts @@ -0,0 +1,2 @@ +export type Point = [number, number]; +export type Polyline = Point[]; \ No newline at end of file diff --git a/src/packages/haxidraw-client/src/utils.ts b/src/packages/haxidraw-client/src/utils.ts new file mode 100644 index 000000000..bc7481b1e --- /dev/null +++ b/src/packages/haxidraw-client/src/utils.ts @@ -0,0 +1,5 @@ +export { noise } from "./ext-utils/noise"; +export { rand, setRandSeed, randInRange, randIntInRange } from "./ext-utils/rand"; +// export { displace } from "./drawingFns/displace"; +export { bezierEasing } from "./ext-utils/bezierEasing3"; +export { isPointInPolyline, inside } from "./ext-utils/isPointInPolyline"; \ No newline at end of file diff --git a/src/packages/haxidraw-client/tsconfig.json b/src/packages/haxidraw-client/tsconfig.json new file mode 100644 index 000000000..27ccc183b --- /dev/null +++ b/src/packages/haxidraw-client/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@tsconfig/recommended/tsconfig.json", + "include": ["src", "types"], + "compilerOptions": { + "module": "esnext", + "moduleResolution": "NodeNext", + "allowJs": true + } +} diff --git a/src/packages/tsconfig/base.json b/src/packages/tsconfig/base.json new file mode 100644 index 000000000..a7c0eb4d8 --- /dev/null +++ b/src/packages/tsconfig/base.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": false, + "isolatedModules": true, + "moduleResolution": "node", + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true, + "paths": { + "@/*": ["./*"] + } + }, + "exclude": ["node_modules"] +} diff --git a/src/packages/tsconfig/nextjs.json b/src/packages/tsconfig/nextjs.json new file mode 100644 index 000000000..d5010a1bb --- /dev/null +++ b/src/packages/tsconfig/nextjs.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "plugins": [{ "name": "next" }], + "allowJs": true, + "declaration": false, + "declarationMap": false, + "incremental": true, + "jsx": "preserve", + "lib": ["dom", "dom.iterable", "esnext"], + "module": "esnext", + "noEmit": true, + "resolveJsonModule": true, + "strict": false, + "target": "es5" + }, + "include": ["src", "next-env.d.ts"], + "exclude": ["node_modules"] +} diff --git a/src/packages/tsconfig/package.json b/src/packages/tsconfig/package.json new file mode 100644 index 000000000..6efb83e14 --- /dev/null +++ b/src/packages/tsconfig/package.json @@ -0,0 +1,9 @@ +{ + "name": "tsconfig", + "version": "0.0.0", + "private": true, + "license": "MIT", + "publishConfig": { + "access": "public" + } +} diff --git a/src/packages/tsconfig/react-library.json b/src/packages/tsconfig/react-library.json new file mode 100644 index 000000000..36b62be38 --- /dev/null +++ b/src/packages/tsconfig/react-library.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "React Library", + "extends": "./base.json", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["ES2015", "DOM"], + "module": "ESNext", + "target": "es6" + } +} diff --git a/src/turbo.json b/src/turbo.json new file mode 100644 index 000000000..ec4d016d4 --- /dev/null +++ b/src/turbo.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://turbo.build/schema.json", + "globalDependencies": ["**/.env.*local"], + "pipeline": { + "build": { + "dependsOn": ["^build"], + "outputs": [".next/**", "!.next/cache/**"] + }, + "lint": {}, + "dev": { + "cache": false, + "persistent": true + } + } +} diff --git a/website/tsconfig.json b/website/tsconfig.json deleted file mode 100644 index 1f1560b6a..000000000 --- a/website/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": false, - "forceConsistentCasingInFileNames": true, - "noEmit": true, - "incremental": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "baseUrl": ".", - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] -} diff --git a/website/yarn.lock b/website/yarn.lock deleted file mode 100644 index d8eb73b7f..000000000 --- a/website/yarn.lock +++ /dev/null @@ -1,2146 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/runtime@^7.12.5": - version "7.22.3" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb" - integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== - dependencies: - regenerator-runtime "^0.13.11" - -"@headlessui/react@^1.7.10": - version "1.7.15" - resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.15.tgz#53ef6ae132af81b8f188414767b6e79ebf8dc73f" - integrity sha512-OTO0XtoRQ6JPB1cKNFYBZv2Q0JMqMGNhYP1CjPvcJvjz8YGokz8oAj89HIYZGN0gZzn/4kk9iUpmMF4Q21Gsqw== - dependencies: - client-only "^0.0.1" - -"@mdx-js/mdx@^2.2.1", "@mdx-js/mdx@^2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-2.3.0.tgz#d65d8c3c28f3f46bb0e7cb3bf7613b39980671a9" - integrity sha512-jLuwRlz8DQfQNiUCJR50Y09CGPq3fLtmtUQfVrj79E0JWu3dvsVcxVIcfhR5h0iXu+/z++zDrYeiJqifRynJkA== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/mdx" "^2.0.0" - estree-util-build-jsx "^2.0.0" - estree-util-is-identifier-name "^2.0.0" - estree-util-to-js "^1.1.0" - estree-walker "^3.0.0" - hast-util-to-estree "^2.0.0" - markdown-extensions "^1.0.0" - periscopic "^3.0.0" - remark-mdx "^2.0.0" - remark-parse "^10.0.0" - remark-rehype "^10.0.0" - unified "^10.0.0" - unist-util-position-from-estree "^1.0.0" - unist-util-stringify-position "^3.0.0" - unist-util-visit "^4.0.0" - vfile "^5.0.0" - -"@mdx-js/react@^2.2.1", "@mdx-js/react@^2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-2.3.0.tgz#4208bd6d70f0d0831def28ef28c26149b03180b3" - integrity sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g== - dependencies: - "@types/mdx" "^2.0.0" - "@types/react" ">=16" - -"@napi-rs/simple-git-android-arm-eabi@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-android-arm-eabi/-/simple-git-android-arm-eabi-0.1.8.tgz#303bea1ec00db24466e3b3ba13de337d87c5371b" - integrity sha512-JJCejHBB1G6O8nxjQLT4quWCcvLpC3oRdJJ9G3MFYSCoYS8i1bWCWeU+K7Br+xT+D6s1t9q8kNJAwJv9Ygpi0g== - -"@napi-rs/simple-git-android-arm64@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-android-arm64/-/simple-git-android-arm64-0.1.8.tgz#42c8d04287364fd1619002629fa52183dcf462ee" - integrity sha512-mraHzwWBw3tdRetNOS5KnFSjvdAbNBnjFLA8I4PwTCPJj3Q4txrigcPp2d59cJ0TC51xpnPXnZjYdNwwSI9g6g== - -"@napi-rs/simple-git-darwin-arm64@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-darwin-arm64/-/simple-git-darwin-arm64-0.1.8.tgz#e210808e6d646d6efecea84c67ced8eb44a8f821" - integrity sha512-ufy/36eI/j4UskEuvqSH7uXtp3oXeLDmjQCfKJz3u5Vx98KmOMKrqAm2H81AB2WOtCo5mqS6PbBeUXR8BJX8lQ== - -"@napi-rs/simple-git-darwin-x64@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-darwin-x64/-/simple-git-darwin-x64-0.1.8.tgz#d717525c33e0dfd8a6d6215da2fcbc0ad40011e1" - integrity sha512-Vb21U+v3tPJNl+8JtIHHT8HGe6WZ8o1Tq3f6p+Jx9Cz71zEbcIiB9FCEMY1knS/jwQEOuhhlI9Qk7d4HY+rprA== - -"@napi-rs/simple-git-linux-arm-gnueabihf@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-linux-arm-gnueabihf/-/simple-git-linux-arm-gnueabihf-0.1.8.tgz#03e7b2dd299c10e61bbf29f405ea74f6571cf6a1" - integrity sha512-6BPTJ7CzpSm2t54mRLVaUr3S7ORJfVJoCk2rQ8v8oDg0XAMKvmQQxOsAgqKBo9gYNHJnqrOx3AEuEgvB586BuQ== - -"@napi-rs/simple-git-linux-arm64-gnu@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-linux-arm64-gnu/-/simple-git-linux-arm64-gnu-0.1.8.tgz#945123f75c9a36fd0364e789ce06cd29a74a43cc" - integrity sha512-qfESqUCAA/XoQpRXHptSQ8gIFnETCQt1zY9VOkplx6tgYk9PCeaX4B1Xuzrh3eZamSCMJFn+1YB9Ut8NwyGgAA== - -"@napi-rs/simple-git-linux-arm64-musl@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-linux-arm64-musl/-/simple-git-linux-arm64-musl-0.1.8.tgz#2c20a0bff7c08f60b033ed7056dcb07bbbff8310" - integrity sha512-G80BQPpaRmQpn8dJGHp4I2/YVhWDUNJwcCrJAtAdbKFDCMyCHJBln2ERL/+IEUlIAT05zK/c1Z5WEprvXEdXow== - -"@napi-rs/simple-git-linux-x64-gnu@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-linux-x64-gnu/-/simple-git-linux-x64-gnu-0.1.8.tgz#980e22b7376252a0767298ec801d374d97553da1" - integrity sha512-NI6o1sZYEf6vPtNWJAm9w8BxJt+LlSFW0liSjYe3lc3e4dhMfV240f0ALeqlwdIldRPaDFwZSJX5/QbS7nMzhw== - -"@napi-rs/simple-git-linux-x64-musl@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-linux-x64-musl/-/simple-git-linux-x64-musl-0.1.8.tgz#edca3b2833dc5d3fc9151f5b931f7b14478ccca4" - integrity sha512-wljGAEOW41er45VTiU8kXJmO480pQKzsgRCvPlJJSCaEVBbmo6XXbFIXnZy1a2J3Zyy2IOsRB4PVkUZaNuPkZQ== - -"@napi-rs/simple-git-win32-arm64-msvc@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-win32-arm64-msvc/-/simple-git-win32-arm64-msvc-0.1.8.tgz#3ac4c7fe816a2cdafabd091ded76161d1ba1fe88" - integrity sha512-QuV4QILyKPfbWHoQKrhXqjiCClx0SxbCTVogkR89BwivekqJMd9UlMxZdoCmwLWutRx4z9KmzQqokvYI5QeepA== - -"@napi-rs/simple-git-win32-x64-msvc@0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git-win32-x64-msvc/-/simple-git-win32-x64-msvc-0.1.8.tgz#3b825bc2cb1c7ff535a3ca03768142d68bbf5c19" - integrity sha512-UzNS4JtjhZhZ5hRLq7BIUq+4JOwt1ThIKv11CsF1ag2l99f0123XvfEpjczKTaa94nHtjXYc2Mv9TjccBqYOew== - -"@napi-rs/simple-git@^0.1.8": - version "0.1.8" - resolved "https://registry.yarnpkg.com/@napi-rs/simple-git/-/simple-git-0.1.8.tgz#391cb58436d50bd32d924611d45bdc41f5e7607a" - integrity sha512-BvOMdkkofTz6lEE35itJ/laUokPhr/5ToMGlOH25YnhLD2yN1KpRAT4blW9tT8281/1aZjW3xyi73bs//IrDKA== - optionalDependencies: - "@napi-rs/simple-git-android-arm-eabi" "0.1.8" - "@napi-rs/simple-git-android-arm64" "0.1.8" - "@napi-rs/simple-git-darwin-arm64" "0.1.8" - "@napi-rs/simple-git-darwin-x64" "0.1.8" - "@napi-rs/simple-git-linux-arm-gnueabihf" "0.1.8" - "@napi-rs/simple-git-linux-arm64-gnu" "0.1.8" - "@napi-rs/simple-git-linux-arm64-musl" "0.1.8" - "@napi-rs/simple-git-linux-x64-gnu" "0.1.8" - "@napi-rs/simple-git-linux-x64-musl" "0.1.8" - "@napi-rs/simple-git-win32-arm64-msvc" "0.1.8" - "@napi-rs/simple-git-win32-x64-msvc" "0.1.8" - -"@next/env@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.4.tgz#46b620f6bef97fe67a1566bf570dbb791d40c50a" - integrity sha512-q/y7VZj/9YpgzDe64Zi6rY1xPizx80JjlU2BTevlajtaE3w1LqweH1gGgxou2N7hdFosXHjGrI4OUvtFXXhGLg== - -"@next/swc-darwin-arm64@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.4.tgz#8c14083c2478e2a9a8d140cce5900f76b75667ff" - integrity sha512-xfjgXvp4KalNUKZMHmsFxr1Ug+aGmmO6NWP0uoh4G3WFqP/mJ1xxfww0gMOeMeSq/Jyr5k7DvoZ2Pv+XOITTtw== - -"@next/swc-darwin-x64@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.4.tgz#5fe01c65c80fcb833c8789fd70f074ea99893864" - integrity sha512-ZY9Ti1hkIwJsxGus3nlubIkvYyB0gNOYxKrfsOrLEqD0I2iCX8D7w8v6QQZ2H+dDl6UT29oeEUdDUNGk4UEpfg== - -"@next/swc-linux-arm64-gnu@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.4.tgz#f2e071f38e8a6cdadf507cc5d28956f73360d064" - integrity sha512-+KZnDeMShYkpkqAvGCEDeqYTRADJXc6SY1jWXz+Uo6qWQO/Jd9CoyhTJwRSxvQA16MoYzvILkGaDqirkRNctyA== - -"@next/swc-linux-arm64-musl@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.4.tgz#23bf75c544e54562bc24ec1be036e4bd9cf89e2c" - integrity sha512-evC1twrny2XDT4uOftoubZvW3EG0zs0ZxMwEtu/dDGVRO5n5pT48S8qqEIBGBUZYu/Xx4zzpOkIxx1vpWdE+9A== - -"@next/swc-linux-x64-gnu@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.4.tgz#bd42590950a01957952206f89cf5622e7c9e4196" - integrity sha512-PX706XcCHr2FfkyhP2lpf+pX/tUvq6/ke7JYnnr0ykNdEMo+sb7cC/o91gnURh4sPYSiZJhsF2gbIqg9rciOHQ== - -"@next/swc-linux-x64-musl@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.4.tgz#907d81feb1abec3daec0ecb61e3f39b56e7aeafe" - integrity sha512-TKUUx3Ftd95JlHV6XagEnqpT204Y+IsEa3awaYIjayn0MOGjgKZMZibqarK3B1FsMSPaieJf2FEAcu9z0yT5aA== - -"@next/swc-win32-arm64-msvc@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.4.tgz#1d754d2bb10bdf9907c0acc83711438697c3b5fe" - integrity sha512-FP8AadgSq4+HPtim7WBkCMGbhr5vh9FePXiWx9+YOdjwdQocwoCK5ZVC3OW8oh3TWth6iJ0AXJ/yQ1q1cwSZ3A== - -"@next/swc-win32-ia32-msvc@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.4.tgz#77b2c7f7534b675d46e46301869e08d504d23956" - integrity sha512-3WekVmtuA2MCdcAOrgrI+PuFiFURtSyyrN1I3UPtS0ckR2HtLqyqmS334Eulf15g1/bdwMteePdK363X/Y9JMg== - -"@next/swc-win32-x64-msvc@13.4.4": - version "13.4.4" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.4.tgz#faab69239f8a9d0be7cd473e65f5a07735ef7b0e" - integrity sha512-AHRITu/CrlQ+qzoqQtEMfaTu7GHaQ6bziQln/pVWpOYC1wU+Mq6VQQFlsDtMCnDztPZtppAXdvvbNS7pcfRzlw== - -"@popperjs/core@^2.11.6": - version "2.11.8" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" - integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== - -"@swc/helpers@0.5.1": - version "0.5.1" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a" - integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg== - dependencies: - tslib "^2.4.0" - -"@types/acorn@^4.0.0": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.6.tgz#d61ca5480300ac41a7d973dd5b84d0a591154a22" - integrity sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ== - dependencies: - "@types/estree" "*" - -"@types/debug@^4.0.0": - version "4.1.8" - resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.8.tgz#cef723a5d0a90990313faec2d1e22aee5eecb317" - integrity sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ== - dependencies: - "@types/ms" "*" - -"@types/estree-jsx@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree-jsx/-/estree-jsx-1.0.0.tgz#7bfc979ab9f692b492017df42520f7f765e98df1" - integrity sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ== - dependencies: - "@types/estree" "*" - -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== - -"@types/hast@^2.0.0": - version "2.3.4" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.4.tgz#8aa5ef92c117d20d974a82bdfb6a648b08c0bafc" - integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g== - dependencies: - "@types/unist" "*" - -"@types/js-yaml@^4.0.0": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.5.tgz#738dd390a6ecc5442f35e7f03fa1431353f7e138" - integrity sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA== - -"@types/katex@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.14.0.tgz#b84c0afc3218069a5ad64fe2a95321881021b5fe" - integrity sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA== - -"@types/katex@^0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.16.0.tgz#0e640df3647fe237212be863e1f5111eb9754f93" - integrity sha512-hz+S3nV6Mym5xPbT9fnO8dDhBFQguMYpY0Ipxv06JMi1ORgnEM4M1ymWDUhUNer3ElLmT583opRo4RzxKmh9jw== - -"@types/mdast@^3.0.0": - version "3.0.11" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.11.tgz#dc130f7e7d9306124286f6d6cee40cf4d14a3dc0" - integrity sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw== - dependencies: - "@types/unist" "*" - -"@types/mdx@^2.0.0": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/mdx/-/mdx-2.0.5.tgz#9a85a8f70c7c4d9e695a21d5ae5c93645eda64b1" - integrity sha512-76CqzuD6Q7LC+AtbPqrvD9AqsN0k8bsYo2bM2J8pmNldP1aIPAbzUQ7QbobyXL4eLr1wK5x8FZFe8eF/ubRuBg== - -"@types/ms@*": - version "0.7.31" - resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" - integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== - -"@types/node@18.11.10": - version "18.11.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.10.tgz#4c64759f3c2343b7e6c4b9caf761c7a3a05cee34" - integrity sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ== - -"@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== - -"@types/react@>=16": - version "18.2.8" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.8.tgz#a77dcffe4e9af148ca4aa8000c51a1e8ed99e2c8" - integrity sha512-lTyWUNrd8ntVkqycEEplasWy2OxNlShj3zqS0LuB1ENUGis5HodmhM7DtCoUGbxj3VW/WsGA0DUhpG6XrM7gPA== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "*" - csstype "^3.0.2" - -"@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== - -"@types/unist@*", "@types/unist@^2.0.0": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" - integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== - -acorn-jsx@^5.0.0: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.0.0: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -ansi-sequence-parser@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" - integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== - -ansi-styles@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -arch@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" - integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== - -arg@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/arg/-/arg-1.0.0.tgz#444d885a4e25b121640b55155ef7cd03975d6050" - integrity sha512-Wk7TEzl1KqvTGs/uyhmHO/3XLd3t1UeU4IstvPXVzGPM522cTjqjNZ99esCkcL52sjqjo8e8CTBcWhkxvGzoAw== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -astring@^1.8.0: - version "1.8.6" - resolved "https://registry.yarnpkg.com/astring/-/astring-1.8.6.tgz#2c9c157cf1739d67561c56ba896e6948f6b93731" - integrity sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg== - -bail@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/bail/-/bail-2.0.2.tgz#d26f5cd8fe5d6f832a31517b9f7c356040ba6d5d" - integrity sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw== - -busboy@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -caniuse-lite@^1.0.30001406: - version "1.0.30001492" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b" - integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw== - -ccount@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" - integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== - -chalk@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - integrity sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q== - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -character-entities-html4@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" - integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== - -character-entities-legacy@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b" - integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== - -character-entities@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22" - integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ== - -character-reference-invalid@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz#85c66b041e43b47210faf401278abf808ac45cb9" - integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw== - -client-only@0.0.1, client-only@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" - integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== - -clipboardy@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.2.tgz#2ce320b9ed9be1514f79878b53ff9765420903e2" - integrity sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw== - dependencies: - arch "^2.1.0" - execa "^0.8.0" - -clsx@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" - integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -comma-separated-tokens@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" - integrity sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - -compute-scroll-into-view@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-3.0.3.tgz#c418900a5c56e2b04b885b54995df164535962b1" - integrity sha512-nadqwNxghAGTamwIqQSG433W6OADZx2vCo3UXHNrzTRHK/htu+7+L0zhjEoaeaQVNAi3YgqWDv8+tzf0hRfR+A== - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -csstype@^3.0.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" - integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== - -debug@^4.0.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decode-named-character-reference@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz#daabac9690874c394c81e4162a0304b35d824f0e" - integrity sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg== - dependencies: - character-entities "^2.0.0" - -dequal@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" - integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== - -diff@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" - integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== - -entities@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" - integrity sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estree-util-attach-comments@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/estree-util-attach-comments/-/estree-util-attach-comments-2.1.1.tgz#ee44f4ff6890ee7dfb3237ac7810154c94c63f84" - integrity sha512-+5Ba/xGGS6mnwFbXIuQiDPTbuTxuMCooq3arVv7gPZtYpjp+VXH/NkHAP35OOefPhNG/UGqU3vt/LTABwcHX0w== - dependencies: - "@types/estree" "^1.0.0" - -estree-util-build-jsx@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/estree-util-build-jsx/-/estree-util-build-jsx-2.2.2.tgz#32f8a239fb40dc3f3dca75bb5dcf77a831e4e47b" - integrity sha512-m56vOXcOBuaF+Igpb9OPAy7f9w9OIkb5yhjsZuaPm7HoGi4oTOQi0h2+yZ+AtKklYFZ+rPC4n0wYCJCEU1ONqg== - dependencies: - "@types/estree-jsx" "^1.0.0" - estree-util-is-identifier-name "^2.0.0" - estree-walker "^3.0.0" - -estree-util-is-identifier-name@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.1.0.tgz#fb70a432dcb19045e77b05c8e732f1364b4b49b2" - integrity sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ== - -estree-util-to-js@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/estree-util-to-js/-/estree-util-to-js-1.2.0.tgz#0f80d42443e3b13bd32f7012fffa6f93603f4a36" - integrity sha512-IzU74r1PK5IMMGZXUVZbmiu4A1uhiPgW5hm1GjcOfr4ZzHaMPpLNJjR7HjXiIOzi25nZDrgFTobHTkV5Q6ITjA== - dependencies: - "@types/estree-jsx" "^1.0.0" - astring "^1.8.0" - source-map "^0.7.0" - -estree-util-value-to-estree@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/estree-util-value-to-estree/-/estree-util-value-to-estree-1.3.0.tgz#1d3125594b4d6680f666644491e7ac1745a3df49" - integrity sha512-Y+ughcF9jSUJvncXwqRageavjrNPAI+1M/L3BI3PyLp1nmgYTGUXU6t5z1Y7OWuThoDdhPME07bQU+d5LxdJqw== - dependencies: - is-plain-obj "^3.0.0" - -estree-util-visit@^1.0.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/estree-util-visit/-/estree-util-visit-1.2.1.tgz#8bc2bc09f25b00827294703835aabee1cc9ec69d" - integrity sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/unist" "^2.0.0" - -estree-walker@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" - integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== - dependencies: - "@types/estree" "^1.0.0" - -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - integrity sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA== - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== - dependencies: - is-extendable "^0.1.0" - -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -flexsearch@^0.7.21: - version "0.7.31" - resolved "https://registry.yarnpkg.com/flexsearch/-/flexsearch-0.7.31.tgz#065d4110b95083110b9b6c762a71a77cc52e4702" - integrity sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA== - -focus-visible@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/focus-visible/-/focus-visible-5.2.0.tgz#3a9e41fccf587bd25dcc2ef045508284f0a4d6b3" - integrity sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ== - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== - -git-up@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467" - integrity sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ== - dependencies: - is-ssh "^1.4.0" - parse-url "^8.1.0" - -git-url-parse@^13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-13.1.0.tgz#07e136b5baa08d59fabdf0e33170de425adf07b4" - integrity sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA== - dependencies: - git-up "^7.0.0" - -github-slugger@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-2.0.0.tgz#52cf2f9279a21eb6c59dd385b410f0c0adda8f1a" - integrity sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw== - -graceful-fs@^4.2.11: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -gray-matter@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" - integrity sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q== - dependencies: - js-yaml "^3.13.1" - kind-of "^6.0.2" - section-matter "^1.0.0" - strip-bom-string "^1.0.0" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng== - -hash-obj@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/hash-obj/-/hash-obj-4.0.0.tgz#3fafeb0b5f17994441dbe04efbdee82e26b74c8c" - integrity sha512-FwO1BUVWkyHasWDW4S8o0ssQXjvyghLV2rfVhnN36b2bbcj45eGiuzdn9XOvOpjV3TKQD7Gm2BWNXdE9V4KKYg== - dependencies: - is-obj "^3.0.0" - sort-keys "^5.0.0" - type-fest "^1.0.2" - -hast-util-from-dom@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/hast-util-from-dom/-/hast-util-from-dom-4.2.0.tgz#25836ddecc3cc0849d32749c2a7aec03e94b59a7" - integrity sha512-t1RJW/OpJbCAJQeKi3Qrj1cAOLA0+av/iPFori112+0X7R3wng+jxLA+kXec8K4szqPRGI8vPxbbpEYvvpwaeQ== - dependencies: - hastscript "^7.0.0" - web-namespaces "^2.0.0" - -hast-util-from-html-isomorphic@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hast-util-from-html-isomorphic/-/hast-util-from-html-isomorphic-1.0.0.tgz#592b2bea880d476665b76ca1cf7d1a94925c80ec" - integrity sha512-Yu480AKeOEN/+l5LA674a+7BmIvtDj24GvOt7MtQWuhzUwlaaRWdEPXAh3Qm5vhuthpAipFb2vTetKXWOjmTvw== - dependencies: - "@types/hast" "^2.0.0" - hast-util-from-dom "^4.0.0" - hast-util-from-html "^1.0.0" - unist-util-remove-position "^4.0.0" - -hast-util-from-html@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/hast-util-from-html/-/hast-util-from-html-1.0.2.tgz#2482fd701b2d8270b912b3909d6fb645d4a346cf" - integrity sha512-LhrTA2gfCbLOGJq2u/asp4kwuG0y6NhWTXiPKP+n0qNukKy7hc10whqqCFfyvIA1Q5U5d0sp9HhNim9gglEH4A== - dependencies: - "@types/hast" "^2.0.0" - hast-util-from-parse5 "^7.0.0" - parse5 "^7.0.0" - vfile "^5.0.0" - vfile-message "^3.0.0" - -hast-util-from-parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/hast-util-from-parse5/-/hast-util-from-parse5-7.1.2.tgz#aecfef73e3ceafdfa4550716443e4eb7b02e22b0" - integrity sha512-Nz7FfPBuljzsN3tCQ4kCBKqdNhQE2l0Tn+X1ubgKBPRoiDIu1mL08Cfw4k7q71+Duyaw7DXDN+VTAp4Vh3oCOw== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - hastscript "^7.0.0" - property-information "^6.0.0" - vfile "^5.0.0" - vfile-location "^4.0.0" - web-namespaces "^2.0.0" - -hast-util-is-element@^2.0.0: - version "2.1.3" - resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-2.1.3.tgz#cd3279cfefb70da6d45496068f020742256fc471" - integrity sha512-O1bKah6mhgEq2WtVMk+Ta5K7pPMqsBBlmzysLdcwKVrqzZQ0CHqUPiIVspNhAG1rvxpvJjtGee17XfauZYKqVA== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - -hast-util-parse-selector@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-3.1.1.tgz#25ab00ae9e75cbc62cf7a901f68a247eade659e2" - integrity sha512-jdlwBjEexy1oGz0aJ2f4GKMaVKkA9jwjr4MjAAI22E5fM/TXVZHuS5OpONtdeIkRKqAaryQ2E9xNQxijoThSZA== - dependencies: - "@types/hast" "^2.0.0" - -hast-util-to-estree@^2.0.0: - version "2.3.3" - resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-2.3.3.tgz#da60142ffe19a6296923ec222aba73339c8bf470" - integrity sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ== - dependencies: - "@types/estree" "^1.0.0" - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - comma-separated-tokens "^2.0.0" - estree-util-attach-comments "^2.0.0" - estree-util-is-identifier-name "^2.0.0" - hast-util-whitespace "^2.0.0" - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdxjs-esm "^1.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - style-to-object "^0.4.1" - unist-util-position "^4.0.0" - zwitch "^2.0.0" - -hast-util-to-text@^3.1.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/hast-util-to-text/-/hast-util-to-text-3.1.2.tgz#ecf30c47141f41e91a5d32d0b1e1859fd2ac04f2" - integrity sha512-tcllLfp23dJJ+ju5wCCZHVpzsQQ43+moJbqVX3jNWPB7z/KFC4FyZD6R7y94cHL6MQ33YtMZL8Z0aIXXI4XFTw== - dependencies: - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - hast-util-is-element "^2.0.0" - unist-util-find-after "^4.0.0" - -hast-util-whitespace@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.1.tgz#0ec64e257e6fc216c7d14c8a1b74d27d650b4557" - integrity sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng== - -hastscript@^7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-7.2.0.tgz#0eafb7afb153d047077fa2a833dc9b7ec604d10b" - integrity sha512-TtYPq24IldU8iKoJQqvZOuhi5CyCQRAbvDOX0x1eW6rsHSxa/1i2CCiptNTotGHJ3VoHRGmqiv6/D3q113ikkw== - dependencies: - "@types/hast" "^2.0.0" - comma-separated-tokens "^2.0.0" - hast-util-parse-selector "^3.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - -inline-style-parser@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" - integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== - -intersection-observer@^0.12.2: - version "0.12.2" - resolved "https://registry.yarnpkg.com/intersection-observer/-/intersection-observer-0.12.2.tgz#4a45349cc0cd91916682b1f44c28d7ec737dc375" - integrity sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg== - -is-alphabetical@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b" - integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ== - -is-alphanumerical@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz#7c03fbe96e3e931113e57f964b0a368cc2dfd875" - integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw== - dependencies: - is-alphabetical "^2.0.0" - is-decimal "^2.0.0" - -is-buffer@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-decimal@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7" - integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A== - -is-extendable@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - -is-hexadecimal@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027" - integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== - -is-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-3.0.0.tgz#b0889f1f9f8cb87e87df53a8d1230a2250f8b9be" - integrity sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ== - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-3.0.0.tgz#af6f2ea14ac5a646183a5bbdb5baabbc156ad9d7" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -is-plain-obj@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" - integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== - -is-reference@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-3.0.1.tgz#d400f4260f7e55733955e60d361d827eb4d3b831" - integrity sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w== - dependencies: - "@types/estree" "*" - -is-ssh@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2" - integrity sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ== - dependencies: - protocols "^2.0.1" - -is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - -katex@^0.16.0, katex@^0.16.7: - version "0.16.7" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.7.tgz#36be1d4ed96e8afdc5863407e70f8fb250aeafd5" - integrity sha512-Xk9C6oGKRwJTfqfIbtr0Kes9OSv6IFsuhFGc7tW4urlpMJtuh+7YhzU6YEG9n8gmWKcMAFzkp7nr+r69kV0zrA== - dependencies: - commander "^8.3.0" - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -kleur@^4.0.3: - version "4.1.5" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" - integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== - -lodash.get@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== - -longest-streak@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4" - integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g== - -loose-envify@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -markdown-extensions@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.1.tgz#fea03b539faeaee9b4ef02a3769b455b189f7fc3" - integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q== - -markdown-table@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.3.tgz#e6331d30e493127e031dd385488b5bd326e4a6bd" - integrity sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw== - -match-sorter@^6.3.1: - version "6.3.1" - resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-6.3.1.tgz#98cc37fda756093424ddf3cbc62bfe9c75b92bda" - integrity sha512-mxybbo3pPNuA+ZuCUhm5bwNkXrJTbsk5VWbR5wiwz/GC6LIiegBGn2w3O08UG/jdbYLinw51fSQ5xNU1U3MgBw== - dependencies: - "@babel/runtime" "^7.12.5" - remove-accents "0.4.2" - -mdast-util-definitions@^5.0.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-5.1.2.tgz#9910abb60ac5d7115d6819b57ae0bcef07a3f7a7" - integrity sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - unist-util-visit "^4.0.0" - -mdast-util-find-and-replace@^2.0.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.2.tgz#cc2b774f7f3630da4bd592f61966fecade8b99b1" - integrity sha512-MTtdFRz/eMDHXzeK6W3dO7mXUlF82Gom4y0oOgvHhh/HXZAGvIQDUvQ0SuUx+j2tv44b8xTHOm8K/9OoRFnXKw== - dependencies: - "@types/mdast" "^3.0.0" - escape-string-regexp "^5.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.0.0" - -mdast-util-from-markdown@^1.0.0, mdast-util-from-markdown@^1.1.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz#9421a5a247f10d31d2faed2a30df5ec89ceafcf0" - integrity sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - decode-named-character-reference "^1.0.0" - mdast-util-to-string "^3.1.0" - micromark "^3.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-decode-string "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-stringify-position "^3.0.0" - uvu "^0.5.0" - -mdast-util-gfm-autolink-literal@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.3.tgz#67a13abe813d7eba350453a5333ae1bc0ec05c06" - integrity sha512-My8KJ57FYEy2W2LyNom4n3E7hKTuQk/0SES0u16tjA9Z3oFkF4RrC/hPAPgjlSpezsOvI8ObcXcElo92wn5IGA== - dependencies: - "@types/mdast" "^3.0.0" - ccount "^2.0.0" - mdast-util-find-and-replace "^2.0.0" - micromark-util-character "^1.0.0" - -mdast-util-gfm-footnote@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-footnote/-/mdast-util-gfm-footnote-1.0.2.tgz#ce5e49b639c44de68d5bf5399877a14d5020424e" - integrity sha512-56D19KOGbE00uKVj3sgIykpwKL179QsVFwx/DCW0u/0+URsryacI4MAdNJl0dh+u2PSsD9FtxPFbHCzJ78qJFQ== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - micromark-util-normalize-identifier "^1.0.0" - -mdast-util-gfm-strikethrough@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-strikethrough/-/mdast-util-gfm-strikethrough-1.0.3.tgz#5470eb105b483f7746b8805b9b989342085795b7" - integrity sha512-DAPhYzTYrRcXdMjUtUjKvW9z/FNAMTdU0ORyMcbmkwYNbKocDpdk+PX1L1dQgOID/+vVs1uBQ7ElrBQfZ0cuiQ== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-table@^1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-table/-/mdast-util-gfm-table-1.0.7.tgz#3552153a146379f0f9c4c1101b071d70bbed1a46" - integrity sha512-jjcpmNnQvrmN5Vx7y7lEc2iIOEytYv7rTvu+MeyAsSHTASGCCRA79Igg2uKssgOs1i1po8s3plW0sTu1wkkLGg== - dependencies: - "@types/mdast" "^3.0.0" - markdown-table "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm-task-list-item@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-gfm-task-list-item/-/mdast-util-gfm-task-list-item-1.0.2.tgz#b280fcf3b7be6fd0cc012bbe67a59831eb34097b" - integrity sha512-PFTA1gzfp1B1UaiJVyhJZA1rm0+Tzn690frc/L8vNX1Jop4STZgOE6bxUhnzdVSB+vm2GU1tIsuQcA9bxTQpMQ== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-gfm@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-gfm/-/mdast-util-gfm-2.0.2.tgz#e92f4d8717d74bdba6de57ed21cc8b9552e2d0b6" - integrity sha512-qvZ608nBppZ4icQlhQQIAdc6S3Ffj9RGmzwUKUWuEICFnd1LVkN3EktF7ZHAgfcEdvZB5owU9tQgt99e2TlLjg== - dependencies: - mdast-util-from-markdown "^1.0.0" - mdast-util-gfm-autolink-literal "^1.0.0" - mdast-util-gfm-footnote "^1.0.0" - mdast-util-gfm-strikethrough "^1.0.0" - mdast-util-gfm-table "^1.0.0" - mdast-util-gfm-task-list-item "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-math@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/mdast-util-math/-/mdast-util-math-2.0.2.tgz#19a06a81f31643f48cc805e7c31edb7ce739242c" - integrity sha512-8gmkKVp9v6+Tgjtq6SYx9kGPpTf6FVYRa53/DLh479aldR9AyP48qeVOgNZ5X7QUK7nOy4yw7vg6mbiGcs9jWQ== - dependencies: - "@types/mdast" "^3.0.0" - longest-streak "^3.0.0" - mdast-util-to-markdown "^1.3.0" - -mdast-util-mdx-expression@^1.0.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mdast-util-mdx-expression/-/mdast-util-mdx-expression-1.3.2.tgz#d027789e67524d541d6de543f36d51ae2586f220" - integrity sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-mdx-jsx@^2.0.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-2.1.4.tgz#7c1f07f10751a78963cfabee38017cbc8b7786d1" - integrity sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - ccount "^2.0.0" - mdast-util-from-markdown "^1.1.0" - mdast-util-to-markdown "^1.3.0" - parse-entities "^4.0.0" - stringify-entities "^4.0.0" - unist-util-remove-position "^4.0.0" - unist-util-stringify-position "^3.0.0" - vfile-message "^3.0.0" - -mdast-util-mdx@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-mdx/-/mdast-util-mdx-2.0.1.tgz#49b6e70819b99bb615d7223c088d295e53bb810f" - integrity sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw== - dependencies: - mdast-util-from-markdown "^1.0.0" - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdx-jsx "^2.0.0" - mdast-util-mdxjs-esm "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-mdxjs-esm@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.1.tgz#645d02cd607a227b49721d146fd81796b2e2d15b" - integrity sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-phrasing@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-phrasing/-/mdast-util-phrasing-3.0.1.tgz#c7c21d0d435d7fb90956038f02e8702781f95463" - integrity sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg== - dependencies: - "@types/mdast" "^3.0.0" - unist-util-is "^5.0.0" - -mdast-util-to-hast@^12.1.0: - version "12.3.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-12.3.0.tgz#045d2825fb04374e59970f5b3f279b5700f6fb49" - integrity sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-definitions "^5.0.0" - micromark-util-sanitize-uri "^1.1.0" - trim-lines "^3.0.0" - unist-util-generated "^2.0.0" - unist-util-position "^4.0.0" - unist-util-visit "^4.0.0" - -mdast-util-to-markdown@^1.0.0, mdast-util-to-markdown@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-markdown/-/mdast-util-to-markdown-1.5.0.tgz#c13343cb3fc98621911d33b5cd42e7d0731171c6" - integrity sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A== - dependencies: - "@types/mdast" "^3.0.0" - "@types/unist" "^2.0.0" - longest-streak "^3.0.0" - mdast-util-phrasing "^3.0.0" - mdast-util-to-string "^3.0.0" - micromark-util-decode-string "^1.0.0" - unist-util-visit "^4.0.0" - zwitch "^2.0.0" - -mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz#66f7bb6324756741c5f47a53557f0cbf16b6f789" - integrity sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg== - dependencies: - "@types/mdast" "^3.0.0" - -micromark-core-commonmark@^1.0.0, micromark-core-commonmark@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz#1386628df59946b2d39fb2edfd10f3e8e0a75bb8" - integrity sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-factory-destination "^1.0.0" - micromark-factory-label "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-factory-title "^1.0.0" - micromark-factory-whitespace "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-html-tag-name "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - uvu "^0.5.0" - -micromark-extension-gfm-autolink-literal@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-1.0.5.tgz#5853f0e579bbd8ef9e39a7c0f0f27c5a063a66e7" - integrity sha512-z3wJSLrDf8kRDOh2qBtoTRD53vJ+CWIyo7uyZuxf/JAbNJjiHsOpG1y5wxk8drtv3ETAHutCu6N3thkOOgueWg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-extension-gfm-footnote@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-footnote/-/micromark-extension-gfm-footnote-1.1.2.tgz#05e13034d68f95ca53c99679040bc88a6f92fe2e" - integrity sha512-Yxn7z7SxgyGWRNa4wzf8AhYYWNrwl5q1Z8ii+CSTTIqVkmGZF1CElX2JI8g5yGoM3GAman9/PVCUFUSJ0kB/8Q== - dependencies: - micromark-core-commonmark "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-strikethrough@^1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-1.0.7.tgz#c8212c9a616fa3bf47cb5c711da77f4fdc2f80af" - integrity sha512-sX0FawVE1o3abGk3vRjOH50L5TTLr3b5XMqnP9YDRb34M0v5OoZhG+OHFz1OffZ9dlwgpTBKaT4XW/AsUVnSDw== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-classify-character "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-table@^1.0.0: - version "1.0.7" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-table/-/micromark-extension-gfm-table-1.0.7.tgz#dcb46074b0c6254c3fc9cc1f6f5002c162968008" - integrity sha512-3ZORTHtcSnMQEKtAOsBQ9/oHp9096pI/UvdPtN7ehKvrmZZ2+bbWhi0ln+I9drmwXMt5boocn6OlwQzNXeVeqw== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm-tagfilter@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-1.0.2.tgz#aa7c4dd92dabbcb80f313ebaaa8eb3dac05f13a7" - integrity sha512-5XWB9GbAUSHTn8VPU8/1DBXMuKYT5uOgEjJb8gN3mW0PNW5OPHpSdojoqf+iq1xo7vWzw/P8bAHY0n6ijpXF7g== - dependencies: - micromark-util-types "^1.0.0" - -micromark-extension-gfm-task-list-item@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-1.0.5.tgz#b52ce498dc4c69b6a9975abafc18f275b9dde9f4" - integrity sha512-RMFXl2uQ0pNQy6Lun2YBYT9g9INXtWJULgbt01D/x8/6yJ2qpKyzdZD3pi6UIkzF++Da49xAelVKUeUMqd5eIQ== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-gfm@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/micromark-extension-gfm/-/micromark-extension-gfm-2.0.3.tgz#e517e8579949a5024a493e49204e884aa74f5acf" - integrity sha512-vb9OoHqrhCmbRidQv/2+Bc6pkP0FrtlhurxZofvOEy5o8RtuuvTq+RQ1Vw5ZDNrVraQZu3HixESqbG+0iKk/MQ== - dependencies: - micromark-extension-gfm-autolink-literal "^1.0.0" - micromark-extension-gfm-footnote "^1.0.0" - micromark-extension-gfm-strikethrough "^1.0.0" - micromark-extension-gfm-table "^1.0.0" - micromark-extension-gfm-tagfilter "^1.0.0" - micromark-extension-gfm-task-list-item "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-extension-math@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/micromark-extension-math/-/micromark-extension-math-2.1.2.tgz#52c70cc8266cd20ada1ef5a479bfed9a19b789bf" - integrity sha512-es0CcOV89VNS9wFmyn+wyFTKweXGW4CEvdaAca6SWRWPyYCbBisnjaHLjWO4Nszuiud84jCpkHsqAJoa768Pvg== - dependencies: - "@types/katex" "^0.16.0" - katex "^0.16.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-mdx-expression@^1.0.0: - version "1.0.8" - resolved "https://registry.yarnpkg.com/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-1.0.8.tgz#5bc1f5fd90388e8293b3ef4f7c6f06c24aff6314" - integrity sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw== - dependencies: - "@types/estree" "^1.0.0" - micromark-factory-mdx-expression "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-mdx-jsx@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-1.0.5.tgz#e72d24b7754a30d20fb797ece11e2c4e2cae9e82" - integrity sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA== - dependencies: - "@types/acorn" "^4.0.0" - "@types/estree" "^1.0.0" - estree-util-is-identifier-name "^2.0.0" - micromark-factory-mdx-expression "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-extension-mdx-md@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-extension-mdx-md/-/micromark-extension-mdx-md-1.0.1.tgz#595d4b2f692b134080dca92c12272ab5b74c6d1a" - integrity sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA== - dependencies: - micromark-util-types "^1.0.0" - -micromark-extension-mdxjs-esm@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-1.0.5.tgz#e4f8be9c14c324a80833d8d3a227419e2b25dec1" - integrity sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w== - dependencies: - "@types/estree" "^1.0.0" - micromark-core-commonmark "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-position-from-estree "^1.1.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-extension-mdxjs@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.1.tgz#f78d4671678d16395efeda85170c520ee795ded8" - integrity sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q== - dependencies: - acorn "^8.0.0" - acorn-jsx "^5.0.0" - micromark-extension-mdx-expression "^1.0.0" - micromark-extension-mdx-jsx "^1.0.0" - micromark-extension-mdx-md "^1.0.0" - micromark-extension-mdxjs-esm "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-destination@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz#eb815957d83e6d44479b3df640f010edad667b9f" - integrity sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-label@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz#cc95d5478269085cfa2a7282b3de26eb2e2dec68" - integrity sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-factory-mdx-expression@^1.0.0: - version "1.0.9" - resolved "https://registry.yarnpkg.com/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-1.0.9.tgz#57ba4571b69a867a1530f34741011c71c73a4976" - integrity sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA== - dependencies: - "@types/estree" "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-position-from-estree "^1.0.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-factory-space@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz#c8f40b0640a0150751d3345ed885a080b0d15faf" - integrity sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-title@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz#dd0fe951d7a0ac71bdc5ee13e5d1465ad7f50ea1" - integrity sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-factory-whitespace@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz#798fb7489f4c8abafa7ca77eed6b5745853c9705" - integrity sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-character@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/micromark-util-character/-/micromark-util-character-1.2.0.tgz#4fedaa3646db249bc58caeb000eb3549a8ca5dcc" - integrity sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg== - dependencies: - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-chunked@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz#37a24d33333c8c69a74ba12a14651fd9ea8a368b" - integrity sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-classify-character@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz#6a7f8c8838e8a120c8e3c4f2ae97a2bff9190e9d" - integrity sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-combine-extensions@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz#192e2b3d6567660a85f735e54d8ea6e3952dbe84" - integrity sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-types "^1.0.0" - -micromark-util-decode-numeric-character-reference@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz#b1e6e17009b1f20bc652a521309c5f22c85eb1c6" - integrity sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-decode-string@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz#dc12b078cba7a3ff690d0203f95b5d5537f2809c" - integrity sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ== - dependencies: - decode-named-character-reference "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz#92e4f565fd4ccb19e0dcae1afab9a173bbeb19a5" - integrity sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw== - -micromark-util-events-to-acorn@^1.0.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-1.2.3.tgz#a4ab157f57a380e646670e49ddee97a72b58b557" - integrity sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w== - dependencies: - "@types/acorn" "^4.0.0" - "@types/estree" "^1.0.0" - "@types/unist" "^2.0.0" - estree-util-visit "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-util-html-tag-name@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz#48fd7a25826f29d2f71479d3b4e83e94829b3588" - integrity sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q== - -micromark-util-normalize-identifier@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz#7a73f824eb9f10d442b4d7f120fecb9b38ebf8b7" - integrity sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q== - dependencies: - micromark-util-symbol "^1.0.0" - -micromark-util-resolve-all@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz#4652a591ee8c8fa06714c9b54cd6c8e693671188" - integrity sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA== - dependencies: - micromark-util-types "^1.0.0" - -micromark-util-sanitize-uri@^1.0.0, micromark-util-sanitize-uri@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz#613f738e4400c6eedbc53590c67b197e30d7f90d" - integrity sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A== - dependencies: - micromark-util-character "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-symbol "^1.0.0" - -micromark-util-subtokenize@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz#941c74f93a93eaf687b9054aeb94642b0e92edb1" - integrity sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A== - dependencies: - micromark-util-chunked "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-util-symbol@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz#813cd17837bdb912d069a12ebe3a44b6f7063142" - integrity sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag== - -micromark-util-types@^1.0.0, micromark-util-types@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/micromark-util-types/-/micromark-util-types-1.1.0.tgz#e6676a8cae0bb86a2171c498167971886cb7e283" - integrity sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg== - -micromark@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/micromark/-/micromark-3.2.0.tgz#1af9fef3f995ea1ea4ac9c7e2f19c48fd5c006e9" - integrity sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA== - dependencies: - "@types/debug" "^4.0.0" - debug "^4.0.0" - decode-named-character-reference "^1.0.0" - micromark-core-commonmark "^1.0.1" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-chunked "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-decode-numeric-character-reference "^1.0.0" - micromark-util-encode "^1.0.0" - micromark-util-normalize-identifier "^1.0.0" - micromark-util-resolve-all "^1.0.0" - micromark-util-sanitize-uri "^1.0.0" - micromark-util-subtokenize "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.1" - uvu "^0.5.0" - -mri@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" - integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -nanoid@^3.3.4: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -next-mdx-remote@^4.2.1: - version "4.4.1" - resolved "https://registry.yarnpkg.com/next-mdx-remote/-/next-mdx-remote-4.4.1.tgz#96b16e2adc54dbcd0a7f204a9a3c3fd269d41abf" - integrity sha512-1BvyXaIou6xy3XoNF4yaMZUCb6vD2GTAa5ciOa6WoO+gAUTYsb1K4rI/HSC2ogAWLrb/7VSV52skz07vOzmqIQ== - dependencies: - "@mdx-js/mdx" "^2.2.1" - "@mdx-js/react" "^2.2.1" - vfile "^5.3.0" - vfile-matter "^3.0.1" - -next-seo@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-6.0.0.tgz#4568dc61a44dbdf5fe5ff44156cd0ff8804889a2" - integrity sha512-jKKt1p1z4otMA28AyeoAONixVjdYmgFCWwpEFtu+DwRHQDllVX3RjtyXbuCQiUZEfQ9rFPBpAI90vDeLZlMBdg== - -next-themes@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.2.1.tgz#0c9f128e847979daf6c67f70b38e6b6567856e45" - integrity sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A== - -next@^13.0.6: - version "13.4.4" - resolved "https://registry.yarnpkg.com/next/-/next-13.4.4.tgz#d1027c8d77f4c51be0b39f671b4820db03c93e60" - integrity sha512-C5S0ysM0Ily9McL4Jb48nOQHT1BukOWI59uC3X/xCMlYIh9rJZCv7nzG92J6e1cOBqQbKovlpgvHWFmz4eKKEA== - dependencies: - "@next/env" "13.4.4" - "@swc/helpers" "0.5.1" - busboy "1.6.0" - caniuse-lite "^1.0.30001406" - postcss "8.4.14" - styled-jsx "5.1.1" - zod "3.21.4" - optionalDependencies: - "@next/swc-darwin-arm64" "13.4.4" - "@next/swc-darwin-x64" "13.4.4" - "@next/swc-linux-arm64-gnu" "13.4.4" - "@next/swc-linux-arm64-musl" "13.4.4" - "@next/swc-linux-x64-gnu" "13.4.4" - "@next/swc-linux-x64-musl" "13.4.4" - "@next/swc-win32-arm64-msvc" "13.4.4" - "@next/swc-win32-ia32-msvc" "13.4.4" - "@next/swc-win32-x64-msvc" "13.4.4" - -nextra-theme-docs@latest: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nextra-theme-docs/-/nextra-theme-docs-2.6.2.tgz#fd3b19d775110a64b1e3277e76b1f571345ab6d1" - integrity sha512-yvoLSf6rzeD3f6GA/vQabgEkwX3db7DOy87XhtwmqVip2O2XsW3DoMDuU7rzlCtCUmrsC583vymhd3YS6KKehg== - dependencies: - "@headlessui/react" "^1.7.10" - "@popperjs/core" "^2.11.6" - clsx "^1.2.1" - flexsearch "^0.7.21" - focus-visible "^5.2.0" - git-url-parse "^13.1.0" - intersection-observer "^0.12.2" - match-sorter "^6.3.1" - next-seo "^6.0.0" - next-themes "^0.2.1" - scroll-into-view-if-needed "^3.0.0" - zod "^3.20.2" - -nextra@latest: - version "2.6.2" - resolved "https://registry.yarnpkg.com/nextra/-/nextra-2.6.2.tgz#02db284c0eb246e51a28e5ded2ab278031a69ae7" - integrity sha512-1Rxb04AB9eIieJZq7LQTlcTUdXZcJ4g5rjPBnQ2EGUA8d7jCBhGyQoqDuZtblr8lDTRjIeMnJXCZo2HxIAtWhA== - dependencies: - "@mdx-js/mdx" "^2.3.0" - "@mdx-js/react" "^2.3.0" - "@napi-rs/simple-git" "^0.1.8" - clsx "^1.2.1" - github-slugger "^2.0.0" - graceful-fs "^4.2.11" - gray-matter "^4.0.3" - katex "^0.16.7" - lodash.get "^4.4.2" - next-mdx-remote "^4.2.1" - p-limit "^3.1.0" - rehype-katex "^6.0.3" - rehype-pretty-code "0.9.4" - remark-gfm "^3.0.1" - remark-math "^5.1.1" - remark-reading-time "^2.0.1" - shiki "^0.14.2" - slash "^3.0.0" - title "^3.5.3" - unist-util-remove "^3.1.1" - unist-util-visit "^4.1.1" - zod "^3.20.2" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== - dependencies: - path-key "^2.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== - -p-limit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -parse-entities@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-4.0.1.tgz#4e2a01111fb1c986549b944af39eeda258fc9e4e" - integrity sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w== - dependencies: - "@types/unist" "^2.0.0" - character-entities "^2.0.0" - character-entities-legacy "^3.0.0" - character-reference-invalid "^2.0.0" - decode-named-character-reference "^1.0.0" - is-alphanumerical "^2.0.0" - is-decimal "^2.0.0" - is-hexadecimal "^2.0.0" - -parse-numeric-range@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3" - integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== - -parse-path@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-7.0.0.tgz#605a2d58d0a749c8594405d8cc3a2bf76d16099b" - integrity sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog== - dependencies: - protocols "^2.0.0" - -parse-url@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-8.1.0.tgz#972e0827ed4b57fc85f0ea6b0d839f0d8a57a57d" - integrity sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w== - dependencies: - parse-path "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - -periscopic@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/periscopic/-/periscopic-3.1.0.tgz#7e9037bf51c5855bd33b48928828db4afa79d97a" - integrity sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw== - dependencies: - "@types/estree" "^1.0.0" - estree-walker "^3.0.0" - is-reference "^3.0.0" - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -postcss@8.4.14: - version "8.4.14" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" - integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -property-information@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.2.0.tgz#b74f522c31c097b5149e3c3cb8d7f3defd986a1d" - integrity sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg== - -protocols@^2.0.0, protocols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" - integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - -react-dom@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" - integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.0" - -react@^18.2.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== - dependencies: - loose-envify "^1.1.0" - -reading-time@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.5.0.tgz#d2a7f1b6057cb2e169beaf87113cc3411b5bc5bb" - integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg== - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -rehype-katex@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/rehype-katex/-/rehype-katex-6.0.3.tgz#83e5b929b0967978e9491c02117f55be3594d7e1" - integrity sha512-ByZlRwRUcWegNbF70CVRm2h/7xy7jQ3R9LaY4VVSvjnoVWwWVhNL60DiZsBpC5tSzYQOCvDbzncIpIjPZWodZA== - dependencies: - "@types/hast" "^2.0.0" - "@types/katex" "^0.14.0" - hast-util-from-html-isomorphic "^1.0.0" - hast-util-to-text "^3.1.0" - katex "^0.16.0" - unist-util-visit "^4.0.0" - -rehype-pretty-code@0.9.4: - version "0.9.4" - resolved "https://registry.yarnpkg.com/rehype-pretty-code/-/rehype-pretty-code-0.9.4.tgz#ab214026b530890c7a2e14c4f0881483e39e9cbc" - integrity sha512-3m4aQT15n8C+UizcZL0enaahoZwCDm5K1qKQ3DGgHE7U8l/DEEEJ/hm+uDe9yyK4sxVOSfZcRIMHrpJwLQi+Rg== - dependencies: - hash-obj "^4.0.0" - parse-numeric-range "^1.3.0" - -remark-gfm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/remark-gfm/-/remark-gfm-3.0.1.tgz#0b180f095e3036545e9dddac0e8df3fa5cfee54f" - integrity sha512-lEFDoi2PICJyNrACFOfDD3JlLkuSbOa5Wd8EPt06HUdptv8Gn0bxYTdbU/XXQ3swAPkEaGxxPN9cbnMHvVu1Ig== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-gfm "^2.0.0" - micromark-extension-gfm "^2.0.0" - unified "^10.0.0" - -remark-math@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/remark-math/-/remark-math-5.1.1.tgz#459e798d978d4ca032e745af0bac81ddcdf94964" - integrity sha512-cE5T2R/xLVtfFI4cCePtiRn+e6jKMtFDR3P8V3qpv8wpKjwvHoBA4eJzvX+nVrnlNy0911bdGmuspCSwetfYHw== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-math "^2.0.0" - micromark-extension-math "^2.0.0" - unified "^10.0.0" - -remark-mdx@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-2.3.0.tgz#efe678025a8c2726681bde8bf111af4a93943db4" - integrity sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g== - dependencies: - mdast-util-mdx "^2.0.0" - micromark-extension-mdxjs "^1.0.0" - -remark-parse@^10.0.0: - version "10.0.2" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-10.0.2.tgz#ca241fde8751c2158933f031a4e3efbaeb8bc262" - integrity sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw== - dependencies: - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - unified "^10.0.0" - -remark-reading-time@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/remark-reading-time/-/remark-reading-time-2.0.1.tgz#fe8bb8e420db7678dc749385167adb4fc99318f7" - integrity sha512-fy4BKy9SRhtYbEHvp6AItbRTnrhiDGbqLQTSYVbQPGuRCncU1ubSsh9p/W5QZSxtYcUXv8KGL0xBgPLyNJA1xw== - dependencies: - estree-util-is-identifier-name "^2.0.0" - estree-util-value-to-estree "^1.3.0" - reading-time "^1.3.0" - unist-util-visit "^3.1.0" - -remark-rehype@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/remark-rehype/-/remark-rehype-10.1.0.tgz#32dc99d2034c27ecaf2e0150d22a6dcccd9a6279" - integrity sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw== - dependencies: - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-to-hast "^12.1.0" - unified "^10.0.0" - -remove-accents@0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5" - integrity sha512-7pXIJqJOq5tFgG1A2Zxti3Ht8jJF337m4sowbuHsW30ZnkQFnDzy9qBNhgzX8ZLW4+UBcXiiR7SwR6pokHsxiA== - -sade@^1.7.3: - version "1.8.1" - resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" - integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== - dependencies: - mri "^1.1.0" - -scheduler@^0.23.0: - version "0.23.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" - integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== - dependencies: - loose-envify "^1.1.0" - -scroll-into-view-if-needed@^3.0.0: - version "3.0.10" - resolved "https://registry.yarnpkg.com/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.0.10.tgz#38fbfe770d490baff0fb2ba34ae3539f6ec44e13" - integrity sha512-t44QCeDKAPf1mtQH3fYpWz8IM/DyvHLjs8wUvvwMYxk5moOqCzrMSxK6HQVD0QVmVjXFavoFIPRVrMuJPKAvtg== - dependencies: - compute-scroll-into-view "^3.0.2" - -section-matter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/section-matter/-/section-matter-1.0.0.tgz#e9041953506780ec01d59f292a19c7b850b84167" - integrity sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA== - dependencies: - extend-shallow "^2.0.1" - kind-of "^6.0.0" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - -shiki@^0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.2.tgz#d51440800b701392b31ce2336036058e338247a1" - integrity sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - -signal-exit@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -sort-keys@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-5.0.0.tgz#5d775f8ae93ecc29bc7312bbf3acac4e36e3c446" - integrity sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw== - dependencies: - is-plain-obj "^4.0.0" - -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map@^0.7.0: - version "0.7.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - -space-separated-tokens@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f" - integrity sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -stringify-entities@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.3.tgz#cfabd7039d22ad30f3cc435b0ca2c1574fc88ef8" - integrity sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g== - dependencies: - character-entities-html4 "^2.0.0" - character-entities-legacy "^3.0.0" - -strip-bom-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" - integrity sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g== - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - -style-to-object@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/style-to-object/-/style-to-object-0.4.1.tgz#53cf856f7cf7f172d72939d9679556469ba5de37" - integrity sha512-HFpbb5gr2ypci7Qw+IOhnP2zOU7e77b+rzM+wTzXzfi1PrtBCX0E7Pk4wL4iTLnhzZ+JgEGAhX81ebTg/aYjQw== - dependencies: - inline-style-parser "0.1.1" - -styled-jsx@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" - integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== - dependencies: - client-only "0.0.1" - -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - integrity sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw== - dependencies: - has-flag "^2.0.0" - -title@^3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/title/-/title-3.5.3.tgz#b338d701a3d949db6b49b2c86f409f9c2f36cd91" - integrity sha512-20JyowYglSEeCvZv3EZ0nZ046vLarO37prvV0mbtQV7C8DJPGgN967r8SJkqd3XK3K3lD3/Iyfp3avjfil8Q2Q== - dependencies: - arg "1.0.0" - chalk "2.3.0" - clipboardy "1.2.2" - titleize "1.0.0" - -titleize@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/titleize/-/titleize-1.0.0.tgz#7d350722061830ba6617631e0cfd3ea08398d95a" - integrity sha512-TARUb7z1pGvlLxgPk++7wJ6aycXF3GJ0sNSBTAsTuJrQG5QuZlkUQP+zl+nbjAh4gMX9yDw9ZYklMd7vAfJKEw== - -trim-lines@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338" - integrity sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg== - -trough@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/trough/-/trough-2.1.0.tgz#0f7b511a4fde65a46f18477ab38849b22c554876" - integrity sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g== - -tslib@^2.4.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" - integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== - -type-fest@^1.0.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-1.4.0.tgz#e9fb813fe3bf1744ec359d55d1affefa76f14be1" - integrity sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA== - -typescript@^4.9.3: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -unified@^10.0.0: - version "10.1.2" - resolved "https://registry.yarnpkg.com/unified/-/unified-10.1.2.tgz#b1d64e55dafe1f0b98bb6c719881103ecf6c86df" - integrity sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q== - dependencies: - "@types/unist" "^2.0.0" - bail "^2.0.0" - extend "^3.0.0" - is-buffer "^2.0.0" - is-plain-obj "^4.0.0" - trough "^2.0.0" - vfile "^5.0.0" - -unist-util-find-after@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/unist-util-find-after/-/unist-util-find-after-4.0.1.tgz#80c69c92b0504033638ce11973f4135f2c822e2d" - integrity sha512-QO/PuPMm2ERxC6vFXEPtmAutOopy5PknD+Oq64gGwxKtk4xwo9Z97t9Av1obPmGU0IyTa6EKYUfTrK2QJS3Ozw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-generated@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-2.0.1.tgz#e37c50af35d3ed185ac6ceacb6ca0afb28a85cae" - integrity sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A== - -unist-util-is@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.2.1.tgz#b74960e145c18dcb6226bc57933597f5486deae9" - integrity sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-position-from-estree@^1.0.0, unist-util-position-from-estree@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/unist-util-position-from-estree/-/unist-util-position-from-estree-1.1.2.tgz#8ac2480027229de76512079e377afbcabcfcce22" - integrity sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-position@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-4.0.4.tgz#93f6d8c7d6b373d9b825844645877c127455f037" - integrity sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-remove-position@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-4.0.2.tgz#a89be6ea72e23b1a402350832b02a91f6a9afe51" - integrity sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-visit "^4.0.0" - -unist-util-remove@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/unist-util-remove/-/unist-util-remove-3.1.1.tgz#8bfa181aff916bd32a4ed30b3ed76d0c21c077df" - integrity sha512-kfCqZK5YVY5yEa89tvpl7KnBBHu2c6CzMkqHUrlOqaRgGOMp0sMvwWOVrbAtj03KhovQB7i96Gda72v/EFE0vw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.0.0" - -unist-util-stringify-position@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz#03ad3348210c2d930772d64b489580c13a7db39d" - integrity sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg== - dependencies: - "@types/unist" "^2.0.0" - -unist-util-visit-parents@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-4.1.1.tgz#e83559a4ad7e6048a46b1bdb22614f2f3f4724f2" - integrity sha512-1xAFJXAKpnnJl8G7K5KgU7FY55y3GcLIXqkzUj5QF/QVP7biUm0K0O2oqVkYsdjzJKifYeWn9+o6piAK2hGSHw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit-parents@^5.0.0, unist-util-visit-parents@^5.1.1: - version "5.1.3" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz#b4520811b0ca34285633785045df7a8d6776cfeb" - integrity sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - -unist-util-visit@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-3.1.0.tgz#9420d285e1aee938c7d9acbafc8e160186dbaf7b" - integrity sha512-Szoh+R/Ll68QWAyQyZZpQzZQm2UPbxibDvaY8Xc9SUtYgPsDzx5AWSk++UUt2hJuow8mvwR+rG+LQLw+KsuAKA== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^4.0.0" - -unist-util-visit@^4.0.0, unist-util-visit@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.2.tgz#125a42d1eb876283715a3cb5cceaa531828c72e2" - integrity sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg== - dependencies: - "@types/unist" "^2.0.0" - unist-util-is "^5.0.0" - unist-util-visit-parents "^5.1.1" - -uvu@^0.5.0: - version "0.5.6" - resolved "https://registry.yarnpkg.com/uvu/-/uvu-0.5.6.tgz#2754ca20bcb0bb59b64e9985e84d2e81058502df" - integrity sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA== - dependencies: - dequal "^2.0.0" - diff "^5.0.0" - kleur "^4.0.3" - sade "^1.7.3" - -vfile-location@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-4.1.0.tgz#69df82fb9ef0a38d0d02b90dd84620e120050dd0" - integrity sha512-YF23YMyASIIJXpktBa4vIGLJ5Gs88UB/XePgqPmTa7cDA+JeO3yclbpheQYCHjVHBn/yePzrXuygIL+xbvRYHw== - dependencies: - "@types/unist" "^2.0.0" - vfile "^5.0.0" - -vfile-matter@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/vfile-matter/-/vfile-matter-3.0.1.tgz#85e26088e43aa85c04d42ffa3693635fa2bc5624" - integrity sha512-CAAIDwnh6ZdtrqAuxdElUqQRQDQgbbIrYtDYI8gCjXS1qQ+1XdLoK8FIZWxJwn0/I+BkSSZpar3SOgjemQz4fg== - dependencies: - "@types/js-yaml" "^4.0.0" - is-buffer "^2.0.0" - js-yaml "^4.0.0" - -vfile-message@^3.0.0: - version "3.1.4" - resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-3.1.4.tgz#15a50816ae7d7c2d1fa87090a7f9f96612b59dea" - integrity sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-stringify-position "^3.0.0" - -vfile@^5.0.0, vfile@^5.3.0: - version "5.3.7" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-5.3.7.tgz#de0677e6683e3380fafc46544cfe603118826ab7" - integrity sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g== - dependencies: - "@types/unist" "^2.0.0" - is-buffer "^2.0.0" - unist-util-stringify-position "^3.0.0" - vfile-message "^3.0.0" - -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - -web-namespaces@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" - integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ== - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zod@3.21.4, zod@^3.20.2: - version "3.21.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db" - integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== - -zwitch@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" - integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==