@rollup/browser 4.50.3-0 → 4.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.
|
|
4
|
-
Fri, 19 Sep 2025
|
|
3
|
+
Rollup.js v4.51.0
|
|
4
|
+
Fri, 19 Sep 2025 08:58:25 GMT - commit 1748736f5baae39b9560399606bba137747df048
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
var e="4.50.3-0",t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<64;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e,t){let n=0,s=0,i=0;do{const t=e.next();i=r[t],n|=(31&i)<<s,s+=5}while(32&i);const o=1&n;return n>>>=1,o&&(n=-2147483648|-n),t+n}function a(e,t,n){let s=t-n;s=s<0?-s<<1|1:s<<1;do{let t=31&s;s>>>=5,s>0&&(t|=32),e.write(i[t])}while(s>0);return t}function l(e,n){return!(e.pos>=n)&&e.peek()!==t}var c="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},u=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=c.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+c.decode(e.subarray(0,n)):t}},d=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function h(e){e.sort(p)}function p(e,t){return e[0]-t[0]}function f(e){const s=new u;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const u=e[c];if(c>0&&s.write(n),0===u.length)continue;let d=0;for(let e=0;e<u.length;e++){const n=u[e];e>0&&s.write(t),d=a(s,n[0],d),1!==n.length&&(i=a(s,n[1],i),r=a(s,n[2],r),o=a(s,n[3],o),4!==n.length&&(l=a(s,n[4],l)))}}return s.flush()}class m{constructor(e){this.bits=e instanceof m?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let g=class e{constructor(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,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.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function y(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.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 b=y();class E{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=f(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+b(this.toString())}}function x(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const A=Object.prototype.toString;function S(e){return"[object Object]"===A.call(e)}function $(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const v=/\w/;class P{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,s){if(t.length){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if("\n"===n[r])s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0,a=!1;else{if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?v.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}s.column+=1,this.generatedCodeColumn+=1,o=!1}r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const w="\n",I={insertLeft:!1,insertRight:!1,storeName:!1};class N{constructor(e,t={}){const n=new g(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new m},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new N(this.original,{filename:this.filename,offset:this.offset});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new m(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new P(e.hires),s=$(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)}),this.outro&&n.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?x(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new E(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(S(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0})}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return I.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),I.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return I.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),I.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(e+=this.offset,t+=this.offset,(n+=this.offset)>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new TypeError("replacement content must be a string");if(0!==this.original.length){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===s&&(I.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),I.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[e],a=this.byEnd[t];if(o){let e=o;for(;e!==a;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}o.edit(n,i,!r)}else{const s=new g(e,t,"").edit(n,i);a.next=s,s.previous=a}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(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){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 n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){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 n=this.byStart[e];for(;n;)n.reset(),n=t>n.end?this.byStart[n.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(w);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(w),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(w),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(w),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(w),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart[t.end]:this.byEnd[t.start],t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),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 n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);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 n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`}):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach(e=>{if(null!=e.index){const t=n(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}})}else{const t=this.original.match(e);if(t&&null!=t.index){const e=n(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&("function"==typeof t&&(t=t(e,s,n)),e!==t&&this.overwrite(s,s+e.length,t)),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){const e=n.slice(i,i+s);let r=t;"function"==typeof t&&(r=t(e,i,n)),e!==r&&this.overwrite(i,i+s,r)}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 k=Object.prototype.hasOwnProperty;let C=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 N)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!S(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=>{k.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(k.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 N(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 n;this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{~t.indexOf(e)||t.push(e)})});const s=new P(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=$(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext(n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)}),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?x(e.file,t.filename):t.filename),sourcesContent:this.uniqueSources.map(t=>e.includeContent?t.content:null),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new E(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort((t,n)=>e[t]-e[n])[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((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(t,n)=>n>0?e+t:t)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+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,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const R=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,D=/^\.?\.\//,O=/\\/g,_=/[/\\]/,L=/\.[^.]+$/;function M(e){return R.test(e)}function T(e){return D.test(e)}function B(e){return e.replace(O,"/")}function z(e){return e.split(_).pop()||""}function F(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function V(e){const t=L.exec(z(e));return t?t[0]:""}function j(e,t){const n=e.split(_).filter(Boolean),s=t.split(_).filter(Boolean);for("."===n[0]&&n.shift(),"."===s[0]&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;".."===s[0]&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function U(...e){const t=e.shift();if(!t)return"/";let n=t.split(_);for(const t of e)if(M(t))n=t.split(_);else{const e=t.split(_);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}function G(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const H={isNoStatement:!0};function W(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const q=/\S/g;function K(e,t){q.lastIndex=t;return q.exec(e).index}const X=/\s/;function J(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[t,t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function Y(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+J(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+J(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):G(r,t,o,l)):r.render(t,i)}function Z(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+W(t.original.slice(r.end,s.start),",")),o=a=c+1+J(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function Q(e,t,n){for(;;){const[s,i]=J(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function ee(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function te(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function ne(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${ee([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const se=Object.freeze(Object.create(null)),ie=Object.freeze({}),re=Object.freeze([]),oe=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function ae(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function le(){return new Set}function ce(){return[]}const ue=Symbol("Unknown Key"),de=Symbol("Unknown Non-Accessor Key"),he=Symbol("Unknown Integer"),pe=Symbol("Symbol.toStringTag"),fe=[],me=[ue],ge=[de],ye=[he],be=Symbol("Entities");class Ee{constructor(){this.entityPaths=Object.create(null,{[be]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]||=Object.create(null,{[be]:{value:new Set}});return t[be]}}const xe=new Ee;class Ae{constructor(){this.entityPaths=Object.create(null,{[be]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[be]:{value:new Map}});const i=ae(s[be],t,le);return!!i.has(n)||(i.add(n),!1)}}const Se=Object.freeze({[ue]:ie});class $e{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[ue])return!0;if("symbol"==typeof r)return n[s]=Se,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const ve=Object.freeze({[ue]:!0});class Pe{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[ue])return!0;const[s,i]=e;return s?"symbol"==typeof s?(this.includedPaths=ve,!1):i?n[s]===ue||(n[s]=ue,!1):!!n[s]||(n[s]=!0,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[ue])e.includePath([...n,ue],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===ue?[...n,s,ue]:[...n,s],t)}}}function we(e,t){if("MemberExpression"===e.type)return!e.computed&&we(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;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}}function Ie(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Ne(){return{accessed:new Ee,assigned:new Ee,brokenFlow:!1,called:new Ae,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ae,replacedVariableInits:new Map}}function ke(e,t){return 0!==(e&t)}function Ce(e,t,n){return e&~t|-n&t}const Re=Symbol("Unknown Value"),De=Symbol("Unknown Truthy Value"),Oe=Symbol("Unknown Falsy Value");class _e{constructor(){this.flags=0}get included(){return ke(this.flags,1)}set included(e){this.flags=Ce(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Te(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Me}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArguments(e,t){Be(e,t)}shouldBeIncluded(e){return!0}}const Le=new class extends _e{},Me=[Le,!1],Te=e=>{for(const t of e.args)t?.deoptimizePath(me)},Be=(e,t)=>{e.args[0]?.includePath(me,t),ze(e,t)},ze=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(me,t),s.include(t,!1))}},Fe={args:[null],type:0},Ve={args:[null,Le],type:1},je={args:[null],type:2,withNew:!1},Ue="ArrowFunctionExpression",Ge="CallExpression",He="ExportDefaultDeclaration",We="ExpressionStatement",qe="Identifier",Ke="Program",Xe="Property";function Je(e,t){return e.start<=t&&t<e.end}function Ye(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s});let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(Je(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function Ze(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const Qe="...";function et(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Ze(s[t-1].slice(0,n)).length+10+3,120),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=Ze(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${Qe}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Ze(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const tt="silent",nt="warn",st="info",it="debug",rt={[it]:0,[st]:1,[tt]:3,[nt]:2};function ot(e,t){const n=e.length<=1,s=e.map(e=>`"${e}"`);let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function at(e){const t=z(e);return t.slice(0,Math.max(0,t.length-V(e).length))}function lt(e){return M(e)?j(U(),e):e}function ct(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||M(e)}const ut=/^(\.\.\/)*\.\.$/;function dt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=B(j(F(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+z(t);if(ut.test(i))return[...i.split("/"),"..",z(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function ht(e){return`https://rollupjs.org/${e}`}const pt="troubleshooting/#error-name-is-not-exported-by-module",ft="configuration-options/#jsx",mt="configuration-options/#output-amd-id",gt="configuration-options/#output-dir",yt="configuration-options/#output-exports",bt="configuration-options/#output-format",Et="configuration-options/#output-inlinedynamicimports",xt="configuration-options/#output-interop",At="configuration-options/#output-manualchunks",St="configuration-options/#output-name",$t="configuration-options/#output-sourcemapfile",vt="plugin-development/#generatebundle";function Pt(e){throw e instanceof Error?e:wt(e)}function wt(e){kt(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function It(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=Ye(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=et(n,t,s)}}const Nt=Symbol("augmented");function kt(e){if(!e.plugin&&!e.loc||e[Nt])return;e[Nt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${lt(n)}${s}: `}const s=e.message;e.message=t+e.message,Zt(e,s)}const Ct="INVALID_EXPORT_OPTION",Rt="INVALID_IMPORT_ATTRIBUTE",Dt="INVALID_PLUGIN_HOOK",Ot="MISSING_EXPORT",_t="MISSING_IMPLICIT_DEPENDANT",Lt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Mt="PARSE_ERROR",Tt="SOURCEMAP_BROKEN",Bt="UNEXPECTED_NAMED_IMPORT",zt="UNRESOLVED_ENTRY",Ft="UNRESOLVED_IMPORT";function Vt(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function jt(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ut({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return It(i,n,t,e),i}function Gt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(lt).join(" -> ")}`}}function Ht(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${lt(t)}" was reexported through module "${lt(n)}" 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 "${lt(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function Wt(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${lt(t)} is at (${n}:${s})\n${et(e,n,s)}`}}function qt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${lt(t)}".`}}function Kt(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${lt(s)}" tried to import "${lt(n)}" with ${Xt(t)} attributes, but it was already imported elsewhere with ${Xt(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const Xt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function Jt(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${lt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:ht("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Yt(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} 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.`}}function Zt(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Qt(e,t,n){return{code:Ct,message:`"${e}" was specified for "output.exports", but entry module "${lt(n)}" has the following exports: ${ot(t)}`,url:ht(yt)}}function en(e){return{code:Rt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${lt(e)}". Import attributes need to have string keys and values.`}}function tn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:ht(t)}}function nn(e,t){return{binding:e,code:Ot,exporter:t,message:`Exported variable "${e}" is not defined in "${lt(t)}".`,url:ht(pt)}}function sn(e,t,n,s){const i={binding:e,code:Ot,exporter:n,id:t,url:ht(pt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${lt(n)}", but it is imported by "${lt(t)}".`};const r=".json"===V(n);return{...i,message:`"${e}" is not exported by "${lt(n)}", imported by "${lt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function rn(e){const t=[...e.implicitlyLoadedBefore].map(e=>lt(e.id)).sort();return{code:_t,message:`Module "${lt(e.id)}" that should be implicitly loaded before ${ot(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 on(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function an(e,t){return{code:Mt,message:e,pos:t}}function ln(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function cn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function un(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),Zt({cause:e,code:Mt,id:t,message:n,stack:e.stack},e.message)}function dn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function hn(e){return{code:Tt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function pn(e,t,n){const s=n?"reexport":"import";return{code:Bt,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${lt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:ht(xt)}}function fn(e){return{code:Bt,exporter:e,message:`There was a namespace "*" reexport from the external module "${lt(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:ht(xt)}}function mn(e){return{code:"VALIDATION_ERROR",message:e}}function gn(e,t,n,s,i){!function(e,t,n,s,i){if(n||i){const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:ht(t)}}(e,t);if(i)return Pt(n);s(nt,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const yn=Symbol("PureFunction");class bn extends _e{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Ge&&e.parent.callee===e||e.parent.type===He||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class En extends bn{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)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function xn(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const An=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"]),Sn=/[^\w$]/g,$n=e=>(e=>/\d/.test(e[0]))(e)||An.has(e)||"arguments"===e;function vn(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Sn,"_"),$n(e)&&(e=`_${e}`),e||"_"}const Pn=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,wn=/^(?:0|[1-9]\d*)$/;function In(e){return Pn.test(e)?"__proto__"===e?'["__proto__"]':e:wn.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Nn(e){return Pn.test(e)?e:JSON.stringify(e)}class kn{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,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=vn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:re,dynamicallyImportedIds:re,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:re,implicitlyLoadedBefore:re,importedIdResolutions:re,importedIds:re,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){xn(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new En(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}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 n of e)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(nt,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${ot(i=e,["is","are"])} imported from external module "${s}" but never used in ${ot(r.map(e=>lt(e)))}.`,names:i})}}function Cn(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof kn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Rn=()=>{};var Dn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const On="_rollupAnnotations",_n="_rollupRemoved",Ln=(e,t)=>{if(0===e)return re;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=Mn(t[e++],t);return s},Mn=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Dn[t[e]]}},Tn={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},Bn="variables",zn=Symbol("IS_SKIPPED_CHAIN");class Fn extends _e{get deoptimized(){return ke(this.flags,2)}set deoptimized(e){this.flags=Ce(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of Tn[this.type]){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 Tn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(fe,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of Tn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of Tn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(me,e);else n.includePath(me,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===On?this.annotations=n:t===_n&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=new Array(n.length);let e=0;for(const s of n)this[t][e++]=null===s?null:new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s)}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return Tn[e.type]||=function(e){return Object.keys(e).filter(t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of Tn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(Ne())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Tn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(me);else t.deoptimizePath(me)}this.scope.context.requestTreeshakingPass()}}function Vn(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function jn(){this.included=!0}function Un(){this.deoptimized=!0}function Gn(e){return e instanceof Fn&&e.type===Ue}function Hn(e){return e instanceof Fn&&"FunctionExpression"===e.type}function Wn(e){return e instanceof Fn&&e.type===Ge}function qn(e){return e instanceof Fn&&"MemberExpression"===e.type}function Kn(e){return e instanceof Fn&&"ImportExpression"===e.type}function Xn(e){return e instanceof Fn&&e.type===qe}function Jn(e,t=null){return Object.create(t,e)}const Yn=new class extends _e{getLiteralValueAtPath(e){return e.length>0?Re:void 0}},Zn={value:{hasEffectsWhenCalled:null,returns:Le}},Qn=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(as,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(as,e[0],t,n)}},es={value:{hasEffectsWhenCalled:null,returns:Qn}},ts=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(ls,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(ls,e[0],t,n)}},ns={value:{hasEffectsWhenCalled:null,returns:ts}},ss=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(us,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(us,e[0],t,n)}},is={value:{hasEffectsWhenCalled:null,returns:ss}},rs={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(fe,xe,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(fe,je,t)},returns:ss}},os=Jn({hasOwnProperty:es,isPrototypeOf:es,propertyIsEnumerable:es,toLocaleString:is,toString:is,valueOf:Zn}),as=Jn({valueOf:es},os),ls=Jn({toExponential:is,toFixed:is,toLocaleString:is,toPrecision:is,valueOf:ns},os),cs=Jn({exec:Zn,test:es},os),us=Jn({anchor:is,at:Zn,big:is,blink:is,bold:is,charAt:is,charCodeAt:ns,codePointAt:Zn,concat:is,endsWith:es,fixed:is,fontcolor:is,fontsize:is,includes:es,indexOf:ns,italics:is,lastIndexOf:ns,link:is,localeCompare:ns,match:Zn,matchAll:Zn,normalize:is,padEnd:is,padStart:is,repeat:is,replace:rs,replaceAll:rs,search:ns,slice:is,small:is,split:Zn,startsWith:es,strike:is,sub:is,substr:is,substring:is,sup:is,toLocaleLowerCase:is,toLocaleUpperCase:is,toLowerCase:is,toString:is,toUpperCase:is,trim:is,trimEnd:is,trimLeft:is,trimRight:is,trimStart:is,valueOf:is},os);function ds(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function hs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Me}class ps extends _e{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(ye),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(me)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Me:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Le:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(ye,Ve,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(fe,je,s))return!0}return!1}}const fs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Qn})],ms=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ss})],gs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ts})],ys=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Le})],bs=/^\d+$/;class Es extends _e{get hasLostTrack(){return ke(this.flags,2048)}set hasLostTrack(e){this.flags=Ce(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return ke(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Ce(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return ke(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Ce(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],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(me);this.prototypeExpression?.deoptimizePath([ue,ue]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof s&&this.deoptimizedPaths[s]))return void Te(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 s){if(a[s]){const t=l[s];if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(bs.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(bs.test(e))for(const e of t)e.deoptimizePath(me);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===he)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===de);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?me:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],ue]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Re;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?Re:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Me;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):Me}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===de)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 s){if(r[s]){const e=o[s];if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){if(this.included=!0,0===e.length)return;const[n,...s]=e,[i,r]="string"==typeof n?[new Set([...this.propertiesAndGettersByKey[n]||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey[n]||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,me];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchablePropertiesAndSetters:l,unmatchableGetters:c,unmatchableSetters:u}=this;for(let d=e.length-1;d>=0;d--){const{key:h,kind:p,property:f}=e[d];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...l],i[h]=[f,...u]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...c]):(s[h]||(s[h]=[f,...l]),n[h]||(n[h]=[f,...a]));else{if(h===he){o.push(f);continue}"set"===p&&u.push(f),"get"===p&&c.push(f),"get"!==p&&l.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(me)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(bs.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ye)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&bs.test(e)||this.deoptimizedPaths[e])return Le;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&bs.test(e)?Le:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return Le;const n=this.getMemberExpression(e);if(n!==Le&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const xs=e=>"string"==typeof e&&/^\d+$/.test(e),As=new class extends _e{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||xs(t[0])||Te(e)}getLiteralValueAtPath(e){return 1===e.length&&xs(e[0])?void 0:Re}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Ss=new Es({__proto__:null,hasOwnProperty:fs,isPrototypeOf:fs,propertyIsEnumerable:fs,toLocaleString:ms,toString:ms,valueOf:ys},As,!0),$s=[{key:he,kind:"init",property:Le},{key:"length",kind:"init",property:ts}],vs=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Qn})],Ps=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ts})],ws=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Es($s,Ls),returnsPrimitive:null})],Is=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Es($s,Ls),returnsPrimitive:null})],Ns=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Es($s,Ls),returnsPrimitive:null})],ks=[new ps({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ts})],Cs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Le})],Rs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Le})],Ds=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Le})],Os=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],_s=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ls=new Es({__proto__:null,at:Rs,concat:Is,copyWithin:Os,entries:Is,every:vs,fill:Os,filter:Ns,find:Ds,findIndex:Ps,findLast:Ds,findLastIndex:Ps,flat:Is,flatMap:Ns,forEach:Ds,includes:fs,indexOf:gs,join:ms,keys:ys,lastIndexOf:gs,map:Ns,pop:Cs,push:ks,reduce:Ds,reduceRight:Ds,reverse:Os,shift:Cs,slice:Is,some:vs,sort:_s,splice:ws,toLocaleString:ms,toString:ms,unshift:ks,values:Rs},Ss,!0);class Ms extends Fn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,me,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(me,Fe,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(me,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([ue,ue]),this.scope.context.requestTreeshakingPass()}}class Ts extends Fn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(me,e)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof Ms)&&(e=!0,n.deoptimizePath(me))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:ts}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Ms?s&&(t=!0,e.unshift({key:he,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Yn})}return this.objectEntity=new Es(e,Ls)}}const Bs=Symbol("Value Properties"),zs=()=>Re,Fs=()=>!1,Vs=()=>!0,js={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:Fs},Us={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:Vs},Gs={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Ts)},Hs={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof _e)||s.hasEffectsOnInteractionAtPath(me,Fe,t)}},Ws={__proto__:null,[Bs]:Us},qs={__proto__:null,[Bs]:js},Ks={__proto__:null,[Bs]:Hs},Xs={__proto__:null,[Bs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(me)},getLiteralValue:zs,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(ge,Ve,t)}},Js={__proto__:null,[Bs]:Us,prototype:Ws},Ys={__proto__:null,[Bs]:js,prototype:Ws},Zs={__proto__:null,[Bs]:Gs,prototype:Ws},Qs={__proto__:null,[Bs]:js,from:Ws,of:qs,prototype:Ws},ei={__proto__:null,[Bs]:js,supportedLocalesOf:Ys},ti={global:Ws,globalThis:Ws,self:Ws,window:Ws,__proto__:null,[Bs]:Us,Array:{__proto__:null,[Bs]:Us,from:Ws,isArray:qs,of:qs,prototype:Ws},ArrayBuffer:{__proto__:null,[Bs]:js,isView:qs,prototype:Ws},AggregateError:Zs,Atomics:Ws,BigInt:Js,BigInt64Array:Js,BigUint64Array:Js,Boolean:Ys,constructor:Js,DataView:Ys,Date:{__proto__:null,[Bs]:js,now:qs,parse:qs,prototype:Ws,UTC:qs},decodeURI:qs,decodeURIComponent:qs,encodeURI:qs,encodeURIComponent:qs,Error:Ys,escape:qs,eval:Ws,EvalError:Ys,FinalizationRegistry:Js,Float32Array:Qs,Float64Array:Qs,Function:Js,hasOwnProperty:Ws,Infinity:Ws,Int16Array:Qs,Int32Array:Qs,Int8Array:Qs,isFinite:qs,isNaN:qs,isPrototypeOf:Ws,JSON:Ws,Map:Zs,Math:{__proto__:null,[Bs]:Us,abs:qs,acos:qs,acosh:qs,asin:qs,asinh:qs,atan:qs,atan2:qs,atanh:qs,cbrt:qs,ceil:qs,clz32:qs,cos:qs,cosh:qs,exp:qs,expm1:qs,floor:qs,fround:qs,hypot:qs,imul:qs,log:qs,log10:qs,log1p:qs,log2:qs,max:qs,min:qs,pow:qs,random:qs,round:qs,sign:qs,sin:qs,sinh:qs,sqrt:qs,tan:qs,tanh:qs,trunc:qs},NaN:Ws,Number:{__proto__:null,[Bs]:js,isFinite:qs,isInteger:qs,isNaN:qs,isSafeInteger:qs,parseFloat:qs,parseInt:qs,prototype:Ws},Object:{__proto__:null,[Bs]:js,create:qs,defineProperty:Xs,defineProperties:Xs,freeze:Xs,getOwnPropertyDescriptor:qs,getOwnPropertyDescriptors:qs,getOwnPropertyNames:qs,getOwnPropertySymbols:qs,getPrototypeOf:qs,hasOwn:qs,is:qs,isExtensible:qs,isFrozen:qs,isSealed:qs,keys:qs,fromEntries:Ws,entries:Ks,values:Ks,prototype:Ws},parseFloat:qs,parseInt:qs,Promise:{__proto__:null,[Bs]:Us,all:Ws,allSettled:Ws,any:Ws,prototype:Ws,race:Ws,reject:Ws,resolve:Ws},propertyIsEnumerable:Ws,Proxy:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof Fn&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof Fn&&e.type===Xe}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},fe,xe);return}}var n;e.deoptimizePath(me)},getLiteralValue:zs,hasEffectsWhenCalled:Vs}},RangeError:Ys,ReferenceError:Ys,Reflect:Ws,RegExp:Ys,Set:Zs,SharedArrayBuffer:Js,String:{__proto__:null,[Bs]:js,fromCharCode:qs,fromCodePoint:qs,prototype:Ws,raw:qs},Symbol:{__proto__:null,[Bs]:js,for:qs,keyFor:qs,prototype:Ws,toStringTag:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall:Rn,getLiteralValue:()=>pe,hasEffectsWhenCalled:Vs}}},SyntaxError:Ys,toLocaleString:Ws,toString:Ws,TypeError:Ys,Uint16Array:Qs,Uint32Array:Qs,Uint8Array:Qs,Uint8ClampedArray:Qs,unescape:qs,URIError:Ys,valueOf:Ws,WeakMap:Zs,WeakRef:Js,WeakSet:Zs,clearInterval:Js,clearTimeout:Js,console:{__proto__:null,[Bs]:Us,assert:Js,clear:Js,count:Js,countReset:Js,debug:Js,dir:Js,dirxml:Js,error:Js,exception:Js,group:Js,groupCollapsed:Js,groupEnd:Js,info:Js,log:Js,table:Js,time:Js,timeEnd:Js,timeLog:Js,trace:Js,warn:Js},Intl:{__proto__:null,[Bs]:Us,Collator:ei,DateTimeFormat:ei,DisplayNames:ei,ListFormat:ei,Locale:ei,NumberFormat:ei,PluralRules:ei,RelativeTimeFormat:ei,Segmenter:ei},setInterval:Js,setTimeout:Js,TextDecoder:Js,TextEncoder:Js,URL:{__proto__:null,[Bs]:Us,prototype:Ws,canParse:qs},URLSearchParams:Js,AbortController:Js,AbortSignal:Js,addEventListener:Ws,alert:Ws,AnalyserNode:Js,Animation:Js,AnimationEvent:Js,applicationCache:Ws,ApplicationCache:Js,ApplicationCacheErrorEvent:Js,atob:Ws,Attr:Js,Audio:Js,AudioBuffer:Js,AudioBufferSourceNode:Js,AudioContext:Js,AudioDestinationNode:Js,AudioListener:Js,AudioNode:Js,AudioParam:Js,AudioProcessingEvent:Js,AudioScheduledSourceNode:Js,AudioWorkletNode:Js,BarProp:Js,BaseAudioContext:Js,BatteryManager:Js,BeforeUnloadEvent:Js,BiquadFilterNode:Js,Blob:Js,BlobEvent:Js,blur:Ws,BroadcastChannel:Js,btoa:Ws,ByteLengthQueuingStrategy:Js,Cache:Js,caches:Ws,CacheStorage:Js,cancelAnimationFrame:Ws,cancelIdleCallback:Ws,CanvasCaptureMediaStreamTrack:Js,CanvasGradient:Js,CanvasPattern:Js,CanvasRenderingContext2D:Js,ChannelMergerNode:Js,ChannelSplitterNode:Js,CharacterData:Js,clientInformation:Ws,ClipboardEvent:Js,close:Ws,closed:Ws,CloseEvent:Js,Comment:Js,CompositionEvent:Js,confirm:Ws,ConstantSourceNode:Js,ConvolverNode:Js,CountQueuingStrategy:Js,createImageBitmap:Ws,Credential:Js,CredentialsContainer:Js,crypto:Ws,Crypto:Js,CryptoKey:Js,CSS:Js,CSSConditionRule:Js,CSSFontFaceRule:Js,CSSGroupingRule:Js,CSSImportRule:Js,CSSKeyframeRule:Js,CSSKeyframesRule:Js,CSSMediaRule:Js,CSSNamespaceRule:Js,CSSPageRule:Js,CSSRule:Js,CSSRuleList:Js,CSSStyleDeclaration:Js,CSSStyleRule:Js,CSSStyleSheet:Js,CSSSupportsRule:Js,CustomElementRegistry:Js,customElements:Ws,CustomEvent:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:zs,hasEffectsWhenCalled:Fs},prototype:Ws},DataTransfer:Js,DataTransferItem:Js,DataTransferItemList:Js,defaultstatus:Ws,defaultStatus:Ws,DelayNode:Js,DeviceMotionEvent:Js,DeviceOrientationEvent:Js,devicePixelRatio:Ws,dispatchEvent:Ws,document:Ws,Document:Js,DocumentFragment:Js,DocumentType:Js,DOMError:Js,DOMException:Js,DOMImplementation:Js,DOMMatrix:Js,DOMMatrixReadOnly:Js,DOMParser:Js,DOMPoint:Js,DOMPointReadOnly:Js,DOMQuad:Js,DOMRect:Js,DOMRectReadOnly:Js,DOMStringList:Js,DOMStringMap:Js,DOMTokenList:Js,DragEvent:Js,DynamicsCompressorNode:Js,Element:Js,ErrorEvent:Js,Event:Js,EventSource:Js,EventTarget:Js,external:Ws,fetch:Ws,File:Js,FileList:Js,FileReader:Js,find:Ws,focus:Ws,FocusEvent:Js,FontFace:Js,FontFaceSetLoadEvent:Js,FormData:Js,frames:Ws,GainNode:Js,Gamepad:Js,GamepadButton:Js,GamepadEvent:Js,getComputedStyle:Ws,getSelection:Ws,HashChangeEvent:Js,Headers:Js,history:Ws,History:Js,HTMLAllCollection:Js,HTMLAnchorElement:Js,HTMLAreaElement:Js,HTMLAudioElement:Js,HTMLBaseElement:Js,HTMLBodyElement:Js,HTMLBRElement:Js,HTMLButtonElement:Js,HTMLCanvasElement:Js,HTMLCollection:Js,HTMLContentElement:Js,HTMLDataElement:Js,HTMLDataListElement:Js,HTMLDetailsElement:Js,HTMLDialogElement:Js,HTMLDirectoryElement:Js,HTMLDivElement:Js,HTMLDListElement:Js,HTMLDocument:Js,HTMLElement:Js,HTMLEmbedElement:Js,HTMLFieldSetElement:Js,HTMLFontElement:Js,HTMLFormControlsCollection:Js,HTMLFormElement:Js,HTMLFrameElement:Js,HTMLFrameSetElement:Js,HTMLHeadElement:Js,HTMLHeadingElement:Js,HTMLHRElement:Js,HTMLHtmlElement:Js,HTMLIFrameElement:Js,HTMLImageElement:Js,HTMLInputElement:Js,HTMLLabelElement:Js,HTMLLegendElement:Js,HTMLLIElement:Js,HTMLLinkElement:Js,HTMLMapElement:Js,HTMLMarqueeElement:Js,HTMLMediaElement:Js,HTMLMenuElement:Js,HTMLMetaElement:Js,HTMLMeterElement:Js,HTMLModElement:Js,HTMLObjectElement:Js,HTMLOListElement:Js,HTMLOptGroupElement:Js,HTMLOptionElement:Js,HTMLOptionsCollection:Js,HTMLOutputElement:Js,HTMLParagraphElement:Js,HTMLParamElement:Js,HTMLPictureElement:Js,HTMLPreElement:Js,HTMLProgressElement:Js,HTMLQuoteElement:Js,HTMLScriptElement:Js,HTMLSelectElement:Js,HTMLShadowElement:Js,HTMLSlotElement:Js,HTMLSourceElement:Js,HTMLSpanElement:Js,HTMLStyleElement:Js,HTMLTableCaptionElement:Js,HTMLTableCellElement:Js,HTMLTableColElement:Js,HTMLTableElement:Js,HTMLTableRowElement:Js,HTMLTableSectionElement:Js,HTMLTemplateElement:Js,HTMLTextAreaElement:Js,HTMLTimeElement:Js,HTMLTitleElement:Js,HTMLTrackElement:Js,HTMLUListElement:Js,HTMLUnknownElement:Js,HTMLVideoElement:Js,IDBCursor:Js,IDBCursorWithValue:Js,IDBDatabase:Js,IDBFactory:Js,IDBIndex:Js,IDBKeyRange:Js,IDBObjectStore:Js,IDBOpenDBRequest:Js,IDBRequest:Js,IDBTransaction:Js,IDBVersionChangeEvent:Js,IdleDeadline:Js,IIRFilterNode:Js,Image:Js,ImageBitmap:Js,ImageBitmapRenderingContext:Js,ImageCapture:Js,ImageData:Js,indexedDB:Ws,innerHeight:Ws,innerWidth:Ws,InputEvent:Js,IntersectionObserver:Js,IntersectionObserverEntry:Js,isSecureContext:Ws,KeyboardEvent:Js,KeyframeEffect:Js,length:Ws,localStorage:Ws,location:Ws,Location:Js,locationbar:Ws,matchMedia:Ws,MediaDeviceInfo:Js,MediaDevices:Js,MediaElementAudioSourceNode:Js,MediaEncryptedEvent:Js,MediaError:Js,MediaKeyMessageEvent:Js,MediaKeySession:Js,MediaKeyStatusMap:Js,MediaKeySystemAccess:Js,MediaList:Js,MediaQueryList:Js,MediaQueryListEvent:Js,MediaRecorder:Js,MediaSettingsRange:Js,MediaSource:Js,MediaStream:Js,MediaStreamAudioDestinationNode:Js,MediaStreamAudioSourceNode:Js,MediaStreamEvent:Js,MediaStreamTrack:Js,MediaStreamTrackEvent:Js,menubar:Ws,MessageChannel:Js,MessageEvent:Js,MessagePort:Js,MIDIAccess:Js,MIDIConnectionEvent:Js,MIDIInput:Js,MIDIInputMap:Js,MIDIMessageEvent:Js,MIDIOutput:Js,MIDIOutputMap:Js,MIDIPort:Js,MimeType:Js,MimeTypeArray:Js,MouseEvent:Js,moveBy:Ws,moveTo:Ws,MutationEvent:Js,MutationObserver:Js,MutationRecord:Js,name:Ws,NamedNodeMap:Js,NavigationPreloadManager:Js,navigator:Ws,Navigator:Js,NetworkInformation:Js,Node:Js,NodeFilter:Ws,NodeIterator:Js,NodeList:Js,Notification:Js,OfflineAudioCompletionEvent:Js,OfflineAudioContext:Js,offscreenBuffering:Ws,OffscreenCanvas:Js,open:Ws,openDatabase:Ws,Option:Js,origin:Ws,OscillatorNode:Js,outerHeight:Ws,outerWidth:Ws,PageTransitionEvent:Js,pageXOffset:Ws,pageYOffset:Ws,PannerNode:Js,parent:Ws,Path2D:Js,PaymentAddress:Js,PaymentRequest:Js,PaymentRequestUpdateEvent:Js,PaymentResponse:Js,performance:Ws,Performance:Js,PerformanceEntry:Js,PerformanceLongTaskTiming:Js,PerformanceMark:Js,PerformanceMeasure:Js,PerformanceNavigation:Js,PerformanceNavigationTiming:Js,PerformanceObserver:Js,PerformanceObserverEntryList:Js,PerformancePaintTiming:Js,PerformanceResourceTiming:Js,PerformanceTiming:Js,PeriodicWave:Js,Permissions:Js,PermissionStatus:Js,personalbar:Ws,PhotoCapabilities:Js,Plugin:Js,PluginArray:Js,PointerEvent:Js,PopStateEvent:Js,postMessage:Ws,Presentation:Js,PresentationAvailability:Js,PresentationConnection:Js,PresentationConnectionAvailableEvent:Js,PresentationConnectionCloseEvent:Js,PresentationConnectionList:Js,PresentationReceiver:Js,PresentationRequest:Js,print:Ws,ProcessingInstruction:Js,ProgressEvent:Js,PromiseRejectionEvent:Js,prompt:Ws,PushManager:Js,PushSubscription:Js,PushSubscriptionOptions:Js,queueMicrotask:Ws,RadioNodeList:Js,Range:Js,ReadableStream:Js,RemotePlayback:Js,removeEventListener:Ws,Request:Js,requestAnimationFrame:Ws,requestIdleCallback:Ws,resizeBy:Ws,ResizeObserver:Js,ResizeObserverEntry:Js,resizeTo:Ws,Response:Js,RTCCertificate:Js,RTCDataChannel:Js,RTCDataChannelEvent:Js,RTCDtlsTransport:Js,RTCIceCandidate:Js,RTCIceTransport:Js,RTCPeerConnection:Js,RTCPeerConnectionIceEvent:Js,RTCRtpReceiver:Js,RTCRtpSender:Js,RTCSctpTransport:Js,RTCSessionDescription:Js,RTCStatsReport:Js,RTCTrackEvent:Js,screen:Ws,Screen:Js,screenLeft:Ws,ScreenOrientation:Js,screenTop:Ws,screenX:Ws,screenY:Ws,ScriptProcessorNode:Js,scroll:Ws,scrollbars:Ws,scrollBy:Ws,scrollTo:Ws,scrollX:Ws,scrollY:Ws,SecurityPolicyViolationEvent:Js,Selection:Js,ServiceWorker:Js,ServiceWorkerContainer:Js,ServiceWorkerRegistration:Js,sessionStorage:Ws,ShadowRoot:Js,SharedWorker:Js,SourceBuffer:Js,SourceBufferList:Js,speechSynthesis:Ws,SpeechSynthesisEvent:Js,SpeechSynthesisUtterance:Js,StaticRange:Js,status:Ws,statusbar:Ws,StereoPannerNode:Js,stop:Ws,Storage:Js,StorageEvent:Js,StorageManager:Js,styleMedia:Ws,StyleSheet:Js,StyleSheetList:Js,SubtleCrypto:Js,SVGAElement:Js,SVGAngle:Js,SVGAnimatedAngle:Js,SVGAnimatedBoolean:Js,SVGAnimatedEnumeration:Js,SVGAnimatedInteger:Js,SVGAnimatedLength:Js,SVGAnimatedLengthList:Js,SVGAnimatedNumber:Js,SVGAnimatedNumberList:Js,SVGAnimatedPreserveAspectRatio:Js,SVGAnimatedRect:Js,SVGAnimatedString:Js,SVGAnimatedTransformList:Js,SVGAnimateElement:Js,SVGAnimateMotionElement:Js,SVGAnimateTransformElement:Js,SVGAnimationElement:Js,SVGCircleElement:Js,SVGClipPathElement:Js,SVGComponentTransferFunctionElement:Js,SVGDefsElement:Js,SVGDescElement:Js,SVGDiscardElement:Js,SVGElement:Js,SVGEllipseElement:Js,SVGFEBlendElement:Js,SVGFEColorMatrixElement:Js,SVGFEComponentTransferElement:Js,SVGFECompositeElement:Js,SVGFEConvolveMatrixElement:Js,SVGFEDiffuseLightingElement:Js,SVGFEDisplacementMapElement:Js,SVGFEDistantLightElement:Js,SVGFEDropShadowElement:Js,SVGFEFloodElement:Js,SVGFEFuncAElement:Js,SVGFEFuncBElement:Js,SVGFEFuncGElement:Js,SVGFEFuncRElement:Js,SVGFEGaussianBlurElement:Js,SVGFEImageElement:Js,SVGFEMergeElement:Js,SVGFEMergeNodeElement:Js,SVGFEMorphologyElement:Js,SVGFEOffsetElement:Js,SVGFEPointLightElement:Js,SVGFESpecularLightingElement:Js,SVGFESpotLightElement:Js,SVGFETileElement:Js,SVGFETurbulenceElement:Js,SVGFilterElement:Js,SVGForeignObjectElement:Js,SVGGElement:Js,SVGGeometryElement:Js,SVGGradientElement:Js,SVGGraphicsElement:Js,SVGImageElement:Js,SVGLength:Js,SVGLengthList:Js,SVGLinearGradientElement:Js,SVGLineElement:Js,SVGMarkerElement:Js,SVGMaskElement:Js,SVGMatrix:Js,SVGMetadataElement:Js,SVGMPathElement:Js,SVGNumber:Js,SVGNumberList:Js,SVGPathElement:Js,SVGPatternElement:Js,SVGPoint:Js,SVGPointList:Js,SVGPolygonElement:Js,SVGPolylineElement:Js,SVGPreserveAspectRatio:Js,SVGRadialGradientElement:Js,SVGRect:Js,SVGRectElement:Js,SVGScriptElement:Js,SVGSetElement:Js,SVGStopElement:Js,SVGStringList:Js,SVGStyleElement:Js,SVGSVGElement:Js,SVGSwitchElement:Js,SVGSymbolElement:Js,SVGTextContentElement:Js,SVGTextElement:Js,SVGTextPathElement:Js,SVGTextPositioningElement:Js,SVGTitleElement:Js,SVGTransform:Js,SVGTransformList:Js,SVGTSpanElement:Js,SVGUnitTypes:Js,SVGUseElement:Js,SVGViewElement:Js,TaskAttributionTiming:Js,Text:Js,TextEvent:Js,TextMetrics:Js,TextTrack:Js,TextTrackCue:Js,TextTrackCueList:Js,TextTrackList:Js,TimeRanges:Js,toolbar:Ws,top:Ws,Touch:Js,TouchEvent:Js,TouchList:Js,TrackEvent:Js,TransitionEvent:Js,TreeWalker:Js,UIEvent:Js,ValidityState:Js,visualViewport:Ws,VisualViewport:Js,VTTCue:Js,WaveShaperNode:Js,WebAssembly:Ws,WebGL2RenderingContext:Js,WebGLActiveInfo:Js,WebGLBuffer:Js,WebGLContextEvent:Js,WebGLFramebuffer:Js,WebGLProgram:Js,WebGLQuery:Js,WebGLRenderbuffer:Js,WebGLRenderingContext:Js,WebGLSampler:Js,WebGLShader:Js,WebGLShaderPrecisionFormat:Js,WebGLSync:Js,WebGLTexture:Js,WebGLTransformFeedback:Js,WebGLUniformLocation:Js,WebGLVertexArrayObject:Js,WebSocket:Js,WheelEvent:Js,Window:Js,Worker:Js,WritableStream:Js,XMLDocument:Js,XMLHttpRequest:Js,XMLHttpRequestEventTarget:Js,XMLHttpRequestUpload:Js,XMLSerializer:Js,XPathEvaluator:Js,XPathExpression:Js,XPathResult:Js,XSLTProcessor:Js};for(const e of["window","global","self","globalThis"])ti[e]=ti;function ni(e){let t=ti;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[Bs]}class si extends bn{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(ni([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=ni([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=ni([this.name,...e]);return s?s.getLiteralValue():Re}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!ni([this.name]):!ni([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=ni([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const ii=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class ri extends bn{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new $e,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(me)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?Te(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=re;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,ue])}else this.init.deoptimizePath(ii(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Re:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Re)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?Me:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),Me)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const n of this.declarations){n.included||n.include(t,!1);let s=n.parent;for(;!s.included&&(s.includeNode(t),s.type!==Ke);)s=s.parent;"parameter"===this.kind&&(Gn(n.parent)||Hn(n.parent))&&Wn(n.parent.parent)&&qn(n.parent.parent.callee)&&Xn(n.parent.parent.callee.property)&&"then"===n.parent.parent.callee.property.name&&Kn(n.parent.parent.callee.object)&&n.parent.parent.callee.object.includePath(e,t)}e.length>0&&(this.init.includePath(ii(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(me,t)))}}includeCallArguments(e,t){this.isReassigned||t.includedCallArguments.has(this.init)||this.initPath.length>0?Be(e,t):(t.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),t.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Le,this.markReassigned()),this.additionalInitializers}}const oi=new Set(["class","const","let","var","using","await using"]);class ai extends Fn{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return ke(this.flags,4)?ke(this.flags,8):null}set isTDZAccess(e){this.flags=Ce(this.flags,4,!0),this.flags=Ce(this.flags,8,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof si&&!this.isPureFunction(fe)&&this.variable.hasEffectsOnInteractionAtPath(fe,Fe,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(me,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof ri&&this.variable.kind&&oi.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&li(this)===li(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof ri&&(this.variable.module.isExecuted||Cn(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(qt(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Le:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[yn])return!0;t=t[n]}return t?.[yn]}}function li(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class ci extends _e{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class ui extends ai{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return ke(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=Ce(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&we(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(fe),t.deoptimizePath([...e,ue])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,Fe,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new ci(n,t.slice(0,-1))],type:0},t,xe));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,Fe,Ne())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,fe,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=se){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&s===Ge&&i&&e.appendRight(this.start,"0, ")}}}function di(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function hi(e,t,n){let s=e,i=1;for(;t.has(s)||An.has(s)||n?.has(s);)s=`${e}$${di(i++)}`;return t.add(s),s}class pi{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(ln(r),e.start)}const a=new ri(e.name,e,n,s,t,i);return this.variables.set(r,a),a}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class fi extends pi{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof fi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof fi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof fi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,hi(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}function mi(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class gi extends Fn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){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},fe,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(fe,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Me,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(fe,je,xe,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}gi.prototype.includeNode=jn,gi.prototype.applyDeoptimizations=Un;class yi extends gi{hasEffects(e){return super.hasEffects(e)||mi(this.decorators,e)}}class bi extends fi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(ln(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Ei extends Fn{createScope(e){this.scope=new bi(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 n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=W(e.original.slice(this.start,this.end),"{")+1;Y(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function xi(e){return"StaticBlock"===e.type}Ei.prototype.includeNode=jn,Ei.prototype.applyDeoptimizations=Un;class Ai extends Fn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new fi(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)||mi(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",fe,this);for(const e of this.body.body)if(e instanceof yi&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)xi(e)||e.static||e instanceof yi&&"constructor"===e.kind||e.deoptimizePath(me);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(xi(n))continue;const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(fe,xe,this);if("symbol"==typeof e){s.push({key:ue,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof ui?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Es(t,this.superClass?new ci(this.superClass,["prototype"]):Ss)}),this.objectEntity=new Es(e,this.superClass||Ss)}}Ai.prototype.includeNode=Vn;class Si extends Ai{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${ee([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class $i extends ri{constructor(e){super("arguments",null,Le,fe,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=vi}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(me);this.deoptimizedArguments.length=0}}function vi(e){this.included?e.deoptimizePath(me):this.deoptimizedArguments?.push(e)}const Pi=re,wi=new Set([ue]),Ii=new Ee,Ni=new Set([Le]);class ki extends ri{constructor(e,t,n,s){super(e,t,Le,n,s,"parameter"),this.includedPathTracker=new Pe,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Ee,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Re}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===Le){if(!this.argumentsToBeDeoptimized.has(Le)){this.argumentsToBeDeoptimized.add(Le);for(const{interaction:e}of this.deoptimizationInteractions)Te(e);this.deoptimizationInteractions=Pi}}else if(this.deoptimizedFields.has(ue))e.deoptimizePath([...this.initPath,ue]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],xe)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=re}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,xe,this));if(this.knownValue===e||this.knownValue instanceof ui&&e instanceof ui&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,xe,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||Le}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Re;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Re)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(Le)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(ue)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)Te(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],xe);this.argumentsToBeDeoptimized.has(Le)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(ue))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===ue&&(this.deoptimizationInteractions=Pi,this.deoptimizations=Ii,this.deoptimizedFields=wi,this.argumentsToBeDeoptimized=Ni)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(me):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Me}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class Ci extends ki{constructor(e){super("this",null,fe,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Le).hasEffectsOnInteractionAtPath(e,t,n)}}class Ri extends fi{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,Yn,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(ln(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Di extends fi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(ln(r),e.start)}const a=new ri(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class Oi extends fi{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new Ri(this):new Di(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new ki(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof Ms&&!s&&(s=!0,r=n-1),s&&(i.includePath(me,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class _i extends Oi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof Ms){for(;n<t.length;n++){e[n+1]?.deoptimizePath(me);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(me);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(Yn)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(me),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Le;for(const e of this.returnExpressions)e.deoptimizePath(me)}}}class Li extends _i{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new $i(n)),this.variables.set("this",this.thisVariable=new Ci(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(me,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class Mi extends Fn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Ke&&this.scope.context.log(nt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${lt(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ke:super.shouldBeIncluded(e)}}Mi.prototype.includeNode=jn,Mi.prototype.applyDeoptimizations=Un;class Ti extends Fn{get deoptimizeBody(){return ke(this.flags,32768)}set deoptimizeBody(e){this.flags=Ce(this.flags,32768,e)}get directlyIncluded(){return ke(this.flags,16384)}set directlyIncluded(e){this.flags=Ce(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Le)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new bi(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 n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof Mi&&"use asm"===e.directive}render(e,t){this.body.length>0?Y(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}Ti.prototype.includeNode=jn,Ti.prototype.applyDeoptimizations=Un;class Bi extends Fn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,zi(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(zi(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(fe)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(fe,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,zi(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,zi(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([ue,ue]),this.scope.context.requestTreeshakingPass())}}Bi.prototype.includeNode=Vn;const zi=e=>e.at(-1)===ue?e:[...e,ue];class Fi extends Fn{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return ke(this.flags,256)}set async(e){this.flags=Ce(this.flags,256,e)}get deoptimizedReturn(){return ke(this.flags,512)}set deoptimizedReturn(e){this.flags=Ce(this.flags,512,e)}get generator(){return ke(this.flags,4194304)}set generator(e){this.flags=Ce(this.flags,4194304,e)}get hasCachedEffects(){return ke(this.flags,67108864)}set hasCachedEffects(e){this.flags=Ce(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===ue&&(this.scope.getReturnExpression().deoptimizePath(me),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(me),this.scope.context.requestTreeshakingPass()),Me):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],je,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Fe,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,fe,t.args[e+1]||Yn))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===He&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}initialise(){super.initialise(),this.body instanceof Ti?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map(e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e));return s.addParameterVariables(o.map(e=>e.declare("parameter",fe,Le)),o[o.length-1]instanceof Bi),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}Fi.prototype.preventChildBlockScope=!0,Fi.prototype.includeNode=jn,Fi.prototype.applyDeoptimizations=Un;class Vi extends Fi{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Li(e,this),this.constructedEntity=new Es(Object.create(null),Ss),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Le);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return this.hasCachedEffects=!0,!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof ui&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof ui&&!t||n.includePath(me,e)}initialise(){super.initialise(),this.id?.declare("function",fe,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Es([{key:"prototype",kind:"init",property:new Es([],Ss)}],Ss)}}class ji extends Vi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class Ui extends Fn{include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,me,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return K(e,W(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof ji)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=W(e,"function",t)+8;e=e.slice(n,W(e,"(",n));const s=W(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Si)this.renderNamedDeclaration(e,r,null===this.declaration.id?W(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void G(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:We}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof Si&&i.has(this.variable)&&e.appendLeft(this.end,` ${ee([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}Ui.prototype.needsBoundaries=!0,Ui.prototype.includeNode=jn,Ui.prototype.applyDeoptimizations=Un;const Gi=/[\n\r'\\\u2028\u2029]/,Hi=/([\n\r'\u2028\u2029])/g,Wi=/\\/g;function qi(e){return Gi.test(e)?e.replace(Wi,"\\\\").replace(Hi,"\\$1"):e}const Ki="_interopDefault",Xi="_interopDefaultCompat",Ji="_interopNamespace",Yi="_interopNamespaceCompat",Zi="_interopNamespaceDefault",Qi="_interopNamespaceDefaultOnly",er="_mergeNamespaces",tr="_documentCurrentScript",nr={auto:Ki,compat:Xi,default:null,defaultOnly:null,esModule:null},sr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),ir={auto:Ji,compat:Yi,default:Zi,defaultOnly:Qi,esModule:null},rr=(e,t)=>"esModule"!==e&&sr(e,t),or=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of xr)t.has(e)&&a.add(e);return xr.map(e=>a.has(e)?ar[e](n,s,i,r,o,a):"").join("")},ar={[tr]:(e,{_:t,n:n})=>`var ${tr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[Xi](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Xi});return`${o}${ur(t)}${s}?${s}${n?lr(t):cr(t)}${a}${r}${r}`},[Ki](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ki});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?lr(t):cr(t)}${a}${r}${r}`},[Yi](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Zi)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Yi});return`${e}${ur(t)}${o}?${o}e${o}:${o}${Zi}(e)${n}${l}${l}`}return`function ${Yi}(e)${o}{${l}${e}if${o}(${ur(t)})${o}return e;${l}`+dr(e,e,t,n,s,i)+`}${l}${l}`},[Qi](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Qi});return`${c}${br(s,Er(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Zi](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Zi}(e)${r}{${o}`+dr(e,e,t,n,s,i)+`}${o}${o}`},[Ji](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Zi)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ji});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Zi}(e)${t}${l}${l}`}return`function ${Ji}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+dr(e,e,t,n,s,i)+`}${l}${l}`},[er](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${er}(n, m)${r}{${a}${e}${pr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?mr:gr:yr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${br(s,Er(i,"n",t))};${a}}${a}${a}`}},lr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,cr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,ur=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,dr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?fr:yr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Ar(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${hr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${br(i,"n")}${d}${u}`},hr=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,pr=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},fr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+mr(e,t+e,n)+`${t}}${i}`},mr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},gr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},yr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,br=(e,t)=>e?`Object.freeze(${t})`:t,Er=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Ar(s)})`:t,xr=Object.keys(ar);function Ar(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Sr extends Fn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?Re:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Me:hs(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){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||ds(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return cs;switch(typeof e){case"boolean":return as;case"number":return ls;case"string":return us}return Object.create(null)}(this.value)}parseNode(e){return 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 $r(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(fe,xe,i);if(n===zn||e.optional&&null==n)return zn}else if(e.optional&&null==t.getLiteralValueAtPath(fe,xe,i))return zn;return e.getLiteralValueAtPath(n,s,i)}function vr(e){return e.computed?function(e){if(e instanceof Sr)return String(e.value);return null}(e.property):e.property.name}function Pr(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof ui)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof wr){const s=Pr(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Sr.prototype.includeNode=Vn;class wr extends Fn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}get optional(){return ke(this.flags,128)}set optional(e){this.flags=Ce(this.flags,128,e)}get assignmentDeoptimized(){return ke(this.flags,16)}set assignmentDeoptimized(e){this.flags=Ce(this.flags,16,e)}get bound(){return ke(this.flags,32)}set bound(e){this.flags=Ce(this.flags,32,e)}get isUndefined(){return ke(this.flags,64)}set isUndefined(e){this.flags=Ce(this.flags,64,e)}bind(){this.bound=!0;const e=Pr(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Ir(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===ue?me:[this.propertyKey,...t],n):Te(e))}deoptimizeAssignment(e,t){this.deoptimizePath(fe),t.deoptimizePath([...e,ue])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=re,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(me),this.included&&t.includePath(me,Ie());for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined){const{propertyKey:t}=this;this.object.deoptimizePath([t===ue?de:t,...e.length<6?e:[...e.slice(0,6),ue]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==ue&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Re}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:$r(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[Yn,!1];const i=this.getDynamicPropertyKey();return i!==ue&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):Me}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===zn?zn:this.optional&&null==this.object.getLiteralValueAtPath(fe,xe,this)?t||zn:(this.deoptimized||this.applyDeoptimizations(),t||this.property.hasEffects(e)||this.hasAccessEffect(e))}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(fe,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n))}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,Fe,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,fe,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,fe,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),ue]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArguments(e,t){var n;this.variable?this.variable.includeCallArguments(e,t):Kn(this.object)||this.object.variable&&!this.object.variable.isReassigned&&this.object.variable instanceof ri&&((n=this.object.variable.init)instanceof Fn&&"AwaitExpression"===n.type)&&Kn(this.object.variable.init.argument)?ze(e,t):Be(e,t)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=vr(this),this.propertyKey=null===this.dynamicPropertyKey?ue:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=se){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],xe),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.propertyKey],xe),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof ui){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,me,Ie()),this.scope.context.log(nt,qt(this.object.name,this.scope.context.module.id),this.start))}}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(fe,xe,this);return this.dynamicPropertyKey=e===pe?e:"symbol"==typeof e?ue:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function Ir(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof En)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(nt,sn(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return Ir(i,t.slice(1),n)}const Nr="ROLLUP_FILE_URL_",kr="ROLLUP_FILE_URL_OBJ_",Cr="import";class Rr extends Fn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===Cr){if(n?.startsWith(kr))return e.getFileName(n.slice(20));if(n?.startsWith(Nr))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===Cr){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof wr&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(kr)?this.referenceId=t.slice(20):t?.startsWith(Nr)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:u,start:d,end:h}=this,{id:p}=r;if(o!==Cr)return;const f=c;if(u){const t=s.getFileName(u),i=B(j(F(f),t)),r=!!a?.startsWith(kr),o=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||Vr[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=jr[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Dr.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof wr?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(d,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Nr)||this.metaProperty?.startsWith(kr)?_r:Or)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const Dr=["cjs","iife","umd"],Or={amd:["document","module","URL"],cjs:["document","require","URL",tr],es:[],iife:["document","URL",tr],system:["module"],umd:["document","require","URL",tr]},_r={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Lr=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,Mr=(e,t,n=!1)=>Lr(`'${qi(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),Tr=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},Br=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,zr=(e,t)=>Br(`__dirname + '/${qi(e)}'`,t),Fr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${tr} && ${tr}.tagName.toUpperCase() === 'SCRIPT' && ${tr}.src || new URL('${qi(e)}', document.baseURI).href)`,Vr={amd:(e,t)=>("."!==e[0]&&(e="./"+e),Lr(`require.toUrl('${qi(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${zr(e,t)} : ${Mr(e,t)})`,es:(e,t)=>Lr(`'${qi(e)}', import.meta.url`,t),iife:(e,t)=>Mr(e,t),system:(e,t)=>Lr(`'${qi(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${zr(e,t)} : ${Mr(e,t,!0)})`},jr={amd:Tr(()=>Lr("module.uri, document.baseURI",!1)),cjs:Tr(e=>`(typeof document === 'undefined' ? ${Br("__filename",!1)} : ${Fr(e)})`),iife:Tr(e=>Fr(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Tr(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Br("__filename",!1)} : ${Fr(e,!0)})`)};class Ur extends bn{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Gr extends ri{constructor(e,t,n){super(e,t,t.declaration,fe,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof ji||s instanceof Si)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof ui&&(this.originalId=s)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}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 Ur||"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 n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof Gr&&!n.has(t));return this.originalVariable=t||e}}class Hr extends bn{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,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):Te(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]===pe?"Module":Re}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const[t]=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([er],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter(([e,t])=>t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${In(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));f=`/*#__PURE__*/${er}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Ar(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${u}${ee([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}}Hr.prototype.isNamespace=!0;class Wr extends bn{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof Gr||e instanceof Wr;){if(e instanceof Gr){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof Wr&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,e,t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class qr{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=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?B(j(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=Kr(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return qi(this.renormalizeRenderPath?dt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function Kr(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,`'${t}'`]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Xr(e){return e.endsWith(".js")?e.slice(0,-3):e}function Jr(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Xr(t)}`:e.id??""}function Yr(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:d,getPropertyAccess:h,n:p,s:f}=i;if(!n)return`${p}${p}${l}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:u}of t)if(u)return Zr(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,h)};`;let m="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:i,name:a,namedExportsMode:l,namespaceVariableName:d,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=Zr(a,t.imported,l,i,e,d,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}{${p}${r}enumerable:${c}true,${p}${r}get:${c}${e}${f}${n}${p}});`}else"__proto__"===t.reexported?m+=`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${f}${p}});`:m+=`exports${h(t.reexported)}${c}=${c}${f};`}for(const{exported:t,local:n}of e){const e=`exports${h(t)}`;e!==n&&(m&&(m+=p),m+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${n}${p}});`:`${e}${c}=${c}${n};`)}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(m&&(m+=p),!t.needsLiveBinding&&a){const t="'__proto__'";m+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${p}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${p}${r}Object.defineProperty(exports,${c}${t},${c}{${p}${r}${r}enumerable:${c}true,${p}${r}${r}value:${c}${e}[${t}]${p}${r}});${p}${p}`}const n=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${to(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function Zr(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=nr[t]?i:e;return sr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:ir[o(a)])?r:e:`${e}${c(t)}`}function Qr(e){return e([["value","true"]],{lineBreakIndent:null})}function eo(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Qr(i)],[null,`[Symbol.toStringTag]:${s}${Ar(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Qr(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Ar(i)});`}return""}const to=(e,t,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(t){const[t,o]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${t}${e}[k]${o}${r}${n}})`}return`exports[k]${s}=${s}${e}[k]`};function no(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,Qi,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=nr[e])):"*"!==t||"*"===i||a||(a=!0,s=ir[e],c=l),s&&p(c,s,o)}}return`${or(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function so(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Xr(e);var n}const io=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib"]);function ro(e,t){const n=t.map(({importPath:e})=>e).filter(e=>io.has(e)||e.startsWith("node:"));0!==n.length&&e(nt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${ot(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const oo=(e,t)=>e.split(".").map(t).join("");function ao(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(nt,cn(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function lo(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const co="_missingExportShim";const uo=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>e.exported));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},ho=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map(e=>[e,"1"]);return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},po=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",fo=(e,t,n)=>mo(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function mo(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${In(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const go=(e,t,n)=>mo(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),yo=(e,t,n)=>mo(e.filter(e=>e.local===co).map(e=>({name:e.exported,value:co})),t,n);function bo(e,t,n){return e?`${t}${oo(e,n)}`:"null"}var Eo={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:A,strict:S}){ro(h,n);const $=n.map(e=>`'${so(e.importPath,m.forceJsExtensionForImports)}'`),v=n.map(e=>e.name),{n:P,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(v.unshift("exports"),$.unshift("'exports'")),t.has("require")&&(v.unshift("require"),$.unshift("'require'")),t.has("module")&&(v.unshift("module"),$.unshift("'module'"));const N=Jr(m,o),k=(N?`'${N}',${I}`:"")+($.length>0?`[${$.join(`,${I}`)}],${I}`:""),C=S?`${I}'use strict';`:"";e.prepend(`${l}${no(n,x,y,b,E,t,a,f)}`);const R=Yr(s,n,d,x,f,a,y,A);let D=eo(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);D&&(D=P+P+D),e.append(`${R}${D}${p}`).indent(a).prepend(`${m.define}(${k}(${w(v,{isAsync:!1,name:null})}{${C}${P}${P}`).append(`${P}${P}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:d,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:A,n:S}=h,$=x?`'use strict';${S}${S}`:"";let v=eo(u&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);v&&(v+=S+S);const P=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),w=no(n,y,m,g,b,t,o,h);e.prepend(`${$}${a}${v}${P}${w}`);const I=Yr(s,n,u,y,h,o,m,E,`module.exports${A}=${A}`);e.append(`${I}${d}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${Nn(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${Nn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?Nn(e.imported):`${Nn(e.imported)} as ${Nn(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=or(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${Nn(o.exported)}`;i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:u,snippets:d},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:A},strict:S}){const{_:$,getNonArrowFunctionIntro:v,getPropertyAccess:P,n:w}=d,I=x&&x.includes("."),N=!f&&!I;if(x&&N&&($n(k=x)||Sn.test(k)))return Pt(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:ht("configuration-options/#output-extend")}}(x));var k;ro(c,n);const C=lo(n),R=C.map(e=>e.globalName||"null"),D=C.map(e=>e.name);r&&!x&&c(nt,{code:Lt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:ht(St)}),r&&(l||"exports.default"===s[0]?.local)&&(f?(R.unshift(`this${oo(x,P)}${$}=${$}this${oo(x,P)}${$}||${$}{}`),D.unshift("exports")):(R.unshift("{}"),D.unshift("exports")));const O=S?`${o}'use strict';${w}`:"",_=no(n,E,g,m,A,t,o,d);e.prepend(`${a}${_}`);let L=`(${v(D,{isAsync:!1,name:null})}{${w}${O}${w}`;r&&(!x||f&&l||(L=(N?`var ${x}`:`this${oo(x,P)}`)+`${$}=${$}${L}`),I&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(nt,cn(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(x,"this",b,d,h,c)+L));let M=`${w}${w}})(${R.join(`,${$}`)});`;r&&!f&&l&&(M=`${w}${w}${o}return exports;${M}`);const T=Yr(s,n,l,E,d,o,g,y);let B=eo(l&&r,!0===p||"if-default-prop"===p&&i,A,d);B&&(B=w+w+B),e.append(`${T}${B}${u}`).indent(o).prepend(L).append(M)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:u,freeze:d,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:A,setters:S,starExcludes:$}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){u||(u=uo({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:u}}(n,s,r,a),v=h?`'${h}',${g}`:"",P=t.has("module")?["exports","module"]:i?["exports"]:[];let w=`System.register(${v}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${g}`)+`],${g}(${b(P,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+ho($,r,a)+po(A,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}(${b([],{isAsync:c,name:null})}{${E}${E}`;const I=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+or(null,t,r,a,u,d,p)+fo(s,r,a)).append(`${l}${E}${E}`+go(s,r,a)+yo(s,r,a)).indent(`${r}${r}${r}`).append(I).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:A},globals:S,noConflict:$,reexportProtoFromExternal:v,strict:P}){const{_:w,cnst:I,getFunctionIntro:N,getNonArrowFunctionIntro:k,getPropertyAccess:C,n:R,s:D}=h,O=f?"f":"factory",_=f?"g":"global";if(r&&!x)return Pt({code:Lt,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:ht(St)});ro(u,n);const L=n.map(e=>`'${so(e.importPath,p.forceJsExtensionForImports)}'`),M=n.map(e=>`require('${e.importPath}')`),T=lo(n),B=T.map(e=>bo(e.globalName,_,C)),z=T.map(e=>e.name);(r||$)&&(c||r&&"exports.default"===s[0]?.local)&&(L.unshift("'exports'"),M.unshift("exports"),B.unshift(ao(x,_,S,(g?`${bo(x,_,C)}${w}||${w}`:"")+"{}",h,u)),z.unshift("exports"));const F=Jr(p,o),V=(F?`'${F}',${w}`:"")+(L.length>0?`[${L.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=P?`${w}'use strict';${R}`:"";let H;if($){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${ao(x,_,S,`${O}(${B.join(`,${w}`)})`,h,u)};`;else{t=`${I} ${e}${w}=${w}${B.shift()};${R}${a}${a}${O}(${[e,...B].join(`,${w}`)});`}H=`(${N([],{isAsync:!1,name:null})}{${R}${a}${a}${I} current${w}=${w}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,_,h)};${R}${a}${a}${t}${R}${a}${a}${e}.noConflict${w}=${w}${N([],{isAsync:!1,name:null})}{${w}${bo(x,_,C)}${w}=${w}current;${w}return ${e}${D}${w}};${R}${a}})()`}else H=`${O}(${B.join(`,${w}`)})`,!c&&r&&(H=ao(x,_,S,H,h,u));const W=r||$&&c||B.length>0,q=[O];W&&q.unshift(_);const K=W?`this,${w}`:"",X=W?`(${_}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${_}${w}||${w}self,${w}`:"",J=W?")":"",Y=W?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${O}(${M.join(`,${w}`)})${w}:${R}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${V}${O})${w}:${R}`+`${a}${X}${H}${J};${R}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${no(n,E,y,b,A,t,a,h)}`);const ee=Yr(s,n,c,E,h,a,y,v);let te=eo(c&&r,!0===m||"if-default-prop"===m&&i,A,h);te&&(te=R+R+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ao,So,$o,vo,Po,wo,Io,No,ko,Co,Ro,Do={};function Oo(){if(So)return Ao;So=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return Ao={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},Ao}function _o(){return $o||($o=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=Oo();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(Do)),Do}function Lo(){if(Po)return vo;Po=1;const e=_o(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=Oo(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return vo=(b,E)=>{const x=E||{},A=b.length-1,S=!0===x.parts||!0===x.scanToEnd,$=[],v=[],P=[];let w,I,N=b,k=-1,C=0,R=0,D=!1,O=!1,_=!1,L=!1,M=!1,T=!1,B=!1,z=!1,F=!1,V=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=A,H=()=>N.charCodeAt(k+1),W=()=>(w=I,N.charCodeAt(++k));for(;k<A;){let e;if(I=W(),I!==s){if(!0===T||I===l){for(j++;!0!==G()&&(I=W());)if(I!==s)if(I!==l){if(!0!==T&&I===r&&(I=W())===r){if(D=U.isBrace=!0,_=U.isGlob=!0,V=!0,!0===S)continue;break}if(!0!==T&&I===i){if(D=U.isBrace=!0,_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===p&&(j--,0===j)){T=!1,D=U.isBrace=!0,V=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===S)continue;break}if(I!==a){if(!0!==x.noext){if(!0===(I===d||I===n||I===t||I===h||I===o)&&H()===c){if(_=U.isGlob=!0,L=U.isExtglob=!0,V=!0,I===o&&k===C&&(F=!0),!0===S){for(;!0!==G()&&(I=W());)if(I!==s){if(I===f){_=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,I=W();continue}break}}if(I===t){if(w===t&&(M=U.isGlobstar=!0),_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===h){if(_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){O=U.isBracket=!0,_=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||I!==o||k!==C){if(!0!==x.noparen&&I===c){if(_=U.isGlob=!0,!0===S){for(;!0!==G()&&(I=W());)if(I!==c){if(I===f){V=!0;break}}else B=U.backslashes=!0,I=W();continue}break}if(!0===_){if(V=!0,!0===S)continue;break}}else z=U.negated=!0,C++}else{if($.push(k),v.push(U),U={value:"",depth:0,isGlob:!1},!0===V)continue;if(w===r&&k===C+1){C+=2;continue}R=k+1}}else B=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(L=!1,_=!1);let q=N,K="",X="";C>0&&(K=N.slice(0,C),N=N.slice(C),R-=C),q&&!0===_&&R>0?(q=N.slice(0,R),X=N.slice(R)):!0===_?(q="",X=N):q=N,q&&""!==q&&"/"!==q&&q!==N&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:C,base:q,glob:X,isBrace:D,isBracket:O,isGlob:_,isExtglob:L,isGlobstar:M,negated:z,negatedExtglob:F};if(!0===x.tokens&&(J.maxDepth=0,g(I)||v.push(U),J.tokens=v),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<$.length;t++){const n=e?e+1:C,s=$[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==C?(v[t].isPrefix=!0,v[t].value=K):v[t].value=i,y(v[t]),J.maxDepth+=v[t].depth),0===t&&""===i||P.push(i),e=s}if(e&&e+1<b.length){const t=b.slice(e+1);P.push(t),x.tokens&&(v[v.length-1].value=t,y(v[v.length-1]),J.maxDepth+=v[v.length-1].depth)}J.slashes=$,J.parts=P}return J},vo}function Mo(){if(Io)return wo;Io=1;const e=Oo(),t=_o(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();return`[${e.join("-")}]`},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(u,d)=>{if("string"!=typeof u)throw new TypeError("Expected a string");u=o[u]||u;const h={...d},p="number"==typeof h.maxLength?Math.min(n,h.maxLength):n;let f=u.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const m={type:"bos",value:"",output:h.prepend||""},g=[m],y=h.capture?"":"?:",b=e.globChars(h.windows),E=e.extglobChars(b),{DOT_LITERAL:x,PLUS_LITERAL:A,SLASH_LITERAL:S,ONE_CHAR:$,DOTS_SLASH:v,NO_DOT:P,NO_DOT_SLASH:w,NO_DOTS_SLASH:I,QMARK:N,QMARK_NO_DOT:k,STAR:C,START_ANCHOR:R}=b,D=e=>`(${y}(?:(?!${R}${e.dot?v:x}).)*?)`,O=h.dot?"":P,_=h.dot?N:k;let L=!0===h.bash?D(h):C;h.capture&&(L=`(${L})`),"boolean"==typeof h.noext&&(h.noextglob=h.noext);const M={input:u,index:-1,start:0,dot:!0===h.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};u=t.removePrefix(u,M),f=u.length;const T=[],B=[],z=[];let F,V=m;const j=()=>M.index===f-1,U=M.peek=(e=1)=>u[M.index+e],G=M.advance=()=>u[++M.index]||"",H=()=>u.slice(M.index+1),W=(e="",t=0)=>{M.consumed+=e,M.index+=t},q=e=>{M.output+=null!=e.output?e.output:e.value,W(e.value)},K=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)G(),M.start++,e++;return e%2!=0&&(M.negated=!0,M.start++,!0)},X=e=>{M[e]++,z.push(e)},J=e=>{M[e]--,z.pop()},Y=e=>{if("globstar"===V.type){const t=M.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||T.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(M.output=M.output.slice(0,-V.output.length),V.type="star",V.value="*",V.output=L,M.output+=V.output)}if(T.length&&"paren"!==e.type&&(T[T.length-1].inner+=e.value),(e.value||e.output)&&q(e),V&&"text"===V.type&&"text"===e.type)return V.output=(V.output||V.value)+e.value,void(V.value+=e.value);e.prev=V,g.push(e),V=e},Z=(e,t)=>{const n={...E[t],conditions:1,inner:""};n.prev=V,n.parens=M.parens,n.output=M.output;const s=(h.capture?"(":"")+n.open;X("parens"),Y({type:e,value:t,output:M.output?"":$}),Y({type:"paren",extglob:!0,value:G(),output:s}),T.push(n)},Q=e=>{let t,n=e.close+(h.capture?")":"");if("negate"===e.type){let s=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=D(h)),(s!==L||j()||/^\)+$/.test(H()))&&(n=e.close=`)$))${s}`),e.inner.includes("*")&&(t=H())&&/^\.[^\\/.]+$/.test(t)){const i=c(t,{...d,fastpaths:!1}).output;n=e.close=`)${i})${s})`}"bos"===e.prev.type&&(M.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:F,output:n}),J("parens")};if(!1!==h.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(u)){let e=!1,n=u.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?N.repeat(r.length):""):0===o?_+(r?N.repeat(r.length):""):N.repeat(s.length):"."===i?x.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===h.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===u&&!0===h.contains?(M.output=u,M):(M.output=t.wrapOutput(n,M,d),M)}for(;!j();){if(F=G(),"\0"===F)continue;if("\\"===F){const e=U();if("/"===e&&!0!==h.bash)continue;if("."===e||";"===e)continue;if(!e){F+="\\",Y({type:"text",value:F});continue}const t=/^\\+/.exec(H());let n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(F+="\\")),!0===h.unescape?F=G():F+=G(),0===M.brackets){Y({type:"text",value:F});continue}}if(M.brackets>0&&("]"!==F||"["===V.value||"[^"===V.value)){if(!1!==h.posix&&":"===F){const e=V.value.slice(1);if(e.includes("[")&&(V.posix=!0,e.includes(":"))){const e=V.value.lastIndexOf("["),t=V.value.slice(0,e),n=V.value.slice(e+2),i=s[n];if(i){V.value=t+i,M.backtrack=!0,G(),m.output||1!==g.indexOf(V)||(m.output=$);continue}}}("["===F&&":"!==U()||"-"===F&&"]"===U())&&(F=`\\${F}`),"]"!==F||"["!==V.value&&"[^"!==V.value||(F=`\\${F}`),!0===h.posix&&"!"===F&&"["===V.value&&(F="^"),V.value+=F,q({value:F});continue}if(1===M.quotes&&'"'!==F){F=t.escapeRegex(F),V.value+=F,q({value:F});continue}if('"'===F){M.quotes=1===M.quotes?0:1,!0===h.keepQuotes&&Y({type:"text",value:F});continue}if("("===F){X("parens"),Y({type:"paren",value:F});continue}if(")"===F){if(0===M.parens&&!0===h.strictBrackets)throw new SyntaxError(l("opening","("));const e=T[T.length-1];if(e&&M.parens===e.parens+1){Q(T.pop());continue}Y({type:"paren",value:F,output:M.parens?")":"\\)"}),J("parens");continue}if("["===F){if(!0!==h.nobracket&&H().includes("]"))X("brackets");else{if(!0!==h.nobracket&&!0===h.strictBrackets)throw new SyntaxError(l("closing","]"));F=`\\${F}`}Y({type:"bracket",value:F});continue}if("]"===F){if(!0===h.nobracket||V&&"bracket"===V.type&&1===V.value.length){Y({type:"text",value:F,output:`\\${F}`});continue}if(0===M.brackets){if(!0===h.strictBrackets)throw new SyntaxError(l("opening","["));Y({type:"text",value:F,output:`\\${F}`});continue}J("brackets");const e=V.value.slice(1);if(!0===V.posix||"^"!==e[0]||e.includes("/")||(F=`/${F}`),V.value+=F,q({value:F}),!1===h.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(V.value);if(M.output=M.output.slice(0,-V.value.length),!0===h.literalBrackets){M.output+=n,V.value=n;continue}V.value=`(${y}${n}|${V.value})`,M.output+=V.value;continue}if("{"===F&&!0!==h.nobrace){X("braces");const e={type:"brace",value:F,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};B.push(e),Y(e);continue}if("}"===F){const e=B[B.length-1];if(!0===h.nobrace||!e){Y({type:"text",value:F,output:F});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,h),M.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=M.output.slice(0,e.outputIndex),s=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{",F=t="\\}",M.output=n;for(const e of s)M.output+=e.output||e.value}Y({type:"brace",value:F,output:t}),J("braces"),B.pop();continue}if("|"===F){T.length>0&&T[T.length-1].conditions++,Y({type:"text",value:F});continue}if(","===F){let e=F;const t=B[B.length-1];t&&"braces"===z[z.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:F,output:e});continue}if("/"===F){if("dot"===V.type&&M.index===M.start+1){M.start=M.index+1,M.consumed="",M.output="",g.pop(),V=m;continue}Y({type:"slash",value:F,output:S});continue}if("."===F){if(M.braces>0&&"dot"===V.type){"."===V.value&&(V.output=x);const e=B[B.length-1];V.type="dots",V.output+=F,V.value+=F,e.dots=!0;continue}if(M.braces+M.parens===0&&"bos"!==V.type&&"slash"!==V.type){Y({type:"text",value:F,output:x});continue}Y({type:"dot",value:F,output:x});continue}if("?"===F){if(!(V&&"("===V.value)&&!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Z("qmark",F);continue}if(V&&"paren"===V.type){const e=U();let t=F;("("===V.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(H()))&&(t=`\\${F}`),Y({type:"text",value:F,output:t});continue}if(!0!==h.dot&&("slash"===V.type||"bos"===V.type)){Y({type:"qmark",value:F,output:k});continue}Y({type:"qmark",value:F,output:N});continue}if("!"===F){if(!0!==h.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){Z("negate",F);continue}if(!0!==h.nonegate&&0===M.index){K();continue}}if("+"===F){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Z("plus",F);continue}if(V&&"("===V.value||!1===h.regex){Y({type:"plus",value:F,output:A});continue}if(V&&("bracket"===V.type||"paren"===V.type||"brace"===V.type)||M.parens>0){Y({type:"plus",value:F});continue}Y({type:"plus",value:A});continue}if("@"===F){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Y({type:"at",extglob:!0,value:F,output:""});continue}Y({type:"text",value:F});continue}if("*"!==F){"$"!==F&&"^"!==F||(F=`\\${F}`);const e=i.exec(H());e&&(F+=e[0],M.index+=e[0].length),Y({type:"text",value:F});continue}if(V&&("globstar"===V.type||!0===V.star)){V.type="star",V.star=!0,V.value+=F,V.output=L,M.backtrack=!0,M.globstar=!0,W(F);continue}let e=H();if(!0!==h.noextglob&&/^\([^?]/.test(e)){Z("star",F);continue}if("star"===V.type){if(!0===h.noglobstar){W(F);continue}const t=V.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===h.bash&&(!s||e[0]&&"/"!==e[0])){Y({type:"star",value:F,output:""});continue}const r=M.braces>0&&("comma"===t.type||"brace"===t.type),o=T.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Y({type:"star",value:F,output:""});continue}for(;"/**"===e.slice(0,3);){const t=u[M.index+4];if(t&&"/"!==t)break;e=e.slice(3),W("/**",3)}if("bos"===t.type&&j()){V.type="globstar",V.value+=F,V.output=D(h),M.output=V.output,M.globstar=!0,W(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&j()){M.output=M.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=D(h)+(h.strictSlashes?")":"|$)"),V.value+=F,M.globstar=!0,M.output+=t.output+V.output,W(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";M.output=M.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=`${D(h)}${S}|${S}${n})`,V.value+=F,M.output+=t.output+V.output,M.globstar=!0,W(F+G()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){V.type="globstar",V.value+=F,V.output=`(?:^|${S}|${D(h)}${S})`,M.output=V.output,M.globstar=!0,W(F+G()),Y({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-V.output.length),V.type="globstar",V.output=D(h),V.value+=F,M.output+=V.output,M.globstar=!0,W(F);continue}const n={type:"star",value:F,output:L};!0!==h.bash?!V||"bracket"!==V.type&&"paren"!==V.type||!0!==h.regex?(M.index!==M.start&&"slash"!==V.type&&"dot"!==V.type||("dot"===V.type?(M.output+=w,V.output+=w):!0===h.dot?(M.output+=I,V.output+=I):(M.output+=O,V.output+=O),"*"!==U()&&(M.output+=$,V.output+=$)),Y(n)):(n.output=F,Y(n)):(n.output=".*?","bos"!==V.type&&"slash"!==V.type||(n.output=O+n.output),Y(n))}for(;M.brackets>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing","]"));M.output=t.escapeLast(M.output,"["),J("brackets")}for(;M.parens>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing",")"));M.output=t.escapeLast(M.output,"("),J("parens")}for(;M.braces>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing","}"));M.output=t.escapeLast(M.output,"{"),J("braces")}if(!0===h.strictSlashes||"star"!==V.type&&"bracket"!==V.type||Y({type:"maybe_slash",value:"",output:`${S}?`}),!0===M.backtrack){M.output="";for(const e of M.tokens)M.output+=null!=e.output?e.output:e.value,e.suffix&&(M.output+=e.suffix)}return M};return c.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let A=!0===r.bash?".*?":g;r.capture&&(A=`(${A})`);const S=e=>!0===e.noglobstar?A:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,$=e=>{switch(e){case"*":return`${b}${d}${A}`;case".*":return`${c}${d}${A}`;case"*.*":return`${b}${A}${c}${d}${A}`;case"*/*":return`${b}${A}${u}${d}${E}${A}`;case"**":return b+S(r);case"**/*":return`(?:${b}${S(r)}${u})?${E}${d}${A}`;case"**/*.*":return`(?:${b}${S(r)}${u})?${E}${A}${c}${d}${A}`;case"**/.*":return`(?:${b}${S(r)}${u})?${c}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=$(t[1]);if(!n)return;return n+c+t[2]}}},v=t.removePrefix(s,{negated:!1,prefix:""});let P=$(v);return P&&!0!==r.strictSlashes&&(P+=`${u}?`),P},wo=c}function To(){if(ko)return No;ko=1;const e=Lo(),t=Mo(),n=_o(),s=Oo(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,No=i}function Bo(){if(Ro)return Co;Ro=1;const e=To(),t=_o();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),Co=n}var zo=xo(Bo());const Fo={ArrayPattern(e,t){for(const n of t.elements)n&&Fo[n.type](e,n)},AssignmentPattern(e,t){Fo[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?Fo.RestElement(e,n):Fo[n.value.type](e,n.value)},RestElement(e,t){Fo[t.argument.type](e,t.argument)}},Vo=function(e){const t=[];return Fo[e.type](t,e),t};let jo;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 Uo=new Array(128).fill(void 0);function Go(e){return Uo[e]}Uo.push(void 0,null,!0,!1);let Ho=Uo.length;function Wo(e){Ho===Uo.length&&Uo.push(Uo.length+1);const t=Ho;return Ho=Uo[t],Uo[t]=e,t}let qo=null;function Ko(){return null!==qo&&0!==qo.byteLength||(qo=new Uint8Array(jo.memory.buffer)),qo}let Xo="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Xo.decode();let Jo=0;function Yo(e,t){return function(e,t){return Jo+=t,Jo>=2146435072&&(Xo="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}},Xo.decode(),Jo=t),Xo.decode(Ko().subarray(e,e+t))}(e>>>=0,t)}let Zo=0;const Qo="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ea="function"==typeof Qo.encodeInto?function(e,t){return Qo.encodeInto(e,t)}:function(e,t){const n=Qo.encode(e);return t.set(n),{read:e.length,written:n.length}};function ta(e,t,n){if(void 0===n){const n=Qo.encode(e),s=t(n.length,1)>>>0;return Ko().subarray(s,s+n.length).set(n),Zo=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Ko();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=Ko().subarray(i+o,i+s);o+=ea(e,t).written,i=n(i,s,o,1)>>>0}return Zo=o,i}let na=null;function sa(){return(null===na||!0===na.buffer.detached||void 0===na.buffer.detached&&na.buffer!==jo.memory.buffer)&&(na=new DataView(jo.memory.buffer)),na}function ia(e){const t=Go(e);return function(e){e<132||(Uo[e]=Ho,Ho=e)}(e),t}function ra(e,t,n){try{const l=jo.__wbindgen_add_to_stack_pointer(-16),c=ta(e,jo.__wbindgen_export_1,jo.__wbindgen_export_2),u=Zo;jo.parse(l,c,u,t,n);var s=sa().getInt32(l+0,!0),i=sa().getInt32(l+4,!0),r=(o=s,a=i,o>>>=0,Ko().subarray(o/1,o/1+a)).slice();return jo.__wbindgen_export_0(s,1*i,1),r}finally{jo.__wbindgen_add_to_stack_pointer(16)}var o,a}const oa=new Set(["basic","cors","default"]);async function aa(e){if(void 0!==jo)return jo;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm",import.meta.url));const t=function(){const e={wbg:{}};return e.wbg.__wbg_buffer_a1a27a0dfa70165d=function(e){return Wo(Go(e).buffer)},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,s;try{n=e,s=t,console.error(Yo(e,t))}finally{jo.__wbindgen_export_0(n,s,1)}},e.wbg.__wbg_length_ab6d22b5ead75c72=function(e){return Go(e).length},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Wo(new Error)},e.wbg.__wbg_new_e52b3efaaa774f96=function(e){return Wo(new Uint8Array(Go(e)))},e.wbg.__wbg_set_fe4e79d1ed3b0e9b=function(e,t,n){Go(e).set(Go(t),n>>>0)},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){const n=ta(Go(t).stack,jo.__wbindgen_export_1,jo.__wbindgen_export_2),s=Zo;sa().setInt32(e+4,s,!0),sa().setInt32(e+0,n,!0)},e.wbg.__wbindgen_memory=function(){return Wo(jo.memory)},e.wbg.__wbindgen_object_drop_ref=function(e){ia(e)},e.wbg.__wbindgen_throw=function(e,t){throw new Error(Yo(e,t))},e}();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:s}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!oa.has(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,t);return function(e,t){return jo=e.exports,aa.__wbindgen_wasm_module=t,na=null,qo=null,jo}(n,s)}const la=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:ua(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:ua(t[e+2],t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{[On]:s}:{},params:ua(t[e+4],t),body:ca(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ca(t[e+3],t),right:ca(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:ca(t[e+2],t),right:ca(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:ca(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ca(t[e+3],t),right:ca(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:ua(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:ca(n,t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[On]:s}:{},callee:ca(t[e+4],t),arguments:ua(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:ca(n,t),body:ca(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:ca(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:ua(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:ua(t[e+2],t),id:0===n?null:ca(n,t),superClass:0===s?null:ca(s,t),body:ca(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:ua(t[e+2],t),id:0===n?null:ca(n,t),superClass:0===s?null:ca(s,t),body:ca(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:ca(t[e+2],t),consequent:ca(t[e+3],t),alternate:ca(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:ca(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:ca(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:ca(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:ca(t[e+2],t),test:ca(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:ca(n,t),source:ca(t[e+3],t),attributes:ua(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:ca(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:ua(t[e+2],t),source:0===n?null:ca(n,t),attributes:ua(t[e+4],t),declaration:0===s?null:ca(s,t)}},function(e,t){const n=ca(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:ca(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:ca(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:ca(t[e+2],t),right:ca(t[e+3],t),body:ca(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:ca(t[e+3],t),right:ca(t[e+4],t),body:ca(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:ca(n,t),test:0===s?null:ca(s,t),update:0===i?null:ca(i,t),body:ca(t[e+5],t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[On]:s}:{},id:0===i?null:ca(i,t),params:ua(t[e+5],t),body:ca(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[On]:s}:{},id:0===i?null:ca(i,t),params:ua(t[e+5],t),body:ca(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:ca(t[e+2],t),consequent:ca(t[e+3],t),alternate:0===n?null:ca(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:ca(t[e+2],t),value:ca(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:ua(t[e+2],t),source:ca(t[e+3],t),attributes:ua(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:ca(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:ca(t[e+2],t),options:0===n?null:ca(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:ca(t[e+2],t)}},function(e,t){const n=t[e+2],s=ca(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:ca(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:ca(t[e+2],t),value:0===n?null:ca(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:ca(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:ca(t[e+2],t),children:ua(t[e+3],t),closingElement:0===n?null:ca(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:ca(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:ca(t[e+2],t),children:ua(t[e+3],t),closingFragment:ca(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:ca(t[e+2],t),property:ca(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:ca(t[e+2],t),name:ca(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:ca(t[e+3],t),attributes:ua(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:ca(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:ca(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:ca(t[e+2],t),body:ca(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ca(t[e+3],t),right:ca(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:ca(t[e+3],t),property:ca(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:ca(t[e+2],t),property:ca(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:ua(t[e+3],t),key:ca(t[e+4],t),value:ca(t[e+5],t),kind:Dn[t[e+6]]}},function(e,t){const n=Ln(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[On]:n}:{},callee:ca(t[e+3],t),arguments:ua(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:ua(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:ua(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=Ln(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:ua(t[e+2],t),...n.length>0?{[_n]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=ca(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:ca(s,t),value:i,kind:Dn[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:ua(t[e+3],t),key:ca(t[e+4],t),value:0===s?null:ca(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:ca(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:ca(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:ua(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:ca(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:ua(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:ca(n,t),consequent:ua(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:ca(t[e+2],t),cases:ua(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:ca(t[e+2],t),quasi:ca(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:ua(t[e+2],t),expressions:ua(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:ca(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:ca(t[e+2],t),handler:0===n?null:ca(n,t),finalizer:0===s?null:ca(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],argument:ca(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:Dn[t[e+3]],argument:ca(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Dn[t[e+2]],declarations:ua(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:ca(t[e+2],t),init:0===n?null:ca(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:ca(t[e+2],t),body:ca(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:ca(s,t)}}];function ca(e,t){const n=t[e],s=la[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function ua(e,t){if(0===e)return re;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?ca(n,t):null}return s}function da(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}class ha extends Fn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=pa(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=pa(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(fe)}hasEffectsWhenDestructuring(e,t,n){const s=pa(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(fe,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=pa(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}ha.prototype.includeNode=Vn;const pa=e=>e.at(-1)===ue?e:[...e,he];class fa extends Fi{constructor(){super(...arguments),this.objectEntity=null}get expression(){return ke(this.flags,8388608)}set expression(e){this.flags=Ce(this.flags,8388608,e)}createScope(e){this.scope=new _i(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}onlyFunctionCallUsed(){return this.parent.type===Ge&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof ui||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(me,e);for(const t of this.params)t instanceof ui||t.includePath(me,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Es([],Ss)}}class ma extends Fn{addExportedVariables(e,t){for(const n of this.properties)n.type===Xe?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(fe,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=Z(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):G(i,e,o,a);s&&e.remove(s,this.end-1)}}}ma.prototype.includeNode=jn,ma.prototype.applyDeoptimizations=Un;class ga extends Fn{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,fe,r)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=Ne();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,fe,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){if(super.initialise(),this.left instanceof ui){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(nt,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=se){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=K(e.original,W(e.original,"=",r.end)+1);e.remove(a,l),n&&Q(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof ui){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?te(n,a,l,e,t):ne(n,a,l,c.type!==We,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${ee(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===We,e,t)}r.included&&r instanceof ma&&(i===We||i===Ue)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(fe,this.right),this.scope.context.requestTreeshakingPass()}}class ya extends Fn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(fe,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=se){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(fe),this.right.deoptimizePath(me),this.scope.context.requestTreeshakingPass()}}class ba extends Fn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do{if(e instanceof Vi||e instanceof fa)return}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Ea,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const Ea=["then"];function xa(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):Re}const Aa={"!=":(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)=>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,"|":(e,t)=>e|t},Sa=Symbol("Unassigned");class $a extends Fn{constructor(){super(...arguments),this.renderedLiteralValue=Sa}deoptimizeCache(){this.renderedLiteralValue=Re}getLiteralValueAtPath(e,t,n){if(e.length>0)return Re;const s=this.left.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof s)return Re;if("in"===this.operator&&this.right.variable instanceof Hr){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof En||e instanceof Wr?Re:!!e}const i=this.right.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof i)return Re;const r=Aa[this.operator];return r?r(s,i):Re}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof Hr?this.renderedLiteralValue!==Sa?this.renderedLiteralValue:this.renderedLiteralValue=xa(this.getLiteralValueAtPath(fe,xe,this)):Re}hasEffects(e){return"+"===this.operator&&this.parent instanceof Mi&&""===this.left.getLiteralValueAtPath(fe,xe,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(me,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=se){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}$a.prototype.applyDeoptimizations=Un;class va extends Fn{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function Pa(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(W(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(W(e.original,"(",n.callee.end)+1,n.end-1)}}va.prototype.includeNode=jn,va.prototype.applyDeoptimizations=Un;class wa extends Fn{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter(e=>!!e&&e!==Le);if(0!==o.length)if(i===Le)for(const e of o)e.deoptimizePath(me);else n.withTrackedEntityAtPath(t,i,()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==Le){this.returnExpression=Me;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=oe,this.deoptimizableDependentExpressions=re;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(me)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Le&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Le?Re:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Re)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Le?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},Me)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}}class Ia extends wa{get hasCheckedForWarnings(){return ke(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Ce(this.flags,268435456,e)}get optional(){return ke(this.flags,128)}set optional(e){this.flags=Ce(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof wr&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return $r(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===zn)return zn;if(this.optional&&null==this.callee.getLiteralValueAtPath(fe,xe,this))return!this.annotationPure&&t||zn;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===Bn&&this.callee instanceof ui&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(me,e)}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=se){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Pa(e,t,this),this.callee instanceof ui&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(nt,jt(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(nt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${lt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:ht("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=xe){return null===this.returnExpression?(this.returnExpression=Me,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(fe,this.interaction,e,this)):this.returnExpression}}class Na extends Fn{createScope(e){this.scope=new Oi(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",fe,Le)),this.body=new Ti(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}Na.prototype.preventChildBlockScope=!0,Na.prototype.includeNode=Vn;class ka extends Fn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===zn?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}ka.prototype.includeNode=jn,ka.prototype.applyDeoptimizations=Un;class Ca extends fi{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new ri("this",null,t,fe,n,"other")),this.instanceScope=new fi(this,n),this.instanceScope.variables.set("this",new Ci(n))}findLexicalBoundary(){return this}}class Ra extends Fn{createScope(e){this.scope=new Ca(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,me,e);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=new Array(e.body.length);let n=0;for(const s of e.body)t[n++]=new(this.scope.context.getNodeConstructor(s.type))(this,s.static?this.scope:this.scope.instanceScope).parseNode(s);return super.parseNode(e)}}Ra.prototype.includeNode=jn,Ra.prototype.applyDeoptimizations=Un;class Da extends Ai{render(e,t,{renderedSurroundingElement:n}=se){super.render(e,t),n===We&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function Oa(e){return"symbol"==typeof e?e!==Oe&&(e===De||Re):!!e}class _a extends _e{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new _a(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0])),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}class La extends Fn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ke(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ce(this.flags,65536,e)}get hasDeoptimizedCache(){return ke(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ce(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(me),this.included&&e.includePath(me,Ie());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=re;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,n){const s=this.getUsedBranch();if(!s){if(this.hasDeoptimizedCache)return Re;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=Oa(s);if(i===Re)return Re;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==Oa(r)?Re:(this.expressionsToBeDeoptimized.push(n),s!==r?i?De:Oe:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new _a([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[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,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=se){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=W(e.original,":",this.consequent.end),l=K(e.original,(this.consequent.included?W(e.original,"?",this.test.end):a)+1);s&&Q(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=Oa(this.test.getLiteralValueAtPath(fe,xe,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}La.prototype.includeNode=jn,La.prototype.applyDeoptimizations=Un;class Ma extends Fn{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}Ma.prototype.includeNode=jn,Ma.prototype.applyDeoptimizations=Un;class Ta extends Fn{hasEffects(){return!0}}Ta.prototype.includeNode=Vn;class Ba extends Fn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(fe,je,e)}}function za(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,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=s,e.hasContinue=i,e.brokenFlow=n,!1)}function Fa(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}Ba.prototype.includeNode=Vn;class Va extends Fn{hasEffects(e){return!!this.test.hasEffects(e)||za(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Fa(e,this.body,t)}}Va.prototype.includeNode=jn,Va.prototype.applyDeoptimizations=Un;class ja extends Fn{hasEffects(){return!1}}ja.prototype.includeNode=Vn;class Ua extends Fn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}Ua.prototype.needsBoundaries=!0,Ua.prototype.includeNode=jn,Ua.prototype.applyDeoptimizations=Un;class Ga extends Fn{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Si){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}Ga.prototype.needsBoundaries=!0,Ga.prototype.includeNode=jn,Ga.prototype.applyDeoptimizations=Un;class Ha extends Fn{}Ha.prototype.includeNode=jn,Ha.prototype.applyDeoptimizations=Un;class Wa extends Fn{createScope(e){this.scope=new bi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||za(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Fa(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){super.initialise(),this.left.setAssignedValue(Le)}render(e,t){this.left.render(e,t,H),this.right.render(e,t,H),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(fe),this.scope.context.requestTreeshakingPass()}}class qa extends Fn{get await(){return ke(this.flags,131072)}set await(e){this.flags=Ce(this.flags,131072,e)}createScope(e){this.scope=new bi(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Fa(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){super.initialise(),this.left.setAssignedValue(Le)}render(e,t){this.left.render(e,t,H),this.right.render(e,t,H),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(fe),this.right.deoptimizePath(me),this.scope.context.requestTreeshakingPass()}}class Ka extends Fn{createScope(e){this.scope=new bi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||za(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),Fa(e,this.body,t)}render(e,t){this.init?.render(e,t,H),this.test?.render(e,t,H),this.update?.render(e,t,H),this.body.render(e,t)}}Ka.prototype.includeNode=jn,Ka.prototype.applyDeoptimizations=Un;class Xa extends Vi{createScope(e){super.createScope(this.idScope=new fi(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===Ge&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=se){super.render(e,t),n===We&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Ja extends bi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Ya=Symbol("unset");class Za extends Fn{constructor(){super(...arguments),this.testValue=Ya}deoptimizeCache(){this.testValue=Re}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 n=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!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){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new Ja(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new Ja(this.scope)).parseNode(e.alternate)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.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(i,e,n)}getTestValue(){return this.testValue===Ya?this.testValue=Oa(this.test.getLiteralValueAtPath(fe,xe,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 n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map(e=>{const t=e.variable;return t.included?t.getName(n):""}))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==Ke&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Za&&e.alternate)return!0;if(e instanceof Ti)return!1;e=e.parent}while(e);return!1}}Za.prototype.includeNode=jn,Za.prototype.applyDeoptimizations=Un;class Qa extends Fn{}class el extends Fn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}el.prototype.needsBoundaries=!0,el.prototype.includeNode=jn,el.prototype.applyDeoptimizations=Un;class tl extends Fn{}function nl(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}tl.prototype.includeNode=jn,tl.prototype.applyDeoptimizations=Un;class sl extends Fn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,fe,this.init||Yn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,fe,this.init||Yn)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,fe,s||Yn)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included||this.isUsingDeclaration;if(c)o.render(e,t);else{const t=W(e.original,"=",o.end);e.remove(l,K(e.original,t+1))}if(a){if(o instanceof ui&&a instanceof Da&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?se:{renderedSurroundingElement:We})}else o instanceof ui&&nl(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(){this.included=!0;const{id:e,init:t}=this;if(t&&e instanceof ui&&t instanceof Da&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}function il(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}sl.prototype.applyDeoptimizations=Un;class rl extends Fn{constructor(){super(...arguments),this.inlineNamespace=null,this.hasUnknownAccessedKey=!1,this.accessedPropKey=new Set,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return ke(this.flags,536870912)}set shouldIncludeDynamicAttributes(e){this.flags=Ce(this.flags,536870912,e)}get withinTopLevelAwait(){return ke(this.flags,134217728)}set withinTopLevelAwait(e){this.flags=Ce(this.flags,134217728,e)}bind(){this.source.bind(),this.options?.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof Mi)return re;if(e instanceof ba){const t=e.parent;if(t instanceof Mi)return re;if(t instanceof sl){const e=t.id;if(e instanceof ui)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(e instanceof ma)return ll(e)}if(t instanceof wr){const e=t.property;if(!t.computed&&e instanceof ui)return[e.name]}return}if(e instanceof wr){const t=e.parent,n=e.property;if(!(t instanceof Ia&&n instanceof ui))return;const s=n.name;if(t.parent instanceof Mi&&["catch","finally"].includes(s))return re;if("then"!==s)return;if(0===t.arguments.length)return re;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof fa||i instanceof Xa))return;if(0===i.params.length)return re;const r=i.params[0];return 1===i.params.length&&r instanceof ma?ll(r):this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey]}}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t)}includeNode(e){this.included=!0,this.shouldIncludeDynamicAttributes&&this.options?.includePath(me,e),this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)}includePath(e,t){this.included||this.includeNode(t),this.hasUnknownAccessedKey||(e[0]===ue?this.hasUnknownAccessedKey=!0:"string"==typeof e[0]&&this.accessedPropKey.add(e[0]),this.scope.context.includeDynamicImport(this))}initialise(){super.initialise(),this.scope.context.addDynamicImport(this);let e=this.parent,t=!1,n=!1;do{t&&(e instanceof Vi||e instanceof fa)&&(n=!1),e instanceof ba&&(t=!0,n=!0)}while(e=e.parent);t&&n&&(this.withinTopLevelAwait=!0)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,W(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,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c,u){const{format:d}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const h=[...al[d]||[]];let p;({helper:p,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i,c,u)),p&&h.push(p),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},u,d,h){const p=u.hookFirstSync("renderDynamicImport",[{chunk:il(d),customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,getTargetChunkImports(){if(null===h)return null;const e=[],t=d.getFileName();for(const n of h.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof qr?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleId:this.scope.context.module.id,targetChunk:h?il(h):null,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(p)return{helper:null,mechanism:p};const f=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof kn))return{helper:null,mechanism:null};const n=ol(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[u,d]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${u}${i}`,a+=`${d})`,!r&&f&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",u=ol(e,t,o),[d,h]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=u?`${d}${s}(/*#__PURE__*/${u}(m))${h}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${p},${a}${i})${g})`;return!r&&f&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:u,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function ol(e,t,n){return"external"===t?ir[n(e instanceof kn?e.id:null)]:"default"===t?Qi:null}rl.prototype.applyDeoptimizations=Un;const al={amd:["require"],cjs:["require"],system:["module"]};function ll(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class cl extends Fn{}cl.prototype.includeNode=jn,cl.prototype.applyDeoptimizations=Un;class ul extends Fn{}ul.prototype.includeNode=jn,ul.prototype.applyDeoptimizations=Un;class dl extends ai{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class hl extends Fn{render(e,t,{jsxMode:n}=se){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof dl?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=In(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Sr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}hl.prototype.includeNode=Vn;class pl extends Fn{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}pl.prototype.includeNode=Vn;class fl extends pl{}class ml extends pl{}class gl extends Fn{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class yl extends Fn{}yl.prototype.includeNode=Vn;class bl extends Fn{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(me,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const El=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,xl=/[ \t]*\r?\n[ \t\r\n]*/g;class Al extends Fn{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(El,"").replace(xl," ")),this.renderedText}}function Sl(e){let t=0;for(const n of e)n instanceof bl&&n.expression instanceof yl||n instanceof Al&&!n.shouldRender()||t++;return t}function $l(e,t,n,s,i){const[r,o]=e.split(".");let a;if(n){if(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t){s.scope.findGlobal(r).includePath(me,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,me,i),a instanceof ri&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Al.prototype.includeNode=Vn;class vl extends Fn{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=$l(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:Sl(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof bl&&n.expression instanceof yl||n instanceof Al&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}vl.prototype.applyDeoptimizations=Un;class Pl extends vl{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof gl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);if(m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]")),this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",y),p){const{value:t}=p;e.appendLeft(y,", "),t?e.move(t.start,t.end,y):e.appendLeft(y,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof hl){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g||(g=t)}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof gl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class wl extends vl{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class Il extends Fn{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}}class Nl extends Fn{}Nl.prototype.includeNode=Vn;class kl extends Fn{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}kl.prototype.includeNode=Vn;class Cl extends Fn{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=$l("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=$l(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}}class Rl extends Fn{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class Dl extends Fn{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included||this.includeNode(e);const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(e,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(me,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,K(e.original,W(e.original,":",this.label.end)+1)),this.body.render(e,t)}}Dl.prototype.applyDeoptimizations=Un;class Ol extends Fn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ke(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ce(this.flags,65536,e)}get hasDeoptimizedCache(){return ke(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ce(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(me),this.included&&e.includePath(me,Ie())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=re;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return Re;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=Oa(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),Oe;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),De}}return Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new _a([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||!n||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=se){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=W(e.original,this.operator,this.left.end);if(this.right.included){const t=K(e.original,o+2);e.remove(this.start,t),s&&Q(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!X.test(e[n-1]))return n;n--}}(e.original,this.left.end,o),this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(fe,xe,this),t=Oa(e);if("symbol"==typeof t)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}Ol.prototype.includeNode=jn,Ol.prototype.applyDeoptimizations=Un;class _l extends Fn{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(me,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),Pa(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}}class Ll extends Fn{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(me,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}render(e,t,{renderedSurroundingElement:n}=se){if(n!==We&&n!==Ue||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=Z(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):G(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Ss;const t=[];for(const n of this.properties){if(n instanceof Ms){t.push({key:ue,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(fe,xe,this);if("symbol"==typeof e){t.push({key:ue,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof ui?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Sr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Es(t,e)}}Ll.prototype.applyDeoptimizations=Un;class Ml extends Fn{initialise(){const e=this.scope.context.module.id;return Pt(un(wt(an(this.message)),e))}}class Tl extends Fn{initialise(){const e=this.start,t=this.scope.context.module.id,n=un(wt(an(this.message,e)),t);this.scope.context.error(n,e)}}class Bl extends Fn{}Bl.prototype.includeNode=Vn;class zl extends Fn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Ne()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(st,Wt(e,s.id,Ye(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(nt,Jt(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=J(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}Y(this.body,e,n,this.end,t)}else super.render(e,t)}}zl.prototype.includeNode=jn,zl.prototype.applyDeoptimizations=Un;class Fl extends gi{get method(){return ke(this.flags,262144)}set method(e){this.flags=Ce(this.flags,262144,e)}get shorthand(){return ke(this.flags,524288)}set shorthand(e){this.flags=Ce(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(Ne()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===ue?e:this.computed?[...e,ue]:this.key instanceof ui?[...e,this.key.name]:[...e,String(this.key.value)]}}Fl.prototype.includeNode=jn,Fl.prototype.applyDeoptimizations=Un;class Vl extends Fn{get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Me}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||mi(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(me,e);for(const t of this.decorators)t.includePath(me,e)}}Vl.prototype.applyDeoptimizations=Un;class jl extends Fn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(me,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Le)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}jl.prototype.applyDeoptimizations=Un;class Ul extends Fn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof Mi)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=se){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of Z(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&Q(e,u,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else G(l,e,u,d);o&&e.remove(o,this.end)}}Ul.prototype.includeNode=jn,Ul.prototype.applyDeoptimizations=Un;class Gl extends Fn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,fe,e)}}class Hl extends Fn{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 n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:W(e.original,"default",this.start)+7,i=W(e.original,":",s)+1;Y(this.consequent,e,i,n.end,t)}}}Hl.prototype.needsBoundaries=!0,Hl.prototype.includeNode=jn,Hl.prototype.applyDeoptimizations=Un;class Wl extends Fn{createScope(e){this.parentScope=e,this.scope=new bi(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=Ne();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){super.initialise();for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}parseNode(e){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&Y(this.cases,e,this.cases[0].start,this.end-1,t)}}Wl.prototype.includeNode=jn,Wl.prototype.applyDeoptimizations=Un;class ql extends wa{get hasCheckedForWarnings(){return ke(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Ce(this.flags,268435456,e)}bind(){super.bind()}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(fe,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArguments(this.interaction,e))}initialise(){super.initialise(),this.args=[Le,...this.quasi.expressions],this.interaction={args:[this.tag instanceof wr&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===qe){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(nt,jt(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=xe){return null===this.returnExpression?(this.returnExpression=Me,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(fe,this.interaction,e,this)):this.returnExpression}}ql.prototype.includeNode=Vn;class Kl extends Fn{get tail(){return ke(this.flags,1048576)}set tail(e){this.flags=Ce(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}Kl.prototype.includeNode=Vn;class Xl extends Fn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Re:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Me:hs(us,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(us,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(me,e)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Jl extends fi{constructor(e,t){super(e,t),this.variables.set("this",new ri("this",null,Yn,fe,t,"other"))}addDeclaration(e,t,n,s,i){return this.context.module.importDescriptions.has(e.name)&&t.error(ln(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t,n){const s=new Gr(e,t,n);return this.variables.set("default",s),s}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof si&&this.accessedOutsideVariables.set(e,n),n}}class Yl extends Fn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof Li&&e.thisVariable===t);){if(!(e instanceof fi))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Fl&&n.functionNode.parent.parent instanceof Ll&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Jl?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(nt,{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:ht("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class Zl extends Fn{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(me,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Ql extends Fn{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?Bn:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}}Ql.prototype.includeNode=jn,Ql.prototype.applyDeoptimizations=Un;const ec={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Re,typeof:e=>typeof e,void:()=>{},"~":e=>~e},tc=Symbol("Unassigned");class nc extends Fn{constructor(){super(...arguments),this.renderedLiteralValue=tc}get prefix(){return ke(this.flags,2097152)}set prefix(e){this.flags=Ce(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Re}getLiteralValueAtPath(e,t,n){if(e.length>0)return Re;const s=this.argument.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===Oe)return!0;if(s===De)return!1}return Re}return ec[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof ui)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(fe,Ve,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(fe),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==tc?this.renderedLiteralValue:this.renderedLiteralValue=e?Re:xa(this.getLiteralValueAtPath(fe,xe,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof ui&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Re)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;sc.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const sc=/[\s([=%&*+-/<>^|,?:;]/;nc.prototype.includeNode=Vn;class ic extends Fn{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.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Le)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?te(s,this.start,this.end,e,t):ne(s,this.start,this.end,this.parent.type!==We,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${ee([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==We,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(fe),this.argument instanceof ui){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}ic.prototype.includeNode=Vn;class rc extends Fn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(fe)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=se){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof ma||i instanceof ha)&&r.include(e,t)}}initialise(){super.initialise(),this.isUsingDeclaration="await using"===this.kind||"using"===this.kind;for(const e of this.declarations)e.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=se){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===qe){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${ee(r,o)};`)}renderReplacedDeclarations(e,t){const n=Z(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=K(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof ui&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof ui&&nl(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=W(e.original,"=",d.id.end);te(h,K(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else G(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}}rc.prototype.includeNode=jn,rc.prototype.applyDeoptimizations=Un;class oc extends Fn{hasEffects(e){return!!this.test.hasEffects(e)||za(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Fa(e,this.body,t)}}oc.prototype.includeNode=jn,oc.prototype.applyDeoptimizations=Un;class ac extends Fn{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(me)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(me,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const lc=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"],cc=[Ml,Tl,Ts,ha,fa,ga,ya,ba,$a,Ti,va,Ia,Na,ka,Ra,Si,Da,La,Ma,Ta,Ba,Mi,Va,ja,Ua,Ui,Ga,Ha,Mi,Wa,qa,Ka,ji,Xa,ui,Za,Qa,el,tl,rl,cl,ul,hl,fl,ml,Pl,yl,bl,wl,dl,Il,Nl,kl,Cl,gl,Rl,Al,Dl,Sr,Sr,Sr,Sr,Sr,Sr,Ol,wr,Rr,yi,_l,Ll,ma,Bl,zl,Fl,Vl,Bi,jl,Ul,Ms,Ei,Gl,Hl,Wl,ql,Kl,Xl,Yl,Zl,Ql,nc,ic,rc,sl,oc,ac],uc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=hc(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",fe,Le)),o[o.length-1]instanceof Bi),e.body=dc(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=dc(e,s,n[t+1],n),e.right=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=dc(e,s,n[t],n),e.right=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=dc(e,s,n[t+1],n),e.right=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Ln(n[t+1],n),e.callee=dc(e,s,n[t+2],n),e.arguments=hc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:dc(e,s,i,n);r?.declare("parameter",fe,Le),e.body=dc(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=dc(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=hc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:dc(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:dc(e,s,r,n),e.body=dc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=hc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:dc(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:dc(e,s,r,n),e.body=dc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=dc(e,s,n[t],n),e.consequent=dc(e,s,n[t+1],n),e.alternate=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:dc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=dc(e,s,n[t],n),e.test=dc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:dc(e,s,i,n),e.source=dc(e,s,n[t+1],n),e.attributes=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=hc(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:dc(e,s,i,n),e.attributes=hc(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:dc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=dc(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=dc(e,s,n[t],n),e.right=dc(e,s,n[t+1],n),e.body=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=dc(e,s,n[t+1],n),e.right=dc(e,s,n[t+2],n),e.body=dc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:dc(e,s,i,n);const r=n[t+1];e.test=0===r?null:dc(e,s,r,n);const o=n[t+2];e.update=0===o?null:dc(e,s,o,n),e.body=dc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:dc(e,s.parent,o,n);const a=e.params=hc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",fe,Le)),a[a.length-1]instanceof Bi),e.body=dc(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:dc(e,e.idScope,o,n);const a=e.params=hc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",fe,Le)),a[a.length-1]instanceof Bi),e.body=dc(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=dc(e,s,n[t],n),e.consequent=dc(e,e.consequentScope=new Ja(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:dc(e,e.alternateScope=new Ja(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=dc(e,s,n[t],n),e.value=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=hc(e,s,n[t],n),e.source=dc(e,s,n[t+1],n),e.attributes=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=dc(e,s,n[t],n),e.sourceAstNode=ca(n[t],n);const i=n[t+1];e.options=0===i?null:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=dc(e,s,n[t+1],n),e.imported=0===i?e.local:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=dc(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=dc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=dc(e,s,n[t],n),e.children=hc(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:dc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=dc(e,s,n[t],n),e.children=hc(e,s,n[t+1],n),e.closingFragment=dc(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=dc(e,s,n[t],n),e.property=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=dc(e,s,n[t],n),e.name=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=dc(e,s,n[t+1],n),e.attributes=hc(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=dc(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=dc(e,s,n[t],n),e.body=dc(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=new DataView(n.buffer).getFloat64(t+1<<2,!0)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=dc(e,s,n[t+1],n),e.right=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=dc(e,s,n[t+1],n),e.property=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=dc(e,s,n[t],n),e.property=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=hc(e,s,n[t+1],n),e.key=dc(e,s,n[t+2],n),e.value=dc(e,s,n[t+3],n),e.kind=Dn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Ln(n[t],n),e.callee=dc(e,s,n[t+1],n),e.arguments=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=hc(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=hc(e,s,n[t],n),e.invalidAnnotations=Ln(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=dc(e,s,n[t+2],n),e.kind=Dn[n[t+3]],e.key=0===r?e.value:dc(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=hc(e,s,n[t+1],n),e.key=dc(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:dc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=hc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:dc(e,s,i,n),e.consequent=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=dc(e,e.parentScope,n[t],n),e.cases=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=dc(e,s,n[t],n),e.quasi=dc(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?void 0:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=hc(e,s,n[t],n),e.expressions=hc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=dc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=dc(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:dc(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:dc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.argument=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Dn[n[t+1]],e.argument=dc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Dn[n[t]],e.declarations=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=dc(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:dc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=dc(e,s,n[t],n),e.body=dc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:dc(e,s,r,n)}];function dc(e,t,n,s){const i=s[n],r=cc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=lc[i],o.start=s[n+1],o.end=s[n+2],uc[i](o,n+3,s),o.initialise(),o}function hc(e,t,n,s){if(0===n)return re;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?dc(e,t,i,s):null}return r}const pc={ArrayExpression:Ts,ArrayPattern:ha,ArrowFunctionExpression:fa,AssignmentExpression:ga,AssignmentPattern:ya,AwaitExpression:ba,BinaryExpression:$a,BlockStatement:Ti,BreakStatement:va,CallExpression:Ia,CatchClause:Na,ChainExpression:ka,ClassBody:Ra,ClassDeclaration:Si,ClassExpression:Da,ConditionalExpression:La,ContinueStatement:Ma,DebuggerStatement:Ta,Decorator:Ba,DoWhileStatement:Va,EmptyStatement:ja,ExportAllDeclaration:Ua,ExportDefaultDeclaration:Ui,ExportNamedDeclaration:Ga,ExportSpecifier:Ha,ExpressionStatement:Mi,ForInStatement:Wa,ForOfStatement:qa,ForStatement:Ka,FunctionDeclaration:ji,FunctionExpression:Xa,Identifier:ui,IfStatement:Za,ImportAttribute:Qa,ImportDeclaration:el,ImportDefaultSpecifier:tl,ImportExpression:rl,ImportNamespaceSpecifier:cl,ImportSpecifier:ul,JSXAttribute:hl,JSXClosingElement:fl,JSXClosingFragment:ml,JSXElement:Pl,JSXEmptyExpression:yl,JSXExpressionContainer:bl,JSXFragment:wl,JSXIdentifier:dl,JSXMemberExpression:Il,JSXNamespacedName:Nl,JSXOpeningElement:kl,JSXOpeningFragment:Cl,JSXSpreadAttribute:gl,JSXSpreadChild:Rl,JSXText:Al,LabeledStatement:Dl,Literal:Sr,LogicalExpression:Ol,MemberExpression:wr,MetaProperty:Rr,MethodDefinition:yi,NewExpression:_l,ObjectExpression:Ll,ObjectPattern:ma,PanicError:Ml,ParseError:Tl,PrivateIdentifier:Bl,Program:zl,Property:Fl,PropertyDefinition:Vl,RestElement:Bi,ReturnStatement:jl,SequenceExpression:Ul,SpreadElement:Ms,StaticBlock:Ei,Super:Gl,SwitchCase:Hl,SwitchStatement:Wl,TaggedTemplateExpression:ql,TemplateElement:Kl,TemplateLiteral:Xl,ThisExpression:Yl,ThrowStatement:Zl,TryStatement:Ql,UnaryExpression:nc,UnknownNode:class extends Fn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:ic,VariableDeclaration:rc,VariableDeclarator:sl,WhileStatement:oc,YieldExpression:ac};class fc extends bn{constructor(e){super(co),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var mc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(mc||(mc={}));const gc=new WeakMap;function yc(e,t){if(e){const t=gc.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=f(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||yc(e)}function bc(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?function(e){const{length:t}=e,n=new d(e),s=[];let i=0,r=0,a=0,c=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,p=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<p&&(d=!1),p=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(u=o(n,u),s=[i,r,a,c,u]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}d||h(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return gc.set(i,s),i}function Ec(e){return e.id}const xc=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=ca(0,e);switch(t.type){case"PanicError":return Pt(wt(an(t.message)));case"ParseError":return Pt(wt(an(t.message,t.start)));default:return t}}(da(ra(e,t,n))),Ac=new Set(["assert","with"]);function Sc(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Ll))return n&&t.module.log(nt,en(t.module.id),s),ie;const i=n.properties.find(e=>Ac.has($c(e)))?.value;if(!i)return ie;if(!(i instanceof Ll))return t.module.log(nt,(r=t.module.id,{code:Rt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${lt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ie;var r;const o=i.properties.map(e=>{const n=$c(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(nt,en(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):ie}const $c=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function vc(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var Pc="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},wc={memoryUsage:()=>({heapUsed:0})};let Ic=new Map;function Nc(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function kc(e,t=3){e=Nc(e,t);const n=wc.memoryUsage().heapUsed,s=Pc.now(),i=Ic.get(e);void 0===i?Ic.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Cc(e,t=3){e=Nc(e,t);const n=Ic.get(e);if(void 0!==n){const e=wc.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=Pc.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Rc(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Ic)e[t]=[s,n,i];return e}let Dc=Rn,Oc=Rn;const _c=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Lc(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of _c)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Dc(s,4);const t=r.apply(this,e);return Oc(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}const Mc={identifier:null,localName:co};function Tc(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:Pt((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${lt(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function Bc(e,t){const n=ae(t.sideEffectDependenciesByVariable,e,le);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof Gr?s.getDirectOriginalVariable():s instanceof Wr?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class zc{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,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.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedDirectTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new fc(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=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,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 u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,Ec).sort()},get implicitlyLoadedBefore(){return Array.from(f,Ec).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:s,isExternal:!1,get isIncluded(){return e.phase!==mc.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=z(this.id),t=V(this.id);return vn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){xn(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Pt(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 kn)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,n=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&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof Wr?s=s.getBaseVariable():s instanceof Gr&&(s=s.getOriginalVariable()),e.add(s.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[n]=this.getVariableForExportName(t);if(n instanceof Gr&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof En))continue;const s=e.get(n);s?s.push(t):e.set(n,[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 kn)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.included?e:t).push(n)}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:Pt((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${lt(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:n,onlyExplicit:s,searchedNamesAndModules:i}=ie){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,n]=Tc(r.module,r.localName,t,!1,i);return e?(t&&(Fc(e,t,this),this.info.moduleSideEffects&&ae(t.sideEffectDependenciesByVariable,e,le).add(this)),[e]):this.error(sn(r.localName,this.id,r.module.id,!!n?.missingButExportExists),r.start)}const o=this.exports.get(e);if(o){if(o===Mc)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return n?(t&&(Fc(n,t,this),ae(t.sideEffectDependenciesByVariable,n,le).add(this)),[n]):[null,{missingButExportExists:!0}]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[ae(this.syntheticExports,e,()=>new Wr(this.astContext,e,this.getSyntheticNamespace()))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=Ie();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){if(e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces()),this.allExportsIncluded)return;this.allExportsIncluded=!0,this.isExecuted||(Cn(this),this.graph.needsTreeshakingPass=!0);const t=Ie();for(const n of this.exports.keys())if(e||n!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(n)[0];if(!e)return Pt(nn(n,this.id));this.includeVariable(e,me,t),e.deoptimizePath(me)}for(const e of this.getReexports()){const[n]=this.getVariableForExportName(e);n&&(n.deoptimizePath(me),this.includeVariable(n,me,t),n instanceof En&&(n.module.reexported=!0))}}includeAllInBundle(){this.ast.include(Ie(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(Cn(this),this.graph.needsTreeshakingPass=!0);let t=!1;const n=Ie();for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(me),this.includeVariable(e,me,n)),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 n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof kn?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?Pt((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(Dc("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.originalCode=s,this.originalSourcemap=bc(i),this.sourcemapChain=o.map(e=>e.missing?e:bc(e)),yc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new N(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),addImportSource:this.addImportSource.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>pc[e]||pc.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,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Jl(this.graph.scope,this.astContext),this.namespace=new Hr(this.astContext);const d={context:this.astContext,type:"Module"};if(e)this.ast=new pc[e.type](d,this.scope).parseNode(e),this.info.ast=e;else{Oc("generate ast",3);const e=await async function(e,t,n){return ra(e,t,n)}(t,!1,!1!==this.options.jsx);Dc("generate ast",3),this.ast=(h=e,p=d,f=this.scope,dc(p,f,0,da(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(u,e),e)}}})}var h,p,f;Oc("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Ec),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:n,searchedNamesAndModules:s}=ie){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof zc&&"*"===r.name)return e.namespace;const[i,o]=Tc(e,r.name,t||this,n,s);return i||this.error(sn(r.name,this.id,e.id,!!o?.missingButExportExists),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}assertUniqueExportName(e,t){(this.exports.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof Ui)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Ua){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Sr?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Sr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Sr?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Sr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof rc)for(const e of t.declarations)for(const t of Vo(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof ui?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(ln(e),n.local.start);const s=n instanceof tl?"default":n instanceof cl?"*":n.imported instanceof ui?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributes.has(e)&&this.sourcesWithAttributes.set(e,ie)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Ye(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter(e=>!e.missing);e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter(e=>e.length>1),s=n[n.length-1];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(nt,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}It(e,{column:i,line:r},n,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,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof kn||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map(e=>[$c(e),e.value.value])):ie);var s;const i=this.sourcesWithAttributes.get(e);i?vc(i,n)&&this.log(nt,Kt(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e);return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${lt(a)}" even though it is needed in "${lt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:ht(ft)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Tc(o,e,t,!0,Vc(n));o instanceof kn||l?.indirectExternal?r.add(a):a instanceof Wr?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(nt,(o=e,a=this.id,l=t.map(([,e])=>e.id),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${lt(a)}" re-exports "${o}" from one of the modules ${ot(l.map(e=>lt(e)))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(nt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${lt(t)}" re-exports "${e}" from one of the external modules ${ot(s.map(e=>lt(e)))}, guessing "${lt(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{indirectExternal:!0}]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof kn){const[t]=n.getVariableForExportName("*");t.includePath(me,Ie()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(me,Ie()),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 zc){t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),e.withinTopLevelAwait&&t.includedDirectTopLevelAwaitingDynamicImporters.add(this));const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof zc&&i!==this&&Bc(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof zc&&(i.isExecuted||Cn(i),i!==this)){const t=Bc(e,this);for(const e of t)e.isExecuted||Cn(e)}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(nt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${lt(t)}".`})),this.exports.set(e,Mc)}tryParse(){try{return xc(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(un(e,this.id),e.pos)}}}function Fc(e,t,n){if(e.module instanceof zc&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const Vc=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),jc=(e,t)=>t?`${e}\n${t}`:e,Uc=(e,t)=>t?`${e}\n\n${t}`:e;const Gc={amd:qc,cjs:qc,es:Wc,iife:qc,system:Wc,umd:qc};function Hc(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof Gr&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,hi(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,hi(t.name,e,t.forbiddenNames))}}}(s,f,p),Gc[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function Wc(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof qr)&&(t.variableName=hi(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof kn)?n.setRenderNames(null,(t instanceof kn?a.get(t):o.get(t)).variableName):t instanceof kn&&"default"===s?n.setRenderNames(null,hi([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,hi(vn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,hi(t.name,e,t.forbiddenNames))}function qc(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=hi(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=hi(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&rr(r(t.id),a)?t.namespaceVariableName:hi(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof kn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=nr[s]?n.defaultVariableName:n.variableName;sr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,ir[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Kc(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Pt(Qt("default",o,i))}else if("none"===t&&o.length>0)return Pt(Qt("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(nt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${lt(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:ht(yt)}}(i,n)),t="named")),t}function Xc(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}function Jc(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof kn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Jc(e,t,n,s,i,r)):t.push(o)}}const Yc="!~{",Zc="}~",Qc=new RegExp(`${Yc}[0-9a-zA-Z_$]{1,16}${Zc}`,"g"),eu=(e,t)=>e.replace(Qc,e=>t.get(e)||e),tu=(e,t,n)=>e.replace(Qc,e=>e===t?n:e),nu=Symbol("bundleKeys"),su={type:"placeholder"};function iu(e,t,n){return ct(e)?Pt(mn(`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,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return Pt(mn(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return ct(r)?Pt(mn(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function ru(e,{[nu]:t}){if(!t.has(e.toLowerCase()))return e;const n=V(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const ou=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function au(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(nt,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:ht("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class lu{constructor(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,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.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.allowExtensionModules=new Set,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&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.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=vn(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new lu([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof zc?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 n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof Wr&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>eu(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map(([e,t])=>[r(e),t])),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName: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[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=di(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=di(s))}while(An.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Kc(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map(({namespace:e})=>e));for(const s of t){if("allow-extension"===s.preserveSignature){if(this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}}const t=Array.from(new Set(s.chunkNames.filter(({isUserDefined:e})=>e).map(({name:e})=>e)),e=>({name:e}));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,e=>({fileName:e}))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(lu.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=cu(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return qi(dt(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:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=z(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=iu("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=ru(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=su),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=iu("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e||8)),name:()=>this.getChunkName()}),t||(e=ru(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(pu),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,pu),importedBindings:du(this.getRenderedDependencies(),pu),imports:Array.from(this.dependencies,pu),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof Hr?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];Jc(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)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)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof lu&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o);let b=y.length>0,E=!1;for(const e of g){const{reexports:t}=e;t?.length&&(b=!0,!E&&t.some(e=>"default"===e.reexported)&&(E=!0),"es"===o&&(e.reexports=t.filter(({reexported:e})=>!y.find(({exported:t})=>t===e))))}if(!E)for(const{exported:e}of y)if("default"===e){E=!0;break}const{intro:x,outro:A,banner:S,footer:$}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],jc),t.hookReduceValue("footer",e.footer(n),[n],jc),t.hookReduceValue("intro",e.intro(n),[n],Uc),t.hookReduceValue("outro",e.outro(n),[n],Uc)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return Pt((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(Eo[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:E,hasExports:b,id:l.fileName,indent:d,intro:x,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:A,snippets:r,usesTopLevelAwait:m},s),S&&h.prepend(S),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return $&&h.append($),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.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},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):cu(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof zc){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(nt,Ht(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i}}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof Wr,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof Hr&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof zc){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}}}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?cu(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof Wr)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find(({reexported:e})=>e===n),a=i?.find(({imported:e})=>e===o?.imported);if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof ri){for(const e of s.declarations)if(e.parent instanceof ji||e instanceof Ui&&e.declaration instanceof ji){r=!0;break}}else s instanceof Wr&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=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 kn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?nr[n(o.id)]&&i.add(a):t.isNamespace&&ir[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof lu||e instanceof qr))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof kn){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=Sc(n);r=e===ie||Kr(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?at(this.fileName):at(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;if(s instanceof kn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Pt(pn(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);ae(t,i,ce).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof zc?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof kn?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map(({id:e})=>e),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=uu(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(B(e.id.split(hu,1)[0])),r=V(i),o=ou.has(r)?i.slice(0,-r.length):i;return M(o)?n&&U(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"===this.inputBase&&"/"!==o[0]?j(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):j(this.inputBase,o):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+z(o)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(nt,fn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof Wr)continue;const a=n.module;if(a instanceof zc){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Pt(pn(a.id,r,!0));o=e&&("default"!==r||sr(t(a.id),!0))}}ae(n,i,ce).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof qr||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof qr?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof qr&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&au(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof lu,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof lu&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new C({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Xc(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let $="";const v=new Set,P=new Map,w={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let I=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(w);!w.accessedDocumentCurrentScript&&Dr.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(tr),w.accessedDocumentCurrentScript=!1,({source:n}=r),I||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),P.set(e,n),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(w);o.renderFirst()?$+=E+e:x.addSource(new N(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}$&&x.prepend($+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${co}${y}=${y}void 0;${E}${E}`);const k=h?x:x.trim();var R;return o&&0===this.getExportNames().length&&0===n.size&&r(nt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${R=this.getChunkName()}".`,names:[R]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:k,usedModules:S,usesTopLevelAwait:I}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=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,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",a,n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof Wr?r.add(n):n.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(co),t&&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 xr)o.add(e)}Hc(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof Gr&&(n=n.getOriginalVariable()),n instanceof Wr&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof zc&&(this.checkCircularDependencyImport(n,e),n instanceof Hr&&this.outputOptions.preserveModules||t.exports.add(n)))}(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:n}of e.dynamicImports)t.included&&n instanceof zc&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function cu(e){return uu(e)??at(e.id)}function uu(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function du(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const hu=/[#?]/,pu=e=>e.getFileName();function*fu(e){for(const t of e)yield*t}function mu(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=new Set(e.keys()),n=Object.create(null);for(const[s,i]of e)gu(s,n[i]||=[],t);const s=Object.entries(n),i=new Array(s.length);let r=0;for(const[e,t]of s)i[r++]={alias:e,modules:t};return{chunkDefinitions:i,modulesInManualChunks:t}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c,dynamicallyDependentEntriesByAwaitedDynamicEntry:u,awaitedDynamicImportsByEntry:d}=function(e){const t=new Set,n=new Set,s=new Map,i=new Set(e),r=new Array(i.size),o=new Array(i.size);let a=0;for(const e of i){const l=new Set,c=new Set;r[a]=l,o[a]=c;const u=new Set([e]);for(const e of u){ae(s,e,le).add(a);for(const t of e.getDependenciesToBeIncluded())t instanceof kn||u.add(t);for(const{resolution:s}of e.dynamicImports)if(s instanceof zc&&s.includedDynamicImporters.length>0&&!i.has(s)){t.add(s),i.add(s),l.add(s);for(const e of s.includedDirectTopLevelAwaitingDynamicImporters)if(u.has(e)){n.add(s),c.add(s);break}}for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}a++}const l=[...i],{awaitedDynamicEntries:c,awaitedDynamicImportsByEntry:u,dynamicEntries:d,dynamicImportsByEntry:h}=function(e,t,n,s,i){const r=new Map,o=new Set,a=new Set;for(const[n,i]of e.entries())r.set(i,n),t.has(i)&&o.add(n),s.has(i)&&a.add(n);const l=yu(n,r),c=yu(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(l,t,r,n,o);return{allEntries:l,awaitedDynamicImportsByEntry:u,dependentEntriesByModule:s,dynamicallyDependentEntriesByAwaitedDynamicEntry:bu(s,c,l,e=>e.includedDirectTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:bu(s,d,l,e=>e.includedDynamicImporters),dynamicImportsByEntry:h}}(e),h=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),p=function(e,t){const n=e.map(()=>0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,h),f=Eu(p,l,c,o);!function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(h,f,Eu(p,u,d,o));const{chunks:m,sideEffectAtoms:g,sizeByAtom:y}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=new Array(e.length);let a=0n,l=1n,c=0;for(const{dependentEntries:u,modules:d}of e){let e=0n,h=-1n;for(const s of u)e|=1n<<BigInt(s),h&=t[s]|n[s];const p=i[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(u),modules:[],pure:!0,size:0};let f=0,m=!0;for(const e of d)r.set(e,p),e.isIncluded()&&(m&&=!e.hasEffects(),f+=s>1?e.estimateSize():1);m||(a|=l),o[c++]=f,p.containedAtoms|=l,p.modules.push(...d),p.pure&&=m,p.size+=f,l<<=1n}const u=Object.values(i);return a|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof kn){if(o.info.moduleSideEffects){const e=ae(s,o,()=>{const e=n;return n<<=1n,i|=e,e});r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(u,r,l),{chunks:u,sideEffectAtoms:a,sizeByAtom:o}}(h,p,f,n);return i.push(...function(e,t,n,s,i){Dc("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(xu),s.sort(xu),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return Oc("optimize chunks",3),e;t>1&&i("info",on(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Au(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),vu(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),vu(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",on(r.small.size+r.big.size,r.small.size,"After merging chunks"));return Oc("optimize chunks",3),[...r.small,...r.big]}(m,n,g,y,s).map(({modules:e})=>({alias:null,modules:e}))),i}function gu(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof kn||n.has(t)||s.add(t)}}function yu(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function bu(e,t,n,s){const i=new Map;for(const r of t){const t=ae(i,r,le),o=n[r];for(const n of fu([s(o),o.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return i}function Eu(e,t,n,s){const i=s.map((e,n)=>t.has(n)?-1n:0n);for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])ae(t,e,le).add(s)}}return i}function xu({size:e},{size:t}){return e-t}function Au(e,{big:t,small:n},s,i,r){let o=null;for(const a of fu([n,t])){if(e===a)continue;const t=Su(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function Su(e,t,n,s,i){const r=$u(e,t,n,s,i);return r<n?r+$u(t,e,n-r,s,i):1/0}function $u(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function vu(e,t,n){return e.size<t?n.small:n.big}const Pu=(e,t)=>e.execIndex>t.execIndex?1:-1;function wu(e){e.sort(Pu)}function Iu(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;e.cycles.add(s);for(;r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof zc){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t,node:n}of e.dynamicImports)t instanceof zc&&(n.withinTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const Nu=(e,t)=>t?`(${e})`:e;class ku{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class Cu{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=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:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Pt(hn(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0;let r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r){o=s[s[i][0]>t?Math.max(0,i-1):i]}if(o[0]===t||i===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]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function Ru(e){return function(t,n){return n.missing?(e(nt,(s=n.plugin,{code:Tt,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:ht("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Cu({mappings:[],names:[]},[t])):new Cu(n,[t]);var s}}function Du(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=F(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new ku(U(i,o,e),s[t]));r=new Cu(n,a)}else r=new ku(e,t);return s.reduce(i,r)}let Ou;const _u=e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase64Url(r,Wo(e));var s=sa().getInt32(r+0,!0),i=sa().getInt32(r+4,!0);return t=s,n=i,Yo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Mu(e)),Lu={base36:e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase36(r,Wo(e));var s=sa().getInt32(r+0,!0),i=sa().getInt32(r+4,!0);return t=s,n=i,Yo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Mu(e)),base64:_u,hex:e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase16(r,Wo(e));var s=sa().getInt32(r+0,!0),i=sa().getInt32(r+4,!0);return t=s,n=i,Yo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Mu(e))};function Mu(e){return"string"==typeof e?"undefined"==typeof Buffer?(Ou??=new TextEncoder,Ou.encode(e)):Buffer.from(e):e}let Tu="sourceMa";async function Bu(e,t,n,s,i){Dc("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()));Oc("render chunks",2),Dc("transform chunks",2);const o=Lu[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,u=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&u.add(t);return await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:d,sourcemapFileName:p?.fileName??null,...await zu(f,d,m,t,n,s,r)},{code:y,map:b}=g;if(h){const{containedPlaceholders:t,transformedCode:n}=((e,t)=>{const n=new Set,s=e.replace(Qc,e=>t.has(e)?(n.add(e),`${Yc}${"0".repeat(e.length-5)}${Zc}`):e);return{containedPlaceholders:n,transformedCode:s}})(y,u);let r=n;const o=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>(t&&(e+=t),e));o&&(r+=o),a.set(h,g),l.set(h,{containedPlaceholders:t,contentHash:i(r)})}else o.push(g);const E=p?.hashPlaceholder;b&&E&&c.set(p.hashPlaceholder,i(b.toString()).slice(0,p.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:o,placeholders:u,renderedChunksByPlaceholder:a}}(r,a,s,n,o,i),p=function(e,t,n,s,i,r){const o=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let a="";const l=new Set([n]);for(const e of l){const{containedPlaceholders:n,contentHash:s}=t.get(e);a+=s;for(const e of n)l.add(e)}let c,u;do{u&&(a=u),u=r(a).slice(0,n.length),c=tu(s,n,u)}while(i[nu].has(c.toLowerCase()));i[c]=su,o.set(n,u)}return o}(h,l,c,d,t,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=eu(o,t);const u=eu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=Vu(e,c)),d=l?eu(l,t):`${u}.map`,c.file=eu(c.file,t),e+=Fu(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?eu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=Vu(s,c)),u=l?eu(l,t):`${a}.map`,s+=Fu(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),Oc("transform chunks",2)}async function zu(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],(e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=bc(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;Dc("sourcemaps",3),s=h?U(m||h):d?U(d,t):U(t);a=function(e,t,n,s,i,r){const o=Ru(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Du(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new Cu(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=F(e);u=u.map(e=>j(t,e)),e=z(e)}d=i?null:d;for(const e of n)yc(e.originalSourcemap,e.sourcemapChain);return new E({file:e,mappings:p,names:h,sources:u,sourcesContent:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Pt(mn("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),g&&(t=g(t,n),"string"!=typeof t&&Pt(mn("sourcemapPathTransform function must return a string."))),a.sources[e]=B(t)}Oc("sourcemaps",3)}return{code:c,map:a}}function Fu(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=z(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# sourceMappingURL=${r}\n`}function Vu(e,t){const n=Lu.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}Tu+="ppingURL";class ju{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){Dc("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===nu?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{Dc("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Oc("initialize render",2),Dc("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Pt(mn(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Yc}${di(++e).padStart(n-5,"0")}${Zc}`;return s.length>n?Pt(mn(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Pt(tn("output.format",bt,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Pt(tn("output.file",gt,'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 Pt(tn("output.sourcemapFile",$t,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(nt,tn("output.amd.id",mt,'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(),e.inlineTransitiveImports();Oc("generate chunks",2),await Bu(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),Dc("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),Oc("generate bundle",2),Oc("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=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:s}of n)for(const n of s)Uu(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof zc){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort(([e],[t])=>e>t?1:e<t?-1:0);const s=new Map;for(const[e,n]of t)Uu(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{xc(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(nt,Ut(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,u=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>Pn.test(e):e=>!An.has(e)&&Pn.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Nu(`${r}${Nu(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map(([e,t])=>{if(null===e)return`${n}${t}`;const i=In(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`}).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const n of e.values())n instanceof zc&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return F(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&M(s.id)&&n.push(s.id);return n}(l,r)),u=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof kn&&s.set(i,new qr(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),d=s?[{alias:null,modules:l}]:r?l.map(e=>({alias:null,modules:[e]})):mu(this.graph.entryModules,o,n,this.inputOptions.onLog),h=new Array(d.length),p=new Map;let f=0;for(const{alias:n,modules:s}of d){wu(s);const i=new lu(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,p,u,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);h[f++]=i}for(const e of h)e.link();const m=[];for(const e of h)m.push(...e.generateFacades());return[...h,...m]}}function Uu(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Pt((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${lt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class Gu extends pi{constructor(){super(),this.parent=null,this.variables.set("undefined",new Ur)}findVariable(e){let t=this.variables.get(e);return t||(t=new si(e),this.variables.set(e,t)),t}}async function Hu(e,t,n,s,i,r,o,a,l,c){const u=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=se)=>(l??=!0,l&&-1!==i.findIndex(s=>s.plugin===t&&s.source===e&&s.importer===n)?Promise.resolve(null):s(e,n,o,a,r||ie,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);if(null!=u){const[e,t]=u;return"object"!=typeof e||e.resolvedBy?"string"==typeof e?{id:e,resolvedBy:t.name}:e:{...e,resolvedBy:t.name}}return void 0===t||M(e)||"."===e[0]?async function(e,t,n){return await Wu(e,t,n)??await Wu(e+".mjs",t,n)??await Wu(e+".js",t,n)}(t?U(F(t),e):U(e),n,c):null}async function Wu(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await Wu(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=z(e);if((await n.readdir(F(e))).includes(t))return e}}catch{}}function qu(e){return 65279===e.charCodeAt(0)?qu(e.slice(1)):e}const Ku="at position ",Xu="at output position ";const Ju={delete:()=>!1,get(){},has:()=>!1,set(){}};function Yu(e){return e.startsWith(Ku)||e.startsWith(Xu)?Pt({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Pt({code:"DUPLICATE_PLUGIN_NAME",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 Zu=(e,t,n=nd)=>{const{onwarn:s,onLog:i}=e,r=Qu(n,s);if(i){const e=rt[t];return(t,n)=>i(t,ed(n),(t,n)=>{if("error"===t)return Pt(td(n));rt[t]>=e&&r(t,td(n))})}return r},Qu=(e,t)=>t?(n,s)=>{n===nt?t(ed(s),t=>e(nt,td(t))):e(n,s)}:e,ed=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),td=e=>"string"==typeof e?{message:e}:"function"==typeof e?td(e()):e,nd=(e,{message:t})=>{switch(e){case nt:return console.warn(t);case it:return console.debug(t);default:return console.info(t)}};function sd(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter(e=>!(r.has(e)||i.test(e)));o.length>0&&s(nt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const id={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:re,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:re,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:re,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},rd={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},od={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},ad=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Pt(tn(`${n}.preset`,s,`valid values are ${ot(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Pt(tn(t,n,`valid values are ${s}${ot(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},ld=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 cd(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:bc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=td(t),n&&It(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i],function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s(nt,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(bc("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&It(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:bc({version:3,...Du(e,t,n,s,Ru(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new N(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new E({...e,file:null,sourcesContent:e.sourcesContent})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Pt(dn(e,p,{hook:"transform",id:i}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const ud="resolveDependencies";class dd{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,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,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Hu(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i,this.options.fs),t,e),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map(e=>this.loadEntryModule(e,!1,void 0,null,t))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null))).then(i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,pd(o,e[r],t,s+r);const i=this.indexedEntryModules.find(e=>e.module===o);i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort(({index:e},{index:t})=>e>t?1:-1),i}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:e})=>e),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,ie),void 0,!1,!e.resolveDependencies||ud)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async s=>{if(pd(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map(t=>this.loadEntryModule(t,!1,e.importer,s.id)));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await this.options.fs.readFile(e,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${lt(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:Pt(function(e){return{code:"BAD_LOADER",message:`Error loading "${lt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=qu(i.code);const r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==i.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}]))n.updateOptions(i),await n.setSource(await cd(i,n,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);await n.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 n=await Promise.all(t.map(t=>t.then(async([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(lt(n.id),e.id,n))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof zc)return r&&vc(e,l.info.attributes)&&this.options.onLog(nt,Kt(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof kn)return Pt({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 zc(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then(()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d]),d=md(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===ud&&await d:await this.fetchModuleDependencies(c,...h),c}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof kn))return Pt(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${lt(t)}", but is already an existing non-external module id.`}}(e,t));vc(l.info.attributes,s)&&this.options.onLog(nt,Kt(l.info.attributes,s,e,t))}else l=new kn(this.options,r,o,a,"absolute"!==i&&M(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map(t=>t.then(([t,n])=>this.fetchResolvedDependency(t,e.id,n)))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof zc&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!M(e.id)||!0===i&&fd(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(fd(e,n,s)||"absolute"),id:i&&s?hd(e,t):e}}const i=s?hd(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:fd(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,Sc(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id):t.node.shouldIncludeDynamicAttributes=!0,[t,n]})}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,ie,!1,n),t,e.id,n)])}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===ud?md(s):s;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 s)}handleInvalidResolvedId(e,t,n,s){return null===e?T(t)?Pt(function(e,t){return{code:Ft,exporter:e,id:t,message:`Could not resolve "${e}" from "${lt(t)}"`}}(t,n)):(this.options.onLog(nt,function(e,t){return{code:Ft,exporter:e,id:t,message:`"${e}" is imported by "${lt(t)}", but could not be resolved – treating it as an external dependency.`,url:ht("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(nt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${lt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await Hu(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ie,!0,ie,this.options.fs);if(null==r)return Pt(null===s?function(e){return{code:zt,message:`Could not resolve entry module "${lt(e)}".`}}(e):function(e,t){return{code:_t,message:`Module "${lt(e)}" that should be implicitly loaded before "${lt(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?Pt(null===s?o&&i?{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(e){return{code:zt,message:`Entry module "${lt(e)}" cannot be external.`}}(e):function(e,t){return{code:_t,message:`Module "${lt(e)}" that should be implicitly loaded before "${lt(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},ie),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(vc(i.attributes,s)&&this.options.onLog(nt,Kt(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,ie,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function hd(e,t){return T(e)?t?U(t,"..",e):U(e):e}function pd(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function fd(e,t,n){return!0===n||"ifRelativeSource"===n&&T(t)||!M(e)}async function md(e){const[t,n]=await e;return Promise.all([...t,...n])}function gd(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return ru(iu("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return gn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',vt,!1,l),e},names:t,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',vt,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>V(c).slice(1),extname:()=>V(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-V(c).length))}),a)}function yd(e,{bundle:t},n){t[nu].has(e.toLowerCase())?n(nt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=su}const bd=new Set(["chunk","asset","prebuilt-chunk"]);function Ed(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Pt(mn(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class xd{constructor(e,t,n){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&&bd.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!ct(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Pt(mn(`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}".`)):Pt(mn(`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 Pt(Vt(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Pt({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Pt({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):e.fileName}(t,e):Pt({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Pt({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Pt(mn(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Pt({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Ed(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=Lu[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&yd(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{ae(i,n(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=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=_u(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some(({filesByReferenceId:e})=>e.has(n)));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}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,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:Ed(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,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:n,source:s}=e;n&&yd(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>mc.LOAD_AND_PARSE)return Pt({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Pt(mn(`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 Pt(mn(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||ct(e.fileName))return Pt(mn(`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"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=gd(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return gn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',vt,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',vt,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=gd(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return gn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',vt,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',vt,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Ad(e,t,n,s,i){return rt[e]<rt[i]?Rn:(i,r)=>{null!=r&&n(nt,{code:"INVALID_LOG_POSITION",message:`Plugin "${s}" 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.`}),(i=td(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function Sd(t,n,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,u=!0;if("string"!=typeof t.cacheKey&&(t.name.startsWith(Ku)||t.name.startsWith(Xu)||o.has(t.name)?u=!1:o.add(t.name)),n)if(u){const e=t.cacheKey||t.name;h=n[e]||(n[e]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else d=t.name,c={delete:()=>Yu(d),get:()=>Yu(d),has:()=>Yu(d),set:()=>Yu(d)};else c=Ju;var d,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:Ad(it,"PLUGIN_LOG",l,t.name,a),emitFile:r.emitFile.bind(r),error:e=>Pt(dn(td(e),t.name)),fs:i.fs,getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:Ad(st,"PLUGIN_LOG",l,t.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:e,watchMode:s.watchMode},parse:xc,resolve:(e,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=se)=>(a??=!0,s.moduleLoader.resolveId(e,n,r,o,i||ie,a?[{importer:n,plugin:t,source:e}]:null)),setAssetSource:r.setAssetSource,warn:Ad(nt,"PLUGIN_WARNING",l,t.name,a)}}function $d(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function vd(e){if(e instanceof RegExp)return t=>{const n=B(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||M(e)?B(e):B(U(t,e))}(e,t),s=zo(n,{dot:!0});return e=>{const t=B(e);return s(t)}}function Pd(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function wd(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function Id(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?$d(e.exclude):void 0,include:e.include?$d(e.include):void 0}}function Nd(e){if(!e)return;const{exclude:t,include:n}=Id(e),s=t?.map(vd),i=n?.map(vd);return wd(s,i)}function kd(e,t){if(!e&&!t)return;const n=Nd(e),s=function(e){if(!e)return;const{exclude:t,include:n}=Id(e),s=t?.map(Pd),i=n?.map(Pd);return wd(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Cd=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 Rd{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new xd(e,t,i&&i.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=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map(n=>[n,Sd(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Cd)n in e&&t.onLog(nt,Yt(e.name,n))}createOutputPluginDriver(e){return new Rd(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then(e=>e&&e[0])}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then(r=>this.runHook(e,[r,...n],t,i).then(e=>s.call(this.pluginContexts.get(t),r,e,t)));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,_d))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then(()=>this.runHook(e,t,i,n));return s.then(Ld)}getSortedPlugins(e,t){return ae(this.sortedPlugins,e,()=>Dd(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=ae(this.compiledPluginFilters.transformFilter,e,()=>kd(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=ae(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=Nd(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then(()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then(e=>(this.unfulfilledActions.delete(a),e))):s}).catch(t=>(null!==a&&this.unfulfilledActions.delete(a),Pt(dn(t,n.name,{hook:e}))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return Pt(dn(t,n.name,{hook:e}))}}}function Dd(e,t,n=Od){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function Od(e,t,n){"function"!=typeof e&&Pt(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,n.name))}function _d(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Pt(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,n.name))}function Ld(){}class Md{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise((t,n)=>{this.queue.push({reject:n,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:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class Td{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new Ee,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=mc.LOAD_AND_PARSE,this.scope=new Gu,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),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new Rd(this,e,e.plugins,this.pluginCache),this.moduleLoader=new dd(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Md(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[yn]=!0}return t})(e)}async build(){Dc("generate module graph",2),await this.generateModuleGraph(),Oc("generate module graph",2),Dc("sort and bind modules",2),this.phase=mc.ANALYSE,this.sortModules(),Oc("sort and bind modules",2),Dc("mark included statements",2),this.includeStatements(),Oc("mark included statements",2),this.phase=mc.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&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.cacheInfoGetters(),e instanceof zc?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Cn(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{Dc(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(Ie(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Oc("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()||Pt(rn(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=Iu(this.entryModules);for(const e of t)this.options.onLog(nt,Gt(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())if("*"!==t.name){const[n,s]=t.module.getVariableForExportName(t.name);n||e.log(nt,sn(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function Bd(e,t){return t()}function zd(t,n,s,i){t=Dd("onLog",t);const r=rt[i],o=(i,a,l=oe)=>{kt(a);if(!(rt[i]<r)){for(const n of t){if(l.has(n))continue;const{onLog:t}=n,c=e=>rt[e]<r?Rn:t=>o(e,td(t),new Set(l).add(n));if(!1===("handler"in t?t.handler:t).call({debug:c(it),error:e=>Pt(td(e)),info:c(st),meta:{rollupVersion:e,watchMode:s},warn:c(nt)},i,a))return}n(i,a)}};return o}const Fd=e=>()=>Pt(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:ht("plugin-development/#a-simple-example")}}(e)),Vd=Fd("fs.appendFile"),jd=Fd("fs.copyFile"),Ud=Fd("fs.mkdir"),Gd=Fd("fs.mkdtemp"),Hd=Fd("fs.readdir"),Wd=Fd("fs.readFile"),qd=Fd("fs.realpath"),Kd=Fd("fs.rename"),Xd=Fd("fs.rmdir"),Jd=Fd("fs.stat"),Yd=Fd("fs.lstat"),Zd=Fd("fs.unlink"),Qd=Fd("fs.writeFile");var eh=Object.freeze({__proto__:null,appendFile:Vd,copyFile:jd,lstat:Yd,mkdir:Ud,mkdtemp:Gd,readFile:Wd,readdir:Hd,realpath:qd,rename:Kd,rmdir:Xd,stat:Jd,unlink:Zd,writeFile:Qd});const th=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,nh=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of $d(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},sh=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},ih=e=>{const t=e.jsx;if(!t)return!1;const n=ad(t,rd,"jsx",ft,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Pt(tn("jsx",ft,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Pt(tn("jsx.mode",ft,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},rh=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},oh=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[U(t)]=s;return n=>e[n]??t}return()=>t},ah=e=>{if(!1===e.treeshake)return!1;const t=ad(e.treeshake,id,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??re,moduleSideEffects:lh(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},lh=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Pt(tn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},ch=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,uh=/^[a-z]:/i;function dh(e){const t=uh.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(ch,"_")}const hh=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Pt(tn("output.file",gt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Pt(tn("output.file",gt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},ph=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 Pt(tn("output.format",bt,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},fh=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Pt(tn("output.inlineDynamicImports",Et,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},mh=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Pt(tn("output.inlineDynamicImports",Et,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Pt(tn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},gh=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return U(t)},yh=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Pt(tn("output.amd.id",mt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Pt(tn("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}},bh=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Eh=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Pt(tn("output.dir",gt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},xh=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Ah(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Pt({code:Ct,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:ht(yt)});return n||"auto"}const Sh=(e,t)=>(null!=e.externalImportAssertions&&gn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),$h=e=>{const t=ad(e.generatedCode,od,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},vh=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},Ph=new Set(["compat","auto","esModule","default","defaultOnly"]),wh=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Ih(n=t(s)):s in e?e[s]:Ih(e[s]=t(s))}return void 0===t?()=>"default":()=>Ih(t)},Ih=e=>Ph.has(e)?e:Pt(tn("output.interop",xt,`use one of ${Array.from(Ph,e=>JSON.stringify(e)).join(", ")}`,e)),Nh=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Pt(tn("output.manualChunks",At,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Pt(tn("output.manualChunks",At,'this option is not supported for "output.preserveModules"'))}return s||{}},kh=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Ch=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Rh=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":Pt(tn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function Dh(t){return async function(t,n){const{options:s,unsetOptions:i}=await async function(t,n){if(!t)throw new Error("You must supply an options object to rollup");const s=await async function(t,n){const s=Dd("options",await ld(t.plugins)),i=t.logLevel||st,r=zd(s,Zu(t,i),n,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:Ad(it,"PLUGIN_LOG",r,s,i),error:e=>Pt(dn(td(e),s,{hook:"onLog"})),info:Ad(st,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:e,watchMode:n},warn:Ad(nt,"PLUGIN_WARNING",r,s,i)},t);c&&(t=c)}return t}(t,n),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await ld(e.plugins),r=e.logLevel||st,o=zd(i,Zu(e,r),t,r),a=e.strictDeprecations||!1,l=rh(e),c={cache:th(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:nh(e.external),fs:e.fs??eh,input:sh(e),jsx:ih(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:oh(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:ah(e)};return sd(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,n);return Oh(i.plugins,Ku),{options:i,unsetOptions:r}}(t,null!==n);(function(e){e.perf?(Ic=new Map,Dc=kc,Oc=Cc,e.plugins=e.plugins.map(Lc)):(Dc=Rn,Oc=Rn)})(s),await async function(){await aa()}();const r=new Td(s,n),o=!1!==t.cache;t.cache&&(s.cache=void 0,t.cache=void 0);Dc("BUILD",1),await Bd(r.pluginDriver,async()=>{try{Dc("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),Oc("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);t.length>0&&(e.watchFiles=t);try{await r.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=wt({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await r.pluginDriver.hookParallel("closeBundle",[n]),n}throw await r.pluginDriver.hookParallel("closeBundle",[e]),e}try{await r.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await r.pluginDriver.hookParallel("closeBundle",[e]),e}}),Oc("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):_h(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):_h(!0,s,i,e,r)};s.perf&&(a.getTimings=Rc);return a}(t,null)}function Oh(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function _h(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await ld(e.plugins);Oh(i,Xu);const r=t.createOutputPluginDriver(i);return{...await Lh(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Bd(0,async()=>{const n=new ju(r,a,t,o,i),s=await n.generate(e);if(e){if(Dc("WRITE",1),!r.dir&&!r.file)return Pt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:ht(gt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=U(t.dir||F(t.file),e.fileName);return await n(F(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),Oc("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>Th(e)-Th(t))};var l})}function Lh(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=ph(e),o=fh(e,t),a=mh(e,o,t),l=hh(e,a,t),c=$h(e),u=Sh(e,t),d={amd:yh(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:bh(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Eh(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:xh(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Ah(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:bh(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:vh(e,i),inlineDynamicImports:o,interop:wh(e),intro:bh(e,"intro"),manualChunks:Nh(e,o,a),minifyInternalExports:kh(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:bh(e,"outro"),paths:e.paths||{},plugins:await ld(e.plugins),preserveModules:a,preserveModulesRoot:gh(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:dh,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Rh(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Ch(e,s),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,virtualDirname:e.virtualDirname||"_virtual"};return sd(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",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 Mh;function Th(e){return"asset"===e.type?Mh.ASSET:e.isEntry?Mh.ENTRY_CHUNK:Mh.SECONDARY_CHUNK}function Bh(e){return e}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Mh||(Mh={}));export{e as VERSION,Bh as defineConfig,Dh as rollup};
|
|
10
|
+
var e="4.51.0",t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<64;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e,t){let n=0,s=0,i=0;do{const t=e.next();i=r[t],n|=(31&i)<<s,s+=5}while(32&i);const o=1&n;return n>>>=1,o&&(n=-2147483648|-n),t+n}function a(e,t,n){let s=t-n;s=s<0?-s<<1|1:s<<1;do{let t=31&s;s>>>=5,s>0&&(t|=32),e.write(i[t])}while(s>0);return t}function l(e,n){return!(e.pos>=n)&&e.peek()!==t}var c="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},u=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=c.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+c.decode(e.subarray(0,n)):t}},d=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function h(e){e.sort(p)}function p(e,t){return e[0]-t[0]}function f(e){const s=new u;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const u=e[c];if(c>0&&s.write(n),0===u.length)continue;let d=0;for(let e=0;e<u.length;e++){const n=u[e];e>0&&s.write(t),d=a(s,n[0],d),1!==n.length&&(i=a(s,n[1],i),r=a(s,n[2],r),o=a(s,n[3],o),4!==n.length&&(l=a(s,n[4],l)))}}return s.flush()}class m{constructor(e){this.bits=e instanceof m?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let g=class e{constructor(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,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.start<e&&e<this.end}eachNext(e){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function y(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.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 b=y();class E{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=f(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+b(this.toString())}}function x(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const A=Object.prototype.toString;function S(e){return"[object Object]"===A.call(e)}function $(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const v=/\w/;class P{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,s){if(t.length){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if("\n"===n[r])s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0,a=!1;else{if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?v.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}s.column+=1,this.generatedCodeColumn+=1,o=!1}r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const w="\n",I={insertLeft:!1,insertRight:!1,storeName:!1};class N{constructor(e,t={}){const n=new g(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new m},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new N(this.original,{filename:this.filename,offset:this.offset});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new m(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new P(e.hires),s=$(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)}),this.outro&&n.advance(this.outro),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?x(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new E(this.generateDecodedMap(e))}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(S(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0})}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return I.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),I.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return I.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),I.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(e+=this.offset,t+=this.offset,(n+=this.offset)>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new TypeError("replacement content must be a string");if(0!==this.original.length){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===s&&(I.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),I.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const o=this.byStart[e],a=this.byEnd[t];if(o){let e=o;for(;e!==a;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}o.edit(n,i,!r)}else{const s=new g(e,t,"").edit(n,i);a.next=s,s.previous=a}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(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){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 n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length){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 n=this.byStart[e];for(;n;)n.reset(),n=t>n.end?this.byStart[n.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(w);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(w),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(w),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(w),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(w),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){if(e+=this.offset,t+=this.offset,0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new Error(`Cannot use replaced character ${t} as slice end anchor.`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart[t.end]:this.byEnd[t.start],t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[n.end]=n,e===this.lastChunk&&(this.lastChunk=n),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 n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);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 n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,(t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`}):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach(e=>{if(null!=e.index){const t=n(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}})}else{const t=this.original.match(e);if(t&&null!=t.index){const e=n(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&("function"==typeof t&&(t=t(e,s,n)),e!==t&&this.overwrite(s,s+e.length,t)),this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){const e=n.slice(i,i+s);let r=t;"function"==typeof t&&(r=t(e,i,n)),e!==r&&this.overwrite(i,i+s,r)}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 k=Object.prototype.hasOwnProperty;let C=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 N)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!S(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=>{k.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(k.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 N(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 n;this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{~t.indexOf(e)||t.push(e)})});const s=new P(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=$(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext(n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)}),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?x(e.file,t.filename):t.filename),sourcesContent:this.uniqueSources.map(t=>e.includeContent?t.content:null),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new E(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort((t,n)=>e[t]-e[n])[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((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(t,n)=>n>0?e+t:t)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+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,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const R=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,D=/^\.?\.\//,O=/\\/g,_=/[/\\]/,L=/\.[^.]+$/;function M(e){return R.test(e)}function T(e){return D.test(e)}function B(e){return e.replace(O,"/")}function z(e){return e.split(_).pop()||""}function F(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function V(e){const t=L.exec(z(e));return t?t[0]:""}function j(e,t){const n=e.split(_).filter(Boolean),s=t.split(_).filter(Boolean);for("."===n[0]&&n.shift(),"."===s[0]&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;".."===s[0]&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function U(...e){const t=e.shift();if(!t)return"/";let n=t.split(_);for(const t of e)if(M(t))n=t.split(_);else{const e=t.split(_);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}function G(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const H={isNoStatement:!0};function W(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const q=/\S/g;function K(e,t){q.lastIndex=t;return q.exec(e).index}const X=/\s/;function J(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[t,t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function Y(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+J(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+J(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):G(r,t,o,l)):r.render(t,i)}function Z(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+W(t.original.slice(r.end,s.start),",")),o=a=c+1+J(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function Q(e,t,n){for(;;){const[s,i]=J(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function ee(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function te(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function ne(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${ee([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const se=Object.freeze(Object.create(null)),ie=Object.freeze({}),re=Object.freeze([]),oe=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function ae(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function le(){return new Set}function ce(){return[]}const ue=Symbol("Unknown Key"),de=Symbol("Unknown Non-Accessor Key"),he=Symbol("Unknown Integer"),pe=Symbol("Symbol.toStringTag"),fe=[],me=[ue],ge=[de],ye=[he],be=Symbol("Entities");class Ee{constructor(){this.entityPaths=Object.create(null,{[be]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]||=Object.create(null,{[be]:{value:new Set}});return t[be]}}const xe=new Ee;class Ae{constructor(){this.entityPaths=Object.create(null,{[be]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[be]:{value:new Map}});const i=ae(s[be],t,le);return!!i.has(n)||(i.add(n),!1)}}const Se=Object.freeze({[ue]:ie});class $e{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[ue])return!0;if("symbol"==typeof r)return n[s]=Se,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const ve=Object.freeze({[ue]:!0});class Pe{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[ue])return!0;const[s,i]=e;return s?"symbol"==typeof s?(this.includedPaths=ve,!1):i?n[s]===ue||(n[s]=ue,!1):!!n[s]||(n[s]=!0,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[ue])e.includePath([...n,ue],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===ue?[...n,s,ue]:[...n,s],t)}}}function we(e,t){if("MemberExpression"===e.type)return!e.computed&&we(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;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}}function Ie(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Ne(){return{accessed:new Ee,assigned:new Ee,brokenFlow:!1,called:new Ae,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ae,replacedVariableInits:new Map}}function ke(e,t){return 0!==(e&t)}function Ce(e,t,n){return e&~t|-n&t}const Re=Symbol("Unknown Value"),De=Symbol("Unknown Truthy Value"),Oe=Symbol("Unknown Falsy Value");class _e{constructor(){this.flags=0}get included(){return ke(this.flags,1)}set included(e){this.flags=Ce(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Te(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Me}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArguments(e,t){Be(e,t)}shouldBeIncluded(e){return!0}}const Le=new class extends _e{},Me=[Le,!1],Te=e=>{for(const t of e.args)t?.deoptimizePath(me)},Be=(e,t)=>{e.args[0]?.includePath(me,t),ze(e,t)},ze=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(me,t),s.include(t,!1))}},Fe={args:[null],type:0},Ve={args:[null,Le],type:1},je={args:[null],type:2,withNew:!1},Ue="ArrowFunctionExpression",Ge="CallExpression",He="ExportDefaultDeclaration",We="ExpressionStatement",qe="Identifier",Ke="Program",Xe="Property";function Je(e,t){return e.start<=t&&t<e.end}function Ye(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s});let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(Je(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function Ze(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const Qe="...";function et(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Ze(s[t-1].slice(0,n)).length+10+3,120),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=Ze(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${Qe}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Ze(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const tt="silent",nt="warn",st="info",it="debug",rt={[it]:0,[st]:1,[tt]:3,[nt]:2};function ot(e,t){const n=e.length<=1,s=e.map(e=>`"${e}"`);let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function at(e){const t=z(e);return t.slice(0,Math.max(0,t.length-V(e).length))}function lt(e){return M(e)?j(U(),e):e}function ct(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||M(e)}const ut=/^(\.\.\/)*\.\.$/;function dt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=B(j(F(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+z(t);if(ut.test(i))return[...i.split("/"),"..",z(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function ht(e){return`https://rollupjs.org/${e}`}const pt="troubleshooting/#error-name-is-not-exported-by-module",ft="configuration-options/#jsx",mt="configuration-options/#output-amd-id",gt="configuration-options/#output-dir",yt="configuration-options/#output-exports",bt="configuration-options/#output-format",Et="configuration-options/#output-inlinedynamicimports",xt="configuration-options/#output-interop",At="configuration-options/#output-manualchunks",St="configuration-options/#output-name",$t="configuration-options/#output-sourcemapfile",vt="plugin-development/#generatebundle";function Pt(e){throw e instanceof Error?e:wt(e)}function wt(e){kt(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function It(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=Ye(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=et(n,t,s)}}const Nt=Symbol("augmented");function kt(e){if(!e.plugin&&!e.loc||e[Nt])return;e[Nt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${lt(n)}${s}: `}const s=e.message;e.message=t+e.message,Zt(e,s)}const Ct="INVALID_EXPORT_OPTION",Rt="INVALID_IMPORT_ATTRIBUTE",Dt="INVALID_PLUGIN_HOOK",Ot="MISSING_EXPORT",_t="MISSING_IMPLICIT_DEPENDANT",Lt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Mt="PARSE_ERROR",Tt="SOURCEMAP_BROKEN",Bt="UNEXPECTED_NAMED_IMPORT",zt="UNRESOLVED_ENTRY",Ft="UNRESOLVED_IMPORT";function Vt(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function jt(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ut({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return It(i,n,t,e),i}function Gt(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(lt).join(" -> ")}`}}function Ht(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${lt(t)}" was reexported through module "${lt(n)}" 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 "${lt(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function Wt(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${lt(t)} is at (${n}:${s})\n${et(e,n,s)}`}}function qt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${lt(t)}".`}}function Kt(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${lt(s)}" tried to import "${lt(n)}" with ${Xt(t)} attributes, but it was already imported elsewhere with ${Xt(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const Xt=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map(([e,t])=>`"${e}": "${t}"`).join(", ")};function Jt(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${lt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:ht("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Yt(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} 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.`}}function Zt(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Qt(e,t,n){return{code:Ct,message:`"${e}" was specified for "output.exports", but entry module "${lt(n)}" has the following exports: ${ot(t)}`,url:ht(yt)}}function en(e){return{code:Rt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${lt(e)}". Import attributes need to have string keys and values.`}}function tn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:ht(t)}}function nn(e,t){return{binding:e,code:Ot,exporter:t,message:`Exported variable "${e}" is not defined in "${lt(t)}".`,url:ht(pt)}}function sn(e,t,n,s){const i={binding:e,code:Ot,exporter:n,id:t,url:ht(pt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${lt(n)}", but it is imported by "${lt(t)}".`};const r=".json"===V(n);return{...i,message:`"${e}" is not exported by "${lt(n)}", imported by "${lt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function rn(e){const t=[...e.implicitlyLoadedBefore].map(e=>lt(e.id)).sort();return{code:_t,message:`Module "${lt(e.id)}" that should be implicitly loaded before ${ot(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 on(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function an(e,t){return{code:Mt,message:e,pos:t}}function ln(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function cn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function un(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),Zt({cause:e,code:Mt,id:t,message:n,stack:e.stack},e.message)}function dn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function hn(e){return{code:Tt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function pn(e,t,n){const s=n?"reexport":"import";return{code:Bt,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${lt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:ht(xt)}}function fn(e){return{code:Bt,exporter:e,message:`There was a namespace "*" reexport from the external module "${lt(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:ht(xt)}}function mn(e){return{code:"VALIDATION_ERROR",message:e}}function gn(e,t,n,s,i){!function(e,t,n,s,i){if(n||i){const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:ht(t)}}(e,t);if(i)return Pt(n);s(nt,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const yn=Symbol("PureFunction");class bn extends _e{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Ge&&e.parent.callee===e||e.parent.type===He||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class En extends bn{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)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function xn(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const An=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"]),Sn=/[^\w$]/g,$n=e=>(e=>/\d/.test(e[0]))(e)||An.has(e)||"arguments"===e;function vn(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Sn,"_"),$n(e)&&(e=`_${e}`),e||"_"}const Pn=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,wn=/^(?:0|[1-9]\d*)$/;function In(e){return Pn.test(e)?"__proto__"===e?'["__proto__"]':e:wn.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Nn(e){return Pn.test(e)?e:JSON.stringify(e)}class kn{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,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=vn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:re,dynamicallyImportedIds:re,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:re,implicitlyLoadedBefore:re,importedIdResolutions:re,importedIds:re,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){xn(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new En(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}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 n of e)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(nt,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${ot(i=e,["is","are"])} imported from external module "${s}" but never used in ${ot(r.map(e=>lt(e)))}.`,names:i})}}function Cn(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof kn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Rn=()=>{};var Dn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const On="_rollupAnnotations",_n="_rollupRemoved",Ln=(e,t)=>{if(0===e)return re;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=Mn(t[e++],t);return s},Mn=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Dn[t[e]]}},Tn={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},Bn="variables",zn=Symbol("IS_SKIPPED_CHAIN");class Fn extends _e{get deoptimized(){return ke(this.flags,2)}set deoptimized(e){this.flags=Ce(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of Tn[this.type]){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 Tn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(fe,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of Tn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of Tn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(me,e);else n.includePath(me,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===On?this.annotations=n:t===_n&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=new Array(n.length);let e=0;for(const s of n)this[t][e++]=null===s?null:new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s)}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return Tn[e.type]||=function(e){return Object.keys(e).filter(t=>"object"==typeof e[t]&&95!==t.charCodeAt(0))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of Tn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(Ne())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Tn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(me);else t.deoptimizePath(me)}this.scope.context.requestTreeshakingPass()}}function Vn(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function jn(){this.included=!0}function Un(){this.deoptimized=!0}function Gn(e){return e instanceof Fn&&e.type===Ue}function Hn(e){return e instanceof Fn&&"FunctionExpression"===e.type}function Wn(e){return e instanceof Fn&&e.type===Ge}function qn(e){return e instanceof Fn&&"MemberExpression"===e.type}function Kn(e){return e instanceof Fn&&"ImportExpression"===e.type}function Xn(e){return e instanceof Fn&&e.type===qe}function Jn(e,t=null){return Object.create(t,e)}const Yn=new class extends _e{getLiteralValueAtPath(e){return e.length>0?Re:void 0}},Zn={value:{hasEffectsWhenCalled:null,returns:Le}},Qn=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(as,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(as,e[0],t,n)}},es={value:{hasEffectsWhenCalled:null,returns:Qn}},ts=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(ls,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(ls,e[0],t,n)}},ns={value:{hasEffectsWhenCalled:null,returns:ts}},ss=new class extends _e{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?hs(us,e[0]):Me}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(us,e[0],t,n)}},is={value:{hasEffectsWhenCalled:null,returns:ss}},rs={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(fe,xe,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(fe,je,t)},returns:ss}},os=Jn({hasOwnProperty:es,isPrototypeOf:es,propertyIsEnumerable:es,toLocaleString:is,toString:is,valueOf:Zn}),as=Jn({valueOf:es},os),ls=Jn({toExponential:is,toFixed:is,toLocaleString:is,toPrecision:is,valueOf:ns},os),cs=Jn({exec:Zn,test:es},os),us=Jn({anchor:is,at:Zn,big:is,blink:is,bold:is,charAt:is,charCodeAt:ns,codePointAt:Zn,concat:is,endsWith:es,fixed:is,fontcolor:is,fontsize:is,includes:es,indexOf:ns,italics:is,lastIndexOf:ns,link:is,localeCompare:ns,match:Zn,matchAll:Zn,normalize:is,padEnd:is,padStart:is,repeat:is,replace:rs,replaceAll:rs,search:ns,slice:is,small:is,split:Zn,startsWith:es,strike:is,sub:is,substr:is,substring:is,sup:is,toLocaleLowerCase:is,toLocaleUpperCase:is,toLowerCase:is,toString:is,toUpperCase:is,trim:is,trimEnd:is,trimLeft:is,trimRight:is,trimStart:is,valueOf:is},os);function ds(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function hs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Me}class ps extends _e{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(ye),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(me)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Me:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Le:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(ye,Ve,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(fe,je,s))return!0}return!1}}const fs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Qn})],ms=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ss})],gs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ts})],ys=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Le})],bs=/^\d+$/;class Es extends _e{get hasLostTrack(){return ke(this.flags,2048)}set hasLostTrack(e){this.flags=Ce(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return ke(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Ce(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return ke(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Ce(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],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(me);this.prototypeExpression?.deoptimizePath([ue,ue]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||"string"==typeof s&&this.deoptimizedPaths[s]))return void Te(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 s){if(a[s]){const t=l[s];if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(bs.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey))if(bs.test(e))for(const e of t)e.deoptimizePath(me);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===he)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===de);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?me:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],ue]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Re;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?Re:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Me;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):Me}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===de)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 s){if(r[s]){const e=o[s];if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){if(this.included=!0,0===e.length)return;const[n,...s]=e,[i,r]="string"==typeof n?[new Set([...this.propertiesAndGettersByKey[n]||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey[n]||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,me];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchablePropertiesAndSetters:l,unmatchableGetters:c,unmatchableSetters:u}=this;for(let d=e.length-1;d>=0;d--){const{key:h,kind:p,property:f}=e[d];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...l],i[h]=[f,...u]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...c]):(s[h]||(s[h]=[f,...l]),n[h]||(n[h]=[f,...a]));else{if(h===he){o.push(f);continue}"set"===p&&u.push(f),"get"===p&&c.push(f),"get"!==p&&l.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(me)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(bs.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ye)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&bs.test(e)||this.deoptimizedPaths[e])return Le;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&bs.test(e)?Le:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return Le;const n=this.getMemberExpression(e);if(n!==Le&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const xs=e=>"string"==typeof e&&/^\d+$/.test(e),As=new class extends _e{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||xs(t[0])||Te(e)}getLiteralValueAtPath(e){return 1===e.length&&xs(e[0])?void 0:Re}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Ss=new Es({__proto__:null,hasOwnProperty:fs,isPrototypeOf:fs,propertyIsEnumerable:fs,toLocaleString:ms,toString:ms,valueOf:ys},As,!0),$s=[{key:he,kind:"init",property:Le},{key:"length",kind:"init",property:ts}],vs=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Qn})],Ps=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ts})],ws=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Es($s,Ls),returnsPrimitive:null})],Is=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Es($s,Ls),returnsPrimitive:null})],Ns=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Es($s,Ls),returnsPrimitive:null})],ks=[new ps({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ts})],Cs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Le})],Rs=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Le})],Ds=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Le})],Os=[new ps({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],_s=[new ps({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],Ls=new Es({__proto__:null,at:Rs,concat:Is,copyWithin:Os,entries:Is,every:vs,fill:Os,filter:Ns,find:Ds,findIndex:Ps,findLast:Ds,findLastIndex:Ps,flat:Is,flatMap:Ns,forEach:Ds,includes:fs,indexOf:gs,join:ms,keys:ys,lastIndexOf:gs,map:Ns,pop:Cs,push:ks,reduce:Ds,reduceRight:Ds,reverse:Os,shift:Cs,slice:Is,some:vs,sort:_s,splice:ws,toLocaleString:ms,toString:ms,unshift:ks,values:Rs},Ss,!0);class Ms extends Fn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,me,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(me,Fe,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(me,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([ue,ue]),this.scope.context.requestTreeshakingPass()}}class Ts extends Fn{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(me,e)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof Ms)&&(e=!0,n.deoptimizePath(me))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:ts}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Ms?s&&(t=!0,e.unshift({key:he,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Yn})}return this.objectEntity=new Es(e,Ls)}}const Bs=Symbol("Value Properties"),zs=()=>Re,Fs=()=>!1,Vs=()=>!0,js={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:Fs},Us={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:Vs},Gs={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Ts)},Hs={deoptimizeArgumentsOnCall:Rn,getLiteralValue:zs,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof _e)||s.hasEffectsOnInteractionAtPath(me,Fe,t)}},Ws={__proto__:null,[Bs]:Us},qs={__proto__:null,[Bs]:js},Ks={__proto__:null,[Bs]:Hs},Xs={__proto__:null,[Bs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(me)},getLiteralValue:zs,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(ge,Ve,t)}},Js={__proto__:null,[Bs]:Us,prototype:Ws},Ys={__proto__:null,[Bs]:js,prototype:Ws},Zs={__proto__:null,[Bs]:Gs,prototype:Ws},Qs={__proto__:null,[Bs]:js,from:Ws,of:qs,prototype:Ws},ei={__proto__:null,[Bs]:js,supportedLocalesOf:Ys},ti={global:Ws,globalThis:Ws,self:Ws,window:Ws,__proto__:null,[Bs]:Us,Array:{__proto__:null,[Bs]:Us,from:Ws,isArray:qs,of:qs,prototype:Ws},ArrayBuffer:{__proto__:null,[Bs]:js,isView:qs,prototype:Ws},AggregateError:Zs,Atomics:Ws,BigInt:Js,BigInt64Array:Js,BigUint64Array:Js,Boolean:Ys,constructor:Js,DataView:Ys,Date:{__proto__:null,[Bs]:js,now:qs,parse:qs,prototype:Ws,UTC:qs},decodeURI:qs,decodeURIComponent:qs,encodeURI:qs,encodeURIComponent:qs,Error:Ys,escape:qs,eval:Ws,EvalError:Ys,FinalizationRegistry:Js,Float32Array:Qs,Float64Array:Qs,Function:Js,hasOwnProperty:Ws,Infinity:Ws,Int16Array:Qs,Int32Array:Qs,Int8Array:Qs,isFinite:qs,isNaN:qs,isPrototypeOf:Ws,JSON:Ws,Map:Zs,Math:{__proto__:null,[Bs]:Us,abs:qs,acos:qs,acosh:qs,asin:qs,asinh:qs,atan:qs,atan2:qs,atanh:qs,cbrt:qs,ceil:qs,clz32:qs,cos:qs,cosh:qs,exp:qs,expm1:qs,floor:qs,fround:qs,hypot:qs,imul:qs,log:qs,log10:qs,log1p:qs,log2:qs,max:qs,min:qs,pow:qs,random:qs,round:qs,sign:qs,sin:qs,sinh:qs,sqrt:qs,tan:qs,tanh:qs,trunc:qs},NaN:Ws,Number:{__proto__:null,[Bs]:js,isFinite:qs,isInteger:qs,isNaN:qs,isSafeInteger:qs,parseFloat:qs,parseInt:qs,prototype:Ws},Object:{__proto__:null,[Bs]:js,create:qs,defineProperty:Xs,defineProperties:Xs,freeze:Xs,getOwnPropertyDescriptor:qs,getOwnPropertyDescriptors:qs,getOwnPropertyNames:qs,getOwnPropertySymbols:qs,getPrototypeOf:qs,hasOwn:qs,is:qs,isExtensible:qs,isFrozen:qs,isSealed:qs,keys:qs,fromEntries:Ws,entries:Ks,values:Ks,prototype:Ws},parseFloat:qs,parseInt:qs,Promise:{__proto__:null,[Bs]:Us,all:Ws,allSettled:Ws,any:Ws,prototype:Ws,race:Ws,reject:Ws,resolve:Ws},propertyIsEnumerable:Ws,Proxy:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{if((n=t)instanceof Fn&&"ObjectExpression"===n.type){const n=t.properties.some(e=>!function(e){return e instanceof Fn&&e.type===Xe}(e));if(!n){for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},fe,xe);return}}var n;e.deoptimizePath(me)},getLiteralValue:zs,hasEffectsWhenCalled:Vs}},RangeError:Ys,ReferenceError:Ys,Reflect:Ws,RegExp:Ys,Set:Zs,SharedArrayBuffer:Js,String:{__proto__:null,[Bs]:js,fromCharCode:qs,fromCodePoint:qs,prototype:Ws,raw:qs},Symbol:{__proto__:null,[Bs]:js,for:qs,keyFor:qs,prototype:Ws,toStringTag:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall:Rn,getLiteralValue:()=>pe,hasEffectsWhenCalled:Vs}}},SyntaxError:Ys,toLocaleString:Ws,toString:Ws,TypeError:Ys,Uint16Array:Qs,Uint32Array:Qs,Uint8Array:Qs,Uint8ClampedArray:Qs,unescape:qs,URIError:Ys,valueOf:Ws,WeakMap:Zs,WeakRef:Js,WeakSet:Zs,clearInterval:Js,clearTimeout:Js,console:{__proto__:null,[Bs]:Us,assert:Js,clear:Js,count:Js,countReset:Js,debug:Js,dir:Js,dirxml:Js,error:Js,exception:Js,group:Js,groupCollapsed:Js,groupEnd:Js,info:Js,log:Js,table:Js,time:Js,timeEnd:Js,timeLog:Js,trace:Js,warn:Js},Intl:{__proto__:null,[Bs]:Us,Collator:ei,DateTimeFormat:ei,DisplayNames:ei,ListFormat:ei,Locale:ei,NumberFormat:ei,PluralRules:ei,RelativeTimeFormat:ei,Segmenter:ei},setInterval:Js,setTimeout:Js,TextDecoder:Js,TextEncoder:Js,URL:{__proto__:null,[Bs]:Us,prototype:Ws,canParse:qs},URLSearchParams:Js,AbortController:Js,AbortSignal:Js,addEventListener:Ws,alert:Ws,AnalyserNode:Js,Animation:Js,AnimationEvent:Js,applicationCache:Ws,ApplicationCache:Js,ApplicationCacheErrorEvent:Js,atob:Ws,Attr:Js,Audio:Js,AudioBuffer:Js,AudioBufferSourceNode:Js,AudioContext:Js,AudioDestinationNode:Js,AudioListener:Js,AudioNode:Js,AudioParam:Js,AudioProcessingEvent:Js,AudioScheduledSourceNode:Js,AudioWorkletNode:Js,BarProp:Js,BaseAudioContext:Js,BatteryManager:Js,BeforeUnloadEvent:Js,BiquadFilterNode:Js,Blob:Js,BlobEvent:Js,blur:Ws,BroadcastChannel:Js,btoa:Ws,ByteLengthQueuingStrategy:Js,Cache:Js,caches:Ws,CacheStorage:Js,cancelAnimationFrame:Ws,cancelIdleCallback:Ws,CanvasCaptureMediaStreamTrack:Js,CanvasGradient:Js,CanvasPattern:Js,CanvasRenderingContext2D:Js,ChannelMergerNode:Js,ChannelSplitterNode:Js,CharacterData:Js,clientInformation:Ws,ClipboardEvent:Js,close:Ws,closed:Ws,CloseEvent:Js,Comment:Js,CompositionEvent:Js,confirm:Ws,ConstantSourceNode:Js,ConvolverNode:Js,CountQueuingStrategy:Js,createImageBitmap:Ws,Credential:Js,CredentialsContainer:Js,crypto:Ws,Crypto:Js,CryptoKey:Js,CSS:Js,CSSConditionRule:Js,CSSFontFaceRule:Js,CSSGroupingRule:Js,CSSImportRule:Js,CSSKeyframeRule:Js,CSSKeyframesRule:Js,CSSMediaRule:Js,CSSNamespaceRule:Js,CSSPageRule:Js,CSSRule:Js,CSSRuleList:Js,CSSStyleDeclaration:Js,CSSStyleRule:Js,CSSStyleSheet:Js,CSSSupportsRule:Js,CustomElementRegistry:Js,customElements:Ws,CustomEvent:{__proto__:null,[Bs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:zs,hasEffectsWhenCalled:Fs},prototype:Ws},DataTransfer:Js,DataTransferItem:Js,DataTransferItemList:Js,defaultstatus:Ws,defaultStatus:Ws,DelayNode:Js,DeviceMotionEvent:Js,DeviceOrientationEvent:Js,devicePixelRatio:Ws,dispatchEvent:Ws,document:Ws,Document:Js,DocumentFragment:Js,DocumentType:Js,DOMError:Js,DOMException:Js,DOMImplementation:Js,DOMMatrix:Js,DOMMatrixReadOnly:Js,DOMParser:Js,DOMPoint:Js,DOMPointReadOnly:Js,DOMQuad:Js,DOMRect:Js,DOMRectReadOnly:Js,DOMStringList:Js,DOMStringMap:Js,DOMTokenList:Js,DragEvent:Js,DynamicsCompressorNode:Js,Element:Js,ErrorEvent:Js,Event:Js,EventSource:Js,EventTarget:Js,external:Ws,fetch:Ws,File:Js,FileList:Js,FileReader:Js,find:Ws,focus:Ws,FocusEvent:Js,FontFace:Js,FontFaceSetLoadEvent:Js,FormData:Js,frames:Ws,GainNode:Js,Gamepad:Js,GamepadButton:Js,GamepadEvent:Js,getComputedStyle:Ws,getSelection:Ws,HashChangeEvent:Js,Headers:Js,history:Ws,History:Js,HTMLAllCollection:Js,HTMLAnchorElement:Js,HTMLAreaElement:Js,HTMLAudioElement:Js,HTMLBaseElement:Js,HTMLBodyElement:Js,HTMLBRElement:Js,HTMLButtonElement:Js,HTMLCanvasElement:Js,HTMLCollection:Js,HTMLContentElement:Js,HTMLDataElement:Js,HTMLDataListElement:Js,HTMLDetailsElement:Js,HTMLDialogElement:Js,HTMLDirectoryElement:Js,HTMLDivElement:Js,HTMLDListElement:Js,HTMLDocument:Js,HTMLElement:Js,HTMLEmbedElement:Js,HTMLFieldSetElement:Js,HTMLFontElement:Js,HTMLFormControlsCollection:Js,HTMLFormElement:Js,HTMLFrameElement:Js,HTMLFrameSetElement:Js,HTMLHeadElement:Js,HTMLHeadingElement:Js,HTMLHRElement:Js,HTMLHtmlElement:Js,HTMLIFrameElement:Js,HTMLImageElement:Js,HTMLInputElement:Js,HTMLLabelElement:Js,HTMLLegendElement:Js,HTMLLIElement:Js,HTMLLinkElement:Js,HTMLMapElement:Js,HTMLMarqueeElement:Js,HTMLMediaElement:Js,HTMLMenuElement:Js,HTMLMetaElement:Js,HTMLMeterElement:Js,HTMLModElement:Js,HTMLObjectElement:Js,HTMLOListElement:Js,HTMLOptGroupElement:Js,HTMLOptionElement:Js,HTMLOptionsCollection:Js,HTMLOutputElement:Js,HTMLParagraphElement:Js,HTMLParamElement:Js,HTMLPictureElement:Js,HTMLPreElement:Js,HTMLProgressElement:Js,HTMLQuoteElement:Js,HTMLScriptElement:Js,HTMLSelectElement:Js,HTMLShadowElement:Js,HTMLSlotElement:Js,HTMLSourceElement:Js,HTMLSpanElement:Js,HTMLStyleElement:Js,HTMLTableCaptionElement:Js,HTMLTableCellElement:Js,HTMLTableColElement:Js,HTMLTableElement:Js,HTMLTableRowElement:Js,HTMLTableSectionElement:Js,HTMLTemplateElement:Js,HTMLTextAreaElement:Js,HTMLTimeElement:Js,HTMLTitleElement:Js,HTMLTrackElement:Js,HTMLUListElement:Js,HTMLUnknownElement:Js,HTMLVideoElement:Js,IDBCursor:Js,IDBCursorWithValue:Js,IDBDatabase:Js,IDBFactory:Js,IDBIndex:Js,IDBKeyRange:Js,IDBObjectStore:Js,IDBOpenDBRequest:Js,IDBRequest:Js,IDBTransaction:Js,IDBVersionChangeEvent:Js,IdleDeadline:Js,IIRFilterNode:Js,Image:Js,ImageBitmap:Js,ImageBitmapRenderingContext:Js,ImageCapture:Js,ImageData:Js,indexedDB:Ws,innerHeight:Ws,innerWidth:Ws,InputEvent:Js,IntersectionObserver:Js,IntersectionObserverEntry:Js,isSecureContext:Ws,KeyboardEvent:Js,KeyframeEffect:Js,length:Ws,localStorage:Ws,location:Ws,Location:Js,locationbar:Ws,matchMedia:Ws,MediaDeviceInfo:Js,MediaDevices:Js,MediaElementAudioSourceNode:Js,MediaEncryptedEvent:Js,MediaError:Js,MediaKeyMessageEvent:Js,MediaKeySession:Js,MediaKeyStatusMap:Js,MediaKeySystemAccess:Js,MediaList:Js,MediaQueryList:Js,MediaQueryListEvent:Js,MediaRecorder:Js,MediaSettingsRange:Js,MediaSource:Js,MediaStream:Js,MediaStreamAudioDestinationNode:Js,MediaStreamAudioSourceNode:Js,MediaStreamEvent:Js,MediaStreamTrack:Js,MediaStreamTrackEvent:Js,menubar:Ws,MessageChannel:Js,MessageEvent:Js,MessagePort:Js,MIDIAccess:Js,MIDIConnectionEvent:Js,MIDIInput:Js,MIDIInputMap:Js,MIDIMessageEvent:Js,MIDIOutput:Js,MIDIOutputMap:Js,MIDIPort:Js,MimeType:Js,MimeTypeArray:Js,MouseEvent:Js,moveBy:Ws,moveTo:Ws,MutationEvent:Js,MutationObserver:Js,MutationRecord:Js,name:Ws,NamedNodeMap:Js,NavigationPreloadManager:Js,navigator:Ws,Navigator:Js,NetworkInformation:Js,Node:Js,NodeFilter:Ws,NodeIterator:Js,NodeList:Js,Notification:Js,OfflineAudioCompletionEvent:Js,OfflineAudioContext:Js,offscreenBuffering:Ws,OffscreenCanvas:Js,open:Ws,openDatabase:Ws,Option:Js,origin:Ws,OscillatorNode:Js,outerHeight:Ws,outerWidth:Ws,PageTransitionEvent:Js,pageXOffset:Ws,pageYOffset:Ws,PannerNode:Js,parent:Ws,Path2D:Js,PaymentAddress:Js,PaymentRequest:Js,PaymentRequestUpdateEvent:Js,PaymentResponse:Js,performance:Ws,Performance:Js,PerformanceEntry:Js,PerformanceLongTaskTiming:Js,PerformanceMark:Js,PerformanceMeasure:Js,PerformanceNavigation:Js,PerformanceNavigationTiming:Js,PerformanceObserver:Js,PerformanceObserverEntryList:Js,PerformancePaintTiming:Js,PerformanceResourceTiming:Js,PerformanceTiming:Js,PeriodicWave:Js,Permissions:Js,PermissionStatus:Js,personalbar:Ws,PhotoCapabilities:Js,Plugin:Js,PluginArray:Js,PointerEvent:Js,PopStateEvent:Js,postMessage:Ws,Presentation:Js,PresentationAvailability:Js,PresentationConnection:Js,PresentationConnectionAvailableEvent:Js,PresentationConnectionCloseEvent:Js,PresentationConnectionList:Js,PresentationReceiver:Js,PresentationRequest:Js,print:Ws,ProcessingInstruction:Js,ProgressEvent:Js,PromiseRejectionEvent:Js,prompt:Ws,PushManager:Js,PushSubscription:Js,PushSubscriptionOptions:Js,queueMicrotask:Ws,RadioNodeList:Js,Range:Js,ReadableStream:Js,RemotePlayback:Js,removeEventListener:Ws,Request:Js,requestAnimationFrame:Ws,requestIdleCallback:Ws,resizeBy:Ws,ResizeObserver:Js,ResizeObserverEntry:Js,resizeTo:Ws,Response:Js,RTCCertificate:Js,RTCDataChannel:Js,RTCDataChannelEvent:Js,RTCDtlsTransport:Js,RTCIceCandidate:Js,RTCIceTransport:Js,RTCPeerConnection:Js,RTCPeerConnectionIceEvent:Js,RTCRtpReceiver:Js,RTCRtpSender:Js,RTCSctpTransport:Js,RTCSessionDescription:Js,RTCStatsReport:Js,RTCTrackEvent:Js,screen:Ws,Screen:Js,screenLeft:Ws,ScreenOrientation:Js,screenTop:Ws,screenX:Ws,screenY:Ws,ScriptProcessorNode:Js,scroll:Ws,scrollbars:Ws,scrollBy:Ws,scrollTo:Ws,scrollX:Ws,scrollY:Ws,SecurityPolicyViolationEvent:Js,Selection:Js,ServiceWorker:Js,ServiceWorkerContainer:Js,ServiceWorkerRegistration:Js,sessionStorage:Ws,ShadowRoot:Js,SharedWorker:Js,SourceBuffer:Js,SourceBufferList:Js,speechSynthesis:Ws,SpeechSynthesisEvent:Js,SpeechSynthesisUtterance:Js,StaticRange:Js,status:Ws,statusbar:Ws,StereoPannerNode:Js,stop:Ws,Storage:Js,StorageEvent:Js,StorageManager:Js,styleMedia:Ws,StyleSheet:Js,StyleSheetList:Js,SubtleCrypto:Js,SVGAElement:Js,SVGAngle:Js,SVGAnimatedAngle:Js,SVGAnimatedBoolean:Js,SVGAnimatedEnumeration:Js,SVGAnimatedInteger:Js,SVGAnimatedLength:Js,SVGAnimatedLengthList:Js,SVGAnimatedNumber:Js,SVGAnimatedNumberList:Js,SVGAnimatedPreserveAspectRatio:Js,SVGAnimatedRect:Js,SVGAnimatedString:Js,SVGAnimatedTransformList:Js,SVGAnimateElement:Js,SVGAnimateMotionElement:Js,SVGAnimateTransformElement:Js,SVGAnimationElement:Js,SVGCircleElement:Js,SVGClipPathElement:Js,SVGComponentTransferFunctionElement:Js,SVGDefsElement:Js,SVGDescElement:Js,SVGDiscardElement:Js,SVGElement:Js,SVGEllipseElement:Js,SVGFEBlendElement:Js,SVGFEColorMatrixElement:Js,SVGFEComponentTransferElement:Js,SVGFECompositeElement:Js,SVGFEConvolveMatrixElement:Js,SVGFEDiffuseLightingElement:Js,SVGFEDisplacementMapElement:Js,SVGFEDistantLightElement:Js,SVGFEDropShadowElement:Js,SVGFEFloodElement:Js,SVGFEFuncAElement:Js,SVGFEFuncBElement:Js,SVGFEFuncGElement:Js,SVGFEFuncRElement:Js,SVGFEGaussianBlurElement:Js,SVGFEImageElement:Js,SVGFEMergeElement:Js,SVGFEMergeNodeElement:Js,SVGFEMorphologyElement:Js,SVGFEOffsetElement:Js,SVGFEPointLightElement:Js,SVGFESpecularLightingElement:Js,SVGFESpotLightElement:Js,SVGFETileElement:Js,SVGFETurbulenceElement:Js,SVGFilterElement:Js,SVGForeignObjectElement:Js,SVGGElement:Js,SVGGeometryElement:Js,SVGGradientElement:Js,SVGGraphicsElement:Js,SVGImageElement:Js,SVGLength:Js,SVGLengthList:Js,SVGLinearGradientElement:Js,SVGLineElement:Js,SVGMarkerElement:Js,SVGMaskElement:Js,SVGMatrix:Js,SVGMetadataElement:Js,SVGMPathElement:Js,SVGNumber:Js,SVGNumberList:Js,SVGPathElement:Js,SVGPatternElement:Js,SVGPoint:Js,SVGPointList:Js,SVGPolygonElement:Js,SVGPolylineElement:Js,SVGPreserveAspectRatio:Js,SVGRadialGradientElement:Js,SVGRect:Js,SVGRectElement:Js,SVGScriptElement:Js,SVGSetElement:Js,SVGStopElement:Js,SVGStringList:Js,SVGStyleElement:Js,SVGSVGElement:Js,SVGSwitchElement:Js,SVGSymbolElement:Js,SVGTextContentElement:Js,SVGTextElement:Js,SVGTextPathElement:Js,SVGTextPositioningElement:Js,SVGTitleElement:Js,SVGTransform:Js,SVGTransformList:Js,SVGTSpanElement:Js,SVGUnitTypes:Js,SVGUseElement:Js,SVGViewElement:Js,TaskAttributionTiming:Js,Text:Js,TextEvent:Js,TextMetrics:Js,TextTrack:Js,TextTrackCue:Js,TextTrackCueList:Js,TextTrackList:Js,TimeRanges:Js,toolbar:Ws,top:Ws,Touch:Js,TouchEvent:Js,TouchList:Js,TrackEvent:Js,TransitionEvent:Js,TreeWalker:Js,UIEvent:Js,ValidityState:Js,visualViewport:Ws,VisualViewport:Js,VTTCue:Js,WaveShaperNode:Js,WebAssembly:Ws,WebGL2RenderingContext:Js,WebGLActiveInfo:Js,WebGLBuffer:Js,WebGLContextEvent:Js,WebGLFramebuffer:Js,WebGLProgram:Js,WebGLQuery:Js,WebGLRenderbuffer:Js,WebGLRenderingContext:Js,WebGLSampler:Js,WebGLShader:Js,WebGLShaderPrecisionFormat:Js,WebGLSync:Js,WebGLTexture:Js,WebGLTransformFeedback:Js,WebGLUniformLocation:Js,WebGLVertexArrayObject:Js,WebSocket:Js,WheelEvent:Js,Window:Js,Worker:Js,WritableStream:Js,XMLDocument:Js,XMLHttpRequest:Js,XMLHttpRequestEventTarget:Js,XMLHttpRequestUpload:Js,XMLSerializer:Js,XPathEvaluator:Js,XPathExpression:Js,XPathResult:Js,XSLTProcessor:Js};for(const e of["window","global","self","globalThis"])ti[e]=ti;function ni(e){let t=ti;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[Bs]}class si extends bn{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(ni([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=ni([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=ni([this.name,...e]);return s?s.getLiteralValue():Re}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!ni([this.name]):!ni([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=ni([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const ii=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class ri extends bn{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.includedPathTracker=new $e,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(me)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?Te(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=re;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,ue])}else this.init.deoptimizePath(ii(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Re:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Re)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?Me:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),Me)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const n of this.declarations){n.included||n.include(t,!1);let s=n.parent;for(;!s.included&&(s.includeNode(t),s.type!==Ke);)s=s.parent;"parameter"===this.kind&&(Gn(n.parent)||Hn(n.parent))&&Wn(n.parent.parent)&&qn(n.parent.parent.callee)&&Xn(n.parent.parent.callee.property)&&"then"===n.parent.parent.callee.property.name&&Kn(n.parent.parent.callee.object)&&n.parent.parent.callee.object.includePath(e,t)}e.length>0&&(this.init.includePath(ii(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(me,t)))}}includeCallArguments(e,t){this.isReassigned||t.includedCallArguments.has(this.init)||this.initPath.length>0?Be(e,t):(t.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),t.includedCallArguments.delete(this.init))}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Le,this.markReassigned()),this.additionalInitializers}}const oi=new Set(["class","const","let","var","using","await using"]);class ai extends Fn{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return ke(this.flags,4)?ke(this.flags,8):null}set isTDZAccess(e){this.flags=Ce(this.flags,4,!0),this.flags=Ce(this.flags,8,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof si&&!this.isPureFunction(fe)&&this.variable.hasEffectsOnInteractionAtPath(fe,Fe,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(me,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof ri&&this.variable.kind&&oi.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&li(this)===li(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof ri&&(this.variable.module.isExecuted||Cn(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(qt(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Le:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[yn])return!0;t=t[n]}return t?.[yn]}}function li(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class ci extends _e{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class ui extends ai{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return ke(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=Ce(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&we(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(fe),t.deoptimizePath([...e,ue])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,Fe,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new ci(n,t.slice(0,-1))],type:0},t,xe));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,Fe,Ne())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,fe,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=se){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&s===Ge&&i&&e.appendRight(this.start,"0, ")}}}function di(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function hi(e,t,n){let s=e,i=1;for(;t.has(s)||An.has(s)||n?.has(s);)s=`${e}$${di(i++)}`;return t.add(s),s}class pi{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(ln(r),e.start)}const a=new ri(e.name,e,n,s,t,i);return this.variables.set(r,a),a}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class fi extends pi{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof fi&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof fi&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof fi&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,hi(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}function mi(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class gi extends Fn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){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},fe,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(fe,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Me,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(fe,je,xe,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}gi.prototype.includeNode=jn,gi.prototype.applyDeoptimizations=Un;class yi extends gi{hasEffects(e){return super.hasEffects(e)||mi(this.decorators,e)}}class bi extends fi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(ln(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Ei extends Fn{createScope(e){this.scope=new bi(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 n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=W(e.original.slice(this.start,this.end),"{")+1;Y(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function xi(e){return"StaticBlock"===e.type}Ei.prototype.includeNode=jn,Ei.prototype.applyDeoptimizations=Un;class Ai extends Fn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new fi(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)||mi(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",fe,this);for(const e of this.body.body)if(e instanceof yi&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)xi(e)||e.static||e instanceof yi&&"constructor"===e.kind||e.deoptimizePath(me);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(xi(n))continue;const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(fe,xe,this);if("symbol"==typeof e){s.push({key:ue,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof ui?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Es(t,this.superClass?new ci(this.superClass,["prototype"]):Ss)}),this.objectEntity=new Es(e,this.superClass||Ss)}}Ai.prototype.includeNode=Vn;class Si extends Ai{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${ee([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class $i extends ri{constructor(e){super("arguments",null,Le,fe,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=vi}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(me);this.deoptimizedArguments.length=0}}function vi(e){this.included?e.deoptimizePath(me):this.deoptimizedArguments?.push(e)}const Pi=re,wi=new Set([ue]),Ii=new Ee,Ni=new Set([Le]);class ki extends ri{constructor(e,t,n,s){super(e,t,Le,n,s,"parameter"),this.includedPathTracker=new Pe,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Ee,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Re}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===Le){if(!this.argumentsToBeDeoptimized.has(Le)){this.argumentsToBeDeoptimized.add(Le);for(const{interaction:e}of this.deoptimizationInteractions)Te(e);this.deoptimizationInteractions=Pi}}else if(this.deoptimizedFields.has(ue))e.deoptimizePath([...this.initPath,ue]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],xe)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=re}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,xe,this));if(this.knownValue===e||this.knownValue instanceof ui&&e instanceof ui&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,xe,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||Le}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Re;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Re)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(Le)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(ue)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)Te(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],xe);this.argumentsToBeDeoptimized.has(Le)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(ue))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===ue&&(this.deoptimizationInteractions=Pi,this.deoptimizations=Ii,this.deoptimizedFields=wi,this.argumentsToBeDeoptimized=Ni)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(me):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Me}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class Ci extends ki{constructor(e){super("this",null,fe,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Le).hasEffectsOnInteractionAtPath(e,t,n)}}class Ri extends fi{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,Yn,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(ln(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class Di extends fi{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(ln(r),e.start)}const a=new ri(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class Oi extends fi{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new Ri(this):new Di(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new ki(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof Ms&&!s&&(s=!0,r=n-1),s&&(i.includePath(me,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class _i extends Oi{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof Ms){for(;n<t.length;n++){e[n+1]?.deoptimizePath(me);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(me);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(Yn)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(me),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Le;for(const e of this.returnExpressions)e.deoptimizePath(me)}}}class Li extends _i{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new $i(n)),this.variables.set("this",this.thisVariable=new Ci(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(me,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class Mi extends Fn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Ke&&this.scope.context.log(nt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${lt(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Ke:super.shouldBeIncluded(e)}}Mi.prototype.includeNode=jn,Mi.prototype.applyDeoptimizations=Un;class Ti extends Fn{get deoptimizeBody(){return ke(this.flags,32768)}set deoptimizeBody(e){this.flags=Ce(this.flags,32768,e)}get directlyIncluded(){return ke(this.flags,16384)}set directlyIncluded(e){this.flags=Ce(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Le)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new bi(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 n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof Mi&&"use asm"===e.directive}render(e,t){this.body.length>0?Y(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}Ti.prototype.includeNode=jn,Ti.prototype.applyDeoptimizations=Un;class Bi extends Fn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,zi(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(zi(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(fe)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(fe,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,zi(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,zi(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([ue,ue]),this.scope.context.requestTreeshakingPass())}}Bi.prototype.includeNode=Vn;const zi=e=>e.at(-1)===ue?e:[...e,ue];class Fi extends Fn{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return ke(this.flags,256)}set async(e){this.flags=Ce(this.flags,256,e)}get deoptimizedReturn(){return ke(this.flags,512)}set deoptimizedReturn(e){this.flags=Ce(this.flags,512,e)}get generator(){return ke(this.flags,4194304)}set generator(e){this.flags=Ce(this.flags,4194304,e)}get hasCachedEffects(){return ke(this.flags,67108864)}set hasCachedEffects(e){this.flags=Ce(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===ue&&(this.scope.getReturnExpression().deoptimizePath(me),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(me),this.scope.context.requestTreeshakingPass()),Me):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],je,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Fe,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,fe,t.args[e+1]||Yn))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===He&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}initialise(){super.initialise(),this.body instanceof Ti?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map(e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e));return s.addParameterVariables(o.map(e=>e.declare("parameter",fe,Le)),o[o.length-1]instanceof Bi),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}}Fi.prototype.preventChildBlockScope=!0,Fi.prototype.includeNode=jn,Fi.prototype.applyDeoptimizations=Un;class Vi extends Fi{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Li(e,this),this.constructedEntity=new Es(Object.create(null),Ss),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Le);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return this.hasCachedEffects=!0,!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof ui&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof ui&&!t||n.includePath(me,e)}initialise(){super.initialise(),this.id?.declare("function",fe,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Es([{key:"prototype",kind:"init",property:new Es([],Ss)}],Ss)}}class ji extends Vi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class Ui extends Fn{include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,me,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return K(e,W(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof ji)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=W(e,"function",t)+8;e=e.slice(n,W(e,"(",n));const s=W(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Si)this.renderNamedDeclaration(e,r,null===this.declaration.id?W(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void G(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:We}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof Si&&i.has(this.variable)&&e.appendLeft(this.end,` ${ee([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}Ui.prototype.needsBoundaries=!0,Ui.prototype.includeNode=jn,Ui.prototype.applyDeoptimizations=Un;const Gi=/[\n\r'\\\u2028\u2029]/,Hi=/([\n\r'\u2028\u2029])/g,Wi=/\\/g;function qi(e){return Gi.test(e)?e.replace(Wi,"\\\\").replace(Hi,"\\$1"):e}const Ki="_interopDefault",Xi="_interopDefaultCompat",Ji="_interopNamespace",Yi="_interopNamespaceCompat",Zi="_interopNamespaceDefault",Qi="_interopNamespaceDefaultOnly",er="_mergeNamespaces",tr="_documentCurrentScript",nr={auto:Ki,compat:Xi,default:null,defaultOnly:null,esModule:null},sr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),ir={auto:Ji,compat:Yi,default:Zi,defaultOnly:Qi,esModule:null},rr=(e,t)=>"esModule"!==e&&sr(e,t),or=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of xr)t.has(e)&&a.add(e);return xr.map(e=>a.has(e)?ar[e](n,s,i,r,o,a):"").join("")},ar={[tr]:(e,{_:t,n:n})=>`var ${tr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[Xi](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Xi});return`${o}${ur(t)}${s}?${s}${n?lr(t):cr(t)}${a}${r}${r}`},[Ki](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ki});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?lr(t):cr(t)}${a}${r}${r}`},[Yi](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Zi)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Yi});return`${e}${ur(t)}${o}?${o}e${o}:${o}${Zi}(e)${n}${l}${l}`}return`function ${Yi}(e)${o}{${l}${e}if${o}(${ur(t)})${o}return e;${l}`+dr(e,e,t,n,s,i)+`}${l}${l}`},[Qi](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Qi});return`${c}${br(s,Er(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Zi](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Zi}(e)${r}{${o}`+dr(e,e,t,n,s,i)+`}${o}${o}`},[Ji](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Zi)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ji});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Zi}(e)${t}${l}${l}`}return`function ${Ji}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+dr(e,e,t,n,s,i)+`}${l}${l}`},[er](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${er}(n, m)${r}{${a}${e}${pr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?mr:gr:yr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${br(s,Er(i,"n",t))};${a}}${a}${a}`}},lr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,cr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,ur=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,dr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?fr:yr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Ar(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${hr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${br(i,"n")}${d}${u}`},hr=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,pr=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},fr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+mr(e,t+e,n)+`${t}}${i}`},mr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},gr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},yr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,br=(e,t)=>e?`Object.freeze(${t})`:t,Er=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Ar(s)})`:t,xr=Object.keys(ar);function Ar(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Sr extends Fn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?Re:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Me:hs(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){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||ds(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return cs;switch(typeof e){case"boolean":return as;case"number":return ls;case"string":return us}return Object.create(null)}(this.value)}parseNode(e){return 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 $r(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(fe,xe,i);if(n===zn||e.optional&&null==n)return zn}else if(e.optional&&null==t.getLiteralValueAtPath(fe,xe,i))return zn;return e.getLiteralValueAtPath(n,s,i)}function vr(e){return e.computed?function(e){if(e instanceof Sr)return String(e.value);return null}(e.property):e.property.name}function Pr(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof ui)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof wr){const s=Pr(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Sr.prototype.includeNode=Vn;class wr extends Fn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}get optional(){return ke(this.flags,128)}set optional(e){this.flags=Ce(this.flags,128,e)}get assignmentDeoptimized(){return ke(this.flags,16)}set assignmentDeoptimized(e){this.flags=Ce(this.flags,16,e)}get bound(){return ke(this.flags,32)}set bound(e){this.flags=Ce(this.flags,32,e)}get isUndefined(){return ke(this.flags,64)}set isUndefined(e){this.flags=Ce(this.flags,64,e)}bind(){this.bound=!0;const e=Pr(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Ir(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===ue?me:[this.propertyKey,...t],n):Te(e))}deoptimizeAssignment(e,t){this.deoptimizePath(fe),t.deoptimizePath([...e,ue])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=re,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(me),this.included&&t.includePath(me,Ie());for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined){const{propertyKey:t}=this;this.object.deoptimizePath([t===ue?de:t,...e.length<6?e:[...e.slice(0,6),ue]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==ue&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Re}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:$r(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[Yn,!1];const i=this.getDynamicPropertyKey();return i!==ue&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):Me}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===zn?zn:this.optional&&null==this.object.getLiteralValueAtPath(fe,xe,this)?t||zn:(this.deoptimized||this.applyDeoptimizations(),t||this.property.hasEffects(e)||this.hasAccessEffect(e))}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(fe,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n))}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,Fe,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,fe,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,fe,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),ue]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArguments(e,t){var n;this.variable?this.variable.includeCallArguments(e,t):Kn(this.object)||this.object.variable&&!this.object.variable.isReassigned&&this.object.variable instanceof ri&&((n=this.object.variable.init)instanceof Fn&&"AwaitExpression"===n.type)&&Kn(this.object.variable.init.argument)?ze(e,t):Be(e,t)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=vr(this),this.propertyKey=null===this.dynamicPropertyKey?ue:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=se){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],xe),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.propertyKey],xe),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof ui){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,me,Ie()),this.scope.context.log(nt,qt(this.object.name,this.scope.context.module.id),this.start))}}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(fe,xe,this);return this.dynamicPropertyKey=e===pe?e:"symbol"==typeof e?ue:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function Ir(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof En)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(nt,sn(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return Ir(i,t.slice(1),n)}const Nr="ROLLUP_FILE_URL_",kr="ROLLUP_FILE_URL_OBJ_",Cr="import";class Rr extends Fn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===Cr){if(n?.startsWith(kr))return e.getFileName(n.slice(20));if(n?.startsWith(Nr))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===Cr){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof wr&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(kr)?this.referenceId=t.slice(20):t?.startsWith(Nr)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:u,start:d,end:h}=this,{id:p}=r;if(o!==Cr)return;const f=c;if(u){const t=s.getFileName(u),i=B(j(F(f),t)),r=!!a?.startsWith(kr),o=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||Vr[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=jr[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Dr.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof wr?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(d,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Nr)||this.metaProperty?.startsWith(kr)?_r:Or)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const Dr=["cjs","iife","umd"],Or={amd:["document","module","URL"],cjs:["document","require","URL",tr],es:[],iife:["document","URL",tr],system:["module"],umd:["document","require","URL",tr]},_r={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Lr=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,Mr=(e,t,n=!1)=>Lr(`'${qi(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),Tr=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},Br=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,zr=(e,t)=>Br(`__dirname + '/${qi(e)}'`,t),Fr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${tr} && ${tr}.tagName.toUpperCase() === 'SCRIPT' && ${tr}.src || new URL('${qi(e)}', document.baseURI).href)`,Vr={amd:(e,t)=>("."!==e[0]&&(e="./"+e),Lr(`require.toUrl('${qi(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${zr(e,t)} : ${Mr(e,t)})`,es:(e,t)=>Lr(`'${qi(e)}', import.meta.url`,t),iife:(e,t)=>Mr(e,t),system:(e,t)=>Lr(`'${qi(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${zr(e,t)} : ${Mr(e,t,!0)})`},jr={amd:Tr(()=>Lr("module.uri, document.baseURI",!1)),cjs:Tr(e=>`(typeof document === 'undefined' ? ${Br("__filename",!1)} : ${Fr(e)})`),iife:Tr(e=>Fr(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Tr(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Br("__filename",!1)} : ${Fr(e,!0)})`)};class Ur extends bn{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Gr extends ri{constructor(e,t,n){super(e,t,t.declaration,fe,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof ji||s instanceof Si)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof ui&&(this.originalId=s)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}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 Ur||"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 n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof Gr&&!n.has(t));return this.originalVariable=t||e}}class Hr extends bn{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,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):Te(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]===pe?"Module":Re}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const[t]=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([er],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter(([e,t])=>t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${In(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));f=`/*#__PURE__*/${er}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Ar(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${u}${ee([this],e)};`),f}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}}Hr.prototype.isNamespace=!0;class Wr extends bn{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof Gr||e instanceof Wr;){if(e instanceof Gr){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof Wr&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,e,t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class qr{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=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?B(j(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=Kr(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return qi(this.renormalizeRenderPath?dt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function Kr(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,`'${t}'`]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Xr(e){return e.endsWith(".js")?e.slice(0,-3):e}function Jr(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Xr(t)}`:e.id??""}function Yr(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:d,getPropertyAccess:h,n:p,s:f}=i;if(!n)return`${p}${p}${l}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:u}of t)if(u)return Zr(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,h)};`;let m="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:i,name:a,namedExportsMode:l,namespaceVariableName:d,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=Zr(a,t.imported,l,i,e,d,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}{${p}${r}enumerable:${c}true,${p}${r}get:${c}${e}${f}${n}${p}});`}else"__proto__"===t.reexported?m+=`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${f}${p}});`:m+=`exports${h(t.reexported)}${c}=${c}${f};`}for(const{exported:t,local:n}of e){const e=`exports${h(t)}`;e!==n&&(m&&(m+=p),m+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${n}${p}});`:`${e}${c}=${c}${n};`)}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(m&&(m+=p),!t.needsLiveBinding&&a){const t="'__proto__'";m+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${p}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${p}${r}Object.defineProperty(exports,${c}${t},${c}{${p}${r}${r}enumerable:${c}true,${p}${r}${r}value:${c}${e}[${t}]${p}${r}});${p}${p}`}const n=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${to(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function Zr(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=nr[t]?i:e;return sr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:ir[o(a)])?r:e:`${e}${c(t)}`}function Qr(e){return e([["value","true"]],{lineBreakIndent:null})}function eo(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Qr(i)],[null,`[Symbol.toStringTag]:${s}${Ar(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Qr(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Ar(i)});`}return""}const to=(e,t,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(t){const[t,o]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${t}${e}[k]${o}${r}${n}})`}return`exports[k]${s}=${s}${e}[k]`};function no(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,Qi,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=nr[e])):"*"!==t||"*"===i||a||(a=!0,s=ir[e],c=l),s&&p(c,s,o)}}return`${or(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function so(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Xr(e);var n}const io=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib"]);function ro(e,t){const n=t.map(({importPath:e})=>e).filter(e=>io.has(e)||e.startsWith("node:"));0!==n.length&&e(nt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${ot(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const oo=(e,t)=>e.split(".").map(t).join("");function ao(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(nt,cn(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function lo(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const co="_missingExportShim";const uo=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>e.exported));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},ho=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map(e=>[e,"1"]);return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},po=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",fo=(e,t,n)=>mo(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function mo(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${In(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const go=(e,t,n)=>mo(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),yo=(e,t,n)=>mo(e.filter(e=>e.local===co).map(e=>({name:e.exported,value:co})),t,n);function bo(e,t,n){return e?`${t}${oo(e,n)}`:"null"}var Eo={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:A,strict:S}){ro(h,n);const $=n.map(e=>`'${so(e.importPath,m.forceJsExtensionForImports)}'`),v=n.map(e=>e.name),{n:P,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(v.unshift("exports"),$.unshift("'exports'")),t.has("require")&&(v.unshift("require"),$.unshift("'require'")),t.has("module")&&(v.unshift("module"),$.unshift("'module'"));const N=Jr(m,o),k=(N?`'${N}',${I}`:"")+($.length>0?`[${$.join(`,${I}`)}],${I}`:""),C=S?`${I}'use strict';`:"";e.prepend(`${l}${no(n,x,y,b,E,t,a,f)}`);const R=Yr(s,n,d,x,f,a,y,A);let D=eo(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);D&&(D=P+P+D),e.append(`${R}${D}${p}`).indent(a).prepend(`${m.define}(${k}(${w(v,{isAsync:!1,name:null})}{${C}${P}${P}`).append(`${P}${P}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:d,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:A,n:S}=h,$=x?`'use strict';${S}${S}`:"";let v=eo(u&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);v&&(v+=S+S);const P=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),w=no(n,y,m,g,b,t,o,h);e.prepend(`${$}${a}${v}${P}${w}`);const I=Yr(s,n,u,y,h,o,m,E,`module.exports${A}=${A}`);e.append(`${I}${d}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${Nn(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${Nn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?Nn(e.imported):`${Nn(e.imported)} as ${Nn(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=or(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${Nn(o.exported)}`;i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,namedExportsMode:l,log:c,outro:u,snippets:d},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:A},strict:S}){const{_:$,getNonArrowFunctionIntro:v,getPropertyAccess:P,n:w}=d,I=x&&x.includes("."),N=!f&&!I;if(x&&N&&($n(k=x)||Sn.test(k)))return Pt(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:ht("configuration-options/#output-extend")}}(x));var k;ro(c,n);const C=lo(n),R=C.map(e=>e.globalName||"null"),D=C.map(e=>e.name);r&&!x&&c(nt,{code:Lt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:ht(St)}),r&&(l||"exports.default"===s[0]?.local)&&(f?(R.unshift(`this${oo(x,P)}${$}=${$}this${oo(x,P)}${$}||${$}{}`),D.unshift("exports")):(R.unshift("{}"),D.unshift("exports")));const O=S?`${o}'use strict';${w}`:"",_=no(n,E,g,m,A,t,o,d);e.prepend(`${a}${_}`);let L=`(${v(D,{isAsync:!1,name:null})}{${w}${O}${w}`;r&&(!x||f&&l||(L=(N?`var ${x}`:`this${oo(x,P)}`)+`${$}=${$}${L}`),I&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(nt,cn(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(x,"this",b,d,h,c)+L));let M=`${w}${w}})(${R.join(`,${$}`)});`;r&&!f&&l&&(M=`${w}${w}${o}return exports;${M}`);const T=Yr(s,n,l,E,d,o,g,y);let B=eo(l&&r,!0===p||"if-default-prop"===p&&i,A,d);B&&(B=w+w+B),e.append(`${T}${B}${u}`).indent(o).prepend(L).append(M)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:u,freeze:d,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:A,setters:S,starExcludes:$}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){u||(u=uo({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:u}}(n,s,r,a),v=h?`'${h}',${g}`:"",P=t.has("module")?["exports","module"]:i?["exports"]:[];let w=`System.register(${v}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${g}`)+`],${g}(${b(P,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+ho($,r,a)+po(A,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}(${b([],{isAsync:c,name:null})}{${E}${E}`;const I=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+or(null,t,r,a,u,d,p)+fo(s,r,a)).append(`${l}${E}${E}`+go(s,r,a)+yo(s,r,a)).indent(`${r}${r}${r}`).append(I).prepend(w)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:A},globals:S,noConflict:$,reexportProtoFromExternal:v,strict:P}){const{_:w,cnst:I,getFunctionIntro:N,getNonArrowFunctionIntro:k,getPropertyAccess:C,n:R,s:D}=h,O=f?"f":"factory",_=f?"g":"global";if(r&&!x)return Pt({code:Lt,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:ht(St)});ro(u,n);const L=n.map(e=>`'${so(e.importPath,p.forceJsExtensionForImports)}'`),M=n.map(e=>`require('${e.importPath}')`),T=lo(n),B=T.map(e=>bo(e.globalName,_,C)),z=T.map(e=>e.name);(r||$)&&(c||r&&"exports.default"===s[0]?.local)&&(L.unshift("'exports'"),M.unshift("exports"),B.unshift(ao(x,_,S,(g?`${bo(x,_,C)}${w}||${w}`:"")+"{}",h,u)),z.unshift("exports"));const F=Jr(p,o),V=(F?`'${F}',${w}`:"")+(L.length>0?`[${L.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=P?`${w}'use strict';${R}`:"";let H;if($){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${ao(x,_,S,`${O}(${B.join(`,${w}`)})`,h,u)};`;else{t=`${I} ${e}${w}=${w}${B.shift()};${R}${a}${a}${O}(${[e,...B].join(`,${w}`)});`}H=`(${N([],{isAsync:!1,name:null})}{${R}${a}${a}${I} current${w}=${w}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,_,h)};${R}${a}${a}${t}${R}${a}${a}${e}.noConflict${w}=${w}${N([],{isAsync:!1,name:null})}{${w}${bo(x,_,C)}${w}=${w}current;${w}return ${e}${D}${w}};${R}${a}})()`}else H=`${O}(${B.join(`,${w}`)})`,!c&&r&&(H=ao(x,_,S,H,h,u));const W=r||$&&c||B.length>0,q=[O];W&&q.unshift(_);const K=W?`this,${w}`:"",X=W?`(${_}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${_}${w}||${w}self,${w}`:"",J=W?")":"",Y=W?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${O}(${M.join(`,${w}`)})${w}:${R}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${R}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${V}${O})${w}:${R}`+`${a}${X}${H}${J};${R}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${R}`,Q=R+R+"}));";e.prepend(`${l}${no(n,E,y,b,A,t,a,h)}`);const ee=Yr(s,n,c,E,h,a,y,v);let te=eo(c&&r,!0===m||"if-default-prop"===m&&i,A,h);te&&(te=R+R+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ao,So,$o,vo,Po,wo,Io,No,ko,Co,Ro,Do={};function Oo(){if(So)return Ao;So=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return Ao={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},Ao}function _o(){return $o||($o=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=Oo();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(Do)),Do}function Lo(){if(Po)return vo;Po=1;const e=_o(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=Oo(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return vo=(b,E)=>{const x=E||{},A=b.length-1,S=!0===x.parts||!0===x.scanToEnd,$=[],v=[],P=[];let w,I,N=b,k=-1,C=0,R=0,D=!1,O=!1,_=!1,L=!1,M=!1,T=!1,B=!1,z=!1,F=!1,V=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=A,H=()=>N.charCodeAt(k+1),W=()=>(w=I,N.charCodeAt(++k));for(;k<A;){let e;if(I=W(),I!==s){if(!0===T||I===l){for(j++;!0!==G()&&(I=W());)if(I!==s)if(I!==l){if(!0!==T&&I===r&&(I=W())===r){if(D=U.isBrace=!0,_=U.isGlob=!0,V=!0,!0===S)continue;break}if(!0!==T&&I===i){if(D=U.isBrace=!0,_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===p&&(j--,0===j)){T=!1,D=U.isBrace=!0,V=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===S)continue;break}if(I!==a){if(!0!==x.noext){if(!0===(I===d||I===n||I===t||I===h||I===o)&&H()===c){if(_=U.isGlob=!0,L=U.isExtglob=!0,V=!0,I===o&&k===C&&(F=!0),!0===S){for(;!0!==G()&&(I=W());)if(I!==s){if(I===f){_=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,I=W();continue}break}}if(I===t){if(w===t&&(M=U.isGlobstar=!0),_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===h){if(_=U.isGlob=!0,V=!0,!0===S)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){O=U.isBracket=!0,_=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,W();if(!0===S)continue;break}if(!0===x.nonegate||I!==o||k!==C){if(!0!==x.noparen&&I===c){if(_=U.isGlob=!0,!0===S){for(;!0!==G()&&(I=W());)if(I!==c){if(I===f){V=!0;break}}else B=U.backslashes=!0,I=W();continue}break}if(!0===_){if(V=!0,!0===S)continue;break}}else z=U.negated=!0,C++}else{if($.push(k),v.push(U),U={value:"",depth:0,isGlob:!1},!0===V)continue;if(w===r&&k===C+1){C+=2;continue}R=k+1}}else B=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(L=!1,_=!1);let q=N,K="",X="";C>0&&(K=N.slice(0,C),N=N.slice(C),R-=C),q&&!0===_&&R>0?(q=N.slice(0,R),X=N.slice(R)):!0===_?(q="",X=N):q=N,q&&""!==q&&"/"!==q&&q!==N&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:C,base:q,glob:X,isBrace:D,isBracket:O,isGlob:_,isExtglob:L,isGlobstar:M,negated:z,negatedExtglob:F};if(!0===x.tokens&&(J.maxDepth=0,g(I)||v.push(U),J.tokens=v),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<$.length;t++){const n=e?e+1:C,s=$[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==C?(v[t].isPrefix=!0,v[t].value=K):v[t].value=i,y(v[t]),J.maxDepth+=v[t].depth),0===t&&""===i||P.push(i),e=s}if(e&&e+1<b.length){const t=b.slice(e+1);P.push(t),x.tokens&&(v[v.length-1].value=t,y(v[v.length-1]),J.maxDepth+=v[v.length-1].depth)}J.slashes=$,J.parts=P}return J},vo}function Mo(){if(Io)return wo;Io=1;const e=Oo(),t=_o(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();return`[${e.join("-")}]`},l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=(u,d)=>{if("string"!=typeof u)throw new TypeError("Expected a string");u=o[u]||u;const h={...d},p="number"==typeof h.maxLength?Math.min(n,h.maxLength):n;let f=u.length;if(f>p)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${p}`);const m={type:"bos",value:"",output:h.prepend||""},g=[m],y=h.capture?"":"?:",b=e.globChars(h.windows),E=e.extglobChars(b),{DOT_LITERAL:x,PLUS_LITERAL:A,SLASH_LITERAL:S,ONE_CHAR:$,DOTS_SLASH:v,NO_DOT:P,NO_DOT_SLASH:w,NO_DOTS_SLASH:I,QMARK:N,QMARK_NO_DOT:k,STAR:C,START_ANCHOR:R}=b,D=e=>`(${y}(?:(?!${R}${e.dot?v:x}).)*?)`,O=h.dot?"":P,_=h.dot?N:k;let L=!0===h.bash?D(h):C;h.capture&&(L=`(${L})`),"boolean"==typeof h.noext&&(h.noextglob=h.noext);const M={input:u,index:-1,start:0,dot:!0===h.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};u=t.removePrefix(u,M),f=u.length;const T=[],B=[],z=[];let F,V=m;const j=()=>M.index===f-1,U=M.peek=(e=1)=>u[M.index+e],G=M.advance=()=>u[++M.index]||"",H=()=>u.slice(M.index+1),W=(e="",t=0)=>{M.consumed+=e,M.index+=t},q=e=>{M.output+=null!=e.output?e.output:e.value,W(e.value)},K=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)G(),M.start++,e++;return e%2!=0&&(M.negated=!0,M.start++,!0)},X=e=>{M[e]++,z.push(e)},J=e=>{M[e]--,z.pop()},Y=e=>{if("globstar"===V.type){const t=M.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||T.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(M.output=M.output.slice(0,-V.output.length),V.type="star",V.value="*",V.output=L,M.output+=V.output)}if(T.length&&"paren"!==e.type&&(T[T.length-1].inner+=e.value),(e.value||e.output)&&q(e),V&&"text"===V.type&&"text"===e.type)return V.output=(V.output||V.value)+e.value,void(V.value+=e.value);e.prev=V,g.push(e),V=e},Z=(e,t)=>{const n={...E[t],conditions:1,inner:""};n.prev=V,n.parens=M.parens,n.output=M.output;const s=(h.capture?"(":"")+n.open;X("parens"),Y({type:e,value:t,output:M.output?"":$}),Y({type:"paren",extglob:!0,value:G(),output:s}),T.push(n)},Q=e=>{let t,n=e.close+(h.capture?")":"");if("negate"===e.type){let s=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(s=D(h)),(s!==L||j()||/^\)+$/.test(H()))&&(n=e.close=`)$))${s}`),e.inner.includes("*")&&(t=H())&&/^\.[^\\/.]+$/.test(t)){const i=c(t,{...d,fastpaths:!1}).output;n=e.close=`)${i})${s})`}"bos"===e.prev.type&&(M.negatedExtglob=!0)}Y({type:"paren",extglob:!0,value:F,output:n}),J("parens")};if(!1!==h.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(u)){let e=!1,n=u.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?N.repeat(r.length):""):0===o?_+(r?N.repeat(r.length):""):N.repeat(s.length):"."===i?x.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===h.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===u&&!0===h.contains?(M.output=u,M):(M.output=t.wrapOutput(n,M,d),M)}for(;!j();){if(F=G(),"\0"===F)continue;if("\\"===F){const e=U();if("/"===e&&!0!==h.bash)continue;if("."===e||";"===e)continue;if(!e){F+="\\",Y({type:"text",value:F});continue}const t=/^\\+/.exec(H());let n=0;if(t&&t[0].length>2&&(n=t[0].length,M.index+=n,n%2!=0&&(F+="\\")),!0===h.unescape?F=G():F+=G(),0===M.brackets){Y({type:"text",value:F});continue}}if(M.brackets>0&&("]"!==F||"["===V.value||"[^"===V.value)){if(!1!==h.posix&&":"===F){const e=V.value.slice(1);if(e.includes("[")&&(V.posix=!0,e.includes(":"))){const e=V.value.lastIndexOf("["),t=V.value.slice(0,e),n=V.value.slice(e+2),i=s[n];if(i){V.value=t+i,M.backtrack=!0,G(),m.output||1!==g.indexOf(V)||(m.output=$);continue}}}("["===F&&":"!==U()||"-"===F&&"]"===U())&&(F=`\\${F}`),"]"!==F||"["!==V.value&&"[^"!==V.value||(F=`\\${F}`),!0===h.posix&&"!"===F&&"["===V.value&&(F="^"),V.value+=F,q({value:F});continue}if(1===M.quotes&&'"'!==F){F=t.escapeRegex(F),V.value+=F,q({value:F});continue}if('"'===F){M.quotes=1===M.quotes?0:1,!0===h.keepQuotes&&Y({type:"text",value:F});continue}if("("===F){X("parens"),Y({type:"paren",value:F});continue}if(")"===F){if(0===M.parens&&!0===h.strictBrackets)throw new SyntaxError(l("opening","("));const e=T[T.length-1];if(e&&M.parens===e.parens+1){Q(T.pop());continue}Y({type:"paren",value:F,output:M.parens?")":"\\)"}),J("parens");continue}if("["===F){if(!0!==h.nobracket&&H().includes("]"))X("brackets");else{if(!0!==h.nobracket&&!0===h.strictBrackets)throw new SyntaxError(l("closing","]"));F=`\\${F}`}Y({type:"bracket",value:F});continue}if("]"===F){if(!0===h.nobracket||V&&"bracket"===V.type&&1===V.value.length){Y({type:"text",value:F,output:`\\${F}`});continue}if(0===M.brackets){if(!0===h.strictBrackets)throw new SyntaxError(l("opening","["));Y({type:"text",value:F,output:`\\${F}`});continue}J("brackets");const e=V.value.slice(1);if(!0===V.posix||"^"!==e[0]||e.includes("/")||(F=`/${F}`),V.value+=F,q({value:F}),!1===h.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(V.value);if(M.output=M.output.slice(0,-V.value.length),!0===h.literalBrackets){M.output+=n,V.value=n;continue}V.value=`(${y}${n}|${V.value})`,M.output+=V.value;continue}if("{"===F&&!0!==h.nobrace){X("braces");const e={type:"brace",value:F,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};B.push(e),Y(e);continue}if("}"===F){const e=B[B.length-1];if(!0===h.nobrace||!e){Y({type:"text",value:F,output:F});continue}let t=")";if(!0===e.dots){const e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,h),M.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=M.output.slice(0,e.outputIndex),s=M.tokens.slice(e.tokensIndex);e.value=e.output="\\{",F=t="\\}",M.output=n;for(const e of s)M.output+=e.output||e.value}Y({type:"brace",value:F,output:t}),J("braces"),B.pop();continue}if("|"===F){T.length>0&&T[T.length-1].conditions++,Y({type:"text",value:F});continue}if(","===F){let e=F;const t=B[B.length-1];t&&"braces"===z[z.length-1]&&(t.comma=!0,e="|"),Y({type:"comma",value:F,output:e});continue}if("/"===F){if("dot"===V.type&&M.index===M.start+1){M.start=M.index+1,M.consumed="",M.output="",g.pop(),V=m;continue}Y({type:"slash",value:F,output:S});continue}if("."===F){if(M.braces>0&&"dot"===V.type){"."===V.value&&(V.output=x);const e=B[B.length-1];V.type="dots",V.output+=F,V.value+=F,e.dots=!0;continue}if(M.braces+M.parens===0&&"bos"!==V.type&&"slash"!==V.type){Y({type:"text",value:F,output:x});continue}Y({type:"dot",value:F,output:x});continue}if("?"===F){if(!(V&&"("===V.value)&&!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Z("qmark",F);continue}if(V&&"paren"===V.type){const e=U();let t=F;("("===V.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(H()))&&(t=`\\${F}`),Y({type:"text",value:F,output:t});continue}if(!0!==h.dot&&("slash"===V.type||"bos"===V.type)){Y({type:"qmark",value:F,output:k});continue}Y({type:"qmark",value:F,output:N});continue}if("!"===F){if(!0!==h.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){Z("negate",F);continue}if(!0!==h.nonegate&&0===M.index){K();continue}}if("+"===F){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Z("plus",F);continue}if(V&&"("===V.value||!1===h.regex){Y({type:"plus",value:F,output:A});continue}if(V&&("bracket"===V.type||"paren"===V.type||"brace"===V.type)||M.parens>0){Y({type:"plus",value:F});continue}Y({type:"plus",value:A});continue}if("@"===F){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Y({type:"at",extglob:!0,value:F,output:""});continue}Y({type:"text",value:F});continue}if("*"!==F){"$"!==F&&"^"!==F||(F=`\\${F}`);const e=i.exec(H());e&&(F+=e[0],M.index+=e[0].length),Y({type:"text",value:F});continue}if(V&&("globstar"===V.type||!0===V.star)){V.type="star",V.star=!0,V.value+=F,V.output=L,M.backtrack=!0,M.globstar=!0,W(F);continue}let e=H();if(!0!==h.noextglob&&/^\([^?]/.test(e)){Z("star",F);continue}if("star"===V.type){if(!0===h.noglobstar){W(F);continue}const t=V.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===h.bash&&(!s||e[0]&&"/"!==e[0])){Y({type:"star",value:F,output:""});continue}const r=M.braces>0&&("comma"===t.type||"brace"===t.type),o=T.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Y({type:"star",value:F,output:""});continue}for(;"/**"===e.slice(0,3);){const t=u[M.index+4];if(t&&"/"!==t)break;e=e.slice(3),W("/**",3)}if("bos"===t.type&&j()){V.type="globstar",V.value+=F,V.output=D(h),M.output=V.output,M.globstar=!0,W(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&j()){M.output=M.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=D(h)+(h.strictSlashes?")":"|$)"),V.value+=F,M.globstar=!0,M.output+=t.output+V.output,W(F);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";M.output=M.output.slice(0,-(t.output+V.output).length),t.output=`(?:${t.output}`,V.type="globstar",V.output=`${D(h)}${S}|${S}${n})`,V.value+=F,M.output+=t.output+V.output,M.globstar=!0,W(F+G()),Y({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){V.type="globstar",V.value+=F,V.output=`(?:^|${S}|${D(h)}${S})`,M.output=V.output,M.globstar=!0,W(F+G()),Y({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-V.output.length),V.type="globstar",V.output=D(h),V.value+=F,M.output+=V.output,M.globstar=!0,W(F);continue}const n={type:"star",value:F,output:L};!0!==h.bash?!V||"bracket"!==V.type&&"paren"!==V.type||!0!==h.regex?(M.index!==M.start&&"slash"!==V.type&&"dot"!==V.type||("dot"===V.type?(M.output+=w,V.output+=w):!0===h.dot?(M.output+=I,V.output+=I):(M.output+=O,V.output+=O),"*"!==U()&&(M.output+=$,V.output+=$)),Y(n)):(n.output=F,Y(n)):(n.output=".*?","bos"!==V.type&&"slash"!==V.type||(n.output=O+n.output),Y(n))}for(;M.brackets>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing","]"));M.output=t.escapeLast(M.output,"["),J("brackets")}for(;M.parens>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing",")"));M.output=t.escapeLast(M.output,"("),J("parens")}for(;M.braces>0;){if(!0===h.strictBrackets)throw new SyntaxError(l("closing","}"));M.output=t.escapeLast(M.output,"{"),J("braces")}if(!0===h.strictSlashes||"star"!==V.type&&"bracket"!==V.type||Y({type:"maybe_slash",value:"",output:`${S}?`}),!0===M.backtrack){M.output="";for(const e of M.tokens)M.output+=null!=e.output?e.output:e.value,e.suffix&&(M.output+=e.suffix)}return M};return c.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let A=!0===r.bash?".*?":g;r.capture&&(A=`(${A})`);const S=e=>!0===e.noglobstar?A:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,$=e=>{switch(e){case"*":return`${b}${d}${A}`;case".*":return`${c}${d}${A}`;case"*.*":return`${b}${A}${c}${d}${A}`;case"*/*":return`${b}${A}${u}${d}${E}${A}`;case"**":return b+S(r);case"**/*":return`(?:${b}${S(r)}${u})?${E}${d}${A}`;case"**/*.*":return`(?:${b}${S(r)}${u})?${E}${A}${c}${d}${A}`;case"**/.*":return`(?:${b}${S(r)}${u})?${c}${d}${A}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=$(t[1]);if(!n)return;return n+c+t[2]}}},v=t.removePrefix(s,{negated:!1,prefix:""});let P=$(v);return P&&!0!==r.strictSlashes&&(P+=`${u}?`),P},wo=c}function To(){if(ko)return No;ko=1;const e=Lo(),t=Mo(),n=_o(),s=Oo(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e)),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,No=i}function Bo(){if(Ro)return Co;Ro=1;const e=To(),t=_o();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),Co=n}var zo=xo(Bo());const Fo={ArrayPattern(e,t){for(const n of t.elements)n&&Fo[n.type](e,n)},AssignmentPattern(e,t){Fo[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?Fo.RestElement(e,n):Fo[n.value.type](e,n.value)},RestElement(e,t){Fo[t.argument.type](e,t.argument)}},Vo=function(e){const t=[];return Fo[e.type](t,e),t};let jo;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("");let Uo=null;function Go(){return null!==Uo&&0!==Uo.byteLength||(Uo=new Uint8Array(jo.memory.buffer)),Uo}let Ho="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Ho.decode();let Wo=0;function qo(e,t){return function(e,t){return Wo+=t,Wo>=2146435072&&(Ho="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}},Ho.decode(),Wo=t),Ho.decode(Go().subarray(e,e+t))}(e>>>=0,t)}const Ko=new Array(128).fill(void 0);function Xo(e){return Ko[e]}Ko.push(void 0,null,!0,!1);let Jo=Ko.length;function Yo(e){Jo===Ko.length&&Ko.push(Ko.length+1);const t=Jo;return Jo=Ko[t],Ko[t]=e,t}function Zo(e,t){return e>>>=0,Go().subarray(e/1,e/1+t)}let Qo=0;const ea="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ta="function"==typeof ea.encodeInto?function(e,t){return ea.encodeInto(e,t)}:function(e,t){const n=ea.encode(e);return t.set(n),{read:e.length,written:n.length}};function na(e,t,n){if(void 0===n){const n=ea.encode(e),s=t(n.length,1)>>>0;return Go().subarray(s,s+n.length).set(n),Qo=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Go();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=Go().subarray(i+o,i+s);o+=ta(e,t).written,i=n(i,s,o,1)>>>0}return Qo=o,i}let sa=null;function ia(){return(null===sa||!0===sa.buffer.detached||void 0===sa.buffer.detached&&sa.buffer!==jo.memory.buffer)&&(sa=new DataView(jo.memory.buffer)),sa}function ra(e){const t=Xo(e);return function(e){e<132||(Ko[e]=Jo,Jo=e)}(e),t}function oa(e,t,n){try{const o=jo.__wbindgen_add_to_stack_pointer(-16),a=na(e,jo.__wbindgen_export_1,jo.__wbindgen_export_2),l=Qo;jo.parse(o,a,l,t,n);var s=ia().getInt32(o+0,!0),i=ia().getInt32(o+4,!0),r=Zo(s,i).slice();return jo.__wbindgen_export_0(s,1*i,1),r}finally{jo.__wbindgen_add_to_stack_pointer(16)}}const aa=new Set(["basic","cors","default"]);async function la(e){if(void 0!==jo)return jo;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm",import.meta.url));const t=function(){const e={wbg:{}};return e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,s;try{n=e,s=t,console.error(qo(e,t))}finally{jo.__wbindgen_export_0(n,s,1)}},e.wbg.__wbg_length_904c0910ed998bf3=function(e){return Xo(e).length},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Yo(new Error)},e.wbg.__wbg_prototypesetcall_c5f74efd31aea86b=function(e,t,n){Uint8Array.prototype.set.call(Zo(e,t),Xo(n))},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){const n=na(Xo(t).stack,jo.__wbindgen_export_1,jo.__wbindgen_export_2),s=Qo;ia().setInt32(e+4,s,!0),ia().setInt32(e+0,n,!0)},e.wbg.__wbg_wbindgenthrow_4c11a24fca429ccf=function(e,t){throw new Error(qo(e,t))},e.wbg.__wbindgen_object_drop_ref=function(e){ra(e)},e}();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:n,module:s}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!aa.has(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,t);return function(e,t){return jo=e.exports,la.__wbindgen_wasm_module=t,sa=null,Uo=null,jo}(n,s)}const ca=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:da(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:da(t[e+2],t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{[On]:s}:{},params:da(t[e+4],t),body:ua(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ua(t[e+3],t),right:ua(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:ua(t[e+2],t),right:ua(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:ua(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ua(t[e+3],t),right:ua(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:da(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:ua(n,t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[On]:s}:{},callee:ua(t[e+4],t),arguments:da(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:ua(n,t),body:ua(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:ua(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:da(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:da(t[e+2],t),id:0===n?null:ua(n,t),superClass:0===s?null:ua(s,t),body:ua(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:da(t[e+2],t),id:0===n?null:ua(n,t),superClass:0===s?null:ua(s,t),body:ua(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:ua(t[e+2],t),consequent:ua(t[e+3],t),alternate:ua(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:ua(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:ua(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:ua(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:ua(t[e+2],t),test:ua(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:ua(n,t),source:ua(t[e+3],t),attributes:da(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:ua(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:da(t[e+2],t),source:0===n?null:ua(n,t),attributes:da(t[e+4],t),declaration:0===s?null:ua(s,t)}},function(e,t){const n=ua(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:ua(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:ua(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:ua(t[e+2],t),right:ua(t[e+3],t),body:ua(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:ua(t[e+3],t),right:ua(t[e+4],t),body:ua(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:ua(n,t),test:0===s?null:ua(s,t),update:0===i?null:ua(i,t),body:ua(t[e+5],t)}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[On]:s}:{},id:0===i?null:ua(i,t),params:da(t[e+5],t),body:ua(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Ln(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{[On]:s}:{},id:0===i?null:ua(i,t),params:da(t[e+5],t),body:ua(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:ua(t[e+2],t),consequent:ua(t[e+3],t),alternate:0===n?null:ua(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:ua(t[e+2],t),value:ua(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:da(t[e+2],t),source:ua(t[e+3],t),attributes:da(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:ua(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:ua(t[e+2],t),options:0===n?null:ua(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:ua(t[e+2],t)}},function(e,t){const n=t[e+2],s=ua(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:ua(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:ua(t[e+2],t),value:0===n?null:ua(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:ua(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:ua(t[e+2],t),children:da(t[e+3],t),closingElement:0===n?null:ua(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:ua(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:ua(t[e+2],t),children:da(t[e+3],t),closingFragment:ua(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:ua(t[e+2],t),property:ua(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:ua(t[e+2],t),name:ua(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:ua(t[e+3],t),attributes:da(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:ua(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:ua(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:ua(t[e+2],t),body:ua(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],left:ua(t[e+3],t),right:ua(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:ua(t[e+3],t),property:ua(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:ua(t[e+2],t),property:ua(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:da(t[e+3],t),key:ua(t[e+4],t),value:ua(t[e+5],t),kind:Dn[t[e+6]]}},function(e,t){const n=Ln(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[On]:n}:{},callee:ua(t[e+3],t),arguments:da(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:da(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:da(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=Ln(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:da(t[e+2],t),...n.length>0?{[_n]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=ua(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:ua(s,t),value:i,kind:Dn[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:da(t[e+3],t),key:ua(t[e+4],t),value:0===s?null:ua(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:ua(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:ua(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:da(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:ua(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:da(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:ua(n,t),consequent:da(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:ua(t[e+2],t),cases:da(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:ua(t[e+2],t),quasi:ua(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:da(t[e+2],t),expressions:da(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:ua(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:ua(t[e+2],t),handler:0===n?null:ua(n,t),finalizer:0===s?null:ua(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Dn[t[e+2]],argument:ua(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:Dn[t[e+3]],argument:ua(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Dn[t[e+2]],declarations:da(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:ua(t[e+2],t),init:0===n?null:ua(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:ua(t[e+2],t),body:ua(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:ua(s,t)}}];function ua(e,t){const n=t[e],s=ca[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function da(e,t){if(0===e)return re;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?ua(n,t):null}return s}function ha(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}class pa extends Fn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=fa(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=fa(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(fe)}hasEffectsWhenDestructuring(e,t,n){const s=fa(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(fe,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=fa(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}pa.prototype.includeNode=Vn;const fa=e=>e.at(-1)===ue?e:[...e,he];class ma extends Fi{constructor(){super(...arguments),this.objectEntity=null}get expression(){return ke(this.flags,8388608)}set expression(e){this.flags=Ce(this.flags,8388608,e)}createScope(e){this.scope=new _i(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}onlyFunctionCallUsed(){return this.parent.type===Ge&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof ui||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(me,e);for(const t of this.params)t instanceof ui||t.includePath(me,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Es([],Ss)}}class ga extends Fn{addExportedVariables(e,t){for(const n of this.properties)n.type===Xe?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(fe,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=Z(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):G(i,e,o,a);s&&e.remove(s,this.end-1)}}}ga.prototype.includeNode=jn,ga.prototype.applyDeoptimizations=Un;class ya extends Fn{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,fe,r)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=Ne();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,fe,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){if(super.initialise(),this.left instanceof ui){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(nt,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=se){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=K(e.original,W(e.original,"=",r.end)+1);e.remove(a,l),n&&Q(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof ui){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?te(n,a,l,e,t):ne(n,a,l,c.type!==We,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${ee(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===We,e,t)}r.included&&r instanceof ga&&(i===We||i===Ue)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(fe,this.right),this.scope.context.requestTreeshakingPass()}}class ba extends Fn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(fe,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=se){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(fe),this.right.deoptimizePath(me),this.scope.context.requestTreeshakingPass()}}class Ea extends Fn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do{if(e instanceof Vi||e instanceof ma)return}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(xa,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}}const xa=["then"];function Aa(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):Re}const Sa={"!=":(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)=>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,"|":(e,t)=>e|t},$a=Symbol("Unassigned");class va extends Fn{constructor(){super(...arguments),this.renderedLiteralValue=$a}deoptimizeCache(){this.renderedLiteralValue=Re}getLiteralValueAtPath(e,t,n){if(e.length>0)return Re;const s=this.left.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof s)return Re;if("in"===this.operator&&this.right.variable instanceof Hr){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof En||e instanceof Wr?Re:!!e}const i=this.right.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof i)return Re;const r=Sa[this.operator];return r?r(s,i):Re}getRenderedLiteralValue(){return"in"===this.operator&&this.right.variable instanceof Hr?this.renderedLiteralValue!==$a?this.renderedLiteralValue:this.renderedLiteralValue=Aa(this.getLiteralValueAtPath(fe,xe,this)):Re}hasEffects(e){return"+"===this.operator&&this.parent instanceof Mi&&""===this.left.getLiteralValueAtPath(fe,xe,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(me,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=se){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}va.prototype.applyDeoptimizations=Un;class Pa extends Fn{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function wa(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(W(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(W(e.original,"(",n.callee.end)+1,n.end-1)}}Pa.prototype.includeNode=jn,Pa.prototype.applyDeoptimizations=Un;class Ia extends Fn{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter(e=>!!e&&e!==Le);if(0!==o.length)if(i===Le)for(const e of o)e.deoptimizePath(me);else n.withTrackedEntityAtPath(t,i,()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==Le){this.returnExpression=Me;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=oe,this.deoptimizableDependentExpressions=re;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(me)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Le&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Le?Re:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Re)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Le?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},Me)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}}class Na extends Ia{get hasCheckedForWarnings(){return ke(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Ce(this.flags,268435456,e)}get optional(){return ke(this.flags,128)}set optional(e){this.flags=Ce(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof wr&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return $r(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===zn)return zn;if(this.optional&&null==this.callee.getLiteralValueAtPath(fe,xe,this))return!this.annotationPure&&t||zn;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===Bn&&this.callee instanceof ui&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(me,e)}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=se){if(this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),wa(e,t,this),this.callee instanceof ui&&!this.hasCheckedForWarnings){this.hasCheckedForWarnings=!0;this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(nt,jt(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(nt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${lt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:ht("troubleshooting/#avoiding-eval")},this.start)}var s}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=xe){return null===this.returnExpression?(this.returnExpression=Me,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(fe,this.interaction,e,this)):this.returnExpression}}class ka extends Fn{createScope(e){this.scope=new Oi(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",fe,Le)),this.body=new Ti(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}ka.prototype.preventChildBlockScope=!0,ka.prototype.includeNode=Vn;class Ca extends Fn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===zn?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}Ca.prototype.includeNode=jn,Ca.prototype.applyDeoptimizations=Un;class Ra extends fi{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new ri("this",null,t,fe,n,"other")),this.instanceScope=new fi(this,n),this.instanceScope.variables.set("this",new Ci(n))}findLexicalBoundary(){return this}}class Da extends Fn{createScope(e){this.scope=new Ra(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,me,e);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=new Array(e.body.length);let n=0;for(const s of e.body)t[n++]=new(this.scope.context.getNodeConstructor(s.type))(this,s.static?this.scope:this.scope.instanceScope).parseNode(s);return super.parseNode(e)}}Da.prototype.includeNode=jn,Da.prototype.applyDeoptimizations=Un;class Oa extends Ai{render(e,t,{renderedSurroundingElement:n}=se){super.render(e,t),n===We&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function _a(e){return"symbol"==typeof e?e!==Oe&&(e===De||Re):!!e}class La extends _e{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new La(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0])),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}class Ma extends Fn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ke(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ce(this.flags,65536,e)}get hasDeoptimizedCache(){return ke(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ce(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(me),this.included&&e.includePath(me,Ie());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=re;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,n){const s=this.getUsedBranch();if(!s){if(this.hasDeoptimizedCache)return Re;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=_a(s);if(i===Re)return Re;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==_a(r)?Re:(this.expressionsToBeDeoptimized.push(n),s!==r?i?De:Oe:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new La([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[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,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=se){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=W(e.original,":",this.consequent.end),l=K(e.original,(this.consequent.included?W(e.original,"?",this.test.end):a)+1);s&&Q(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=_a(this.test.getLiteralValueAtPath(fe,xe,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}Ma.prototype.includeNode=jn,Ma.prototype.applyDeoptimizations=Un;class Ta extends Fn{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,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}Ta.prototype.includeNode=jn,Ta.prototype.applyDeoptimizations=Un;class Ba extends Fn{hasEffects(){return!0}}Ba.prototype.includeNode=Vn;class za extends Fn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(fe,je,e)}}function Fa(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,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=s,e.hasContinue=i,e.brokenFlow=n,!1)}function Va(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}za.prototype.includeNode=Vn;class ja extends Fn{hasEffects(e){return!!this.test.hasEffects(e)||Fa(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Va(e,this.body,t)}}ja.prototype.includeNode=jn,ja.prototype.applyDeoptimizations=Un;class Ua extends Fn{hasEffects(){return!1}}Ua.prototype.includeNode=Vn;class Ga extends Fn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}Ga.prototype.needsBoundaries=!0,Ga.prototype.includeNode=jn,Ga.prototype.applyDeoptimizations=Un;class Ha extends Fn{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Si){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}Ha.prototype.needsBoundaries=!0,Ha.prototype.includeNode=jn,Ha.prototype.applyDeoptimizations=Un;class Wa extends Fn{}Wa.prototype.includeNode=jn,Wa.prototype.applyDeoptimizations=Un;class qa extends Fn{createScope(e){this.scope=new bi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Fa(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Va(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){super.initialise(),this.left.setAssignedValue(Le)}render(e,t){this.left.render(e,t,H),this.right.render(e,t,H),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(fe),this.scope.context.requestTreeshakingPass()}}class Ka extends Fn{get await(){return ke(this.flags,131072)}set await(e){this.flags=Ce(this.flags,131072,e)}createScope(e){this.scope=new bi(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Va(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(me,e)}initialise(){super.initialise(),this.left.setAssignedValue(Le)}render(e,t){this.left.render(e,t,H),this.right.render(e,t,H),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(fe),this.right.deoptimizePath(me),this.scope.context.requestTreeshakingPass()}}class Xa extends Fn{createScope(e){this.scope=new bi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Fa(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),Va(e,this.body,t)}render(e,t){this.init?.render(e,t,H),this.test?.render(e,t,H),this.update?.render(e,t,H),this.body.render(e,t)}}Xa.prototype.includeNode=jn,Xa.prototype.applyDeoptimizations=Un;class Ja extends Vi{createScope(e){super.createScope(this.idScope=new fi(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new ui(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===Ge&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=se){super.render(e,t),n===We&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Ya extends bi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Za=Symbol("unset");class Qa extends Fn{constructor(){super(...arguments),this.testValue=Za}deoptimizeCache(){this.testValue=Re}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 n=e.brokenFlow;return e.brokenFlow=t,null===this.alternate?!1:!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!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){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new Ya(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new Ya(this.scope)).parseNode(e.alternate)),super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.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(i,e,n)}getTestValue(){return this.testValue===Za?this.testValue=_a(this.test.getLiteralValueAtPath(fe,xe,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 n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map(e=>{const t=e.variable;return t.included?t.getName(n):""}))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==Ke&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Qa&&e.alternate)return!0;if(e instanceof Ti)return!1;e=e.parent}while(e);return!1}}Qa.prototype.includeNode=jn,Qa.prototype.applyDeoptimizations=Un;class el extends Fn{}class tl extends Fn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}tl.prototype.needsBoundaries=!0,tl.prototype.includeNode=jn,tl.prototype.applyDeoptimizations=Un;class nl extends Fn{}function sl(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}nl.prototype.includeNode=jn,nl.prototype.applyDeoptimizations=Un;class il extends Fn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,fe,this.init||Yn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,fe,this.init||Yn)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,fe,s||Yn)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included||this.isUsingDeclaration;if(c)o.render(e,t);else{const t=W(e.original,"=",o.end);e.remove(l,K(e.original,t+1))}if(a){if(o instanceof ui&&a instanceof Oa&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?se:{renderedSurroundingElement:We})}else o instanceof ui&&sl(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(){this.included=!0;const{id:e,init:t}=this;if(t&&e instanceof ui&&t instanceof Oa&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}function rl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}il.prototype.applyDeoptimizations=Un;class ol extends Fn{constructor(){super(...arguments),this.inlineNamespace=null,this.hasUnknownAccessedKey=!1,this.accessedPropKey=new Set,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return ke(this.flags,536870912)}set shouldIncludeDynamicAttributes(e){this.flags=Ce(this.flags,536870912,e)}get withinTopLevelAwait(){return ke(this.flags,134217728)}set withinTopLevelAwait(e){this.flags=Ce(this.flags,134217728,e)}bind(){this.source.bind(),this.options?.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof Mi)return re;if(e instanceof Ea){const t=e.parent;if(t instanceof Mi)return re;if(t instanceof il){const e=t.id;if(e instanceof ui)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(e instanceof ga)return cl(e)}if(t instanceof wr){const e=t.property;if(!t.computed&&e instanceof ui)return[e.name]}return}if(e instanceof wr){const t=e.parent,n=e.property;if(!(t instanceof Na&&n instanceof ui))return;const s=n.name;if(t.parent instanceof Mi&&["catch","finally"].includes(s))return re;if("then"!==s)return;if(0===t.arguments.length)return re;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof ma||i instanceof Ja))return;if(0===i.params.length)return re;const r=i.params[0];return 1===i.params.length&&r instanceof ga?cl(r):this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey]}}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t)}includeNode(e){this.included=!0,this.shouldIncludeDynamicAttributes&&this.options?.includePath(me,e),this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)}includePath(e,t){this.included||this.includeNode(t),this.hasUnknownAccessedKey||(e[0]===ue?this.hasUnknownAccessedKey=!0:"string"==typeof e[0]&&this.accessedPropKey.add(e[0]),this.scope.context.includeDynamicImport(this))}initialise(){super.initialise(),this.scope.context.addDynamicImport(this);let e=this.parent,t=!1,n=!1;do{t&&(e instanceof Vi||e instanceof ma)&&(n=!1),e instanceof Ea&&(t=!0,n=!0)}while(e=e.parent);t&&n&&(this.withinTopLevelAwait=!0)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,W(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,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c,u){const{format:d}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const h=[...ll[d]||[]];let p;({helper:p,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i,c,u)),p&&h.push(p),h.length>0&&this.scope.addAccessedGlobals(h,r)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},u,d,h){const p=u.hookFirstSync("renderDynamicImport",[{chunk:rl(d),customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,getTargetChunkImports(){if(null===h)return null;const e=[],t=d.getFileName();for(const n of h.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof qr?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleId:this.scope.context.module.id,targetChunk:h?rl(h):null,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(p)return{helper:null,mechanism:p};const f=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof kn))return{helper:null,mechanism:null};const n=al(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[u,d]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${u}${i}`,a+=`${d})`,!r&&f&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",u=al(e,t,o),[d,h]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=u?`${d}${s}(/*#__PURE__*/${u}(m))${h}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${p},${a}${i})${g})`;return!r&&f&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:u,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function al(e,t,n){return"external"===t?ir[n(e instanceof kn?e.id:null)]:"default"===t?Qi:null}ol.prototype.applyDeoptimizations=Un;const ll={amd:["require"],cjs:["require"],system:["module"]};function cl(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class ul extends Fn{}ul.prototype.includeNode=jn,ul.prototype.applyDeoptimizations=Un;class dl extends Fn{}dl.prototype.includeNode=jn,dl.prototype.applyDeoptimizations=Un;class hl extends ai{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class pl extends Fn{render(e,t,{jsxMode:n}=se){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof hl?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=In(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Sr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}pl.prototype.includeNode=Vn;class fl extends Fn{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}fl.prototype.includeNode=Vn;class ml extends fl{}class gl extends fl{}class yl extends Fn{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class bl extends Fn{}bl.prototype.includeNode=Vn;class El extends Fn{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(me,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const xl=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Al=/[ \t]*\r?\n[ \t\r\n]*/g;class Sl extends Fn{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(xl,"").replace(Al," ")),this.renderedText}}function $l(e){let t=0;for(const n of e)n instanceof El&&n.expression instanceof bl||n instanceof Sl&&!n.shouldRender()||t++;return t}function vl(e,t,n,s,i){const[r,o]=e.split(".");let a;if(n){if(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t){s.scope.findGlobal(r).includePath(me,i),a.globalName=r}}else a=s.scope.findGlobal(r);return s.scope.context.includeVariableInModule(a,me,i),a instanceof ri&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Sl.prototype.includeNode=Vn;class Pl extends Fn{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=vl(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:$l(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof El&&n.expression instanceof bl||n instanceof Sl&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}Pl.prototype.applyDeoptimizations=Un;class wl extends Pl{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof yl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);if(m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]")),this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",y),p){const{value:t}=p;e.appendLeft(y,", "),t?e.move(t.start,t.end,y):e.appendLeft(y,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof pl){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g||(g=t)}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof yl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class Il extends Pl{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class Nl extends Fn{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}}class kl extends Fn{}kl.prototype.includeNode=Vn;class Cl extends Fn{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}Cl.prototype.includeNode=Vn;class Rl extends Fn{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=vl("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=vl(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}}class Dl extends Fn{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}}class Ol extends Fn{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included||this.includeNode(e);const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(e,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(me,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,K(e.original,W(e.original,":",this.label.end)+1)),this.body.render(e,t)}}Ol.prototype.applyDeoptimizations=Un;class _l extends Fn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return ke(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ce(this.flags,65536,e)}get hasDeoptimizedCache(){return ke(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ce(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(me),this.included&&e.includePath(me,Ie())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=re;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return Re;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=_a(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),Oe;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),De}}return Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new La([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||!n||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=se){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=W(e.original,this.operator,this.left.end);if(this.right.included){const t=K(e.original,o+2);e.remove(this.start,t),s&&Q(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!X.test(e[n-1]))return n;n--}}(e.original,this.left.end,o),this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(fe,xe,this),t=_a(e);if("symbol"==typeof t)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}_l.prototype.includeNode=jn,_l.prototype.applyDeoptimizations=Un;class Ll extends Fn{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(fe,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArguments(this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(me,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),wa(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}}class Ml extends Fn{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(me,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}render(e,t,{renderedSurroundingElement:n}=se){if(n!==We&&n!==Ue||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=Z(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):G(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Ss;const t=[];for(const n of this.properties){if(n instanceof Ms){t.push({key:ue,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(fe,xe,this);if("symbol"==typeof e){t.push({key:ue,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof ui?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Sr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Es(t,e)}}Ml.prototype.applyDeoptimizations=Un;class Tl extends Fn{initialise(){const e=this.scope.context.module.id;return Pt(un(wt(an(this.message)),e))}}class Bl extends Fn{initialise(){const e=this.start,t=this.scope.context.module.id,n=un(wt(an(this.message,e)),t);this.scope.context.error(n,e)}}class zl extends Fn{}zl.prototype.includeNode=Vn;class Fl extends Fn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Ne()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(st,Wt(e,s.id,Ye(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(nt,Jt(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=J(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}Y(this.body,e,n,this.end,t)}else super.render(e,t)}}Fl.prototype.includeNode=jn,Fl.prototype.applyDeoptimizations=Un;class Vl extends gi{get method(){return ke(this.flags,262144)}set method(e){this.flags=Ce(this.flags,262144,e)}get shorthand(){return ke(this.flags,524288)}set shorthand(e){this.flags=Ce(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(Ne()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===ue?e:this.computed?[...e,ue]:this.key instanceof ui?[...e,this.key.name]:[...e,String(this.key.value)]}}Vl.prototype.includeNode=jn,Vl.prototype.applyDeoptimizations=Un;class jl extends Fn{get computed(){return ke(this.flags,1024)}set computed(e){this.flags=Ce(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):Re}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Me}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||mi(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(me,e);for(const t of this.decorators)t.includePath(me,e)}}jl.prototype.applyDeoptimizations=Un;class Ul extends Fn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(me,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Le)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}Ul.prototype.applyDeoptimizations=Un;class Gl extends Fn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof Mi)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=se){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of Z(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&Q(e,u,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else G(l,e,u,d);o&&e.remove(o,this.end)}}Gl.prototype.includeNode=jn,Gl.prototype.applyDeoptimizations=Un;class Hl extends Fn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,fe,e)}}class Wl extends Fn{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 n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:W(e.original,"default",this.start)+7,i=W(e.original,":",s)+1;Y(this.consequent,e,i,n.end,t)}}}Wl.prototype.needsBoundaries=!0,Wl.prototype.includeNode=jn,Wl.prototype.applyDeoptimizations=Un;class ql extends Fn{createScope(e){this.parentScope=e,this.scope=new bi(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=Ne();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){super.initialise();for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}parseNode(e){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&Y(this.cases,e,this.cases[0].start,this.end-1,t)}}ql.prototype.includeNode=jn,ql.prototype.applyDeoptimizations=Un;class Kl extends Ia{get hasCheckedForWarnings(){return ke(this.flags,268435456)}set hasCheckedForWarnings(e){this.flags=Ce(this.flags,268435456,e)}bind(){super.bind()}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(fe,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArguments(this.interaction,e))}initialise(){super.initialise(),this.args=[Le,...this.quasi.expressions],this.interaction={args:[this.tag instanceof wr&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===qe){this.hasCheckedForWarnings=!0;const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(nt,jt(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,fe,xe),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=xe){return null===this.returnExpression?(this.returnExpression=Me,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(fe,this.interaction,e,this)):this.returnExpression}}Kl.prototype.includeNode=Vn;class Xl extends Fn{get tail(){return ke(this.flags,1048576)}set tail(e){this.flags=Ce(this.flags,1048576,e)}bind(){}hasEffects(){return!1}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}Xl.prototype.includeNode=Vn;class Jl extends Fn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Re:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Me:hs(us,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||ds(us,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(me,e)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Yl extends fi{constructor(e,t){super(e,t),this.variables.set("this",new ri("this",null,Yn,fe,t,"other"))}addDeclaration(e,t,n,s,i){return this.context.module.importDescriptions.has(e.name)&&t.error(ln(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t,n){const s=new Gr(e,t,n);return this.variables.set("default",s),s}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof si&&this.accessedOutsideVariables.set(e,n),n}}class Zl extends Fn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,fe,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof Li&&e.thisVariable===t);){if(!(e instanceof fi))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Vl&&n.functionNode.parent.parent instanceof Ml&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Yl?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(nt,{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:ht("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}}class Ql extends Fn{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(me,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class ec extends Fn{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?Bn:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}}ec.prototype.includeNode=jn,ec.prototype.applyDeoptimizations=Un;const tc={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Re,typeof:e=>typeof e,void:()=>{},"~":e=>~e},nc=Symbol("Unassigned");class sc extends Fn{constructor(){super(...arguments),this.renderedLiteralValue=nc}get prefix(){return ke(this.flags,2097152)}set prefix(e){this.flags=Ce(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Re}getLiteralValueAtPath(e,t,n){if(e.length>0)return Re;const s=this.argument.getLiteralValueAtPath(fe,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===Oe)return!0;if(s===De)return!1}return Re}return tc[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof ui)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(fe,Ve,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(fe),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==nc?this.renderedLiteralValue:this.renderedLiteralValue=e?Re:Aa(this.getLiteralValueAtPath(fe,xe,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof ui&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Re)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;ic.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const ic=/[\s([=%&*+-/<>^|,?:;]/;sc.prototype.includeNode=Vn;class rc extends Fn{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.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Le)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?te(s,this.start,this.end,e,t):ne(s,this.start,this.end,this.parent.type!==We,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${ee([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==We,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(fe),this.argument instanceof ui){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}rc.prototype.includeNode=Vn;class oc extends Fn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(fe)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=se){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof ga||i instanceof pa)&&r.include(e,t)}}initialise(){super.initialise(),this.isUsingDeclaration="await using"===this.kind||"using"===this.kind;for(const e of this.declarations)e.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=se){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===qe){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,t.exportNamesByVariable)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${ee(r,o)};`)}renderReplacedDeclarations(e,t){const n=Z(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=K(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof ui&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof ui&&sl(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=W(e.original,"=",d.id.end);te(h,K(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else G(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}}oc.prototype.includeNode=jn,oc.prototype.applyDeoptimizations=Un;class ac extends Fn{hasEffects(e){return!!this.test.hasEffects(e)||Fa(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Va(e,this.body,t)}}ac.prototype.includeNode=jn,ac.prototype.applyDeoptimizations=Un;class lc extends Fn{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(me)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(me,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const cc=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"],uc=[Tl,Bl,Ts,pa,ma,ya,ba,Ea,va,Ti,Pa,Na,ka,Ca,Da,Si,Oa,Ma,Ta,Ba,za,Mi,ja,Ua,Ga,Ui,Ha,Wa,Mi,qa,Ka,Xa,ji,Ja,ui,Qa,el,tl,nl,ol,ul,dl,pl,ml,gl,wl,bl,El,Il,hl,Nl,kl,Cl,Rl,yl,Dl,Sl,Ol,Sr,Sr,Sr,Sr,Sr,Sr,_l,wr,Rr,yi,Ll,Ml,ga,zl,Fl,Vl,jl,Bi,Ul,Gl,Ms,Ei,Hl,Wl,ql,Kl,Xl,Jl,Zl,Ql,ec,sc,rc,oc,il,ac,lc],dc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=pc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=pc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=pc(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",fe,Le)),o[o.length-1]instanceof Bi),e.body=hc(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=hc(e,s,n[t+1],n),e.right=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=hc(e,s,n[t],n),e.right=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=hc(e,s,n[t+1],n),e.right=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=pc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Ln(n[t+1],n),e.callee=hc(e,s,n[t+2],n),e.arguments=pc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:hc(e,s,i,n);r?.declare("parameter",fe,Le),e.body=hc(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=hc(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=pc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:hc(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:hc(e,s,r,n),e.body=hc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=pc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:hc(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:hc(e,s,r,n),e.body=hc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=hc(e,s,n[t],n),e.consequent=hc(e,s,n[t+1],n),e.alternate=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:hc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=hc(e,s,n[t],n),e.test=hc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:hc(e,s,i,n),e.source=hc(e,s,n[t+1],n),e.attributes=pc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=pc(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:hc(e,s,i,n),e.attributes=pc(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:hc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=hc(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=hc(e,s,n[t],n),e.right=hc(e,s,n[t+1],n),e.body=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=hc(e,s,n[t+1],n),e.right=hc(e,s,n[t+2],n),e.body=hc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:hc(e,s,i,n);const r=n[t+1];e.test=0===r?null:hc(e,s,r,n);const o=n[t+2];e.update=0===o?null:hc(e,s,o,n),e.body=hc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:hc(e,s.parent,o,n);const a=e.params=pc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",fe,Le)),a[a.length-1]instanceof Bi),e.body=hc(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Ln(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:hc(e,e.idScope,o,n);const a=e.params=pc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",fe,Le)),a[a.length-1]instanceof Bi),e.body=hc(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=hc(e,s,n[t],n),e.consequent=hc(e,e.consequentScope=new Ya(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:hc(e,e.alternateScope=new Ya(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=hc(e,s,n[t],n),e.value=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=pc(e,s,n[t],n),e.source=hc(e,s,n[t+1],n),e.attributes=pc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=hc(e,s,n[t],n),e.sourceAstNode=ua(n[t],n);const i=n[t+1];e.options=0===i?null:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=hc(e,s,n[t+1],n),e.imported=0===i?e.local:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=hc(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=hc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=hc(e,s,n[t],n),e.children=pc(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:hc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=hc(e,s,n[t],n),e.children=pc(e,s,n[t+1],n),e.closingFragment=hc(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=hc(e,s,n[t],n),e.property=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=hc(e,s,n[t],n),e.name=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=hc(e,s,n[t+1],n),e.attributes=pc(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=hc(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=hc(e,s,n[t],n),e.body=hc(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=new DataView(n.buffer).getFloat64(t+1<<2,!0)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.left=hc(e,s,n[t+1],n),e.right=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=hc(e,s,n[t+1],n),e.property=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=hc(e,s,n[t],n),e.property=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=pc(e,s,n[t+1],n),e.key=hc(e,s,n[t+2],n),e.value=hc(e,s,n[t+3],n),e.kind=Dn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Ln(n[t],n),e.callee=hc(e,s,n[t+1],n),e.arguments=pc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=pc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=pc(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=pc(e,s,n[t],n),e.invalidAnnotations=Ln(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=hc(e,s,n[t+2],n),e.kind=Dn[n[t+3]],e.key=0===r?e.value:hc(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=pc(e,s,n[t+1],n),e.key=hc(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:hc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=pc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=pc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:hc(e,s,i,n),e.consequent=pc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=hc(e,e.parentScope,n[t],n),e.cases=pc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=hc(e,s,n[t],n),e.quasi=hc(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?void 0:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=pc(e,s,n[t],n),e.expressions=pc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=hc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=hc(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:hc(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:hc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Dn[n[t]],e.argument=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Dn[n[t+1]],e.argument=hc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Dn[n[t]],e.declarations=pc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=hc(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:hc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=hc(e,s,n[t],n),e.body=hc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:hc(e,s,r,n)}];function hc(e,t,n,s){const i=s[n],r=uc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=cc[i],o.start=s[n+1],o.end=s[n+2],dc[i](o,n+3,s),o.initialise(),o}function pc(e,t,n,s){if(0===n)return re;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?hc(e,t,i,s):null}return r}const fc={ArrayExpression:Ts,ArrayPattern:pa,ArrowFunctionExpression:ma,AssignmentExpression:ya,AssignmentPattern:ba,AwaitExpression:Ea,BinaryExpression:va,BlockStatement:Ti,BreakStatement:Pa,CallExpression:Na,CatchClause:ka,ChainExpression:Ca,ClassBody:Da,ClassDeclaration:Si,ClassExpression:Oa,ConditionalExpression:Ma,ContinueStatement:Ta,DebuggerStatement:Ba,Decorator:za,DoWhileStatement:ja,EmptyStatement:Ua,ExportAllDeclaration:Ga,ExportDefaultDeclaration:Ui,ExportNamedDeclaration:Ha,ExportSpecifier:Wa,ExpressionStatement:Mi,ForInStatement:qa,ForOfStatement:Ka,ForStatement:Xa,FunctionDeclaration:ji,FunctionExpression:Ja,Identifier:ui,IfStatement:Qa,ImportAttribute:el,ImportDeclaration:tl,ImportDefaultSpecifier:nl,ImportExpression:ol,ImportNamespaceSpecifier:ul,ImportSpecifier:dl,JSXAttribute:pl,JSXClosingElement:ml,JSXClosingFragment:gl,JSXElement:wl,JSXEmptyExpression:bl,JSXExpressionContainer:El,JSXFragment:Il,JSXIdentifier:hl,JSXMemberExpression:Nl,JSXNamespacedName:kl,JSXOpeningElement:Cl,JSXOpeningFragment:Rl,JSXSpreadAttribute:yl,JSXSpreadChild:Dl,JSXText:Sl,LabeledStatement:Ol,Literal:Sr,LogicalExpression:_l,MemberExpression:wr,MetaProperty:Rr,MethodDefinition:yi,NewExpression:Ll,ObjectExpression:Ml,ObjectPattern:ga,PanicError:Tl,ParseError:Bl,PrivateIdentifier:zl,Program:Fl,Property:Vl,PropertyDefinition:jl,RestElement:Bi,ReturnStatement:Ul,SequenceExpression:Gl,SpreadElement:Ms,StaticBlock:Ei,Super:Hl,SwitchCase:Wl,SwitchStatement:ql,TaggedTemplateExpression:Kl,TemplateElement:Xl,TemplateLiteral:Jl,ThisExpression:Zl,ThrowStatement:Ql,TryStatement:ec,UnaryExpression:sc,UnknownNode:class extends Fn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:rc,VariableDeclaration:oc,VariableDeclarator:il,WhileStatement:ac,YieldExpression:lc};class mc extends bn{constructor(e){super(co),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var gc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(gc||(gc={}));const yc=new WeakMap;function bc(e,t){if(e){const t=yc.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=f(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||bc(e)}function Ec(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?function(e){const{length:t}=e,n=new d(e),s=[];let i=0,r=0,a=0,c=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,p=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<p&&(d=!1),p=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(u=o(n,u),s=[i,r,a,c,u]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}d||h(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return yc.set(i,s),i}function xc(e){return e.id}const Ac=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=ua(0,e);switch(t.type){case"PanicError":return Pt(wt(an(t.message)));case"ParseError":return Pt(wt(an(t.message,t.start)));default:return t}}(ha(oa(e,t,n))),Sc=new Set(["assert","with"]);function $c(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Ml))return n&&t.module.log(nt,en(t.module.id),s),ie;const i=n.properties.find(e=>Sc.has(vc(e)))?.value;if(!i)return ie;if(!(i instanceof Ml))return t.module.log(nt,(r=t.module.id,{code:Rt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${lt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ie;var r;const o=i.properties.map(e=>{const n=vc(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(nt,en(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):ie}const vc=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Pc(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var wc="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},Ic={memoryUsage:()=>({heapUsed:0})};let Nc=new Map;function kc(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function Cc(e,t=3){e=kc(e,t);const n=Ic.memoryUsage().heapUsed,s=wc.now(),i=Nc.get(e);void 0===i?Nc.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Rc(e,t=3){e=kc(e,t);const n=Nc.get(e);if(void 0!==n){const e=Ic.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=wc.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Dc(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Nc)e[t]=[s,n,i];return e}let Oc=Rn,_c=Rn;const Lc=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Mc(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Lc)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Oc(s,4);const t=r.apply(this,e);return _c(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}const Tc={identifier:null,localName:co};function Bc(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:Pt((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${lt(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function zc(e,t){const n=ae(t.sideEffectDependenciesByVariable,e,le);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof Gr?s.getDirectOriginalVariable():s instanceof Wr?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class Fc{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,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.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedDirectTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new mc(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=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,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 u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map(()=>"*")]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,xc).sort()},get implicitlyLoadedBefore(){return Array.from(f,xc).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:s,isExternal:!1,get isIncluded(){return e.phase!==gc.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=z(this.id),t=V(this.id);return vn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){xn(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Pt(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 kn)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,n=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&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof Wr?s=s.getBaseVariable():s instanceof Gr&&(s=s.getOriginalVariable()),e.add(s.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[n]=this.getVariableForExportName(t);if(n instanceof Gr&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof En))continue;const s=e.get(n);s?s.push(t):e.set(n,[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 kn)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.included?e:t).push(n)}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:Pt((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${lt(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:n,onlyExplicit:s,searchedNamesAndModules:i}=ie){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,n]=Bc(r.module,r.localName,t,!1,i);return e?(t&&(Vc(e,t,this),this.info.moduleSideEffects&&ae(t.sideEffectDependenciesByVariable,e,le).add(this)),[e]):this.error(sn(r.localName,this.id,r.module.id,!!n?.missingButExportExists),r.start)}const o=this.exports.get(e);if(o){if(o===Tc)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return n?(t&&(Vc(n,t,this),ae(t.sideEffectDependenciesByVariable,n,le).add(this)),[n]):[null,{missingButExportExists:!0}]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[ae(this.syntheticExports,e,()=>new Wr(this.astContext,e,this.getSyntheticNamespace()))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=Ie();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){if(e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces()),this.allExportsIncluded)return;this.allExportsIncluded=!0,this.isExecuted||(Cn(this),this.graph.needsTreeshakingPass=!0);const t=Ie();for(const n of this.exports.keys())if(e||n!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(n)[0];if(!e)return Pt(nn(n,this.id));this.includeVariable(e,me,t),e.deoptimizePath(me)}for(const e of this.getReexports()){const[n]=this.getVariableForExportName(e);n&&(n.deoptimizePath(me),this.includeVariable(n,me,t),n instanceof En&&(n.module.reexported=!0))}}includeAllInBundle(){this.ast.include(Ie(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(Cn(this),this.graph.needsTreeshakingPass=!0);let t=!1;const n=Ie();for(const s of e){const e=this.getVariableForExportName(s)[0];e&&(e.deoptimizePath(me),this.includeVariable(e,me,n)),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 n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof kn?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?Pt((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(Oc("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.originalCode=s,this.originalSourcemap=Ec(i),this.sourcemapChain=o.map(e=>e.missing?e:Ec(e)),bc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new N(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),addImportSource:this.addImportSource.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>fc[e]||fc.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,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Yl(this.graph.scope,this.astContext),this.namespace=new Hr(this.astContext);const d={context:this.astContext,type:"Module"};if(e)this.ast=new fc[e.type](d,this.scope).parseNode(e),this.info.ast=e;else{_c("generate ast",3);const e=await async function(e,t,n){return oa(e,t,n)}(t,!1,!1!==this.options.jsx);Oc("generate ast",3),this.ast=(h=e,p=d,f=this.scope,hc(p,f,0,ha(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(u,e),e)}}})}var h,p,f;_c("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,xc),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:n,searchedNamesAndModules:s}=ie){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Fc&&"*"===r.name)return e.namespace;const[i,o]=Bc(e,r.name,t||this,n,s);return i||this.error(sn(r.name,this.id,e.id,!!o?.missingButExportExists),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e&&Object.assign(this.info.meta,e)}addDynamicImport(e){let t=e.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}assertUniqueExportName(e,t){(this.exports.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof Ui)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Ga){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Sr?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Sr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Sr?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Sr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof oc)for(const e of t.declarations)for(const t of Vo(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof ui?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(ln(e),n.local.start);const s=n instanceof nl?"default":n instanceof ul?"*":n.imported instanceof ui?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributes.has(e)&&this.sourcesWithAttributes.set(e,ie)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Ye(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter(e=>!e.missing);e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter(e=>e.length>1),s=n[n.length-1];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(nt,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}It(e,{column:i,line:r},n,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,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof kn||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map(e=>[vc(e),e.value.value])):ie);var s;const i=this.sourcesWithAttributes.get(e);i?Pc(i,n)&&this.log(nt,Kt(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e);return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${lt(a)}" even though it is needed in "${lt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:ht(ft)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Bc(o,e,t,!0,jc(n));o instanceof kn||l?.indirectExternal?r.add(a):a instanceof Wr?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(nt,(o=e,a=this.id,l=t.map(([,e])=>e.id),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${lt(a)}" re-exports "${o}" from one of the modules ${ot(l.map(e=>lt(e)))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(nt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${lt(t)}" re-exports "${e}" from one of the external modules ${ot(s.map(e=>lt(e)))}, guessing "${lt(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{indirectExternal:!0}]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof kn){const[t]=n.getVariableForExportName("*");t.includePath(me,Ie()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(me,Ie()),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 Fc){t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),e.withinTopLevelAwait&&t.includedDirectTopLevelAwaitingDynamicImporters.add(this));const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof Fc&&i!==this&&zc(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof Fc&&(i.isExecuted||Cn(i),i!==this)){const t=zc(e,this);for(const e of t)e.isExecuted||Cn(e)}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(nt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${lt(t)}".`})),this.exports.set(e,Tc)}tryParse(){try{return Ac(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(un(e,this.id),e.pos)}}}function Vc(e,t,n){if(e.module instanceof Fc&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const jc=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),Uc=(e,t)=>t?`${e}\n${t}`:e,Gc=(e,t)=>t?`${e}\n\n${t}`:e;const Hc={amd:Kc,cjs:Kc,es:qc,iife:Kc,system:qc,umd:Kc};function Wc(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof Gr&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,hi(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,hi(t.name,e,t.forbiddenNames))}}}(s,f,p),Hc[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function qc(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof qr)&&(t.variableName=hi(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof kn)?n.setRenderNames(null,(t instanceof kn?a.get(t):o.get(t)).variableName):t instanceof kn&&"default"===s?n.setRenderNames(null,hi([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,hi(vn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,hi(t.name,e,t.forbiddenNames))}function Kc(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=hi(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=hi(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&rr(r(t.id),a)?t.namespaceVariableName:hi(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof kn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=nr[s]?n.defaultVariableName:n.variableName;sr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,ir[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Xc(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Pt(Qt("default",o,i))}else if("none"===t&&o.length>0)return Pt(Qt("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(nt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${lt(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:ht(yt)}}(i,n)),t="named")),t}function Jc(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}function Yc(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof kn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Yc(e,t,n,s,i,r)):t.push(o)}}const Zc="!~{",Qc="}~",eu=new RegExp(`${Zc}[0-9a-zA-Z_$]{1,16}${Qc}`,"g"),tu=(e,t)=>e.replace(eu,e=>t.get(e)||e),nu=(e,t,n)=>e.replace(eu,e=>e===t?n:e),su=Symbol("bundleKeys"),iu={type:"placeholder"};function ru(e,t,n){return ct(e)?Pt(mn(`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,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return Pt(mn(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return ct(r)?Pt(mn(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function ou(e,{[su]:t}){if(!t.has(e.toLowerCase()))return e;const n=V(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const au=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function lu(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(nt,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:ht("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class cu{constructor(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,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.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.allowExtensionModules=new Set,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&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.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=vn(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new cu([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof Fc?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 n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof Wr&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>tu(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map(([e,t])=>[r(e),t])),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName: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[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=di(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=di(s))}while(An.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Xc(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map(({namespace:e})=>e));for(const s of t){if("allow-extension"===s.preserveSignature){if(this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}}const t=Array.from(new Set(s.chunkNames.filter(({isUserDefined:e})=>e).map(({name:e})=>e)),e=>({name:e}));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,e=>({fileName:e}))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(cu.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=uu(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return qi(dt(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:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=z(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=ru("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=ou(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=iu),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=ru("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e||8)),name:()=>this.getChunkName()}),t||(e=ou(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(fu),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,fu),importedBindings:hu(this.getRenderedDependencies(),fu),imports:Array.from(this.dependencies,fu),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof Hr?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];Yc(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)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)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof cu&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o);let b=y.length>0,E=!1;for(const e of g){const{reexports:t}=e;t?.length&&(b=!0,!E&&t.some(e=>"default"===e.reexported)&&(E=!0),"es"===o&&(e.reexports=t.filter(({reexported:e})=>!y.find(({exported:t})=>t===e))))}if(!E)for(const{exported:e}of y)if("default"===e){E=!0;break}const{intro:x,outro:A,banner:S,footer:$}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Uc),t.hookReduceValue("footer",e.footer(n),[n],Uc),t.hookReduceValue("intro",e.intro(n),[n],Gc),t.hookReduceValue("outro",e.outro(n),[n],Gc)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return Pt((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(Eo[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:E,hasExports:b,id:l.fileName,indent:d,intro:x,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:A,snippets:r,usesTopLevelAwait:m},s),S&&h.prepend(S),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return $&&h.append($),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.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},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):uu(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof Fc){const s=this.chunkByModule.get(n);let i;do{if(i=t.alternativeReexportModules.get(e),i){this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(nt,Ht(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i}}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof Wr,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof Hr&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof Fc){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}}}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?uu(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof Wr)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find(({reexported:e})=>e===n),a=i?.find(({imported:e})=>e===o?.imported);if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof ri){for(const e of s.declarations)if(e.parent instanceof ji||e instanceof Ui&&e.declaration instanceof ji){r=!0;break}}else s instanceof Wr&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=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 kn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?nr[n(o.id)]&&i.add(a):t.isNamespace&&ir[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof cu||e instanceof qr))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof kn){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=$c(n);r=e===ie||Kr(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?at(this.fileName):at(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;if(s instanceof kn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Pt(pn(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);ae(t,i,ce).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof Fc?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof kn?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map(({id:e})=>e),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=du(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(B(e.id.split(pu,1)[0])),r=V(i),o=au.has(r)?i.slice(0,-r.length):i;return M(o)?n&&U(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"===this.inputBase&&"/"!==o[0]?j(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):j(this.inputBase,o):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+z(o)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(nt,fn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof Wr)continue;const a=n.module;if(a instanceof Fc){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Pt(pn(a.id,r,!0));o=e&&("default"!==r||sr(t(a.id),!0))}}ae(n,i,ce).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof qr||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof qr?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof qr&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&lu(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof cu,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof cu&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new C({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Jc(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let $="";const v=new Set,P=new Map,w={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let I=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(w);!w.accessedDocumentCurrentScript&&Dr.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(tr),w.accessedDocumentCurrentScript=!1,({source:n}=r),I||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),P.set(e,n),x.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(w);o.renderFirst()?$+=E+e:x.addSource(new N(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}$&&x.prepend($+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${co}${y}=${y}void 0;${E}${E}`);const k=h?x:x.trim();var R;return o&&0===this.getExportNames().length&&0===n.size&&r(nt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${R=this.getChunkName()}".`,names:[R]}),{accessedGlobals:v,indent:A,magicString:x,renderedSource:k,usedModules:S,usesTopLevelAwait:I}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=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,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",a,n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof Wr?r.add(n):n.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(co),t&&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 xr)o.add(e)}Wc(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof Gr&&(n=n.getOriginalVariable()),n instanceof Wr&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof Fc&&(this.checkCircularDependencyImport(n,e),n instanceof Hr&&this.outputOptions.preserveModules||t.exports.add(n)))}(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:n}of e.dynamicImports)t.included&&n instanceof Fc&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function uu(e){return du(e)??at(e.id)}function du(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function hu(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const pu=/[#?]/,fu=e=>e.getFileName();function*mu(e){for(const t of e)yield*t}function gu(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=new Set(e.keys()),n=Object.create(null);for(const[s,i]of e)yu(s,n[i]||=[],t);const s=Object.entries(n),i=new Array(s.length);let r=0;for(const[e,t]of s)i[r++]={alias:e,modules:t};return{chunkDefinitions:i,modulesInManualChunks:t}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c,dynamicallyDependentEntriesByAwaitedDynamicEntry:u,awaitedDynamicImportsByEntry:d}=function(e){const t=new Set,n=new Set,s=new Map,i=new Set(e),r=new Array(i.size),o=new Array(i.size);let a=0;for(const e of i){const l=new Set,c=new Set;r[a]=l,o[a]=c;const u=new Set([e]);for(const e of u){ae(s,e,le).add(a);for(const t of e.getDependenciesToBeIncluded())t instanceof kn||u.add(t);for(const{resolution:s}of e.dynamicImports)if(s instanceof Fc&&s.includedDynamicImporters.length>0&&!i.has(s)){t.add(s),i.add(s),l.add(s);for(const e of s.includedDirectTopLevelAwaitingDynamicImporters)if(u.has(e)){n.add(s),c.add(s);break}}for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}a++}const l=[...i],{awaitedDynamicEntries:c,awaitedDynamicImportsByEntry:u,dynamicEntries:d,dynamicImportsByEntry:h}=function(e,t,n,s,i){const r=new Map,o=new Set,a=new Set;for(const[n,i]of e.entries())r.set(i,n),t.has(i)&&o.add(n),s.has(i)&&a.add(n);const l=bu(n,r),c=bu(i,r);return{awaitedDynamicEntries:a,awaitedDynamicImportsByEntry:c,dynamicEntries:o,dynamicImportsByEntry:l}}(l,t,r,n,o);return{allEntries:l,awaitedDynamicImportsByEntry:u,dependentEntriesByModule:s,dynamicallyDependentEntriesByAwaitedDynamicEntry:Eu(s,c,l,e=>e.includedDirectTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:Eu(s,d,l,e=>e.includedDynamicImporters),dynamicImportsByEntry:h}}(e),h=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),p=function(e,t){const n=e.map(()=>0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,h),f=xu(p,l,c,o);!function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(h,f,xu(p,u,d,o));const{chunks:m,sideEffectAtoms:g,sizeByAtom:y}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=new Array(e.length);let a=0n,l=1n,c=0;for(const{dependentEntries:u,modules:d}of e){let e=0n,h=-1n;for(const s of u)e|=1n<<BigInt(s),h&=t[s]|n[s];const p=i[String(e)]||={containedAtoms:0n,correlatedAtoms:h,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(u),modules:[],pure:!0,size:0};let f=0,m=!0;for(const e of d)r.set(e,p),e.isIncluded()&&(m&&=!e.hasEffects(),f+=s>1?e.estimateSize():1);m||(a|=l),o[c++]=f,p.containedAtoms|=l,p.modules.push(...d),p.pure&&=m,p.size+=f,l<<=1n}const u=Object.values(i);return a|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof kn){if(o.info.moduleSideEffects){const e=ae(s,o,()=>{const e=n;return n<<=1n,i|=e,e});r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(u,r,l),{chunks:u,sideEffectAtoms:a,sizeByAtom:o}}(h,p,f,n);return i.push(...function(e,t,n,s,i){Oc("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(Au),s.sort(Au),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return _c("optimize chunks",3),e;t>1&&i("info",on(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Su(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),Pu(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),Pu(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",on(r.small.size+r.big.size,r.small.size,"After merging chunks"));return _c("optimize chunks",3),[...r.small,...r.big]}(m,n,g,y,s).map(({modules:e})=>({alias:null,modules:e}))),i}function yu(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof kn||n.has(t)||s.add(t)}}function bu(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function Eu(e,t,n,s){const i=new Map;for(const r of t){const t=ae(i,r,le),o=n[r];for(const n of mu([s(o),o.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return i}function xu(e,t,n,s){const i=s.map((e,n)=>t.has(n)?-1n:0n);for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])ae(t,e,le).add(s)}}return i}function Au({size:e},{size:t}){return e-t}function Su(e,{big:t,small:n},s,i,r){let o=null;for(const a of mu([n,t])){if(e===a)continue;const t=$u(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function $u(e,t,n,s,i){const r=vu(e,t,n,s,i);return r<n?r+vu(t,e,n-r,s,i):1/0}function vu(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function Pu(e,t,n){return e.size<t?n.small:n.big}const wu=(e,t)=>e.execIndex>t.execIndex?1:-1;function Iu(e){e.sort(wu)}function Nu(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;e.cycles.add(s);for(;r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof Fc){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t,node:n}of e.dynamicImports)t instanceof Fc&&(n.withinTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const ku=(e,t)=>t?`(${e})`:e;class Cu{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class Ru{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=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:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Pt(hn(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0;let r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r){o=s[s[i][0]>t?Math.max(0,i-1):i]}if(o[0]===t||i===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]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function Du(e){return function(t,n){return n.missing?(e(nt,(s=n.plugin,{code:Tt,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:ht("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Ru({mappings:[],names:[]},[t])):new Ru(n,[t]);var s}}function Ou(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=F(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new Cu(U(i,o,e),s[t]));r=new Ru(n,a)}else r=new Cu(e,t);return s.reduce(i,r)}let _u;const Lu=e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase64Url(r,Yo(e));var s=ia().getInt32(r+0,!0),i=ia().getInt32(r+4,!0);return t=s,n=i,qo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Tu(e)),Mu={base36:e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase36(r,Yo(e));var s=ia().getInt32(r+0,!0),i=ia().getInt32(r+4,!0);return t=s,n=i,qo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Tu(e)),base64:Lu,hex:e=>function(e){let t,n;try{const r=jo.__wbindgen_add_to_stack_pointer(-16);jo.xxhashBase16(r,Yo(e));var s=ia().getInt32(r+0,!0),i=ia().getInt32(r+4,!0);return t=s,n=i,qo(s,i)}finally{jo.__wbindgen_add_to_stack_pointer(16),jo.__wbindgen_export_0(t,n,1)}}(Tu(e))};function Tu(e){return"string"==typeof e?"undefined"==typeof Buffer?(_u??=new TextEncoder,_u.encode(e)):Buffer.from(e):e}let Bu="sourceMa";async function zu(e,t,n,s,i){Oc("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()));_c("render chunks",2),Oc("transform chunks",2);const o=Mu[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,u=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&u.add(t);return await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:d,sourcemapFileName:p?.fileName??null,...await Fu(f,d,m,t,n,s,r)},{code:y,map:b}=g;if(h){const{containedPlaceholders:t,transformedCode:n}=((e,t)=>{const n=new Set,s=e.replace(eu,e=>t.has(e)?(n.add(e),`${Zc}${"0".repeat(e.length-5)}${Qc}`):e);return{containedPlaceholders:n,transformedCode:s}})(y,u);let r=n;const o=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>(t&&(e+=t),e));o&&(r+=o),a.set(h,g),l.set(h,{containedPlaceholders:t,contentHash:i(r)})}else o.push(g);const E=p?.hashPlaceholder;b&&E&&c.set(p.hashPlaceholder,i(b.toString()).slice(0,p.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:o,placeholders:u,renderedChunksByPlaceholder:a}}(r,a,s,n,o,i),p=function(e,t,n,s,i,r){const o=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let a="";const l=new Set([n]);for(const e of l){const{containedPlaceholders:n,contentHash:s}=t.get(e);a+=s;for(const e of n)l.add(e)}let c,u;do{u&&(a=u),u=r(a).slice(0,n.length),c=nu(s,n,u)}while(i[su].has(c.toLowerCase()));i[c]=iu,o.set(n,u)}return o}(h,l,c,d,t,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=tu(o,t);const u=tu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=ju(e,c)),d=l?tu(l,t):`${u}.map`,c.file=tu(c.file,t),e+=Vu(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?tu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=ju(s,c)),u=l?tu(l,t):`${a}.map`,s+=Vu(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),_c("transform chunks",2)}async function Fu(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],(e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Ec(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;Oc("sourcemaps",3),s=h?U(m||h):d?U(d,t):U(t);a=function(e,t,n,s,i,r){const o=Du(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Ou(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new Ru(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=F(e);u=u.map(e=>j(t,e)),e=z(e)}d=i?null:d;for(const e of n)bc(e.originalSourcemap,e.sourcemapChain);return new E({file:e,mappings:p,names:h,sources:u,sourcesContent:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Pt(mn("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),g&&(t=g(t,n),"string"!=typeof t&&Pt(mn("sourcemapPathTransform function must return a string."))),a.sources[e]=B(t)}_c("sourcemaps",3)}return{code:c,map:a}}function Vu(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=z(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# sourceMappingURL=${r}\n`}function ju(e,t){const n=Mu.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}Bu+="ppingURL";class Uu{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){Oc("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===su?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{Oc("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),_c("initialize render",2),Oc("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Pt(mn(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Zc}${di(++e).padStart(n-5,"0")}${Qc}`;return s.length>n?Pt(mn(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&function(e,t){if("umd"===e.format||"iife"===e.format)return Pt(tn("output.format",bt,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return Pt(tn("output.file",gt,'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 Pt(tn("output.sourcemapFile",$t,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(nt,tn("output.amd.id",mt,'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(),e.inlineTransitiveImports();_c("generate chunks",2),await zu(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),Oc("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),_c("generate bundle",2),_c("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=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:s}of n)for(const n of s)Gu(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof Fc){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort(([e],[t])=>e>t?1:e<t?-1:0);const s=new Map;for(const[e,n]of t)Gu(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Ac(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(nt,Ut(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,u=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>Pn.test(e):e=>!An.has(e)&&Pn.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${ku(`${r}${ku(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map(([e,t])=>{if(null===e)return`${n}${t}`;const i=In(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`}).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),l=function(e){const t=[];for(const n of e.values())n instanceof Fc&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return F(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&M(s.id)&&n.push(s.id);return n}(l,r)),u=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof kn&&s.set(i,new qr(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),d=s?[{alias:null,modules:l}]:r?l.map(e=>({alias:null,modules:[e]})):gu(this.graph.entryModules,o,n,this.inputOptions.onLog),h=new Array(d.length),p=new Map;let f=0;for(const{alias:n,modules:s}of d){Iu(s);const i=new cu(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,p,u,this.facadeChunkByModule,this.includedNamespaces,n,t,e,c,a);h[f++]=i}for(const e of h)e.link();const m=[];for(const e of h)m.push(...e.generateFacades());return[...h,...m]}}function Gu(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Pt((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${lt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class Hu extends pi{constructor(){super(),this.parent=null,this.variables.set("undefined",new Ur)}findVariable(e){let t=this.variables.get(e);return t||(t=new si(e),this.variables.set(e,t)),t}}async function Wu(e,t,n,s,i,r,o,a,l,c){const u=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=se)=>(l??=!0,l&&-1!==i.findIndex(s=>s.plugin===t&&s.source===e&&s.importer===n)?Promise.resolve(null):s(e,n,o,a,r||ie,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);if(null!=u){const[e,t]=u;return"object"!=typeof e||e.resolvedBy?"string"==typeof e?{id:e,resolvedBy:t.name}:e:{...e,resolvedBy:t.name}}return void 0===t||M(e)||"."===e[0]?async function(e,t,n){return await qu(e,t,n)??await qu(e+".mjs",t,n)??await qu(e+".js",t,n)}(t?U(F(t),e):U(e),n,c):null}async function qu(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await qu(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=z(e);if((await n.readdir(F(e))).includes(t))return e}}catch{}}function Ku(e){return 65279===e.charCodeAt(0)?Ku(e.slice(1)):e}const Xu="at position ",Ju="at output position ";const Yu={delete:()=>!1,get(){},has:()=>!1,set(){}};function Zu(e){return e.startsWith(Xu)||e.startsWith(Ju)?Pt({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Pt({code:"DUPLICATE_PLUGIN_NAME",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 Qu=(e,t,n=sd)=>{const{onwarn:s,onLog:i}=e,r=ed(n,s);if(i){const e=rt[t];return(t,n)=>i(t,td(n),(t,n)=>{if("error"===t)return Pt(nd(n));rt[t]>=e&&r(t,nd(n))})}return r},ed=(e,t)=>t?(n,s)=>{n===nt?t(td(s),t=>e(nt,nd(t))):e(n,s)}:e,td=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),nd=e=>"string"==typeof e?{message:e}:"function"==typeof e?nd(e()):e,sd=(e,{message:t})=>{switch(e){case nt:return console.warn(t);case it:return console.debug(t);default:return console.info(t)}};function id(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter(e=>!(r.has(e)||i.test(e)));o.length>0&&s(nt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const rd={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:re,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:re,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:re,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},od={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},ad={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},ld=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Pt(tn(`${n}.preset`,s,`valid values are ${ot(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Pt(tn(t,n,`valid values are ${s}${ot(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},cd=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 ud(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:Ec(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=nd(t),n&&It(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i],function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s(nt,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(Ec("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&It(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:Ec({version:3,...Ou(e,t,n,s,Du(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new N(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new E({...e,file:null,sourcesContent:e.sourcesContent})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Pt(dn(e,p,{hook:"transform",id:i}))}return!d&&u.length>0&&(t.transformFiles=u),{ast:l,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const dd="resolveDependencies";class hd{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,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,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await Wu(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i,this.options.fs),t,e),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map(e=>this.loadEntryModule(e,!1,void 0,null,t))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null))).then(i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,fd(o,e[r],t,s+r);const i=this.indexedEntryModules.find(e=>e.module===o);i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort(({index:e},{index:t})=>e>t?1:-1),i}));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map(({module:e})=>e),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,ie),void 0,!1,!e.resolveDependencies||dd)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async s=>{if(fd(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map(t=>this.loadEntryModule(t,!1,e.importer,s.id)));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await this.options.fs.readFile(e,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${lt(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:Pt(function(e){return{code:"BAD_LOADER",message:`Error loading "${lt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=Ku(i.code);const r=this.graph.cachedModules.get(e);if(!r||r.customTransformCache||r.originalCode!==i.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}]))n.updateOptions(i),await n.setSource(await ud(i,n,this.pluginDriver,this.options.onLog));else{if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);await n.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 n=await Promise.all(t.map(t=>t.then(async([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(lt(n.id),e.id,n))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof Fc)return r&&Pc(e,l.info.attributes)&&this.options.onLog(nt,Kt(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof kn)return Pt({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 Fc(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then(()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d]),d=gd(u).then(()=>this.pluginDriver.hookParallel("moduleParsed",[c.info]));d.catch(()=>{}),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===dd&&await d:await this.fetchModuleDependencies(c,...h),c}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof kn))return Pt(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${lt(t)}", but is already an existing non-external module id.`}}(e,t));Pc(l.info.attributes,s)&&this.options.onLog(nt,Kt(l.info.attributes,s,e,t))}else l=new kn(this.options,r,o,a,"absolute"!==i&&M(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map(t=>t.then(([t,n])=>this.fetchResolvedDependency(t,e.id,n)))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof Fc&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!M(e.id)||!0===i&&md(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(md(e,n,s)||"absolute"),id:i&&s?pd(e,t):e}}const i=s?pd(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:md(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,$c(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id):t.node.shouldIncludeDynamicAttributes=!0,[t,n]})}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,ie,!1,n),t,e.id,n)])}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===dd?gd(s):s;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 s)}handleInvalidResolvedId(e,t,n,s){return null===e?T(t)?Pt(function(e,t){return{code:Ft,exporter:e,id:t,message:`Could not resolve "${e}" from "${lt(t)}"`}}(t,n)):(this.options.onLog(nt,function(e,t){return{code:Ft,exporter:e,id:t,message:`"${e}" is imported by "${lt(t)}", but could not be resolved – treating it as an external dependency.`,url:ht("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(nt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${lt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await Wu(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ie,!0,ie,this.options.fs);if(null==r)return Pt(null===s?function(e){return{code:zt,message:`Could not resolve entry module "${lt(e)}".`}}(e):function(e,t){return{code:_t,message:`Module "${lt(e)}" that should be implicitly loaded before "${lt(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?Pt(null===s?o&&i?{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(e){return{code:zt,message:`Entry module "${lt(e)}" cannot be external.`}}(e):function(e,t){return{code:_t,message:`Module "${lt(e)}" that should be implicitly loaded before "${lt(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},ie),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(Pc(i.attributes,s)&&this.options.onLog(nt,Kt(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,ie,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function pd(e,t){return T(e)?t?U(t,"..",e):U(e):e}function fd(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function md(e,t,n){return!0===n||"ifRelativeSource"===n&&T(t)||!M(e)}async function gd(e){const[t,n]=await e;return Promise.all([...t,...n])}function yd(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return ou(ru("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return gn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',vt,!1,l),e},names:t,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',vt,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>V(c).slice(1),extname:()=>V(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-V(c).length))}),a)}function bd(e,{bundle:t},n){t[su].has(e.toLowerCase())?n(nt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=iu}const Ed=new Set(["chunk","asset","prebuilt-chunk"]);function xd(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Pt(mn(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class Ad{constructor(e,t,n){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&&Ed.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!ct(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Pt(mn(`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}".`)):Pt(mn(`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 Pt(Vt(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Pt({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Pt({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):e.fileName}(t,e):Pt({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Pt({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Pt(mn(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Pt({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=xd(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=Mu[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&bd(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{ae(i,n(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=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=Lu(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some(({filesByReferenceId:e})=>e.has(n)));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}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,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:xd(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,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:n,source:s}=e;n&&bd(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>gc.LOAD_AND_PARSE)return Pt({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Pt(mn(`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 Pt(mn(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||ct(e.fileName))return Pt(mn(`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"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=yd(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return gn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',vt,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',vt,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=yd(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return gn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',vt,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return gn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',vt,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Sd(e,t,n,s,i){return rt[e]<rt[i]?Rn:(i,r)=>{null!=r&&n(nt,{code:"INVALID_LOG_POSITION",message:`Plugin "${s}" 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.`}),(i=nd(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function $d(t,n,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,u=!0;if("string"!=typeof t.cacheKey&&(t.name.startsWith(Xu)||t.name.startsWith(Ju)||o.has(t.name)?u=!1:o.add(t.name)),n)if(u){const e=t.cacheKey||t.name;h=n[e]||(n[e]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else d=t.name,c={delete:()=>Zu(d),get:()=>Zu(d),has:()=>Zu(d),set:()=>Zu(d)};else c=Yu;var d,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:Sd(it,"PLUGIN_LOG",l,t.name,a),emitFile:r.emitFile.bind(r),error:e=>Pt(dn(nd(e),t.name)),fs:i.fs,getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:Sd(st,"PLUGIN_LOG",l,t.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:e,watchMode:s.watchMode},parse:Ac,resolve:(e,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=se)=>(a??=!0,s.moduleLoader.resolveId(e,n,r,o,i||ie,a?[{importer:n,plugin:t,source:e}]:null)),setAssetSource:r.setAssetSource,warn:Sd(nt,"PLUGIN_WARNING",l,t.name,a)}}function vd(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function Pd(e){if(e instanceof RegExp)return t=>{const n=B(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||M(e)?B(e):B(U(t,e))}(e,t),s=zo(n,{dot:!0});return e=>{const t=B(e);return s(t)}}function wd(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function Id(e,t){if(e||t)return n=>!e?.some(e=>e(n))&&(!!t?.some(e=>e(n))||!(t&&t.length>0))}function Nd(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?vd(e.exclude):void 0,include:e.include?vd(e.include):void 0}}function kd(e){if(!e)return;const{exclude:t,include:n}=Nd(e),s=t?.map(Pd),i=n?.map(Pd);return Id(s,i)}function Cd(e,t){if(!e&&!t)return;const n=kd(e),s=function(e){if(!e)return;const{exclude:t,include:n}=Nd(e),s=t?.map(wd),i=n?.map(wd);return Id(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Rd=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 Dd{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new Ad(e,t,i&&i.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=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map(n=>[n,$d(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Rd)n in e&&t.onLog(nt,Yt(e.name,n))}createOutputPluginDriver(e){return new Dd(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then(e=>e&&e[0])}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then(r=>this.runHook(e,[r,...n],t,i).then(e=>s.call(this.pluginContexts.get(t),r,e,t)));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,Ld))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then(()=>this.runHook(e,t,i,n));return s.then(Md)}getSortedPlugins(e,t){return ae(this.sortedPlugins,e,()=>Od(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=ae(this.compiledPluginFilters.transformFilter,e,()=>Cd(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=ae(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=kd(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then(()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then(e=>(this.unfulfilledActions.delete(a),e))):s}).catch(t=>(null!==a&&this.unfulfilledActions.delete(a),Pt(dn(t,n.name,{hook:e}))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return Pt(dn(t,n.name,{hook:e}))}}}function Od(e,t,n=_d){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function _d(e,t,n){"function"!=typeof e&&Pt(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,n.name))}function Ld(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Pt(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,n.name))}function Md(){}class Td{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise((t,n)=>{this.queue.push({reject:n,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:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class Bd{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new Ee,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=gc.LOAD_AND_PARSE,this.scope=new Hu,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),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new Dd(this,e,e.plugins,this.pluginCache),this.moduleLoader=new hd(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Td(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[yn]=!0}return t})(e)}async build(){Oc("generate module graph",2),await this.generateModuleGraph(),_c("generate module graph",2),Oc("sort and bind modules",2),this.phase=gc.ANALYSE,this.sortModules(),_c("sort and bind modules",2),Oc("mark included statements",2),this.includeStatements(),_c("mark included statements",2),this.phase=gc.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&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.cacheInfoGetters(),e instanceof Fc?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Cn(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{Oc(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(Ie(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);_c("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()||Pt(rn(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=Nu(this.entryModules);for(const e of t)this.options.onLog(nt,Gt(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())if("*"!==t.name){const[n,s]=t.module.getVariableForExportName(t.name);n||e.log(nt,sn(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function zd(e,t){return t()}function Fd(t,n,s,i){t=Od("onLog",t);const r=rt[i],o=(i,a,l=oe)=>{kt(a);if(!(rt[i]<r)){for(const n of t){if(l.has(n))continue;const{onLog:t}=n,c=e=>rt[e]<r?Rn:t=>o(e,nd(t),new Set(l).add(n));if(!1===("handler"in t?t.handler:t).call({debug:c(it),error:e=>Pt(nd(e)),info:c(st),meta:{rollupVersion:e,watchMode:s},warn:c(nt)},i,a))return}n(i,a)}};return o}const Vd=e=>()=>Pt(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:ht("plugin-development/#a-simple-example")}}(e)),jd=Vd("fs.appendFile"),Ud=Vd("fs.copyFile"),Gd=Vd("fs.mkdir"),Hd=Vd("fs.mkdtemp"),Wd=Vd("fs.readdir"),qd=Vd("fs.readFile"),Kd=Vd("fs.realpath"),Xd=Vd("fs.rename"),Jd=Vd("fs.rmdir"),Yd=Vd("fs.stat"),Zd=Vd("fs.lstat"),Qd=Vd("fs.unlink"),eh=Vd("fs.writeFile");var th=Object.freeze({__proto__:null,appendFile:jd,copyFile:Ud,lstat:Zd,mkdir:Gd,mkdtemp:Hd,readFile:qd,readdir:Wd,realpath:Kd,rename:Xd,rmdir:Jd,stat:Yd,unlink:Qd,writeFile:eh});const nh=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,sh=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of vd(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},ih=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},rh=e=>{const t=e.jsx;if(!t)return!1;const n=ld(t,od,"jsx",ft,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Pt(tn("jsx",ft,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Pt(tn("jsx.mode",ft,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},oh=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},ah=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[U(t)]=s;return n=>e[n]??t}return()=>t},lh=e=>{if(!1===e.treeshake)return!1;const t=ld(e.treeshake,rd,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??re,moduleSideEffects:ch(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},ch=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Pt(tn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},uh=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,dh=/^[a-z]:/i;function hh(e){const t=dh.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(uh,"_")}const ph=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Pt(tn("output.file",gt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Pt(tn("output.file",gt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},fh=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 Pt(tn("output.format",bt,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},mh=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Pt(tn("output.inlineDynamicImports",Et,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},gh=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Pt(tn("output.inlineDynamicImports",Et,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Pt(tn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},yh=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return U(t)},bh=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Pt(tn("output.amd.id",mt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Pt(tn("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}},Eh=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},xh=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Pt(tn("output.dir",gt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Ah=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Sh(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Pt({code:Ct,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:ht(yt)});return n||"auto"}const $h=(e,t)=>(null!=e.externalImportAssertions&&gn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),vh=e=>{const t=ld(e.generatedCode,ad,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},Ph=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},wh=new Set(["compat","auto","esModule","default","defaultOnly"]),Ih=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Nh(n=t(s)):s in e?e[s]:Nh(e[s]=t(s))}return void 0===t?()=>"default":()=>Nh(t)},Nh=e=>wh.has(e)?e:Pt(tn("output.interop",xt,`use one of ${Array.from(wh,e=>JSON.stringify(e)).join(", ")}`,e)),kh=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Pt(tn("output.manualChunks",At,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Pt(tn("output.manualChunks",At,'this option is not supported for "output.preserveModules"'))}return s||{}},Ch=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Rh=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Dh=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":Pt(tn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function Oh(t){return async function(t,n){const{options:s,unsetOptions:i}=await async function(t,n){if(!t)throw new Error("You must supply an options object to rollup");const s=await async function(t,n){const s=Od("options",await cd(t.plugins)),i=t.logLevel||st,r=Fd(s,Qu(t,i),n,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:Sd(it,"PLUGIN_LOG",r,s,i),error:e=>Pt(dn(nd(e),s,{hook:"onLog"})),info:Sd(st,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:e,watchMode:n},warn:Sd(nt,"PLUGIN_WARNING",r,s,i)},t);c&&(t=c)}return t}(t,n),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await cd(e.plugins),r=e.logLevel||st,o=Fd(i,Qu(e,r),t,r),a=e.strictDeprecations||!1,l=oh(e),c={cache:nh(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:sh(e.external),fs:e.fs??th,input:ih(e),jsx:rh(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:ah(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:lh(e)};return id(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,n);return _h(i.plugins,Xu),{options:i,unsetOptions:r}}(t,null!==n);(function(e){e.perf?(Nc=new Map,Oc=Cc,_c=Rc,e.plugins=e.plugins.map(Mc)):(Oc=Rn,_c=Rn)})(s),await async function(){await la()}();const r=new Bd(s,n),o=!1!==t.cache;t.cache&&(s.cache=void 0,t.cache=void 0);Oc("BUILD",1),await zd(r.pluginDriver,async()=>{try{Oc("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),_c("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);t.length>0&&(e.watchFiles=t);try{await r.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=wt({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await r.pluginDriver.hookParallel("closeBundle",[n]),n}throw await r.pluginDriver.hookParallel("closeBundle",[e]),e}try{await r.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await r.pluginDriver.hookParallel("closeBundle",[e]),e}}),_c("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Lh(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?Pt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Lh(!0,s,i,e,r)};s.perf&&(a.getTimings=Dc);return a}(t,null)}function _h(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Lh(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await cd(e.plugins);_h(i,Ju);const r=t.createOutputPluginDriver(i);return{...await Mh(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return zd(0,async()=>{const n=new Uu(r,a,t,o,i),s=await n.generate(e);if(e){if(Oc("WRITE",1),!r.dir&&!r.file)return Pt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:ht(gt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=U(t.dir||F(t.file),e.fileName);return await n(F(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),_c("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>Bh(e)-Bh(t))};var l})}function Mh(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=fh(e),o=mh(e,t),a=gh(e,o,t),l=ph(e,a,t),c=vh(e),u=$h(e,t),d={amd:bh(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Eh(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:xh(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:Ah(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Sh(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Eh(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:Ph(e,i),inlineDynamicImports:o,interop:Ih(e),intro:Eh(e,"intro"),manualChunks:kh(e,o,a),minifyInternalExports:Ch(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:Eh(e,"outro"),paths:e.paths||{},plugins:await cd(e.plugins),preserveModules:a,preserveModulesRoot:yh(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:hh,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Dh(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Rh(e,s),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,virtualDirname:e.virtualDirname||"_virtual"};return id(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",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 Th;function Bh(e){return"asset"===e.type?Th.ASSET:e.isEntry?Th.ENTRY_CHUNK:Th.SECONDARY_CHUNK}function zh(e){return e}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Th||(Th={}));export{e as VERSION,zh as defineConfig,Oh as rollup};
|