@rollup/browser 4.24.1 → 4.25.0-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,11 +1,11 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.24.1
4
- Sun, 27 Oct 2024 06:42:30 GMT - commit 88a54d892dacbb0efdbcade263a32d9df1a77b37
3
+ Rollup.js v4.25.0-0
4
+ Tue, 29 Oct 2024 06:14:37 GMT - commit b7fcaba12e863db516f39de74c1eacfe5329a5c3
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
8
8
  Released under the MIT License.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t,n="undefined"!=typeof document?document.currentScript:null,s="4.24.1",i={exports:{}};function r(){return t||(t=1,function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;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}const c=16384,d="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}};class u{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===c&&(this.out+=d.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+d.decode(e.subarray(0,n)):t}}class h{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}}const p=[];function f(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0;for(;n.pos<t;n.pos++){r=o(n,r);const e=o(n,0);if(!l(n,t)){const t=i.pop();t[2]=r,t[3]=e;continue}const a=o(n,0),c=1&o(n,0)?[r,e,0,0,a,o(n,0)]:[r,e,0,0,a];let d=p;if(l(n,t)){d=[];do{const e=o(n,0);d.push(e)}while(l(n,t))}c.vars=d,s.push(c),i.push(c)}return s}function m(e){const t=new u;for(let n=0;n<e.length;)n=g(e,n,t,[0]);return t.flush()}function g(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:d,4:u,vars:h}=r;n>0&&s.write(t),i[0]=a(s,o,i[0]),a(s,l,0),a(s,u,0),a(s,6===r.length?1:0,0),6===r.length&&a(s,r[5],0);for(const e of h)a(s,e,0);for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=d)break;n=g(e,n,s,i)}return s.write(t),i[0]=a(s,c,i[0]),a(s,d,0),n}function y(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0,a=0,c=0,d=0,u=0,f=0,m=0,g=0;do{const e=n.indexOf(";");let t=0;for(;n.pos<e;n.pos++){if(t=o(n,t),!l(n,e)){const e=i.pop();e[2]=r,e[3]=t;continue}const h=o(n,0),y=2&h,b=4&h;let E,x=null,S=p;if(1&h){const e=o(n,a);c=o(n,a===e?c:0),a=e,E=[r,t,0,0,e,c]}else E=[r,t,0,0];if(E.isScope=!!b,y){const e=d,t=u;d=o(n,d);const s=e===d;u=o(n,s?u:0),f=o(n,s&&t===u?f:0),x=[d,u,f]}if(E.callsite=x,l(n,e)){S=[];do{m=r,g=t;const e=o(n,0);let s;if(e<-1){s=[[o(n,0)]];for(let t=-1;t>e;t--){const e=m;m=o(n,m),g=o(n,m===e?g:0);const t=o(n,0);s.push([t,m,g])}}else s=[[e]];S.push(s)}while(l(n,e))}E.bindings=S,s.push(E),i.push(E)}r++,n.pos=e+1}while(n.pos<t);return s}function b(e){if(0===e.length)return"";const t=new u;for(let n=0;n<e.length;)n=E(e,n,t,[0,0,0,0,0,0,0]);return t.flush()}function E(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:d,isScope:u,callsite:h,bindings:p}=r;if(i[0]<o?(x(s,i[0],o),i[0]=o,i[1]=0):n>0&&s.write(t),i[1]=a(s,r[1],i[1]),a(s,(6===r.length?1:0)|(h?2:0)|(u?4:0),0),6===r.length){const{4:e,5:t}=r;e!==i[2]&&(i[3]=0),i[2]=a(s,e,i[2]),i[3]=a(s,t,i[3])}if(h){const{0:e,1:t,2:n}=r.callsite;e!==i[4]?(i[5]=0,i[6]=0):t!==i[5]&&(i[6]=0),i[4]=a(s,e,i[4]),i[5]=a(s,t,i[5]),i[6]=a(s,n,i[6])}if(p)for(const e of p){e.length>1&&a(s,-e.length,0),a(s,e[0][0],0);let t=o,n=l;for(let i=1;i<e.length;i++){const r=e[i];t=a(s,r[1],t),n=a(s,r[2],n),a(s,r[0],0)}}for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=d)break;n=E(e,n,s,i)}return i[0]<c?(x(s,i[0],c),i[0]=c,i[1]=0):s.write(t),i[1]=a(s,d,i[1]),n}function x(e,t,s){do{e.write(n)}while(++t<s)}function S(e){const{length:t}=e,n=new h(e),s=[];let i=0,r=0,a=0,c=0,d=0;do{const e=n.indexOf(";"),t=[];let u=!0,h=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<h&&(u=!1),h=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(d=o(n,d),s=[i,r,a,c,d]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}u||A(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}function A(e){e.sort($)}function $(e,t){return e[0]-t[0]}function v(e){const s=new u;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const d=e[c];if(c>0&&s.write(n),0===d.length)continue;let u=0;for(let e=0;e<d.length;e++){const n=d[e];e>0&&s.write(t),u=a(s,n[0],u),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()}e.decode=S,e.decodeGeneratedRanges=y,e.decodeOriginalScopes=f,e.encode=v,e.encodeGeneratedRanges=b,e.encodeOriginalScopes=m,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports)),i.exports}var o=r();class a{constructor(e){this.bits=e instanceof a?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let l=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 c(){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 d=c();class u{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=o.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d(this.toString())}}function h(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 p=Object.prototype.toString;function f(e){return"[object Object]"===p.call(e)}function m(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 g=/\w/;class y{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;else{if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?g.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 b="\n",E={insertLeft:!1,insertRight:!1,storeName:!1};class x{constructor(e,t={}){const n=new l(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 a},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),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("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("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 x(this.original,{filename:this.filename});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 a(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new y(e.hires),s=m(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)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?h(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new u(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(f(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 E.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),E.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return E.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),E.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(n>=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("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&&(E.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),E.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 l(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("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("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(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(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(b);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(b),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(b),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(b),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(b),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){if(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;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=m(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&&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)){n.slice(i,i+s)!==t&&this.overwrite(i,i+s,t)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const S=Object.prototype.hasOwnProperty;let A=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 x)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!f(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=>{S.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(S.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 x(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 y(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=m(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?h(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 u(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 $=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,v=/^\.?\.\//,w=/\\/g,I=/[/\\]/,P=/\.[^.]+$/;function k(e){return $.test(e)}function N(e){return v.test(e)}function C(e){return e.replace(w,"/")}function O(e){return e.split(I).pop()||""}function D(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function M(e){const t=P.exec(O(e));return t?t[0]:""}function R(e,t){const n=e.split(I).filter(Boolean),s=t.split(I).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 _(...e){const t=e.shift();if(!t)return"/";let n=t.split(I);for(const t of e)if(k(t))n=t.split(I);else{const e=t.split(I);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}function L(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const T={isNoStatement:!0};function B(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 z=/\S/g;function V(e,t){z.lastIndex=t;return z.exec(e).index}const F=/\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 U(e,t,n,s,i){let r,o,a,l,c=e[0],d=!c.included||c.needsBoundaries;d&&(l=n+j(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=d,c=e[n],d=void 0!==c&&(!c.included||c.needsBoundaries),a||d?(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):L(r,t,o,l)):r.render(t,i)}function G(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+B(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 W(e,t,n){for(;;){const[s,i]=j(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function H(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 q(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function J(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${H([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}function K(e,t){if("MemberExpression"===e.type)return!e.computed&&K(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const X=Object.freeze(Object.create(null)),Y=Object.freeze({}),Z=Object.freeze([]),Q=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}}),ee="ArrowFunctionExpression",te="CallExpression",ne="ExportDefaultDeclaration",se="ExpressionStatement",ie="Identifier",re="Program";function oe(e,t){return e.start<=t&&t<e.end}function ae(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(oe(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 le(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const ce="...";function de(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(le(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=le(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${ce}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+le(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}const ue="silent",he="warn",pe="info",fe="debug",me={[fe]:0,[pe]:1,[ue]:3,[he]:2};function ge(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 ye(e){const t=O(e);return t.slice(0,Math.max(0,t.length-M(e).length))}function be(e){return k(e)?R(_(),e):e}function Ee(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||k(e)}const xe=/^(\.\.\/)*\.\.$/;function Se(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=C(R(D(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+O(t);if(xe.test(i))return[...i.split("/"),"..",O(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function Ae(e){return`https://rollupjs.org/${e}`}const $e="troubleshooting/#error-name-is-not-exported-by-module",ve="configuration-options/#jsx",we="configuration-options/#output-amd-id",Ie="configuration-options/#output-dir",Pe="configuration-options/#output-exports",ke="configuration-options/#output-format",Ne="configuration-options/#output-inlinedynamicimports",Ce="configuration-options/#output-interop",Oe="configuration-options/#output-manualchunks",De="configuration-options/#output-name",Me="configuration-options/#output-sourcemapfile",Re="plugin-development/#generatebundle";function _e(e){throw e instanceof Error?e:Le(e)}function Le(e){ze(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Te(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=ae(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=de(n,t,s)}}const Be=Symbol("augmented");function ze(e){if(!e.plugin&&!e.loc||e[Be])return;e[Be]=!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+=`${be(n)}${s}: `}const s=e.message;e.message=t+e.message,rt(e,s)}const Ve="INVALID_EXPORT_OPTION",Fe="INVALID_IMPORT_ATTRIBUTE",je="INVALID_PLUGIN_HOOK",Ue="MISSING_EXPORT",Ge="MISSING_IMPLICIT_DEPENDANT",We="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",He="PARSE_ERROR",qe="SOURCEMAP_BROKEN",Je="UNEXPECTED_NAMED_IMPORT",Ke="UNRESOLVED_ENTRY",Xe="UNRESOLVED_IMPORT";function Ye(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ze({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Te(i,n,t,e),i}function Qe(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(be).join(" -> ")}`}}function et(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${be(t)} is at (${n}:${s})\n${de(e,n,s)}`}}function tt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${be(t)}".`}}function nt(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${be(s)}" tried to import "${be(n)}" with ${st(t)} attributes, but it was already imported elsewhere with ${st(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const st=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function it(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${be(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ae("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function rt(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function ot(e,t,n){return{code:Ve,message:`"${e}" was specified for "output.exports", but entry module "${be(n)}" has the following exports: ${ge(t)}`,url:Ae(Pe)}}function at(e){return{code:Fe,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${be(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function lt(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ae(t)}}function ct(e,t,n){const s=".json"===M(n);return{binding:e,code:Ue,exporter:n,id:t,message:`"${e}" is not exported by "${be(n)}", imported by "${be(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Ae($e)}}function dt(e){const t=[...e.implicitlyLoadedBefore].map((e=>be(e.id))).sort();return{code:Ge,message:`Module "${be(e.id)}" that should be implicitly loaded before ${ge(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function ut(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function ht(e,t){return{code:He,message:e,pos:t}}function pt(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function ft(e){return{code:"RESERVED_NAMESPACE",message:`You have overided reserved namespace "${e}"`}}function mt(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)"),rt({cause:e,code:He,id:t,message:n,stack:e.stack},e.message)}function gt(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 yt(e){return{code:qe,message:`Multiple conflicting contents for sourcemap source ${e}`}}function bt(e,t,n){const s=n?"reexport":"import";return{code:Je,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${be(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ae(Ce)}}function Et(e){return{code:Je,exporter:e,message:`There was a namespace "*" reexport from the external module "${be(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:Ae(Ce)}}function xt(e){return{code:"VALIDATION_ERROR",message:e}}function St(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:Ae(t)}}(e,t);if(i)return _e(n);s(he,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const At=Symbol("PureFunction");function $t(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function vt(){return new Set}function wt(){return[]}const It=Symbol("Unknown Key"),Pt=Symbol("Unknown Non-Accessor Key"),kt=Symbol("Unknown Integer"),Nt=Symbol("Symbol.toStringTag"),Ct=[],Ot=[It],Dt=[Pt],Mt=[kt],Rt=Symbol("Entities");class _t{constructor(){this.entityPaths=Object.create(null,{[Rt]:{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]=t[n]||Object.create(null,{[Rt]:{value:new Set}});return t[Rt]}}const Lt=new _t;class Tt{constructor(){this.entityPaths=Object.create(null,{[Rt]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]=s[t]||Object.create(null,{[Rt]:{value:new Map}});const i=$t(s[Rt],t,vt);return!!i.has(n)||(i.add(n),!1)}}function Bt(e,t){return!!(e&t)}function zt(e,t,n){return e&~t|-n&t}const Vt=Symbol("Unknown Value"),Ft=Symbol("Unknown Truthy Value");class jt{constructor(){this.flags=0}get included(){return Bt(this.flags,1)}set included(e){this.flags=zt(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Wt(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Vt}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Gt}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included=!0}includeCallArguments(e,t){for(const n of t)n.include(e,!1)}shouldBeIncluded(e){return!0}}const Ut=new class extends jt{},Gt=[Ut,!1],Wt=e=>{for(const t of e.args)t?.deoptimizePath(Ot)},Ht={args:[null],type:0},qt={args:[null,Ut],type:1},Jt={args:[null],type:2,withNew:!1};class Kt extends jt{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===te&&e.parent.callee===e||e.parent.type===ne||(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}include(){this.included=!0,this.renderedLikeHoisted?.include()}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class Xt extends Kt{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}include(){super.include(),this.module.used=!0}}function Yt(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 Zt=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"]),Qt=/[^\w$]/g,en=e=>(e=>/\d/.test(e[0]))(e)||Zt.has(e)||"arguments"===e;function tn(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Qt,"_"),en(e)&&(e=`_${e}`),e||"_"}const nn=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,sn=/^(?:0|[1-9]\d*)$/;function rn(e){return nn.test(e)?"__proto__"===e?'["__proto__"]':e:sn.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function on(e){return nn.test(e)?e:JSON.stringify(e)}class an{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=tn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:Z,dynamicallyImportedIds:Z,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:Z,implicitlyLoadedBefore:Z,importedIdResolutions:Z,importedIds:Z,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){Yt(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new Xt(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(he,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${ge(i=e,["is","are"])} imported from external module "${s}" but never used in ${ge(r.map((e=>be(e))))}.`,names:i})}}function ln(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 an||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const cn=()=>{};function dn(e,t=null){return Object.create(t,e)}const un=new class extends jt{getLiteralValueAtPath(){}},hn={value:{hasEffectsWhenCalled:null,returns:Ut}},pn=new class extends jt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?In(Sn,e[0]):Gt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||wn(Sn,e[0],t,n)}},fn={value:{hasEffectsWhenCalled:null,returns:pn}},mn=new class extends jt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?In(An,e[0]):Gt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||wn(An,e[0],t,n)}},gn={value:{hasEffectsWhenCalled:null,returns:mn}},yn=new class extends jt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?In(vn,e[0]):Gt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||wn(vn,e[0],t,n)}},bn={value:{hasEffectsWhenCalled:null,returns:yn}},En={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Ct,Lt,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Ct,Jt,t)},returns:yn}},xn=dn({hasOwnProperty:fn,isPrototypeOf:fn,propertyIsEnumerable:fn,toLocaleString:bn,toString:bn,valueOf:hn}),Sn=dn({valueOf:fn},xn),An=dn({toExponential:bn,toFixed:bn,toLocaleString:bn,toPrecision:bn,valueOf:gn},xn),$n=dn({exec:hn,test:fn},xn),vn=dn({anchor:bn,at:hn,big:bn,blink:bn,bold:bn,charAt:bn,charCodeAt:gn,codePointAt:hn,concat:bn,endsWith:fn,fixed:bn,fontcolor:bn,fontsize:bn,includes:fn,indexOf:gn,italics:bn,lastIndexOf:gn,link:bn,localeCompare:gn,match:hn,matchAll:hn,normalize:bn,padEnd:bn,padStart:bn,repeat:bn,replace:En,replaceAll:En,search:gn,slice:bn,small:bn,split:hn,startsWith:fn,strike:bn,sub:bn,substr:bn,substring:bn,sup:bn,toLocaleLowerCase:bn,toLocaleUpperCase:bn,toLowerCase:bn,toString:bn,toUpperCase:bn,trim:bn,trimEnd:bn,trimLeft:bn,trimRight:bn,trimStart:bn,valueOf:bn},xn);function wn(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function In(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Gt}var Pn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const kn="_rollupAnnotations",Nn="_rollupRemoved",Cn=(e,t)=>{if(0===e)return Z;const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(On(t[e++],t));return s},On=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Pn[t[e]]}},Dn={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"]};function Mn(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Rn(){return{accessed:new _t,assigned:new _t,brokenFlow:!1,called:new Tt,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Tt,replacedVariableInits:new Map}}const _n="variables",Ln=Symbol("IS_SKIPPED_CHAIN");class Tn extends jt{get deoptimized(){return Bt(this.flags,2)}set deoptimized(e){this.flags=zt(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 Dn[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 Dn[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(Ct,this.assignmentInteraction,e)}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const n of Dn[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)}}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===kn?this.annotations=n:t===Nn&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(this,this.scope).parseNode(e))}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return Dn[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 Dn[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(Rn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Dn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Ot);else t.deoptimizePath(Ot)}this.scope.context.requestTreeshakingPass()}}class Bn extends Tn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[It,...t],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(Ot,Ht,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([It,It]),this.scope.context.requestTreeshakingPass()}}class zn extends jt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Mt),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Ot)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Gt:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Ut:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Mt,qt,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Ct,Jt,n))return!0}return!1}}const Vn=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:pn})],Fn=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:yn})],jn=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:mn})],Un=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ut})],Gn=/^\d+$/;class Wn extends jt{get hasLostTrack(){return Bt(this.flags,2048)}set hasLostTrack(e){this.flags=zt(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Bt(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=zt(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Bt(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=zt(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.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(Ot);this.prototypeExpression?.deoptimizePath([It,It]),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 Wt(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(Gn.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(Gn.test(e))for(const e of t)e.deoptimizePath(Ot);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===kt)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===Pt);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?Ot: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,It]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Ft;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?Vt:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Gt;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):Gt}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===Pt)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)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,d=[];for(let u=e.length-1;u>=0;u--){const{key:h,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...d],i[h]=[f,...c]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...l]):(s[h]||(s[h]=[f,...d]),n[h]||(n[h]=[f,...a]));else{if(h===kt){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&d.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(Ot)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Gn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Mt)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&Gn.test(e)||this.deoptimizedPaths[e])return Ut;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Gn.test(e)?Ut:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return Ut;const n=this.getMemberExpression(e);if(n!==Ut&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const Hn=e=>"string"==typeof e&&/^\d+$/.test(e),qn=new class extends jt{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||Hn(t[0])||Wt(e)}getLiteralValueAtPath(e){return 1===e.length&&Hn(e[0])?void 0:Vt}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Jn=new Wn({__proto__:null,hasOwnProperty:Vn,isPrototypeOf:Vn,propertyIsEnumerable:Vn,toLocaleString:Fn,toString:Fn,valueOf:Un},qn,!0),Kn=[{key:kt,kind:"init",property:Ut},{key:"length",kind:"init",property:mn}],Xn=[new zn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:pn})],Yn=[new zn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:mn})],Zn=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Wn(Kn,as),returnsPrimitive:null})],Qn=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Wn(Kn,as),returnsPrimitive:null})],es=[new zn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Wn(Kn,as),returnsPrimitive:null})],ts=[new zn({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:mn})],ns=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Ut})],ss=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ut})],is=[new zn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ut})],rs=[new zn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],os=[new zn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],as=new Wn({__proto__:null,at:ss,concat:Qn,copyWithin:rs,entries:Qn,every:Xn,fill:rs,filter:es,find:is,findIndex:Yn,findLast:is,findLastIndex:Yn,flat:Qn,flatMap:es,forEach:is,includes:Vn,indexOf:jn,join:Fn,keys:Un,lastIndexOf:jn,map:es,pop:ns,push:ts,reduce:is,reduceRight:is,reverse:rs,shift:ns,slice:Qn,some:Xn,sort:os,splice:Zn,toLocaleString:Fn,toString:Fn,unshift:ts,values:ss},Jn,!0);class ls extends Tn{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)}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 Bn)&&(e=!0,n.deoptimizePath(Ot))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:mn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Bn?s&&(t=!0,e.unshift({key:kt,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:un})}return this.objectEntity=new Wn(e,as)}}const cs=Symbol("Value Properties"),ds=()=>Ft,us=()=>!1,hs=()=>!0,ps={deoptimizeArgumentsOnCall:cn,getLiteralValue:ds,hasEffectsWhenCalled:us},fs={deoptimizeArgumentsOnCall:cn,getLiteralValue:ds,hasEffectsWhenCalled:hs},ms={deoptimizeArgumentsOnCall:cn,getLiteralValue:ds,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ls)},gs={deoptimizeArgumentsOnCall:cn,getLiteralValue:ds,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof jt)||s.hasEffectsOnInteractionAtPath(Ot,Ht,t)}},ys={__proto__:null,[cs]:fs},bs={__proto__:null,[cs]:ps},Es={__proto__:null,[cs]:gs},xs={__proto__:null,[cs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Ot)},getLiteralValue:ds,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Dt,qt,t)}},Ss={__proto__:null,[cs]:fs,prototype:ys},As={__proto__:null,[cs]:ps,prototype:ys},$s={__proto__:null,[cs]:ms,prototype:ys},vs={__proto__:null,[cs]:ps,from:ys,of:bs,prototype:ys},ws={__proto__:null,[cs]:ps,supportedLocalesOf:As},Is={global:ys,globalThis:ys,self:ys,window:ys,__proto__:null,[cs]:fs,Array:{__proto__:null,[cs]:fs,from:ys,isArray:bs,of:bs,prototype:ys},ArrayBuffer:{__proto__:null,[cs]:ps,isView:bs,prototype:ys},AggregateError:$s,Atomics:ys,BigInt:Ss,BigInt64Array:Ss,BigUint64Array:Ss,Boolean:As,constructor:Ss,DataView:As,Date:{__proto__:null,[cs]:ps,now:bs,parse:bs,prototype:ys,UTC:bs},decodeURI:bs,decodeURIComponent:bs,encodeURI:bs,encodeURIComponent:bs,Error:As,escape:bs,eval:ys,EvalError:As,FinalizationRegistry:Ss,Float32Array:vs,Float64Array:vs,Function:Ss,hasOwnProperty:ys,Infinity:ys,Int16Array:vs,Int32Array:vs,Int8Array:vs,isFinite:bs,isNaN:bs,isPrototypeOf:ys,JSON:ys,Map:$s,Math:{__proto__:null,[cs]:fs,abs:bs,acos:bs,acosh:bs,asin:bs,asinh:bs,atan:bs,atan2:bs,atanh:bs,cbrt:bs,ceil:bs,clz32:bs,cos:bs,cosh:bs,exp:bs,expm1:bs,floor:bs,fround:bs,hypot:bs,imul:bs,log:bs,log10:bs,log1p:bs,log2:bs,max:bs,min:bs,pow:bs,random:bs,round:bs,sign:bs,sin:bs,sinh:bs,sqrt:bs,tan:bs,tanh:bs,trunc:bs},NaN:ys,Number:{__proto__:null,[cs]:ps,isFinite:bs,isInteger:bs,isNaN:bs,isSafeInteger:bs,parseFloat:bs,parseInt:bs,prototype:ys},Object:{__proto__:null,[cs]:ps,create:bs,defineProperty:xs,defineProperties:xs,freeze:xs,getOwnPropertyDescriptor:bs,getOwnPropertyDescriptors:bs,getOwnPropertyNames:bs,getOwnPropertySymbols:bs,getPrototypeOf:bs,hasOwn:bs,is:bs,isExtensible:bs,isFrozen:bs,isSealed:bs,keys:bs,fromEntries:ys,entries:Es,values:Es,prototype:ys},parseFloat:bs,parseInt:bs,Promise:{__proto__:null,[cs]:fs,all:ys,allSettled:ys,any:ys,prototype:ys,race:ys,reject:ys,resolve:ys},propertyIsEnumerable:ys,Proxy:ys,RangeError:As,ReferenceError:As,Reflect:ys,RegExp:As,Set:$s,SharedArrayBuffer:Ss,String:{__proto__:null,[cs]:ps,fromCharCode:bs,fromCodePoint:bs,prototype:ys,raw:bs},Symbol:{__proto__:null,[cs]:ps,for:bs,keyFor:bs,prototype:ys,toStringTag:{__proto__:null,[cs]:{deoptimizeArgumentsOnCall:cn,getLiteralValue:()=>Nt,hasEffectsWhenCalled:hs}}},SyntaxError:As,toLocaleString:ys,toString:ys,TypeError:As,Uint16Array:vs,Uint32Array:vs,Uint8Array:vs,Uint8ClampedArray:vs,unescape:bs,URIError:As,valueOf:ys,WeakMap:$s,WeakRef:Ss,WeakSet:$s,clearInterval:Ss,clearTimeout:Ss,console:{__proto__:null,[cs]:fs,assert:Ss,clear:Ss,count:Ss,countReset:Ss,debug:Ss,dir:Ss,dirxml:Ss,error:Ss,exception:Ss,group:Ss,groupCollapsed:Ss,groupEnd:Ss,info:Ss,log:Ss,table:Ss,time:Ss,timeEnd:Ss,timeLog:Ss,trace:Ss,warn:Ss},Intl:{__proto__:null,[cs]:fs,Collator:ws,DateTimeFormat:ws,DisplayNames:ws,ListFormat:ws,Locale:ws,NumberFormat:ws,PluralRules:ws,RelativeTimeFormat:ws,Segmenter:ws},setInterval:Ss,setTimeout:Ss,TextDecoder:Ss,TextEncoder:Ss,URL:{__proto__:null,[cs]:fs,prototype:ys,canParse:bs},URLSearchParams:Ss,AbortController:Ss,AbortSignal:Ss,addEventListener:ys,alert:ys,AnalyserNode:Ss,Animation:Ss,AnimationEvent:Ss,applicationCache:ys,ApplicationCache:Ss,ApplicationCacheErrorEvent:Ss,atob:ys,Attr:Ss,Audio:Ss,AudioBuffer:Ss,AudioBufferSourceNode:Ss,AudioContext:Ss,AudioDestinationNode:Ss,AudioListener:Ss,AudioNode:Ss,AudioParam:Ss,AudioProcessingEvent:Ss,AudioScheduledSourceNode:Ss,AudioWorkletNode:Ss,BarProp:Ss,BaseAudioContext:Ss,BatteryManager:Ss,BeforeUnloadEvent:Ss,BiquadFilterNode:Ss,Blob:Ss,BlobEvent:Ss,blur:ys,BroadcastChannel:Ss,btoa:ys,ByteLengthQueuingStrategy:Ss,Cache:Ss,caches:ys,CacheStorage:Ss,cancelAnimationFrame:ys,cancelIdleCallback:ys,CanvasCaptureMediaStreamTrack:Ss,CanvasGradient:Ss,CanvasPattern:Ss,CanvasRenderingContext2D:Ss,ChannelMergerNode:Ss,ChannelSplitterNode:Ss,CharacterData:Ss,clientInformation:ys,ClipboardEvent:Ss,close:ys,closed:ys,CloseEvent:Ss,Comment:Ss,CompositionEvent:Ss,confirm:ys,ConstantSourceNode:Ss,ConvolverNode:Ss,CountQueuingStrategy:Ss,createImageBitmap:ys,Credential:Ss,CredentialsContainer:Ss,crypto:ys,Crypto:Ss,CryptoKey:Ss,CSS:Ss,CSSConditionRule:Ss,CSSFontFaceRule:Ss,CSSGroupingRule:Ss,CSSImportRule:Ss,CSSKeyframeRule:Ss,CSSKeyframesRule:Ss,CSSMediaRule:Ss,CSSNamespaceRule:Ss,CSSPageRule:Ss,CSSRule:Ss,CSSRuleList:Ss,CSSStyleDeclaration:Ss,CSSStyleRule:Ss,CSSStyleSheet:Ss,CSSSupportsRule:Ss,CustomElementRegistry:Ss,customElements:ys,CustomEvent:{__proto__:null,[cs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:ds,hasEffectsWhenCalled:us},prototype:ys},DataTransfer:Ss,DataTransferItem:Ss,DataTransferItemList:Ss,defaultstatus:ys,defaultStatus:ys,DelayNode:Ss,DeviceMotionEvent:Ss,DeviceOrientationEvent:Ss,devicePixelRatio:ys,dispatchEvent:ys,document:ys,Document:Ss,DocumentFragment:Ss,DocumentType:Ss,DOMError:Ss,DOMException:Ss,DOMImplementation:Ss,DOMMatrix:Ss,DOMMatrixReadOnly:Ss,DOMParser:Ss,DOMPoint:Ss,DOMPointReadOnly:Ss,DOMQuad:Ss,DOMRect:Ss,DOMRectReadOnly:Ss,DOMStringList:Ss,DOMStringMap:Ss,DOMTokenList:Ss,DragEvent:Ss,DynamicsCompressorNode:Ss,Element:Ss,ErrorEvent:Ss,Event:Ss,EventSource:Ss,EventTarget:Ss,external:ys,fetch:ys,File:Ss,FileList:Ss,FileReader:Ss,find:ys,focus:ys,FocusEvent:Ss,FontFace:Ss,FontFaceSetLoadEvent:Ss,FormData:Ss,frames:ys,GainNode:Ss,Gamepad:Ss,GamepadButton:Ss,GamepadEvent:Ss,getComputedStyle:ys,getSelection:ys,HashChangeEvent:Ss,Headers:Ss,history:ys,History:Ss,HTMLAllCollection:Ss,HTMLAnchorElement:Ss,HTMLAreaElement:Ss,HTMLAudioElement:Ss,HTMLBaseElement:Ss,HTMLBodyElement:Ss,HTMLBRElement:Ss,HTMLButtonElement:Ss,HTMLCanvasElement:Ss,HTMLCollection:Ss,HTMLContentElement:Ss,HTMLDataElement:Ss,HTMLDataListElement:Ss,HTMLDetailsElement:Ss,HTMLDialogElement:Ss,HTMLDirectoryElement:Ss,HTMLDivElement:Ss,HTMLDListElement:Ss,HTMLDocument:Ss,HTMLElement:Ss,HTMLEmbedElement:Ss,HTMLFieldSetElement:Ss,HTMLFontElement:Ss,HTMLFormControlsCollection:Ss,HTMLFormElement:Ss,HTMLFrameElement:Ss,HTMLFrameSetElement:Ss,HTMLHeadElement:Ss,HTMLHeadingElement:Ss,HTMLHRElement:Ss,HTMLHtmlElement:Ss,HTMLIFrameElement:Ss,HTMLImageElement:Ss,HTMLInputElement:Ss,HTMLLabelElement:Ss,HTMLLegendElement:Ss,HTMLLIElement:Ss,HTMLLinkElement:Ss,HTMLMapElement:Ss,HTMLMarqueeElement:Ss,HTMLMediaElement:Ss,HTMLMenuElement:Ss,HTMLMetaElement:Ss,HTMLMeterElement:Ss,HTMLModElement:Ss,HTMLObjectElement:Ss,HTMLOListElement:Ss,HTMLOptGroupElement:Ss,HTMLOptionElement:Ss,HTMLOptionsCollection:Ss,HTMLOutputElement:Ss,HTMLParagraphElement:Ss,HTMLParamElement:Ss,HTMLPictureElement:Ss,HTMLPreElement:Ss,HTMLProgressElement:Ss,HTMLQuoteElement:Ss,HTMLScriptElement:Ss,HTMLSelectElement:Ss,HTMLShadowElement:Ss,HTMLSlotElement:Ss,HTMLSourceElement:Ss,HTMLSpanElement:Ss,HTMLStyleElement:Ss,HTMLTableCaptionElement:Ss,HTMLTableCellElement:Ss,HTMLTableColElement:Ss,HTMLTableElement:Ss,HTMLTableRowElement:Ss,HTMLTableSectionElement:Ss,HTMLTemplateElement:Ss,HTMLTextAreaElement:Ss,HTMLTimeElement:Ss,HTMLTitleElement:Ss,HTMLTrackElement:Ss,HTMLUListElement:Ss,HTMLUnknownElement:Ss,HTMLVideoElement:Ss,IDBCursor:Ss,IDBCursorWithValue:Ss,IDBDatabase:Ss,IDBFactory:Ss,IDBIndex:Ss,IDBKeyRange:Ss,IDBObjectStore:Ss,IDBOpenDBRequest:Ss,IDBRequest:Ss,IDBTransaction:Ss,IDBVersionChangeEvent:Ss,IdleDeadline:Ss,IIRFilterNode:Ss,Image:Ss,ImageBitmap:Ss,ImageBitmapRenderingContext:Ss,ImageCapture:Ss,ImageData:Ss,indexedDB:ys,innerHeight:ys,innerWidth:ys,InputEvent:Ss,IntersectionObserver:Ss,IntersectionObserverEntry:Ss,isSecureContext:ys,KeyboardEvent:Ss,KeyframeEffect:Ss,length:ys,localStorage:ys,location:ys,Location:Ss,locationbar:ys,matchMedia:ys,MediaDeviceInfo:Ss,MediaDevices:Ss,MediaElementAudioSourceNode:Ss,MediaEncryptedEvent:Ss,MediaError:Ss,MediaKeyMessageEvent:Ss,MediaKeySession:Ss,MediaKeyStatusMap:Ss,MediaKeySystemAccess:Ss,MediaList:Ss,MediaQueryList:Ss,MediaQueryListEvent:Ss,MediaRecorder:Ss,MediaSettingsRange:Ss,MediaSource:Ss,MediaStream:Ss,MediaStreamAudioDestinationNode:Ss,MediaStreamAudioSourceNode:Ss,MediaStreamEvent:Ss,MediaStreamTrack:Ss,MediaStreamTrackEvent:Ss,menubar:ys,MessageChannel:Ss,MessageEvent:Ss,MessagePort:Ss,MIDIAccess:Ss,MIDIConnectionEvent:Ss,MIDIInput:Ss,MIDIInputMap:Ss,MIDIMessageEvent:Ss,MIDIOutput:Ss,MIDIOutputMap:Ss,MIDIPort:Ss,MimeType:Ss,MimeTypeArray:Ss,MouseEvent:Ss,moveBy:ys,moveTo:ys,MutationEvent:Ss,MutationObserver:Ss,MutationRecord:Ss,name:ys,NamedNodeMap:Ss,NavigationPreloadManager:Ss,navigator:ys,Navigator:Ss,NetworkInformation:Ss,Node:Ss,NodeFilter:ys,NodeIterator:Ss,NodeList:Ss,Notification:Ss,OfflineAudioCompletionEvent:Ss,OfflineAudioContext:Ss,offscreenBuffering:ys,OffscreenCanvas:Ss,open:ys,openDatabase:ys,Option:Ss,origin:ys,OscillatorNode:Ss,outerHeight:ys,outerWidth:ys,PageTransitionEvent:Ss,pageXOffset:ys,pageYOffset:ys,PannerNode:Ss,parent:ys,Path2D:Ss,PaymentAddress:Ss,PaymentRequest:Ss,PaymentRequestUpdateEvent:Ss,PaymentResponse:Ss,performance:ys,Performance:Ss,PerformanceEntry:Ss,PerformanceLongTaskTiming:Ss,PerformanceMark:Ss,PerformanceMeasure:Ss,PerformanceNavigation:Ss,PerformanceNavigationTiming:Ss,PerformanceObserver:Ss,PerformanceObserverEntryList:Ss,PerformancePaintTiming:Ss,PerformanceResourceTiming:Ss,PerformanceTiming:Ss,PeriodicWave:Ss,Permissions:Ss,PermissionStatus:Ss,personalbar:ys,PhotoCapabilities:Ss,Plugin:Ss,PluginArray:Ss,PointerEvent:Ss,PopStateEvent:Ss,postMessage:ys,Presentation:Ss,PresentationAvailability:Ss,PresentationConnection:Ss,PresentationConnectionAvailableEvent:Ss,PresentationConnectionCloseEvent:Ss,PresentationConnectionList:Ss,PresentationReceiver:Ss,PresentationRequest:Ss,print:ys,ProcessingInstruction:Ss,ProgressEvent:Ss,PromiseRejectionEvent:Ss,prompt:ys,PushManager:Ss,PushSubscription:Ss,PushSubscriptionOptions:Ss,queueMicrotask:ys,RadioNodeList:Ss,Range:Ss,ReadableStream:Ss,RemotePlayback:Ss,removeEventListener:ys,Request:Ss,requestAnimationFrame:ys,requestIdleCallback:ys,resizeBy:ys,ResizeObserver:Ss,ResizeObserverEntry:Ss,resizeTo:ys,Response:Ss,RTCCertificate:Ss,RTCDataChannel:Ss,RTCDataChannelEvent:Ss,RTCDtlsTransport:Ss,RTCIceCandidate:Ss,RTCIceTransport:Ss,RTCPeerConnection:Ss,RTCPeerConnectionIceEvent:Ss,RTCRtpReceiver:Ss,RTCRtpSender:Ss,RTCSctpTransport:Ss,RTCSessionDescription:Ss,RTCStatsReport:Ss,RTCTrackEvent:Ss,screen:ys,Screen:Ss,screenLeft:ys,ScreenOrientation:Ss,screenTop:ys,screenX:ys,screenY:ys,ScriptProcessorNode:Ss,scroll:ys,scrollbars:ys,scrollBy:ys,scrollTo:ys,scrollX:ys,scrollY:ys,SecurityPolicyViolationEvent:Ss,Selection:Ss,ServiceWorker:Ss,ServiceWorkerContainer:Ss,ServiceWorkerRegistration:Ss,sessionStorage:ys,ShadowRoot:Ss,SharedWorker:Ss,SourceBuffer:Ss,SourceBufferList:Ss,speechSynthesis:ys,SpeechSynthesisEvent:Ss,SpeechSynthesisUtterance:Ss,StaticRange:Ss,status:ys,statusbar:ys,StereoPannerNode:Ss,stop:ys,Storage:Ss,StorageEvent:Ss,StorageManager:Ss,styleMedia:ys,StyleSheet:Ss,StyleSheetList:Ss,SubtleCrypto:Ss,SVGAElement:Ss,SVGAngle:Ss,SVGAnimatedAngle:Ss,SVGAnimatedBoolean:Ss,SVGAnimatedEnumeration:Ss,SVGAnimatedInteger:Ss,SVGAnimatedLength:Ss,SVGAnimatedLengthList:Ss,SVGAnimatedNumber:Ss,SVGAnimatedNumberList:Ss,SVGAnimatedPreserveAspectRatio:Ss,SVGAnimatedRect:Ss,SVGAnimatedString:Ss,SVGAnimatedTransformList:Ss,SVGAnimateElement:Ss,SVGAnimateMotionElement:Ss,SVGAnimateTransformElement:Ss,SVGAnimationElement:Ss,SVGCircleElement:Ss,SVGClipPathElement:Ss,SVGComponentTransferFunctionElement:Ss,SVGDefsElement:Ss,SVGDescElement:Ss,SVGDiscardElement:Ss,SVGElement:Ss,SVGEllipseElement:Ss,SVGFEBlendElement:Ss,SVGFEColorMatrixElement:Ss,SVGFEComponentTransferElement:Ss,SVGFECompositeElement:Ss,SVGFEConvolveMatrixElement:Ss,SVGFEDiffuseLightingElement:Ss,SVGFEDisplacementMapElement:Ss,SVGFEDistantLightElement:Ss,SVGFEDropShadowElement:Ss,SVGFEFloodElement:Ss,SVGFEFuncAElement:Ss,SVGFEFuncBElement:Ss,SVGFEFuncGElement:Ss,SVGFEFuncRElement:Ss,SVGFEGaussianBlurElement:Ss,SVGFEImageElement:Ss,SVGFEMergeElement:Ss,SVGFEMergeNodeElement:Ss,SVGFEMorphologyElement:Ss,SVGFEOffsetElement:Ss,SVGFEPointLightElement:Ss,SVGFESpecularLightingElement:Ss,SVGFESpotLightElement:Ss,SVGFETileElement:Ss,SVGFETurbulenceElement:Ss,SVGFilterElement:Ss,SVGForeignObjectElement:Ss,SVGGElement:Ss,SVGGeometryElement:Ss,SVGGradientElement:Ss,SVGGraphicsElement:Ss,SVGImageElement:Ss,SVGLength:Ss,SVGLengthList:Ss,SVGLinearGradientElement:Ss,SVGLineElement:Ss,SVGMarkerElement:Ss,SVGMaskElement:Ss,SVGMatrix:Ss,SVGMetadataElement:Ss,SVGMPathElement:Ss,SVGNumber:Ss,SVGNumberList:Ss,SVGPathElement:Ss,SVGPatternElement:Ss,SVGPoint:Ss,SVGPointList:Ss,SVGPolygonElement:Ss,SVGPolylineElement:Ss,SVGPreserveAspectRatio:Ss,SVGRadialGradientElement:Ss,SVGRect:Ss,SVGRectElement:Ss,SVGScriptElement:Ss,SVGSetElement:Ss,SVGStopElement:Ss,SVGStringList:Ss,SVGStyleElement:Ss,SVGSVGElement:Ss,SVGSwitchElement:Ss,SVGSymbolElement:Ss,SVGTextContentElement:Ss,SVGTextElement:Ss,SVGTextPathElement:Ss,SVGTextPositioningElement:Ss,SVGTitleElement:Ss,SVGTransform:Ss,SVGTransformList:Ss,SVGTSpanElement:Ss,SVGUnitTypes:Ss,SVGUseElement:Ss,SVGViewElement:Ss,TaskAttributionTiming:Ss,Text:Ss,TextEvent:Ss,TextMetrics:Ss,TextTrack:Ss,TextTrackCue:Ss,TextTrackCueList:Ss,TextTrackList:Ss,TimeRanges:Ss,toolbar:ys,top:ys,Touch:Ss,TouchEvent:Ss,TouchList:Ss,TrackEvent:Ss,TransitionEvent:Ss,TreeWalker:Ss,UIEvent:Ss,ValidityState:Ss,visualViewport:ys,VisualViewport:Ss,VTTCue:Ss,WaveShaperNode:Ss,WebAssembly:ys,WebGL2RenderingContext:Ss,WebGLActiveInfo:Ss,WebGLBuffer:Ss,WebGLContextEvent:Ss,WebGLFramebuffer:Ss,WebGLProgram:Ss,WebGLQuery:Ss,WebGLRenderbuffer:Ss,WebGLRenderingContext:Ss,WebGLSampler:Ss,WebGLShader:Ss,WebGLShaderPrecisionFormat:Ss,WebGLSync:Ss,WebGLTexture:Ss,WebGLTransformFeedback:Ss,WebGLUniformLocation:Ss,WebGLVertexArrayObject:Ss,WebSocket:Ss,WheelEvent:Ss,Window:Ss,Worker:Ss,WritableStream:Ss,XMLDocument:Ss,XMLHttpRequest:Ss,XMLHttpRequestEventTarget:Ss,XMLHttpRequestUpload:Ss,XMLSerializer:Ss,XPathEvaluator:Ss,XPathExpression:Ss,XPathResult:Ss,XSLTProcessor:Ss};for(const e of["window","global","self","globalThis"])Is[e]=Is;function Ps(e){let t=Is;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[cs]}class ks extends Kt{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Ps([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Ps([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Ps([this.name,...e]);return s?s.getLiteralValue():Vt}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Ps([this.name]):!Ps([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Ps([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}class Ns extends Kt{constructor(e,t,n,s,i){super(e),this.init=n,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module,this.kind=i}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(Ot);this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?Wt(e):n.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,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=Z;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Ot)}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned?Vt:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t,n))),Vt)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?Gt:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath(e,t,n,s))),Gt)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n)}}include(){if(!this.included){super.include();for(const e of this.declarations){e.included||e.include(Mn(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==re);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const n of t)n.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Ut,this.markReassigned()),this.additionalInitializers}}const Cs=new Set(["class","const","let","var","using","await using"]);class Os extends Tn{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Bt(this.flags,4)?Bt(this.flags,8):null}set isTDZAccess(e){this.flags=zt(this.flags,4,!0),this.flags=zt(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 ks&&!this.isPureFunction(Ct)&&this.variable.hasEffectsOnInteractionAtPath(Ct,Ht,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(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof Ns&&this.variable.kind&&Cs.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&&Ds(this)===Ds(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof Ns&&(this.variable.module.isExecuted||ln(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(tt(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Ut:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[At])return!0;t=t[n]}return t?.[At]}}function Ds(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Ms extends Os{constructor(){super(...arguments),this.variable=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&K(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t){let n;const{treeshake:s}=this.scope.context.options;switch(e){case"var":n=this.scope.addDeclaration(this,this.scope.context,t,e),s&&s.correctVarValueBeforeDeclaration&&n.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"using":case"await using":case"class":n=this.scope.addDeclaration(this,this.scope.context,t,e);break;case"parameter":n=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return[this.variable=n]}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=X){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===te&&i&&e.appendRight(this.start,"0, ")}}}function Rs(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function _s(e,t,n){let s=e,i=1;for(;t.has(s)||Zt.has(s)||n?.has(s);)s=`${e}$${Rs(i++)}`;return t.add(s),s}class Ls{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("var"===s&&"var"===o)return r.addDeclaration(e,n),r;t.error(pt(i),e.start)}const o=new Ns(e.name,e,n,t,s);return this.variables.set(i,o),o}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 Ts extends Ls{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 Ts&&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 Ts&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Ts&&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,_s(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 Bs(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class zs extends Tn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Bt(this.flags,1024)}set computed(e){this.flags=zt(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},Ct,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(Ct,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Gt,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Ct,Jt,Lt,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Vs extends zs{hasEffects(e){return super.hasEffects(e)||Bs(this.decorators,e)}applyDeoptimizations(){}}class Fs extends Ts{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r)return"var"===r.kind||"var"===s&&"parameter"===r.kind?(r.addDeclaration(e,n),r):t.error(pt(i),e.start);const o=this.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class js extends Tn{createScope(e){this.scope=new Fs(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=B(e.original.slice(this.start,this.end),"{")+1;U(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function Us(e){return"StaticBlock"===e.type}class Gs extends jt{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class Ws extends Tn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ts(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)||Bs(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.deoptimized||this.applyDeoptimizations(),this.included=!0,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())}initialise(){super.initialise(),this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof Vs&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)Us(e)||e.static||e instanceof Vs&&"constructor"===e.kind||e.deoptimizePath(Ot);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(Us(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(Ct,Lt,this);if("symbol"==typeof e){s.push({key:It,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Ms?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Wn(t,this.superClass?new Gs(this.superClass,"prototype"):Jn)}),this.objectEntity=new Wn(e,this.superClass||Jn)}}class Hs extends Ws{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Ms(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}${H([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 qs extends Ns{constructor(e){super("arguments",null,Ut,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Ot):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Ot);this.deoptimizedArguments.length=0}}const Js=Z,Ks=new Set([It]),Xs=new _t,Ys=new Set([Ut]);class Zs extends Ns{constructor(e,t,n){super(e,t,Ut,n,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new _t,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set,this.expressionsUseTheKnownValue=[],this.knownValue=null,this.knownValueLiteral=Vt,this.frozenValue=null}addEntityToBeDeoptimized(e){if(e===Ut){if(!this.entitiesToBeDeoptimized.has(Ut)){this.entitiesToBeDeoptimized.add(Ut);for(const{interaction:e}of this.deoptimizationInteractions)Wt(e);this.deoptimizationInteractions=Js}}else if(this.deoptimizedFields.has(It))e.deoptimizePath(Ot);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,n,Lt)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsUseTheKnownValue)e.deoptimizeCache();this.expressionsUseTheKnownValue=Z}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(Ct,Lt,this));if(this.knownValue===e||this.knownValue instanceof Ms&&e instanceof Ms&&this.knownValue.variable===e.variable)return;const t=this.knownValueLiteral;if("symbol"==typeof t)return void this.markReassigned();e.getLiteralValueAtPath(Ct,Lt,this)!==t&&this.markReassigned()}getKnownValue(){return null===this.frozenValue&&(this.frozenValue=this.knownValue||Ut),this.frozenValue}getLiteralValueAtPath(e,t,n){if(this.isReassigned)return Vt;const s=this.getKnownValue();return this.expressionsUseTheKnownValue.push(n),t.withTrackedEntityAtPath(e,s,(()=>s.getLiteralValueAtPath(e,t,n)),Vt)}hasEffectsOnInteractionAtPath(e,t,n){if(this.isReassigned||1===t.type)return super.hasEffectsOnInteractionAtPath(e,t,n);return this.getKnownValue().hasEffectsOnInteractionAtPath(e,t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(Ut)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(It)||2===e.type&&this.deoptimizedFields.has(t[0])))Wt(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.entitiesToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,t,Lt);this.entitiesToBeDeoptimized.has(Ut)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(It))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.entitiesToBeDeoptimized)e.deoptimizePath([t]);t===It&&(this.deoptimizationInteractions=Js,this.deoptimizations=Xs,this.deoptimizedFields=Ks,this.entitiesToBeDeoptimized=Ys)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Ot):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Gt}}class Qs extends Zs{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Ut).hasEffectsOnInteractionAtPath(e,t,n)}}class ei extends Ts{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("parameter"===o&&"CatchClause"===r.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,un,s);return r.renderLikeHoisted(n),this.addHoistedVariable(i,n),n}return"var"===o?(r.addDeclaration(e,n),r):t.error(pt(i),e.start)}const o=this.parent.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class ti extends Ts{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if(!("var"!==s&&"function"!==s||"var"!==o&&"function"!==o&&"parameter"!==o))return r.addDeclaration(e,n),r;t.error(pt(i),e.start)}const o=new Ns(e.name,e,n,t,s);return this.variables.set(i,o),o}}class ni extends Ts{constructor(e,t){super(e,e.context),this.parameters=[],this.hasRest=!1,this.bodyScope=t?new ei(this):new ti(this)}addParameterDeclaration(e){const{name:t,start:n}=e;if(this.variables.get(t))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(t),n);const s=new Zs(t,e,this.context);return this.variables.set(t,s),this.bodyScope.addHoistedVariable(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const n of t)if(n instanceof Bn){for(const n of t)n.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||i,a=t[r];if(o)if(n=!1,0===o.length)s=!0;else for(const e of o)e.included&&(s=!0),e.calledFromTryStatement&&(n=!0);!s&&a.shouldBeIncluded(e)&&(s=!0),s&&a.include(e,n)}}}class si extends ni{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Ut;for(const e of this.returnExpressions)e.deoptimizePath(Ot)}}}class ii extends si{constructor(e){const{context:t}=e;super(e,!1),this.variables.set("arguments",this.argumentsVariable=new qs(t)),this.variables.set("this",this.thisVariable=new Qs(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const n of t)n.included||n.include(e,!1)}}class ri extends Tn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===re&&this.scope.context.log(he,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${be(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!==re:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class oi extends Tn{get deoptimizeBody(){return Bt(this.flags,32768)}set deoptimizeBody(e){this.flags=zt(this.flags,32768,e)}get directlyIncluded(){return Bt(this.flags,16384)}set directlyIncluded(e){this.flags=zt(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Ut)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Fs(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();const e=this.body[0];this.deoptimizeBody=e instanceof ri&&"use asm"===e.directive}render(e,t){this.body.length>0?U(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class ai extends Tn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,Ut)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Ct,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([It,It]),this.scope.context.requestTreeshakingPass())}}class li extends Tn{constructor(){super(...arguments),this.objectEntity=null,this.parameterVariableValuesDeoptimized=!1}get async(){return Bt(this.flags,256)}set async(e){this.flags=zt(this.flags,256,e)}get deoptimizedReturn(){return Bt(this.flags,512)}set deoptimizedReturn(e){this.flags=zt(this.flags,512,e)}get generator(){return Bt(this.flags,4194304)}set generator(e){this.flags=zt(this.flags,4194304,e)}updateParameterVariableValues(e){for(let t=0;t<this.params.length;t++){const n=this.params[t];if(!(n instanceof Ms))continue;const s=n.variable,i=e[t+1]??un;s.updateKnownValue(i)}}deoptimizeParameterVariableValues(){for(const e of this.params)if(e instanceof Ms){e.variable.markReassigned()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(2===e.type){const{parameters:t}=this.scope,{args:n}=e;let s=!1;for(let e=0;e<n.length-1;e++){const i=this.params[e],r=n[e+1];r instanceof Bn&&this.deoptimizeParameterVariableValues(),s||i instanceof ai?(s=!0,r.deoptimizePath(Ot)):i instanceof Ms?(t[e][0].addEntityToBeDeoptimized(r),this.addArgumentToBeDeoptimized(r)):i?r.deoptimizePath(Ot):this.addArgumentToBeDeoptimized(r)}this.updateParameterVariableValues(n)}else this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){if(this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===It){this.scope.getReturnExpression().deoptimizePath(Ot);for(const e of this.scope.parameters)for(const t of e)t.deoptimizePath(Ot),t.markReassigned()}}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(Ot),this.scope.context.requestTreeshakingPass()),Gt):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],Jt,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Ht,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===ne&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.deoptimizeParameterVariableValues()),this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){super.initialise(),this.body instanceof oi?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",Ut))),o[o.length-1]instanceof ai),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}li.prototype.preventChildBlockScope=!0;class ci extends li{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new ii(e),this.constructedEntity=new Wn(Object.create(null),Jn),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Ut);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!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();const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Ms&&!n||s.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Wn([{key:"prototype",kind:"init",property:new Wn([],Jn)}],Jn)}}class di extends ci{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 Ms(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class ui extends Tn{include(e,t){super.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable)}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 V(e,B(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof di)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=B(e,"function",t)+8;e=e.slice(n,B(e,"(",n));const s=B(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Hs)this.renderNamedDeclaration(e,r,null===this.declaration.id?B(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void L(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:se}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}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 Hs&&i.has(this.variable)&&e.appendLeft(this.end,` ${H([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;const hi=/[\n\r'\\\u2028\u2029]/,pi=/([\n\r'\u2028\u2029])/g,fi=/\\/g;function mi(e){return hi.test(e)?e.replace(fi,"\\\\").replace(pi,"\\$1"):e}const gi="_interopDefault",yi="_interopDefaultCompat",bi="_interopNamespace",Ei="_interopNamespaceCompat",xi="_interopNamespaceDefault",Si="_interopNamespaceDefaultOnly",Ai="_mergeNamespaces",$i="_documentCurrentScript",vi={auto:gi,compat:yi,default:null,defaultOnly:null,esModule:null},wi=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Ii={auto:bi,compat:Ei,default:xi,defaultOnly:Si,esModule:null},Pi=(e,t)=>"esModule"!==e&&wi(e,t),ki=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of ji)t.has(e)&&a.add(e);return ji.map((e=>a.has(e)?Ni[e](n,s,i,r,o,a):"")).join("")},Ni={[$i]:(e,{_:t,n:n})=>`var ${$i}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[yi](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:yi});return`${o}${Di(t)}${s}?${s}${n?Ci(t):Oi(t)}${a}${r}${r}`},[gi](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:gi});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Ci(t):Oi(t)}${a}${r}${r}`},[Ei](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(xi)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ei});return`${e}${Di(t)}${o}?${o}e${o}:${o}${xi}(e)${n}${l}${l}`}return`function ${Ei}(e)${o}{${l}${e}if${o}(${Di(t)})${o}return e;${l}`+Mi(e,e,t,n,s,i)+`}${l}${l}`},[Si](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,d]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Si});return`${c}${Vi(s,Fi(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${d}${a}${a}`},[xi](e,t,n,s,i){const{_:r,n:o}=t;return`function ${xi}(e)${r}{${o}`+Mi(e,e,t,n,s,i)+`}${o}${o}`},[bi](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(xi)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:bi});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${xi}(e)${t}${l}${l}`}return`function ${bi}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Mi(e,e,t,n,s,i)+`}${l}${l}`},[Ai](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Ai}(n, m)${r}{${a}${e}${_i(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Ti:Bi:zi)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Vi(s,Fi(i,"n",t))};${a}}${a}${a}`}},Ci=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Oi=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Di=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Mi=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}=n,h=`{${d}`+(s?Li:zi)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Ui(l)}${o}}`:""});${d}${t}if${o}(e)${o}{${d}${t}${e}${Ri(h,!s,n)}${d}${t}}${d}${t}n${c("default")}${o}=${o}e;${d}${t}return ${Vi(i,"n")}${u}${d}`},Ri=(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}`,_i=(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}}`},Li=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Ti(e,t+e,n)+`${t}}${i}`},Ti=(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}`},Bi=(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}`},zi=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Vi=(e,t)=>e?`Object.freeze(${t})`:t,Fi=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Ui(s)})`:t,ji=Object.keys(Ni);function Ui(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Gi extends Tn{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)?Vt:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Gt:In(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||wn(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return $n;switch(typeof e){case"boolean":return Sn;case"number":return An;case"string":return vn}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 Wi(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Ct,Lt,i);if(n===Ln||e.optional&&null==n)return Ln}else if(e.optional&&null==t.getLiteralValueAtPath(Ct,Lt,i))return Ln;return e.getLiteralValueAtPath(n,s,i)}function Hi(e){return e.computed?function(e){if(e instanceof Gi)return String(e.value);return null}(e.property):e.property.name}function qi(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Ms)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Ji){const s=qi(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Ji extends Tn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Bt(this.flags,1024)}set computed(e){this.flags=zt(this.flags,1024,e)}get optional(){return Bt(this.flags,128)}set optional(e){this.flags=zt(this.flags,128,e)}get assignmentDeoptimized(){return Bt(this.flags,16)}set assignmentDeoptimized(e){this.flags=zt(this.flags,16,e)}get bound(){return Bt(this.flags,32)}set bound(e){this.flags=zt(this.flags,32,e)}get isUndefined(){return Bt(this.flags,64)}set isUndefined(e){this.flags=zt(this.flags,64,e)}bind(){this.bound=!0;const e=qi(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Ki(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<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):Wt(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=Z,this.propertyKey=It,t.deoptimizePath(Ot);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&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===It?Pt:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==It&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):Vt}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Wi(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[un,!1]:this.propertyKey!==It&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):Gt}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===Ln?Ln:this.optional&&null==this.object.getLiteralValueAtPath(Ct,Lt,this)?t||Ln:(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(Ct,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.include(e,t):this.includeProperties(e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){super.initialise(),this.propertyKey=Hi(this),this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=X){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;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],Lt),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.getPropertyKey()],Lt),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Ms){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable),this.scope.context.log(he,tt(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=It;const e=this.property.getLiteralValueAtPath(Ct,Lt,this);return this.propertyKey=e===Nt?e:"symbol"==typeof e?It:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){this.included||(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable)),this.object.include(e,t),this.property.include(e,t)}}function Ki(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof Xt)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(he,ct(s,n.module.id,i),t[0].pos),"undefined"}return null}return Ki(i,t.slice(1),n)}const Xi="ROLLUP_FILE_URL_",Yi="import";class Zi extends Tn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===Yi&&n?.startsWith(Xi)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===Yi)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Ji&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Xi)&&(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:d,start:u,end:h}=this,{id:p}=r;if(o!==Yi)return;const f=c;if(d){const t=s.getFileName(d),i=C(R(D(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:d,relativePath:i}])||lr[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=cr[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Qi.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Ji?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(u,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Xi)?tr:er)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const Qi=["cjs","iife","umd"],er={amd:["document","module","URL"],cjs:["document","require","URL",$i],es:[],iife:["document","URL",$i],system:["module"],umd:["document","require","URL",$i]},tr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},nr=(e,t="URL")=>`new ${t}(${e}).href`,sr=(e,t=!1)=>nr(`'${mi(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`),ir=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},rr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,or=e=>rr(`__dirname + '/${mi(e)}'`),ar=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${$i} && ${$i}.tagName.toUpperCase() === 'SCRIPT' && ${$i}.src || new URL('${mi(e)}', document.baseURI).href)`,lr={amd:e=>("."!==e[0]&&(e="./"+e),nr(`require.toUrl('${mi(e)}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${or(e)} : ${sr(e)})`,es:e=>nr(`'${mi(e)}', import.meta.url`),iife:e=>sr(e),system:e=>nr(`'${mi(e)}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${or(e)} : ${sr(e,!0)})`},cr={amd:ir((()=>nr("module.uri, document.baseURI"))),cjs:ir((e=>`(typeof document === 'undefined' ? ${rr("__filename")} : ${ar(e)})`)),iife:ir((e=>ar(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:ir((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${rr("__filename")} : ${ar(e,!0)})`))};class dr extends Kt{constructor(){super("undefined")}getLiteralValueAtPath(){}}class ur extends Ns{constructor(e,t,n){super(e,t,t.declaration,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof di||s instanceof Hs)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof Ms&&(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 dr||"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 ur&&!n.has(t));return this.originalVariable=t||e}}class hr extends Kt{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):Wt(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]===Nt?"Module":Vt}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)}include(){super.include(),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Ai],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${rn(e)}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${Ai}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Ui(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${d}${H([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 pr extends Kt{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 ur||e instanceof pr;){if(e instanceof ur){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof pr&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){super.include(),this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}class fr{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?C(R(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return mi(this.renormalizeRenderPath?Se(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function mr(e){return e.endsWith(".js")?e.slice(0,-3):e}function gr(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${mr(t)}`:e.id??""}function yr(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:d,getFunctionIntro:u,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:d}of t)if(d)return br(a,d[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:u,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=br(a,t.imported,l,i,e,u,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=d([],{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}${Sr(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${u(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function br(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=vi[t]?i:e;return wi(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Ii[o(a)])?r:e:`${e}${c(t)}`}function Er(e){return e([["value","true"]],{lineBreakIndent:null})}function xr(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Er(i)],[null,`[Symbol.toStringTag]:${s}${Ui(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Er(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Ui(i)});`}return""}const Sr=(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 Ar(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:d}=a,u=new Set,h=[],p=(e,t,n)=>{u.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,Si,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=vi[e])):"*"!==t||"*"===i||a||(a=!0,s=Ii[e],c=l),s&&p(c,s,o)}}return`${ki(u,r,o,a,n,s,i)}${h.length>0?`${h.join(d)}${d}${d}`:""}`}function $r(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":mr(e);var n}const vr=new Set(["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);function wr(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>vr.has(e)||e.startsWith("node:")));0!==n.length&&e(he,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${ge(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Ir=(e,t)=>e.split(".").map(t).join("");function Pr(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(he,ft(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let d=t,u=[...a.map((e=>(d+=r(e),`${d}${i}=${i}${d}${i}||${i}{}`))),`${d}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(u=`(${u})`),u}function kr(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 Nr="_missingExportShim";const Cr=({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},Or=(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""},Dr=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",Mr=(e,t,n)=>Rr(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function Rr(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}${rn(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const _r=(e,t,n)=>Rr(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),Lr=(e,t,n)=>Rr(e.filter((e=>e.local===Nr)).map((e=>({name:e.exported,value:Nr}))),t,n);function Tr(e,t,n){return e?`${t}${Ir(e,n)}`:"null"}var Br={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:d,namedExportsMode:u,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:S,strict:A}){wr(h,n);const $=n.map((e=>`'${$r(e.importPath,m.forceJsExtensionForImports)}'`)),v=n.map((e=>e.name)),{n:w,getNonArrowFunctionIntro:I,_:P}=f;u&&r&&(v.unshift("exports"),$.unshift("'exports'")),t.has("require")&&(v.unshift("require"),$.unshift("'require'")),t.has("module")&&(v.unshift("module"),$.unshift("'module'"));const k=gr(m,o),N=(k?`'${k}',${P}`:"")+($.length>0?`[${$.join(`,${P}`)}],${P}`:""),C=A?`${P}'use strict';`:"";e.prepend(`${l}${Ar(n,x,y,b,E,t,a,f)}`);const O=yr(s,n,u,x,f,a,y,S);let D=xr(u&&r,c&&(!0===g||"if-default-prop"===g&&i),d&&E,f);D&&(D=w+w+D),e.append(`${O}${D}${p}`).indent(a).prepend(`${m.define}(${N}(${I(v,{isAsync:!1,name:null})}{${C}${w}${w}`).append(`${w}${w}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:d,outro:u,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:S,n:A}=h,$=x?`'use strict';${A}${A}`:"";let v=xr(d&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);v&&(v+=A+A);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:d}of e)c||d?(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),I=Ar(n,y,m,g,b,t,o,h);e.prepend(`${$}${a}${v}${w}${I}`);const P=yr(s,n,d,y,h,o,m,E,`module.exports${S}=${S}`);e.append(`${P}${u}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:d},importAttributesKey:u}){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:`${on(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 ${on(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map((e=>e.imported===e.reexported?on(e.imported):`${on(e.imported)} as ${on(e.reexported)}`)).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,u,a);p.length>0&&(s+=p.join(h)+h+h),(s+=ki(null,t,n,a,l,c,d))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${on(r.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:d,snippets:u},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:S},strict:A}){const{_:$,getNonArrowFunctionIntro:v,getPropertyAccess:w,n:I}=u,P=x&&x.includes("."),k=!f&&!P;if(x&&k&&(en(N=x)||Qt.test(N)))return _e(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:Ae("configuration-options/#output-extend")}}(x));var N;wr(c,n);const C=kr(n),O=C.map((e=>e.globalName||"null")),D=C.map((e=>e.name));r&&!x&&c(he,{code:We,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ae(De)}),l&&r&&(f?(O.unshift(`this${Ir(x,w)}${$}=${$}this${Ir(x,w)}${$}||${$}{}`),D.unshift("exports")):(O.unshift("{}"),D.unshift("exports")));const M=A?`${o}'use strict';${I}`:"",R=Ar(n,E,g,m,S,t,o,u);e.prepend(`${a}${R}`);let _=`(${v(D,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!x||f&&l||(_=(k?`var ${x}`:`this${Ir(x,w)}`)+`${$}=${$}${_}`),P&&(_=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(he,ft(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let d=t;return l.map((e=>(d+=i(e),`${d}${s}=${s}${d}${s}||${s}{}${r}`))).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(x,"this",b,u,h,c)+_));let L=`${I}${I}})(${O.join(`,${$}`)});`;r&&!f&&l&&(L=`${I}${I}${o}return exports;${L}`);const T=yr(s,n,l,E,u,o,g,y);let B=xr(l&&r,!0===p||"if-default-prop"===p&&i,S,u);B&&(B=I+I+B),e.append(`${T}${B}${d}`).indent(o).prepend(_).append(L)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:d,freeze:u,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:S,setters:A,starExcludes:$}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let d=null;for(const{imports:u,reexports:h}of e){const p=[];if(u)for(const e of u)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){d||(d=Cr({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:d}}(n,s,r,a),v=h?`'${h}',${g}`:"",w=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${v}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(w,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Or($,r,a)+Dr(S,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.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}`;I+=`${r}${r}execute:${g}(${b([],{isAsync:c,name:null})}{${E}${E}`;const P=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+ki(null,t,r,a,d,u,p)+Mr(s,r,a)).append(`${l}${E}${E}`+_r(s,r,a)+Lr(s,r,a)).indent(`${r}${r}${r}`).append(P).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:d,outro:u,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:S},globals:A,noConflict:$,reexportProtoFromExternal:v,strict:w}){const{_:I,cnst:P,getFunctionIntro:k,getNonArrowFunctionIntro:N,getPropertyAccess:C,n:O,s:D}=h,M=f?"f":"factory",R=f?"g":"global";if(r&&!x)return _e({code:We,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:Ae(De)});wr(d,n);const _=n.map((e=>`'${$r(e.importPath,p.forceJsExtensionForImports)}'`)),L=n.map((e=>`require('${e.importPath}')`)),T=kr(n),B=T.map((e=>Tr(e.globalName,R,C))),z=T.map((e=>e.name));c&&(r||$)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Pr(x,R,A,(g?`${Tr(x,R,C)}${I}||${I}`:"")+"{}",h,d)),z.unshift("exports"));const V=gr(p,o),F=(V?`'${V}',${I}`:"")+(_.length>0?`[${_.join(`,${I}`)}],${I}`:""),j=p.define,U=!c&&r?`module.exports${I}=${I}`:"",G=w?`${I}'use strict';${O}`:"";let W;if($){const e=f?"e":"exports";let t;if(!c&&r)t=`${P} ${e}${I}=${I}${Pr(x,R,A,`${M}(${B.join(`,${I}`)})`,h,d)};`;else{t=`${P} ${e}${I}=${I}${B.shift()};${O}${a}${a}${M}(${[e,...B].join(`,${I}`)});`}W=`(${k([],{isAsync:!1,name:null})}{${O}${a}${a}${P} current${I}=${I}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map((e=>i+=s(e))).join(`${n}&&${n}`)}(x,R,h)};${O}${a}${a}${t}${O}${a}${a}${e}.noConflict${I}=${I}${k([],{isAsync:!1,name:null})}{${I}${Tr(x,R,C)}${I}=${I}current;${I}return ${e}${D}${I}};${O}${a}})()`}else W=`${M}(${B.join(`,${I}`)})`,!c&&r&&(W=Pr(x,R,A,W,h,d));const H=r||$&&c||B.length>0,q=[M];H&&q.unshift(R);const J=H?`this,${I}`:"",K=H?`(${R}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${R}${I}||${I}self,${I}`:"",X=H?")":"",Y=H?`${a}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?${I}${U}${M}(${L.join(`,${I}`)})${I}:${O}`:"",Z=`(${N(q,{isAsync:!1,name:null})}{${O}`+Y+`${a}typeof ${j}${I}===${I}'function'${I}&&${I}${j}.amd${I}?${I}${j}(${F}${M})${I}:${O}`+`${a}${K}${W}${X};${O}`+`})(${J}(${N(z,{isAsync:!1,name:null})}{${G}${O}`,Q=O+O+"}));";e.prepend(`${l}${Ar(n,E,y,b,S,t,a,h)}`);const ee=yr(s,n,c,E,h,a,y,v);let te=xr(c&&r,!0===m||"if-default-prop"===m&&i,S,h);te&&(te=O+O+te),e.append(`${ee}${te}${u}`).trim().indent(a).append(Q).prepend(Z)}};const zr={ArrayPattern(e,t){for(const n of t.elements)n&&zr[n.type](e,n)},AssignmentPattern(e,t){zr[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?zr.RestElement(e,n):zr[n.value.type](e,n.value)},RestElement(e,t){zr[t.argument.type](e,t.argument)}},Vr=function(e){const t=[];return zr[e.type](t,e),t};let Fr;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 jr=new Array(128).fill(void 0);function Ur(e){return jr[e]}jr.push(void 0,null,!0,!1);let Gr=jr.length;function Wr(e){const t=Ur(e);return function(e){e<132||(jr[e]=Gr,Gr=e)}(e),t}const Hr="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Hr.decode();let qr=null;function Jr(){return null!==qr&&0!==qr.byteLength||(qr=new Uint8Array(Fr.memory.buffer)),qr}function Kr(e,t){return e>>>=0,Hr.decode(Jr().subarray(e,e+t))}function Xr(e){Gr===jr.length&&jr.push(jr.length+1);const t=Gr;return Gr=jr[t],jr[t]=e,t}let Yr=0;const Zr="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Qr="function"==typeof Zr.encodeInto?function(e,t){return Zr.encodeInto(e,t)}:function(e,t){const n=Zr.encode(e);return t.set(n),{read:e.length,written:n.length}};let eo=null;function to(){return(null===eo||!0===eo.buffer.detached||void 0===eo.buffer.detached&&eo.buffer!==Fr.memory.buffer)&&(eo=new DataView(Fr.memory.buffer)),eo}function no(e,t,n){try{const l=Fr.__wbindgen_add_to_stack_pointer(-16),c=function(e,t,n){if(void 0===n){const n=Zr.encode(e),s=t(n.length,1)>>>0;return Jr().subarray(s,s+n.length).set(n),Yr=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Jr();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=Jr().subarray(i+o,i+s);o+=Qr(e,t).written,i=n(i,s,o,1)>>>0}return Yr=o,i}(e,Fr.__wbindgen_export_0,Fr.__wbindgen_export_1),d=Yr;Fr.parse(l,c,d,t,n);var s=to().getInt32(l+0,!0),i=to().getInt32(l+4,!0),r=(o=s,a=i,o>>>=0,Jr().subarray(o/1,o/1+a)).slice();return Fr.__wbindgen_export_2(s,1*i,1),r}finally{Fr.__wbindgen_add_to_stack_pointer(16)}var o,a}function so(e,t){try{return e.apply(this,t)}catch(e){Fr.__wbindgen_export_3(Xr(e))}}function io(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){Wr(e)},e.wbg.__wbindgen_is_object=function(e){const t=Ur(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return Xr(Ur(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return Xr(Ur(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return Xr(Ur(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return Xr(Ur(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof Ur(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return so((function(){return Xr(module.require)}),arguments)},e.wbg.__wbindgen_string_new=function(e,t){return Xr(Kr(e,t))},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return Xr(Ur(e).msCrypto)},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return so((function(e,t){Ur(e).randomFillSync(Wr(t))}),arguments)},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return so((function(e,t){Ur(e).getRandomValues(Ur(t))}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return Xr(Ur(e))},e.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43=function(e,t){return Xr(new Function(Kr(e,t)))},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof Ur(e)},e.wbg.__wbg_self_bf91bf94d9e04084=function(){return so((function(){return Xr(self.self)}),arguments)},e.wbg.__wbg_window_52dd9f07d03fd5f8=function(){return so((function(){return Xr(window.window)}),arguments)},e.wbg.__wbg_globalThis_05c129bf37fcf1be=function(){return so((function(){return Xr(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_3eca19bb09e9c484=function(){return so((function(){return Xr(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===Ur(e)},e.wbg.__wbg_call_a9ef466721e824f2=function(){return so((function(e,t){return Xr(Ur(e).call(Ur(t)))}),arguments)},e.wbg.__wbg_call_3bfa248576352471=function(){return so((function(e,t,n){return Xr(Ur(e).call(Ur(t),Ur(n)))}),arguments)},e.wbg.__wbg_buffer_ccaed51a635d8a2d=function(e){return Xr(Ur(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730=function(e,t,n){return Xr(new Uint8Array(Ur(e),t>>>0,n>>>0))},e.wbg.__wbg_new_fec2611eb9180f95=function(e){return Xr(new Uint8Array(Ur(e)))},e.wbg.__wbg_newwithlength_76462a666eca145f=function(e){return Xr(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_975a06f9dbd16995=function(e,t,n){return Xr(Ur(e).subarray(t>>>0,n>>>0))},e.wbg.__wbg_length_9254c4bd3b9f23c4=function(e){return Ur(e).length},e.wbg.__wbg_set_ec2fcf81bc573fd9=function(e,t,n){Ur(e).set(Ur(t),n>>>0)},e.wbg.__wbindgen_throw=function(e,t){throw new Error(Kr(e,t))},e.wbg.__wbindgen_memory=function(){return Xr(Fr.memory)},e}async function ro(e){if(void 0!==Fr)return Fr;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","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:n&&"SCRIPT"===n.tagName.toUpperCase()&&n.src||new URL("rollup.browser.js",document.baseURI).href));const t=io();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=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("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 Fr=e.exports,ro.__wbindgen_wasm_module=t,eo=null,qr=null,Fr}(s,i)}const oo=[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:lo(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:lo(t[e+2],t)}},function(e,t){const n=t[e+2],s=Cn(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?{[kn]:s}:{},params:lo(t[e+4],t),body:ao(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Pn[t[e+2]],left:ao(t[e+3],t),right:ao(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:ao(t[e+2],t),right:ao(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:ao(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Pn[t[e+2]],left:ao(t[e+3],t),right:ao(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:lo(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:ao(n,t)}},function(e,t){const n=t[e+2],s=Cn(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[kn]:s}:{},callee:ao(t[e+4],t),arguments:lo(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:ao(n,t),body:ao(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:ao(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:lo(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:lo(t[e+2],t),id:0===n?null:ao(n,t),superClass:0===s?null:ao(s,t),body:ao(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:lo(t[e+2],t),id:0===n?null:ao(n,t),superClass:0===s?null:ao(s,t),body:ao(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:ao(t[e+2],t),consequent:ao(t[e+3],t),alternate:ao(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:ao(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:ao(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:ao(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:ao(t[e+2],t),test:ao(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:ao(n,t),source:ao(t[e+3],t),attributes:lo(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:ao(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:lo(t[e+2],t),source:0===n?null:ao(n,t),attributes:lo(t[e+4],t),declaration:0===s?null:ao(s,t)}},function(e,t){const n=ao(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:ao(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:ao(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:ao(t[e+2],t),right:ao(t[e+3],t),body:ao(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:ao(t[e+3],t),right:ao(t[e+4],t),body:ao(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:ao(n,t),test:0===s?null:ao(s,t),update:0===i?null:ao(i,t),body:ao(t[e+5],t)}},function(e,t){const n=t[e+2],s=Cn(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?{[kn]:s}:{},id:0===i?null:ao(i,t),params:lo(t[e+5],t),body:ao(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Cn(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?{[kn]:s}:{},id:0===i?null:ao(i,t),params:lo(t[e+5],t),body:ao(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:ao(t[e+2],t),consequent:ao(t[e+3],t),alternate:0===n?null:ao(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:ao(t[e+2],t),value:ao(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:lo(t[e+2],t),source:ao(t[e+3],t),attributes:lo(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:ao(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:ao(t[e+2],t),options:0===n?null:ao(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:ao(t[e+2],t)}},function(e,t){const n=t[e+2],s=ao(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:ao(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:ao(t[e+2],t),value:0===n?null:ao(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:ao(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:ao(t[e+2],t),children:lo(t[e+3],t),closingElement:0===n?null:ao(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:ao(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:ao(t[e+2],t),children:lo(t[e+3],t),closingFragment:ao(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:ao(t[e+2],t),property:ao(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:ao(t[e+2],t),name:ao(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:ao(t[e+3],t),attributes:lo(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:ao(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:ao(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:ao(t[e+2],t),body:ao(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:Pn[t[e+2]],left:ao(t[e+3],t),right:ao(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:ao(t[e+3],t),property:ao(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:ao(t[e+2],t),property:ao(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:lo(t[e+3],t),key:ao(t[e+4],t),value:ao(t[e+5],t),kind:Pn[t[e+6]]}},function(e,t){const n=Cn(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[kn]:n}:{},callee:ao(t[e+3],t),arguments:lo(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:lo(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:lo(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=Cn(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:lo(t[e+2],t),...n.length>0?{[Nn]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=ao(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}:ao(s,t),value:i,kind:Pn[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:lo(t[e+3],t),key:ao(t[e+4],t),value:0===s?null:ao(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:ao(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:ao(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:lo(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:ao(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:lo(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:ao(n,t),consequent:lo(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:ao(t[e+2],t),cases:lo(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:ao(t[e+2],t),quasi:ao(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:lo(t[e+2],t),expressions:lo(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:ao(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:ao(t[e+2],t),handler:0===n?null:ao(n,t),finalizer:0===s?null:ao(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Pn[t[e+2]],argument:ao(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:Pn[t[e+3]],argument:ao(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Pn[t[e+2]],declarations:lo(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:ao(t[e+2],t),init:0===n?null:ao(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:ao(t[e+2],t),body:ao(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:ao(s,t)}}];function ao(e,t){const n=t[e],s=oo[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function lo(e,t){if(0===e)return Z;const n=t[e++],s=[];for(let i=0;i<n;i++){const n=t[e++];s.push(n?ao(n,t):null)}return s}function co(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 uo extends Tn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e){const t=[];for(const n of this.elements)null!==n&&t.push(...n.declare(e,Ut));return t}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Ct,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}class ho extends li{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Bt(this.flags,8388608)}set expression(e){this.flags=zt(this.flags,8388608,e)}createScope(e){this.scope=new si(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;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===te&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Ms||n.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Wn([],Jn)}}class po extends Tn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t){const n=[];for(const s of this.properties)n.push(...s.declare(e,t));return n}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(Ct,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class fo extends Tn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,left:s,right:i,operator:r}=this;n||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||s.included||s.hasEffectsAsAssignmentTarget(Rn(),!1))&&s.includeAsAssignmentTarget(e,t,"="!==r),i.include(e,t)}initialise(){if(super.initialise(),this.left instanceof Ms){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&this.scope.context.error({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}=X){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=V(e.original,B(e.original,"=",r.end)+1);e.remove(a,l),n&&W(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Ms){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?q(n,a,l,e,t):J(n,a,l,c.type!==se,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"],`${H(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===se,e,t)}r.included&&r instanceof po&&(i===se||i===ee)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class mo extends Tn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Ct,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=X){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class go extends Tn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof ci||e instanceof ho)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const yo={"!=":(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};class bo extends Tn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return Vt;const s=this.left.getLiteralValueAtPath(Ct,t,n);if("symbol"==typeof s)return Vt;const i=this.right.getLiteralValueAtPath(Ct,t,n);if("symbol"==typeof i)return Vt;const r=yo[this.operator];return r?r(s,i):Vt}hasEffects(e){return"+"===this.operator&&this.parent instanceof ri&&""===this.left.getLiteralValueAtPath(Ct,Lt,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=X){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}}class Eo extends Tn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function xo(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(B(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(B(e.original,"(",n.callee.end)+1,n.end-1)}}class So extends Tn{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!==Ut));if(0!==o.length)if(i===Ut)for(const e of o)e.deoptimizePath(Ot);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]!==Ut){this.returnExpression=Gt;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Q,this.deoptimizableDependentExpressions=Z;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Ot)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Ut&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Ut?Vt:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),Vt)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Ut?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),Gt)}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 Ao extends So{get optional(){return Bt(this.flags,128)}set optional(e){this.flags=zt(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof Ms){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(he,Ye(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(he,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${be(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ae("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Ji&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Wi(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(Ct,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===Ln)return Ln;if(this.optional&&null==this.callee.getLiteralValueAtPath(Ct,Lt,this))return!this.annotationPure&&t||Ln;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Ct,this.interaction,e))}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===_n&&this.callee instanceof Ms&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}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}=X){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),xo(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Lt){return null===this.returnExpression?(this.returnExpression=Gt,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Ct,this.interaction,e,this)):this.returnExpression}}class $o extends Tn{createScope(e){this.scope=new ni(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",Ut)),this.body=new oi(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}$o.prototype.preventChildBlockScope=!0;class vo extends Tn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===Ln?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}removeAnnotations(e){this.expression.removeAnnotations(e)}applyDeoptimizations(){}}class wo extends Ts{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new Ns("this",null,t,n,"other")),this.instanceScope=new Ts(this,n),this.instanceScope.variables.set("this",new Qs(n))}findLexicalBoundary(){return this}}class Io extends Tn{createScope(e){this.scope=new wo(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(this,n.static?this.scope:this.scope.instanceScope).parseNode(n));return super.parseNode(e)}applyDeoptimizations(){}}class Po extends Ws{render(e,t,{renderedSurroundingElement:n}=X){super.render(e,t),n===se&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class ko extends jt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new ko(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 No extends Tn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Bt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=zt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Ot);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Z;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();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Vt}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new ko([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();t||this.test.shouldBeIncluded(e)||null===n?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(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}=X){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=B(e.original,":",this.consequent.end),l=V(e.original,(this.consequent.included?B(e.original,"?",this.test.end):a)+1);s&&W(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=this.test.getLiteralValueAtPath(Ct,Lt,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}class Co extends Tn{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}class Oo extends Tn{hasEffects(){return!0}}class Do extends Tn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Ct,Jt,e)}}function Mo(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 Ro(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}class _o extends Tn{hasEffects(e){return!!this.test.hasEffects(e)||Mo(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ro(e,this.body,t)}}class Lo extends Tn{hasEffects(){return!1}}class To extends Tn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}To.prototype.needsBoundaries=!0;class Bo extends Tn{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;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}Bo.prototype.needsBoundaries=!0;class zo extends Tn{applyDeoptimizations(){}}class Vo extends Tn{createScope(e){this.scope=new Fs(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Mo(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ro(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(Ut)}render(e,t){this.left.render(e,t,T),this.right.render(e,t,T),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(Ct),this.scope.context.requestTreeshakingPass()}}class Fo extends Tn{get await(){return Bt(this.flags,131072)}set await(e){this.flags=zt(this.flags,131072,e)}createScope(e){this.scope=new Fs(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=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ro(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(Ut)}render(e,t){this.left.render(e,t,T),this.right.render(e,t,T),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(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class jo extends Tn{createScope(e){this.scope=new Fs(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Mo(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),Ro(e,this.body,t)}render(e,t){this.init?.render(e,t,T),this.test?.render(e,t,T),this.update?.render(e,t,T),this.body.render(e,t)}}class Uo extends ci{createScope(e){super.createScope(this.idScope=new Ts(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Ms(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===te&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=X){super.render(e,t),n===se&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Go extends Fs{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s)}}const Wo=Symbol("unset");class Ho extends Tn{constructor(){super(...arguments),this.testValue=Wo}deoptimizeCache(){this.testValue=Vt}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 Go(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new Go(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)}applyDeoptimizations(){}getTestValue(){return this.testValue===Wo?this.testValue=this.test.getLiteralValueAtPath(Ct,Lt,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!==re&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Ho&&e.alternate)return!0;if(e instanceof oi)return!1;e=e.parent}while(e);return!1}}class qo extends Tn{}class Jo extends Tn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Jo.prototype.needsBoundaries=!0;class Ko extends Tn{applyDeoptimizations(){}}function Xo(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class Yo extends Tn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,this.init||un)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)||this.isUsingDeclaration}include(e,t){const{deoptimized:n,id:s,init:i}=this;n||this.applyDeoptimizations(),this.included=!0,i?.include(e,t),s.markDeclarationReached(),(t||s.shouldBeIncluded(e))&&s.include(e,t)}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=B(e.original,"=",o.end);e.remove(l,V(e.original,t+1))}if(a){if(o instanceof Ms&&a instanceof Po&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?X:{renderedSurroundingElement:se})}else o instanceof Ms&&Xo(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof Ms&&t instanceof Po&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class Zo extends Tn{constructor(){super(...arguments),this.inlineNamespace=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof ri)return Z;if(e instanceof go){const t=e.parent;if(t instanceof ri)return Z;if(t instanceof Yo){const e=t.id;return e instanceof po?ta(e):void 0}if(t instanceof Ji){const e=t.property;if(!t.computed&&e instanceof Ms)return[e.name]}}else if(e instanceof Ji){const t=e.parent,n=e.property;if(!(t instanceof Ao&&n instanceof Ms))return;const s=n.name;if(t.parent instanceof ri&&["catch","finally"].includes(s))return Z;if("then"!==s)return;if(0===t.arguments.length)return Z;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof ho||i instanceof Uo))return;if(0===i.params.length)return Z;const r=i.params[0];return 1===i.params.length&&r instanceof po?ta(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,B(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([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const d=[...ea[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),u&&d.push(u),d.length>0&&this.scope.addAccessedGlobals(d,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},d){const u=d.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(u)return{helper:null,mechanism:u};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof an))return{helper:null,mechanism:null};const n=Qo(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[d,u]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${d}${i}`,a+=`${u})`,!r&&h&&(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",d=Qo(e,t,o),[u,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=d?`${u}${s}(/*#__PURE__*/${d}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:d,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Qo(e,t,n){return"external"===t?Ii[n(e instanceof an?e.id:null)]:"default"===t?Si:null}const ea={amd:["require"],cjs:["require"],system:["module"]};function ta(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 na extends Tn{applyDeoptimizations(){}}class sa extends Tn{applyDeoptimizations(){}}class ia extends Os{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)}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 ra extends Tn{render(e,t,{jsxMode:n}=X){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof ia?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=rn(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?e.overwrite(t.end,s.start,": ",{contentOnly:!0}):e.appendLeft(t.end,": true")}}}}class oa extends Tn{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)}}class aa extends oa{}class la extends oa{}class ca extends Tn{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 da extends Tn{}class ua extends Tn{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)}}function ha(e){let t=0;for(const n of e)n instanceof ua&&n.expression instanceof da||t++;return t}function pa(e,t,n,s){const[i,r]=e.split(".");let o;if(n){if(o=s.scope.context.getImportedJsxFactoryVariable(r?"default":i,s.start,n),t){s.scope.findGlobal(i).include(),o.globalName=i}}else o=s.scope.findGlobal(i);return s.scope.context.includeVariableInModule(o),o instanceof Ns&&(o.consolidateInitializers(),o.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),o}class fa extends Tn{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){if(!this.included){const{factory:e,importSource:t,mode:n}=this.jsxMode;e&&(this.factory=e,this.factoryVariable=pa(e,"preserve"===n,t,this))}super.include(e,t)}applyDeoptimizations(){}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:ha(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 ua&&n.expression instanceof da?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}}}class ma extends fa{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 ca)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,[,...d]=o.split("."),{firstAttribute:u,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...d].join("."),!1);this.wrapAttributes(e,f,h,p,u,"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:d,hasSpread:u,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,d||!!m,u,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:d}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let u=null,h=!1,p=!1,f=d,m=!1,g=null;for(const t of o){if(t instanceof ra){if(s&&"key"===t.name.name){u=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:u,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof ca&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class ga extends fa{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:d}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(d," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class ya extends Tn{}class ba extends Tn{}class Ea extends Tn{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})}}class xa extends Tn{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}include(e,t){if(!this.included){const e=this.scope.context.options.jsx;if("automatic"===e.mode)this.fragment="Fragment",this.fragmentVariable=pa("Fragment",!1,e.jsxImportSource,this);else{const{fragment:t,importSource:n,mode:s}=e;null!=t&&(this.fragment=t,this.fragmentVariable=pa(t,"preserve"===s,n,this))}}super.include(e,t)}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 Sa extends Tn{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 Aa extends Tn{render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.value),{contentOnly:!0})}}class $a extends Tn{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=!0;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.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,V(e.original,B(e.original,":",this.label.end)+1)),this.body.render(e,t)}}class va extends Tn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Bt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=zt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Ot);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Z;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Vt}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new ko([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===this.right&&this.left.shouldBeIncluded(e)||!n?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=X){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=B(e.original,this.operator,this.left.end);if(this.right.included){const t=V(e.original,o+2);e.remove(this.start,t),s&&W(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!F.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(Ct,Lt,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}class wa extends Tn{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(Ct,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}initialise(){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),xo(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}}class Ia extends Tn{constructor(){super(...arguments),this.objectEntity=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)}render(e,t,{renderedSurroundingElement:n}=X){super.render(e,t),n!==se&&n!==ee||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Jn;const t=[];for(const n of this.properties){if(n instanceof Bn){t.push({key:It,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Ct,Lt,this);if("symbol"==typeof e){t.push({key:It,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Ms?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){e=n.value instanceof Gi&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Wn(t,e)}}class Pa extends Tn{initialise(){const e=this.scope.context.module.id;return _e(mt(Le(ht(this.message)),e))}}class ka extends Tn{initialise(){const e=this.start,t=this.scope.context.module.id,n=mt(Le(ht(this.message,e)),t);this.scope.context.error(n,e)}}class Na extends Tn{}class Ca extends Tn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Rn()):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(pe,et(e,s.id,ae(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(he,it(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]}U(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class Oa extends zs{constructor(){super(...arguments),this.declarationInit=null}get method(){return Bt(this.flags,262144)}set method(e){this.flags=zt(this.flags,262144,e)}get shorthand(){return Bt(this.flags,524288)}set shorthand(e){this.flags=zt(this.flags,524288,e)}declare(e,t){return this.declarationInit=t,this.value.declare(e,Ut)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([It,It]),this.scope.context.requestTreeshakingPass())}}class Da extends Tn{get computed(){return Bt(this.flags,1024)}set computed(e){this.flags=zt(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):Vt}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Gt}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Bs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}}class Ma extends Tn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Ut)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}class Ra extends Tn{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 ri)||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=X){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:d,end:u}of G(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&W(e,d,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 L(l,e,d,u);o&&e.remove(o,this.end)}}class _a extends Tn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}}class La extends Tn{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.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:B(e.original,"default",this.start)+7,i=B(e.original,":",s)+1;U(this.consequent,e,i,n.end,t)}else super.render(e,t)}}La.prototype.needsBoundaries=!0;class Ta extends Tn{createScope(e){this.parentScope=e,this.scope=new Fs(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=Rn();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&&U(this.cases,e,this.cases[0].start,this.end-1,t)}}class Ba extends So{bind(){if(super.bind(),this.tag.type===ie){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(he,Ye(e),this.start)}}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(Ct,this.interaction,e)}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[n]=this.getReturnExpression();n.included||n.include(e,!1)}initialise(){super.initialise(),this.args=[Ut,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Ji&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Lt){return null===this.returnExpression?(this.returnExpression=Gt,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Ct,this.interaction,e,this)):this.returnExpression}}class za extends Tn{get tail(){return Bt(this.flags,1048576)}set tail(e){this.flags=zt(this.flags,1048576,e)}bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}class Va extends Tn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Vt:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Gt:In(vn,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||wn(vn,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Fa extends Ts{constructor(e,t){super(e,t),this.variables.set("this",new Ns("this",null,un,t,"other"))}addDeclaration(e,t,n,s){return this.context.module.importDescriptions.has(e.name)&&t.error(pt(e.name),e.start),super.addDeclaration(e,t,n,s)}addExportDefaultDeclaration(e,t,n){const s=new ur(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 ks&&this.accessedOutsideVariables.set(e,n),n}}class ja extends Tn{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(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Fa?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(he,{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:Ae("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 Ua extends Tn{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Ga extends Tn{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?_n: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)}}const Wa={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Vt,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class Ha extends Tn{get prefix(){return Bt(this.flags,2097152)}set prefix(e){this.flags=zt(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return Vt;const s=this.argument.getLiteralValueAtPath(Ct,t,n);return"symbol"==typeof s?Vt:Wa[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Ms)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Ct,qt,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(Ct),this.scope.context.requestTreeshakingPass())}}class qa extends Tn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Ut)}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?q(s,this.start,this.end,e,t):J(s,this.start,this.end,this.parent.type!==se,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${H([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==se,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Ct),this.argument instanceof Ms){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}class Ja extends Tn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=X){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 po||i instanceof uo)&&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=X){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===ie){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)}applyDeoptimizations(){}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,` ${H(r,o)};`)}renderReplacedDeclarations(e,t){const n=G(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=V(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,d="";const u=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Ms&&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,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of n)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof Ms&&Xo(u.id.variable,t.exportNamesByVariable))c&&(d+=";"),l=!1;else{if(h&&h===u.id.variable){const n=B(e.original,"=",u.id.end);q(h,V(e.original,n+1),null===f?m:f,e,t)}l?d+=",":(c&&(d+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,d+o):(e.overwrite(r,r+1,d),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,d=""}else e.remove(p,g),u.removeAnnotations(e);this.renderDeclarationEnd(e,d,r,s,i,u,t)}}class Ka extends Tn{hasEffects(e){return!!this.test.hasEffects(e)||Mo(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ro(e,this.body,t)}}class Xa extends Tn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const Ya=["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"],Za=[Pa,ka,ls,uo,ho,fo,mo,go,bo,oi,Eo,Ao,$o,vo,Io,Hs,Po,No,Co,Oo,Do,ri,_o,Lo,To,ui,Bo,zo,ri,Vo,Fo,jo,di,Uo,Ms,Ho,qo,Jo,Ko,Zo,na,sa,ra,aa,la,ma,da,ua,ga,ia,ya,ba,Ea,xa,ca,Sa,Aa,$a,Gi,Gi,Gi,Gi,Gi,Gi,va,Ji,Zi,Vs,wa,Ia,po,Na,Ca,Oa,Da,ai,Ma,Ra,Bn,js,_a,La,Ta,Ba,za,Va,ja,Ua,Ga,Ha,qa,Ja,Yo,Ka,Xa],Qa=[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=tl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=tl(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=Cn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=e.params=tl(e,s,n[t+2],n);s.addParameterVariables(o.map((e=>e.declare("parameter",Ut))),o[o.length-1]instanceof ai),e.body=el(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Pn[n[t]],e.left=el(e,s,n[t+1],n),e.right=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=el(e,s,n[t],n),e.right=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Pn[n[t]],e.left=el(e,s,n[t+1],n),e.right=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=tl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:el(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Cn(n[t+1],n),e.callee=el(e,s,n[t+2],n),e.arguments=tl(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:el(e,s,i,n);r?.declare("parameter",Ut),e.body=el(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.body=[];if(i){const t=n[i];for(let o=0;o<t;o++){const t=n[i+1+o];r.push(el(e,1&n[t+3]?s:s.instanceScope,t,n))}}},function(e,t,n){const{scope:s}=e;e.decorators=tl(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:el(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:el(e,s,r,n),e.body=el(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=tl(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:el(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:el(e,s,r,n),e.body=el(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=el(e,s,n[t],n),e.consequent=el(e,s,n[t+1],n),e.alternate=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:el(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=el(e,s,n[t],n),e.test=el(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:el(e,s,i,n),e.source=el(e,s,n[t+1],n),e.attributes=tl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=tl(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:el(e,s,i,n),e.attributes=tl(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:el(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=el(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=el(e,s,n[t],n),e.right=el(e,s,n[t+1],n),e.body=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=el(e,s,n[t+1],n),e.right=el(e,s,n[t+2],n),e.body=el(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:el(e,s,i,n);const r=n[t+1];e.test=0===r?null:el(e,s,r,n);const o=n[t+2];e.update=0===o?null:el(e,s,o,n),e.body=el(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=Cn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:el(e,s.parent,o,n);const a=e.params=tl(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Ut))),a[a.length-1]instanceof ai),e.body=el(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=Cn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:el(e,e.idScope,o,n);const a=e.params=tl(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Ut))),a[a.length-1]instanceof ai),e.body=el(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=el(e,s,n[t],n),e.consequent=el(e,e.consequentScope=new Go(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:el(e,e.alternateScope=new Go(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=el(e,s,n[t],n),e.value=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=tl(e,s,n[t],n),e.source=el(e,s,n[t+1],n),e.attributes=tl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=el(e,s,n[t],n),e.sourceAstNode=ao(n[t],n);const i=n[t+1];e.options=0===i?null:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=el(e,s,n[t+1],n),e.imported=0===i?e.local:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=el(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=el(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=el(e,s,n[t],n),e.children=tl(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:el(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=el(e,s,n[t],n),e.children=tl(e,s,n[t+1],n),e.closingFragment=el(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=el(e,s,n[t],n),e.property=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=el(e,s,n[t],n),e.name=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=el(e,s,n[t+1],n),e.attributes=tl(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=el(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=el(e,s,n[t],n),e.body=el(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=Pn[n[t]],e.left=el(e,s,n[t+1],n),e.right=el(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=el(e,s,n[t+1],n),e.property=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=el(e,s,n[t],n),e.property=el(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=tl(e,s,n[t+1],n),e.key=el(e,s,n[t+2],n),e.value=el(e,s,n[t+3],n),e.kind=Pn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Cn(n[t],n),e.callee=el(e,s,n[t+1],n),e.arguments=tl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=tl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=tl(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=tl(e,s,n[t],n),e.invalidAnnotations=Cn(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=el(e,s,n[t+2],n),e.kind=Pn[n[t+3]],e.key=0===r?e.value:el(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=tl(e,s,n[t+1],n),e.key=el(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:el(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=tl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=tl(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:el(e,s,i,n),e.consequent=tl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=el(e,e.parentScope,n[t],n),e.cases=tl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=el(e,s,n[t],n),e.quasi=el(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=tl(e,s,n[t],n),e.expressions=tl(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=el(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=el(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:el(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:el(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Pn[n[t]],e.argument=el(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Pn[n[t+1]],e.argument=el(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Pn[n[t]],e.declarations=tl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=el(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:el(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=el(e,s,n[t],n),e.body=el(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:el(e,s,r,n)}];function el(e,t,n,s){const i=s[n],r=Za[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=Ya[i],o.start=s[n+1],o.end=s[n+2],Qa[i](o,n+3,s),o.initialise(),o}function tl(e,t,n,s){if(0===n)return Z;const i=s[n++],r=[];for(let o=0;o<i;o++){const i=s[n++];r.push(i?el(e,t,i,s):null)}return r}const nl={ArrayExpression:ls,ArrayPattern:uo,ArrowFunctionExpression:ho,AssignmentExpression:fo,AssignmentPattern:mo,AwaitExpression:go,BinaryExpression:bo,BlockStatement:oi,BreakStatement:Eo,CallExpression:Ao,CatchClause:$o,ChainExpression:vo,ClassBody:Io,ClassDeclaration:Hs,ClassExpression:Po,ConditionalExpression:No,ContinueStatement:Co,DebuggerStatement:Oo,Decorator:Do,DoWhileStatement:_o,EmptyStatement:Lo,ExportAllDeclaration:To,ExportDefaultDeclaration:ui,ExportNamedDeclaration:Bo,ExportSpecifier:zo,ExpressionStatement:ri,ForInStatement:Vo,ForOfStatement:Fo,ForStatement:jo,FunctionDeclaration:di,FunctionExpression:Uo,Identifier:Ms,IfStatement:Ho,ImportAttribute:qo,ImportDeclaration:Jo,ImportDefaultSpecifier:Ko,ImportExpression:Zo,ImportNamespaceSpecifier:na,ImportSpecifier:sa,JSXAttribute:ra,JSXClosingElement:aa,JSXClosingFragment:la,JSXElement:ma,JSXEmptyExpression:da,JSXExpressionContainer:ua,JSXFragment:ga,JSXIdentifier:ia,JSXMemberExpression:ya,JSXNamespacedName:ba,JSXOpeningElement:Ea,JSXOpeningFragment:xa,JSXSpreadAttribute:ca,JSXSpreadChild:Sa,JSXText:Aa,LabeledStatement:$a,Literal:Gi,LogicalExpression:va,MemberExpression:Ji,MetaProperty:Zi,MethodDefinition:Vs,NewExpression:wa,ObjectExpression:Ia,ObjectPattern:po,PanicError:Pa,ParseError:ka,PrivateIdentifier:Na,Program:Ca,Property:Oa,PropertyDefinition:Da,RestElement:ai,ReturnStatement:Ma,SequenceExpression:Ra,SpreadElement:Bn,StaticBlock:js,Super:_a,SwitchCase:La,SwitchStatement:Ta,TaggedTemplateExpression:Ba,TemplateElement:za,TemplateLiteral:Va,ThisExpression:ja,ThrowStatement:Ua,TryStatement:Ga,UnaryExpression:Ha,UnknownNode:class extends Tn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:qa,VariableDeclaration:Ja,VariableDeclarator:Yo,WhileStatement:Ka,YieldExpression:Xa};class sl extends Kt{constructor(e){super(Nr),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}var il;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(il||(il={}));const rl=new WeakMap;function ol(e,t){if(e){const t=rl.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=o.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||ol(e)}function al(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?o.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return rl.set(i,s),i}function ll(e){return e.id}const cl=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=ao(0,e);switch(t.type){case"PanicError":return _e(Le(ht(t.message)));case"ParseError":return _e(Le(ht(t.message,t.start)));default:return t}}(co(no(e,t,n))),dl=new Set(["assert","with"]);function ul(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Ia))return n&&t.module.log(he,at(t.module.id),s),Y;const i=n.properties.find((e=>dl.has(hl(e))))?.value;if(!i)return Y;if(!(i instanceof Ia))return t.module.log(he,(r=t.module.id,{code:Fe,message:`Rollup could not statically analyze the options argument of a dynamic import in "${be(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),Y;var r;const o=i.properties.map((e=>{const n=hl(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(he,at(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):Y}const hl=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function pl(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var fl="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},ml={memoryUsage:()=>({heapUsed:0})};let gl=new Map;function yl(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function bl(e,t=3){e=yl(e,t);const n=ml.memoryUsage().heapUsed,s=fl.now(),i=gl.get(e);void 0===i?gl.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function El(e,t=3){e=yl(e,t);const n=gl.get(e);if(void 0!==n){const e=ml.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=fl.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function xl(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of gl)e[t]=[s,n,i];return e}let Sl=cn,Al=cn;const $l=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function vl(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of $l)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Sl(s,4);const t=r.apply(this,e);return Al(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 wl={identifier:null,localName:Nr};function Il(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:_e((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${be(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 Pl(e,t){const n=$t(t.sideEffectDependenciesByVariable,e,vt);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof ur?s.getDirectOriginalVariable():s instanceof pr?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 kl{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.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new sl(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:d,exportAllSources:u,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 d.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of u)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,ll).sort()},get implicitlyLoadedBefore(){return Array.from(f,ll).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!==il.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=O(this.id),t=M(this.id);return tn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Yt(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),_e(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 an)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 pr?s=s.getBaseVariable():s instanceof ur&&(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 ur&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof Xt))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 an)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:_e((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${be(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}=Y){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]=Il(r.module,r.localName,t,!1,i);return e?(t&&(Nl(e,t,this),this.info.moduleSideEffects&&$t(t.sideEffectDependenciesByVariable,e,vt).add(this)),[e]):this.error(ct(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===wl)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(Nl(n,t,this),$t(t.sideEffectDependenciesByVariable,n,vt).add(this)),[n]}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?[$t(this.syntheticExports,e,(()=>new pr(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=Mn();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(ln(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return _e((t=s,n=this.id,{binding:t,code:Ue,exporter:n,message:`Exported variable "${t}" is not defined in "${be(n)}".`,url:Ae($e)}));e.deoptimizePath(Ot),e.included||this.includeVariable(e)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Ot),t.included||this.includeVariable(t),t instanceof Xt&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(Mn(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(ln(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath(Ot),e.included||this.includeVariable(e)),this.exports.has(n)||this.reexportDescriptions.has(n)||(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 an?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?_e((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(Sl("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=al(i),this.sourcemapChain=o.map((e=>e.missing?e:al(e))),ol(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const d=this.id;this.magicString=new x(t,{filename:this.excludeFromSourcemap?null:d,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:d,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>nl[e]||nl.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Fa(this.graph.scope,this.astContext),this.namespace=new hr(this.astContext);const u={context:this.astContext,type:"Module"};if(e)this.ast=new nl[e.type](u,this.scope).parseNode(e),this.info.ast=e;else{Al("generate ast",3);const e=await async function(e,t,n){return no(e,t,n)}(t,!1,!1!==this.options.jsx);Sl("generate ast",3),this.ast=(h=e,p=u,f=this.scope,el(p,f,0,co(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d))return this.graph.astLru.get(d);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(d,e),e)}}})}var h,p,f;Al("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,ll),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}=Y){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 kl&&"*"===r.name)return e.namespace;const[i]=Il(e,r.name,t||this,n,s);return i||this.error(ct(r.name,this.id,e.id),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 To){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Gi?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 Gi){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Gi?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Gi?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Ja)for(const e of t.declarations)for(const t of Vr(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 Ms?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(pt(e),n.local.start);const s=n instanceof Ko?"default":n instanceof na?"*":n.imported instanceof Ms?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,Y)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=ae(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];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(he,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))}Te(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 an||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=>[hl(e),e.value.value]))):Y);var s;const i=this.sourcesWithAttributes.get(e);i?pl(i,n)&&this.log(he,nt(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 "${be(a)}" even though it is needed in "${be(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:Ae(ve)}),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]=Il(o,e,t,!0,Cl(n));o instanceof an||l?r.add(a):a instanceof pr?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(he,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${be(a)}" re-exports "${o}" from one of the modules ${ge(l.map((e=>be(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(he,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${be(t)}" re-exports "${e}" from one of the external modules ${ge(s.map((e=>be(e))))}, guessing "${be(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof an){const[t]=n.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof kl){t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof kl&&t!==this&&Pl(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof kl&&(t.isExecuted||ln(t),t!==this)){const t=Pl(e,this);for(const e of t)e.isExecuted||ln(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(he,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${be(t)}".`})),this.exports.set(e,wl)}tryParse(){try{return cl(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(mt(e,this.id),e.pos)}}}function Nl(e,t,n){if(e.module instanceof kl&&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 Cl=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)]))),Ol=(e,t)=>t?`${e}\n${t}`:e,Dl=(e,t)=>t?`${e}\n\n${t}`:e;const Ml={amd:Ll,cjs:Ll,es:_l,iife:Ll,system:_l,umd:Ll};function Rl(e,t,n,s,i,r,o,a,l,c,d,u,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,u,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof ur&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,_s(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,_s(t.name,e,t.forbiddenNames))}}}(s,f,p),Ml[i](s,n,t,r,o,a,l,c,d);for(const e of f)e.scope.deconflict(i,u,h)}function _l(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof fr)&&(t.variableName=_s(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof an)?n.setRenderNames(null,(t instanceof an?a.get(t):o.get(t)).variableName):t instanceof an&&"default"===s?n.setRenderNames(null,_s([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,_s(tn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,_s(t.name,e,t.forbiddenNames))}function Ll(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=_s(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=_s(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Pi(r(t.id),a)?t.namespaceVariableName:_s(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof an){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=vi[s]?n.defaultVariableName:n.variableName;wi(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Ii[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 Tl(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return _e(ot("default",o,i))}else if("none"===t&&o.length>0)return _e(ot("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(he,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${be(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:Ae(Pe)}}(i,n)),t="named")),t}function Bl(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 zl(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof an){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),zl(e,t,n,s,i,r)):t.push(o)}}const Vl="!~{",Fl="}~",jl=new RegExp(`${Vl}[0-9a-zA-Z_$]{1,17}${Fl}`,"g"),Ul=(e,t)=>e.replace(jl,(e=>t.get(e)||e)),Gl=(e,t,n)=>e.replace(jl,(e=>e===t?n:e)),Wl=Symbol("bundleKeys"),Hl={type:"placeholder"};function ql(e,t,n){return Ee(e)?_e(xt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return _e(xt(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return Ee(r)?_e(xt(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Jl(e,{[Wl]:t}){if(!t.has(e.toLowerCase()))return e;const n=M(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 Kl=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Xl(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(he,(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:Ae("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class Yl{constructor(e,t,n,s,i,r,o,a,l,c,d,u,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=d,this.getPlaceholder=u,this.bundle=h,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!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=tn(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){const m=new Yl([],e,t,n,s,i,r,o,a,l,null,u,h,p,f);m.assignFacadeName(d,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof kl?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 pr&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Ul(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)}}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=Rs(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Rs(s))}while(Zt.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=Tl(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 e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){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(Yl.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=Zl(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}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 mi(Se(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=O(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=ql("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=Jl(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Hl),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=ql("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=Jl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(nc),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,nc),importedBindings:ec(this.getRenderedDependencies(),nc),imports:Array.from(this.dependencies,nc),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=[];zl(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)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof Yl&&this.inlineChunkDependencies(t);const d=this.getPreliminaryFileName(),u=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(d.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,S=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!S&&t.some((e=>"default"===e.reexported))&&(S=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!S)for(const{exported:e}of E)if("default"===e){S=!0;break}const{intro:A,outro:$,banner:v,footer:w}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Ol),t.hookReduceValue("footer",e.footer(n),[n],Ol),t.hookReduceValue("intro",e.intro(n),[n],Dl),t.hookReduceValue("outro",e.outro(n),[n],Dl)]);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 _e((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(i,r,this.getRenderedChunkInfo());if(Br[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:S,hasExports:x,id:d.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:$,snippets:o,usesTopLevelAwait:y},i),v&&f.prepend(v),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return w&&f.append(w),{chunk:this,magicString:f,preliminaryFileName:d,preliminarySourcemapFileName:u,usedModules:g}}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):Zl(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof kl){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(he,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${be(i)}" was reexported through module "${be(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${be(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof pr,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof hr&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof kl){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?Zl(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 pr)){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 Ns){for(const e of s.declarations)if(e.parent instanceof di||e instanceof ui&&e.declaration instanceof di){r=!0;break}}else s instanceof pr&&(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 an){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?vi[n(o.id)]&&i.add(a):t.isNamespace&&Ii[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every((e=>e.startsWith("*"))))&&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 Yl||e instanceof fr)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof an){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?ye(this.fileName):ye(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 an){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return _e(bt(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);$t(t,i,wt).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 kl?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof an?{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=Ql(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(C(e.id.split(tc,1)[0])),r=M(i),o=Kl.has(r)?i.slice(0,-r.length):i;return k(o)?n&&_(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"!==this.inputBase||o.startsWith("/")?R(this.inputBase,o):R(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+O(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(he,Et(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof pr)continue;const a=n.module;if(a instanceof kl){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 _e(bt(a.id,r,!0));o=e&&("default"!==r||wi(t(a.id),!0))}}$t(n,i,wt).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 fr||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof fr?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof fr&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Xl(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof Yl,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 Yl&&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:d,snippets:u}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m}}=l,{_:g,cnst:y,n:b}=u;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const E=new A({separator:`${b}${b}`}),S=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Bl(t.originalCode);if(null!==e)return e}return"\t"}(a,l),$=[];let v="";const w=new Set,I=new Map,P={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:S,pluginDriver:c,snippets:u,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(P);!P.accessedDocumentCurrentScript&&Qi.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete($i),P.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),I.set(e,n),E.addSource(n),$.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(P);o.renderFirst()?v+=b+e:E.addSource(new x(e))}const a=t.get(e.scope);if(a)for(const e of a)w.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();d[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}v&&E.prepend(v+b+b),this.needsExportsShim&&E.prepend(`${b}${y} ${Nr}${g}=${g}void 0;${b}${b}`);const N=h?E:E.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(he,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:w,indent:S,magicString:E,renderedSource:N,usedModules:$,usesTopLevelAwait:k}}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)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}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 pr?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(Nr),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 ji)o.add(e)}Rl(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 ur&&(n=n.getOriginalVariable()),n instanceof pr&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof kl&&(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 kl&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function Zl(e){return Ql(e)??ye(e.id)}function Ql(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function ec(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 tc=/[#?]/,nc=e=>e.getFileName();function*sc(e){for(const t of e)yield*t}function ic(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)rc(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){$t(n,e,vt).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof an||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof kl&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:oc(n,a,o),dynamicImportsByEntry:l}}(e),d=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)),u=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,d),h=function(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])$t(t,e,vt).add(s)}}return i}(u,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(d,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:d}of e){let e=0n,u=-1n;for(const s of c)e|=1n<<BigInt(s),u&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:u,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of d)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...d),h.pure&&=f,h.size+=p,l<<=1n}const c=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 an){if(o.info.moduleSideEffects){const e=$t(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}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(d,u,h,n);return i.push(...function(e,t,n,s,i){Sl("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(ac),s.sort(ac),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return Al("optimize chunks",3),e;t>1&&i("info",ut(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=lc(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),uc(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:d,dependentChunks:u,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)d.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)u.add(e),e.dependencies.delete(r),e.dependencies.add(o);d.delete(o),u.delete(o),uc(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",ut(r.small.size+r.big.size,r.small.size,"After merging chunks"));return Al("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function rc(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 an||n.has(t)||s.add(t)}}function oc(e,t,n){const s=new Map;for(const i of t){const t=$t(s,i,vt),r=n[i];for(const n of sc([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function ac({size:e},{size:t}){return e-t}function lc(e,{big:t,small:n},s,i,r){let o=null;for(const a of sc([n,t])){if(e===a)continue;const t=cc(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function cc(e,t,n,s,i){const r=dc(e,t,n,s,i);return r<n?r+dc(t,e,n-r,s,i):1/0}function dc(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 uc(e,t,n){return e.size<t?n.small:n.big}const hc=(e,t)=>e.execIndex>t.execIndex?1:-1;function pc(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}const fc=(e,t)=>t?`(${e})`:e;class mc{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 gc{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:d,source:{content:u,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=u;else if(null==n[p])n[p]=u;else if(null!=u&&n[p]!==u)return _e(yt(h));const f=[r[0],p,c,o];if(d){let e=i.get(d);void 0===e&&(e=s.length,s.push(d),i.set(d,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,r=s.length-1;for(;i<=r;){const e=i+r>>1,o=s[e];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 yc(e){return function(t,n){return n.missing?(e(he,(s=n.plugin,{code:qe,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:Ae("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new gc({mappings:[],names:[]},[t])):new gc(n,[t]);var s}}function bc(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=D(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new mc(_(i,o,e),s[t])));r=new gc(n,a)}else r=new mc(e,t);return s.reduce(i,r)}let Ec;const xc=e=>function(e){let t,n;try{const r=Fr.__wbindgen_add_to_stack_pointer(-16);Fr.xxhashBase64Url(r,Xr(e));var s=to().getInt32(r+0,!0),i=to().getInt32(r+4,!0);return t=s,n=i,Kr(s,i)}finally{Fr.__wbindgen_add_to_stack_pointer(16),Fr.__wbindgen_export_2(t,n,1)}}(Ac(e)),Sc={base36:e=>function(e){let t,n;try{const r=Fr.__wbindgen_add_to_stack_pointer(-16);Fr.xxhashBase36(r,Xr(e));var s=to().getInt32(r+0,!0),i=to().getInt32(r+4,!0);return t=s,n=i,Kr(s,i)}finally{Fr.__wbindgen_add_to_stack_pointer(16),Fr.__wbindgen_export_2(t,n,1)}}(Ac(e)),base64:xc,hex:e=>function(e){let t,n;try{const r=Fr.__wbindgen_add_to_stack_pointer(-16);Fr.xxhashBase16(r,Xr(e));var s=to().getInt32(r+0,!0),i=to().getInt32(r+4,!0);return t=s,n=i,Kr(s,i)}finally{Fr.__wbindgen_add_to_stack_pointer(16),Fr.__wbindgen_export_2(t,n,1)}}(Ac(e))};function Ac(e){return"string"==typeof e?"undefined"==typeof Buffer?(Ec??=new TextEncoder,Ec.encode(e)):Buffer.from(e):e}let $c="sourceMa";async function vc(e,t,n,s,i){Sl("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())));Al("render chunks",2),Sl("transform chunks",2);const o=Sc[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:d,placeholders:u,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,d=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&d.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:u,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:u,sourcemapFileName:p?.fileName??null,...await wc(f,u,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(jl,(e=>t.has(e)?(n.add(e),`${Vl}${"0".repeat(e.length-5)}${Fl}`):e));return{containedPlaceholders:n,transformedCode:s}})(y,d);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:d,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,d;do{d&&(a=d),d=r(a).slice(0,n.length),c=Gl(s,n,d)}while(i[Wl].has(c.toLowerCase()));i[c]=Hl,o.set(n,d)}return o}(h,l,c,u,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=Ul(o,t);const d=Ul(a,t);let u=null;c&&(u=l?Ul(l,t):`${d}.map`,c.file=Ul(c.file,t),e+=Ic(u,c,i,r)),n[d]=s.finalizeChunk(e,c,u,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Ul(o,t):o,d=null;c&&(d=l?Ul(l,t):`${a}.map`,s+=Ic(d,c,i,r)),n[a]=e.finalizeChunk(s,c,d,t)}}(h,p,t,d,n,s),Al("transform chunks",2)}async function wc(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=al(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:d,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(d||"\n"===c[c.length-1]||(c+="\n"),f){let s;Sl("sourcemaps",3),s=p?_(g||p):h?_(h,t):_(t);a=function(e,t,n,s,i,r){const o=yc(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>bc(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new gc(t,a),c=s.reduce(o,l);let{sources:d,sourcesContent:h,names:p,mappings:f}=c.traceMappings();if(e){const t=D(e);d=d.map((e=>R(t,e))),e=O(e)}h=i?null:h;for(const e of n)ol(e.originalSourcemap,e.sourcemapChain);return new u({file:e,mappings:f,names:p,sources:d,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&_e(xt("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)),y&&(t=y(t,n),"string"!=typeof t&&_e(xt("sourcemapPathTransform function must return a string."))),a.sources[e]=C(t)}Al("sourcemaps",3)}return{code:c,map:a}}function Ic(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=O(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`}$c+="ppingURL";class Pc{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){Sl("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===Wl?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{Sl("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Al("initialize render",2),Sl("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>22)return _e(xt(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${Vl}${Rs(++e).padStart(n-5,"0")}${Fl}`;return s.length>n?_e(xt(`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 _e(lt("output.format",ke,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return _e(lt("output.file",Ie,'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 _e(lt("output.sourcemapFile",Me,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(he,lt("output.amd.id",we,'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();Al("generate chunks",2),await vc(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),Sl("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),Al("generate bundle",2),Al("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)kc(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 kl){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)kc(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{cl(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(he,Ze(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}`,d=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,u=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${d(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=>nn.test(e):e=>!Zt.has(e)&&nn.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${fc(`${r}${fc(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:d,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=rn(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 kl&&(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 D(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)&&k(s.id)&&n.push(s.id);return n}(l,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof an&&s.set(i,new fr(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),u=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):ic(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(hc);const n=new Yl(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,d,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);u.push(n)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function kc(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return _e((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${be(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class Nc extends Ls{constructor(){super(),this.parent=null,this.variables.set("undefined",new dr)}findVariable(e){let t=this.variables.get(e);return t||(t=new ks(e),this.variables.set(e,t)),t}}const Cc=e=>()=>_e(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:Ae("plugin-development/#a-simple-example")}}(e)),Oc=Cc("fs.mkdir"),Dc=Cc("fs.readFile"),Mc=Cc("fs.writeFile");async function Rc(e,t,n,s,i,r,o,a,l){const c=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}=X)=>(l??=!0,s(e,n,o,a,r||Y,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);return null==c?Cc("path.resolve")():c[0]}const _c="at position ",Lc="at output position ";const Tc={delete:()=>!1,get(){},has:()=>!1,set(){}};function Bc(e){return e.startsWith(_c)||e.startsWith(Lc)?_e({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):_e({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 zc=(e,t,n=Uc)=>{const{onwarn:s,onLog:i}=e,r=Vc(n,s);if(i){const e=me[t];return(t,n)=>i(t,Fc(n),((t,n)=>{if("error"===t)return _e(jc(n));me[t]>=e&&r(t,jc(n))}))}return r},Vc=(e,t)=>t?(n,s)=>{n===he?t(Fc(s),(t=>e(he,jc(t)))):e(n,s)}:e,Fc=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),jc=e=>"string"==typeof e?{message:e}:"function"==typeof e?jc(e()):e,Uc=(e,{message:t})=>{switch(e){case he:return console.warn(t);case fe:return console.debug(t);default:return console.info(t)}};function Gc(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(he,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Wc={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Z,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Z,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Z,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Hc={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"}},qc={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Jc=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};_e(lt(`${n}.preset`,s,`valid values are ${ge(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;_e(lt(t,n,`valid values are ${s}${ge(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)},Kc=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 Xc(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:al(e.map);const a=e.code;let l=e.ast;const c=[],d=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=jc(t),n&&Te(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,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(he,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(al("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(d.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Te(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:al({version:3,...bc(e,t,n,s,yc(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new x(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new u({...e,file:null,sourcesContent:e.sourcesContent})},info:g(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:g(e.warn)};var l,y}))}catch(e){return _e(gt(e,f,{hook:"transform",id:i}))}return!h&&d.length>0&&(t.transformFiles=d),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const Yc="resolveDependencies";class Zc{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 Rc(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),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,ed(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,Y),void 0,!1,!e.resolveDependencies||Yc)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(ed(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 Dc(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${be(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:_e(function(e){return{code:"BAD_LOADER",message:`Error loading "${be(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await Xc(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}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(be(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 kl)return r&&pl(e,l.info.attributes)&&this.options.onLog(he,nt(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof an)return _e({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 kl(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const d=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=nd(d).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,d);const h=await d;return a?a===Yc&&await u: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 an))return _e(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${be(t)}", but is already an existing non-external module id.`}}(e,t));pl(l.info.attributes,s)&&this.options.onLog(he,nt(l.info.attributes,s,e,t))}else l=new an(this.options,r,o,a,"absolute"!==i&&k(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 kl&&(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||!k(e.id)||!0===i&&td(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(td(e,n,s)||"absolute"),id:i&&s?Qc(e,t):e}}const i=s?Qc(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:td(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,ul(t.node));return n&&"object"==typeof n&&(t.id=n.id),[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,Y,!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===Yc?nd(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?N(t)?_e(function(e,t){return{code:Xe,exporter:e,id:t,message:`Could not resolve "${e}" from "${be(t)}"`}}(t,n)):(this.options.onLog(he,function(e,t){return{code:Xe,exporter:e,id:t,message:`"${e}" is imported by "${be(t)}", but could not be resolved – treating it as an external dependency.`,url:Ae("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(he,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${be(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await Rc(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Y,!0,Y);if(null==r)return _e(null===s?function(e){return{code:Ke,message:`Could not resolve entry module "${be(e)}".`}}(e):function(e,t){return{code:Ge,message:`Module "${be(e)}" that should be implicitly loaded before "${be(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?_e(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:Ke,message:`Entry module "${be(e)}" cannot be external.`}}(e):function(e,t){return{code:Ge,message:`Module "${be(e)}" that should be implicitly loaded before "${be(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},Y),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?(pl(i.attributes,s)&&this.options.onLog(he,nt(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,Y,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function Qc(e,t){return N(e)?t?_(t,"..",e):_(e):e}function ed(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 td(e,t,n){return!0===n||"ifRelativeSource"===n&&N(t)||!k(e)}async function nd(e){const[t,n]=await e;return Promise.all([...t,...n])}function sd(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return Jl(ql("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return St('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',Re,!1,l),e},names:t,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',Re,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>M(c).slice(1),extname:()=>M(c),hash:e=>r.slice(0,Math.max(0,e||8)),name:()=>c.slice(0,Math.max(0,c.length-M(c).length))}),a)}function id(e,{bundle:t},n){t[Wl].has(e.toLowerCase())?n(he,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Hl}const rd=new Set(["chunk","asset","prebuilt-chunk"]);function od(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return _e(xt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}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&&rd.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!Ee(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):_e(xt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):_e(xt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return _e({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():_e({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?_e({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):_e({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 _e({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return _e(xt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return _e({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=od(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=Sc[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&id(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{$t(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=xc(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:od(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&&id(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>il.LOAD_AND_PARSE)return _e({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return _e(xt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return _e(xt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||Ee(e.fileName))return _e(xt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},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:d}=e;if(!o){const e=i(t);o=s.get(e),o||(o=sd(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const u={...e,fileName:o,source:t};this.filesByReferenceId.set(d,u);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 St('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Re,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Re,!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=sd(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:d}=this;n[l]={fileName:l,get name(){return St('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Re,!1,d),a.name},names:r,needsCodeReference:c,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Re,!1,d),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function ld(e,t,n,s,i){return me[e]<me[i]?cn:(i,r)=>{null!=r&&n(he,{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=jc(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function cd(e,t,n,i,r,o){const{logLevel:a,onLog:l}=i;let c,d=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(_c)||e.name.startsWith(Lc)||o.has(e.name)?d=!1:o.add(e.name)),t)if(d){const n=e.cacheKey||e.name;h=t[n]||(t[n]=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 u=e.name,c={delete:()=>Bc(u),get:()=>Bc(u),has:()=>Bc(u),set:()=>Bc(u)};else c=Tc;var u,h;return{addWatchFile(e){n.watchFiles[e]=!0},cache:c,debug:ld(fe,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>_e(gt(jc(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:ld(pe,"PLUGIN_LOG",l,e.name,a),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:s,watchMode:n.watchMode},parse:cl,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a}=X)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||Y,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:ld(he,"PLUGIN_WARNING",l,e.name,a)}}const dd=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 ud{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,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,cd(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of dd)n in e&&t.onLog(he,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new ud(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,fd))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 $t(this.sortedPlugins,e,(()=>hd(e,this.plugins,t)))}runHook(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));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),_e(gt(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 _e(gt(t,n.name,{hook:e}))}}}function hd(e,t,n=pd){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 pd(e,t,n){"function"!=typeof e&&_e(function(e,t){return{code:je,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 fd(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return _e(function(e,t){return{code:je,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 gd{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 yd{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 _t,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=il.LOAD_AND_PARSE,this.scope=new Nc,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 ud(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Zc(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new gd(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[At]=!0}return t})(e)}async build(){Sl("generate module graph",2),await this.generateModuleGraph(),Al("generate module graph",2),Sl("sort and bind modules",2),this.phase=il.ANALYSE,this.sortModules(),Al("sort and bind modules",2),Sl("mark included statements",2),this.includeStatements(),Al("mark included statements",2),this.phase=il.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 kl?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)ln(t);if(this.options.treeshake){let t=1;do{Sl(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&(e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Al("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()||_e(dt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof kl){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(pc(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof kl&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(he,Qe(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(he,ct(t.name,e.id,t.module.id),t.start)}}function bd(e,t){return t()}function Ed(e,t,n,i){e=hd("onLog",e);const r=me[i],o=(i,a,l=Q)=>{ze(a);if(!(me[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>me[e]<r?cn:n=>o(e,jc(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(fe),error:e=>_e(jc(e)),info:c(pe),meta:{rollupVersion:s,watchMode:n},warn:c(he)},i,a))return}t(i,a)}};return o}const xd=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Sd=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},Ad=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},$d=e=>{const t=e.jsx;if(!t)return!1;const n=Jc(t,Hc,"jsx",ve,"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||_e(lt("jsx",ve,"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&&_e(lt("jsx.mode",ve,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},vd=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},wd=(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[_(t)]=s;return n=>e[n]??t}return()=>t},Id=e=>{if(!1===e.treeshake)return!1;const t=Jc(e.treeshake,Wc,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??Z,moduleSideEffects:Pd(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Pd=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&_e(lt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},kd=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,Nd=/^[a-z]:/i;function Cd(e){const t=Nd.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(kd,"_")}const Od=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return _e(lt("output.file",Ie,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return _e(lt("output.file",Ie,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},Dd=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 _e(lt("output.format",ke,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Md=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?_e(lt("output.inlineDynamicImports",Ne,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Rd=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return _e(lt("output.inlineDynamicImports",Ne,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return _e(lt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},_d=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return _(t)},Ld=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?_e(lt("output.amd.id",we,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?_e(lt("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},Td=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Bd=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?_e(lt("output.dir",Ie,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},zd=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Vd(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return _e({code:Ve,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ae(Pe)});return n||"auto"}const Fd=(e,t)=>(null!=e.externalImportAssertions&&St('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),jd=e=>{const t=Jc(e.generatedCode,qc,"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}},Ud=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},Gd=new Set(["compat","auto","esModule","default","defaultOnly"]),Wd=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Hd(n=t(s)):s in e?e[s]:Hd(e[s]=t(s))}return void 0===t?()=>"default":()=>Hd(t)},Hd=e=>Gd.has(e)?e:_e(lt("output.interop",Ce,`use one of ${Array.from(Gd,(e=>JSON.stringify(e))).join(", ")}`,e)),qd=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return _e(lt("output.manualChunks",Oe,'this option is not supported for "output.inlineDynamicImports"'));if(n)return _e(lt("output.manualChunks",Oe,'this option is not supported for "output.preserveModules"'))}return s||{}},Jd=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Kd=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Xd=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+"/":_e(lt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function Yd(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Zd(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 Kc(e.plugins);Yd(i,Lc);const r=t.createOutputPluginDriver(i);return{...await Qd(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return bd(0,(async()=>{const n=new Pc(r,a,t,o,i),s=await n.generate(e);if(e){if(Sl("WRITE",1),!r.dir&&!r.file)return _e({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Ae(Ie)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=_(t.dir||D(t.file),e.fileName);return await Oc(D(n),{recursive:!0}),Mc(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),Al("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>tu(e)-tu(t)))};var l}))}function Qd(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=Dd(e),o=Md(e,t),a=Rd(e,o,t),l=Od(e,a,t),c=jd(e),d=Fd(e,t),u={amd:Ld(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Td(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Bd(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:zd(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Vd(e,s),extend:e.extend||!1,externalImportAssertions:d,externalImportAttributes:d,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Td(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:Ud(e,i),inlineDynamicImports:o,interop:Wd(e),intro:Td(e,"intro"),manualChunks:qd(e,o,a),minifyInternalExports:Jd(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:Td(e,"outro"),paths:e.paths||{},plugins:await Kc(e.plugins),preserveModules:a,preserveModulesRoot:_d(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Cd,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Xd(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Kd(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 Gc(e,Object.keys(u),"output options",t.onLog),{options:u,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 eu;function tu(e){return"asset"===e.type?eu.ASSET:e.isEntry?eu.ENTRY_CHUNK:eu.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(eu||(eu={})),e.VERSION=s,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:n,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=hd("options",await Kc(e.plugins)),i=e.logLevel||pe,r=Ed(n,zc(e,i),t,i);for(const o of n){const{name:n,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:ld(fe,"PLUGIN_LOG",r,n,i),error:e=>_e(gt(jc(e),n,{hook:"onLog"})),info:ld(pe,"PLUGIN_LOG",r,n,i),meta:{rollupVersion:s,watchMode:t},warn:ld(he,"PLUGIN_WARNING",r,n,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Kc(e.plugins),r=e.logLevel||pe,o=Ed(i,zc(e,r),t,r),a=e.strictDeprecations||!1,l=vd(e),c={cache:xd(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Sd(e.external),input:Ad(e),jsx:$d(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:wd(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:Id(e)};return Gc(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return Yd(i.plugins,_c),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(gl=new Map,Sl=bl,Al=El,e.plugins=e.plugins.map(vl)):(Sl=cn,Al=cn)})(n),await async function(){await ro()}();const r=new yd(n,t),o=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);Sl("BUILD",1),await bd(r.pluginDriver,(async()=>{try{Sl("initialize",2),await r.pluginDriver.hookParallel("buildStart",[n]),Al("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Al("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?_e({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Zd(!1,n,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?_e({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Zd(!0,n,i,e,r)};n.perf&&(a.getTimings=xl);return a}(e,null)}}));
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={})}(this,(function(e){var t,n="undefined"!=typeof document?document.currentScript:null,s="4.25.0-0",i={exports:{}};function r(){return t||(t=1,function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;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}const c=16384,d="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}};class u{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===c&&(this.out+=d.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+d.decode(e.subarray(0,n)):t}}class h{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}}const p=[];function f(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0;for(;n.pos<t;n.pos++){r=o(n,r);const e=o(n,0);if(!l(n,t)){const t=i.pop();t[2]=r,t[3]=e;continue}const a=o(n,0),c=1&o(n,0)?[r,e,0,0,a,o(n,0)]:[r,e,0,0,a];let d=p;if(l(n,t)){d=[];do{const e=o(n,0);d.push(e)}while(l(n,t))}c.vars=d,s.push(c),i.push(c)}return s}function m(e){const t=new u;for(let n=0;n<e.length;)n=g(e,n,t,[0]);return t.flush()}function g(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:d,4:u,vars:h}=r;n>0&&s.write(t),i[0]=a(s,o,i[0]),a(s,l,0),a(s,u,0),a(s,6===r.length?1:0,0),6===r.length&&a(s,r[5],0);for(const e of h)a(s,e,0);for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=d)break;n=g(e,n,s,i)}return s.write(t),i[0]=a(s,c,i[0]),a(s,d,0),n}function y(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0,a=0,c=0,d=0,u=0,f=0,m=0,g=0;do{const e=n.indexOf(";");let t=0;for(;n.pos<e;n.pos++){if(t=o(n,t),!l(n,e)){const e=i.pop();e[2]=r,e[3]=t;continue}const h=o(n,0),y=2&h,b=4&h;let E,x=null,S=p;if(1&h){const e=o(n,a);c=o(n,a===e?c:0),a=e,E=[r,t,0,0,e,c]}else E=[r,t,0,0];if(E.isScope=!!b,y){const e=d,t=u;d=o(n,d);const s=e===d;u=o(n,s?u:0),f=o(n,s&&t===u?f:0),x=[d,u,f]}if(E.callsite=x,l(n,e)){S=[];do{m=r,g=t;const e=o(n,0);let s;if(e<-1){s=[[o(n,0)]];for(let t=-1;t>e;t--){const e=m;m=o(n,m),g=o(n,m===e?g:0);const t=o(n,0);s.push([t,m,g])}}else s=[[e]];S.push(s)}while(l(n,e))}E.bindings=S,s.push(E),i.push(E)}r++,n.pos=e+1}while(n.pos<t);return s}function b(e){if(0===e.length)return"";const t=new u;for(let n=0;n<e.length;)n=E(e,n,t,[0,0,0,0,0,0,0]);return t.flush()}function E(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:d,isScope:u,callsite:h,bindings:p}=r;if(i[0]<o?(x(s,i[0],o),i[0]=o,i[1]=0):n>0&&s.write(t),i[1]=a(s,r[1],i[1]),a(s,(6===r.length?1:0)|(h?2:0)|(u?4:0),0),6===r.length){const{4:e,5:t}=r;e!==i[2]&&(i[3]=0),i[2]=a(s,e,i[2]),i[3]=a(s,t,i[3])}if(h){const{0:e,1:t,2:n}=r.callsite;e!==i[4]?(i[5]=0,i[6]=0):t!==i[5]&&(i[6]=0),i[4]=a(s,e,i[4]),i[5]=a(s,t,i[5]),i[6]=a(s,n,i[6])}if(p)for(const e of p){e.length>1&&a(s,-e.length,0),a(s,e[0][0],0);let t=o,n=l;for(let i=1;i<e.length;i++){const r=e[i];t=a(s,r[1],t),n=a(s,r[2],n),a(s,r[0],0)}}for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=d)break;n=E(e,n,s,i)}return i[0]<c?(x(s,i[0],c),i[0]=c,i[1]=0):s.write(t),i[1]=a(s,d,i[1]),n}function x(e,t,s){do{e.write(n)}while(++t<s)}function S(e){const{length:t}=e,n=new h(e),s=[];let i=0,r=0,a=0,c=0,d=0;do{const e=n.indexOf(";"),t=[];let u=!0,h=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<h&&(u=!1),h=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(d=o(n,d),s=[i,r,a,c,d]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}u||A(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}function A(e){e.sort(P)}function P(e,t){return e[0]-t[0]}function $(e){const s=new u;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const d=e[c];if(c>0&&s.write(n),0===d.length)continue;let u=0;for(let e=0;e<d.length;e++){const n=d[e];e>0&&s.write(t),u=a(s,n[0],u),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()}e.decode=S,e.decodeGeneratedRanges=y,e.decodeOriginalScopes=f,e.encode=$,e.encodeGeneratedRanges=b,e.encodeOriginalScopes=m,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,i.exports)),i.exports}var o=r();class a{constructor(e){this.bits=e instanceof a?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let l=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 c(){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 d=c();class u{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=o.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+d(this.toString())}}function h(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 p=Object.prototype.toString;function f(e){return"[object Object]"===p.call(e)}function m(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 g=/\w/;class y{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;else{if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?g.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 b="\n",E={insertLeft:!1,insertRight:!1,storeName:!1};class x{constructor(e,t={}){const n=new l(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 a},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),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("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("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 x(this.original,{filename:this.filename});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 a(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new y(e.hires),s=m(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)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?h(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new u(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(f(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 E.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),E.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return E.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),E.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(n>=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("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&&(E.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),E.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 l(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("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("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(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(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(b);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(b),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(b),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(b),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(b),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){if(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;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=m(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&&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)){n.slice(i,i+s)!==t&&this.overwrite(i,i+s,t)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const S=Object.prototype.hasOwnProperty;let A=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 x)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!f(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=>{S.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(S.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 x(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 y(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=m(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?h(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 u(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 P=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,$=/^\.?\.\//,v=/\\/g,w=/[/\\]/,I=/\.[^.]+$/;function k(e){return P.test(e)}function N(e){return $.test(e)}function C(e){return e.replace(v,"/")}function O(e){return e.split(w).pop()||""}function D(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function M(e){const t=I.exec(O(e));return t?t[0]:""}function R(e,t){const n=e.split(w).filter(Boolean),s=t.split(w).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 _(...e){const t=e.shift();if(!t)return"/";let n=t.split(w);for(const t of e)if(k(t))n=t.split(w);else{const e=t.split(w);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}function L(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const T={isNoStatement:!0};function B(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 z=/\S/g;function V(e,t){z.lastIndex=t;return z.exec(e).index}const F=/\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 U(e,t,n,s,i){let r,o,a,l,c=e[0],d=!c.included||c.needsBoundaries;d&&(l=n+j(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=d,c=e[n],d=void 0!==c&&(!c.included||c.needsBoundaries),a||d?(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):L(r,t,o,l)):r.render(t,i)}function G(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+B(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 W(e,t,n){for(;;){const[s,i]=j(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function H(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 q(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function K(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${H([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}function J(e,t){if("MemberExpression"===e.type)return!e.computed&&J(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}return!1}const X=Object.freeze(Object.create(null)),Y=Object.freeze({}),Z=Object.freeze([]),Q=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}}),ee="ArrowFunctionExpression",te="CallExpression",ne="ExportDefaultDeclaration",se="ExpressionStatement",ie="Identifier",re="Program";function oe(e,t){return e.start<=t&&t<e.end}function ae(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(oe(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 le(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const ce="...";function de(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(le(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=le(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${ce}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+le(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}const ue="silent",he="warn",pe="info",fe="debug",me={[fe]:0,[pe]:1,[ue]:3,[he]:2};function ge(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 ye(e){const t=O(e);return t.slice(0,Math.max(0,t.length-M(e).length))}function be(e){return k(e)?R(_(),e):e}function Ee(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||k(e)}const xe=/^(\.\.\/)*\.\.$/;function Se(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=C(R(D(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+O(t);if(xe.test(i))return[...i.split("/"),"..",O(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function Ae(e){return`https://rollupjs.org/${e}`}const Pe="troubleshooting/#error-name-is-not-exported-by-module",$e="configuration-options/#jsx",ve="configuration-options/#output-amd-id",we="configuration-options/#output-dir",Ie="configuration-options/#output-exports",ke="configuration-options/#output-format",Ne="configuration-options/#output-inlinedynamicimports",Ce="configuration-options/#output-interop",Oe="configuration-options/#output-manualchunks",De="configuration-options/#output-name",Me="configuration-options/#output-sourcemapfile",Re="plugin-development/#generatebundle";function _e(e){throw e instanceof Error?e:Le(e)}function Le(e){ze(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Te(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=ae(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=de(n,t,s)}}const Be=Symbol("augmented");function ze(e){if(!e.plugin&&!e.loc||e[Be])return;e[Be]=!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+=`${be(n)}${s}: `}const s=e.message;e.message=t+e.message,rt(e,s)}const Ve="INVALID_EXPORT_OPTION",Fe="INVALID_IMPORT_ATTRIBUTE",je="INVALID_PLUGIN_HOOK",Ue="MISSING_EXPORT",Ge="MISSING_IMPLICIT_DEPENDANT",We="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",He="PARSE_ERROR",qe="SOURCEMAP_BROKEN",Ke="UNEXPECTED_NAMED_IMPORT",Je="UNRESOLVED_ENTRY",Xe="UNRESOLVED_IMPORT";function Ye(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function Ze({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Te(i,n,t,e),i}function Qe(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(be).join(" -> ")}`}}function et(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${be(t)} is at (${n}:${s})\n${de(e,n,s)}`}}function tt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${be(t)}".`}}function nt(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${be(s)}" tried to import "${be(n)}" with ${st(t)} attributes, but it was already imported elsewhere with ${st(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const st=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function it(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${be(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ae("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function rt(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function ot(e,t,n){return{code:Ve,message:`"${e}" was specified for "output.exports", but entry module "${be(n)}" has the following exports: ${ge(t)}`,url:Ae(Ie)}}function at(e){return{code:Fe,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${be(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function lt(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ae(t)}}function ct(e,t,n){const s=".json"===M(n);return{binding:e,code:Ue,exporter:n,id:t,message:`"${e}" is not exported by "${be(n)}", imported by "${be(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Ae(Pe)}}function dt(e){const t=[...e.implicitlyLoadedBefore].map((e=>be(e.id))).sort();return{code:Ge,message:`Module "${be(e.id)}" that should be implicitly loaded before ${ge(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function ut(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function ht(e,t){return{code:He,message:e,pos:t}}function pt(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function ft(e){return{code:"RESERVED_NAMESPACE",message:`You have overided reserved namespace "${e}"`}}function mt(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)"),rt({cause:e,code:He,id:t,message:n,stack:e.stack},e.message)}function gt(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 yt(e){return{code:qe,message:`Multiple conflicting contents for sourcemap source ${e}`}}function bt(e,t,n){const s=n?"reexport":"import";return{code:Ke,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${be(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ae(Ce)}}function Et(e){return{code:Ke,exporter:e,message:`There was a namespace "*" reexport from the external module "${be(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:Ae(Ce)}}function xt(e){return{code:"VALIDATION_ERROR",message:e}}function St(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:Ae(t)}}(e,t);if(i)return _e(n);s(he,n)}}(e,t,n,s.onLog,s.strictDeprecations)}const At=Symbol("PureFunction");function Pt(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function $t(){return new Set}function vt(){return[]}const wt=Symbol("Unknown Key"),It=Symbol("Unknown Non-Accessor Key"),kt=Symbol("Unknown Integer"),Nt=Symbol("Symbol.toStringTag"),Ct=[],Ot=[wt],Dt=[It],Mt=[kt],Rt=Symbol("Entities");class _t{constructor(){this.entityPaths=Object.create(null,{[Rt]:{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,{[Rt]:{value:new Set}});return t[Rt]}}const Lt=new _t;class Tt{constructor(){this.entityPaths=Object.create(null,{[Rt]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[Rt]:{value:new Map}});const i=Pt(s[Rt],t,$t);return!!i.has(n)||(i.add(n),!1)}}const Bt=Object.freeze({[wt]:Y});class zt{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[wt])return!0;if("symbol"==typeof r)return n[s]=Bt,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}includeAllPaths(e,t,n){const{includedPaths:s}=this;s&&Vt(e,t,n,s)}}function Vt(e,t,n,s){if(s[wt])return e.includePath([...n,wt],t,!1);const i=Object.keys(s);if(0===i.length)return e.includePath(n,t,!1);for(const r of i)Vt(e,t,[...n,r],s[r])}function Ft(e,t){return!!(e&t)}function jt(e,t,n){return e&~t|-n&t}const Ut=Symbol("Unknown Value"),Gt=Symbol("Unknown Truthy Value");class Wt{constructor(){this.flags=0}get included(){return Ft(this.flags,1)}set included(e){this.flags=jt(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){Kt(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Ut}getReturnExpressionWhenCalledAtPath(e,t,n,s){return qt}hasEffectsOnInteractionAtPath(e,t,n){return!0}includePath(e,t,n,s){this.included=!0}includeCallArguments(e,t){for(const n of t.args)n?.includePath(Ot,e,!1)}shouldBeIncluded(e){return!0}}const Ht=new class extends Wt{},qt=[Ht,!1],Kt=e=>{for(const t of e.args)t?.deoptimizePath(Ot)},Jt={args:[null],type:0},Xt={args:[null,Ht],type:1},Yt={args:[null],type:2,withNew:!1};class Zt extends Wt{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===te&&e.parent.callee===e||e.parent.type===ne||(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 Qt extends Zt{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 en(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 tn=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"]),nn=/[^\w$]/g,sn=e=>(e=>/\d/.test(e[0]))(e)||tn.has(e)||"arguments"===e;function rn(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(nn,"_"),sn(e)&&(e=`_${e}`),e||"_"}const on=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,an=/^(?:0|[1-9]\d*)$/;function ln(e){return on.test(e)?"__proto__"===e?'["__proto__"]':e:an.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function cn(e){return on.test(e)?e:JSON.stringify(e)}class dn{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=rn(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:Z,dynamicallyImportedIds:Z,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:Z,implicitlyLoadedBefore:Z,importedIdResolutions:Z,importedIds:Z,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){en(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new Qt(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(he,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${ge(i=e,["is","are"])} imported from external module "${s}" but never used in ${ge(r.map((e=>be(e))))}.`,names:i})}}function un(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 dn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const hn=()=>{};function pn(e,t=null){return Object.create(t,e)}const fn=new class extends Wt{getLiteralValueAtPath(){}},mn={value:{hasEffectsWhenCalled:null,returns:Ht}},gn=new class extends Wt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Nn($n,e[0]):qt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||kn($n,e[0],t,n)}},yn={value:{hasEffectsWhenCalled:null,returns:gn}},bn=new class extends Wt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Nn(vn,e[0]):qt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||kn(vn,e[0],t,n)}},En={value:{hasEffectsWhenCalled:null,returns:bn}},xn=new class extends Wt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Nn(In,e[0]):qt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||kn(In,e[0],t,n)}},Sn={value:{hasEffectsWhenCalled:null,returns:xn}},An={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Ct,Lt,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Ct,Yt,t)},returns:xn}},Pn=pn({hasOwnProperty:yn,isPrototypeOf:yn,propertyIsEnumerable:yn,toLocaleString:Sn,toString:Sn,valueOf:mn}),$n=pn({valueOf:yn},Pn),vn=pn({toExponential:Sn,toFixed:Sn,toLocaleString:Sn,toPrecision:Sn,valueOf:En},Pn),wn=pn({exec:mn,test:yn},Pn),In=pn({anchor:Sn,at:mn,big:Sn,blink:Sn,bold:Sn,charAt:Sn,charCodeAt:En,codePointAt:mn,concat:Sn,endsWith:yn,fixed:Sn,fontcolor:Sn,fontsize:Sn,includes:yn,indexOf:En,italics:Sn,lastIndexOf:En,link:Sn,localeCompare:En,match:mn,matchAll:mn,normalize:Sn,padEnd:Sn,padStart:Sn,repeat:Sn,replace:An,replaceAll:An,search:En,slice:Sn,small:Sn,split:mn,startsWith:yn,strike:Sn,sub:Sn,substr:Sn,substring:Sn,sup:Sn,toLocaleLowerCase:Sn,toLocaleUpperCase:Sn,toLowerCase:Sn,toString:Sn,toUpperCase:Sn,trim:Sn,trimEnd:Sn,trimLeft:Sn,trimRight:Sn,trimStart:Sn,valueOf:Sn},Pn);function kn(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Nn(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:qt}var Cn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const On="_rollupAnnotations",Dn="_rollupRemoved",Mn=(e,t)=>{if(0===e)return Z;const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(Rn(t[e++],t));return s},Rn=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Cn[t[e]]}},_n={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"]};function Ln(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Tn(){return{accessed:new _t,assigned:new _t,brokenFlow:!1,called:new Tt,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Tt,replacedVariableInits:new Map}}const Bn="variables",zn=Symbol("IS_SKIPPED_CHAIN");class Vn extends Wt{get deoptimized(){return Ft(this.flags,2)}set deoptimized(e){this.flags=jt(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 _n[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 _n[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(Ct,this.assignmentInteraction,e)}includePath(e,t,n,s){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const e of _n[this.type]){const s=this[e];if(null!==s)if(Array.isArray(s))for(const e of s)e?.includePath(Ot,t,n);else s.includePath(Ot,t,n)}}includeAsAssignmentTarget(e,t,n){this.includePath(Ot,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===Dn&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(this,this.scope).parseNode(e))}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return _n[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 _n[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(Tn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of _n[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Ot);else t.deoptimizePath(Ot)}this.scope.context.requestTreeshakingPass()}}class Fn extends Vn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[wt,...t],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(Ot,Jt,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([wt,wt]),this.scope.context.requestTreeshakingPass()}}class jn extends Wt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Mt),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Ot)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?qt:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Ht:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(Mt,Xt,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(Ct,Yt,n))return!0}return!1}}const Un=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:gn})],Gn=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:xn})],Wn=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:bn})],Hn=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ht})],qn=/^\d+$/;class Kn extends Wt{get hasLostTrack(){return Ft(this.flags,2048)}set hasLostTrack(e){this.flags=jt(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Ft(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=jt(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Ft(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=jt(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(Ot);this.prototypeExpression?.deoptimizePath([wt,wt]),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 Kt(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(qn.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(qn.test(e))for(const e of t)e.deoptimizePath(Ot);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===kt)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===It);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?Ot: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,wt]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Gt;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?Ut:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return qt;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):qt}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===It)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)}includePath(e,t,n){this.included=!0;const[s,...i]=e;if(null==s||n){for(const e of this.allProperties)(n||e.shouldBeIncluded(t))&&e.includePath(Ct,t,n);this.prototypeExpression?.includePath(Ct,t,n)}else{const[r,o]="string"==typeof s?[[...new Set([...this.propertiesAndGettersByKey[s]||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey[s]||this.unmatchablePropertiesAndSetters])],i]:[this.allProperties,Ot];for(const e of r)e.includePath(o,t,n);this.prototypeExpression?.includePath(e,t,n)}}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchablePropertiesAndSetters:l,unmatchableGetters:c,unmatchableSetters:d}=this;for(let u=e.length-1;u>=0;u--){const{key:h,kind:p,property:f}=e[u];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...l],i[h]=[f,...d]):"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===kt){o.push(f);continue}"set"===p&&d.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(Ot)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(qn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Mt)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&qn.test(e)||this.deoptimizedPaths[e])return Ht;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&qn.test(e)?Ht:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return Ht;const n=this.getMemberExpression(e);if(n!==Ht&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const Jn=e=>"string"==typeof e&&/^\d+$/.test(e),Xn=new class extends Wt{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||Jn(t[0])||Kt(e)}getLiteralValueAtPath(e){return 1===e.length&&Jn(e[0])?void 0:Ut}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Yn=new Kn({__proto__:null,hasOwnProperty:Un,isPrototypeOf:Un,propertyIsEnumerable:Un,toLocaleString:Gn,toString:Gn,valueOf:Hn},Xn,!0),Zn=[{key:kt,kind:"init",property:Ht},{key:"length",kind:"init",property:bn}],Qn=[new jn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:gn})],es=[new jn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:bn})],ts=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Kn(Zn,ds),returnsPrimitive:null})],ns=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Kn(Zn,ds),returnsPrimitive:null})],ss=[new jn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Kn(Zn,ds),returnsPrimitive:null})],is=[new jn({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:bn})],rs=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Ht})],os=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ht})],as=[new jn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ht})],ls=[new jn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],cs=[new jn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ds=new Kn({__proto__:null,at:os,concat:ns,copyWithin:ls,entries:ns,every:Qn,fill:ls,filter:ss,find:as,findIndex:es,findLast:as,findLastIndex:es,flat:ns,flatMap:ss,forEach:as,includes:Un,indexOf:Wn,join:Gn,keys:Hn,lastIndexOf:Wn,map:ss,pop:rs,push:is,reduce:as,reduceRight:as,reverse:ls,shift:rs,slice:ns,some:Qn,sort:cs,splice:ts,toLocaleString:Gn,toString:Gn,unshift:is,values:os},Yn,!0);class us extends Vn{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)}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 Fn)&&(e=!0,n.deoptimizePath(Ot))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:bn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Fn?s&&(t=!0,e.unshift({key:kt,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:fn})}return this.objectEntity=new Kn(e,ds)}}const hs=Symbol("Value Properties"),ps=()=>Gt,fs=()=>!1,ms=()=>!0,gs={deoptimizeArgumentsOnCall:hn,getLiteralValue:ps,hasEffectsWhenCalled:fs},ys={deoptimizeArgumentsOnCall:hn,getLiteralValue:ps,hasEffectsWhenCalled:ms},bs={deoptimizeArgumentsOnCall:hn,getLiteralValue:ps,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof us)},Es={deoptimizeArgumentsOnCall:hn,getLiteralValue:ps,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof Wt)||s.hasEffectsOnInteractionAtPath(Ot,Jt,t)}},xs={__proto__:null,[hs]:ys},Ss={__proto__:null,[hs]:gs},As={__proto__:null,[hs]:Es},Ps={__proto__:null,[hs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Ot)},getLiteralValue:ps,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Dt,Xt,t)}},$s={__proto__:null,[hs]:ys,prototype:xs},vs={__proto__:null,[hs]:gs,prototype:xs},ws={__proto__:null,[hs]:bs,prototype:xs},Is={__proto__:null,[hs]:gs,from:xs,of:Ss,prototype:xs},ks={__proto__:null,[hs]:gs,supportedLocalesOf:vs},Ns={global:xs,globalThis:xs,self:xs,window:xs,__proto__:null,[hs]:ys,Array:{__proto__:null,[hs]:ys,from:xs,isArray:Ss,of:Ss,prototype:xs},ArrayBuffer:{__proto__:null,[hs]:gs,isView:Ss,prototype:xs},AggregateError:ws,Atomics:xs,BigInt:$s,BigInt64Array:$s,BigUint64Array:$s,Boolean:vs,constructor:$s,DataView:vs,Date:{__proto__:null,[hs]:gs,now:Ss,parse:Ss,prototype:xs,UTC:Ss},decodeURI:Ss,decodeURIComponent:Ss,encodeURI:Ss,encodeURIComponent:Ss,Error:vs,escape:Ss,eval:xs,EvalError:vs,FinalizationRegistry:$s,Float32Array:Is,Float64Array:Is,Function:$s,hasOwnProperty:xs,Infinity:xs,Int16Array:Is,Int32Array:Is,Int8Array:Is,isFinite:Ss,isNaN:Ss,isPrototypeOf:xs,JSON:xs,Map:ws,Math:{__proto__:null,[hs]:ys,abs:Ss,acos:Ss,acosh:Ss,asin:Ss,asinh:Ss,atan:Ss,atan2:Ss,atanh:Ss,cbrt:Ss,ceil:Ss,clz32:Ss,cos:Ss,cosh:Ss,exp:Ss,expm1:Ss,floor:Ss,fround:Ss,hypot:Ss,imul:Ss,log:Ss,log10:Ss,log1p:Ss,log2:Ss,max:Ss,min:Ss,pow:Ss,random:Ss,round:Ss,sign:Ss,sin:Ss,sinh:Ss,sqrt:Ss,tan:Ss,tanh:Ss,trunc:Ss},NaN:xs,Number:{__proto__:null,[hs]:gs,isFinite:Ss,isInteger:Ss,isNaN:Ss,isSafeInteger:Ss,parseFloat:Ss,parseInt:Ss,prototype:xs},Object:{__proto__:null,[hs]:gs,create:Ss,defineProperty:Ps,defineProperties:Ps,freeze:Ps,getOwnPropertyDescriptor:Ss,getOwnPropertyDescriptors:Ss,getOwnPropertyNames:Ss,getOwnPropertySymbols:Ss,getPrototypeOf:Ss,hasOwn:Ss,is:Ss,isExtensible:Ss,isFrozen:Ss,isSealed:Ss,keys:Ss,fromEntries:xs,entries:As,values:As,prototype:xs},parseFloat:Ss,parseInt:Ss,Promise:{__proto__:null,[hs]:ys,all:xs,allSettled:xs,any:xs,prototype:xs,race:xs,reject:xs,resolve:xs},propertyIsEnumerable:xs,Proxy:xs,RangeError:vs,ReferenceError:vs,Reflect:xs,RegExp:vs,Set:ws,SharedArrayBuffer:$s,String:{__proto__:null,[hs]:gs,fromCharCode:Ss,fromCodePoint:Ss,prototype:xs,raw:Ss},Symbol:{__proto__:null,[hs]:gs,for:Ss,keyFor:Ss,prototype:xs,toStringTag:{__proto__:null,[hs]:{deoptimizeArgumentsOnCall:hn,getLiteralValue:()=>Nt,hasEffectsWhenCalled:ms}}},SyntaxError:vs,toLocaleString:xs,toString:xs,TypeError:vs,Uint16Array:Is,Uint32Array:Is,Uint8Array:Is,Uint8ClampedArray:Is,unescape:Ss,URIError:vs,valueOf:xs,WeakMap:ws,WeakRef:$s,WeakSet:ws,clearInterval:$s,clearTimeout:$s,console:{__proto__:null,[hs]:ys,assert:$s,clear:$s,count:$s,countReset:$s,debug:$s,dir:$s,dirxml:$s,error:$s,exception:$s,group:$s,groupCollapsed:$s,groupEnd:$s,info:$s,log:$s,table:$s,time:$s,timeEnd:$s,timeLog:$s,trace:$s,warn:$s},Intl:{__proto__:null,[hs]:ys,Collator:ks,DateTimeFormat:ks,DisplayNames:ks,ListFormat:ks,Locale:ks,NumberFormat:ks,PluralRules:ks,RelativeTimeFormat:ks,Segmenter:ks},setInterval:$s,setTimeout:$s,TextDecoder:$s,TextEncoder:$s,URL:{__proto__:null,[hs]:ys,prototype:xs,canParse:Ss},URLSearchParams:$s,AbortController:$s,AbortSignal:$s,addEventListener:xs,alert:xs,AnalyserNode:$s,Animation:$s,AnimationEvent:$s,applicationCache:xs,ApplicationCache:$s,ApplicationCacheErrorEvent:$s,atob:xs,Attr:$s,Audio:$s,AudioBuffer:$s,AudioBufferSourceNode:$s,AudioContext:$s,AudioDestinationNode:$s,AudioListener:$s,AudioNode:$s,AudioParam:$s,AudioProcessingEvent:$s,AudioScheduledSourceNode:$s,AudioWorkletNode:$s,BarProp:$s,BaseAudioContext:$s,BatteryManager:$s,BeforeUnloadEvent:$s,BiquadFilterNode:$s,Blob:$s,BlobEvent:$s,blur:xs,BroadcastChannel:$s,btoa:xs,ByteLengthQueuingStrategy:$s,Cache:$s,caches:xs,CacheStorage:$s,cancelAnimationFrame:xs,cancelIdleCallback:xs,CanvasCaptureMediaStreamTrack:$s,CanvasGradient:$s,CanvasPattern:$s,CanvasRenderingContext2D:$s,ChannelMergerNode:$s,ChannelSplitterNode:$s,CharacterData:$s,clientInformation:xs,ClipboardEvent:$s,close:xs,closed:xs,CloseEvent:$s,Comment:$s,CompositionEvent:$s,confirm:xs,ConstantSourceNode:$s,ConvolverNode:$s,CountQueuingStrategy:$s,createImageBitmap:xs,Credential:$s,CredentialsContainer:$s,crypto:xs,Crypto:$s,CryptoKey:$s,CSS:$s,CSSConditionRule:$s,CSSFontFaceRule:$s,CSSGroupingRule:$s,CSSImportRule:$s,CSSKeyframeRule:$s,CSSKeyframesRule:$s,CSSMediaRule:$s,CSSNamespaceRule:$s,CSSPageRule:$s,CSSRule:$s,CSSRuleList:$s,CSSStyleDeclaration:$s,CSSStyleRule:$s,CSSStyleSheet:$s,CSSSupportsRule:$s,CustomElementRegistry:$s,customElements:xs,CustomEvent:{__proto__:null,[hs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:ps,hasEffectsWhenCalled:fs},prototype:xs},DataTransfer:$s,DataTransferItem:$s,DataTransferItemList:$s,defaultstatus:xs,defaultStatus:xs,DelayNode:$s,DeviceMotionEvent:$s,DeviceOrientationEvent:$s,devicePixelRatio:xs,dispatchEvent:xs,document:xs,Document:$s,DocumentFragment:$s,DocumentType:$s,DOMError:$s,DOMException:$s,DOMImplementation:$s,DOMMatrix:$s,DOMMatrixReadOnly:$s,DOMParser:$s,DOMPoint:$s,DOMPointReadOnly:$s,DOMQuad:$s,DOMRect:$s,DOMRectReadOnly:$s,DOMStringList:$s,DOMStringMap:$s,DOMTokenList:$s,DragEvent:$s,DynamicsCompressorNode:$s,Element:$s,ErrorEvent:$s,Event:$s,EventSource:$s,EventTarget:$s,external:xs,fetch:xs,File:$s,FileList:$s,FileReader:$s,find:xs,focus:xs,FocusEvent:$s,FontFace:$s,FontFaceSetLoadEvent:$s,FormData:$s,frames:xs,GainNode:$s,Gamepad:$s,GamepadButton:$s,GamepadEvent:$s,getComputedStyle:xs,getSelection:xs,HashChangeEvent:$s,Headers:$s,history:xs,History:$s,HTMLAllCollection:$s,HTMLAnchorElement:$s,HTMLAreaElement:$s,HTMLAudioElement:$s,HTMLBaseElement:$s,HTMLBodyElement:$s,HTMLBRElement:$s,HTMLButtonElement:$s,HTMLCanvasElement:$s,HTMLCollection:$s,HTMLContentElement:$s,HTMLDataElement:$s,HTMLDataListElement:$s,HTMLDetailsElement:$s,HTMLDialogElement:$s,HTMLDirectoryElement:$s,HTMLDivElement:$s,HTMLDListElement:$s,HTMLDocument:$s,HTMLElement:$s,HTMLEmbedElement:$s,HTMLFieldSetElement:$s,HTMLFontElement:$s,HTMLFormControlsCollection:$s,HTMLFormElement:$s,HTMLFrameElement:$s,HTMLFrameSetElement:$s,HTMLHeadElement:$s,HTMLHeadingElement:$s,HTMLHRElement:$s,HTMLHtmlElement:$s,HTMLIFrameElement:$s,HTMLImageElement:$s,HTMLInputElement:$s,HTMLLabelElement:$s,HTMLLegendElement:$s,HTMLLIElement:$s,HTMLLinkElement:$s,HTMLMapElement:$s,HTMLMarqueeElement:$s,HTMLMediaElement:$s,HTMLMenuElement:$s,HTMLMetaElement:$s,HTMLMeterElement:$s,HTMLModElement:$s,HTMLObjectElement:$s,HTMLOListElement:$s,HTMLOptGroupElement:$s,HTMLOptionElement:$s,HTMLOptionsCollection:$s,HTMLOutputElement:$s,HTMLParagraphElement:$s,HTMLParamElement:$s,HTMLPictureElement:$s,HTMLPreElement:$s,HTMLProgressElement:$s,HTMLQuoteElement:$s,HTMLScriptElement:$s,HTMLSelectElement:$s,HTMLShadowElement:$s,HTMLSlotElement:$s,HTMLSourceElement:$s,HTMLSpanElement:$s,HTMLStyleElement:$s,HTMLTableCaptionElement:$s,HTMLTableCellElement:$s,HTMLTableColElement:$s,HTMLTableElement:$s,HTMLTableRowElement:$s,HTMLTableSectionElement:$s,HTMLTemplateElement:$s,HTMLTextAreaElement:$s,HTMLTimeElement:$s,HTMLTitleElement:$s,HTMLTrackElement:$s,HTMLUListElement:$s,HTMLUnknownElement:$s,HTMLVideoElement:$s,IDBCursor:$s,IDBCursorWithValue:$s,IDBDatabase:$s,IDBFactory:$s,IDBIndex:$s,IDBKeyRange:$s,IDBObjectStore:$s,IDBOpenDBRequest:$s,IDBRequest:$s,IDBTransaction:$s,IDBVersionChangeEvent:$s,IdleDeadline:$s,IIRFilterNode:$s,Image:$s,ImageBitmap:$s,ImageBitmapRenderingContext:$s,ImageCapture:$s,ImageData:$s,indexedDB:xs,innerHeight:xs,innerWidth:xs,InputEvent:$s,IntersectionObserver:$s,IntersectionObserverEntry:$s,isSecureContext:xs,KeyboardEvent:$s,KeyframeEffect:$s,length:xs,localStorage:xs,location:xs,Location:$s,locationbar:xs,matchMedia:xs,MediaDeviceInfo:$s,MediaDevices:$s,MediaElementAudioSourceNode:$s,MediaEncryptedEvent:$s,MediaError:$s,MediaKeyMessageEvent:$s,MediaKeySession:$s,MediaKeyStatusMap:$s,MediaKeySystemAccess:$s,MediaList:$s,MediaQueryList:$s,MediaQueryListEvent:$s,MediaRecorder:$s,MediaSettingsRange:$s,MediaSource:$s,MediaStream:$s,MediaStreamAudioDestinationNode:$s,MediaStreamAudioSourceNode:$s,MediaStreamEvent:$s,MediaStreamTrack:$s,MediaStreamTrackEvent:$s,menubar:xs,MessageChannel:$s,MessageEvent:$s,MessagePort:$s,MIDIAccess:$s,MIDIConnectionEvent:$s,MIDIInput:$s,MIDIInputMap:$s,MIDIMessageEvent:$s,MIDIOutput:$s,MIDIOutputMap:$s,MIDIPort:$s,MimeType:$s,MimeTypeArray:$s,MouseEvent:$s,moveBy:xs,moveTo:xs,MutationEvent:$s,MutationObserver:$s,MutationRecord:$s,name:xs,NamedNodeMap:$s,NavigationPreloadManager:$s,navigator:xs,Navigator:$s,NetworkInformation:$s,Node:$s,NodeFilter:xs,NodeIterator:$s,NodeList:$s,Notification:$s,OfflineAudioCompletionEvent:$s,OfflineAudioContext:$s,offscreenBuffering:xs,OffscreenCanvas:$s,open:xs,openDatabase:xs,Option:$s,origin:xs,OscillatorNode:$s,outerHeight:xs,outerWidth:xs,PageTransitionEvent:$s,pageXOffset:xs,pageYOffset:xs,PannerNode:$s,parent:xs,Path2D:$s,PaymentAddress:$s,PaymentRequest:$s,PaymentRequestUpdateEvent:$s,PaymentResponse:$s,performance:xs,Performance:$s,PerformanceEntry:$s,PerformanceLongTaskTiming:$s,PerformanceMark:$s,PerformanceMeasure:$s,PerformanceNavigation:$s,PerformanceNavigationTiming:$s,PerformanceObserver:$s,PerformanceObserverEntryList:$s,PerformancePaintTiming:$s,PerformanceResourceTiming:$s,PerformanceTiming:$s,PeriodicWave:$s,Permissions:$s,PermissionStatus:$s,personalbar:xs,PhotoCapabilities:$s,Plugin:$s,PluginArray:$s,PointerEvent:$s,PopStateEvent:$s,postMessage:xs,Presentation:$s,PresentationAvailability:$s,PresentationConnection:$s,PresentationConnectionAvailableEvent:$s,PresentationConnectionCloseEvent:$s,PresentationConnectionList:$s,PresentationReceiver:$s,PresentationRequest:$s,print:xs,ProcessingInstruction:$s,ProgressEvent:$s,PromiseRejectionEvent:$s,prompt:xs,PushManager:$s,PushSubscription:$s,PushSubscriptionOptions:$s,queueMicrotask:xs,RadioNodeList:$s,Range:$s,ReadableStream:$s,RemotePlayback:$s,removeEventListener:xs,Request:$s,requestAnimationFrame:xs,requestIdleCallback:xs,resizeBy:xs,ResizeObserver:$s,ResizeObserverEntry:$s,resizeTo:xs,Response:$s,RTCCertificate:$s,RTCDataChannel:$s,RTCDataChannelEvent:$s,RTCDtlsTransport:$s,RTCIceCandidate:$s,RTCIceTransport:$s,RTCPeerConnection:$s,RTCPeerConnectionIceEvent:$s,RTCRtpReceiver:$s,RTCRtpSender:$s,RTCSctpTransport:$s,RTCSessionDescription:$s,RTCStatsReport:$s,RTCTrackEvent:$s,screen:xs,Screen:$s,screenLeft:xs,ScreenOrientation:$s,screenTop:xs,screenX:xs,screenY:xs,ScriptProcessorNode:$s,scroll:xs,scrollbars:xs,scrollBy:xs,scrollTo:xs,scrollX:xs,scrollY:xs,SecurityPolicyViolationEvent:$s,Selection:$s,ServiceWorker:$s,ServiceWorkerContainer:$s,ServiceWorkerRegistration:$s,sessionStorage:xs,ShadowRoot:$s,SharedWorker:$s,SourceBuffer:$s,SourceBufferList:$s,speechSynthesis:xs,SpeechSynthesisEvent:$s,SpeechSynthesisUtterance:$s,StaticRange:$s,status:xs,statusbar:xs,StereoPannerNode:$s,stop:xs,Storage:$s,StorageEvent:$s,StorageManager:$s,styleMedia:xs,StyleSheet:$s,StyleSheetList:$s,SubtleCrypto:$s,SVGAElement:$s,SVGAngle:$s,SVGAnimatedAngle:$s,SVGAnimatedBoolean:$s,SVGAnimatedEnumeration:$s,SVGAnimatedInteger:$s,SVGAnimatedLength:$s,SVGAnimatedLengthList:$s,SVGAnimatedNumber:$s,SVGAnimatedNumberList:$s,SVGAnimatedPreserveAspectRatio:$s,SVGAnimatedRect:$s,SVGAnimatedString:$s,SVGAnimatedTransformList:$s,SVGAnimateElement:$s,SVGAnimateMotionElement:$s,SVGAnimateTransformElement:$s,SVGAnimationElement:$s,SVGCircleElement:$s,SVGClipPathElement:$s,SVGComponentTransferFunctionElement:$s,SVGDefsElement:$s,SVGDescElement:$s,SVGDiscardElement:$s,SVGElement:$s,SVGEllipseElement:$s,SVGFEBlendElement:$s,SVGFEColorMatrixElement:$s,SVGFEComponentTransferElement:$s,SVGFECompositeElement:$s,SVGFEConvolveMatrixElement:$s,SVGFEDiffuseLightingElement:$s,SVGFEDisplacementMapElement:$s,SVGFEDistantLightElement:$s,SVGFEDropShadowElement:$s,SVGFEFloodElement:$s,SVGFEFuncAElement:$s,SVGFEFuncBElement:$s,SVGFEFuncGElement:$s,SVGFEFuncRElement:$s,SVGFEGaussianBlurElement:$s,SVGFEImageElement:$s,SVGFEMergeElement:$s,SVGFEMergeNodeElement:$s,SVGFEMorphologyElement:$s,SVGFEOffsetElement:$s,SVGFEPointLightElement:$s,SVGFESpecularLightingElement:$s,SVGFESpotLightElement:$s,SVGFETileElement:$s,SVGFETurbulenceElement:$s,SVGFilterElement:$s,SVGForeignObjectElement:$s,SVGGElement:$s,SVGGeometryElement:$s,SVGGradientElement:$s,SVGGraphicsElement:$s,SVGImageElement:$s,SVGLength:$s,SVGLengthList:$s,SVGLinearGradientElement:$s,SVGLineElement:$s,SVGMarkerElement:$s,SVGMaskElement:$s,SVGMatrix:$s,SVGMetadataElement:$s,SVGMPathElement:$s,SVGNumber:$s,SVGNumberList:$s,SVGPathElement:$s,SVGPatternElement:$s,SVGPoint:$s,SVGPointList:$s,SVGPolygonElement:$s,SVGPolylineElement:$s,SVGPreserveAspectRatio:$s,SVGRadialGradientElement:$s,SVGRect:$s,SVGRectElement:$s,SVGScriptElement:$s,SVGSetElement:$s,SVGStopElement:$s,SVGStringList:$s,SVGStyleElement:$s,SVGSVGElement:$s,SVGSwitchElement:$s,SVGSymbolElement:$s,SVGTextContentElement:$s,SVGTextElement:$s,SVGTextPathElement:$s,SVGTextPositioningElement:$s,SVGTitleElement:$s,SVGTransform:$s,SVGTransformList:$s,SVGTSpanElement:$s,SVGUnitTypes:$s,SVGUseElement:$s,SVGViewElement:$s,TaskAttributionTiming:$s,Text:$s,TextEvent:$s,TextMetrics:$s,TextTrack:$s,TextTrackCue:$s,TextTrackCueList:$s,TextTrackList:$s,TimeRanges:$s,toolbar:xs,top:xs,Touch:$s,TouchEvent:$s,TouchList:$s,TrackEvent:$s,TransitionEvent:$s,TreeWalker:$s,UIEvent:$s,ValidityState:$s,visualViewport:xs,VisualViewport:$s,VTTCue:$s,WaveShaperNode:$s,WebAssembly:xs,WebGL2RenderingContext:$s,WebGLActiveInfo:$s,WebGLBuffer:$s,WebGLContextEvent:$s,WebGLFramebuffer:$s,WebGLProgram:$s,WebGLQuery:$s,WebGLRenderbuffer:$s,WebGLRenderingContext:$s,WebGLSampler:$s,WebGLShader:$s,WebGLShaderPrecisionFormat:$s,WebGLSync:$s,WebGLTexture:$s,WebGLTransformFeedback:$s,WebGLUniformLocation:$s,WebGLVertexArrayObject:$s,WebSocket:$s,WheelEvent:$s,Window:$s,Worker:$s,WritableStream:$s,XMLDocument:$s,XMLHttpRequest:$s,XMLHttpRequestEventTarget:$s,XMLHttpRequestUpload:$s,XMLSerializer:$s,XPathEvaluator:$s,XPathExpression:$s,XPathResult:$s,XSLTProcessor:$s};for(const e of["window","global","self","globalThis"])Ns[e]=Ns;function Cs(e){let t=Ns;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[hs]}class Os extends Zt{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Cs([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Cs([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Cs([this.name,...e]);return s?s.getLiteralValue():Ut}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Cs([this.name]):!Cs([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Cs([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}class Ds extends Zt{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 zt,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(Ot)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?Kt(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=Z;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,wt])}else this.init.deoptimizePath([...this.initPath,...e])}getLiteralValueAtPath(e,t,n){return this.isReassigned?Ut:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n))),Ut)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?qt:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s))),qt)}hasEffectsOnInteractionAtPath(e,t,n){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)){super.includePath(e,t);for(const e of this.declarations){e.included||e.includePath(Ct,t,!1);let n=e.parent;for(;!n.included&&(n.included=!0,n.type!==re);)n=n.parent}e.length>0&&(this.init.includePath([...this.initPath,...e],t,!1),this.additionalInitializers?.forEach((e=>e.includePath(Ot,t,!1))))}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init)||this.initPath.length>0)for(const n of t.args)n?.includePath(Ot,e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Ht,this.markReassigned()),this.additionalInitializers}}const Ms=new Set(["class","const","let","var","using","await using"]);class Rs extends Vn{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Ft(this.flags,4)?Ft(this.flags,8):null}set isTDZAccess(e){this.flags=jt(this.flags,4,!0),this.flags=jt(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 Os&&!this.isPureFunction(Ct)&&this.variable.hasEffectsOnInteractionAtPath(Ct,Jt,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)}}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof Ds&&this.variable.kind&&Ms.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&&_s(this)===_s(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof Ds&&(this.variable.module.isExecuted||un(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(tt(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Ht:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[At])return!0;t=t[n]}return t?.[At]}}function _s(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Ls extends Rs{constructor(){super(...arguments),this.variable=null}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&J(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]}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=X){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===te&&i&&e.appendRight(this.start,"0, ")}}}function Ts(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function Bs(e,t,n){let s=e,i=1;for(;t.has(s)||tn.has(s)||n?.has(s);)s=`${e}$${Ts(i++)}`;return t.add(s),s}class zs{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(pt(r),e.start)}const a=new Ds(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 Vs extends zs{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 Vs&&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 Vs&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Vs&&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,Bs(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 Fs(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class js extends Vn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Ft(this.flags,1024)}set computed(e){this.flags=jt(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},Ct,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(Ct,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=qt,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Ct,Yt,Lt,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Us extends js{hasEffects(e){return super.hasEffects(e)||Fs(this.decorators,e)}applyDeoptimizations(){}}class Gs extends Vs{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(pt(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 Ws extends Vn{createScope(e){this.scope=new Gs(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}includePath(e,t,n){this.included=!0;for(const e of this.body)(n||e.shouldBeIncluded(t))&&e.includePath(Ot,t,n)}render(e,t){if(this.body.length>0){const n=B(e.original.slice(this.start,this.end),"{")+1;U(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function Hs(e){return"StaticBlock"===e.type}class qs extends Wt{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class Ks extends Vn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Vs(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)||Fs(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)}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.superClass?.includePath(Ot,t,n),this.body.includePath(Ot,t,n);for(const e of this.decorators)e.includePath(Ot,t,n);this.id&&(this.id.markDeclarationReached(),this.id.includePath(Ot,Ln()))}initialise(){super.initialise(),this.id?.declare("class",Ct,this);for(const e of this.body.body)if(e instanceof Us&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)Hs(e)||e.static||e instanceof Us&&"constructor"===e.kind||e.deoptimizePath(Ot);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(Hs(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(Ct,Lt,this);if("symbol"==typeof e){s.push({key:wt,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Ls?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Kn(t,this.superClass?new qs(this.superClass,"prototype"):Yn)}),this.objectEntity=new Kn(e,this.superClass||Yn)}}class Js extends Ks{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Ls(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}${H([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 Xs extends Ds{constructor(e){super("arguments",null,Ht,Ct,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Ot):this.deoptimizedArguments.push(e)}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(Ot);this.deoptimizedArguments.length=0}}const Ys=Z,Zs=new Set([wt]),Qs=new _t,ei=new Set([Ht]);class ti extends Ds{constructor(e,t,n,s){super(e,t,Ht,n,s,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new _t,this.deoptimizedFields=new Set,this.argumentsToBeDeoptimized=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Ut,this.frozenValue=null}addArgumentValue(e){if(this.updateKnownValue(e),e===Ht){if(!this.argumentsToBeDeoptimized.has(Ht)){this.argumentsToBeDeoptimized.add(Ht);for(const{interaction:e}of this.deoptimizationInteractions)Kt(e);this.deoptimizationInteractions=Ys}}else if(this.deoptimizedFields.has(wt))e.deoptimizePath([...this.initPath,wt]);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],Lt)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=Z}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,Lt,this));if(this.knownValue===e||this.knownValue instanceof Ls&&e instanceof Ls&&this.knownValue.variable===e.variable)return;const t=this.knownValueLiteral;if("symbol"==typeof t)return void this.markReassigned();e.getLiteralValueAtPath(this.initPath,Lt,this)!==t&&this.markReassigned()}getKnownValue(){return null===this.frozenValue&&(this.frozenValue=this.knownValue||Ht),this.frozenValue}getLiteralValueAtPath(e,t,n){if(this.isReassigned)return Ut;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,(()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n)),Ut)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s?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(Ht)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(wt)||2===e.type&&this.deoptimizedFields.has(t[0])))Kt(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],Lt);this.argumentsToBeDeoptimized.has(Ht)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(wt))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===wt&&(this.deoptimizationInteractions=Ys,this.deoptimizations=Qs,this.deoptimizedFields=Zs,this.argumentsToBeDeoptimized=ei)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Ot):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),qt}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class ni extends ti{constructor(e){super("this",null,Ct,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Ht).hasEffectsOnInteractionAtPath(e,t,n)}}class si extends Vs{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,fn,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(pt(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 ii extends Vs{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(pt(r),e.start)}const a=new Ds(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class ri extends Vs{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new si(this):new ii(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 ti(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(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1],{args:r}=t;let o=r.length-1;for(let t=1;t<r.length;t++)r[t]instanceof Fn&&!s&&(s=!0,o=t-1),s&&r[t].includePath(Ot,e,!1);for(let t=o;t>=1;t--){const o=this.parameters[t-1]||i,a=r[t];if(o)if(n=!1,0===o.length)s=!0;else for(const t of o)t.calledFromTryStatement&&(n=!0),t.included&&(s=!0,n?a.includePath(Ot,e,!0):t.includeArgumentPaths(a,e));a.included||!s&&!a.shouldBeIncluded(e)||(s=!0,a.includePath(Ct,e,n))}}}class oi extends ri{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall(e){const{parameters:t}=this,{args:n}=e;let s=0;for(;s<n.length-1;s++){const e=n[s+1];if(e instanceof Fn){for(;s<t.length;s++)n[s+1]?.deoptimizePath(Ot),t[s].forEach((e=>e.markReassigned()));break}if(this.hasRest&&s>=t.length-1)e.deoptimizePath(Ot);else{const n=t[s];if(n)for(const t of n)t.addArgumentValue(e);this.addArgumentToBeDeoptimized(e)}}for(;s<t.length;s++)for(const e of t[s])e.addArgumentValue(fn)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(Ot),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=Ht;for(const e of this.returnExpressions)e.deoptimizePath(Ot)}}}class ai extends oi{constructor(e){super(e,!1);const{context:t}=e;this.variables.set("arguments",this.argumentsVariable=new Xs(t)),this.variables.set("this",this.thisVariable=new ni(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=t;for(let t=1;t<n.length;t++)n[t]?.includePath(Ot,e,!1)}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class li extends Vn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===re&&this.scope.context.log(he,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${be(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!==re:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class ci extends Vn{get deoptimizeBody(){return Ft(this.flags,32768)}set deoptimizeBody(e){this.flags=jt(this.flags,32768,e)}get directlyIncluded(){return Ft(this.flags,16384)}set directlyIncluded(e){this.flags=jt(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Ht)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Gs(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}includePath(e,t,n){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(n=!0);for(const e of this.body)(n||e.shouldBeIncluded(t))&&e.includePath(Ot,t,n)}}initialise(){super.initialise();const e=this.body[0];this.deoptimizeBody=e instanceof li&&"use asm"===e.directive}render(e,t){this.body.length>0?U(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class di extends Vn{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,t.at(-1)===wt?t:[...t,wt],n)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Ct,t,n)}includePath(e,t,n){this.included=!0,this.argument.includePath(Ct,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([wt,wt]),this.scope.context.requestTreeshakingPass())}}class ui extends Vn{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1,this.includeCallArguments=this.scope.includeCallArguments.bind(this.scope)}get async(){return Ft(this.flags,256)}set async(e){this.flags=jt(this.flags,256,e)}get deoptimizedReturn(){return Ft(this.flags,512)}set deoptimizedReturn(e){this.flags=jt(this.flags,512,e)}get generator(){return Ft(this.flags,4194304)}set generator(e){this.flags=jt(this.flags,4194304,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]===wt&&(this.scope.getReturnExpression().deoptimizePath(Ot),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(Ot),this.scope.context.requestTreeshakingPass()),qt):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],Yt,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Jt,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===ne&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}includePath(e,t,n){this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters()),this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:s}=t;t.brokenFlow=!1,this.body.includePath(Ot,t,n),t.brokenFlow=s}initialise(){super.initialise(),this.body instanceof ci?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",Ct,Ht))),o[o.length-1]instanceof di),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}applyDeoptimizations(){}}ui.prototype.preventChildBlockScope=!0;class hi extends ui{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new ai(e),this.constructedEntity=new Kn(Object.create(null),Yn),this.scope.thisVariable.addArgumentValue(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentValue(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Ht);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!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}includePath(e,t,n){super.includePath(e,t,n),this.id?.includePath(Ot,Ln());const s=this.scope.argumentsVariable.included;for(const e of this.params)e instanceof Ls&&!s||e.includePath(Ot,t,n)}initialise(){super.initialise(),this.id?.declare("function",Ct,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Kn([{key:"prototype",kind:"init",property:new Kn([],Yn)}],Yn)}}class pi extends hi{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 Ls(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class fi extends Vn{includePath(e,t,n){this.included=!0,this.declaration.includePath(e,t,n),n&&this.scope.context.includeVariableInModule(this.variable,e)}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 V(e,B(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof pi)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=B(e,"function",t)+8;e=e.slice(n,B(e,"(",n));const s=B(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Js)this.renderNamedDeclaration(e,r,null===this.declaration.id?B(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void L(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:se}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}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 Js&&i.has(this.variable)&&e.appendLeft(this.end,` ${H([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,";"))}}fi.prototype.needsBoundaries=!0;const mi=/[\n\r'\\\u2028\u2029]/,gi=/([\n\r'\u2028\u2029])/g,yi=/\\/g;function bi(e){return mi.test(e)?e.replace(yi,"\\\\").replace(gi,"\\$1"):e}const Ei="_interopDefault",xi="_interopDefaultCompat",Si="_interopNamespace",Ai="_interopNamespaceCompat",Pi="_interopNamespaceDefault",$i="_interopNamespaceDefaultOnly",vi="_mergeNamespaces",wi="_documentCurrentScript",Ii={auto:Ei,compat:xi,default:null,defaultOnly:null,esModule:null},ki=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Ni={auto:Si,compat:Ai,default:Pi,defaultOnly:$i,esModule:null},Ci=(e,t)=>"esModule"!==e&&ki(e,t),Oi=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Wi)t.has(e)&&a.add(e);return Wi.map((e=>a.has(e)?Di[e](n,s,i,r,o,a):"")).join("")},Di={[wi]:(e,{_:t,n:n})=>`var ${wi}${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}${_i(t)}${s}?${s}${n?Mi(t):Ri(t)}${a}${r}${r}`},[Ei](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ei});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Mi(t):Ri(t)}${a}${r}${r}`},[Ai](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Pi)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ai});return`${e}${_i(t)}${o}?${o}e${o}:${o}${Pi}(e)${n}${l}${l}`}return`function ${Ai}(e)${o}{${l}${e}if${o}(${_i(t)})${o}return e;${l}`+Li(e,e,t,n,s,i)+`}${l}${l}`},[$i](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,d]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:$i});return`${c}${Ui(s,Gi(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${d}${a}${a}`},[Pi](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Pi}(e)${r}{${o}`+Li(e,e,t,n,s,i)+`}${o}${o}`},[Si](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Pi)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Si});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Pi}(e)${t}${l}${l}`}return`function ${Si}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Li(e,e,t,n,s,i)+`}${l}${l}`},[vi](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${vi}(n, m)${r}{${a}${e}${Bi(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Vi:Fi:ji)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Ui(s,Gi(i,"n",t))};${a}}${a}${a}`}},Mi=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Ri=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,_i=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Li=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}=n,h=`{${d}`+(s?zi:ji)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Hi(l)}${o}}`:""});${d}${t}if${o}(e)${o}{${d}${t}${e}${Ti(h,!s,n)}${d}${t}}${d}${t}n${c("default")}${o}=${o}e;${d}${t}return ${Ui(i,"n")}${u}${d}`},Ti=(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}`,Bi=(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}}`},zi=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Vi(e,t+e,n)+`${t}}${i}`},Vi=(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}`},Fi=(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}`},ji=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Ui=(e,t)=>e?`Object.freeze(${t})`:t,Gi=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Hi(s)})`:t,Wi=Object.keys(Di);function Hi(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class qi extends Vn{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)?Ut:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?qt:Nn(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||kn(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return wn;switch(typeof e){case"boolean":return $n;case"number":return vn;case"string":return In}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 Ki(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Ct,Lt,i);if(n===zn||e.optional&&null==n)return zn}else if(e.optional&&null==t.getLiteralValueAtPath(Ct,Lt,i))return zn;return e.getLiteralValueAtPath(n,s,i)}function Ji(e){return e.computed?function(e){if(e instanceof qi)return String(e.value);return null}(e.property):e.property.name}function Xi(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Ls)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Yi){const s=Xi(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Yi extends Vn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Ft(this.flags,1024)}set computed(e){this.flags=jt(this.flags,1024,e)}get optional(){return Ft(this.flags,128)}set optional(e){this.flags=jt(this.flags,128,e)}get assignmentDeoptimized(){return Ft(this.flags,16)}set assignmentDeoptimized(e){this.flags=jt(this.flags,16,e)}get bound(){return Ft(this.flags,32)}set bound(e){this.flags=jt(this.flags,32,e)}get isUndefined(){return Ft(this.flags,64)}set isUndefined(e){this.flags=jt(this.flags,64,e)}bind(){this.bound=!0;const e=Xi(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Zi(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<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):Kt(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=Z,this.propertyKey=wt,t.deoptimizePath(Ot);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&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===wt?It:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==wt&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):Ut}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Ki(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[fn,!1]:this.propertyKey!==wt&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):qt}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(Ct,Lt,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(Ct,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,[this.getPropertyKey(),...e],t,n)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.includePath([this.getPropertyKey()],e,t):this.includeProperties(Ct,[this.getPropertyKey()],e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){super.initialise(),this.propertyKey=Ji(this),this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=X){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;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],Lt),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.getPropertyKey()],Lt),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Ls){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,Ot),this.scope.context.log(he,tt(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=wt;const e=this.property.getLiteralValueAtPath(Ct,Lt,this);return this.propertyKey=e===Nt?e:"symbol"==typeof e?wt:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t,n,s){this.included?e.length>0&&this.variable?.includePath(e,n):(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable,e)),this.object.includePath(t,n,s),this.property.includePath(Ot,n,s)}}function Zi(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof Qt)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(he,ct(s,n.module.id,i),t[0].pos),"undefined"}return null}return Zi(i,t.slice(1),n)}const Qi="ROLLUP_FILE_URL_",er="import";class tr extends Vn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===er&&n?.startsWith(Qi)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}includePath(){if(!this.included&&(this.included=!0,this.meta.name===er)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Yi&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Qi)&&(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:d,start:u,end:h}=this,{id:p}=r;if(o!==er)return;const f=c;if(d){const t=s.getFileName(d),i=C(R(D(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:d,relativePath:i}])||ur[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=hr[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=nr.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Yi?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(u,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Qi)?ir:sr)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const nr=["cjs","iife","umd"],sr={amd:["document","module","URL"],cjs:["document","require","URL",wi],es:[],iife:["document","URL",wi],system:["module"],umd:["document","require","URL",wi]},ir={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},rr=(e,t="URL")=>`new ${t}(${e}).href`,or=(e,t=!1)=>rr(`'${bi(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`),ar=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},lr=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,cr=e=>lr(`__dirname + '/${bi(e)}'`),dr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${wi} && ${wi}.tagName.toUpperCase() === 'SCRIPT' && ${wi}.src || new URL('${bi(e)}', document.baseURI).href)`,ur={amd:e=>("."!==e[0]&&(e="./"+e),rr(`require.toUrl('${bi(e)}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${cr(e)} : ${or(e)})`,es:e=>rr(`'${bi(e)}', import.meta.url`),iife:e=>or(e),system:e=>rr(`'${bi(e)}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${cr(e)} : ${or(e,!0)})`},hr={amd:ar((()=>rr("module.uri, document.baseURI"))),cjs:ar((e=>`(typeof document === 'undefined' ? ${lr("__filename")} : ${dr(e)})`)),iife:ar((e=>dr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:ar((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${lr("__filename")} : ${dr(e,!0)})`))};class pr extends Zt{constructor(){super("undefined")}getLiteralValueAtPath(){}}class fr extends Ds{constructor(e,t,n){super(e,t,t.declaration,Ct,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof pi||s instanceof Js)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof Ls&&(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 pr||"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 fr&&!n.has(t));return this.originalVariable=t||e}}class mr extends Zt{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):Kt(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]===Nt?"Module":Ut}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([vi],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:d,s:u}}=e,h=this.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${ln(e)}${o}()${o}{${o}return ${t.getName(c)}${u}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${vi}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Hi(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${d}${H([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}}}}mr.prototype.isNamespace=!0;class gr extends Zt{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 fr||e instanceof gr;){if(e instanceof fr){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof gr&&(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)}setRenderNames(e,t){super.setRenderNames(e,t)}}class yr{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?C(R(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return bi(this.renormalizeRenderPath?Se(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function br(e){return e.endsWith(".js")?e.slice(0,-3):e}function Er(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${br(t)}`:e.id??""}function xr(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:d,getFunctionIntro:u,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:d}of t)if(d)return Sr(a,d[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:u,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=Sr(a,t.imported,l,i,e,u,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=d([],{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}${$r(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${u(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function Sr(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=Ii[t]?i:e;return ki(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Ni[o(a)])?r:e:`${e}${c(t)}`}function Ar(e){return e([["value","true"]],{lineBreakIndent:null})}function Pr(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Ar(i)],[null,`[Symbol.toStringTag]:${s}${Hi(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Ar(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Hi(i)});`}return""}const $r=(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 vr(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:d}=a,u=new Set,h=[],p=(e,t,n)=>{u.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,$i,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=Ii[e])):"*"!==t||"*"===i||a||(a=!0,s=Ni[e],c=l),s&&p(c,s,o)}}return`${Oi(u,r,o,a,n,s,i)}${h.length>0?`${h.join(d)}${d}${d}`:""}`}function wr(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":br(e);var n}const Ir=new Set(["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);function kr(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>Ir.has(e)||e.startsWith("node:")));0!==n.length&&e(he,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${ge(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Nr=(e,t)=>e.split(".").map(t).join("");function Cr(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(he,ft(a[0])),a[0]=("function"==typeof n?n(a[0]):l?a[0]:n[a[0]])||a[0];const c=a.pop();let d=t,u=[...a.map((e=>(d+=r(e),`${d}${i}=${i}${d}${i}||${i}{}`))),`${d}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(u=`(${u})`),u}function Or(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 Dr="_missingExportShim";const Mr=({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},Rr=(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""},_r=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",Lr=(e,t,n)=>Tr(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function Tr(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}${ln(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const Br=(e,t,n)=>Tr(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),zr=(e,t,n)=>Tr(e.filter((e=>e.local===Dr)).map((e=>({name:e.exported,value:Dr}))),t,n);function Vr(e,t,n){return e?`${t}${Nr(e,n)}`:"null"}var Fr={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:d,namedExportsMode:u,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:S,strict:A}){kr(h,n);const P=n.map((e=>`'${wr(e.importPath,m.forceJsExtensionForImports)}'`)),$=n.map((e=>e.name)),{n:v,getNonArrowFunctionIntro:w,_:I}=f;u&&r&&($.unshift("exports"),P.unshift("'exports'")),t.has("require")&&($.unshift("require"),P.unshift("'require'")),t.has("module")&&($.unshift("module"),P.unshift("'module'"));const k=Er(m,o),N=(k?`'${k}',${I}`:"")+(P.length>0?`[${P.join(`,${I}`)}],${I}`:""),C=A?`${I}'use strict';`:"";e.prepend(`${l}${vr(n,x,y,b,E,t,a,f)}`);const O=xr(s,n,u,x,f,a,y,S);let D=Pr(u&&r,c&&(!0===g||"if-default-prop"===g&&i),d&&E,f);D&&(D=v+v+D),e.append(`${O}${D}${p}`).indent(a).prepend(`${m.define}(${N}(${w($,{isAsync:!1,name:null})}{${C}${v}${v}`).append(`${v}${v}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:d,outro:u,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:S,n:A}=h,P=x?`'use strict';${A}${A}`:"";let $=Pr(d&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);$&&($+=A+A);const v=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:d}of e)c||d?(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=vr(n,y,m,g,b,t,o,h);e.prepend(`${P}${a}${$}${v}${w}`);const I=xr(s,n,d,y,h,o,m,E,`module.exports${S}=${S}`);e.append(`${I}${u}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:d},importAttributesKey:u}){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:`${cn(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 ${cn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map((e=>e.imported===e.reexported?cn(e.imported):`${cn(e.imported)} as ${cn(e.reexported)}`)).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,u,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Oi(null,t,n,a,l,c,d))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${cn(r.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:d,snippets:u},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:S},strict:A}){const{_:P,getNonArrowFunctionIntro:$,getPropertyAccess:v,n:w}=u,I=x&&x.includes("."),k=!f&&!I;if(x&&k&&(sn(N=x)||nn.test(N)))return _e(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:Ae("configuration-options/#output-extend")}}(x));var N;kr(c,n);const C=Or(n),O=C.map((e=>e.globalName||"null")),D=C.map((e=>e.name));r&&!x&&c(he,{code:We,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ae(De)}),l&&r&&(f?(O.unshift(`this${Nr(x,v)}${P}=${P}this${Nr(x,v)}${P}||${P}{}`),D.unshift("exports")):(O.unshift("{}"),D.unshift("exports")));const M=A?`${o}'use strict';${w}`:"",R=vr(n,E,g,m,S,t,o,u);e.prepend(`${a}${R}`);let _=`(${$(D,{isAsync:!1,name:null})}{${w}${M}${w}`;r&&(!x||f&&l||(_=(k?`var ${x}`:`this${Nr(x,v)}`)+`${P}=${P}${_}`),I&&(_=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(he,ft(l[0])),l[0]=("function"==typeof n?n(l[0]):c?l[0]:n[l[0]])||l[0],l.pop();let d=t;return l.map((e=>(d+=i(e),`${d}${s}=${s}${d}${s}||${s}{}${r}`))).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(x,"this",b,u,h,c)+_));let L=`${w}${w}})(${O.join(`,${P}`)});`;r&&!f&&l&&(L=`${w}${w}${o}return exports;${L}`);const T=xr(s,n,l,E,u,o,g,y);let B=Pr(l&&r,!0===p||"if-default-prop"===p&&i,S,u);B&&(B=w+w+B),e.append(`${T}${B}${d}`).indent(o).prepend(_).append(L)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:d,freeze:u,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:S,setters:A,starExcludes:P}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let d=null;for(const{imports:u,reexports:h}of e){const p=[];if(u)for(const e of u)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){d||(d=Mr({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:d}}(n,s,r,a),$=h?`'${h}',${g}`:"",v=t.has("module")?["exports","module"]:i?["exports"]:[];let w=`System.register(${$}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(v,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Rr(P,r,a)+_r(S,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.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+Oi(null,t,r,a,d,u,p)+Lr(s,r,a)).append(`${l}${E}${E}`+Br(s,r,a)+zr(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:d,outro:u,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:S},globals:A,noConflict:P,reexportProtoFromExternal:$,strict:v}){const{_:w,cnst:I,getFunctionIntro:k,getNonArrowFunctionIntro:N,getPropertyAccess:C,n:O,s:D}=h,M=f?"f":"factory",R=f?"g":"global";if(r&&!x)return _e({code:We,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:Ae(De)});kr(d,n);const _=n.map((e=>`'${wr(e.importPath,p.forceJsExtensionForImports)}'`)),L=n.map((e=>`require('${e.importPath}')`)),T=Or(n),B=T.map((e=>Vr(e.globalName,R,C))),z=T.map((e=>e.name));c&&(r||P)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Cr(x,R,A,(g?`${Vr(x,R,C)}${w}||${w}`:"")+"{}",h,d)),z.unshift("exports"));const V=Er(p,o),F=(V?`'${V}',${w}`:"")+(_.length>0?`[${_.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=v?`${w}'use strict';${O}`:"";let W;if(P){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${w}=${w}${Cr(x,R,A,`${M}(${B.join(`,${w}`)})`,h,d)};`;else{t=`${I} ${e}${w}=${w}${B.shift()};${O}${a}${a}${M}(${[e,...B].join(`,${w}`)});`}W=`(${k([],{isAsync:!1,name:null})}{${O}${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,R,h)};${O}${a}${a}${t}${O}${a}${a}${e}.noConflict${w}=${w}${k([],{isAsync:!1,name:null})}{${w}${Vr(x,R,C)}${w}=${w}current;${w}return ${e}${D}${w}};${O}${a}})()`}else W=`${M}(${B.join(`,${w}`)})`,!c&&r&&(W=Cr(x,R,A,W,h,d));const H=r||P&&c||B.length>0,q=[M];H&&q.unshift(R);const K=H?`this,${w}`:"",J=H?`(${R}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${R}${w}||${w}self,${w}`:"",X=H?")":"",Y=H?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${M}(${L.join(`,${w}`)})${w}:${O}`:"",Z=`(${N(q,{isAsync:!1,name:null})}{${O}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${F}${M})${w}:${O}`+`${a}${J}${W}${X};${O}`+`})(${K}(${N(z,{isAsync:!1,name:null})}{${G}${O}`,Q=O+O+"}));";e.prepend(`${l}${vr(n,E,y,b,S,t,a,h)}`);const ee=xr(s,n,c,E,h,a,y,$);let te=Pr(c&&r,!0===m||"if-default-prop"===m&&i,S,h);te&&(te=O+O+te),e.append(`${ee}${te}${u}`).trim().indent(a).append(Q).prepend(Z)}};const jr={ArrayPattern(e,t){for(const n of t.elements)n&&jr[n.type](e,n)},AssignmentPattern(e,t){jr[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?jr.RestElement(e,n):jr[n.value.type](e,n.value)},RestElement(e,t){jr[t.argument.type](e,t.argument)}},Ur=function(e){const t=[];return jr[e.type](t,e),t};let Gr;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 Wr=new Array(128).fill(void 0);function Hr(e){return Wr[e]}Wr.push(void 0,null,!0,!1);let qr=Wr.length;function Kr(e){const t=Hr(e);return function(e){e<132||(Wr[e]=qr,qr=e)}(e),t}const Jr="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Jr.decode();let Xr=null;function Yr(){return null!==Xr&&0!==Xr.byteLength||(Xr=new Uint8Array(Gr.memory.buffer)),Xr}function Zr(e,t){return e>>>=0,Jr.decode(Yr().subarray(e,e+t))}function Qr(e){qr===Wr.length&&Wr.push(Wr.length+1);const t=qr;return qr=Wr[t],Wr[t]=e,t}let eo=0;const to="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},no="function"==typeof to.encodeInto?function(e,t){return to.encodeInto(e,t)}:function(e,t){const n=to.encode(e);return t.set(n),{read:e.length,written:n.length}};let so=null;function io(){return(null===so||!0===so.buffer.detached||void 0===so.buffer.detached&&so.buffer!==Gr.memory.buffer)&&(so=new DataView(Gr.memory.buffer)),so}function ro(e,t,n){try{const l=Gr.__wbindgen_add_to_stack_pointer(-16),c=function(e,t,n){if(void 0===n){const n=to.encode(e),s=t(n.length,1)>>>0;return Yr().subarray(s,s+n.length).set(n),eo=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Yr();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=Yr().subarray(i+o,i+s);o+=no(e,t).written,i=n(i,s,o,1)>>>0}return eo=o,i}(e,Gr.__wbindgen_export_0,Gr.__wbindgen_export_1),d=eo;Gr.parse(l,c,d,t,n);var s=io().getInt32(l+0,!0),i=io().getInt32(l+4,!0),r=(o=s,a=i,o>>>=0,Yr().subarray(o/1,o/1+a)).slice();return Gr.__wbindgen_export_2(s,1*i,1),r}finally{Gr.__wbindgen_add_to_stack_pointer(16)}var o,a}function oo(e,t){try{return e.apply(this,t)}catch(e){Gr.__wbindgen_export_3(Qr(e))}}function ao(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){Kr(e)},e.wbg.__wbindgen_is_object=function(e){const t=Hr(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return Qr(Hr(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return Qr(Hr(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return Qr(Hr(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return Qr(Hr(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof Hr(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return oo((function(){return Qr(module.require)}),arguments)},e.wbg.__wbindgen_string_new=function(e,t){return Qr(Zr(e,t))},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return Qr(Hr(e).msCrypto)},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return oo((function(e,t){Hr(e).randomFillSync(Kr(t))}),arguments)},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return oo((function(e,t){Hr(e).getRandomValues(Hr(t))}),arguments)},e.wbg.__wbindgen_object_clone_ref=function(e){return Qr(Hr(e))},e.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43=function(e,t){return Qr(new Function(Zr(e,t)))},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof Hr(e)},e.wbg.__wbg_self_bf91bf94d9e04084=function(){return oo((function(){return Qr(self.self)}),arguments)},e.wbg.__wbg_window_52dd9f07d03fd5f8=function(){return oo((function(){return Qr(window.window)}),arguments)},e.wbg.__wbg_globalThis_05c129bf37fcf1be=function(){return oo((function(){return Qr(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_3eca19bb09e9c484=function(){return oo((function(){return Qr(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===Hr(e)},e.wbg.__wbg_call_a9ef466721e824f2=function(){return oo((function(e,t){return Qr(Hr(e).call(Hr(t)))}),arguments)},e.wbg.__wbg_call_3bfa248576352471=function(){return oo((function(e,t,n){return Qr(Hr(e).call(Hr(t),Hr(n)))}),arguments)},e.wbg.__wbg_buffer_ccaed51a635d8a2d=function(e){return Qr(Hr(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730=function(e,t,n){return Qr(new Uint8Array(Hr(e),t>>>0,n>>>0))},e.wbg.__wbg_new_fec2611eb9180f95=function(e){return Qr(new Uint8Array(Hr(e)))},e.wbg.__wbg_newwithlength_76462a666eca145f=function(e){return Qr(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_975a06f9dbd16995=function(e,t,n){return Qr(Hr(e).subarray(t>>>0,n>>>0))},e.wbg.__wbg_length_9254c4bd3b9f23c4=function(e){return Hr(e).length},e.wbg.__wbg_set_ec2fcf81bc573fd9=function(e,t,n){Hr(e).set(Hr(t),n>>>0)},e.wbg.__wbindgen_throw=function(e,t){throw new Error(Zr(e,t))},e.wbg.__wbindgen_memory=function(){return Qr(Gr.memory)},e}async function lo(e){if(void 0!==Gr)return Gr;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","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:n&&"SCRIPT"===n.tagName.toUpperCase()&&n.src||new URL("rollup.browser.js",document.baseURI).href));const t=ao();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=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("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 Gr=e.exports,lo.__wbindgen_wasm_module=t,so=null,Xr=null,Gr}(s,i)}const co=[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:ho(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:ho(t[e+2],t)}},function(e,t){const n=t[e+2],s=Mn(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:ho(t[e+4],t),body:uo(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Cn[t[e+2]],left:uo(t[e+3],t),right:uo(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:uo(t[e+2],t),right:uo(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:uo(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Cn[t[e+2]],left:uo(t[e+3],t),right:uo(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:ho(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:uo(n,t)}},function(e,t){const n=t[e+2],s=Mn(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[On]:s}:{},callee:uo(t[e+4],t),arguments:ho(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:uo(n,t),body:uo(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:uo(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:ho(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:ho(t[e+2],t),id:0===n?null:uo(n,t),superClass:0===s?null:uo(s,t),body:uo(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:ho(t[e+2],t),id:0===n?null:uo(n,t),superClass:0===s?null:uo(s,t),body:uo(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:uo(t[e+2],t),consequent:uo(t[e+3],t),alternate:uo(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:uo(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:uo(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:uo(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:uo(t[e+2],t),test:uo(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:uo(n,t),source:uo(t[e+3],t),attributes:ho(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:uo(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:ho(t[e+2],t),source:0===n?null:uo(n,t),attributes:ho(t[e+4],t),declaration:0===s?null:uo(s,t)}},function(e,t){const n=uo(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:uo(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:uo(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:uo(t[e+2],t),right:uo(t[e+3],t),body:uo(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:uo(t[e+3],t),right:uo(t[e+4],t),body:uo(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:uo(n,t),test:0===s?null:uo(s,t),update:0===i?null:uo(i,t),body:uo(t[e+5],t)}},function(e,t){const n=t[e+2],s=Mn(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:uo(i,t),params:ho(t[e+5],t),body:uo(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Mn(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:uo(i,t),params:ho(t[e+5],t),body:uo(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:uo(t[e+2],t),consequent:uo(t[e+3],t),alternate:0===n?null:uo(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:uo(t[e+2],t),value:uo(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:ho(t[e+2],t),source:uo(t[e+3],t),attributes:ho(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:uo(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:uo(t[e+2],t),options:0===n?null:uo(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:uo(t[e+2],t)}},function(e,t){const n=t[e+2],s=uo(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:uo(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:uo(t[e+2],t),value:0===n?null:uo(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:uo(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:uo(t[e+2],t),children:ho(t[e+3],t),closingElement:0===n?null:uo(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:uo(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:uo(t[e+2],t),children:ho(t[e+3],t),closingFragment:uo(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:uo(t[e+2],t),property:uo(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:uo(t[e+2],t),name:uo(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:uo(t[e+3],t),attributes:ho(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:uo(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:uo(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:uo(t[e+2],t),body:uo(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:Cn[t[e+2]],left:uo(t[e+3],t),right:uo(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:uo(t[e+3],t),property:uo(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:uo(t[e+2],t),property:uo(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:ho(t[e+3],t),key:uo(t[e+4],t),value:uo(t[e+5],t),kind:Cn[t[e+6]]}},function(e,t){const n=Mn(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[On]:n}:{},callee:uo(t[e+3],t),arguments:ho(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:ho(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:ho(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=Mn(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:ho(t[e+2],t),...n.length>0?{[Dn]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=uo(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}:uo(s,t),value:i,kind:Cn[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:ho(t[e+3],t),key:uo(t[e+4],t),value:0===s?null:uo(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:uo(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:uo(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:ho(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:uo(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:ho(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:uo(n,t),consequent:ho(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:uo(t[e+2],t),cases:ho(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:uo(t[e+2],t),quasi:uo(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:ho(t[e+2],t),expressions:ho(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:uo(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:uo(t[e+2],t),handler:0===n?null:uo(n,t),finalizer:0===s?null:uo(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Cn[t[e+2]],argument:uo(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:Cn[t[e+3]],argument:uo(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Cn[t[e+2]],declarations:ho(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:uo(t[e+2],t),init:0===n?null:uo(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:uo(t[e+2],t),body:uo(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:uo(s,t)}}];function uo(e,t){const n=t[e],s=co[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function ho(e,t){if(0===e)return Z;const n=t[e++],s=[];for(let i=0;i<n;i++){const n=t[e++];s.push(n?uo(n,t):null)}return s}function po(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 fo extends Vn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=t.at(-1)===wt?t:[...t,kt];for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Ct,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}class mo extends ui{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Ft(this.flags,8388608)}set expression(e){this.flags=jt(this.flags,8388608,e)}createScope(e){this.scope=new oi(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;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===te&&this.parent.callee===this||super.onlyFunctionCallUsed()}includePath(e,t,n){super.includePath(Ot,t,n);for(const e of this.params)e instanceof Ls||e.includePath(Ot,t,n)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Kn([],Yn)}}class go extends Vn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?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}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(Ct,t,n))return!0;return!1}includePath(e,t,n){this.included=!0;for(const e of this.properties)e.includePath(Ct,t,n)}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}applyDeoptimizations(){}}class yo extends Vn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}includePath(e,t,n){const{deoptimized:s,left:i,right:r,operator:o}=this;s||this.applyDeoptimizations(),this.included=!0,(n||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(Tn(),!1))&&i.includeAsAssignmentTarget(t,n,"="!==o),r.includePath(Ot,t,n)}initialise(){if(super.initialise(),this.left instanceof Ls){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&this.scope.context.error({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}=X){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=V(e.original,B(e.original,"=",r.end)+1);e.remove(a,l),n&&W(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Ls){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?q(n,a,l,e,t):K(n,a,l,c.type!==se,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"],`${H(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===se,e,t)}r.included&&r instanceof go&&(i===se||i===ee)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class bo extends Vn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Ct,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=X){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class Eo extends Vn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}includePath(e,t,n){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof hi||e instanceof mo)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.includePath(e,t,n)}}const xo={"!=":(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};class So extends Vn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ut;const s=this.left.getLiteralValueAtPath(Ct,t,n);if("symbol"==typeof s)return Ut;const i=this.right.getLiteralValueAtPath(Ct,t,n);if("symbol"==typeof i)return Ut;const r=xo[this.operator];return r?r(s,i):Ut}hasEffects(e){return"+"===this.operator&&this.parent instanceof li&&""===this.left.getLiteralValueAtPath(Ct,Lt,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=X){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}}class Ao extends Vn{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}includePath(e,t){this.included=!0,this.label?(this.label.includePath(Ot,Ln()),t.includedLabels.add(this.label.name)):t.hasBreak=!0,t.brokenFlow=!0}}function Po(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(B(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(B(e.original,"(",n.callee.end)+1,n.end-1)}}class $o extends Vn{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!==Ht));if(0!==o.length)if(i===Ht)for(const e of o)e.deoptimizePath(Ot);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]!==Ht){this.returnExpression=qt;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Q,this.deoptimizableDependentExpressions=Z;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Ot)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Ht&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Ht?Ut:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),Ut)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Ht?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),qt)}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 vo extends $o{get optional(){return Ft(this.flags,128)}set optional(e){this.flags=jt(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof Ls){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(he,Ye(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(he,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${be(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ae("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Yi&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Ki(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(Ct,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(Ct,Lt,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(Ct,this.interaction,e))}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),n?(super.includePath(e,t,n),n===Bn&&this.callee instanceof Ls&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee instanceof Yi&&!this.callee.variable?this.callee.property.includePath(Ot,t,!1):this.callee.includePath(Ot,t,!1),this.callee.includeCallArguments(t,this.interaction))}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}=X){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Po(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Lt){return null===this.returnExpression?(this.returnExpression=qt,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Ct,this.interaction,e,this)):this.returnExpression}}class wo extends Vn{createScope(e){this.scope=new ri(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",Ct,Ht)),this.body=new ci(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}wo.prototype.preventChildBlockScope=!0;class Io extends Vn{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)}removeAnnotations(e){this.expression.removeAnnotations(e)}applyDeoptimizations(){}}class ko extends Vs{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new Ds("this",null,t,Ct,n,"other")),this.instanceScope=new Vs(this,n),this.instanceScope.variables.set("this",new ni(n))}findLexicalBoundary(){return this}}class No extends Vn{createScope(e){this.scope=new ko(e,this.parent)}includePath(e,t,n){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,Ot);for(const e of this.body)e.includePath(Ot,t,n)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(this,n.static?this.scope:this.scope.instanceScope).parseNode(n));return super.parseNode(e)}applyDeoptimizations(){}}class Co extends Ks{render(e,t,{renderedSurroundingElement:n}=X){super.render(e,t),n===se&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class Oo extends Wt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new Oo(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 Do extends Vn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ft(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=jt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Ot);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Z;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();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Ut}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Oo([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)}includePath(e,t,n){this.included=!0;const s=this.getUsedBranch();n||this.test.shouldBeIncluded(t)||null===s?(this.test.includePath(Ot,t,n),this.consequent.includePath(e,t,n),this.alternate.includePath(e,t,n)):s.includePath(e,t,n)}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}=X){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=B(e.original,":",this.consequent.end),l=V(e.original,(this.consequent.included?B(e.original,"?",this.test.end):a)+1);s&&W(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=this.test.getLiteralValueAtPath(Ct,Lt,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}class Mo extends Vn{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}includePath(e,t){this.included=!0,this.label?(this.label.includePath(Ot,Ln()),t.includedLabels.add(this.label.name)):t.hasContinue=!0,t.brokenFlow=!0}}class Ro extends Vn{hasEffects(){return!0}}class _o extends Vn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Ct,Yt,e)}}function Lo(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 To(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.includePath(Ot,e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}class Bo extends Vn{hasEffects(e){return!!this.test.hasEffects(e)||Lo(e,this.body)}includePath(e,t,n){this.included=!0,this.test.includePath(Ot,t,n),To(t,this.body,n)}}class zo extends Vn{hasEffects(){return!1}}class Vo extends Vn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Vo.prototype.needsBoundaries=!0;class Fo extends Vn{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;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}Fo.prototype.needsBoundaries=!0;class jo extends Vn{applyDeoptimizations(){}}class Uo extends Vn{createScope(e){this.scope=new Gs(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Lo(e,t)}includePath(e,t,n){const{body:s,deoptimized:i,left:r,right:o}=this;i||this.applyDeoptimizations(),this.included=!0,r.includeAsAssignmentTarget(t,n||!0,!1),o.includePath(Ot,t,n),To(t,s,n)}initialise(){super.initialise(),this.left.setAssignedValue(Ht)}render(e,t){this.left.render(e,t,T),this.right.render(e,t,T),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(Ct),this.scope.context.requestTreeshakingPass()}}class Go extends Vn{get await(){return Ft(this.flags,131072)}set await(e){this.flags=jt(this.flags,131072,e)}createScope(e){this.scope=new Gs(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}includePath(e,t,n){const{body:s,deoptimized:i,left:r,right:o}=this;i||this.applyDeoptimizations(),this.included=!0,r.includeAsAssignmentTarget(t,n||!0,!1),o.includePath(Ot,t,n),To(t,s,n)}initialise(){super.initialise(),this.left.setAssignedValue(Ht)}render(e,t){this.left.render(e,t,T),this.right.render(e,t,T),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(Ct),this.right.deoptimizePath(Ot),this.scope.context.requestTreeshakingPass()}}class Wo extends Vn{createScope(e){this.scope=new Gs(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Lo(e,this.body)}includePath(e,t,n){this.included=!0,this.init?.includePath(Ot,t,n,{asSingleStatement:!0}),this.test?.includePath(Ot,t,n),this.update?.includePath(Ot,t,n),To(t,this.body,n)}render(e,t){this.init?.render(e,t,T),this.test?.render(e,t,T),this.update?.render(e,t,T),this.body.render(e,t)}}class Ho extends hi{createScope(e){super.createScope(this.idScope=new Vs(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Ls(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===te&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=X){super.render(e,t),n===se&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class qo extends Gs{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const Ko=Symbol("unset");class Jo extends Vn{constructor(){super(...arguments),this.testValue=Ko}deoptimizeCache(){this.testValue=Ut}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)}includePath(e,t,n){if(this.included=!0,n)this.includeRecursively(n,t);else{const e=this.getTestValue();"symbol"==typeof e?this.includeUnknownTest(t):this.includeKnownTest(t,e)}}parseNode(e){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new qo(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new qo(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)}applyDeoptimizations(){}getTestValue(){return this.testValue===Ko?this.testValue=this.test.getLiteralValueAtPath(Ct,Lt,this):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.includePath(Ot,e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.includePath(Ot,e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.includePath(Ot,e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.includePath(Ot,t,e),this.consequent.includePath(Ot,t,e),this.alternate?.includePath(Ot,t,e)}includeUnknownTest(e){this.test.includePath(Ot,e,!1);const{brokenFlow:t}=e;let n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.includePath(Ot,e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.includePath(Ot,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!==re&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Jo&&e.alternate)return!0;if(e instanceof ci)return!1;e=e.parent}while(e);return!1}}class Xo extends Vn{}class Yo extends Vn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Yo.prototype.needsBoundaries=!0;class Zo extends Vn{applyDeoptimizations(){}}function Qo(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class ea extends Vn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,Ct,this.init||fn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)||this.isUsingDeclaration}includePath(e,t,n){const{deoptimized:s,id:i,init:r}=this;s||this.applyDeoptimizations(),this.included=!0,r?.includePath(Ct,t,n),i.markDeclarationReached(),(n||i.shouldBeIncluded(t))&&i.includePath(Ct,t,n)}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=B(e.original,"=",o.end);e.remove(l,V(e.original,t+1))}if(a){if(o instanceof Ls&&a instanceof Co&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?X:{renderedSurroundingElement:se})}else o instanceof Ls&&Qo(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof Ls&&t instanceof Co&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class ta extends Vn{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}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof li)return Z;if(e instanceof Eo){const t=e.parent;if(t instanceof li)return Z;if(t instanceof ea){const e=t.id;if(e instanceof Ls)return this.hasUnknownAccessedKey?void 0:[...this.accessedPropKey];if(e instanceof go)return ia(e)}if(t instanceof Yi){const e=t.property;if(!t.computed&&e instanceof Ls)return[e.name]}}else if(e instanceof Yi){const t=e.parent,n=e.property;if(!(t instanceof vo&&n instanceof Ls))return;const s=n.name;if(t.parent instanceof li&&["catch","finally"].includes(s))return Z;if("then"!==s)return;if(0===t.arguments.length)return Z;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof mo||i instanceof Ho))return;if(0===i.params.length)return Z;const r=i.params[0];return 1===i.params.length&&r instanceof go?ia(r):void 0}}hasEffects(){return!0}includePath(e,t,n){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this),this.source.includePath(e,t,n)),this.hasUnknownAccessedKey||(e[0]===wt?(this.hasUnknownAccessedKey=!0,this.scope.context.includeDynamicImport(this)):"string"==typeof e[0]&&(this.accessedPropKey.add(e[0]),this.scope.context.includeDynamicImport(this)))}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,B(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([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const d=[...sa[c]||[]];let u;({helper:u,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),u&&d.push(u),d.length>0&&this.scope.addAccessedGlobals(d,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},d){const u=d.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(u)return{helper:null,mechanism:u};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof dn))return{helper:null,mechanism:null};const n=na(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[d,u]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${d}${i}`,a+=`${u})`,!r&&h&&(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",d=na(e,t,o),[u,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=d?`${u}${s}(/*#__PURE__*/${d}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:d,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function na(e,t,n){return"external"===t?Ni[n(e instanceof dn?e.id:null)]:"default"===t?$i:null}const sa={amd:["require"],cjs:["require"],system:["module"]};function ia(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 ra extends Vn{applyDeoptimizations(){}}class oa extends Vn{applyDeoptimizations(){}}class aa extends Rs{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)}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 la extends Vn{render(e,t,{jsxMode:n}=X){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof aa?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=ln(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?e.overwrite(t.end,s.start,": ",{contentOnly:!0}):e.appendLeft(t.end,": true")}}}}class ca extends Vn{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)}}class da extends ca{}class ua extends ca{}class ha extends Vn{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 pa extends Vn{}class fa extends Vn{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)}}function ma(e){let t=0;for(const n of e)n instanceof fa&&n.expression instanceof pa||t++;return t}function ga(e,t,n,s){const[i,r]=e.split(".");let o;if(n){if(o=s.scope.context.getImportedJsxFactoryVariable(r?"default":i,s.start,n),t){s.scope.findGlobal(i).includePath(Ot,Ln()),o.globalName=i}}else o=s.scope.findGlobal(i);return s.scope.context.includeVariableInModule(o,Ot),o instanceof Ds&&(o.consolidateInitializers(),o.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),o}class ya extends Vn{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)}includePath(e,t,n){if(!this.included){const{factory:e,importSource:t,mode:n}=this.jsxMode;e&&(this.factory=e,this.factoryVariable=ga(e,"preserve"===n,t,this))}super.includePath(e,t,n)}applyDeoptimizations(){}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:ma(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 fa&&n.expression instanceof pa?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}}}class ba extends ya{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 ha)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,[,...d]=o.split("."),{firstAttribute:u,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...d].join("."),!1);this.wrapAttributes(e,f,h,p,u,"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:d,hasSpread:u,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,d||!!m,u,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:d}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let u=null,h=!1,p=!1,f=d,m=!1,g=null;for(const t of o){if(t instanceof la){if(s&&"key"===t.name.name){u=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:u,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof ha&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}}class Ea extends ya{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:d}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(d," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}}class xa extends Vn{}class Sa extends Vn{}class Aa extends Vn{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})}}class Pa extends Vn{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includePath(e,t,n){if(!this.included){const e=this.scope.context.options.jsx;if("automatic"===e.mode)this.fragment="Fragment",this.fragmentVariable=ga("Fragment",!1,e.jsxImportSource,this);else{const{fragment:t,importSource:n,mode:s}=e;null!=t&&(this.fragment=t,this.fragmentVariable=ga(t,"preserve"===s,n,this))}}super.includePath(e,t,n)}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 $a extends Vn{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 va extends Vn{render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.value),{contentOnly:!0})}}class wa extends Vn{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}includePath(e,t,n){this.included=!0;const{brokenFlow:s,includedLabels:i}=t;t.includedLabels=new Set,this.body.includePath(Ot,t,n),(n||t.includedLabels.has(this.label.name))&&(this.label.includePath(Ot,Ln()),t.includedLabels.delete(this.label.name),t.brokenFlow=s),t.includedLabels=new Set([...i,...t.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,V(e.original,B(e.original,":",this.label.end)+1)),this.body.render(e,t)}}class Ia extends Vn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ft(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=jt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Ot);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Z;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Ut}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Oo([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)}includePath(e,t,n){this.included=!0;const s=this.getUsedBranch();n||s===this.right&&this.left.shouldBeIncluded(t)||!s?(this.left.includePath(e,t,n),this.right.includePath(e,t,n)):s.includePath(e,t,n)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=X){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=B(e.original,this.operator,this.left.end);if(this.right.included){const t=V(e.original,o+2);e.remove(this.start,t),s&&W(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!F.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(Ct,Lt,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}class ka extends Vn{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(Ct,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),n?super.includePath(e,t,n):(this.included=!0,this.callee.includePath(Ot,t,!1)),this.callee.includeCallArguments(t,this.interaction)}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),Po(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}}class Na extends Vn{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)}includePath(e,t,n){this.included=!0,this.getObjectEntity().includePath(e,t,n),this.protoProp?.includePath(Ot,t,n)}render(e,t,{renderedSurroundingElement:n}=X){if(n!==se&&n!==ee||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=G(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)):L(i,e,o,a);s&&e.remove(s,this.end-1)}}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Yn;const t=[];for(const n of this.properties){if(n instanceof Fn){t.push({key:wt,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Ct,Lt,this);if("symbol"==typeof e){t.push({key:wt,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Ls?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof qi&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Kn(t,e)}}class Ca extends Vn{initialise(){const e=this.scope.context.module.id;return _e(mt(Le(ht(this.message)),e))}}class Oa extends Vn{initialise(){const e=this.start,t=this.scope.context.module.id,n=mt(Le(ht(this.message,e)),t);this.scope.context.error(n,e)}}class Da extends Vn{}class Ma extends Vn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Tn()):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(pe,et(e,s.id,ae(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}includePath(e,t,n){this.included=!0;for(const e of this.body)(n||e.shouldBeIncluded(t))&&e.includePath(Ot,t,n)}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(he,it(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]}U(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class Ra extends js{get method(){return Ft(this.flags,262144)}set method(e){this.flags=jt(this.flags,262144,e)}get shorthand(){return Ft(this.flags,524288)}set shorthand(e){this.flags=jt(this.flags,524288,e)}declare(e,t,n){const s=t.at(-1)===wt?t:this.computed?[...t,wt]:this.key instanceof Ls?[...t,this.key.name]:[...t,String(this.key.value)];return this.value.declare(e,s,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}includePath(e,t,n){this.included=!0,this.key.includePath(Ct,t,n),this.value.includePath(e,t,n)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){}}class _a extends Vn{get computed(){return Ft(this.flags,1024)}set computed(e){this.flags=jt(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):Ut}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):qt}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Fs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}}class La extends Vn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}includePath(e,t,n){this.included=!0,this.argument?.includePath(Ot,t,n),t.brokenFlow=!0}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Ht)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}class Ta extends Vn{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)}includePath(e,t,n){this.included=!0;const s=this.expressions[this.expressions.length-1];for(const i of this.expressions)(n||i===s&&!(this.parent instanceof li)||i.shouldBeIncluded(t))&&i.includePath(e,t,n)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=X){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:d,end:u}of G(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&W(e,d,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 L(l,e,d,u);o&&e.remove(o,this.end)}}class Ba extends Vn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e))}}class za extends Vn{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}includePath(e,t,n){this.included=!0,this.test?.includePath(Ot,t,n);for(const e of this.consequent)(n||e.shouldBeIncluded(t))&&e.includePath(Ot,t,n)}render(e,t,n){if(this.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:B(e.original,"default",this.start)+7,i=B(e.original,":",s)+1;U(this.consequent,e,i,n.end,t)}else super.render(e,t)}}za.prototype.needsBoundaries=!0;class Va extends Vn{createScope(e){this.parentScope=e,this.scope=new Gs(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}includePath(e,t,n){this.included=!0,this.discriminant.includePath(Ot,t,n);const{brokenFlow:s,hasBreak:i}=t;t.hasBreak=!1;let r=!0,o=n||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let e=this.cases.length-1;e>=0;e--){const i=this.cases[e];if(i.included&&(o=!0),!o){const e=Tn();e.ignore.breaks=!0,o=i.hasEffects(e)}o?(i.includePath(Ot,t,n),r&&=t.brokenFlow&&!t.hasBreak,t.hasBreak=!1,t.brokenFlow=s):r=s}o&&null!==this.defaultCase&&(t.brokenFlow=r),t.hasBreak=i}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&&U(this.cases,e,this.cases[0].start,this.end-1,t)}}class Fa extends $o{bind(){if(super.bind(),this.tag.type===ie){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(he,Ye(e),this.start)}}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(Ct,this.interaction,e)}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),n?super.includePath(e,t,n):(this.included=!0,this.tag.includePath(Ot,t,n),this.quasi.includePath(Ot,t,n)),this.tag.includeCallArguments(t,this.interaction);const[s]=this.getReturnExpression();s.included||s.includePath(Ot,t,!1)}initialise(){super.initialise(),this.args=[Ht,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Yi&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Ct,Lt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Lt){return null===this.returnExpression?(this.returnExpression=qt,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Ct,this.interaction,e,this)):this.returnExpression}}class ja extends Vn{get tail(){return Ft(this.flags,1048576)}set tail(e){this.flags=jt(this.flags,1048576,e)}bind(){}hasEffects(){return!1}includePath(){this.included=!0}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}class Ua extends Vn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Ut:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?qt:Nn(In,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||kn(In,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class Ga extends Vs{constructor(e,t){super(e,t),this.variables.set("this",new Ds("this",null,fn,Ct,t,"other"))}addDeclaration(e,t,n,s,i){return this.context.module.importDescriptions.has(e.name)&&t.error(pt(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t,n){const s=new fr(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 Os&&this.accessedOutsideVariables.set(e,n),n}}class Wa extends Vn{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)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e))}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Ga?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(he,{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:Ae("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 Ha extends Vn{hasEffects(){return!0}includePath(e,t,n){this.included=!0,this.argument.includePath(Ot,t,n),t.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class qa extends Vn{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)}includePath(e,t,n){const s=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:i,includedLabels:r}=t;if(this.directlyIncluded&&s){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)r.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.includePath(Ot,t,s?Bn:n),r.size>0&&(this.includedLabelsAfterBlock=[...r]),t.brokenFlow=i;null!==this.handler&&(this.handler.includePath(Ot,t,n),t.brokenFlow=i),this.finalizer?.includePath(Ot,t,n)}}const Ka={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Ut,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class Ja extends Vn{get prefix(){return Ft(this.flags,2097152)}set prefix(e){this.flags=jt(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ut;const s=this.argument.getLiteralValueAtPath(Ct,t,n);return"symbol"==typeof s?Ut:Ka[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Ls)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Ct,Xt,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(Ct),this.scope.context.requestTreeshakingPass())}}class Xa extends Vn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}includePath(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(t,n,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Ht)}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?q(s,this.start,this.end,e,t):K(s,this.start,this.end,this.parent.type!==se,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${H([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==se,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(Ct),this.argument instanceof Ls){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}class Ya extends Vn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Ct)}hasEffectsOnInteractionAtPath(){return!1}includePath(e,t,n,{asSingleStatement:s}=X){this.included=!0;for(const e of this.declarations){(n||e.shouldBeIncluded(t))&&e.includePath(Ot,t,n);const{id:i,init:r}=e;s&&i.includePath(Ct,t,n),r&&i.included&&!r.included&&(i instanceof go||i instanceof fo)&&r.includePath(Ct,t,n)}}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=X){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===ie){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)}applyDeoptimizations(){}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,` ${H(r,o)};`)}renderReplacedDeclarations(e,t){const n=G(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=V(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,d="";const u=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Ls&&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,u);for(const{node:u,start:p,separator:f,contentEnd:m,end:g}of n)if(u.included){if(u.render(e,t),o="",a="",!u.id.included||u.id instanceof Ls&&Qo(u.id.variable,t.exportNamesByVariable))c&&(d+=";"),l=!1;else{if(h&&h===u.id.variable){const n=B(e.original,"=",u.id.end);q(h,V(e.original,n+1),null===f?m:f,e,t)}l?d+=",":(c&&(d+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,d+o):(e.overwrite(r,r+1,d),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,d=""}else L(u,e,p,g);this.renderDeclarationEnd(e,d,r,s,i,u,t)}}class Za extends Vn{hasEffects(e){return!!this.test.hasEffects(e)||Lo(e,this.body)}includePath(e,t,n){this.included=!0,this.test.includePath(Ot,t,n),To(t,this.body,n)}}class Qa extends Vn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const el=["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"],tl=[Ca,Oa,us,fo,mo,yo,bo,Eo,So,ci,Ao,vo,wo,Io,No,Js,Co,Do,Mo,Ro,_o,li,Bo,zo,Vo,fi,Fo,jo,li,Uo,Go,Wo,pi,Ho,Ls,Jo,Xo,Yo,Zo,ta,ra,oa,la,da,ua,ba,pa,fa,Ea,aa,xa,Sa,Aa,Pa,ha,$a,va,wa,qi,qi,qi,qi,qi,qi,Ia,Yi,tr,Us,ka,Na,go,Da,Ma,Ra,_a,di,La,Ta,Fn,Ws,Ba,za,Va,Fa,ja,Ua,Wa,Ha,qa,Ja,Xa,Ya,ea,Za,Qa],nl=[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=il(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=il(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=Mn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=e.params=il(e,s,n[t+2],n);s.addParameterVariables(o.map((e=>e.declare("parameter",Ct,Ht))),o[o.length-1]instanceof di),e.body=sl(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Cn[n[t]],e.left=sl(e,s,n[t+1],n),e.right=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=sl(e,s,n[t],n),e.right=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Cn[n[t]],e.left=sl(e,s,n[t+1],n),e.right=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=il(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Mn(n[t+1],n),e.callee=sl(e,s,n[t+2],n),e.arguments=il(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:sl(e,s,i,n);r?.declare("parameter",Ct,Ht),e.body=sl(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.body=[];if(i){const t=n[i];for(let o=0;o<t;o++){const t=n[i+1+o];r.push(sl(e,1&n[t+3]?s:s.instanceScope,t,n))}}},function(e,t,n){const{scope:s}=e;e.decorators=il(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:sl(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:sl(e,s,r,n),e.body=sl(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=il(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:sl(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:sl(e,s,r,n),e.body=sl(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=sl(e,s,n[t],n),e.consequent=sl(e,s,n[t+1],n),e.alternate=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:sl(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=sl(e,s,n[t],n),e.test=sl(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:sl(e,s,i,n),e.source=sl(e,s,n[t+1],n),e.attributes=il(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=il(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:sl(e,s,i,n),e.attributes=il(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:sl(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=sl(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=sl(e,s,n[t],n),e.right=sl(e,s,n[t+1],n),e.body=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=sl(e,s,n[t+1],n),e.right=sl(e,s,n[t+2],n),e.body=sl(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:sl(e,s,i,n);const r=n[t+1];e.test=0===r?null:sl(e,s,r,n);const o=n[t+2];e.update=0===o?null:sl(e,s,o,n),e.body=sl(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=Mn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:sl(e,s.parent,o,n);const a=e.params=il(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Ct,Ht))),a[a.length-1]instanceof di),e.body=sl(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=Mn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:sl(e,e.idScope,o,n);const a=e.params=il(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Ct,Ht))),a[a.length-1]instanceof di),e.body=sl(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=sl(e,s,n[t],n),e.consequent=sl(e,e.consequentScope=new qo(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:sl(e,e.alternateScope=new qo(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=sl(e,s,n[t],n),e.value=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=il(e,s,n[t],n),e.source=sl(e,s,n[t+1],n),e.attributes=il(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=sl(e,s,n[t],n),e.sourceAstNode=uo(n[t],n);const i=n[t+1];e.options=0===i?null:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=sl(e,s,n[t+1],n),e.imported=0===i?e.local:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=sl(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=sl(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=sl(e,s,n[t],n),e.children=il(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:sl(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=sl(e,s,n[t],n),e.children=il(e,s,n[t+1],n),e.closingFragment=sl(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=sl(e,s,n[t],n),e.property=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=sl(e,s,n[t],n),e.name=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=sl(e,s,n[t+1],n),e.attributes=il(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=sl(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=sl(e,s,n[t],n),e.body=sl(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=Cn[n[t]],e.left=sl(e,s,n[t+1],n),e.right=sl(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=sl(e,s,n[t+1],n),e.property=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=sl(e,s,n[t],n),e.property=sl(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=il(e,s,n[t+1],n),e.key=sl(e,s,n[t+2],n),e.value=sl(e,s,n[t+3],n),e.kind=Cn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Mn(n[t],n),e.callee=sl(e,s,n[t+1],n),e.arguments=il(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=il(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=il(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=il(e,s,n[t],n),e.invalidAnnotations=Mn(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=sl(e,s,n[t+2],n),e.kind=Cn[n[t+3]],e.key=0===r?e.value:sl(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=il(e,s,n[t+1],n),e.key=sl(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:sl(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=il(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=il(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:sl(e,s,i,n),e.consequent=il(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=sl(e,e.parentScope,n[t],n),e.cases=il(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=sl(e,s,n[t],n),e.quasi=sl(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=il(e,s,n[t],n),e.expressions=il(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=sl(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=sl(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:sl(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:sl(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Cn[n[t]],e.argument=sl(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Cn[n[t+1]],e.argument=sl(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Cn[n[t]],e.declarations=il(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=sl(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:sl(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=sl(e,s,n[t],n),e.body=sl(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:sl(e,s,r,n)}];function sl(e,t,n,s){const i=s[n],r=tl[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=el[i],o.start=s[n+1],o.end=s[n+2],nl[i](o,n+3,s),o.initialise(),o}function il(e,t,n,s){if(0===n)return Z;const i=s[n++],r=[];for(let o=0;o<i;o++){const i=s[n++];r.push(i?sl(e,t,i,s):null)}return r}const rl={ArrayExpression:us,ArrayPattern:fo,ArrowFunctionExpression:mo,AssignmentExpression:yo,AssignmentPattern:bo,AwaitExpression:Eo,BinaryExpression:So,BlockStatement:ci,BreakStatement:Ao,CallExpression:vo,CatchClause:wo,ChainExpression:Io,ClassBody:No,ClassDeclaration:Js,ClassExpression:Co,ConditionalExpression:Do,ContinueStatement:Mo,DebuggerStatement:Ro,Decorator:_o,DoWhileStatement:Bo,EmptyStatement:zo,ExportAllDeclaration:Vo,ExportDefaultDeclaration:fi,ExportNamedDeclaration:Fo,ExportSpecifier:jo,ExpressionStatement:li,ForInStatement:Uo,ForOfStatement:Go,ForStatement:Wo,FunctionDeclaration:pi,FunctionExpression:Ho,Identifier:Ls,IfStatement:Jo,ImportAttribute:Xo,ImportDeclaration:Yo,ImportDefaultSpecifier:Zo,ImportExpression:ta,ImportNamespaceSpecifier:ra,ImportSpecifier:oa,JSXAttribute:la,JSXClosingElement:da,JSXClosingFragment:ua,JSXElement:ba,JSXEmptyExpression:pa,JSXExpressionContainer:fa,JSXFragment:Ea,JSXIdentifier:aa,JSXMemberExpression:xa,JSXNamespacedName:Sa,JSXOpeningElement:Aa,JSXOpeningFragment:Pa,JSXSpreadAttribute:ha,JSXSpreadChild:$a,JSXText:va,LabeledStatement:wa,Literal:qi,LogicalExpression:Ia,MemberExpression:Yi,MetaProperty:tr,MethodDefinition:Us,NewExpression:ka,ObjectExpression:Na,ObjectPattern:go,PanicError:Ca,ParseError:Oa,PrivateIdentifier:Da,Program:Ma,Property:Ra,PropertyDefinition:_a,RestElement:di,ReturnStatement:La,SequenceExpression:Ta,SpreadElement:Fn,StaticBlock:Ws,Super:Ba,SwitchCase:za,SwitchStatement:Va,TaggedTemplateExpression:Fa,TemplateElement:ja,TemplateLiteral:Ua,ThisExpression:Wa,ThrowStatement:Ha,TryStatement:qa,UnaryExpression:Ja,UnknownNode:class extends Vn{hasEffects(){return!0}includePath(e,t){super.includePath(e,t,!0)}},UpdateExpression:Xa,VariableDeclaration:Ya,VariableDeclarator:ea,WhileStatement:Za,YieldExpression:Qa};class ol extends Zt{constructor(e){super(Dr),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var al;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(al||(al={}));const ll=new WeakMap;function cl(e,t){if(e){const t=ll.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=o.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||cl(e)}function dl(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?o.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return ll.set(i,s),i}function ul(e){return e.id}const hl=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>function(e){const t=uo(0,e);switch(t.type){case"PanicError":return _e(Le(ht(t.message)));case"ParseError":return _e(Le(ht(t.message,t.start)));default:return t}}(po(ro(e,t,n))),pl=new Set(["assert","with"]);function fl(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Na))return n&&t.module.log(he,at(t.module.id),s),Y;const i=n.properties.find((e=>pl.has(ml(e))))?.value;if(!i)return Y;if(!(i instanceof Na))return t.module.log(he,(r=t.module.id,{code:Fe,message:`Rollup could not statically analyze the options argument of a dynamic import in "${be(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),Y;var r;const o=i.properties.map((e=>{const n=ml(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(he,at(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):Y}const ml=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function gl(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var yl="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},bl={memoryUsage:()=>({heapUsed:0})};let El=new Map;function xl(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function Sl(e,t=3){e=xl(e,t);const n=bl.memoryUsage().heapUsed,s=yl.now(),i=El.get(e);void 0===i?El.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Al(e,t=3){e=xl(e,t);const n=El.get(e);if(void 0!==n){const e=bl.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=yl.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Pl(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of El)e[t]=[s,n,i];return e}let $l=hn,vl=hn;const wl=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Il(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of wl)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){$l(s,4);const t=r.apply(this,e);return vl(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 kl={identifier:null,localName:Dr};function Nl(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:_e((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${be(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 Cl(e,t){const n=Pt(t.sideEffectDependenciesByVariable,e,$t);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof fr?s.getDirectOriginalVariable():s instanceof gr?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 Ol{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.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new ol(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:d,exportAllSources:u,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 d.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of u)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...u].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,ul).sort()},get implicitlyLoadedBefore(){return Array.from(f,ul).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!==al.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=O(this.id),t=M(this.id);return rn(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){en(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),_e(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 dn)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 gr?s=s.getBaseVariable():s instanceof fr&&(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 fr&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof Qt))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 dn)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:_e((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${be(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}=Y){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]=Nl(r.module,r.localName,t,!1,i);return e?(t&&(Dl(e,t,this),this.info.moduleSideEffects&&Pt(t.sideEffectDependenciesByVariable,e,$t).add(this)),[e]):this.error(ct(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===kl)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(Dl(n,t,this),Pt(t.sideEffectDependenciesByVariable,n,$t).add(this)),[n]}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?[Pt(this.syntheticExports,e,(()=>new gr(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=Ln();this.ast.shouldBeIncluded(e)&&this.ast.includePath(Ct,e,!1)}includeAllExports(e){this.isExecuted||(un(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return _e((t=s,n=this.id,{binding:t,code:Ue,exporter:n,message:`Exported variable "${t}" is not defined in "${be(n)}".`,url:Ae(Pe)}));e.deoptimizePath(Ot),this.includeVariable(e,Ot)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Ot),t.included||this.includeVariable(t,Ot),t instanceof Qt&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.includePath(Ot,Ln(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(un(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath(Ot),e.included||this.includeVariable(e,Ct)),this.exports.has(n)||this.reexportDescriptions.has(n)||(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 dn?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?_e((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($l("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=dl(i),this.sourcemapChain=o.map((e=>e.missing?e:dl(e))),cl(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const d=this.id;this.magicString=new x(t,{filename:this.excludeFromSourcemap?null:d,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:d,getExports:this.getExports.bind(this),getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>rl[e]||rl.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Ga(this.graph.scope,this.astContext),this.namespace=new mr(this.astContext);const u={context:this.astContext,type:"Module"};if(e)this.ast=new rl[e.type](u,this.scope).parseNode(e),this.info.ast=e;else{vl("generate ast",3);const e=await async function(e,t,n){return ro(e,t,n)}(t,!1,!1!==this.options.jsx);$l("generate ast",3),this.ast=(h=e,p=u,f=this.scope,sl(p,f,0,po(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d))return this.graph.astLru.get(d);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(d,e),e)}}})}var h,p,f;vl("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,ul),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}=Y){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 Ol&&"*"===r.name)return e.namespace;const[i]=Nl(e,r.name,t||this,n,s);return i||this.error(ct(r.name,this.id,e.id),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 fi)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Vo){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof qi?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 qi){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof qi?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof qi?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Ya)for(const e of t.declarations)for(const t of Ur(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 Ls?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(pt(e),n.local.start);const s=n instanceof Zo?"default":n instanceof ra?"*":n.imported instanceof Ls?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,Y)}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=ae(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];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(he,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))}Te(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 dn||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=>[ml(e),e.value.value]))):Y);var s;const i=this.sourcesWithAttributes.get(e);i?gl(i,n)&&this.log(he,nt(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 "${be(a)}" even though it is needed in "${be(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:Ae($e)}),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]=Nl(o,e,t,!0,Ml(n));o instanceof dn||l?r.add(a):a instanceof gr?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(he,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${be(a)}" re-exports "${o}" from one of the modules ${ge(l.map((e=>be(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(he,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${be(t)}" re-exports "${e}" from one of the external modules ${ge(s.map((e=>be(e))))}, guessing "${be(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof dn){const[t]=n.getVariableForExportName("*");t.includePath(Ot,Ln()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(Ot,Ln()),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 Ol){t.includedDynamicImporters.includes(this)||t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e,t){const n=e.module;if(e.included)n instanceof Ol&&n!==this&&Cl(e,this);else if(this.graph.needsTreeshakingPass=!0,n instanceof Ol&&(n.isExecuted||un(n),n!==this)){const t=Cl(e,this);for(const e of t)e.isExecuted||un(e)}e.includePath(t,Ln())}includeVariableInModule(e,t){this.includeVariable(e,t);const n=e.module;n&&n!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(he,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${be(t)}".`})),this.exports.set(e,kl)}tryParse(){try{return hl(this.info.code,{jsx:!1!==this.options.jsx})}catch(e){return this.error(mt(e,this.id),e.pos)}}}function Dl(e,t,n){if(e.module instanceof Ol&&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 Ml=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)]))),Rl=(e,t)=>t?`${e}\n${t}`:e,_l=(e,t)=>t?`${e}\n\n${t}`:e;const Ll={amd:zl,cjs:zl,es:Bl,iife:zl,system:Bl,umd:zl};function Tl(e,t,n,s,i,r,o,a,l,c,d,u,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,u,h);!function(e,t,n){for(const s of t){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof fr&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Bs(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Bs(t.name,e,t.forbiddenNames))}}}(s,f,p),Ll[i](s,n,t,r,o,a,l,c,d);for(const e of f)e.scope.deconflict(i,u,h)}function Bl(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof yr)&&(t.variableName=Bs(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof dn)?n.setRenderNames(null,(t instanceof dn?a.get(t):o.get(t)).variableName):t instanceof dn&&"default"===s?n.setRenderNames(null,Bs([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Bs(rn(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Bs(t.name,e,t.forbiddenNames))}function zl(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Bs(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Bs(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Ci(r(t.id),a)?t.namespaceVariableName:Bs(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof dn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=Ii[s]?n.defaultVariableName:n.variableName;ki(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Ni[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 Vl(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return _e(ot("default",o,i))}else if("none"===t&&o.length>0)return _e(ot("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(he,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${be(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:Ae(Ie)}}(i,n)),t="named")),t}function Fl(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 jl(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof dn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),jl(e,t,n,s,i,r)):t.push(o)}}const Ul="!~{",Gl="}~",Wl=new RegExp(`${Ul}[0-9a-zA-Z_$]{1,17}${Gl}`,"g"),Hl=(e,t)=>e.replace(Wl,(e=>t.get(e)||e)),ql=(e,t,n)=>e.replace(Wl,(e=>e===t?n:e)),Kl=Symbol("bundleKeys"),Jl={type:"placeholder"};function Xl(e,t,n){return Ee(e)?_e(xt(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,((e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return _e(xt(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return Ee(r)?_e(xt(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function Yl(e,{[Kl]:t}){if(!t.has(e.toLowerCase()))return e;const n=M(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 Zl=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Ql(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(he,(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:Ae("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class ec{constructor(e,t,n,s,i,r,o,a,l,c,d,u,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=d,this.getPlaceholder=u,this.bundle=h,this.inputBase=p,this.snippets=f,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!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=rn(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,d,u,h,p,f){const m=new ec([],e,t,n,s,i,r,o,a,l,null,u,h,p,f);m.assignFacadeName(d,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof Ol?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 gr&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Hl(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)}}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=Ts(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Ts(s))}while(tn.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=Vl(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 e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){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(ec.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=tc(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}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 bi(Se(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=O(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Xl("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=Yl(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Jl),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=Xl("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=Yl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(rc),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,rc),importedBindings:sc(this.getRenderedDependencies(),rc),imports:Array.from(this.dependencies,rc),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof mr?"*":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=[];jl(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)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof ec&&this.inlineChunkDependencies(t);const d=this.getPreliminaryFileName(),u=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(d.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,S=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!S&&t.some((e=>"default"===e.reexported))&&(S=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!S)for(const{exported:e}of E)if("default"===e){S=!0;break}const{intro:A,outro:P,banner:$,footer:v}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Rl),t.hookReduceValue("footer",e.footer(n),[n],Rl),t.hookReduceValue("intro",e.intro(n),[n],_l),t.hookReduceValue("outro",e.outro(n),[n],_l)]);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 _e((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(i,r,this.getRenderedChunkInfo());if(Fr[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:S,hasExports:x,id:d.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:P,snippets:o,usesTopLevelAwait:y},i),$&&f.prepend($),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return v&&f.append(v),{chunk:this,magicString:f,preliminaryFileName:d,preliminarySourcemapFileName:u,usedModules:g}}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):tc(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof Ol){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(he,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${be(i)}" was reexported through module "${be(r)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${be(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof gr,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof mr&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof Ol){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?tc(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 gr)){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 Ds){for(const e of s.declarations)if(e.parent instanceof pi||e instanceof fi&&e.declaration instanceof pi){r=!0;break}}else s instanceof gr&&(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 dn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?Ii[n(o.id)]&&i.add(a):t.isNamespace&&Ni[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every((e=>e.startsWith("*"))))&&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 ec||e instanceof yr)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof dn){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?ye(this.fileName):ye(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 dn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return _e(bt(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);Pt(t,i,vt).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 Ol?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof dn?{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=nc(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(C(e.id.split(ic,1)[0])),r=M(i),o=Zl.has(r)?i.slice(0,-r.length):i;return k(o)?n&&_(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"!==this.inputBase||o.startsWith("/")?R(this.inputBase,o):R(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+O(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(he,Et(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof gr)continue;const a=n.module;if(a instanceof Ol){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 _e(bt(a.id,r,!0));o=e&&("default"!==r||ki(t(a.id),!0))}}Pt(n,i,vt).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 yr||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof yr?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof yr&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Ql(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof ec,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 ec&&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:d,snippets:u}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m}}=l,{_:g,cnst:y,n:b}=u;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const E=new A({separator:`${b}${b}`}),S=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Fl(t.originalCode);if(null!==e)return e}return"\t"}(a,l),P=[];let $="";const v=new Set,w=new Map,I={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:S,pluginDriver:c,snippets:u,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(I);!I.accessedDocumentCurrentScript&&nr.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(wi),I.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),w.set(e,n),E.addSource(n),P.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(I);o.renderFirst()?$+=b+e:E.addSource(new x(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();d[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}$&&E.prepend($+b+b),this.needsExportsShim&&E.prepend(`${b}${y} ${Dr}${g}=${g}void 0;${b}${b}`);const N=h?E:E.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(he,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:v,indent:S,magicString:E,renderedSource:N,usedModules:P,usesTopLevelAwait:k}}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)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}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 gr?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(Dr),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 Wi)o.add(e)}Tl(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 fr&&(n=n.getOriginalVariable()),n instanceof gr&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof Ol&&(this.checkCircularDependencyImport(n,e),n instanceof mr&&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 Ol&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function tc(e){return nc(e)??ye(e.id)}function nc(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function sc(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 ic=/[#?]/,rc=e=>e.getFileName();function*oc(e){for(const t of e)yield*t}function ac(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)lc(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){Pt(n,e,$t).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof dn||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof Ol&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:cc(n,a,o),dynamicImportsByEntry:l}}(e),d=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)),u=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,d),h=function(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])Pt(t,e,$t).add(s)}}return i}(u,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(d,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:d}of e){let e=0n,u=-1n;for(const s of c)e|=1n<<BigInt(s),u&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:u,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of d)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...d),h.pure&&=f,h.size+=p,l<<=1n}const c=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 dn){if(o.info.moduleSideEffects){const e=Pt(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}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(d,u,h,n);return i.push(...function(e,t,n,s,i){$l("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(dc),s.sort(dc),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return vl("optimize chunks",3),e;t>1&&i("info",ut(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=uc(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),fc(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:d,dependentChunks:u,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)d.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)u.add(e),e.dependencies.delete(r),e.dependencies.add(o);d.delete(o),u.delete(o),fc(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",ut(r.small.size+r.big.size,r.small.size,"After merging chunks"));return vl("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function lc(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 dn||n.has(t)||s.add(t)}}function cc(e,t,n){const s=new Map;for(const i of t){const t=Pt(s,i,$t),r=n[i];for(const n of oc([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function dc({size:e},{size:t}){return e-t}function uc(e,{big:t,small:n},s,i,r){let o=null;for(const a of oc([n,t])){if(e===a)continue;const t=hc(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function hc(e,t,n,s,i){const r=pc(e,t,n,s,i);return r<n?r+pc(t,e,n-r,s,i):1/0}function pc(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 fc(e,t,n){return e.size<t?n.small:n.big}const mc=(e,t)=>e.execIndex>t.execIndex?1:-1;function gc(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}const yc=(e,t)=>t?`(${e})`:e;class bc{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 Ec{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:d,source:{content:u,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=u;else if(null==n[p])n[p]=u;else if(null!=u&&n[p]!==u)return _e(yt(h));const f=[r[0],p,c,o];if(d){let e=i.get(d);void 0===e&&(e=s.length,s.push(d),i.set(d,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,r=s.length-1;for(;i<=r;){const e=i+r>>1,o=s[e];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 xc(e){return function(t,n){return n.missing?(e(he,(s=n.plugin,{code:qe,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:Ae("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Ec({mappings:[],names:[]},[t])):new Ec(n,[t]);var s}}function Sc(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=D(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new bc(_(i,o,e),s[t])));r=new Ec(n,a)}else r=new bc(e,t);return s.reduce(i,r)}let Ac;const Pc=e=>function(e){let t,n;try{const r=Gr.__wbindgen_add_to_stack_pointer(-16);Gr.xxhashBase64Url(r,Qr(e));var s=io().getInt32(r+0,!0),i=io().getInt32(r+4,!0);return t=s,n=i,Zr(s,i)}finally{Gr.__wbindgen_add_to_stack_pointer(16),Gr.__wbindgen_export_2(t,n,1)}}(vc(e)),$c={base36:e=>function(e){let t,n;try{const r=Gr.__wbindgen_add_to_stack_pointer(-16);Gr.xxhashBase36(r,Qr(e));var s=io().getInt32(r+0,!0),i=io().getInt32(r+4,!0);return t=s,n=i,Zr(s,i)}finally{Gr.__wbindgen_add_to_stack_pointer(16),Gr.__wbindgen_export_2(t,n,1)}}(vc(e)),base64:Pc,hex:e=>function(e){let t,n;try{const r=Gr.__wbindgen_add_to_stack_pointer(-16);Gr.xxhashBase16(r,Qr(e));var s=io().getInt32(r+0,!0),i=io().getInt32(r+4,!0);return t=s,n=i,Zr(s,i)}finally{Gr.__wbindgen_add_to_stack_pointer(16),Gr.__wbindgen_export_2(t,n,1)}}(vc(e))};function vc(e){return"string"==typeof e?"undefined"==typeof Buffer?(Ac??=new TextEncoder,Ac.encode(e)):Buffer.from(e):e}let wc="sourceMa";async function Ic(e,t,n,s,i){$l("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())));vl("render chunks",2),$l("transform chunks",2);const o=$c[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:d,placeholders:u,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,d=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&d.add(t);return await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:u,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:u,sourcemapFileName:p?.fileName??null,...await kc(f,u,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(Wl,(e=>t.has(e)?(n.add(e),`${Ul}${"0".repeat(e.length-5)}${Gl}`):e));return{containedPlaceholders:n,transformedCode:s}})(y,d);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:d,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,d;do{d&&(a=d),d=r(a).slice(0,n.length),c=ql(s,n,d)}while(i[Kl].has(c.toLowerCase()));i[c]=Jl,o.set(n,d)}return o}(h,l,c,u,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=Hl(o,t);const d=Hl(a,t);let u=null;c&&(u=l?Hl(l,t):`${d}.map`,c.file=Hl(c.file,t),e+=Nc(u,c,i,r)),n[d]=s.finalizeChunk(e,c,u,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Hl(o,t):o,d=null;c&&(d=l?Hl(l,t):`${a}.map`,s+=Nc(d,c,i,r)),n[a]=e.finalizeChunk(s,c,d,t)}}(h,p,t,d,n,s),vl("transform chunks",2)}async function kc(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=dl(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:d,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(d||"\n"===c[c.length-1]||(c+="\n"),f){let s;$l("sourcemaps",3),s=p?_(g||p):h?_(h,t):_(t);a=function(e,t,n,s,i,r){const o=xc(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>Sc(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new Ec(t,a),c=s.reduce(o,l);let{sources:d,sourcesContent:h,names:p,mappings:f}=c.traceMappings();if(e){const t=D(e);d=d.map((e=>R(t,e))),e=O(e)}h=i?null:h;for(const e of n)cl(e.originalSourcemap,e.sourcemapChain);return new u({file:e,mappings:f,names:p,sources:d,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&_e(xt("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)),y&&(t=y(t,n),"string"!=typeof t&&_e(xt("sourcemapPathTransform function must return a string."))),a.sources[e]=C(t)}vl("sourcemaps",3)}return{code:c,map:a}}function Nc(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=O(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`}wc+="ppingURL";class Cc{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){$l("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===Kl?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{$l("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),vl("initialize render",2),$l("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>22)return _e(xt(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${Ul}${Ts(++e).padStart(n-5,"0")}${Gl}`;return s.length>n?_e(xt(`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 _e(lt("output.format",ke,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return _e(lt("output.file",we,'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 _e(lt("output.sourcemapFile",Me,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(he,lt("output.amd.id",ve,'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();vl("generate chunks",2),await Ic(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),$l("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),vl("generate bundle",2),vl("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)Oc(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 Ol){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)Oc(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{hl(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(he,Ze(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}`,d=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,u=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${d(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=>on.test(e):e=>!tn.has(e)&&on.test(e);return{_:r,cnst:l,getDirectReturnFunction:u,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=u(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${yc(`${r}${yc(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:d,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=ln(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 Ol&&(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 D(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)&&k(s.id)&&n.push(s.id);return n}(l,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof dn&&s.set(i,new yr(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),u=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):ac(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(mc);const n=new ec(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,d,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);u.push(n)}for(const e of u)e.link();const p=[];for(const e of u)p.push(...e.generateFacades());return[...u,...p]}}function Oc(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return _e((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${be(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class Dc extends zs{constructor(){super(),this.parent=null,this.variables.set("undefined",new pr)}findVariable(e){let t=this.variables.get(e);return t||(t=new Os(e),this.variables.set(e,t)),t}}const Mc=e=>()=>_e(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:Ae("plugin-development/#a-simple-example")}}(e)),Rc=Mc("fs.mkdir"),_c=Mc("fs.readFile"),Lc=Mc("fs.writeFile");async function Tc(e,t,n,s,i,r,o,a,l){const c=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}=X)=>(l??=!0,s(e,n,o,a,r||Y,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);return null==c?Mc("path.resolve")():c[0]}const Bc="at position ",zc="at output position ";const Vc={delete:()=>!1,get(){},has:()=>!1,set(){}};function Fc(e){return e.startsWith(Bc)||e.startsWith(zc)?_e({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):_e({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 jc=(e,t,n=Hc)=>{const{onwarn:s,onLog:i}=e,r=Uc(n,s);if(i){const e=me[t];return(t,n)=>i(t,Gc(n),((t,n)=>{if("error"===t)return _e(Wc(n));me[t]>=e&&r(t,Wc(n))}))}return r},Uc=(e,t)=>t?(n,s)=>{n===he?t(Gc(s),(t=>e(he,Wc(t)))):e(n,s)}:e,Gc=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),Wc=e=>"string"==typeof e?{message:e}:"function"==typeof e?Wc(e()):e,Hc=(e,{message:t})=>{switch(e){case he:return console.warn(t);case fe:return console.debug(t);default:return console.info(t)}};function qc(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(he,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Kc={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Z,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Z,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Z,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Jc={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"}},Xc={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Yc=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};_e(lt(`${n}.preset`,s,`valid values are ${ge(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;_e(lt(t,n,`valid values are ${s}${ge(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)},Zc=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 Qc(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:dl(e.map);const a=e.code;let l=e.ast;const c=[],d=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=Wc(t),n&&Te(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,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(he,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(dl("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(d.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Te(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:dl({version:3,...Sc(e,t,n,s,xc(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new x(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new u({...e,file:null,sourcesContent:e.sourcesContent})},info:g(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:g(e.warn)};var l,y}))}catch(e){return _e(gt(e,f,{hook:"transform",id:i}))}return!h&&d.length>0&&(t.transformFiles=d),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:c}}const ed="resolveDependencies";class td{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 Tc(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),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,sd(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,Y),void 0,!1,!e.resolveDependencies||ed)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(sd(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 _c(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${be(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:_e(function(e){return{code:"BAD_LOADER",message:`Error loading "${be(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await Qc(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}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(be(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 Ol)return r&&gl(e,l.info.attributes)&&this.options.onLog(he,nt(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof dn)return _e({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 Ol(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const d=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),u])),u=rd(d).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));u.catch((()=>{})),this.moduleLoadPromises.set(c,d);const h=await d;return a?a===ed&&await u: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 dn))return _e(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${be(t)}", but is already an existing non-external module id.`}}(e,t));gl(l.info.attributes,s)&&this.options.onLog(he,nt(l.info.attributes,s,e,t))}else l=new dn(this.options,r,o,a,"absolute"!==i&&k(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 Ol&&(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||!k(e.id)||!0===i&&id(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(id(e,n,s)||"absolute"),id:i&&s?nd(e,t):e}}const i=s?nd(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:id(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,fl(t.node));return n&&"object"==typeof n&&(t.id=n.id),[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,Y,!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===ed?rd(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?N(t)?_e(function(e,t){return{code:Xe,exporter:e,id:t,message:`Could not resolve "${e}" from "${be(t)}"`}}(t,n)):(this.options.onLog(he,function(e,t){return{code:Xe,exporter:e,id:t,message:`"${e}" is imported by "${be(t)}", but could not be resolved – treating it as an external dependency.`,url:Ae("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(he,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${be(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await Tc(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Y,!0,Y);if(null==r)return _e(null===s?function(e){return{code:Je,message:`Could not resolve entry module "${be(e)}".`}}(e):function(e,t){return{code:Ge,message:`Module "${be(e)}" that should be implicitly loaded before "${be(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?_e(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:Je,message:`Entry module "${be(e)}" cannot be external.`}}(e):function(e,t){return{code:Ge,message:`Module "${be(e)}" that should be implicitly loaded before "${be(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},Y),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?(gl(i.attributes,s)&&this.options.onLog(he,nt(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,Y,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function nd(e,t){return N(e)?t?_(t,"..",e):_(e):e}function sd(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 id(e,t,n){return!0===n||"ifRelativeSource"===n&&N(t)||!k(e)}async function rd(e){const[t,n]=await e;return Promise.all([...t,...n])}function od(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return Yl(Xl("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return St('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',Re,!1,l),e},names:t,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',Re,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>M(c).slice(1),extname:()=>M(c),hash:e=>r.slice(0,Math.max(0,e||8)),name:()=>c.slice(0,Math.max(0,c.length-M(c).length))}),a)}function ad(e,{bundle:t},n){t[Kl].has(e.toLowerCase())?n(he,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Jl}const ld=new Set(["chunk","asset","prebuilt-chunk"]);function cd(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return _e(xt(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class dd{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&&ld.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!Ee(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):_e(xt(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):_e(xt(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return _e({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():_e({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?_e({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):_e({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 _e({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return _e(xt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return _e({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=cd(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=$c[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&ad(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{Pt(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=Pc(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:cd(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&&ad(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>al.LOAD_AND_PARSE)return _e({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return _e(xt(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{})),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return _e(xt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||Ee(e.fileName))return _e(xt(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},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:d}=e;if(!o){const e=i(t);o=s.get(e),o||(o=od(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const u={...e,fileName:o,source:t};this.filesByReferenceId.set(d,u);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 St('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Re,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Re,!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=od(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:d}=this;n[l]={fileName:l,get name(){return St('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Re,!1,d),a.name},names:r,needsCodeReference:c,get originalFileName(){return St('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Re,!1,d),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function ud(e,t,n,s,i){return me[e]<me[i]?hn:(i,r)=>{null!=r&&n(he,{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=Wc(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function hd(e,t,n,i,r,o){const{logLevel:a,onLog:l}=i;let c,d=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(Bc)||e.name.startsWith(zc)||o.has(e.name)?d=!1:o.add(e.name)),t)if(d){const n=e.cacheKey||e.name;h=t[n]||(t[n]=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 u=e.name,c={delete:()=>Fc(u),get:()=>Fc(u),has:()=>Fc(u),set:()=>Fc(u)};else c=Vc;var u,h;return{addWatchFile(e){n.watchFiles[e]=!0},cache:c,debug:ud(fe,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>_e(gt(Wc(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:ud(pe,"PLUGIN_LOG",l,e.name,a),load:e=>n.moduleLoader.preloadModule(e),meta:{rollupVersion:s,watchMode:n.watchMode},parse:hl,resolve:(t,s,{attributes:i,custom:r,isEntry:o,skipSelf:a}=X)=>(a??=!0,n.moduleLoader.resolveId(t,s,r,o,i||Y,a?[{importer:s,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:ud(he,"PLUGIN_WARNING",l,e.name,a)}}const pd=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 fd{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new dd(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,hd(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of pd)n in e&&t.onLog(he,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}));var o}createOutputPluginDriver(e){return new fd(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,yd))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(bd)}getSortedPlugins(e,t){return Pt(this.sortedPlugins,e,(()=>md(e,this.plugins,t)))}runHook(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));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),_e(gt(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 _e(gt(t,n.name,{hook:e}))}}}function md(e,t,n=gd){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 gd(e,t,n){"function"!=typeof e&&_e(function(e,t){return{code:je,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 yd(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return _e(function(e,t){return{code:je,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 bd(){}class Ed{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 xd{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 _t,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=al.LOAD_AND_PARSE,this.scope=new Dc,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 fd(this,e,e.plugins,this.pluginCache),this.moduleLoader=new td(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Ed(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[At]=!0}return t})(e)}async build(){$l("generate module graph",2),await this.generateModuleGraph(),vl("generate module graph",2),$l("sort and bind modules",2),this.phase=al.ANALYSE,this.sortModules(),vl("sort and bind modules",2),$l("mark included statements",2),this.includeStatements(),vl("mark included statements",2),this.phase=al.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 Ol?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)un(t);if(this.options.treeshake){let t=1;do{$l(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&(e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);vl("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()||_e(dt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof Ol){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(gc(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof Ol&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(he,Qe(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(he,ct(t.name,e.id,t.module.id),t.start)}}function Sd(e,t){return t()}function Ad(e,t,n,i){e=md("onLog",e);const r=me[i],o=(i,a,l=Q)=>{ze(a);if(!(me[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>me[e]<r?hn:n=>o(e,Wc(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(fe),error:e=>_e(Wc(e)),info:c(pe),meta:{rollupVersion:s,watchMode:n},warn:c(he)},i,a))return}t(i,a)}};return o}const Pd=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,$d=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},vd=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},wd=e=>{const t=e.jsx;if(!t)return!1;const n=Yc(t,Jc,"jsx",$e,"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||_e(lt("jsx",$e,"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&&_e(lt("jsx.mode",$e,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},Id=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},kd=(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[_(t)]=s;return n=>e[n]??t}return()=>t},Nd=e=>{if(!1===e.treeshake)return!1;const t=Yc(e.treeshake,Kc,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??Z,moduleSideEffects:Cd(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Cd=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&_e(lt("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},Od=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,Dd=/^[a-z]:/i;function Md(e){const t=Dd.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Od,"_")}const Rd=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return _e(lt("output.file",we,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return _e(lt("output.file",we,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},_d=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 _e(lt("output.format",ke,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},Ld=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?_e(lt("output.inlineDynamicImports",Ne,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},Td=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return _e(lt("output.inlineDynamicImports",Ne,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return _e(lt("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Bd=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return _(t)},zd=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?_e(lt("output.amd.id",ve,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?_e(lt("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}},Vd=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Fd=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?_e(lt("output.dir",we,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},jd=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Ud(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return _e({code:Ve,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ae(Ie)});return n||"auto"}const Gd=(e,t)=>(null!=e.externalImportAssertions&&St('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Wd=e=>{const t=Yc(e.generatedCode,Xc,"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}},Hd=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},qd=new Set(["compat","auto","esModule","default","defaultOnly"]),Kd=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Jd(n=t(s)):s in e?e[s]:Jd(e[s]=t(s))}return void 0===t?()=>"default":()=>Jd(t)},Jd=e=>qd.has(e)?e:_e(lt("output.interop",Ce,`use one of ${Array.from(qd,(e=>JSON.stringify(e))).join(", ")}`,e)),Xd=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return _e(lt("output.manualChunks",Oe,'this option is not supported for "output.inlineDynamicImports"'));if(n)return _e(lt("output.manualChunks",Oe,'this option is not supported for "output.preserveModules"'))}return s||{}},Yd=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Zd=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Qd=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+"/":_e(lt("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function eu(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function tu(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 Zc(e.plugins);eu(i,zc);const r=t.createOutputPluginDriver(i);return{...await nu(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Sd(0,(async()=>{const n=new Cc(r,a,t,o,i),s=await n.generate(e);if(e){if($l("WRITE",1),!r.dir&&!r.file)return _e({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Ae(we)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=_(t.dir||D(t.file),e.fileName);return await Rc(D(n),{recursive:!0}),Lc(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),vl("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>iu(e)-iu(t)))};var l}))}function nu(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=_d(e),o=Ld(e,t),a=Td(e,o,t),l=Rd(e,a,t),c=Wd(e),d=Gd(e,t),u={amd:zd(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:Vd(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Fd(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:jd(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Ud(e,s),extend:e.extend||!1,externalImportAssertions:d,externalImportAttributes:d,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:Vd(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:Hd(e,i),inlineDynamicImports:o,interop:Kd(e),intro:Vd(e,"intro"),manualChunks:Xd(e,o,a),minifyInternalExports:Yd(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:Vd(e,"outro"),paths:e.paths||{},plugins:await Zc(e.plugins),preserveModules:a,preserveModulesRoot:Bd(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Md,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Qd(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Zd(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 qc(e,Object.keys(u),"output options",t.onLog),{options:u,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 su;function iu(e){return"asset"===e.type?su.ASSET:e.isEntry?su.ENTRY_CHUNK:su.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(su||(su={})),e.VERSION=s,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:n,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=md("options",await Zc(e.plugins)),i=e.logLevel||pe,r=Ad(n,jc(e,i),t,i);for(const o of n){const{name:n,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:ud(fe,"PLUGIN_LOG",r,n,i),error:e=>_e(gt(Wc(e),n,{hook:"onLog"})),info:ud(pe,"PLUGIN_LOG",r,n,i),meta:{rollupVersion:s,watchMode:t},warn:ud(he,"PLUGIN_WARNING",r,n,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await Zc(e.plugins),r=e.logLevel||pe,o=Ad(i,jc(e,r),t,r),a=e.strictDeprecations||!1,l=Id(e),c={cache:Pd(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:$d(e.external),input:vd(e),jsx:wd(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:kd(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:Nd(e)};return qc(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return eu(i.plugins,Bc),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(El=new Map,$l=Sl,vl=Al,e.plugins=e.plugins.map(Il)):($l=hn,vl=hn)})(n),await async function(){await lo()}();const r=new xd(n,t),o=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0);$l("BUILD",1),await Sd(r.pluginDriver,(async()=>{try{$l("initialize",2),await r.pluginDriver.hookParallel("buildStart",[n]),vl("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),vl("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?_e({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):tu(!1,n,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?_e({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):tu(!0,n,i,e,r)};n.perf&&(a.getTimings=Pl);return a}(e,null)}}));
11
11
  //# sourceMappingURL=rollup.browser.js.map