builder.io 1.2.0 → 1.2.2

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const safeFetch: typeof globalThis.fetch;
@@ -6,7 +6,10 @@ export interface FigmaArgs {
6
6
  help?: boolean;
7
7
  force?: boolean;
8
8
  printJson?: boolean;
9
+ dryrun?: boolean;
10
+ yes?: boolean;
9
11
  spaceId?: string;
12
+ skipInstallation?: boolean;
10
13
  cwd?: string;
11
14
  _: string[];
12
15
  }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/types/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export interface DevToolsSys extends DevToolsPath {
24
24
  exists: (path: string) => Promise<boolean>;
25
25
  existsSync: (path: string) => boolean;
26
26
  readdir: (path: string, absolutePaths?: boolean) => Promise<string[]>;
27
+ readdirRecursive: (path: string, skipFolders?: string[]) => Promise<string[]>;
27
28
  readdirSync: (path: string) => string[];
28
29
  readFile: (filePath: string) => Promise<string | null>;
29
30
  readFileSync: (filePath: string) => string | null;
package/webpack/index.cjs CHANGED
@@ -1,17 +1,17 @@
1
- "use strict";var qt=Object.create;var ne=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var jt=Object.getOwnPropertyNames;var xt=Object.getPrototypeOf,kt=Object.prototype.hasOwnProperty;var j=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),It=(n,e)=>{for(var t in e)ne(n,t,{get:e[t],enumerable:!0})},ze=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jt(e))!kt.call(n,i)&&i!==t&&ne(n,i,{get:()=>e[i],enumerable:!(s=Nt(e,i))||s.enumerable});return n};var Dt=(n,e,t)=>(t=n!=null?qt(xt(n)):{},ze(e||!n||!n.__esModule?ne(t,"default",{value:n,enumerable:!0}):t,n)),Rt=n=>ze(ne({},"__esModule",{value:!0}),n);var G=j((Gs,Ee)=>{"use strict";var pe=class{source(){throw new Error("Abstract")}buffer(){let e=this.source();return Buffer.isBuffer(e)?e:Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}};Ee.exports=pe});var ie=j((Vs,qe)=>{"use strict";var Lt=n=>{if(n===void 0)return{};let e=n.lastIndexOf(`
2
- `);if(e===-1)return{generatedLine:1,generatedColumn:n.length,source:n};let t=2;for(let s=0;s<e;s++)n.charCodeAt(s)===10&&t++;return{generatedLine:t,generatedColumn:n.length-e-1,source:n}};qe.exports=Lt});var X=j((Us,Ne)=>{var Ht=n=>{let e=[],t=n.length,s=0;for(;s<t;)if(n.charCodeAt(s)===10)e.push(`
3
- `),s++;else{let r=s+1;for(;r<t&&n.charCodeAt(r)!==10;)r++;e.push(n.slice(s,r+1)),s=r+1}return e};Ne.exports=Ht});var ue=j((Fs,je)=>{"use strict";var Pt=ie(),Wt=X(),Gt=(n,e,t,s)=>{let i=1,r=Wt(n),f;for(f of r)e(f,i,0,-1,-1,-1,-1),i++;return r.length===0||f.endsWith(`
4
- `)?{generatedLine:r.length+1,generatedColumn:0}:{generatedLine:r.length,generatedColumn:f.length}};je.exports=(n,e,t,s,i)=>i?Pt(n):Gt(n,e,t,s)});var fe=j((Js,xe)=>{"use strict";var Vt=ue(),Ut=G(),_e=class extends Ut{constructor(e,t=!1){super();let s=Buffer.isBuffer(e);if(!s&&typeof e!="string")throw new TypeError("argument 'value' must be either string of Buffer");this._valueIsBuffer=!t&&s,this._value=t&&s?void 0:e,this._valueAsBuffer=s?e:void 0,this._valueAsString=s?void 0:e}isBuffer(){return this._valueIsBuffer}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return null}streamChunks(e,t,s,i){return this._value===void 0&&(this._value=Buffer.from(this._valueAsBuffer,"utf-8")),this._valueAsString===void 0&&(this._valueAsString=typeof this._value=="string"?this._value:this._value.toString("utf-8")),Vt(this._valueAsString,t,s,i,!!(e&&e.finalSource))}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("RawSource"),e.update(this._valueAsBuffer)}};xe.exports=_e});var ge=j((Xs,Ie)=>{"use strict";var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ke=32,Ft=n=>n&&n.columns===!1?Xt():Jt(),Jt=()=>{let n=1,e=0,t=0,s=1,i=0,r=0,f=!1,u=!1,h=!0;return(o,a,l,d,m,c)=>{if(f&&n===o){if(l===t&&d===s&&m===i&&!u&&c<0)return""}else if(l<0)return"";let _;n<o?(_=";".repeat(o-n),n=o,e=0,h=!1):h?(_="",h=!1):_=",";let g=A=>{let O=A>>>31&1,y=A>>31,E=(A+y^y)<<1|O;for(;;){let p=E&31;if(E>>=5,E===0){_+=ce[p];break}else _+=ce[p|ke]}};return g(a-e),e=a,l>=0?(f=!0,l===t?_+="A":(g(l-t),t=l),g(d-s),s=d,m===i?_+="A":(g(m-i),i=m),c>=0?(g(c-r),r=c,u=!0):u=!1):f=!1,_}},Xt=()=>{let n=0,e=1,t=0,s=1;return(i,r,f,u,h,o)=>{if(f<0||n===i)return"";let a,l=d=>{let m=d>>>31&1,c=d>>31,g=(d+c^c)<<1|m;for(;;){let A=g&31;if(g>>=5,g===0){a+=ce[A];break}else a+=ce[A|ke]}};return n=i,i===e+1?(e=i,f===t?(t=f,u===s+1?(s=u,";AACA"):(a=";AA",l(u-s),s=u,a+"A")):(a=";A",l(f-t),t=f,l(u-s),s=u,a+"A")):(a=";".repeat(i-e),e=i,f===t?(t=f,u===s+1?(s=u,a+"AACA"):(a+="AA",l(u-s),s=u,a+"A")):(a+="A",l(f-t),t=f,l(u-s),s=u,a+"A"))}};Ie.exports=Ft});var $=j(Se=>{"use strict";var De=ge();Se.getSourceAndMap=(n,e)=>{let t="",s="",i=[],r=[],f=[],u=De(e),{source:h}=n.streamChunks(Object.assign({},e,{finalSource:!0}),(o,a,l,d,m,c,_)=>{o!==void 0&&(t+=o),s+=u(a,l,d,m,c,_)},(o,a,l)=>{for(;i.length<o;)i.push(null);if(i[o]=a,l!==void 0){for(;r.length<o;)r.push(null);r[o]=l}},(o,a)=>{for(;f.length<o;)f.push(null);f[o]=a});return{source:h!==void 0?h:t,map:s.length>0?{version:3,file:"x",mappings:s,sources:i,sourcesContent:r.length>0?r:void 0,names:f}:null}};Se.getMap=(n,e)=>{let t="",s=[],i=[],r=[],f=De(e);return n.streamChunks(Object.assign({},e,{source:!1,finalSource:!0}),(u,h,o,a,l,d,m)=>{t+=f(h,o,a,l,d,m)},(u,h,o)=>{for(;s.length<u;)s.push(null);if(s[u]=h,o!==void 0){for(;i.length<u;)i.push(null);i[u]=o}},(u,h)=>{for(;r.length<u;)r.push(null);r[u]=h}),t.length>0?{version:3,file:"x",mappings:t,sources:s,sourcesContent:i.length>0?i:void 0,names:r}:null}});var Le=j((Ks,Re)=>{var $t=n=>{let e=n.length;if(e===0)return null;let t=[],s=0;for(;s<e;){let i=s;e:{let r=n.charCodeAt(s);for(;r!==10&&r!==59&&r!==123&&r!==125;){if(++s>=e)break e;r=n.charCodeAt(s)}for(;r===59||r===32||r===123||r===125||r===13||r===9;){if(++s>=e)break e;r=n.charCodeAt(s)}r===10&&s++}t.push(n.slice(i,s))}return t};Re.exports=$t});var Pe=j((Qs,He)=>{"use strict";var{getMap:Kt,getSourceAndMap:Qt}=$(),Yt=X(),Zt=ie(),es=G(),ts=Le(),me=class extends es{constructor(e,t){super();let s=Buffer.isBuffer(e);this._value=s?void 0:e,this._valueAsBuffer=s?e:void 0,this._name=t}getName(){return this._name}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return Kt(this,e)}sourceAndMap(e){return Qt(this,e)}streamChunks(e,t,s,i){this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),s(0,this._name,this._value);let r=!!(e&&e.finalSource);if(!e||e.columns!==!1){let f=ts(this._value),u=1,h=0;if(f!==null)for(let o of f){let a=o.endsWith(`
5
- `);a&&o.length===1?r||t(o,u,h,-1,-1,-1,-1):t(r?void 0:o,u,h,0,u,h,-1),a?(u++,h=0):h+=o.length}return{generatedLine:u,generatedColumn:h,source:r?this._value:void 0}}else if(r){let f=Zt(this._value),{generatedLine:u,generatedColumn:h}=f;if(h===0)for(let o=1;o<u;o++)t(void 0,o,0,0,o,0,-1);else for(let o=1;o<=u;o++)t(void 0,o,0,0,o,0,-1);return f}else{let f=1,u=Yt(this._value),h;for(h of u)t(r?void 0:h,f,0,0,f,0,-1),f++;return u.length===0||h.endsWith(`
6
- `)?{generatedLine:u.length+1,generatedColumn:0,source:r?this._value:void 0}:{generatedLine:u.length,generatedColumn:h.length,source:r?this._value:void 0}}}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("OriginalSource"),e.update(this._valueAsBuffer),e.update(this._name||"")}};He.exports=me});var Ge=j((Ys,We)=>{"use strict";var ss=(n,e)=>{if(e<0)return null;let{sourceRoot:t,sources:s}=n,i=s[e];return t?t.endsWith("/")?t+i:t+"/"+i:i};We.exports=ss});var Fe=j((Zs,Ue)=>{"use strict";var Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=new Uint8Array(123);{K.fill(66);for(let n=0;n<Ve.length;n++)K[Ve.charCodeAt(n)]=n;K[44]=64,K[59]=65}var rs=K.length-1,ns=(n,e)=>{let t=new Uint32Array([0,0,1,0,0]),s=0,i=0,r=0,f=1,u=-1;for(let h=0;h<n.length;h++){let o=n.charCodeAt(h);if(o>rs)continue;let a=K[o];if(a&64)t[0]>u&&(s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4]),u=t[0]),s=0,a===65&&(f++,t[0]=0,u=-1);else if(a&32)i|=(a&31)<<r,r+=5;else{i|=a<<r;let l=i&1?-(i>>1):i>>1;t[s++]+=l,r=0,i=0}}s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4])};Ue.exports=ns});var Y=j((er,$e)=>{"use strict";var Je=ie(),oe=Ge(),le=Fe(),Xe=X(),is=(n,e,t,s,i)=>{let r=Xe(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,names:h,mappings:o}=e;for(let p=0;p<f.length;p++)s(p,oe(e,p),u&&u[p]||void 0);if(h)for(let p=0;p<h.length;p++)i(p,h[p]);let a=r[r.length-1],l=a.endsWith(`
7
- `),d=l?r.length+1:r.length,m=l?0:a.length,c=1,_=0,g=!1,A=-1,O=-1,y=-1,v=-1,E=(p,B,q,w,b,T)=>{if(g&&c<=r.length){let S,M=c,N=_,z=r[c-1];p!==c?(S=z.slice(_),c++,_=0):(S=z.slice(_,B),_=B),S&&t(S,M,N,A,O,y,v),g=!1}if(p>c&&_>0){if(c<=r.length){let S=r[c-1].slice(_);t(S,c,_,-1,-1,-1,-1)}c++,_=0}for(;p>c;)c<=r.length&&t(r[c-1],c,0,-1,-1,-1,-1),c++;if(B>_){if(c<=r.length){let S=r[c-1].slice(_,B);t(S,c,_,-1,-1,-1,-1)}_=B}q>=0&&(p<d||p===d&&B<m)&&(g=!0,A=q,O=w,y=b,v=T)};return le(o,E),E(d,m,-1,-1,-1,-1),{generatedLine:d,generatedColumn:m}},us=(n,e,t,s,i)=>{let r=Xe(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,mappings:h}=e;for(let _=0;_<f.length;_++)s(_,oe(e,_),u&&u[_]||void 0);let o=1;for(le(h,(_,g,A,O,y,v)=>{if(!(A<0||_<o||_>r.length)){for(;_>o;)o<=r.length&&t(r[o-1],o,0,-1,-1,-1,-1),o++;_<=r.length&&(t(r[_-1],_,0,A,O,y,-1),o++)}});o<=r.length;o++)t(r[o-1],o,0,-1,-1,-1,-1);let l=r[r.length-1],d=l.endsWith(`
8
- `),m=d?r.length+1:r.length,c=d?0:l.length;return{generatedLine:m,generatedColumn:c}},fs=(n,e,t,s,i)=>{let r=Je(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return r;let{sources:h,sourcesContent:o,names:a,mappings:l}=e;for(let c=0;c<h.length;c++)s(c,oe(e,c),o&&o[c]||void 0);if(a)for(let c=0;c<a.length;c++)i(c,a[c]);let d=0;return le(l,(c,_,g,A,O,y)=>{c>=f&&(_>=u||c>f)||(g>=0?(t(void 0,c,_,g,A,O,y),d=c):d===c&&(t(void 0,c,_,-1,-1,-1,-1),d=0))}),r},cs=(n,e,t,s,i)=>{let r=Je(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return{generatedLine:1,generatedColumn:0};let{sources:h,sourcesContent:o,mappings:a}=e;for(let c=0;c<h.length;c++)s(c,oe(e,c),o&&o[c]||void 0);let l=u===0?f-1:f,d=1;return le(a,(c,_,g,A,O,y)=>{g>=0&&d<=c&&c<=l&&(t(void 0,c,0,g,A,O,-1),d=c+1)}),r};$e.exports=(n,e,t,s,i,r,f)=>f?r?fs(n,e,t,s,i):is(n,e,t,s,i):r?cs(n,e,t,s,i):us(n,e,t,s,i)});var Ze=j((tr,Ye)=>{"use strict";var Ke=Y(),Qe=X(),os=(n,e,t,s,i,r,f,u,h,o,a)=>{let l=new Map,d=new Map,m=[],c=[],_=[],g=-2,A=[],O=[],y=[],v=[],E=[],p=[],B=[],q=(w,b)=>{if(w>B.length)return-1;let{mappingsData:T}=B[w-1],S=0,M=T.length/5;for(;S<M;){let N=S+M>>1;T[N*5]<=b?S=N+1:M=N}return S===0?-1:S-1};return Ke(n,e,(w,b,T,S,M,N,z)=>{if(S===g){let R=q(M,N);if(R!==-1){let{chunks:L,mappingsData:I}=B[M-1],H=R*5,C=I[H+1],k=I[H+2],F=I[H+3],U=I[H+4];if(C>=0){let zt=L[R],Et=I[H],ee=N-Et;if(ee>0){let x=C<v.length?v[C]:null;if(x===void 0){let D=y[C];x=D?Qe(D):null,v[C]=x}if(x!==null){let D=k<=x.length?x[k-1].slice(F,F+ee):"";zt.slice(0,ee)===D&&(F+=ee,U=-1)}}let te=C<A.length?A[C]:-2;if(te===-2){let[x,D]=C<O.length?O[C]:[null,void 0],J=l.get(x);J===void 0&&(l.set(x,J=l.size),u(J,x,D)),te=J,A[C]=te}let W=-1;if(U>=0){if(W=U<E.length?E[U]:-2,W===-2){let x=U<p.length?p[U]:void 0;if(x){let D=d.get(x);D===void 0&&(d.set(x,D=d.size),h(D,x)),W=D}else W=-1;E[U]=W}}else if(z>=0){let x=v[C];if(x===void 0){let D=y[C];x=D?Qe(D):null,v[C]=x}if(x!==null){let D=_[z],J=k<=x.length?x[k-1].slice(F,F+D.length):"";if(D===J&&(W=z<c.length?c[z]:-2,W===-2)){let se=_[z];if(se){let re=d.get(se);re===void 0&&(d.set(se,re=d.size),h(re,se)),W=re}else W=-1;c[z]=W}}}f(w,b,T,te,k,F,W);return}}if(r){f(w,b,T,-1,-1,-1,-1);return}else if(m[S]===-2){let L=l.get(t);L===void 0&&(l.set(n,L=l.size),u(L,t,s)),m[S]=L}}let P=S<0||S>=m.length?-1:m[S];if(P<0)f(w,b,T,-1,-1,-1,-1);else{let R=-1;if(z>=0&&z<c.length&&(R=c[z],R===-2)){let L=_[z],I=d.get(L);I===void 0&&(d.set(L,I=d.size),h(I,L)),R=I,c[z]=R}f(w,b,T,P,M,N,R)}},(w,b,T)=>{if(b===t)g=w,s!==void 0?T=s:s=T,m[w]=-2,Ke(T,i,(S,M,N,z,P,R,L)=>{for(;B.length<M;)B.push({mappingsData:[],chunks:[]});let I=B[M-1];I.mappingsData.push(N,z,P,R,L),I.chunks.push(S)},(S,M,N)=>{y[S]=N,v[S]=void 0,A[S]=-2,O[S]=[M,N]},(S,M)=>{E[S]=-2,p[S]=M},!1,a);else{let S=l.get(b);S===void 0&&(l.set(b,S=l.size),u(S,b,T)),m[w]=S}},(w,b)=>{c[w]=-2,_[w]=b},o,a)};Ye.exports=os});var tt=j((sr,et)=>{"use strict";var ls=G(),as=Y(),hs=Ze(),{getMap:ds,getSourceAndMap:ps}=$(),Ae=class extends ls{constructor(e,t,s,i,r,f){super();let u=Buffer.isBuffer(e);this._valueAsString=u?void 0:e,this._valueAsBuffer=u?e:void 0,this._name=t,this._hasSourceMap=!!s;let h=Buffer.isBuffer(s),o=typeof s=="string";this._sourceMapAsObject=h||o?void 0:s,this._sourceMapAsString=o?s:void 0,this._sourceMapAsBuffer=h?s:void 0,this._hasOriginalSource=!!i;let a=Buffer.isBuffer(i);this._originalSourceAsString=a?void 0:i,this._originalSourceAsBuffer=a?i:void 0,this._hasInnerSourceMap=!!r;let l=Buffer.isBuffer(r),d=typeof r=="string";this._innerSourceMapAsObject=l||d?void 0:r,this._innerSourceMapAsString=d?r:void 0,this._innerSourceMapAsBuffer=l?r:void 0,this._removeOriginalSource=f}_ensureValueBuffer(){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8"))}_ensureValueString(){this._valueAsString===void 0&&(this._valueAsString=this._valueAsBuffer.toString("utf-8"))}_ensureOriginalSourceBuffer(){this._originalSourceAsBuffer===void 0&&this._hasOriginalSource&&(this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8"))}_ensureOriginalSourceString(){this._originalSourceAsString===void 0&&this._hasOriginalSource&&(this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8"))}_ensureInnerSourceMapObject(){this._innerSourceMapAsObject===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString))}_ensureInnerSourceMapBuffer(){this._innerSourceMapAsBuffer===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8"))}_ensureInnerSourceMapString(){this._innerSourceMapAsString===void 0&&this._hasInnerSourceMap&&(this._innerSourceMapAsBuffer!==void 0?this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8"):this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject))}_ensureSourceMapObject(){this._sourceMapAsObject===void 0&&(this._ensureSourceMapString(),this._sourceMapAsObject=JSON.parse(this._sourceMapAsString))}_ensureSourceMapBuffer(){this._sourceMapAsBuffer===void 0&&(this._ensureSourceMapString(),this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8"))}_ensureSourceMapString(){this._sourceMapAsString===void 0&&(this._sourceMapAsBuffer!==void 0?this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8"):this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject))}getArgsAsBuffers(){return this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){return this._ensureValueBuffer(),this._valueAsBuffer}source(){return this._ensureValueString(),this._valueAsString}map(e){return this._hasInnerSourceMap?ds(this,e):(this._ensureSourceMapObject(),this._sourceMapAsObject)}sourceAndMap(e){return this._hasInnerSourceMap?ps(this,e):(this._ensureValueString(),this._ensureSourceMapObject(),{source:this._valueAsString,map:this._sourceMapAsObject})}streamChunks(e,t,s,i){return this._ensureValueString(),this._ensureSourceMapObject(),this._ensureOriginalSourceString(),this._hasInnerSourceMap?(this._ensureInnerSourceMapObject(),hs(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))):as(this._valueAsString,this._sourceMapAsObject,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))}updateHash(e){this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),e.update("SourceMapSource"),e.update(this._valueAsBuffer),e.update(this._sourceMapAsBuffer),this._hasOriginalSource&&e.update(this._originalSourceAsBuffer),this._hasInnerSourceMap&&e.update(this._innerSourceMapAsBuffer),e.update(this._removeOriginalSource?"true":"false")}};et.exports=Ae});var Z=j((rr,st)=>{"use strict";var _s=ue(),gs=Y();st.exports=(n,e,t,s,i)=>{if(typeof n.streamChunks=="function")return n.streamChunks(e,t,s,i);{let r=n.sourceAndMap(e);return r.map?gs(r.source,r.map,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1)):_s(r.source,t,s,i,!!(e&&e.finalSource))}}});var nt=j((nr,rt)=>{"use strict";var Ss=ge(),ms=Z(),As=(n,e,t,s,i)=>{let r="",f="",u=[],h=[],o=[],a=Ss(Object.assign({},e,{columns:!0})),l=!!(e&&e.finalSource),{generatedLine:d,generatedColumn:m,source:c}=ms(n,e,(g,A,O,y,v,E,p)=>(g!==void 0&&(r+=g),f+=a(A,O,y,v,E,p),t(l?void 0:g,A,O,y,v,E,p)),(g,A,O)=>{for(;u.length<g;)u.push(null);if(u[g]=A,O!==void 0){for(;h.length<g;)h.push(null);h[g]=O}return s(g,A,O)},(g,A)=>{for(;o.length<g;)o.push(null);return o[g]=A,i(g,A)}),_=c!==void 0?c:r;return{result:{generatedLine:d,generatedColumn:m,source:l?_:void 0},source:_,map:f.length>0?{version:3,file:"x",mappings:f,sources:u,sourcesContent:h.length>0?h:void 0,names:o}:null}};rt.exports=As});var ut=j((ir,it)=>{"use strict";var Ms=G(),Bs=Y(),vs=ue(),bs=nt(),Os=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=Buffer.from(n.mappings,"utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&Buffer.from(t,"utf-8"))),e},ys=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=n.mappings.toString("utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&t.toString("utf-8"))),e},Me=class extends Ms{constructor(e,t){super(),this._source=e,this._cachedSourceType=t?t.source:void 0,this._cachedSource=void 0,this._cachedBuffer=t?t.buffer:void 0,this._cachedSize=t?t.size:void 0,this._cachedMaps=t?t.maps:new Map,this._cachedHashUpdate=t?t.hash:void 0}getCachedData(){let e=new Map;for(let t of this._cachedMaps){let s=t[1];s.bufferedMap===void 0&&(s.bufferedMap=Os(this._getMapFromCacheEntry(s))),e.set(t[0],{map:void 0,bufferedMap:s.bufferedMap})}return this._cachedSource&&this.buffer(),{buffer:this._cachedBuffer,source:this._cachedSourceType!==void 0?this._cachedSourceType:typeof this._cachedSource=="string"?!0:Buffer.isBuffer(this._cachedSource)?!1:void 0,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){return typeof this._source=="function"&&(this._source=this._source()),this._source}source(){let e=this._getCachedSource();return e!==void 0?e:this._cachedSource=this.original().source()}_getMapFromCacheEntry(e){if(e.map!==void 0)return e.map;if(e.bufferedMap!==void 0)return e.map=ys(e.bufferedMap)}_getCachedSource(){if(this._cachedSource!==void 0)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==void 0)return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}buffer(){if(this._cachedBuffer!==void 0)return this._cachedBuffer;if(this._cachedSource!==void 0)return Buffer.isBuffer(this._cachedSource)?this._cachedBuffer=this._cachedSource:this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8");if(typeof this.original().buffer=="function")return this._cachedBuffer=this.original().buffer();let e=this.source();return Buffer.isBuffer(e)?this._cachedBuffer=e:this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(this._cachedSize!==void 0)return this._cachedSize;if(this._cachedBuffer!==void 0)return this._cachedSize=this._cachedBuffer.length;let e=this._getCachedSource();return e!==void 0?this._cachedSize=Buffer.byteLength(e):this._cachedSize=this.original().size()}sourceAndMap(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0){let f=this._getMapFromCacheEntry(s);return{source:this.source(),map:f}}let i=this._getCachedSource(),r;if(i!==void 0)r=this.original().map(e);else{let f=this.original().sourceAndMap(e);i=f.source,r=f.map,this._cachedSource=i}return this._cachedMaps.set(t,{map:r,bufferedMap:void 0}),{source:i,map:r}}streamChunks(e,t,s,i){let r=e?JSON.stringify(e):"{}";if(this._cachedMaps.has(r)&&(this._cachedBuffer!==void 0||this._cachedSource!==void 0)){let{source:o,map:a}=this.sourceAndMap(e);return a?Bs(o,a,t,s,i,!!(e&&e.finalSource),!0):vs(o,t,s,i,!!(e&&e.finalSource))}let{result:f,source:u,map:h}=bs(this.original(),e,t,s,i);return this._cachedSource=u,this._cachedMaps.set(r,{map:h,bufferedMap:void 0}),f}map(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0)return this._getMapFromCacheEntry(s);let i=this.original().map(e);return this._cachedMaps.set(t,{map:i,bufferedMap:void 0}),i}updateHash(e){if(this._cachedHashUpdate!==void 0){for(let r of this._cachedHashUpdate)e.update(r);return}let t=[],s,i={update:r=>{typeof r=="string"&&r.length<10240?s===void 0?s=r:(s+=r,s.length>102400&&(t.push(Buffer.from(s)),s=void 0)):(s!==void 0&&(t.push(Buffer.from(s)),s=void 0),t.push(r))}};this.original().updateHash(i),s!==void 0&&t.push(Buffer.from(s));for(let r of t)e.update(r);this._cachedHashUpdate=t}};it.exports=Me});var ot=j((ur,ct)=>{"use strict";var ws=G(),ft=fe(),Ts=Z(),{getMap:Cs,getSourceAndMap:zs}=$(),Be=new WeakSet,ve=class n extends ws{constructor(){super(),this._children=[];for(let e=0;e<arguments.length;e++){let t=arguments[e];if(t instanceof n)for(let s of t._children)this._children.push(s);else this._children.push(t)}this._isOptimized=arguments.length===0}getChildren(){return this._isOptimized||this._optimize(),this._children}add(e){if(e instanceof n)for(let t of e._children)this._children.push(t);else this._children.push(e);this._isOptimized=!1}addAllSkipOptimizing(e){for(let t of e)this._children.push(t)}buffer(){this._isOptimized||this._optimize();let e=[];for(let t of this._children)if(typeof t.buffer=="function")e.push(t.buffer());else{let s=t.source();Buffer.isBuffer(s)?e.push(s):e.push(Buffer.from(s,"utf-8"))}return Buffer.concat(e)}source(){this._isOptimized||this._optimize();let e="";for(let t of this._children)e+=t.source();return e}size(){this._isOptimized||this._optimize();let e=0;for(let t of this._children)e+=t.size();return e}map(e){return Cs(this,e)}sourceAndMap(e){return zs(this,e)}streamChunks(e,t,s,i){if(this._isOptimized||this._optimize(),this._children.length===1)return this._children[0].streamChunks(e,t,s,i);let r=0,f=0,u=new Map,h=new Map,o=!!(e&&e.finalSource),a="",l=!1;for(let d of this._children){let m=[],c=[],_=0,{generatedLine:g,generatedColumn:A,source:O}=Ts(d,e,(y,v,E,p,B,q,w)=>{let b=v+r,T=v===1?E+f:E;l&&((v!==1||E!==0)&&t(void 0,r+1,f,-1,-1,-1,-1),l=!1);let S=p<0||p>=m.length?-1:m[p],M=w<0||w>=c.length?-1:c[w];_=S<0?0:v,o?(y!==void 0&&(a+=y),S>=0&&t(void 0,b,T,S,B,q,M)):S<0?t(y,b,T,-1,-1,-1,-1):t(y,b,T,S,B,q,M)},(y,v,E)=>{let p=u.get(v);p===void 0&&(u.set(v,p=u.size),s(p,v,E)),m[y]=p},(y,v)=>{let E=h.get(v);E===void 0&&(h.set(v,E=h.size),i(E,v)),c[y]=E});O!==void 0&&(a+=O),l&&(g!==1||A!==0)&&(t(void 0,r+1,f,-1,-1,-1,-1),l=!1),g>1?f=A:f+=A,l=l||o&&_===g,r+=g-1}return{generatedLine:r+1,generatedColumn:f,source:o?a:void 0}}updateHash(e){this._isOptimized||this._optimize(),e.update("ConcatSource");for(let t of this._children)t.updateHash(e)}_optimize(){let e=[],t,s,i=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u):s=[typeof s=="string"?s:s.source(),u]},r=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u.source()):s=[typeof s=="string"?s:s.source(),u.source()]},f=()=>{if(Array.isArray(s)){let u=new ft(s.join(""));Be.add(u),e.push(u)}else if(typeof s=="string"){let u=new ft(s);Be.add(u),e.push(u)}else e.push(s)};for(let u of this._children)typeof u=="string"?t===void 0?t=u:t+=u:(t!==void 0&&(i(t),t=void 0),Be.has(u)?r(u):(s!==void 0&&(f(),s=void 0),e.push(u)));t!==void 0&&i(t),s!==void 0&&f(),this._children=e,this._isOptimized=!0}};ct.exports=ve});var dt=j((fr,ht)=>{"use strict";var{getMap:Es,getSourceAndMap:qs}=$(),Ns=Z(),js=G(),be=X(),at=typeof process=="object"&&process.versions&&typeof process.versions.v8=="string"&&!/^[0-6]\./.test(process.versions.v8),lt=536870912,ae=class{constructor(e,t,s,i){this.start=e,this.end=t,this.content=s,this.name=i,at||(this.index=-1)}},Oe=class extends js{constructor(e,t){super(),this._source=e,this._name=t,this._replacements=[],this._isSorted=!0}getName(){return this._name}getReplacements(){return this._sortReplacements(),this._replacements}replace(e,t,s,i){if(typeof s!="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new ae(e,t,s,i)),this._isSorted=!1}insert(e,t,s){if(typeof t!="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new ae(e,e-1,t,s)),this._isSorted=!1}source(){if(this._replacements.length===0)return this._source.source();let e=this._source.source(),t=0,s=[];this._sortReplacements();for(let i of this._replacements){let r=Math.floor(i.start),f=Math.floor(i.end+1);if(t<r){let u=r-t;s.push(e.slice(0,u)),e=e.slice(u),t=r}if(s.push(i.content),t<f){let u=f-t;e=e.slice(u),t=f}}return s.push(e),s.join("")}map(e){return this._replacements.length===0?this._source.map(e):Es(this,e)}sourceAndMap(e){return this._replacements.length===0?this._source.sourceAndMap(e):qs(this,e)}original(){return this._source}_sortReplacements(){this._isSorted||(at?this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:0}):(this._replacements.forEach((e,t)=>e.index=t),this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:e.index-t.index})),this._isSorted=!0)}streamChunks(e,t,s,i){this._sortReplacements();let r=this._replacements,f=0,u=0,h=-1,o=u<r.length?Math.floor(r[u].start):lt,a=0,l=0,d=0,m=[],c=new Map,_=[],g=(p,B,q,w)=>{let b=p<m.length?m[p]:void 0;if(b===void 0)return!1;typeof b=="string"&&(b=be(b),m[p]=b);let T=B<=b.length?b[B-1]:null;return T===null?!1:T.slice(q,q+w.length)===w},{generatedLine:A,generatedColumn:O}=Ns(this._source,Object.assign({},e,{finalSource:!1}),(p,B,q,w,b,T,S)=>{let M=0,N=f+p.length;if(h>f){if(h>=N){let P=B+a;p.endsWith(`
1
+ "use strict";var Nt=Object.create;var Y=Object.defineProperty;var jt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var kt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var Dt=(n,e,t)=>e in n?Y(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var j=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Rt=(n,e)=>{for(var t in e)Y(n,t,{get:e[t],enumerable:!0})},ze=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xt(e))!It.call(n,i)&&i!==t&&Y(n,i,{get:()=>e[i],enumerable:!(s=jt(e,i))||s.enumerable});return n};var Lt=(n,e,t)=>(t=n!=null?Nt(kt(n)):{},ze(e||!n||!n.__esModule?Y(t,"default",{value:n,enumerable:!0}):t,n)),Ht=n=>ze(Y({},"__esModule",{value:!0}),n);var Ee=(n,e,t)=>Dt(n,typeof e!="symbol"?e+"":e,t);var G=j((Us,qe)=>{"use strict";var pe=class{source(){throw new Error("Abstract")}buffer(){let e=this.source();return Buffer.isBuffer(e)?e:Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}};qe.exports=pe});var ie=j((Fs,Ne)=>{"use strict";var Pt=n=>{if(n===void 0)return{};let e=n.lastIndexOf(`
2
+ `);if(e===-1)return{generatedLine:1,generatedColumn:n.length,source:n};let t=2;for(let s=0;s<e;s++)n.charCodeAt(s)===10&&t++;return{generatedLine:t,generatedColumn:n.length-e-1,source:n}};Ne.exports=Pt});var X=j((Js,je)=>{var Wt=n=>{let e=[],t=n.length,s=0;for(;s<t;)if(n.charCodeAt(s)===10)e.push(`
3
+ `),s++;else{let r=s+1;for(;r<t&&n.charCodeAt(r)!==10;)r++;e.push(n.slice(s,r+1)),s=r+1}return e};je.exports=Wt});var ue=j((Xs,xe)=>{"use strict";var Gt=ie(),Vt=X(),Ut=(n,e,t,s)=>{let i=1,r=Vt(n),f;for(f of r)e(f,i,0,-1,-1,-1,-1),i++;return r.length===0||f.endsWith(`
4
+ `)?{generatedLine:r.length+1,generatedColumn:0}:{generatedLine:r.length,generatedColumn:f.length}};xe.exports=(n,e,t,s,i)=>i?Gt(n):Ut(n,e,t,s)});var fe=j(($s,ke)=>{"use strict";var Ft=ue(),Jt=G(),_e=class extends Jt{constructor(e,t=!1){super();let s=Buffer.isBuffer(e);if(!s&&typeof e!="string")throw new TypeError("argument 'value' must be either string of Buffer");this._valueIsBuffer=!t&&s,this._value=t&&s?void 0:e,this._valueAsBuffer=s?e:void 0,this._valueAsString=s?void 0:e}isBuffer(){return this._valueIsBuffer}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return null}streamChunks(e,t,s,i){return this._value===void 0&&(this._value=Buffer.from(this._valueAsBuffer,"utf-8")),this._valueAsString===void 0&&(this._valueAsString=typeof this._value=="string"?this._value:this._value.toString("utf-8")),Ft(this._valueAsString,t,s,i,!!(e&&e.finalSource))}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("RawSource"),e.update(this._valueAsBuffer)}};ke.exports=_e});var ge=j((Ks,De)=>{"use strict";var ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ie=32,Xt=n=>n&&n.columns===!1?Kt():$t(),$t=()=>{let n=1,e=0,t=0,s=1,i=0,r=0,f=!1,u=!1,h=!0;return(o,a,l,d,m,c)=>{if(f&&n===o){if(l===t&&d===s&&m===i&&!u&&c<0)return""}else if(l<0)return"";let _;n<o?(_=";".repeat(o-n),n=o,e=0,h=!1):h?(_="",h=!1):_=",";let g=A=>{let O=A>>>31&1,y=A>>31,E=(A+y^y)<<1|O;for(;;){let p=E&31;if(E>>=5,E===0){_+=ce[p];break}else _+=ce[p|Ie]}};return g(a-e),e=a,l>=0?(f=!0,l===t?_+="A":(g(l-t),t=l),g(d-s),s=d,m===i?_+="A":(g(m-i),i=m),c>=0?(g(c-r),r=c,u=!0):u=!1):f=!1,_}},Kt=()=>{let n=0,e=1,t=0,s=1;return(i,r,f,u,h,o)=>{if(f<0||n===i)return"";let a,l=d=>{let m=d>>>31&1,c=d>>31,g=(d+c^c)<<1|m;for(;;){let A=g&31;if(g>>=5,g===0){a+=ce[A];break}else a+=ce[A|Ie]}};return n=i,i===e+1?(e=i,f===t?(t=f,u===s+1?(s=u,";AACA"):(a=";AA",l(u-s),s=u,a+"A")):(a=";A",l(f-t),t=f,l(u-s),s=u,a+"A")):(a=";".repeat(i-e),e=i,f===t?(t=f,u===s+1?(s=u,a+"AACA"):(a+="AA",l(u-s),s=u,a+"A")):(a+="A",l(f-t),t=f,l(u-s),s=u,a+"A"))}};De.exports=Xt});var $=j(Se=>{"use strict";var Re=ge();Se.getSourceAndMap=(n,e)=>{let t="",s="",i=[],r=[],f=[],u=Re(e),{source:h}=n.streamChunks(Object.assign({},e,{finalSource:!0}),(o,a,l,d,m,c,_)=>{o!==void 0&&(t+=o),s+=u(a,l,d,m,c,_)},(o,a,l)=>{for(;i.length<o;)i.push(null);if(i[o]=a,l!==void 0){for(;r.length<o;)r.push(null);r[o]=l}},(o,a)=>{for(;f.length<o;)f.push(null);f[o]=a});return{source:h!==void 0?h:t,map:s.length>0?{version:3,file:"x",mappings:s,sources:i,sourcesContent:r.length>0?r:void 0,names:f}:null}};Se.getMap=(n,e)=>{let t="",s=[],i=[],r=[],f=Re(e);return n.streamChunks(Object.assign({},e,{source:!1,finalSource:!0}),(u,h,o,a,l,d,m)=>{t+=f(h,o,a,l,d,m)},(u,h,o)=>{for(;s.length<u;)s.push(null);if(s[u]=h,o!==void 0){for(;i.length<u;)i.push(null);i[u]=o}},(u,h)=>{for(;r.length<u;)r.push(null);r[u]=h}),t.length>0?{version:3,file:"x",mappings:t,sources:s,sourcesContent:i.length>0?i:void 0,names:r}:null}});var He=j((Ys,Le)=>{var Qt=n=>{let e=n.length;if(e===0)return null;let t=[],s=0;for(;s<e;){let i=s;e:{let r=n.charCodeAt(s);for(;r!==10&&r!==59&&r!==123&&r!==125;){if(++s>=e)break e;r=n.charCodeAt(s)}for(;r===59||r===32||r===123||r===125||r===13||r===9;){if(++s>=e)break e;r=n.charCodeAt(s)}r===10&&s++}t.push(n.slice(i,s))}return t};Le.exports=Qt});var We=j((Zs,Pe)=>{"use strict";var{getMap:Yt,getSourceAndMap:Zt}=$(),es=X(),ts=ie(),ss=G(),rs=He(),me=class extends ss{constructor(e,t){super();let s=Buffer.isBuffer(e);this._value=s?void 0:e,this._valueAsBuffer=s?e:void 0,this._name=t}getName(){return this._name}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return Yt(this,e)}sourceAndMap(e){return Zt(this,e)}streamChunks(e,t,s,i){this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),s(0,this._name,this._value);let r=!!(e&&e.finalSource);if(!e||e.columns!==!1){let f=rs(this._value),u=1,h=0;if(f!==null)for(let o of f){let a=o.endsWith(`
5
+ `);a&&o.length===1?r||t(o,u,h,-1,-1,-1,-1):t(r?void 0:o,u,h,0,u,h,-1),a?(u++,h=0):h+=o.length}return{generatedLine:u,generatedColumn:h,source:r?this._value:void 0}}else if(r){let f=ts(this._value),{generatedLine:u,generatedColumn:h}=f;if(h===0)for(let o=1;o<u;o++)t(void 0,o,0,0,o,0,-1);else for(let o=1;o<=u;o++)t(void 0,o,0,0,o,0,-1);return f}else{let f=1,u=es(this._value),h;for(h of u)t(r?void 0:h,f,0,0,f,0,-1),f++;return u.length===0||h.endsWith(`
6
+ `)?{generatedLine:u.length+1,generatedColumn:0,source:r?this._value:void 0}:{generatedLine:u.length,generatedColumn:h.length,source:r?this._value:void 0}}}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("OriginalSource"),e.update(this._valueAsBuffer),e.update(this._name||"")}};Pe.exports=me});var Ve=j((er,Ge)=>{"use strict";var ns=(n,e)=>{if(e<0)return null;let{sourceRoot:t,sources:s}=n,i=s[e];return t?t.endsWith("/")?t+i:t+"/"+i:i};Ge.exports=ns});var Je=j((tr,Fe)=>{"use strict";var Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=new Uint8Array(123);{K.fill(66);for(let n=0;n<Ue.length;n++)K[Ue.charCodeAt(n)]=n;K[44]=64,K[59]=65}var is=K.length-1,us=(n,e)=>{let t=new Uint32Array([0,0,1,0,0]),s=0,i=0,r=0,f=1,u=-1;for(let h=0;h<n.length;h++){let o=n.charCodeAt(h);if(o>is)continue;let a=K[o];if(a&64)t[0]>u&&(s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4]),u=t[0]),s=0,a===65&&(f++,t[0]=0,u=-1);else if(a&32)i|=(a&31)<<r,r+=5;else{i|=a<<r;let l=i&1?-(i>>1):i>>1;t[s++]+=l,r=0,i=0}}s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4])};Fe.exports=us});var Z=j((sr,Ke)=>{"use strict";var Xe=ie(),oe=Ve(),le=Je(),$e=X(),fs=(n,e,t,s,i)=>{let r=$e(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,names:h,mappings:o}=e;for(let p=0;p<f.length;p++)s(p,oe(e,p),u&&u[p]||void 0);if(h)for(let p=0;p<h.length;p++)i(p,h[p]);let a=r[r.length-1],l=a.endsWith(`
7
+ `),d=l?r.length+1:r.length,m=l?0:a.length,c=1,_=0,g=!1,A=-1,O=-1,y=-1,v=-1,E=(p,B,q,w,b,T)=>{if(g&&c<=r.length){let S,M=c,N=_,z=r[c-1];p!==c?(S=z.slice(_),c++,_=0):(S=z.slice(_,B),_=B),S&&t(S,M,N,A,O,y,v),g=!1}if(p>c&&_>0){if(c<=r.length){let S=r[c-1].slice(_);t(S,c,_,-1,-1,-1,-1)}c++,_=0}for(;p>c;)c<=r.length&&t(r[c-1],c,0,-1,-1,-1,-1),c++;if(B>_){if(c<=r.length){let S=r[c-1].slice(_,B);t(S,c,_,-1,-1,-1,-1)}_=B}q>=0&&(p<d||p===d&&B<m)&&(g=!0,A=q,O=w,y=b,v=T)};return le(o,E),E(d,m,-1,-1,-1,-1),{generatedLine:d,generatedColumn:m}},cs=(n,e,t,s,i)=>{let r=$e(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,mappings:h}=e;for(let _=0;_<f.length;_++)s(_,oe(e,_),u&&u[_]||void 0);let o=1;for(le(h,(_,g,A,O,y,v)=>{if(!(A<0||_<o||_>r.length)){for(;_>o;)o<=r.length&&t(r[o-1],o,0,-1,-1,-1,-1),o++;_<=r.length&&(t(r[_-1],_,0,A,O,y,-1),o++)}});o<=r.length;o++)t(r[o-1],o,0,-1,-1,-1,-1);let l=r[r.length-1],d=l.endsWith(`
8
+ `),m=d?r.length+1:r.length,c=d?0:l.length;return{generatedLine:m,generatedColumn:c}},os=(n,e,t,s,i)=>{let r=Xe(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return r;let{sources:h,sourcesContent:o,names:a,mappings:l}=e;for(let c=0;c<h.length;c++)s(c,oe(e,c),o&&o[c]||void 0);if(a)for(let c=0;c<a.length;c++)i(c,a[c]);let d=0;return le(l,(c,_,g,A,O,y)=>{c>=f&&(_>=u||c>f)||(g>=0?(t(void 0,c,_,g,A,O,y),d=c):d===c&&(t(void 0,c,_,-1,-1,-1,-1),d=0))}),r},ls=(n,e,t,s,i)=>{let r=Xe(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return{generatedLine:1,generatedColumn:0};let{sources:h,sourcesContent:o,mappings:a}=e;for(let c=0;c<h.length;c++)s(c,oe(e,c),o&&o[c]||void 0);let l=u===0?f-1:f,d=1;return le(a,(c,_,g,A,O,y)=>{g>=0&&d<=c&&c<=l&&(t(void 0,c,0,g,A,O,-1),d=c+1)}),r};Ke.exports=(n,e,t,s,i,r,f)=>f?r?os(n,e,t,s,i):fs(n,e,t,s,i):r?ls(n,e,t,s,i):cs(n,e,t,s,i)});var et=j((rr,Ze)=>{"use strict";var Qe=Z(),Ye=X(),as=(n,e,t,s,i,r,f,u,h,o,a)=>{let l=new Map,d=new Map,m=[],c=[],_=[],g=-2,A=[],O=[],y=[],v=[],E=[],p=[],B=[],q=(w,b)=>{if(w>B.length)return-1;let{mappingsData:T}=B[w-1],S=0,M=T.length/5;for(;S<M;){let N=S+M>>1;T[N*5]<=b?S=N+1:M=N}return S===0?-1:S-1};return Qe(n,e,(w,b,T,S,M,N,z)=>{if(S===g){let R=q(M,N);if(R!==-1){let{chunks:L,mappingsData:I}=B[M-1],H=R*5,C=I[H+1],k=I[H+2],F=I[H+3],U=I[H+4];if(C>=0){let Et=L[R],qt=I[H],te=N-qt;if(te>0){let x=C<v.length?v[C]:null;if(x===void 0){let D=y[C];x=D?Ye(D):null,v[C]=x}if(x!==null){let D=k<=x.length?x[k-1].slice(F,F+te):"";Et.slice(0,te)===D&&(F+=te,U=-1)}}let se=C<A.length?A[C]:-2;if(se===-2){let[x,D]=C<O.length?O[C]:[null,void 0],J=l.get(x);J===void 0&&(l.set(x,J=l.size),u(J,x,D)),se=J,A[C]=se}let W=-1;if(U>=0){if(W=U<E.length?E[U]:-2,W===-2){let x=U<p.length?p[U]:void 0;if(x){let D=d.get(x);D===void 0&&(d.set(x,D=d.size),h(D,x)),W=D}else W=-1;E[U]=W}}else if(z>=0){let x=v[C];if(x===void 0){let D=y[C];x=D?Ye(D):null,v[C]=x}if(x!==null){let D=_[z],J=k<=x.length?x[k-1].slice(F,F+D.length):"";if(D===J&&(W=z<c.length?c[z]:-2,W===-2)){let re=_[z];if(re){let ne=d.get(re);ne===void 0&&(d.set(re,ne=d.size),h(ne,re)),W=ne}else W=-1;c[z]=W}}}f(w,b,T,se,k,F,W);return}}if(r){f(w,b,T,-1,-1,-1,-1);return}else if(m[S]===-2){let L=l.get(t);L===void 0&&(l.set(n,L=l.size),u(L,t,s)),m[S]=L}}let P=S<0||S>=m.length?-1:m[S];if(P<0)f(w,b,T,-1,-1,-1,-1);else{let R=-1;if(z>=0&&z<c.length&&(R=c[z],R===-2)){let L=_[z],I=d.get(L);I===void 0&&(d.set(L,I=d.size),h(I,L)),R=I,c[z]=R}f(w,b,T,P,M,N,R)}},(w,b,T)=>{if(b===t)g=w,s!==void 0?T=s:s=T,m[w]=-2,Qe(T,i,(S,M,N,z,P,R,L)=>{for(;B.length<M;)B.push({mappingsData:[],chunks:[]});let I=B[M-1];I.mappingsData.push(N,z,P,R,L),I.chunks.push(S)},(S,M,N)=>{y[S]=N,v[S]=void 0,A[S]=-2,O[S]=[M,N]},(S,M)=>{E[S]=-2,p[S]=M},!1,a);else{let S=l.get(b);S===void 0&&(l.set(b,S=l.size),u(S,b,T)),m[w]=S}},(w,b)=>{c[w]=-2,_[w]=b},o,a)};Ze.exports=as});var st=j((nr,tt)=>{"use strict";var hs=G(),ds=Z(),ps=et(),{getMap:_s,getSourceAndMap:gs}=$(),Ae=class extends hs{constructor(e,t,s,i,r,f){super();let u=Buffer.isBuffer(e);this._valueAsString=u?void 0:e,this._valueAsBuffer=u?e:void 0,this._name=t,this._hasSourceMap=!!s;let h=Buffer.isBuffer(s),o=typeof s=="string";this._sourceMapAsObject=h||o?void 0:s,this._sourceMapAsString=o?s:void 0,this._sourceMapAsBuffer=h?s:void 0,this._hasOriginalSource=!!i;let a=Buffer.isBuffer(i);this._originalSourceAsString=a?void 0:i,this._originalSourceAsBuffer=a?i:void 0,this._hasInnerSourceMap=!!r;let l=Buffer.isBuffer(r),d=typeof r=="string";this._innerSourceMapAsObject=l||d?void 0:r,this._innerSourceMapAsString=d?r:void 0,this._innerSourceMapAsBuffer=l?r:void 0,this._removeOriginalSource=f}_ensureValueBuffer(){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8"))}_ensureValueString(){this._valueAsString===void 0&&(this._valueAsString=this._valueAsBuffer.toString("utf-8"))}_ensureOriginalSourceBuffer(){this._originalSourceAsBuffer===void 0&&this._hasOriginalSource&&(this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8"))}_ensureOriginalSourceString(){this._originalSourceAsString===void 0&&this._hasOriginalSource&&(this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8"))}_ensureInnerSourceMapObject(){this._innerSourceMapAsObject===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString))}_ensureInnerSourceMapBuffer(){this._innerSourceMapAsBuffer===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8"))}_ensureInnerSourceMapString(){this._innerSourceMapAsString===void 0&&this._hasInnerSourceMap&&(this._innerSourceMapAsBuffer!==void 0?this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8"):this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject))}_ensureSourceMapObject(){this._sourceMapAsObject===void 0&&(this._ensureSourceMapString(),this._sourceMapAsObject=JSON.parse(this._sourceMapAsString))}_ensureSourceMapBuffer(){this._sourceMapAsBuffer===void 0&&(this._ensureSourceMapString(),this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8"))}_ensureSourceMapString(){this._sourceMapAsString===void 0&&(this._sourceMapAsBuffer!==void 0?this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8"):this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject))}getArgsAsBuffers(){return this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){return this._ensureValueBuffer(),this._valueAsBuffer}source(){return this._ensureValueString(),this._valueAsString}map(e){return this._hasInnerSourceMap?_s(this,e):(this._ensureSourceMapObject(),this._sourceMapAsObject)}sourceAndMap(e){return this._hasInnerSourceMap?gs(this,e):(this._ensureValueString(),this._ensureSourceMapObject(),{source:this._valueAsString,map:this._sourceMapAsObject})}streamChunks(e,t,s,i){return this._ensureValueString(),this._ensureSourceMapObject(),this._ensureOriginalSourceString(),this._hasInnerSourceMap?(this._ensureInnerSourceMapObject(),ps(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))):ds(this._valueAsString,this._sourceMapAsObject,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))}updateHash(e){this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),e.update("SourceMapSource"),e.update(this._valueAsBuffer),e.update(this._sourceMapAsBuffer),this._hasOriginalSource&&e.update(this._originalSourceAsBuffer),this._hasInnerSourceMap&&e.update(this._innerSourceMapAsBuffer),e.update(this._removeOriginalSource?"true":"false")}};tt.exports=Ae});var ee=j((ir,rt)=>{"use strict";var Ss=ue(),ms=Z();rt.exports=(n,e,t,s,i)=>{if(typeof n.streamChunks=="function")return n.streamChunks(e,t,s,i);{let r=n.sourceAndMap(e);return r.map?ms(r.source,r.map,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1)):Ss(r.source,t,s,i,!!(e&&e.finalSource))}}});var it=j((ur,nt)=>{"use strict";var As=ge(),Ms=ee(),Bs=(n,e,t,s,i)=>{let r="",f="",u=[],h=[],o=[],a=As(Object.assign({},e,{columns:!0})),l=!!(e&&e.finalSource),{generatedLine:d,generatedColumn:m,source:c}=Ms(n,e,(g,A,O,y,v,E,p)=>(g!==void 0&&(r+=g),f+=a(A,O,y,v,E,p),t(l?void 0:g,A,O,y,v,E,p)),(g,A,O)=>{for(;u.length<g;)u.push(null);if(u[g]=A,O!==void 0){for(;h.length<g;)h.push(null);h[g]=O}return s(g,A,O)},(g,A)=>{for(;o.length<g;)o.push(null);return o[g]=A,i(g,A)}),_=c!==void 0?c:r;return{result:{generatedLine:d,generatedColumn:m,source:l?_:void 0},source:_,map:f.length>0?{version:3,file:"x",mappings:f,sources:u,sourcesContent:h.length>0?h:void 0,names:o}:null}};nt.exports=Bs});var ft=j((fr,ut)=>{"use strict";var vs=G(),bs=Z(),Os=ue(),ys=it(),ws=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=Buffer.from(n.mappings,"utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&Buffer.from(t,"utf-8"))),e},Ts=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=n.mappings.toString("utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&t.toString("utf-8"))),e},Me=class extends vs{constructor(e,t){super(),this._source=e,this._cachedSourceType=t?t.source:void 0,this._cachedSource=void 0,this._cachedBuffer=t?t.buffer:void 0,this._cachedSize=t?t.size:void 0,this._cachedMaps=t?t.maps:new Map,this._cachedHashUpdate=t?t.hash:void 0}getCachedData(){let e=new Map;for(let t of this._cachedMaps){let s=t[1];s.bufferedMap===void 0&&(s.bufferedMap=ws(this._getMapFromCacheEntry(s))),e.set(t[0],{map:void 0,bufferedMap:s.bufferedMap})}return this._cachedSource&&this.buffer(),{buffer:this._cachedBuffer,source:this._cachedSourceType!==void 0?this._cachedSourceType:typeof this._cachedSource=="string"?!0:Buffer.isBuffer(this._cachedSource)?!1:void 0,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){return typeof this._source=="function"&&(this._source=this._source()),this._source}source(){let e=this._getCachedSource();return e!==void 0?e:this._cachedSource=this.original().source()}_getMapFromCacheEntry(e){if(e.map!==void 0)return e.map;if(e.bufferedMap!==void 0)return e.map=Ts(e.bufferedMap)}_getCachedSource(){if(this._cachedSource!==void 0)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==void 0)return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}buffer(){if(this._cachedBuffer!==void 0)return this._cachedBuffer;if(this._cachedSource!==void 0)return Buffer.isBuffer(this._cachedSource)?this._cachedBuffer=this._cachedSource:this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8");if(typeof this.original().buffer=="function")return this._cachedBuffer=this.original().buffer();let e=this.source();return Buffer.isBuffer(e)?this._cachedBuffer=e:this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(this._cachedSize!==void 0)return this._cachedSize;if(this._cachedBuffer!==void 0)return this._cachedSize=this._cachedBuffer.length;let e=this._getCachedSource();return e!==void 0?this._cachedSize=Buffer.byteLength(e):this._cachedSize=this.original().size()}sourceAndMap(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0){let f=this._getMapFromCacheEntry(s);return{source:this.source(),map:f}}let i=this._getCachedSource(),r;if(i!==void 0)r=this.original().map(e);else{let f=this.original().sourceAndMap(e);i=f.source,r=f.map,this._cachedSource=i}return this._cachedMaps.set(t,{map:r,bufferedMap:void 0}),{source:i,map:r}}streamChunks(e,t,s,i){let r=e?JSON.stringify(e):"{}";if(this._cachedMaps.has(r)&&(this._cachedBuffer!==void 0||this._cachedSource!==void 0)){let{source:o,map:a}=this.sourceAndMap(e);return a?bs(o,a,t,s,i,!!(e&&e.finalSource),!0):Os(o,t,s,i,!!(e&&e.finalSource))}let{result:f,source:u,map:h}=ys(this.original(),e,t,s,i);return this._cachedSource=u,this._cachedMaps.set(r,{map:h,bufferedMap:void 0}),f}map(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0)return this._getMapFromCacheEntry(s);let i=this.original().map(e);return this._cachedMaps.set(t,{map:i,bufferedMap:void 0}),i}updateHash(e){if(this._cachedHashUpdate!==void 0){for(let r of this._cachedHashUpdate)e.update(r);return}let t=[],s,i={update:r=>{typeof r=="string"&&r.length<10240?s===void 0?s=r:(s+=r,s.length>102400&&(t.push(Buffer.from(s)),s=void 0)):(s!==void 0&&(t.push(Buffer.from(s)),s=void 0),t.push(r))}};this.original().updateHash(i),s!==void 0&&t.push(Buffer.from(s));for(let r of t)e.update(r);this._cachedHashUpdate=t}};ut.exports=Me});var lt=j((cr,ot)=>{"use strict";var Cs=G(),ct=fe(),zs=ee(),{getMap:Es,getSourceAndMap:qs}=$(),Be=new WeakSet,ve=class n extends Cs{constructor(){super(),this._children=[];for(let e=0;e<arguments.length;e++){let t=arguments[e];if(t instanceof n)for(let s of t._children)this._children.push(s);else this._children.push(t)}this._isOptimized=arguments.length===0}getChildren(){return this._isOptimized||this._optimize(),this._children}add(e){if(e instanceof n)for(let t of e._children)this._children.push(t);else this._children.push(e);this._isOptimized=!1}addAllSkipOptimizing(e){for(let t of e)this._children.push(t)}buffer(){this._isOptimized||this._optimize();let e=[];for(let t of this._children)if(typeof t.buffer=="function")e.push(t.buffer());else{let s=t.source();Buffer.isBuffer(s)?e.push(s):e.push(Buffer.from(s,"utf-8"))}return Buffer.concat(e)}source(){this._isOptimized||this._optimize();let e="";for(let t of this._children)e+=t.source();return e}size(){this._isOptimized||this._optimize();let e=0;for(let t of this._children)e+=t.size();return e}map(e){return Es(this,e)}sourceAndMap(e){return qs(this,e)}streamChunks(e,t,s,i){if(this._isOptimized||this._optimize(),this._children.length===1)return this._children[0].streamChunks(e,t,s,i);let r=0,f=0,u=new Map,h=new Map,o=!!(e&&e.finalSource),a="",l=!1;for(let d of this._children){let m=[],c=[],_=0,{generatedLine:g,generatedColumn:A,source:O}=zs(d,e,(y,v,E,p,B,q,w)=>{let b=v+r,T=v===1?E+f:E;l&&((v!==1||E!==0)&&t(void 0,r+1,f,-1,-1,-1,-1),l=!1);let S=p<0||p>=m.length?-1:m[p],M=w<0||w>=c.length?-1:c[w];_=S<0?0:v,o?(y!==void 0&&(a+=y),S>=0&&t(void 0,b,T,S,B,q,M)):S<0?t(y,b,T,-1,-1,-1,-1):t(y,b,T,S,B,q,M)},(y,v,E)=>{let p=u.get(v);p===void 0&&(u.set(v,p=u.size),s(p,v,E)),m[y]=p},(y,v)=>{let E=h.get(v);E===void 0&&(h.set(v,E=h.size),i(E,v)),c[y]=E});O!==void 0&&(a+=O),l&&(g!==1||A!==0)&&(t(void 0,r+1,f,-1,-1,-1,-1),l=!1),g>1?f=A:f+=A,l=l||o&&_===g,r+=g-1}return{generatedLine:r+1,generatedColumn:f,source:o?a:void 0}}updateHash(e){this._isOptimized||this._optimize(),e.update("ConcatSource");for(let t of this._children)t.updateHash(e)}_optimize(){let e=[],t,s,i=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u):s=[typeof s=="string"?s:s.source(),u]},r=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u.source()):s=[typeof s=="string"?s:s.source(),u.source()]},f=()=>{if(Array.isArray(s)){let u=new ct(s.join(""));Be.add(u),e.push(u)}else if(typeof s=="string"){let u=new ct(s);Be.add(u),e.push(u)}else e.push(s)};for(let u of this._children)typeof u=="string"?t===void 0?t=u:t+=u:(t!==void 0&&(i(t),t=void 0),Be.has(u)?r(u):(s!==void 0&&(f(),s=void 0),e.push(u)));t!==void 0&&i(t),s!==void 0&&f(),this._children=e,this._isOptimized=!0}};ot.exports=ve});var pt=j((or,dt)=>{"use strict";var{getMap:Ns,getSourceAndMap:js}=$(),xs=ee(),ks=G(),be=X(),ht=typeof process=="object"&&process.versions&&typeof process.versions.v8=="string"&&!/^[0-6]\./.test(process.versions.v8),at=536870912,ae=class{constructor(e,t,s,i){this.start=e,this.end=t,this.content=s,this.name=i,ht||(this.index=-1)}},Oe=class extends ks{constructor(e,t){super(),this._source=e,this._name=t,this._replacements=[],this._isSorted=!0}getName(){return this._name}getReplacements(){return this._sortReplacements(),this._replacements}replace(e,t,s,i){if(typeof s!="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new ae(e,t,s,i)),this._isSorted=!1}insert(e,t,s){if(typeof t!="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new ae(e,e-1,t,s)),this._isSorted=!1}source(){if(this._replacements.length===0)return this._source.source();let e=this._source.source(),t=0,s=[];this._sortReplacements();for(let i of this._replacements){let r=Math.floor(i.start),f=Math.floor(i.end+1);if(t<r){let u=r-t;s.push(e.slice(0,u)),e=e.slice(u),t=r}if(s.push(i.content),t<f){let u=f-t;e=e.slice(u),t=f}}return s.push(e),s.join("")}map(e){return this._replacements.length===0?this._source.map(e):Ns(this,e)}sourceAndMap(e){return this._replacements.length===0?this._source.sourceAndMap(e):js(this,e)}original(){return this._source}_sortReplacements(){this._isSorted||(ht?this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:0}):(this._replacements.forEach((e,t)=>e.index=t),this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:e.index-t.index})),this._isSorted=!0)}streamChunks(e,t,s,i){this._sortReplacements();let r=this._replacements,f=0,u=0,h=-1,o=u<r.length?Math.floor(r[u].start):at,a=0,l=0,d=0,m=[],c=new Map,_=[],g=(p,B,q,w)=>{let b=p<m.length?m[p]:void 0;if(b===void 0)return!1;typeof b=="string"&&(b=be(b),m[p]=b);let T=B<=b.length?b[B-1]:null;return T===null?!1:T.slice(q,q+w.length)===w},{generatedLine:A,generatedColumn:O}=xs(this._source,Object.assign({},e,{finalSource:!1}),(p,B,q,w,b,T,S)=>{let M=0,N=f+p.length;if(h>f){if(h>=N){let P=B+a;p.endsWith(`
9
9
  `)?(a--,d===P&&(l+=q)):d===P?l-=p.length:(l=-p.length,d=P),f=N;return}M=h-f,g(w,b,T,p.slice(0,M))&&(T+=M),f+=M;let z=B+a;d===z?l-=M:(l=-M,d=z),q+=M}if(o<N)do{let z=B+a;if(o>f){let C=o-f,k=p.slice(M,M+C);t(k,z,q+(z===d?l:0),w,b,T,S<0||S>=_.length?-1:_[S]),q+=C,M+=C,f=o,g(w,b,T,k)&&(T+=k.length)}let{content:P,name:R}=r[u],L=be(P),I=S;if(w>=0&&R){let C=c.get(R);C===void 0&&(C=c.size,c.set(R,C),i(C,R)),I=C}for(let C=0;C<L.length;C++){let k=L[C];t(k,z,q+(z===d?l:0),w,b,T,I),I=-1,C===L.length-1&&!k.endsWith(`
10
- `)?d===z?l+=k.length:(l=k.length,d=z):(a++,z++,l=-q,d=z)}h=Math.max(h,Math.floor(r[u].end+1)),u++,o=u<r.length?Math.floor(r[u].start):lt;let H=p.length-N+h-M;if(H>0){if(h>=N){let k=B+a;p.endsWith(`
10
+ `)?d===z?l+=k.length:(l=k.length,d=z):(a++,z++,l=-q,d=z)}h=Math.max(h,Math.floor(r[u].end+1)),u++,o=u<r.length?Math.floor(r[u].start):at;let H=p.length-N+h-M;if(H>0){if(h>=N){let k=B+a;p.endsWith(`
11
11
  `)?(a--,d===k&&(l+=q)):d===k?l-=p.length-M:(l=M-p.length,d=k),f=N;return}let C=B+a;g(w,b,T,p.slice(M,M+H))&&(T+=H),M+=H,f+=H,d===C?l-=H:(l=-H,d=C),q+=H}}while(o<N);if(M<p.length){let z=M===0?p:p.slice(M),P=B+a;t(z,P,q+(P===d?l:0),w,b,T,S<0?-1:_[S])}f=N},(p,B,q)=>{for(;m.length<p;)m.push(void 0);m[p]=q,s(p,B,q)},(p,B)=>{let q=c.get(B);q===void 0&&(q=c.size,c.set(B,q),i(q,B)),_[p]=q}),y="";for(;u<r.length;u++)y+=r[u].content;let v=A+a,E=be(y);for(let p=0;p<E.length;p++){let B=E[p];t(B,v,O+(v===d?l:0),-1,-1,-1,-1),p===E.length-1&&!B.endsWith(`
12
- `)?d===v?l+=B.length:(l=B.length,d=v):(a++,v++,l=-O,d=v)}return{generatedLine:v,generatedColumn:O+(v===d?l:0)}}updateHash(e){this._sortReplacements(),e.update("ReplaceSource"),this._source.updateHash(e),e.update(this._name||"");for(let t of this._replacements)e.update(`${t.start}${t.end}${t.content}${t.name}`)}};ht.exports=Oe});var gt=j((cr,_t)=>{"use strict";var xs=G(),ks=fe(),Is=Z(),{getMap:Ds,getSourceAndMap:Rs}=$(),pt=/\n(?=.|\s)/g,ye=class extends xs{constructor(e,t){super(),this._source=typeof t=="string"||Buffer.isBuffer(t)?new ks(t,!0):t,this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){let e=this._source.source(),t=this._prefix;return t+e.replace(pt,`
13
- `+t)}map(e){return Ds(this,e)}sourceAndMap(e){return Rs(this,e)}streamChunks(e,t,s,i){let r=this._prefix,f=r.length,u=!!(e&&e.columns===!1),{generatedLine:h,generatedColumn:o,source:a}=Is(this._source,e,(l,d,m,c,_,g,A)=>{m!==0?m+=f:l!==void 0?u||c<0?l=r+l:f>0&&(t(r,d,m,-1,-1,-1,-1),m+=f):u||(m+=f),t(l,d,m,c,_,g,A)},s,i);return{generatedLine:h,generatedColumn:o===0?0:f+o,source:a!==void 0?r+a.replace(pt,`
14
- `+r):void 0}}updateHash(e){e.update("PrefixSource"),this._source.updateHash(e),e.update(this._prefix)}};_t.exports=ye});var mt=j((or,St)=>{"use strict";var Ls=G(),we=class extends Ls{constructor(e){super(),this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}};St.exports=we});var Bt=j((lr,Mt)=>{"use strict";var At=G(),Te=class n extends At{static from(e){return e instanceof At?e:new n(e)}constructor(e){super(),this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){return typeof this._sourceLike.buffer=="function"?this._sourceLike.buffer():super.buffer()}size(){return typeof this._sourceLike.size=="function"?this._sourceLike.size():super.size()}map(e){return typeof this._sourceLike.map=="function"?this._sourceLike.map(e):super.map(e)}sourceAndMap(e){return typeof this._sourceLike.sourceAndMap=="function"?this._sourceLike.sourceAndMap(e):super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash=="function")return this._sourceLike.updateHash(e);if(typeof this._sourceLike.map=="function")throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method");e.update(this.buffer())}};Mt.exports=Te});var bt=j(vt=>{var V=(n,e)=>{let t;Object.defineProperty(vt,n,{get:()=>(e!==void 0&&(t=e(),e=void 0),t),configurable:!0})};V("Source",()=>G());V("RawSource",()=>fe());V("OriginalSource",()=>Pe());V("SourceMapSource",()=>tt());V("CachedSource",()=>ut());V("ConcatSource",()=>ot());V("ReplaceSource",()=>dt());V("PrefixSource",()=>gt());V("SizeOnlySource",()=>mt());V("CompatSource",()=>Bt())});var Ps={};It(Ps,{BuilderDevToolsPlugin:()=>Ce});module.exports=Rt(Ps);var yt=Dt(bt(),1),de=require("node:path"),Q=require("node:fs"),wt=require("../core/index.cjs"),Tt=require("../node/index.cjs"),Ct=require("../server/index.cjs"),Ot="BuilderDevToolsPlugin",he=null;async function Hs(n){let e=await(0,Tt.createDevToolsNodeSys)({cwd:process.cwd()});e.debug("webpack setupDevTools init");let t=await(0,wt.createDevTools)(e),s=await(0,Ct.createDevToolsServer)({...t,getClientId:()=>"webpack-builder-dev-tools",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server");let i=["next.config.js","next.config.ts","next.config.mjs","webpack.config.js","webpack.config.ts"].map(r=>(0,de.join)(e.getAppRootDir(),r));for(let r of i)if((0,Q.existsSync)(r)){e.debug(`restart server: ${r}`),(0,Q.writeFileSync)(r,(0,Q.readFileSync)(r)),await new Promise(f=>setTimeout(f,50));return}},enableAppWatch:async i=>i,...e,...n});return e.debug("webpack setupDevTools done"),{server:s,sys:e}}var Ce=class{constructor(e){this.opts=e||{},typeof this.opts.enabled!="boolean"&&(this.opts.enabled=process.env.NODE_ENV!=="production"),this.opts.enabled&&he==null&&(he=Hs(this.opts))}apply(e){if(this.opts.enabled===!1)return;let t=e,s=t.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,i=new WeakMap;t.hooks.compilation.tap(Ot,r=>{r.hooks.processAssets.tapAsync({name:Ot,stage:s},async(f,u)=>{if(he!=null){for(let h of r.chunks)for(let o of h.files){let a=(0,de.basename)(o),{server:l,sys:d}=await he;if(d.getFrameworks().some(A=>A.name==="next")&&a!=="webpack.js")continue;d.getAppRootDir=()=>t.context;let m=new URL("/~builder-dev-tools.js",l.getUrl()),c=`
12
+ `)?d===v?l+=B.length:(l=B.length,d=v):(a++,v++,l=-O,d=v)}return{generatedLine:v,generatedColumn:O+(v===d?l:0)}}updateHash(e){this._sortReplacements(),e.update("ReplaceSource"),this._source.updateHash(e),e.update(this._name||"");for(let t of this._replacements)e.update(`${t.start}${t.end}${t.content}${t.name}`)}};dt.exports=Oe});var St=j((lr,gt)=>{"use strict";var Is=G(),Ds=fe(),Rs=ee(),{getMap:Ls,getSourceAndMap:Hs}=$(),_t=/\n(?=.|\s)/g,ye=class extends Is{constructor(e,t){super(),this._source=typeof t=="string"||Buffer.isBuffer(t)?new Ds(t,!0):t,this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){let e=this._source.source(),t=this._prefix;return t+e.replace(_t,`
13
+ `+t)}map(e){return Ls(this,e)}sourceAndMap(e){return Hs(this,e)}streamChunks(e,t,s,i){let r=this._prefix,f=r.length,u=!!(e&&e.columns===!1),{generatedLine:h,generatedColumn:o,source:a}=Rs(this._source,e,(l,d,m,c,_,g,A)=>{m!==0?m+=f:l!==void 0?u||c<0?l=r+l:f>0&&(t(r,d,m,-1,-1,-1,-1),m+=f):u||(m+=f),t(l,d,m,c,_,g,A)},s,i);return{generatedLine:h,generatedColumn:o===0?0:f+o,source:a!==void 0?r+a.replace(_t,`
14
+ `+r):void 0}}updateHash(e){e.update("PrefixSource"),this._source.updateHash(e),e.update(this._prefix)}};gt.exports=ye});var At=j((ar,mt)=>{"use strict";var Ps=G(),we=class extends Ps{constructor(e){super(),this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}};mt.exports=we});var vt=j((hr,Bt)=>{"use strict";var Mt=G(),Te=class n extends Mt{static from(e){return e instanceof Mt?e:new n(e)}constructor(e){super(),this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){return typeof this._sourceLike.buffer=="function"?this._sourceLike.buffer():super.buffer()}size(){return typeof this._sourceLike.size=="function"?this._sourceLike.size():super.size()}map(e){return typeof this._sourceLike.map=="function"?this._sourceLike.map(e):super.map(e)}sourceAndMap(e){return typeof this._sourceLike.sourceAndMap=="function"?this._sourceLike.sourceAndMap(e):super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash=="function")return this._sourceLike.updateHash(e);if(typeof this._sourceLike.map=="function")throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method");e.update(this.buffer())}};Bt.exports=Te});var Ot=j(bt=>{var V=(n,e)=>{let t;Object.defineProperty(bt,n,{get:()=>(e!==void 0&&(t=e(),e=void 0),t),configurable:!0})};V("Source",()=>G());V("RawSource",()=>fe());V("OriginalSource",()=>We());V("SourceMapSource",()=>st());V("CachedSource",()=>ft());V("ConcatSource",()=>lt());V("ReplaceSource",()=>pt());V("PrefixSource",()=>St());V("SizeOnlySource",()=>At());V("CompatSource",()=>vt())});var Gs={};Rt(Gs,{BuilderDevToolsPlugin:()=>Ce});module.exports=Ht(Gs);var wt=Lt(Ot(),1),de=require("node:path"),Q=require("node:fs"),Tt=require("../core/index.cjs"),Ct=require("../node/index.cjs"),zt=require("../server/index.cjs");var yt="BuilderDevToolsPlugin",he=null;async function Ws(n){let e=await(0,Ct.createDevToolsNodeSys)({cwd:process.cwd()});e.debug("webpack setupDevTools init");let t=await(0,Tt.createDevTools)(e),s=await(0,zt.createDevToolsServer)({...t,getClientId:()=>"webpack-builder-dev-tools",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server");let i=["next.config.js","next.config.ts","next.config.mjs","webpack.config.js","webpack.config.ts"].map(r=>(0,de.join)(e.getAppRootDir(),r));for(let r of i)if((0,Q.existsSync)(r)){e.debug(`restart server: ${r}`),(0,Q.writeFileSync)(r,(0,Q.readFileSync)(r)),await new Promise(f=>setTimeout(f,50));return}},enableAppWatch:async i=>i,...e,...n});return e.debug("webpack setupDevTools done"),{server:s,sys:e}}var Ce=class{constructor(e){Ee(this,"opts");this.opts=e||{},typeof this.opts.enabled!="boolean"&&(this.opts.enabled=process.env.NODE_ENV!=="production"),this.opts.enabled&&he==null&&(he=Ws(this.opts))}apply(e){if(this.opts.enabled===!1)return;let t=e,s=t.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,i=new WeakMap;t.hooks.compilation.tap(yt,r=>{r.hooks.processAssets.tapAsync({name:yt,stage:s},async(f,u)=>{if(he!=null){for(let h of r.chunks)for(let o of h.files){let a=(0,de.basename)(o),{server:l,sys:d}=await he;if(d.getFrameworks().some(A=>A.name==="next")&&a!=="webpack.js")continue;d.getAppRootDir=()=>t.context;let m=new URL("/~builder-dev-tools.js",l.getUrl()),c=`
15
15
  ;
16
16
  /* Builder Devtools (Webpack) */
17
17
  `;c+=`(() => {
@@ -26,4 +26,4 @@
26
26
  `,c+=` }
27
27
  `,c+=` }
28
28
  `,c+=`})();
29
- `;let _={chunk:h,filename:o},g=r.getPath(c,_);r.updateAsset(o,A=>{let O=i.get(A);if(!O||O.inject!==g){let y=new yt.ConcatSource(A,g);return i.set(A,{source:y,inject:g}),y}return O.source})}u()}})})}};0&&(module.exports={BuilderDevToolsPlugin});
29
+ `;let _={chunk:h,filename:o},g=r.getPath(c,_);r.updateAsset(o,A=>{let O=i.get(A);if(!O||O.inject!==g){let y=new wt.ConcatSource(A,g);return i.set(A,{source:y,inject:g}),y}return O.source})}u()}})})}};0&&(module.exports={BuilderDevToolsPlugin});
package/webpack/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
- var yt=Object.create;var ye=Object.defineProperty;var wt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var Ct=Object.getPrototypeOf,zt=Object.prototype.hasOwnProperty;var j=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var Et=(i,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tt(e))!zt.call(i,n)&&n!==t&&ye(i,n,{get:()=>e[n],enumerable:!(s=wt(e,n))||s.enumerable});return i};var qt=(i,e,t)=>(t=i!=null?yt(Ct(i)):{},Et(e||!i||!i.__esModule?ye(t,"default",{value:i,enumerable:!0}):t,i));var G=j((Gs,we)=>{"use strict";var ae=class{source(){throw new Error("Abstract")}buffer(){let e=this.source();return Buffer.isBuffer(e)?e:Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}};we.exports=ae});var re=j((Vs,Te)=>{"use strict";var Nt=i=>{if(i===void 0)return{};let e=i.lastIndexOf(`
2
- `);if(e===-1)return{generatedLine:1,generatedColumn:i.length,source:i};let t=2;for(let s=0;s<e;s++)i.charCodeAt(s)===10&&t++;return{generatedLine:t,generatedColumn:i.length-e-1,source:i}};Te.exports=Nt});var X=j((Us,Ce)=>{var jt=i=>{let e=[],t=i.length,s=0;for(;s<t;)if(i.charCodeAt(s)===10)e.push(`
3
- `),s++;else{let r=s+1;for(;r<t&&i.charCodeAt(r)!==10;)r++;e.push(i.slice(s,r+1)),s=r+1}return e};Ce.exports=jt});var ne=j((Fs,ze)=>{"use strict";var xt=re(),kt=X(),It=(i,e,t,s)=>{let n=1,r=kt(i),f;for(f of r)e(f,n,0,-1,-1,-1,-1),n++;return r.length===0||f.endsWith(`
4
- `)?{generatedLine:r.length+1,generatedColumn:0}:{generatedLine:r.length,generatedColumn:f.length}};ze.exports=(i,e,t,s,n)=>n?xt(i):It(i,e,t,s)});var ie=j((Js,Ee)=>{"use strict";var Dt=ne(),Rt=G(),he=class extends Rt{constructor(e,t=!1){super();let s=Buffer.isBuffer(e);if(!s&&typeof e!="string")throw new TypeError("argument 'value' must be either string of Buffer");this._valueIsBuffer=!t&&s,this._value=t&&s?void 0:e,this._valueAsBuffer=s?e:void 0,this._valueAsString=s?void 0:e}isBuffer(){return this._valueIsBuffer}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return null}streamChunks(e,t,s,n){return this._value===void 0&&(this._value=Buffer.from(this._valueAsBuffer,"utf-8")),this._valueAsString===void 0&&(this._valueAsString=typeof this._value=="string"?this._value:this._value.toString("utf-8")),Dt(this._valueAsString,t,s,n,!!(e&&e.finalSource))}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("RawSource"),e.update(this._valueAsBuffer)}};Ee.exports=he});var de=j((Xs,Ne)=>{"use strict";var ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qe=32,Lt=i=>i&&i.columns===!1?Pt():Ht(),Ht=()=>{let i=1,e=0,t=0,s=1,n=0,r=0,f=!1,u=!1,h=!0;return(o,a,l,d,m,c)=>{if(f&&i===o){if(l===t&&d===s&&m===n&&!u&&c<0)return""}else if(l<0)return"";let _;i<o?(_=";".repeat(o-i),i=o,e=0,h=!1):h?(_="",h=!1):_=",";let g=A=>{let O=A>>>31&1,y=A>>31,E=(A+y^y)<<1|O;for(;;){let p=E&31;if(E>>=5,E===0){_+=ue[p];break}else _+=ue[p|qe]}};return g(a-e),e=a,l>=0?(f=!0,l===t?_+="A":(g(l-t),t=l),g(d-s),s=d,m===n?_+="A":(g(m-n),n=m),c>=0?(g(c-r),r=c,u=!0):u=!1):f=!1,_}},Pt=()=>{let i=0,e=1,t=0,s=1;return(n,r,f,u,h,o)=>{if(f<0||i===n)return"";let a,l=d=>{let m=d>>>31&1,c=d>>31,g=(d+c^c)<<1|m;for(;;){let A=g&31;if(g>>=5,g===0){a+=ue[A];break}else a+=ue[A|qe]}};return i=n,n===e+1?(e=n,f===t?(t=f,u===s+1?(s=u,";AACA"):(a=";AA",l(u-s),s=u,a+"A")):(a=";A",l(f-t),t=f,l(u-s),s=u,a+"A")):(a=";".repeat(n-e),e=n,f===t?(t=f,u===s+1?(s=u,a+"AACA"):(a+="AA",l(u-s),s=u,a+"A")):(a+="A",l(f-t),t=f,l(u-s),s=u,a+"A"))}};Ne.exports=Lt});var $=j(pe=>{"use strict";var je=de();pe.getSourceAndMap=(i,e)=>{let t="",s="",n=[],r=[],f=[],u=je(e),{source:h}=i.streamChunks(Object.assign({},e,{finalSource:!0}),(o,a,l,d,m,c,_)=>{o!==void 0&&(t+=o),s+=u(a,l,d,m,c,_)},(o,a,l)=>{for(;n.length<o;)n.push(null);if(n[o]=a,l!==void 0){for(;r.length<o;)r.push(null);r[o]=l}},(o,a)=>{for(;f.length<o;)f.push(null);f[o]=a});return{source:h!==void 0?h:t,map:s.length>0?{version:3,file:"x",mappings:s,sources:n,sourcesContent:r.length>0?r:void 0,names:f}:null}};pe.getMap=(i,e)=>{let t="",s=[],n=[],r=[],f=je(e);return i.streamChunks(Object.assign({},e,{source:!1,finalSource:!0}),(u,h,o,a,l,d,m)=>{t+=f(h,o,a,l,d,m)},(u,h,o)=>{for(;s.length<u;)s.push(null);if(s[u]=h,o!==void 0){for(;n.length<u;)n.push(null);n[u]=o}},(u,h)=>{for(;r.length<u;)r.push(null);r[u]=h}),t.length>0?{version:3,file:"x",mappings:t,sources:s,sourcesContent:n.length>0?n:void 0,names:r}:null}});var ke=j((Ks,xe)=>{var Wt=i=>{let e=i.length;if(e===0)return null;let t=[],s=0;for(;s<e;){let n=s;e:{let r=i.charCodeAt(s);for(;r!==10&&r!==59&&r!==123&&r!==125;){if(++s>=e)break e;r=i.charCodeAt(s)}for(;r===59||r===32||r===123||r===125||r===13||r===9;){if(++s>=e)break e;r=i.charCodeAt(s)}r===10&&s++}t.push(i.slice(n,s))}return t};xe.exports=Wt});var De=j((Qs,Ie)=>{"use strict";var{getMap:Gt,getSourceAndMap:Vt}=$(),Ut=X(),Ft=re(),Jt=G(),Xt=ke(),_e=class extends Jt{constructor(e,t){super();let s=Buffer.isBuffer(e);this._value=s?void 0:e,this._valueAsBuffer=s?e:void 0,this._name=t}getName(){return this._name}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return Gt(this,e)}sourceAndMap(e){return Vt(this,e)}streamChunks(e,t,s,n){this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),s(0,this._name,this._value);let r=!!(e&&e.finalSource);if(!e||e.columns!==!1){let f=Xt(this._value),u=1,h=0;if(f!==null)for(let o of f){let a=o.endsWith(`
5
- `);a&&o.length===1?r||t(o,u,h,-1,-1,-1,-1):t(r?void 0:o,u,h,0,u,h,-1),a?(u++,h=0):h+=o.length}return{generatedLine:u,generatedColumn:h,source:r?this._value:void 0}}else if(r){let f=Ft(this._value),{generatedLine:u,generatedColumn:h}=f;if(h===0)for(let o=1;o<u;o++)t(void 0,o,0,0,o,0,-1);else for(let o=1;o<=u;o++)t(void 0,o,0,0,o,0,-1);return f}else{let f=1,u=Ut(this._value),h;for(h of u)t(r?void 0:h,f,0,0,f,0,-1),f++;return u.length===0||h.endsWith(`
6
- `)?{generatedLine:u.length+1,generatedColumn:0,source:r?this._value:void 0}:{generatedLine:u.length,generatedColumn:h.length,source:r?this._value:void 0}}}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("OriginalSource"),e.update(this._valueAsBuffer),e.update(this._name||"")}};Ie.exports=_e});var Le=j((Ys,Re)=>{"use strict";var $t=(i,e)=>{if(e<0)return null;let{sourceRoot:t,sources:s}=i,n=s[e];return t?t.endsWith("/")?t+n:t+"/"+n:n};Re.exports=$t});var We=j((Zs,Pe)=>{"use strict";var He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=new Uint8Array(123);{K.fill(66);for(let i=0;i<He.length;i++)K[He.charCodeAt(i)]=i;K[44]=64,K[59]=65}var Kt=K.length-1,Qt=(i,e)=>{let t=new Uint32Array([0,0,1,0,0]),s=0,n=0,r=0,f=1,u=-1;for(let h=0;h<i.length;h++){let o=i.charCodeAt(h);if(o>Kt)continue;let a=K[o];if(a&64)t[0]>u&&(s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4]),u=t[0]),s=0,a===65&&(f++,t[0]=0,u=-1);else if(a&32)n|=(a&31)<<r,r+=5;else{n|=a<<r;let l=n&1?-(n>>1):n>>1;t[s++]+=l,r=0,n=0}}s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4])};Pe.exports=Qt});var Q=j((er,Ue)=>{"use strict";var Ge=re(),fe=Le(),ce=We(),Ve=X(),Yt=(i,e,t,s,n)=>{let r=Ve(i);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,names:h,mappings:o}=e;for(let p=0;p<f.length;p++)s(p,fe(e,p),u&&u[p]||void 0);if(h)for(let p=0;p<h.length;p++)n(p,h[p]);let a=r[r.length-1],l=a.endsWith(`
7
- `),d=l?r.length+1:r.length,m=l?0:a.length,c=1,_=0,g=!1,A=-1,O=-1,y=-1,v=-1,E=(p,B,q,w,b,T)=>{if(g&&c<=r.length){let S,M=c,N=_,z=r[c-1];p!==c?(S=z.slice(_),c++,_=0):(S=z.slice(_,B),_=B),S&&t(S,M,N,A,O,y,v),g=!1}if(p>c&&_>0){if(c<=r.length){let S=r[c-1].slice(_);t(S,c,_,-1,-1,-1,-1)}c++,_=0}for(;p>c;)c<=r.length&&t(r[c-1],c,0,-1,-1,-1,-1),c++;if(B>_){if(c<=r.length){let S=r[c-1].slice(_,B);t(S,c,_,-1,-1,-1,-1)}_=B}q>=0&&(p<d||p===d&&B<m)&&(g=!0,A=q,O=w,y=b,v=T)};return ce(o,E),E(d,m,-1,-1,-1,-1),{generatedLine:d,generatedColumn:m}},Zt=(i,e,t,s,n)=>{let r=Ve(i);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,mappings:h}=e;for(let _=0;_<f.length;_++)s(_,fe(e,_),u&&u[_]||void 0);let o=1;for(ce(h,(_,g,A,O,y,v)=>{if(!(A<0||_<o||_>r.length)){for(;_>o;)o<=r.length&&t(r[o-1],o,0,-1,-1,-1,-1),o++;_<=r.length&&(t(r[_-1],_,0,A,O,y,-1),o++)}});o<=r.length;o++)t(r[o-1],o,0,-1,-1,-1,-1);let l=r[r.length-1],d=l.endsWith(`
8
- `),m=d?r.length+1:r.length,c=d?0:l.length;return{generatedLine:m,generatedColumn:c}},es=(i,e,t,s,n)=>{let r=Ge(i),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return r;let{sources:h,sourcesContent:o,names:a,mappings:l}=e;for(let c=0;c<h.length;c++)s(c,fe(e,c),o&&o[c]||void 0);if(a)for(let c=0;c<a.length;c++)n(c,a[c]);let d=0;return ce(l,(c,_,g,A,O,y)=>{c>=f&&(_>=u||c>f)||(g>=0?(t(void 0,c,_,g,A,O,y),d=c):d===c&&(t(void 0,c,_,-1,-1,-1,-1),d=0))}),r},ts=(i,e,t,s,n)=>{let r=Ge(i),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return{generatedLine:1,generatedColumn:0};let{sources:h,sourcesContent:o,mappings:a}=e;for(let c=0;c<h.length;c++)s(c,fe(e,c),o&&o[c]||void 0);let l=u===0?f-1:f,d=1;return ce(a,(c,_,g,A,O,y)=>{g>=0&&d<=c&&c<=l&&(t(void 0,c,0,g,A,O,-1),d=c+1)}),r};Ue.exports=(i,e,t,s,n,r,f)=>f?r?es(i,e,t,s,n):Yt(i,e,t,s,n):r?ts(i,e,t,s,n):Zt(i,e,t,s,n)});var $e=j((tr,Xe)=>{"use strict";var Fe=Q(),Je=X(),ss=(i,e,t,s,n,r,f,u,h,o,a)=>{let l=new Map,d=new Map,m=[],c=[],_=[],g=-2,A=[],O=[],y=[],v=[],E=[],p=[],B=[],q=(w,b)=>{if(w>B.length)return-1;let{mappingsData:T}=B[w-1],S=0,M=T.length/5;for(;S<M;){let N=S+M>>1;T[N*5]<=b?S=N+1:M=N}return S===0?-1:S-1};return Fe(i,e,(w,b,T,S,M,N,z)=>{if(S===g){let R=q(M,N);if(R!==-1){let{chunks:L,mappingsData:I}=B[M-1],H=R*5,C=I[H+1],k=I[H+2],F=I[H+3],U=I[H+4];if(C>=0){let bt=L[R],Ot=I[H],Z=N-Ot;if(Z>0){let x=C<v.length?v[C]:null;if(x===void 0){let D=y[C];x=D?Je(D):null,v[C]=x}if(x!==null){let D=k<=x.length?x[k-1].slice(F,F+Z):"";bt.slice(0,Z)===D&&(F+=Z,U=-1)}}let ee=C<A.length?A[C]:-2;if(ee===-2){let[x,D]=C<O.length?O[C]:[null,void 0],J=l.get(x);J===void 0&&(l.set(x,J=l.size),u(J,x,D)),ee=J,A[C]=ee}let W=-1;if(U>=0){if(W=U<E.length?E[U]:-2,W===-2){let x=U<p.length?p[U]:void 0;if(x){let D=d.get(x);D===void 0&&(d.set(x,D=d.size),h(D,x)),W=D}else W=-1;E[U]=W}}else if(z>=0){let x=v[C];if(x===void 0){let D=y[C];x=D?Je(D):null,v[C]=x}if(x!==null){let D=_[z],J=k<=x.length?x[k-1].slice(F,F+D.length):"";if(D===J&&(W=z<c.length?c[z]:-2,W===-2)){let te=_[z];if(te){let se=d.get(te);se===void 0&&(d.set(te,se=d.size),h(se,te)),W=se}else W=-1;c[z]=W}}}f(w,b,T,ee,k,F,W);return}}if(r){f(w,b,T,-1,-1,-1,-1);return}else if(m[S]===-2){let L=l.get(t);L===void 0&&(l.set(i,L=l.size),u(L,t,s)),m[S]=L}}let P=S<0||S>=m.length?-1:m[S];if(P<0)f(w,b,T,-1,-1,-1,-1);else{let R=-1;if(z>=0&&z<c.length&&(R=c[z],R===-2)){let L=_[z],I=d.get(L);I===void 0&&(d.set(L,I=d.size),h(I,L)),R=I,c[z]=R}f(w,b,T,P,M,N,R)}},(w,b,T)=>{if(b===t)g=w,s!==void 0?T=s:s=T,m[w]=-2,Fe(T,n,(S,M,N,z,P,R,L)=>{for(;B.length<M;)B.push({mappingsData:[],chunks:[]});let I=B[M-1];I.mappingsData.push(N,z,P,R,L),I.chunks.push(S)},(S,M,N)=>{y[S]=N,v[S]=void 0,A[S]=-2,O[S]=[M,N]},(S,M)=>{E[S]=-2,p[S]=M},!1,a);else{let S=l.get(b);S===void 0&&(l.set(b,S=l.size),u(S,b,T)),m[w]=S}},(w,b)=>{c[w]=-2,_[w]=b},o,a)};Xe.exports=ss});var Qe=j((sr,Ke)=>{"use strict";var rs=G(),ns=Q(),is=$e(),{getMap:us,getSourceAndMap:fs}=$(),ge=class extends rs{constructor(e,t,s,n,r,f){super();let u=Buffer.isBuffer(e);this._valueAsString=u?void 0:e,this._valueAsBuffer=u?e:void 0,this._name=t,this._hasSourceMap=!!s;let h=Buffer.isBuffer(s),o=typeof s=="string";this._sourceMapAsObject=h||o?void 0:s,this._sourceMapAsString=o?s:void 0,this._sourceMapAsBuffer=h?s:void 0,this._hasOriginalSource=!!n;let a=Buffer.isBuffer(n);this._originalSourceAsString=a?void 0:n,this._originalSourceAsBuffer=a?n:void 0,this._hasInnerSourceMap=!!r;let l=Buffer.isBuffer(r),d=typeof r=="string";this._innerSourceMapAsObject=l||d?void 0:r,this._innerSourceMapAsString=d?r:void 0,this._innerSourceMapAsBuffer=l?r:void 0,this._removeOriginalSource=f}_ensureValueBuffer(){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8"))}_ensureValueString(){this._valueAsString===void 0&&(this._valueAsString=this._valueAsBuffer.toString("utf-8"))}_ensureOriginalSourceBuffer(){this._originalSourceAsBuffer===void 0&&this._hasOriginalSource&&(this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8"))}_ensureOriginalSourceString(){this._originalSourceAsString===void 0&&this._hasOriginalSource&&(this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8"))}_ensureInnerSourceMapObject(){this._innerSourceMapAsObject===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString))}_ensureInnerSourceMapBuffer(){this._innerSourceMapAsBuffer===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8"))}_ensureInnerSourceMapString(){this._innerSourceMapAsString===void 0&&this._hasInnerSourceMap&&(this._innerSourceMapAsBuffer!==void 0?this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8"):this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject))}_ensureSourceMapObject(){this._sourceMapAsObject===void 0&&(this._ensureSourceMapString(),this._sourceMapAsObject=JSON.parse(this._sourceMapAsString))}_ensureSourceMapBuffer(){this._sourceMapAsBuffer===void 0&&(this._ensureSourceMapString(),this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8"))}_ensureSourceMapString(){this._sourceMapAsString===void 0&&(this._sourceMapAsBuffer!==void 0?this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8"):this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject))}getArgsAsBuffers(){return this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){return this._ensureValueBuffer(),this._valueAsBuffer}source(){return this._ensureValueString(),this._valueAsString}map(e){return this._hasInnerSourceMap?us(this,e):(this._ensureSourceMapObject(),this._sourceMapAsObject)}sourceAndMap(e){return this._hasInnerSourceMap?fs(this,e):(this._ensureValueString(),this._ensureSourceMapObject(),{source:this._valueAsString,map:this._sourceMapAsObject})}streamChunks(e,t,s,n){return this._ensureValueString(),this._ensureSourceMapObject(),this._ensureOriginalSourceString(),this._hasInnerSourceMap?(this._ensureInnerSourceMapObject(),is(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,s,n,!!(e&&e.finalSource),!!(e&&e.columns!==!1))):ns(this._valueAsString,this._sourceMapAsObject,t,s,n,!!(e&&e.finalSource),!!(e&&e.columns!==!1))}updateHash(e){this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),e.update("SourceMapSource"),e.update(this._valueAsBuffer),e.update(this._sourceMapAsBuffer),this._hasOriginalSource&&e.update(this._originalSourceAsBuffer),this._hasInnerSourceMap&&e.update(this._innerSourceMapAsBuffer),e.update(this._removeOriginalSource?"true":"false")}};Ke.exports=ge});var Y=j((rr,Ye)=>{"use strict";var cs=ne(),os=Q();Ye.exports=(i,e,t,s,n)=>{if(typeof i.streamChunks=="function")return i.streamChunks(e,t,s,n);{let r=i.sourceAndMap(e);return r.map?os(r.source,r.map,t,s,n,!!(e&&e.finalSource),!!(e&&e.columns!==!1)):cs(r.source,t,s,n,!!(e&&e.finalSource))}}});var et=j((nr,Ze)=>{"use strict";var ls=de(),as=Y(),hs=(i,e,t,s,n)=>{let r="",f="",u=[],h=[],o=[],a=ls(Object.assign({},e,{columns:!0})),l=!!(e&&e.finalSource),{generatedLine:d,generatedColumn:m,source:c}=as(i,e,(g,A,O,y,v,E,p)=>(g!==void 0&&(r+=g),f+=a(A,O,y,v,E,p),t(l?void 0:g,A,O,y,v,E,p)),(g,A,O)=>{for(;u.length<g;)u.push(null);if(u[g]=A,O!==void 0){for(;h.length<g;)h.push(null);h[g]=O}return s(g,A,O)},(g,A)=>{for(;o.length<g;)o.push(null);return o[g]=A,n(g,A)}),_=c!==void 0?c:r;return{result:{generatedLine:d,generatedColumn:m,source:l?_:void 0},source:_,map:f.length>0?{version:3,file:"x",mappings:f,sources:u,sourcesContent:h.length>0?h:void 0,names:o}:null}};Ze.exports=hs});var st=j((ir,tt)=>{"use strict";var ds=G(),ps=Q(),_s=ne(),gs=et(),Ss=i=>{if(typeof i!="object"||!i)return i;let e=Object.assign({},i);return i.mappings&&(e.mappings=Buffer.from(i.mappings,"utf-8")),i.sourcesContent&&(e.sourcesContent=i.sourcesContent.map(t=>t&&Buffer.from(t,"utf-8"))),e},ms=i=>{if(typeof i!="object"||!i)return i;let e=Object.assign({},i);return i.mappings&&(e.mappings=i.mappings.toString("utf-8")),i.sourcesContent&&(e.sourcesContent=i.sourcesContent.map(t=>t&&t.toString("utf-8"))),e},Se=class extends ds{constructor(e,t){super(),this._source=e,this._cachedSourceType=t?t.source:void 0,this._cachedSource=void 0,this._cachedBuffer=t?t.buffer:void 0,this._cachedSize=t?t.size:void 0,this._cachedMaps=t?t.maps:new Map,this._cachedHashUpdate=t?t.hash:void 0}getCachedData(){let e=new Map;for(let t of this._cachedMaps){let s=t[1];s.bufferedMap===void 0&&(s.bufferedMap=Ss(this._getMapFromCacheEntry(s))),e.set(t[0],{map:void 0,bufferedMap:s.bufferedMap})}return this._cachedSource&&this.buffer(),{buffer:this._cachedBuffer,source:this._cachedSourceType!==void 0?this._cachedSourceType:typeof this._cachedSource=="string"?!0:Buffer.isBuffer(this._cachedSource)?!1:void 0,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){return typeof this._source=="function"&&(this._source=this._source()),this._source}source(){let e=this._getCachedSource();return e!==void 0?e:this._cachedSource=this.original().source()}_getMapFromCacheEntry(e){if(e.map!==void 0)return e.map;if(e.bufferedMap!==void 0)return e.map=ms(e.bufferedMap)}_getCachedSource(){if(this._cachedSource!==void 0)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==void 0)return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}buffer(){if(this._cachedBuffer!==void 0)return this._cachedBuffer;if(this._cachedSource!==void 0)return Buffer.isBuffer(this._cachedSource)?this._cachedBuffer=this._cachedSource:this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8");if(typeof this.original().buffer=="function")return this._cachedBuffer=this.original().buffer();let e=this.source();return Buffer.isBuffer(e)?this._cachedBuffer=e:this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(this._cachedSize!==void 0)return this._cachedSize;if(this._cachedBuffer!==void 0)return this._cachedSize=this._cachedBuffer.length;let e=this._getCachedSource();return e!==void 0?this._cachedSize=Buffer.byteLength(e):this._cachedSize=this.original().size()}sourceAndMap(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0){let f=this._getMapFromCacheEntry(s);return{source:this.source(),map:f}}let n=this._getCachedSource(),r;if(n!==void 0)r=this.original().map(e);else{let f=this.original().sourceAndMap(e);n=f.source,r=f.map,this._cachedSource=n}return this._cachedMaps.set(t,{map:r,bufferedMap:void 0}),{source:n,map:r}}streamChunks(e,t,s,n){let r=e?JSON.stringify(e):"{}";if(this._cachedMaps.has(r)&&(this._cachedBuffer!==void 0||this._cachedSource!==void 0)){let{source:o,map:a}=this.sourceAndMap(e);return a?ps(o,a,t,s,n,!!(e&&e.finalSource),!0):_s(o,t,s,n,!!(e&&e.finalSource))}let{result:f,source:u,map:h}=gs(this.original(),e,t,s,n);return this._cachedSource=u,this._cachedMaps.set(r,{map:h,bufferedMap:void 0}),f}map(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0)return this._getMapFromCacheEntry(s);let n=this.original().map(e);return this._cachedMaps.set(t,{map:n,bufferedMap:void 0}),n}updateHash(e){if(this._cachedHashUpdate!==void 0){for(let r of this._cachedHashUpdate)e.update(r);return}let t=[],s,n={update:r=>{typeof r=="string"&&r.length<10240?s===void 0?s=r:(s+=r,s.length>102400&&(t.push(Buffer.from(s)),s=void 0)):(s!==void 0&&(t.push(Buffer.from(s)),s=void 0),t.push(r))}};this.original().updateHash(n),s!==void 0&&t.push(Buffer.from(s));for(let r of t)e.update(r);this._cachedHashUpdate=t}};tt.exports=Se});var it=j((ur,nt)=>{"use strict";var As=G(),rt=ie(),Ms=Y(),{getMap:Bs,getSourceAndMap:vs}=$(),me=new WeakSet,Ae=class i extends As{constructor(){super(),this._children=[];for(let e=0;e<arguments.length;e++){let t=arguments[e];if(t instanceof i)for(let s of t._children)this._children.push(s);else this._children.push(t)}this._isOptimized=arguments.length===0}getChildren(){return this._isOptimized||this._optimize(),this._children}add(e){if(e instanceof i)for(let t of e._children)this._children.push(t);else this._children.push(e);this._isOptimized=!1}addAllSkipOptimizing(e){for(let t of e)this._children.push(t)}buffer(){this._isOptimized||this._optimize();let e=[];for(let t of this._children)if(typeof t.buffer=="function")e.push(t.buffer());else{let s=t.source();Buffer.isBuffer(s)?e.push(s):e.push(Buffer.from(s,"utf-8"))}return Buffer.concat(e)}source(){this._isOptimized||this._optimize();let e="";for(let t of this._children)e+=t.source();return e}size(){this._isOptimized||this._optimize();let e=0;for(let t of this._children)e+=t.size();return e}map(e){return Bs(this,e)}sourceAndMap(e){return vs(this,e)}streamChunks(e,t,s,n){if(this._isOptimized||this._optimize(),this._children.length===1)return this._children[0].streamChunks(e,t,s,n);let r=0,f=0,u=new Map,h=new Map,o=!!(e&&e.finalSource),a="",l=!1;for(let d of this._children){let m=[],c=[],_=0,{generatedLine:g,generatedColumn:A,source:O}=Ms(d,e,(y,v,E,p,B,q,w)=>{let b=v+r,T=v===1?E+f:E;l&&((v!==1||E!==0)&&t(void 0,r+1,f,-1,-1,-1,-1),l=!1);let S=p<0||p>=m.length?-1:m[p],M=w<0||w>=c.length?-1:c[w];_=S<0?0:v,o?(y!==void 0&&(a+=y),S>=0&&t(void 0,b,T,S,B,q,M)):S<0?t(y,b,T,-1,-1,-1,-1):t(y,b,T,S,B,q,M)},(y,v,E)=>{let p=u.get(v);p===void 0&&(u.set(v,p=u.size),s(p,v,E)),m[y]=p},(y,v)=>{let E=h.get(v);E===void 0&&(h.set(v,E=h.size),n(E,v)),c[y]=E});O!==void 0&&(a+=O),l&&(g!==1||A!==0)&&(t(void 0,r+1,f,-1,-1,-1,-1),l=!1),g>1?f=A:f+=A,l=l||o&&_===g,r+=g-1}return{generatedLine:r+1,generatedColumn:f,source:o?a:void 0}}updateHash(e){this._isOptimized||this._optimize(),e.update("ConcatSource");for(let t of this._children)t.updateHash(e)}_optimize(){let e=[],t,s,n=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u):s=[typeof s=="string"?s:s.source(),u]},r=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u.source()):s=[typeof s=="string"?s:s.source(),u.source()]},f=()=>{if(Array.isArray(s)){let u=new rt(s.join(""));me.add(u),e.push(u)}else if(typeof s=="string"){let u=new rt(s);me.add(u),e.push(u)}else e.push(s)};for(let u of this._children)typeof u=="string"?t===void 0?t=u:t+=u:(t!==void 0&&(n(t),t=void 0),me.has(u)?r(u):(s!==void 0&&(f(),s=void 0),e.push(u)));t!==void 0&&n(t),s!==void 0&&f(),this._children=e,this._isOptimized=!0}};nt.exports=Ae});var ot=j((fr,ct)=>{"use strict";var{getMap:bs,getSourceAndMap:Os}=$(),ys=Y(),ws=G(),Me=X(),ft=typeof process=="object"&&process.versions&&typeof process.versions.v8=="string"&&!/^[0-6]\./.test(process.versions.v8),ut=536870912,oe=class{constructor(e,t,s,n){this.start=e,this.end=t,this.content=s,this.name=n,ft||(this.index=-1)}},Be=class extends ws{constructor(e,t){super(),this._source=e,this._name=t,this._replacements=[],this._isSorted=!0}getName(){return this._name}getReplacements(){return this._sortReplacements(),this._replacements}replace(e,t,s,n){if(typeof s!="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new oe(e,t,s,n)),this._isSorted=!1}insert(e,t,s){if(typeof t!="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new oe(e,e-1,t,s)),this._isSorted=!1}source(){if(this._replacements.length===0)return this._source.source();let e=this._source.source(),t=0,s=[];this._sortReplacements();for(let n of this._replacements){let r=Math.floor(n.start),f=Math.floor(n.end+1);if(t<r){let u=r-t;s.push(e.slice(0,u)),e=e.slice(u),t=r}if(s.push(n.content),t<f){let u=f-t;e=e.slice(u),t=f}}return s.push(e),s.join("")}map(e){return this._replacements.length===0?this._source.map(e):bs(this,e)}sourceAndMap(e){return this._replacements.length===0?this._source.sourceAndMap(e):Os(this,e)}original(){return this._source}_sortReplacements(){this._isSorted||(ft?this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let n=e.end-t.end;return n!==0?n:0}):(this._replacements.forEach((e,t)=>e.index=t),this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let n=e.end-t.end;return n!==0?n:e.index-t.index})),this._isSorted=!0)}streamChunks(e,t,s,n){this._sortReplacements();let r=this._replacements,f=0,u=0,h=-1,o=u<r.length?Math.floor(r[u].start):ut,a=0,l=0,d=0,m=[],c=new Map,_=[],g=(p,B,q,w)=>{let b=p<m.length?m[p]:void 0;if(b===void 0)return!1;typeof b=="string"&&(b=Me(b),m[p]=b);let T=B<=b.length?b[B-1]:null;return T===null?!1:T.slice(q,q+w.length)===w},{generatedLine:A,generatedColumn:O}=ys(this._source,Object.assign({},e,{finalSource:!1}),(p,B,q,w,b,T,S)=>{let M=0,N=f+p.length;if(h>f){if(h>=N){let P=B+a;p.endsWith(`
9
- `)?(a--,d===P&&(l+=q)):d===P?l-=p.length:(l=-p.length,d=P),f=N;return}M=h-f,g(w,b,T,p.slice(0,M))&&(T+=M),f+=M;let z=B+a;d===z?l-=M:(l=-M,d=z),q+=M}if(o<N)do{let z=B+a;if(o>f){let C=o-f,k=p.slice(M,M+C);t(k,z,q+(z===d?l:0),w,b,T,S<0||S>=_.length?-1:_[S]),q+=C,M+=C,f=o,g(w,b,T,k)&&(T+=k.length)}let{content:P,name:R}=r[u],L=Me(P),I=S;if(w>=0&&R){let C=c.get(R);C===void 0&&(C=c.size,c.set(R,C),n(C,R)),I=C}for(let C=0;C<L.length;C++){let k=L[C];t(k,z,q+(z===d?l:0),w,b,T,I),I=-1,C===L.length-1&&!k.endsWith(`
10
- `)?d===z?l+=k.length:(l=k.length,d=z):(a++,z++,l=-q,d=z)}h=Math.max(h,Math.floor(r[u].end+1)),u++,o=u<r.length?Math.floor(r[u].start):ut;let H=p.length-N+h-M;if(H>0){if(h>=N){let k=B+a;p.endsWith(`
11
- `)?(a--,d===k&&(l+=q)):d===k?l-=p.length-M:(l=M-p.length,d=k),f=N;return}let C=B+a;g(w,b,T,p.slice(M,M+H))&&(T+=H),M+=H,f+=H,d===C?l-=H:(l=-H,d=C),q+=H}}while(o<N);if(M<p.length){let z=M===0?p:p.slice(M),P=B+a;t(z,P,q+(P===d?l:0),w,b,T,S<0?-1:_[S])}f=N},(p,B,q)=>{for(;m.length<p;)m.push(void 0);m[p]=q,s(p,B,q)},(p,B)=>{let q=c.get(B);q===void 0&&(q=c.size,c.set(B,q),n(q,B)),_[p]=q}),y="";for(;u<r.length;u++)y+=r[u].content;let v=A+a,E=Me(y);for(let p=0;p<E.length;p++){let B=E[p];t(B,v,O+(v===d?l:0),-1,-1,-1,-1),p===E.length-1&&!B.endsWith(`
12
- `)?d===v?l+=B.length:(l=B.length,d=v):(a++,v++,l=-O,d=v)}return{generatedLine:v,generatedColumn:O+(v===d?l:0)}}updateHash(e){this._sortReplacements(),e.update("ReplaceSource"),this._source.updateHash(e),e.update(this._name||"");for(let t of this._replacements)e.update(`${t.start}${t.end}${t.content}${t.name}`)}};ct.exports=Be});var ht=j((cr,at)=>{"use strict";var Ts=G(),Cs=ie(),zs=Y(),{getMap:Es,getSourceAndMap:qs}=$(),lt=/\n(?=.|\s)/g,ve=class extends Ts{constructor(e,t){super(),this._source=typeof t=="string"||Buffer.isBuffer(t)?new Cs(t,!0):t,this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){let e=this._source.source(),t=this._prefix;return t+e.replace(lt,`
13
- `+t)}map(e){return Es(this,e)}sourceAndMap(e){return qs(this,e)}streamChunks(e,t,s,n){let r=this._prefix,f=r.length,u=!!(e&&e.columns===!1),{generatedLine:h,generatedColumn:o,source:a}=zs(this._source,e,(l,d,m,c,_,g,A)=>{m!==0?m+=f:l!==void 0?u||c<0?l=r+l:f>0&&(t(r,d,m,-1,-1,-1,-1),m+=f):u||(m+=f),t(l,d,m,c,_,g,A)},s,n);return{generatedLine:h,generatedColumn:o===0?0:f+o,source:a!==void 0?r+a.replace(lt,`
14
- `+r):void 0}}updateHash(e){e.update("PrefixSource"),this._source.updateHash(e),e.update(this._prefix)}};at.exports=ve});var pt=j((or,dt)=>{"use strict";var Ns=G(),be=class extends Ns{constructor(e){super(),this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}};dt.exports=be});var St=j((lr,gt)=>{"use strict";var _t=G(),Oe=class i extends _t{static from(e){return e instanceof _t?e:new i(e)}constructor(e){super(),this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){return typeof this._sourceLike.buffer=="function"?this._sourceLike.buffer():super.buffer()}size(){return typeof this._sourceLike.size=="function"?this._sourceLike.size():super.size()}map(e){return typeof this._sourceLike.map=="function"?this._sourceLike.map(e):super.map(e)}sourceAndMap(e){return typeof this._sourceLike.sourceAndMap=="function"?this._sourceLike.sourceAndMap(e):super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash=="function")return this._sourceLike.updateHash(e);if(typeof this._sourceLike.map=="function")throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method");e.update(this.buffer())}};gt.exports=Oe});var At=j(mt=>{var V=(i,e)=>{let t;Object.defineProperty(mt,i,{get:()=>(e!==void 0&&(t=e(),e=void 0),t),configurable:!0})};V("Source",()=>G());V("RawSource",()=>ie());V("OriginalSource",()=>De());V("SourceMapSource",()=>Qe());V("CachedSource",()=>st());V("ConcatSource",()=>it());V("ReplaceSource",()=>ot());V("PrefixSource",()=>ht());V("SizeOnlySource",()=>pt());V("CompatSource",()=>St())});var vt=qt(At(),1);import{basename as js,join as xs}from"node:path";import{existsSync as ks,readFileSync as Is,writeFileSync as Ds}from"node:fs";import{createDevTools as Rs}from"../core/index.mjs";import{createDevToolsNodeSys as Ls}from"../node/index.mjs";import{createDevToolsServer as Hs}from"../server/index.mjs";var Mt="BuilderDevToolsPlugin",le=null;async function Ps(i){let e=await Ls({cwd:process.cwd()});e.debug("webpack setupDevTools init");let t=await Rs(e),s=await Hs({...t,getClientId:()=>"webpack-builder-dev-tools",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server");let n=["next.config.js","next.config.ts","next.config.mjs","webpack.config.js","webpack.config.ts"].map(r=>xs(e.getAppRootDir(),r));for(let r of n)if(ks(r)){e.debug(`restart server: ${r}`),Ds(r,Is(r)),await new Promise(f=>setTimeout(f,50));return}},enableAppWatch:async n=>n,...e,...i});return e.debug("webpack setupDevTools done"),{server:s,sys:e}}var Bt=class{constructor(e){this.opts=e||{},typeof this.opts.enabled!="boolean"&&(this.opts.enabled=process.env.NODE_ENV!=="production"),this.opts.enabled&&le==null&&(le=Ps(this.opts))}apply(e){if(this.opts.enabled===!1)return;let t=e,s=t.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,n=new WeakMap;t.hooks.compilation.tap(Mt,r=>{r.hooks.processAssets.tapAsync({name:Mt,stage:s},async(f,u)=>{if(le!=null){for(let h of r.chunks)for(let o of h.files){let a=js(o),{server:l,sys:d}=await le;if(d.getFrameworks().some(A=>A.name==="next")&&a!=="webpack.js")continue;d.getAppRootDir=()=>t.context;let m=new URL("/~builder-dev-tools.js",l.getUrl()),c=`
1
+ var wt=Object.create;var ae=Object.defineProperty;var Tt=Object.getOwnPropertyDescriptor;var Ct=Object.getOwnPropertyNames;var zt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var qt=(n,e,t)=>e in n?ae(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var j=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var Nt=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ct(e))!Et.call(n,i)&&i!==t&&ae(n,i,{get:()=>e[i],enumerable:!(s=Tt(e,i))||s.enumerable});return n};var jt=(n,e,t)=>(t=n!=null?wt(zt(n)):{},Nt(e||!n||!n.__esModule?ae(t,"default",{value:n,enumerable:!0}):t,n));var we=(n,e,t)=>qt(n,typeof e!="symbol"?e+"":e,t);var G=j((Us,Te)=>{"use strict";var he=class{source(){throw new Error("Abstract")}buffer(){let e=this.source();return Buffer.isBuffer(e)?e:Buffer.from(e,"utf-8")}size(){return this.buffer().length}map(e){return null}sourceAndMap(e){return{source:this.source(),map:this.map(e)}}updateHash(e){throw new Error("Abstract")}};Te.exports=he});var re=j((Fs,Ce)=>{"use strict";var xt=n=>{if(n===void 0)return{};let e=n.lastIndexOf(`
2
+ `);if(e===-1)return{generatedLine:1,generatedColumn:n.length,source:n};let t=2;for(let s=0;s<e;s++)n.charCodeAt(s)===10&&t++;return{generatedLine:t,generatedColumn:n.length-e-1,source:n}};Ce.exports=xt});var X=j((Js,ze)=>{var kt=n=>{let e=[],t=n.length,s=0;for(;s<t;)if(n.charCodeAt(s)===10)e.push(`
3
+ `),s++;else{let r=s+1;for(;r<t&&n.charCodeAt(r)!==10;)r++;e.push(n.slice(s,r+1)),s=r+1}return e};ze.exports=kt});var ne=j((Xs,Ee)=>{"use strict";var It=re(),Dt=X(),Rt=(n,e,t,s)=>{let i=1,r=Dt(n),f;for(f of r)e(f,i,0,-1,-1,-1,-1),i++;return r.length===0||f.endsWith(`
4
+ `)?{generatedLine:r.length+1,generatedColumn:0}:{generatedLine:r.length,generatedColumn:f.length}};Ee.exports=(n,e,t,s,i)=>i?It(n):Rt(n,e,t,s)});var ie=j(($s,qe)=>{"use strict";var Lt=ne(),Ht=G(),de=class extends Ht{constructor(e,t=!1){super();let s=Buffer.isBuffer(e);if(!s&&typeof e!="string")throw new TypeError("argument 'value' must be either string of Buffer");this._valueIsBuffer=!t&&s,this._value=t&&s?void 0:e,this._valueAsBuffer=s?e:void 0,this._valueAsString=s?void 0:e}isBuffer(){return this._valueIsBuffer}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return null}streamChunks(e,t,s,i){return this._value===void 0&&(this._value=Buffer.from(this._valueAsBuffer,"utf-8")),this._valueAsString===void 0&&(this._valueAsString=typeof this._value=="string"?this._value:this._value.toString("utf-8")),Lt(this._valueAsString,t,s,i,!!(e&&e.finalSource))}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("RawSource"),e.update(this._valueAsBuffer)}};qe.exports=de});var pe=j((Ks,je)=>{"use strict";var ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Ne=32,Pt=n=>n&&n.columns===!1?Gt():Wt(),Wt=()=>{let n=1,e=0,t=0,s=1,i=0,r=0,f=!1,u=!1,h=!0;return(o,a,l,d,m,c)=>{if(f&&n===o){if(l===t&&d===s&&m===i&&!u&&c<0)return""}else if(l<0)return"";let _;n<o?(_=";".repeat(o-n),n=o,e=0,h=!1):h?(_="",h=!1):_=",";let g=A=>{let O=A>>>31&1,y=A>>31,E=(A+y^y)<<1|O;for(;;){let p=E&31;if(E>>=5,E===0){_+=ue[p];break}else _+=ue[p|Ne]}};return g(a-e),e=a,l>=0?(f=!0,l===t?_+="A":(g(l-t),t=l),g(d-s),s=d,m===i?_+="A":(g(m-i),i=m),c>=0?(g(c-r),r=c,u=!0):u=!1):f=!1,_}},Gt=()=>{let n=0,e=1,t=0,s=1;return(i,r,f,u,h,o)=>{if(f<0||n===i)return"";let a,l=d=>{let m=d>>>31&1,c=d>>31,g=(d+c^c)<<1|m;for(;;){let A=g&31;if(g>>=5,g===0){a+=ue[A];break}else a+=ue[A|Ne]}};return n=i,i===e+1?(e=i,f===t?(t=f,u===s+1?(s=u,";AACA"):(a=";AA",l(u-s),s=u,a+"A")):(a=";A",l(f-t),t=f,l(u-s),s=u,a+"A")):(a=";".repeat(i-e),e=i,f===t?(t=f,u===s+1?(s=u,a+"AACA"):(a+="AA",l(u-s),s=u,a+"A")):(a+="A",l(f-t),t=f,l(u-s),s=u,a+"A"))}};je.exports=Pt});var $=j(_e=>{"use strict";var xe=pe();_e.getSourceAndMap=(n,e)=>{let t="",s="",i=[],r=[],f=[],u=xe(e),{source:h}=n.streamChunks(Object.assign({},e,{finalSource:!0}),(o,a,l,d,m,c,_)=>{o!==void 0&&(t+=o),s+=u(a,l,d,m,c,_)},(o,a,l)=>{for(;i.length<o;)i.push(null);if(i[o]=a,l!==void 0){for(;r.length<o;)r.push(null);r[o]=l}},(o,a)=>{for(;f.length<o;)f.push(null);f[o]=a});return{source:h!==void 0?h:t,map:s.length>0?{version:3,file:"x",mappings:s,sources:i,sourcesContent:r.length>0?r:void 0,names:f}:null}};_e.getMap=(n,e)=>{let t="",s=[],i=[],r=[],f=xe(e);return n.streamChunks(Object.assign({},e,{source:!1,finalSource:!0}),(u,h,o,a,l,d,m)=>{t+=f(h,o,a,l,d,m)},(u,h,o)=>{for(;s.length<u;)s.push(null);if(s[u]=h,o!==void 0){for(;i.length<u;)i.push(null);i[u]=o}},(u,h)=>{for(;r.length<u;)r.push(null);r[u]=h}),t.length>0?{version:3,file:"x",mappings:t,sources:s,sourcesContent:i.length>0?i:void 0,names:r}:null}});var Ie=j((Ys,ke)=>{var Vt=n=>{let e=n.length;if(e===0)return null;let t=[],s=0;for(;s<e;){let i=s;e:{let r=n.charCodeAt(s);for(;r!==10&&r!==59&&r!==123&&r!==125;){if(++s>=e)break e;r=n.charCodeAt(s)}for(;r===59||r===32||r===123||r===125||r===13||r===9;){if(++s>=e)break e;r=n.charCodeAt(s)}r===10&&s++}t.push(n.slice(i,s))}return t};ke.exports=Vt});var Re=j((Zs,De)=>{"use strict";var{getMap:Ut,getSourceAndMap:Ft}=$(),Jt=X(),Xt=re(),$t=G(),Kt=Ie(),ge=class extends $t{constructor(e,t){super();let s=Buffer.isBuffer(e);this._value=s?void 0:e,this._valueAsBuffer=s?e:void 0,this._name=t}getName(){return this._name}source(){return this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),this._value}buffer(){return this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),this._valueAsBuffer}map(e){return Ut(this,e)}sourceAndMap(e){return Ft(this,e)}streamChunks(e,t,s,i){this._value===void 0&&(this._value=this._valueAsBuffer.toString("utf-8")),s(0,this._name,this._value);let r=!!(e&&e.finalSource);if(!e||e.columns!==!1){let f=Kt(this._value),u=1,h=0;if(f!==null)for(let o of f){let a=o.endsWith(`
5
+ `);a&&o.length===1?r||t(o,u,h,-1,-1,-1,-1):t(r?void 0:o,u,h,0,u,h,-1),a?(u++,h=0):h+=o.length}return{generatedLine:u,generatedColumn:h,source:r?this._value:void 0}}else if(r){let f=Xt(this._value),{generatedLine:u,generatedColumn:h}=f;if(h===0)for(let o=1;o<u;o++)t(void 0,o,0,0,o,0,-1);else for(let o=1;o<=u;o++)t(void 0,o,0,0,o,0,-1);return f}else{let f=1,u=Jt(this._value),h;for(h of u)t(r?void 0:h,f,0,0,f,0,-1),f++;return u.length===0||h.endsWith(`
6
+ `)?{generatedLine:u.length+1,generatedColumn:0,source:r?this._value:void 0}:{generatedLine:u.length,generatedColumn:h.length,source:r?this._value:void 0}}}updateHash(e){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._value,"utf-8")),e.update("OriginalSource"),e.update(this._valueAsBuffer),e.update(this._name||"")}};De.exports=ge});var He=j((er,Le)=>{"use strict";var Qt=(n,e)=>{if(e<0)return null;let{sourceRoot:t,sources:s}=n,i=s[e];return t?t.endsWith("/")?t+i:t+"/"+i:i};Le.exports=Qt});var Ge=j((tr,We)=>{"use strict";var Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=new Uint8Array(123);{K.fill(66);for(let n=0;n<Pe.length;n++)K[Pe.charCodeAt(n)]=n;K[44]=64,K[59]=65}var Yt=K.length-1,Zt=(n,e)=>{let t=new Uint32Array([0,0,1,0,0]),s=0,i=0,r=0,f=1,u=-1;for(let h=0;h<n.length;h++){let o=n.charCodeAt(h);if(o>Yt)continue;let a=K[o];if(a&64)t[0]>u&&(s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4]),u=t[0]),s=0,a===65&&(f++,t[0]=0,u=-1);else if(a&32)i|=(a&31)<<r,r+=5;else{i|=a<<r;let l=i&1?-(i>>1):i>>1;t[s++]+=l,r=0,i=0}}s===1?e(f,t[0],-1,-1,-1,-1):s===4?e(f,t[0],t[1],t[2],t[3],-1):s===5&&e(f,t[0],t[1],t[2],t[3],t[4])};We.exports=Zt});var Q=j((sr,Fe)=>{"use strict";var Ve=re(),fe=He(),ce=Ge(),Ue=X(),es=(n,e,t,s,i)=>{let r=Ue(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,names:h,mappings:o}=e;for(let p=0;p<f.length;p++)s(p,fe(e,p),u&&u[p]||void 0);if(h)for(let p=0;p<h.length;p++)i(p,h[p]);let a=r[r.length-1],l=a.endsWith(`
7
+ `),d=l?r.length+1:r.length,m=l?0:a.length,c=1,_=0,g=!1,A=-1,O=-1,y=-1,v=-1,E=(p,B,q,w,b,T)=>{if(g&&c<=r.length){let S,M=c,N=_,z=r[c-1];p!==c?(S=z.slice(_),c++,_=0):(S=z.slice(_,B),_=B),S&&t(S,M,N,A,O,y,v),g=!1}if(p>c&&_>0){if(c<=r.length){let S=r[c-1].slice(_);t(S,c,_,-1,-1,-1,-1)}c++,_=0}for(;p>c;)c<=r.length&&t(r[c-1],c,0,-1,-1,-1,-1),c++;if(B>_){if(c<=r.length){let S=r[c-1].slice(_,B);t(S,c,_,-1,-1,-1,-1)}_=B}q>=0&&(p<d||p===d&&B<m)&&(g=!0,A=q,O=w,y=b,v=T)};return ce(o,E),E(d,m,-1,-1,-1,-1),{generatedLine:d,generatedColumn:m}},ts=(n,e,t,s,i)=>{let r=Ue(n);if(r.length===0)return{generatedLine:1,generatedColumn:0};let{sources:f,sourcesContent:u,mappings:h}=e;for(let _=0;_<f.length;_++)s(_,fe(e,_),u&&u[_]||void 0);let o=1;for(ce(h,(_,g,A,O,y,v)=>{if(!(A<0||_<o||_>r.length)){for(;_>o;)o<=r.length&&t(r[o-1],o,0,-1,-1,-1,-1),o++;_<=r.length&&(t(r[_-1],_,0,A,O,y,-1),o++)}});o<=r.length;o++)t(r[o-1],o,0,-1,-1,-1,-1);let l=r[r.length-1],d=l.endsWith(`
8
+ `),m=d?r.length+1:r.length,c=d?0:l.length;return{generatedLine:m,generatedColumn:c}},ss=(n,e,t,s,i)=>{let r=Ve(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return r;let{sources:h,sourcesContent:o,names:a,mappings:l}=e;for(let c=0;c<h.length;c++)s(c,fe(e,c),o&&o[c]||void 0);if(a)for(let c=0;c<a.length;c++)i(c,a[c]);let d=0;return ce(l,(c,_,g,A,O,y)=>{c>=f&&(_>=u||c>f)||(g>=0?(t(void 0,c,_,g,A,O,y),d=c):d===c&&(t(void 0,c,_,-1,-1,-1,-1),d=0))}),r},rs=(n,e,t,s,i)=>{let r=Ve(n),{generatedLine:f,generatedColumn:u}=r;if(f===1&&u===0)return{generatedLine:1,generatedColumn:0};let{sources:h,sourcesContent:o,mappings:a}=e;for(let c=0;c<h.length;c++)s(c,fe(e,c),o&&o[c]||void 0);let l=u===0?f-1:f,d=1;return ce(a,(c,_,g,A,O,y)=>{g>=0&&d<=c&&c<=l&&(t(void 0,c,0,g,A,O,-1),d=c+1)}),r};Fe.exports=(n,e,t,s,i,r,f)=>f?r?ss(n,e,t,s,i):es(n,e,t,s,i):r?rs(n,e,t,s,i):ts(n,e,t,s,i)});var Ke=j((rr,$e)=>{"use strict";var Je=Q(),Xe=X(),ns=(n,e,t,s,i,r,f,u,h,o,a)=>{let l=new Map,d=new Map,m=[],c=[],_=[],g=-2,A=[],O=[],y=[],v=[],E=[],p=[],B=[],q=(w,b)=>{if(w>B.length)return-1;let{mappingsData:T}=B[w-1],S=0,M=T.length/5;for(;S<M;){let N=S+M>>1;T[N*5]<=b?S=N+1:M=N}return S===0?-1:S-1};return Je(n,e,(w,b,T,S,M,N,z)=>{if(S===g){let R=q(M,N);if(R!==-1){let{chunks:L,mappingsData:I}=B[M-1],H=R*5,C=I[H+1],k=I[H+2],F=I[H+3],U=I[H+4];if(C>=0){let Ot=L[R],yt=I[H],Z=N-yt;if(Z>0){let x=C<v.length?v[C]:null;if(x===void 0){let D=y[C];x=D?Xe(D):null,v[C]=x}if(x!==null){let D=k<=x.length?x[k-1].slice(F,F+Z):"";Ot.slice(0,Z)===D&&(F+=Z,U=-1)}}let ee=C<A.length?A[C]:-2;if(ee===-2){let[x,D]=C<O.length?O[C]:[null,void 0],J=l.get(x);J===void 0&&(l.set(x,J=l.size),u(J,x,D)),ee=J,A[C]=ee}let W=-1;if(U>=0){if(W=U<E.length?E[U]:-2,W===-2){let x=U<p.length?p[U]:void 0;if(x){let D=d.get(x);D===void 0&&(d.set(x,D=d.size),h(D,x)),W=D}else W=-1;E[U]=W}}else if(z>=0){let x=v[C];if(x===void 0){let D=y[C];x=D?Xe(D):null,v[C]=x}if(x!==null){let D=_[z],J=k<=x.length?x[k-1].slice(F,F+D.length):"";if(D===J&&(W=z<c.length?c[z]:-2,W===-2)){let te=_[z];if(te){let se=d.get(te);se===void 0&&(d.set(te,se=d.size),h(se,te)),W=se}else W=-1;c[z]=W}}}f(w,b,T,ee,k,F,W);return}}if(r){f(w,b,T,-1,-1,-1,-1);return}else if(m[S]===-2){let L=l.get(t);L===void 0&&(l.set(n,L=l.size),u(L,t,s)),m[S]=L}}let P=S<0||S>=m.length?-1:m[S];if(P<0)f(w,b,T,-1,-1,-1,-1);else{let R=-1;if(z>=0&&z<c.length&&(R=c[z],R===-2)){let L=_[z],I=d.get(L);I===void 0&&(d.set(L,I=d.size),h(I,L)),R=I,c[z]=R}f(w,b,T,P,M,N,R)}},(w,b,T)=>{if(b===t)g=w,s!==void 0?T=s:s=T,m[w]=-2,Je(T,i,(S,M,N,z,P,R,L)=>{for(;B.length<M;)B.push({mappingsData:[],chunks:[]});let I=B[M-1];I.mappingsData.push(N,z,P,R,L),I.chunks.push(S)},(S,M,N)=>{y[S]=N,v[S]=void 0,A[S]=-2,O[S]=[M,N]},(S,M)=>{E[S]=-2,p[S]=M},!1,a);else{let S=l.get(b);S===void 0&&(l.set(b,S=l.size),u(S,b,T)),m[w]=S}},(w,b)=>{c[w]=-2,_[w]=b},o,a)};$e.exports=ns});var Ye=j((nr,Qe)=>{"use strict";var is=G(),us=Q(),fs=Ke(),{getMap:cs,getSourceAndMap:os}=$(),Se=class extends is{constructor(e,t,s,i,r,f){super();let u=Buffer.isBuffer(e);this._valueAsString=u?void 0:e,this._valueAsBuffer=u?e:void 0,this._name=t,this._hasSourceMap=!!s;let h=Buffer.isBuffer(s),o=typeof s=="string";this._sourceMapAsObject=h||o?void 0:s,this._sourceMapAsString=o?s:void 0,this._sourceMapAsBuffer=h?s:void 0,this._hasOriginalSource=!!i;let a=Buffer.isBuffer(i);this._originalSourceAsString=a?void 0:i,this._originalSourceAsBuffer=a?i:void 0,this._hasInnerSourceMap=!!r;let l=Buffer.isBuffer(r),d=typeof r=="string";this._innerSourceMapAsObject=l||d?void 0:r,this._innerSourceMapAsString=d?r:void 0,this._innerSourceMapAsBuffer=l?r:void 0,this._removeOriginalSource=f}_ensureValueBuffer(){this._valueAsBuffer===void 0&&(this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8"))}_ensureValueString(){this._valueAsString===void 0&&(this._valueAsString=this._valueAsBuffer.toString("utf-8"))}_ensureOriginalSourceBuffer(){this._originalSourceAsBuffer===void 0&&this._hasOriginalSource&&(this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8"))}_ensureOriginalSourceString(){this._originalSourceAsString===void 0&&this._hasOriginalSource&&(this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8"))}_ensureInnerSourceMapObject(){this._innerSourceMapAsObject===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString))}_ensureInnerSourceMapBuffer(){this._innerSourceMapAsBuffer===void 0&&this._hasInnerSourceMap&&(this._ensureInnerSourceMapString(),this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8"))}_ensureInnerSourceMapString(){this._innerSourceMapAsString===void 0&&this._hasInnerSourceMap&&(this._innerSourceMapAsBuffer!==void 0?this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8"):this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject))}_ensureSourceMapObject(){this._sourceMapAsObject===void 0&&(this._ensureSourceMapString(),this._sourceMapAsObject=JSON.parse(this._sourceMapAsString))}_ensureSourceMapBuffer(){this._sourceMapAsBuffer===void 0&&(this._ensureSourceMapString(),this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8"))}_ensureSourceMapString(){this._sourceMapAsString===void 0&&(this._sourceMapAsBuffer!==void 0?this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8"):this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject))}getArgsAsBuffers(){return this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){return this._ensureValueBuffer(),this._valueAsBuffer}source(){return this._ensureValueString(),this._valueAsString}map(e){return this._hasInnerSourceMap?cs(this,e):(this._ensureSourceMapObject(),this._sourceMapAsObject)}sourceAndMap(e){return this._hasInnerSourceMap?os(this,e):(this._ensureValueString(),this._ensureSourceMapObject(),{source:this._valueAsString,map:this._sourceMapAsObject})}streamChunks(e,t,s,i){return this._ensureValueString(),this._ensureSourceMapObject(),this._ensureOriginalSourceString(),this._hasInnerSourceMap?(this._ensureInnerSourceMapObject(),fs(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))):us(this._valueAsString,this._sourceMapAsObject,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1))}updateHash(e){this._ensureValueBuffer(),this._ensureSourceMapBuffer(),this._ensureOriginalSourceBuffer(),this._ensureInnerSourceMapBuffer(),e.update("SourceMapSource"),e.update(this._valueAsBuffer),e.update(this._sourceMapAsBuffer),this._hasOriginalSource&&e.update(this._originalSourceAsBuffer),this._hasInnerSourceMap&&e.update(this._innerSourceMapAsBuffer),e.update(this._removeOriginalSource?"true":"false")}};Qe.exports=Se});var Y=j((ir,Ze)=>{"use strict";var ls=ne(),as=Q();Ze.exports=(n,e,t,s,i)=>{if(typeof n.streamChunks=="function")return n.streamChunks(e,t,s,i);{let r=n.sourceAndMap(e);return r.map?as(r.source,r.map,t,s,i,!!(e&&e.finalSource),!!(e&&e.columns!==!1)):ls(r.source,t,s,i,!!(e&&e.finalSource))}}});var tt=j((ur,et)=>{"use strict";var hs=pe(),ds=Y(),ps=(n,e,t,s,i)=>{let r="",f="",u=[],h=[],o=[],a=hs(Object.assign({},e,{columns:!0})),l=!!(e&&e.finalSource),{generatedLine:d,generatedColumn:m,source:c}=ds(n,e,(g,A,O,y,v,E,p)=>(g!==void 0&&(r+=g),f+=a(A,O,y,v,E,p),t(l?void 0:g,A,O,y,v,E,p)),(g,A,O)=>{for(;u.length<g;)u.push(null);if(u[g]=A,O!==void 0){for(;h.length<g;)h.push(null);h[g]=O}return s(g,A,O)},(g,A)=>{for(;o.length<g;)o.push(null);return o[g]=A,i(g,A)}),_=c!==void 0?c:r;return{result:{generatedLine:d,generatedColumn:m,source:l?_:void 0},source:_,map:f.length>0?{version:3,file:"x",mappings:f,sources:u,sourcesContent:h.length>0?h:void 0,names:o}:null}};et.exports=ps});var rt=j((fr,st)=>{"use strict";var _s=G(),gs=Q(),Ss=ne(),ms=tt(),As=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=Buffer.from(n.mappings,"utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&Buffer.from(t,"utf-8"))),e},Ms=n=>{if(typeof n!="object"||!n)return n;let e=Object.assign({},n);return n.mappings&&(e.mappings=n.mappings.toString("utf-8")),n.sourcesContent&&(e.sourcesContent=n.sourcesContent.map(t=>t&&t.toString("utf-8"))),e},me=class extends _s{constructor(e,t){super(),this._source=e,this._cachedSourceType=t?t.source:void 0,this._cachedSource=void 0,this._cachedBuffer=t?t.buffer:void 0,this._cachedSize=t?t.size:void 0,this._cachedMaps=t?t.maps:new Map,this._cachedHashUpdate=t?t.hash:void 0}getCachedData(){let e=new Map;for(let t of this._cachedMaps){let s=t[1];s.bufferedMap===void 0&&(s.bufferedMap=As(this._getMapFromCacheEntry(s))),e.set(t[0],{map:void 0,bufferedMap:s.bufferedMap})}return this._cachedSource&&this.buffer(),{buffer:this._cachedBuffer,source:this._cachedSourceType!==void 0?this._cachedSourceType:typeof this._cachedSource=="string"?!0:Buffer.isBuffer(this._cachedSource)?!1:void 0,size:this._cachedSize,maps:e,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){return typeof this._source=="function"&&(this._source=this._source()),this._source}source(){let e=this._getCachedSource();return e!==void 0?e:this._cachedSource=this.original().source()}_getMapFromCacheEntry(e){if(e.map!==void 0)return e.map;if(e.bufferedMap!==void 0)return e.map=Ms(e.bufferedMap)}_getCachedSource(){if(this._cachedSource!==void 0)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==void 0)return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}buffer(){if(this._cachedBuffer!==void 0)return this._cachedBuffer;if(this._cachedSource!==void 0)return Buffer.isBuffer(this._cachedSource)?this._cachedBuffer=this._cachedSource:this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8");if(typeof this.original().buffer=="function")return this._cachedBuffer=this.original().buffer();let e=this.source();return Buffer.isBuffer(e)?this._cachedBuffer=e:this._cachedBuffer=Buffer.from(e,"utf-8")}size(){if(this._cachedSize!==void 0)return this._cachedSize;if(this._cachedBuffer!==void 0)return this._cachedSize=this._cachedBuffer.length;let e=this._getCachedSource();return e!==void 0?this._cachedSize=Buffer.byteLength(e):this._cachedSize=this.original().size()}sourceAndMap(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0){let f=this._getMapFromCacheEntry(s);return{source:this.source(),map:f}}let i=this._getCachedSource(),r;if(i!==void 0)r=this.original().map(e);else{let f=this.original().sourceAndMap(e);i=f.source,r=f.map,this._cachedSource=i}return this._cachedMaps.set(t,{map:r,bufferedMap:void 0}),{source:i,map:r}}streamChunks(e,t,s,i){let r=e?JSON.stringify(e):"{}";if(this._cachedMaps.has(r)&&(this._cachedBuffer!==void 0||this._cachedSource!==void 0)){let{source:o,map:a}=this.sourceAndMap(e);return a?gs(o,a,t,s,i,!!(e&&e.finalSource),!0):Ss(o,t,s,i,!!(e&&e.finalSource))}let{result:f,source:u,map:h}=ms(this.original(),e,t,s,i);return this._cachedSource=u,this._cachedMaps.set(r,{map:h,bufferedMap:void 0}),f}map(e){let t=e?JSON.stringify(e):"{}",s=this._cachedMaps.get(t);if(s!==void 0)return this._getMapFromCacheEntry(s);let i=this.original().map(e);return this._cachedMaps.set(t,{map:i,bufferedMap:void 0}),i}updateHash(e){if(this._cachedHashUpdate!==void 0){for(let r of this._cachedHashUpdate)e.update(r);return}let t=[],s,i={update:r=>{typeof r=="string"&&r.length<10240?s===void 0?s=r:(s+=r,s.length>102400&&(t.push(Buffer.from(s)),s=void 0)):(s!==void 0&&(t.push(Buffer.from(s)),s=void 0),t.push(r))}};this.original().updateHash(i),s!==void 0&&t.push(Buffer.from(s));for(let r of t)e.update(r);this._cachedHashUpdate=t}};st.exports=me});var ut=j((cr,it)=>{"use strict";var Bs=G(),nt=ie(),vs=Y(),{getMap:bs,getSourceAndMap:Os}=$(),Ae=new WeakSet,Me=class n extends Bs{constructor(){super(),this._children=[];for(let e=0;e<arguments.length;e++){let t=arguments[e];if(t instanceof n)for(let s of t._children)this._children.push(s);else this._children.push(t)}this._isOptimized=arguments.length===0}getChildren(){return this._isOptimized||this._optimize(),this._children}add(e){if(e instanceof n)for(let t of e._children)this._children.push(t);else this._children.push(e);this._isOptimized=!1}addAllSkipOptimizing(e){for(let t of e)this._children.push(t)}buffer(){this._isOptimized||this._optimize();let e=[];for(let t of this._children)if(typeof t.buffer=="function")e.push(t.buffer());else{let s=t.source();Buffer.isBuffer(s)?e.push(s):e.push(Buffer.from(s,"utf-8"))}return Buffer.concat(e)}source(){this._isOptimized||this._optimize();let e="";for(let t of this._children)e+=t.source();return e}size(){this._isOptimized||this._optimize();let e=0;for(let t of this._children)e+=t.size();return e}map(e){return bs(this,e)}sourceAndMap(e){return Os(this,e)}streamChunks(e,t,s,i){if(this._isOptimized||this._optimize(),this._children.length===1)return this._children[0].streamChunks(e,t,s,i);let r=0,f=0,u=new Map,h=new Map,o=!!(e&&e.finalSource),a="",l=!1;for(let d of this._children){let m=[],c=[],_=0,{generatedLine:g,generatedColumn:A,source:O}=vs(d,e,(y,v,E,p,B,q,w)=>{let b=v+r,T=v===1?E+f:E;l&&((v!==1||E!==0)&&t(void 0,r+1,f,-1,-1,-1,-1),l=!1);let S=p<0||p>=m.length?-1:m[p],M=w<0||w>=c.length?-1:c[w];_=S<0?0:v,o?(y!==void 0&&(a+=y),S>=0&&t(void 0,b,T,S,B,q,M)):S<0?t(y,b,T,-1,-1,-1,-1):t(y,b,T,S,B,q,M)},(y,v,E)=>{let p=u.get(v);p===void 0&&(u.set(v,p=u.size),s(p,v,E)),m[y]=p},(y,v)=>{let E=h.get(v);E===void 0&&(h.set(v,E=h.size),i(E,v)),c[y]=E});O!==void 0&&(a+=O),l&&(g!==1||A!==0)&&(t(void 0,r+1,f,-1,-1,-1,-1),l=!1),g>1?f=A:f+=A,l=l||o&&_===g,r+=g-1}return{generatedLine:r+1,generatedColumn:f,source:o?a:void 0}}updateHash(e){this._isOptimized||this._optimize(),e.update("ConcatSource");for(let t of this._children)t.updateHash(e)}_optimize(){let e=[],t,s,i=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u):s=[typeof s=="string"?s:s.source(),u]},r=u=>{s===void 0?s=u:Array.isArray(s)?s.push(u.source()):s=[typeof s=="string"?s:s.source(),u.source()]},f=()=>{if(Array.isArray(s)){let u=new nt(s.join(""));Ae.add(u),e.push(u)}else if(typeof s=="string"){let u=new nt(s);Ae.add(u),e.push(u)}else e.push(s)};for(let u of this._children)typeof u=="string"?t===void 0?t=u:t+=u:(t!==void 0&&(i(t),t=void 0),Ae.has(u)?r(u):(s!==void 0&&(f(),s=void 0),e.push(u)));t!==void 0&&i(t),s!==void 0&&f(),this._children=e,this._isOptimized=!0}};it.exports=Me});var lt=j((or,ot)=>{"use strict";var{getMap:ys,getSourceAndMap:ws}=$(),Ts=Y(),Cs=G(),Be=X(),ct=typeof process=="object"&&process.versions&&typeof process.versions.v8=="string"&&!/^[0-6]\./.test(process.versions.v8),ft=536870912,oe=class{constructor(e,t,s,i){this.start=e,this.end=t,this.content=s,this.name=i,ct||(this.index=-1)}},ve=class extends Cs{constructor(e,t){super(),this._source=e,this._name=t,this._replacements=[],this._isSorted=!0}getName(){return this._name}getReplacements(){return this._sortReplacements(),this._replacements}replace(e,t,s,i){if(typeof s!="string")throw new Error("insertion must be a string, but is a "+typeof s);this._replacements.push(new oe(e,t,s,i)),this._isSorted=!1}insert(e,t,s){if(typeof t!="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new oe(e,e-1,t,s)),this._isSorted=!1}source(){if(this._replacements.length===0)return this._source.source();let e=this._source.source(),t=0,s=[];this._sortReplacements();for(let i of this._replacements){let r=Math.floor(i.start),f=Math.floor(i.end+1);if(t<r){let u=r-t;s.push(e.slice(0,u)),e=e.slice(u),t=r}if(s.push(i.content),t<f){let u=f-t;e=e.slice(u),t=f}}return s.push(e),s.join("")}map(e){return this._replacements.length===0?this._source.map(e):ys(this,e)}sourceAndMap(e){return this._replacements.length===0?this._source.sourceAndMap(e):ws(this,e)}original(){return this._source}_sortReplacements(){this._isSorted||(ct?this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:0}):(this._replacements.forEach((e,t)=>e.index=t),this._replacements.sort(function(e,t){let s=e.start-t.start;if(s!==0)return s;let i=e.end-t.end;return i!==0?i:e.index-t.index})),this._isSorted=!0)}streamChunks(e,t,s,i){this._sortReplacements();let r=this._replacements,f=0,u=0,h=-1,o=u<r.length?Math.floor(r[u].start):ft,a=0,l=0,d=0,m=[],c=new Map,_=[],g=(p,B,q,w)=>{let b=p<m.length?m[p]:void 0;if(b===void 0)return!1;typeof b=="string"&&(b=Be(b),m[p]=b);let T=B<=b.length?b[B-1]:null;return T===null?!1:T.slice(q,q+w.length)===w},{generatedLine:A,generatedColumn:O}=Ts(this._source,Object.assign({},e,{finalSource:!1}),(p,B,q,w,b,T,S)=>{let M=0,N=f+p.length;if(h>f){if(h>=N){let P=B+a;p.endsWith(`
9
+ `)?(a--,d===P&&(l+=q)):d===P?l-=p.length:(l=-p.length,d=P),f=N;return}M=h-f,g(w,b,T,p.slice(0,M))&&(T+=M),f+=M;let z=B+a;d===z?l-=M:(l=-M,d=z),q+=M}if(o<N)do{let z=B+a;if(o>f){let C=o-f,k=p.slice(M,M+C);t(k,z,q+(z===d?l:0),w,b,T,S<0||S>=_.length?-1:_[S]),q+=C,M+=C,f=o,g(w,b,T,k)&&(T+=k.length)}let{content:P,name:R}=r[u],L=Be(P),I=S;if(w>=0&&R){let C=c.get(R);C===void 0&&(C=c.size,c.set(R,C),i(C,R)),I=C}for(let C=0;C<L.length;C++){let k=L[C];t(k,z,q+(z===d?l:0),w,b,T,I),I=-1,C===L.length-1&&!k.endsWith(`
10
+ `)?d===z?l+=k.length:(l=k.length,d=z):(a++,z++,l=-q,d=z)}h=Math.max(h,Math.floor(r[u].end+1)),u++,o=u<r.length?Math.floor(r[u].start):ft;let H=p.length-N+h-M;if(H>0){if(h>=N){let k=B+a;p.endsWith(`
11
+ `)?(a--,d===k&&(l+=q)):d===k?l-=p.length-M:(l=M-p.length,d=k),f=N;return}let C=B+a;g(w,b,T,p.slice(M,M+H))&&(T+=H),M+=H,f+=H,d===C?l-=H:(l=-H,d=C),q+=H}}while(o<N);if(M<p.length){let z=M===0?p:p.slice(M),P=B+a;t(z,P,q+(P===d?l:0),w,b,T,S<0?-1:_[S])}f=N},(p,B,q)=>{for(;m.length<p;)m.push(void 0);m[p]=q,s(p,B,q)},(p,B)=>{let q=c.get(B);q===void 0&&(q=c.size,c.set(B,q),i(q,B)),_[p]=q}),y="";for(;u<r.length;u++)y+=r[u].content;let v=A+a,E=Be(y);for(let p=0;p<E.length;p++){let B=E[p];t(B,v,O+(v===d?l:0),-1,-1,-1,-1),p===E.length-1&&!B.endsWith(`
12
+ `)?d===v?l+=B.length:(l=B.length,d=v):(a++,v++,l=-O,d=v)}return{generatedLine:v,generatedColumn:O+(v===d?l:0)}}updateHash(e){this._sortReplacements(),e.update("ReplaceSource"),this._source.updateHash(e),e.update(this._name||"");for(let t of this._replacements)e.update(`${t.start}${t.end}${t.content}${t.name}`)}};ot.exports=ve});var dt=j((lr,ht)=>{"use strict";var zs=G(),Es=ie(),qs=Y(),{getMap:Ns,getSourceAndMap:js}=$(),at=/\n(?=.|\s)/g,be=class extends zs{constructor(e,t){super(),this._source=typeof t=="string"||Buffer.isBuffer(t)?new Es(t,!0):t,this._prefix=e}getPrefix(){return this._prefix}original(){return this._source}source(){let e=this._source.source(),t=this._prefix;return t+e.replace(at,`
13
+ `+t)}map(e){return Ns(this,e)}sourceAndMap(e){return js(this,e)}streamChunks(e,t,s,i){let r=this._prefix,f=r.length,u=!!(e&&e.columns===!1),{generatedLine:h,generatedColumn:o,source:a}=qs(this._source,e,(l,d,m,c,_,g,A)=>{m!==0?m+=f:l!==void 0?u||c<0?l=r+l:f>0&&(t(r,d,m,-1,-1,-1,-1),m+=f):u||(m+=f),t(l,d,m,c,_,g,A)},s,i);return{generatedLine:h,generatedColumn:o===0?0:f+o,source:a!==void 0?r+a.replace(at,`
14
+ `+r):void 0}}updateHash(e){e.update("PrefixSource"),this._source.updateHash(e),e.update(this._prefix)}};ht.exports=be});var _t=j((ar,pt)=>{"use strict";var xs=G(),Oe=class extends xs{constructor(e){super(),this._size=e}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(e){throw this._error()}updateHash(){throw this._error()}};pt.exports=Oe});var mt=j((hr,St)=>{"use strict";var gt=G(),ye=class n extends gt{static from(e){return e instanceof gt?e:new n(e)}constructor(e){super(),this._sourceLike=e}source(){return this._sourceLike.source()}buffer(){return typeof this._sourceLike.buffer=="function"?this._sourceLike.buffer():super.buffer()}size(){return typeof this._sourceLike.size=="function"?this._sourceLike.size():super.size()}map(e){return typeof this._sourceLike.map=="function"?this._sourceLike.map(e):super.map(e)}sourceAndMap(e){return typeof this._sourceLike.sourceAndMap=="function"?this._sourceLike.sourceAndMap(e):super.sourceAndMap(e)}updateHash(e){if(typeof this._sourceLike.updateHash=="function")return this._sourceLike.updateHash(e);if(typeof this._sourceLike.map=="function")throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method");e.update(this.buffer())}};St.exports=ye});var Mt=j(At=>{var V=(n,e)=>{let t;Object.defineProperty(At,n,{get:()=>(e!==void 0&&(t=e(),e=void 0),t),configurable:!0})};V("Source",()=>G());V("RawSource",()=>ie());V("OriginalSource",()=>Re());V("SourceMapSource",()=>Ye());V("CachedSource",()=>rt());V("ConcatSource",()=>ut());V("ReplaceSource",()=>lt());V("PrefixSource",()=>dt());V("SizeOnlySource",()=>_t());V("CompatSource",()=>mt())});var bt=jt(Mt(),1);import{basename as ks,join as Is}from"node:path";import{existsSync as Ds,readFileSync as Rs,writeFileSync as Ls}from"node:fs";import{createDevTools as Hs}from"../core/index.mjs";import{createDevToolsNodeSys as Ps}from"../node/index.mjs";import{createDevToolsServer as Ws}from"../server/index.mjs";var Bt="BuilderDevToolsPlugin",le=null;async function Gs(n){let e=await Ps({cwd:process.cwd()});e.debug("webpack setupDevTools init");let t=await Hs(e),s=await Ws({...t,getClientId:()=>"webpack-builder-dev-tools",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server");let i=["next.config.js","next.config.ts","next.config.mjs","webpack.config.js","webpack.config.ts"].map(r=>Is(e.getAppRootDir(),r));for(let r of i)if(Ds(r)){e.debug(`restart server: ${r}`),Ls(r,Rs(r)),await new Promise(f=>setTimeout(f,50));return}},enableAppWatch:async i=>i,...e,...n});return e.debug("webpack setupDevTools done"),{server:s,sys:e}}var vt=class{constructor(e){we(this,"opts");this.opts=e||{},typeof this.opts.enabled!="boolean"&&(this.opts.enabled=process.env.NODE_ENV!=="production"),this.opts.enabled&&le==null&&(le=Gs(this.opts))}apply(e){if(this.opts.enabled===!1)return;let t=e,s=t.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,i=new WeakMap;t.hooks.compilation.tap(Bt,r=>{r.hooks.processAssets.tapAsync({name:Bt,stage:s},async(f,u)=>{if(le!=null){for(let h of r.chunks)for(let o of h.files){let a=ks(o),{server:l,sys:d}=await le;if(d.getFrameworks().some(A=>A.name==="next")&&a!=="webpack.js")continue;d.getAppRootDir=()=>t.context;let m=new URL("/~builder-dev-tools.js",l.getUrl()),c=`
15
15
  ;
16
16
  /* Builder Devtools (Webpack) */
17
17
  `;c+=`(() => {
@@ -26,4 +26,4 @@ var yt=Object.create;var ye=Object.defineProperty;var wt=Object.getOwnPropertyDe
26
26
  `,c+=` }
27
27
  `,c+=` }
28
28
  `,c+=`})();
29
- `;let _={chunk:h,filename:o},g=r.getPath(c,_);r.updateAsset(o,A=>{let O=n.get(A);if(!O||O.inject!==g){let y=new vt.ConcatSource(A,g);return n.set(A,{source:y,inject:g}),y}return O.source})}u()}})})}};export{Bt as BuilderDevToolsPlugin};
29
+ `;let _={chunk:h,filename:o},g=r.getPath(c,_);r.updateAsset(o,A=>{let O=i.get(A);if(!O||O.inject!==g){let y=new bt.ConcatSource(A,g);return i.set(A,{source:y,inject:g}),y}return O.source})}u()}})})}};export{vt as BuilderDevToolsPlugin};