prettier-plugin-solidity
Version:
A Prettier Plugin for automatically formatting your Solidity code.
1 lines • 775 kB
JavaScript
var t,e,r,s,i,n={33:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{K:()=>h});var i=r(4675),n=r(801),a=r(1e3),o=r(6575),c=r(2399),l=t([i,n,o,c]);[i,n,o,c]=l.then?(await l)():l;class h{constructor(t,e){var r;this.kind=i.q3.UsingDirective;let s=(0,n.sQ)(t);this.clause=new o.g(t.clause),this.target=new c.A(t.target,e),this.globalKeyword=null===(r=t.globalKeyword)||void 0===r?void 0:r.unparse(),s=(0,n.D5)(s,[this.clause,this.target]),this.comments=s.comments,this.loc=s.loc}print(t,e){return[(0,a.I)(" ",["using",t.call(e,"clause"),"for",t.call(e,"target"),this.globalKeyword]),";"]}}s()}catch(t){s(t)}}))},86:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{j:()=>c});var i=r(4675),n=r(801),a=r(9979),o=t([i,n,a]);[i,n,a]=o.then?(await o)():o;class c{constructor(t,e){this.kind=i.q3.TypeExpression;let r=(0,n.sQ)(t);this.typeName=new a.C(t.typeName,e),r=(0,n.D5)(r,[this.typeName]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["type(",t.call(e,"typeName"),")"]}}s()}catch(t){s(t)}}))},91:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{Q:()=>c});var i=r(4675),n=r(801),a=r(6157),o=t([i,n,a]);[i,n,a]=o.then?(await o)():o;class c{constructor(t,e){this.kind=i.q3.ForStatementCondition;let r=(0,n.sQ)(t);this.variant=t.variant instanceof i.xo?t.variant.unparse():new a.Q(t.variant,e),r=(0,n.D5)(r,"string"==typeof this.variant?[]:[this.variant]),this.comments=r.comments,this.loc=r.loc}print(t,e){return"string"==typeof this.variant?this.variant:t.call(e,"variant")}}s()}catch(t){s(t)}}))},142:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{H:()=>u});var i=r(4675),n=r(1376),a=r(8926),o=r(4274),c=r(1634),l=r(7651),h=t([i,n,a,o,c,l]);function u(t){const e=new Set(t);return t=>{const r=t.variant;if(r.kind!==i.hP.Identifier&&(0,n.D)(r)&&e.has(r.operator)){const e=t.loc;return Object.assign(Object.create(a.r.prototype),{kind:i.q3.Expression,loc:Object.assign({},e),comments:[],variant:Object.assign(Object.create(o.b.prototype),{kind:i.q3.TupleExpression,loc:Object.assign({},e),comments:[],items:Object.assign(Object.create(c.X.prototype),{kind:i.q3.TupleValues,loc:Object.assign({},e),comments:[],items:[Object.assign(Object.create(l.E.prototype),{kind:i.q3.TupleValue,loc:Object.assign({},e),comments:[],expression:t})],separators:[]})})})}return t}}[i,n,a,o,c,l]=h.then?(await h)():h,s()}catch(d){s(d)}}))},144:(t,e,r)=>{const s=r(3908);t.exports=(t,e,r=!1)=>{if(t instanceof s)return t;try{return new s(t,e)}catch(t){if(!r)return null;throw t}}},170:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{p:()=>l});var i=r(4675),n=r(7578),a=r(801),o=r(4027),c=t([i,a,o]);[i,a,o]=c.then?(await c)():c;class l{constructor(t,e){this.kind=i.q3.EventParameters;let r=(0,a.sQ)(t,!0);this.items=t.items.map((t=>new o.Q(t,e))),this.separators=t.separators.map((t=>t.unparse())),r=(0,a.D5)(r,[this.items]),this.comments=r.comments,this.loc=r.loc}print(t,e){return this.items.length>0?(0,n.J)(t.map(e,"items")):""}}s()}catch(t){s(t)}}))},221:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{C:()=>u});var i=r(838),n=r(4675),a=r(3111),o=r(801),c=r(6222),l=t([n,a,o,c]);[n,a,o,c]=l.then?(await l)():l;const{line:h}=i.doc.builders;class u{constructor(t){this.kind=n.q3.FunctionTypeAttributes;let e=(0,o.sQ)(t,!0);this.items=t.items.map((t=>new c.l(t))),e=(0,o.D5)(e,[this.items]),this.comments=e.comments,this.loc=e.loc,this.items=this.items.sort(a.k)}print(t,e){return t.map(e,"items").map((t=>[h,t]))}}s()}catch(t){s(t)}}))},270:(t,e,r)=>{const s=r(3908),i=r(8311);t.exports=(t,e,r)=>{let n=null,a=null,o=null;try{o=new i(e,r)}catch(t){return null}return t.forEach((t=>{o.test(t)&&(n&&1!==a.compare(t)||(n=t,a=new s(n,r)))})),n}},304:(t,e,r)=>{r.d(e,{c:()=>l});var s=r(838),i=r(1e3);const{dedent:n,group:a,indent:o,line:c}=s.doc.builders;function l(t,e,r,s){return[a([t,r.call(s,"parameters"),o(a([(0,i.I)(c,[r.call(s,"attributes"),r.call(s,"returns")]),e.body&&";"!==e.body.variant?n(c):""]))]),r.call(s,"body")]}},305:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{o:()=>l});var i=r(4675),n=r(801),a=r(3198),o=r(2912),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t){this.kind=i.q3.MappingKeyType;let e=(0,n.sQ)(t);switch(t.variant.cst.kind){case i.q3.ElementaryType:this.variant=new a.$(t.variant);break;case i.q3.IdentifierPath:this.variant=new o.D(t.variant);break;default:throw new Error(`Unexpected variant: ${t.variant.cst.kind}`)}e=(0,n.D5)(e,[this.variant]),this.comments=e.comments,this.loc=e.loc}print(t,e){return t.call(e,"variant")}}s()}catch(t){s(t)}}))},316:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{j:()=>l});var i=r(4675),n=r(801),a=r(2291),o=r(8926),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t,e){this.kind=i.q3.NamedArgument;let r=(0,n.sQ)(t);this.name=new a.g(t.name),this.value=new o.r(t.value,e),r=(0,n.D5)(r,[this.value]),this.comments=r.comments,this.loc=r.loc}print(t,e){return[t.call(e,"name"),": ",t.call(e,"value")]}}s()}catch(t){s(t)}}))},450:(t,e,r)=>{t.exports=r.p+"d6da904aec8bb797eac6.wasm"},466:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{A:()=>h});var i=r(7540),n=r(9060),a=t([i]);function o({comments:t}){return null==t?void 0:t.some((t=>"prettier-ignore"===t.value.slice(2,(0,i.t)(t)?-2:void 0).trim()))}function c(t){const e=t.node;if(null===e||"object"!=typeof e)return;let r;for(r in e)switch(r){case"kind":case"loc":case"print":break;case"comments":t.each((t=>t.node.printed=!0),r);break;default:const s=e[r];if("object"==typeof s){if(Array.isArray(s))return void t.each(c,r);t.call(c,r)}}}function l(t,e,r){const s=t.node;return o(s)?(c(t),e.originalText.slice((0,n.z)(s),(0,n.I)(s))):s.print(t,r,e)}i=(a.then?(await a)():a)[0];const h=l;s()}catch(u){s(u)}}))},539:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{i:()=>h});var i=r(4675),n=r(801),a=r(1e3),o=r(1616),c=r(2291),l=t([i,n,o,c]);[i,n,o,c]=l.then?(await l)():l;class h{constructor(t){this.kind=i.q3.UntypedTupleMember;let e=(0,n.sQ)(t);t.storageLocation&&(this.storageLocation=new o.$(t.storageLocation)),this.name=new c.g(t.name),e=(0,n.D5)(e,[this.storageLocation]),this.comments=e.comments,this.loc=e.loc}print(t,e){return(0,a.I)(" ",[t.call(e,"storageLocation"),t.call(e,"name")])}}s()}catch(t){s(t)}}))},543:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{A:()=>l});var i=r(4675),n=r(838),a=t([i]);i=(a.then?(await a)():a)[0];const{addLeadingComment:o,addDanglingComment:c}=n.util;function l({precedingNode:t,enclosingNode:e,followingNode:r,comment:s}){return(null==e?void 0:e.kind)===i.q3.YulBlock&&((null==t?void 0:t.kind)===i.q3.YulStatements&&0===t.items.length?(c(t,s,!1),!0):(null==r?void 0:r.kind)===i.q3.YulStatements&&r.items.length>0&&(o(r.items[0],s),!0))}s()}catch(h){s(h)}}))},560:(t,e,r)=>{const s=r(3908);t.exports=(t,e,r)=>new s(t,r).compare(new s(e,r))},672:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{p:()=>u});var i=r(838),n=r(4675),a=r(801),o=r(5427),c=t([n,a,o]);[n,a,o]=c.then?(await c)():c;const{dedent:l,line:h}=i.doc.builders;class u{constructor(t){this.kind=n.q3.YulLabel;const e=(0,a.sQ)(t);this.label=new o.E(t.label),this.comments=e.comments,this.loc=e.loc}print(t,e){return[l(h),t.call(e,"label"),":"]}}s()}catch(t){s(t)}}))},694:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{P:()=>u});var i=r(838),n=r(4675),a=r(3111),o=r(801),c=r(4700),l=t([n,a,o,c]);[n,a,o,c]=l.then?(await l)():l;const{line:h}=i.doc.builders;class u{constructor(t,e){this.kind=n.q3.ReceiveFunctionAttributes;let r=(0,o.sQ)(t,!0);this.items=t.items.map((t=>new c.Y(t,e))),r=(0,o.D5)(r,[this.items]),this.comments=r.comments,this.loc=r.loc,this.items=this.items.sort(a.k)}print(t,e){return t.map(e,"items").map((t=>[h,t]))}}s()}catch(t){s(t)}}))},698:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{H:()=>y});var i=r(838),n=r(4675),a=r(8941),o=r(801),c=r(1e3),l=r(8926),h=r(7181),u=r(6511),d=r(7259),p=t([n,o,l,h,u,d]);[n,o,l,h,u,d]=p.then?(await p)():p;const{line:m}=i.doc.builders;class y{constructor(t,e){this.kind=n.q3.TryStatement;let r=(0,o.sQ)(t);this.expression=new l.r(t.expression,e),t.returns&&(this.returns=new h.I(t.returns,e)),this.body=new u.e(t.body,e),this.catchClauses=new d.m(t.catchClauses,e),r=(0,o.D5)(r,[this.expression,this.returns,this.body,this.catchClauses]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["try",(0,a.K)(t.call(e,"expression"),{firstSeparator:m}),(0,c.I)(" ",[t.call(e,"returns"),t.call(e,"body"),t.call(e,"catchClauses")])]}}s()}catch(t){s(t)}}))},717:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{i:()=>o});var i=r(4675),n=r(801),a=t([i,n]);[i,n]=a.then?(await a)():a;class o{constructor(t){this.kind=i.q3.SimpleVersionLiteral;const e=(0,n.sQ)(t,!0);this.items=t.items.map((t=>t.unparse())),this.separators=t.separators.map((t=>t.unparse())),this.comments=e.comments,this.loc=e.loc}print(){return this.items.map(((t,e)=>0===e?t:[this.separators[e-1],t]))}}s()}catch(t){s(t)}}))},769:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{A:()=>v});var i=r(2038),n=r(4597),a=r(3449),o=r(7265),c=r(8534),l=r(6318),h=r(6718),u=r(4923),d=r(2120),p=r(3273),m=r(4850),y=r(2416),f=r(5710),g=r(543),w=t([i,n,a,o,c,l,h,u,d,p,m,y,f,g]);[i,n,a,o,c,l,h,u,d,p,m,y,f,g]=w.then?(await w)():w;const v=[i.A,n.A,a.A,o.A,c.A,l.A,h.A,u.A,d.A,p.A,m.A,y.A,f.A,g.A];s()}catch(t){s(t)}}))},801:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{D5:()=>w,Ee:()=>m,sQ:()=>f});var i=r(4675),n=r(6563),a=r(7540),o=r(7088),c=r(7576),l=r(9441),h=r(4867),u=t([i,a,o,c,l,h]);[i,a,o,c,l,h]=u.then?(await u)():u;const d=(0,n.n)([i.hP.MultiLineComment,i.hP.MultiLineNatSpecComment,i.hP.SingleLineComment,i.hP.SingleLineNatSpecComment,i.hP.EndOfLine,i.hP.Whitespace]),p=new Map;function m(){p.clear()}function y(t){let e=0;for(const r of t){if(r.isNonterminalNode()||!d(r))return e;e+=r.textLength.utf16}return e}function f(t,e=!1){if(t instanceof i.xo){const e=p.get(t.id)||0;return{comments:[],loc:{start:e,end:e+t.textLength.utf16,leadingOffset:0,trailingOffset:0}}}const{cst:r}=t,s=r.children().map((({node:t})=>t)),n=p.get(r.id)||0;let u=n;const d=[];for(const t of s){const{id:e,kind:r,textLength:s}=t;if(t.isNonterminalNode())p.set(e,u);else switch((0,a.C)(t)&&p.set(e,u),r){case i.hP.MultiLineComment:d.push(new o.j(t));break;case i.hP.MultiLineNatSpecComment:d.push(new c.H(t));break;case i.hP.SingleLineComment:d.push(new l.a(t));break;case i.hP.SingleLineNatSpecComment:d.push(new h.c(t));break;case i.hP.Identifier:case i.hP.YulIdentifier:p.set(e,u)}u+=s.utf16}const[m,f]=e?[0,0]:[y(s),y(s.reverse())];return{comments:d,loc:{start:n+m,end:u-f,leadingOffset:m,trailingOffset:f}}}function g(t,e){if(e){if(Array.isArray(e))return e.reduce(g,t);e.comments.length>0&&t.push(...e.comments.splice(0))}return t}function w({comments:t,loc:e},r){if(t=r.reduce(g,t),0===e.leadingOffset)for(const t of r){if(void 0===t||Array.isArray(t))continue;const{leadingOffset:r,start:s}=t.loc;if(s-r===e.start){e.leadingOffset=r,e.start+=r;break}}if(0===e.trailingOffset)for(const t of r.reverse()){if(void 0===t||Array.isArray(t))continue;const{trailingOffset:r,end:s}=t.loc;if(s+r===e.end){e.trailingOffset=r,e.end-=r;break}}return{comments:t,loc:e}}s()}catch(v){s(v)}}))},826:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{x:()=>m});var i=r(838),n=r(4675),a=r(8941),o=r(801),c=r(8926),l=r(5211),h=t([n,o,c,l]);[n,o,c,l]=h.then?(await h)():h;const{group:u,indent:d,line:p}=i.doc.builders;class m{constructor(t,e){this.kind=n.q3.WhileStatement;let r=(0,o.sQ)(t);this.condition=new c.r(t.condition,e),this.body=new l.W(t.body,e),r=(0,o.D5)(r,[this.condition,this.body]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["while (",(0,a.K)(t.call(e,"condition")),")",this.body.variant.kind===n.q3.Block?[" ",t.call(e,"body")]:u(d([p,t.call(e,"body")]))]}}s()}catch(t){s(t)}}))},838:t=>{t.exports=Object("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this||{}).prettier},852:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{L:()=>l});var i=r(4675),n=r(801),a=r(8225),o=r(6336),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t){this.kind=i.q3.VersionExpression;let e=(0,n.sQ)(t);switch(t.variant.cst.kind){case i.q3.VersionRange:this.variant=new a.G(t.variant);break;case i.q3.VersionTerm:this.variant=new o.B(t.variant);break;default:throw new Error(`Unexpected variant: ${t.variant.cst.kind}`)}e=(0,n.D5)(e,[this.variant]),this.comments=e.comments,this.loc=e.loc}print(t,e){return t.call(e,"variant")}}s()}catch(t){s(t)}}))},876:(t,e,r)=>{r.d(e,{A:()=>a});var s=r(838);const{addDanglingComment:i,addTrailingComment:n}=s.util;function a(t,e){0===t.items.length?i(t,e,!1):n(t.items[t.items.length-1],e)}},897:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{e:()=>l});var i=r(4675),n=r(801),a=r(2291),o=r(1142),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t,e){this.kind=i.q3.ErrorDefinition;let r=(0,n.sQ)(t);this.name=new a.g(t.name),this.members=new o.$(t.members,e),r=(0,n.D5)(r,[this.members]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["error ",t.call(e,"name"),t.call(e,"members"),";"]}}s()}catch(t){s(t)}}))},900:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{N:()=>o});var i=r(4675),n=r(801),a=t([i,n]);[i,n]=a.then?(await a)():a;class o{constructor(t){this.kind=i.q3.YulContinueStatement;const e=(0,n.sQ)(t);this.comments=e.comments,this.loc=e.loc}print(){return"continue"}}s()}catch(t){s(t)}}))},909:(t,e,r)=>{const s=r(3908);t.exports=(t,e,r)=>{const i=new s(t,r),n=new s(e,r);return i.compare(n)||i.compareBuild(n)}},910:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{r:()=>d});var i=r(838),n=r(4675),a=r(8941),o=r(1041),c=r(801),l=r(4468),h=t([n,o,c,l]);[n,o,c,l]=h.then?(await h)():h;const{hardline:u}=i.doc.builders;class d{constructor(t,e){this.kind=n.q3.LibraryMembers;let r=(0,c.sQ)(t,!0);this.items=t.items.map((t=>new l.B(t,e))),r=(0,c.D5)(r,[this.items]),this.comments=r.comments,this.loc=r.loc}print(t,e,r){return this.items.length>0?(0,a.K)((0,o.V)(t,e,r),{firstSeparator:u,grouped:!1}):""}}s()}catch(t){s(t)}}))},918:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{z:()=>y});var i=r(4675),n=r(838),a=r(801),o=r(9979),c=r(3002),l=r(2291),h=r(4965),u=t([i,a,o,c,l,h]);[i,a,o,c,l,h]=u.then?(await u)():u;const{group:d,indent:p,indentIfBreak:m}=n.doc.builders;class y{constructor(t,e){this.kind=i.q3.StateVariableDefinition;let r=(0,a.sQ)(t);this.typeName=new o.C(t.typeName,e),this.attributes=new c.T(t.attributes),this.name=new l.g(t.name),t.value&&(this.value=new h.S(t.value,e)),r=(0,a.D5)(r,[this.typeName,this.attributes,this.value]),this.comments=r.comments,this.loc=r.loc}print(t,e){const r=Symbol("Slang.StateVariableDefinition.attributes");return[t.call(e,"typeName"),d(p(t.call(e,"attributes")),{id:r})," ",t.call(e,"name"),this.value?m(t.call(e,"value"),{groupId:r}):"",";"]}}s()}catch(t){s(t)}}))},979:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{q:()=>l});var i=r(4675),n=r(801),a=r(2386),o=r(3562),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t,e){this.kind=i.q3.ImportDeconstruction;let r=(0,n.sQ)(t);this.symbols=new a.z(t.symbols),this.path=new o.L(t.path,e),r=(0,n.D5)(r,[this.symbols,this.path]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["{",t.call(e,"symbols"),"} from ",t.call(e,"path")]}}s()}catch(t){s(t)}}))},983:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{e:()=>d});var i=r(838),n=r(4675),a=r(7578),o=r(801),c=r(4288),l=t([n,o,c]);[n,o,c]=l.then?(await l)():l;const{line:h,softline:u}=i.doc.builders;class d{constructor(t){this.kind=n.q3.UsingDeconstructionSymbols;let e=(0,o.sQ)(t,!0);this.items=t.items.map((t=>new c.B(t))),this.separators=t.separators.map((t=>t.unparse())),e=(0,o.D5)(e,[this.items]),this.comments=e.comments,this.loc=e.loc}print(t,e,r){return(0,a.J)(t.map(e,"items"),{firstSeparator:r.bracketSpacing?h:u})}}s()}catch(t){s(t)}}))},1e3:(t,e,r)=>{r.d(e,{I:()=>n});var s=r(838);const{join:i}=s.doc.builders;function n(t,e){return i(t,e.filter(Boolean))}},1041:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{V:()=>l});var i=r(4675),n=r(838),a=r(9060),o=t([i]);i=(o.then?(await o)():o)[0];const{hardline:c}=n.doc.builders;function l(t,e,r){return t.map((t=>{const s=t.node;return[t.isFirst||s.kind===i.q3.YulStatement&&s.variant.kind===i.q3.YulLabel?"":c,e(t),!t.isLast&&n.util.isNextLineEmpty(r.originalText,(0,a.I)(s))?c:""]}),"items")}s()}catch(h){s(h)}}))},1059:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{f:()=>u});var i=r(4675),n=r(838),a=r(1376),o=t([i,a]);[i,a]=o.then?(await o)():o;const{group:c,line:l}=n.doc.builders;function h(t,e,r,s){const n="end"===s.experimentalOperatorPosition?[` ${t.operator}`,l,e.call(r,"rightOperand")]:[l,`${t.operator} `,e.call(r,"rightOperand")],o=t.leftOperand.variant,h=e.grandparent;return o.kind!==i.hP.Identifier&&(0,a.D)(o)||(0,a.D)(h)&&h.kind!==i.q3.AssignmentExpression?n:c(n)}const u=(t,e)=>(r,s,i,n)=>{const a=t(s),o=e(s,n);return a([s.call(i,"leftOperand"),o(h(r,s,i,n))])};s()}catch(d){s(d)}}))},1073:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{K:()=>u});var i=r(838),n=r(4675),a=r(801),o=r(3562),c=t([n,a,o]);[n,a,o]=c.then?(await c)():c;const{join:l,hardline:h}=i.doc.builders;class u{constructor(t,e){this.kind=n.q3.StringLiterals;let r=(0,a.sQ)(t,!0);this.items=t.items.map((t=>new o.L(t,e))),r=(0,a.D5)(r,[this.items]),this.comments=r.comments,this.loc=r.loc}print(t,e){return l(h,t.map(e,"items"))}}s()}catch(t){s(t)}}))},1112:(t,e,r)=>{t.exports=r.p+"591f276013d241f7a687.wasm"},1123:t=>{const e=/^[0-9]+$/,r=(t,r)=>{const s=e.test(t),i=e.test(r);return s&&i&&(t=+t,r=+r),t===r?0:s&&!i?-1:i&&!s?1:t<r?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(t,e)=>r(e,t)}},1132:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{J:()=>d});var i=r(838),n=r(4675),a=r(801),o=r(2291),c=r(910),l=t([n,a,o,c]);[n,a,o,c]=l.then?(await l)():l;const{group:h,line:u}=i.doc.builders;class d{constructor(t,e){this.kind=n.q3.LibraryDefinition;let r=(0,a.sQ)(t);this.name=new o.g(t.name),this.members=new c.r(t.members,e),r=(0,a.D5)(r,[this.members]),this.comments=r.comments,this.loc=r.loc}print(t,e){return[h(["library ",t.call(e,"name"),u,"{"]),t.call(e,"members"),"}"]}}s()}catch(t){s(t)}}))},1142:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{$:()=>c});var i=r(4675),n=r(801),a=r(2048),o=t([i,n,a]);[i,n,a]=o.then?(await o)():o;class c{constructor(t,e){this.kind=i.q3.ErrorParametersDeclaration;let r=(0,n.sQ)(t);this.parameters=new a.h(t.parameters,e),r=(0,n.D5)(r,[this.parameters]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["(",t.call(e,"parameters"),")"]}}s()}catch(t){s(t)}}))},1204:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{z:()=>p});var i=r(4675),n=r(304),a=r(801),o=r(2291),c=r(9002),l=r(4716),h=r(4652),u=r(1580),d=t([i,a,o,c,l,h,u]);[i,a,o,c,l,h,u]=d.then?(await d)():d;class p{constructor(t,e){this.kind=i.q3.ModifierDefinition;let r=(0,a.sQ)(t);if(this.name=new o.g(t.name),t.parameters&&(this.parameters=new c.Z(t.parameters,e)),this.attributes=new h.r(t.attributes),this.body=new u.r(t.body,e),r=(0,a.D5)(r,[this.parameters,this.attributes,this.body]),this.comments=r.comments,this.loc=r.loc,!this.parameters){const t=this.attributes.loc.start-this.attributes.loc.leadingOffset,e={start:t,end:t,leadingOffset:0,trailingOffset:0};this.parameters=Object.assign(Object.create(c.Z.prototype),{kind:i.q3.ParametersDeclaration,loc:Object.assign({},e),comments:[],parameters:Object.assign(Object.create(l.H.prototype),{kind:i.q3.Parameters,loc:Object.assign({},e),comments:[],items:[],separators:[]})})}}print(t,e){return(0,n.c)(["modifier ",t.call(e,"name")],this,t,e)}}s()}catch(t){s(t)}}))},1261:(t,e,r)=>{const s=r(3908),i=r(8311),n=r(5580);t.exports=(t,e)=>{t=new i(t,e);let r=new s("0.0.0");if(t.test(r))return r;if(r=new s("0.0.0-0"),t.test(r))return r;r=null;for(let e=0;e<t.set.length;++e){const i=t.set[e];let a=null;i.forEach((t=>{const e=new s(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":a&&!n(e,a)||(a=e);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!a||r&&!n(r,a)||(r=a)}return r&&t.test(r)?r:null}},1292:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{D:()=>l});var i=r(4675),n=r(801),a=r(8152),o=r(6511),c=t([i,n,a,o]);[i,n,a,o]=c.then?(await c)():c;class l{constructor(t,e){this.kind=i.q3.CatchClause;let r=(0,n.sQ)(t);t.error&&(this.error=new a.$(t.error,e)),this.body=new o.e(t.body,e),r=(0,n.D5)(r,[this.error,this.body]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["catch ",t.call(e,"error"),t.call(e,"body")]}}s()}catch(t){s(t)}}))},1309:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{G:()=>c});var i=r(4675),n=r(1529),a=r(801),o=t([i,a]);[i,a]=o.then?(await o)():o;class c{constructor(t,e){this.kind=i.q3.UnicodeStringLiteral;const r=(0,a.sQ)(t);this.variant=t.variant.unparse(),this.comments=r.comments,this.loc=r.loc,this.variant=`unicode${(0,n.T)(this.variant.slice(8,-1),e)}`}print(){return this.variant}}s()}catch(t){s(t)}}))},1322:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{$:()=>p});var i=r(838),n=r(4675),a=r(8941),o=r(7134),c=r(1041),l=r(801),h=r(5211),u=t([n,o,c,l,h]);[n,o,c,l,h]=u.then?(await u)():u;const{hardline:d}=i.doc.builders;class p{constructor(t,e){this.kind=n.q3.Statements;let r=(0,l.sQ)(t,!0);this.items=t.items.map((t=>new h.W(t,e))),r=(0,l.D5)(r,[this.items]),this.comments=r.comments,this.loc=r.loc}print(t,e,r){return 0===this.items.length&&0===this.comments.length?"":(0,a.K)([(0,c.V)(t,e,r),(0,o.i)(t)],{firstSeparator:d,grouped:!1})}}s()}catch(t){s(t)}}))},1335:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{Q:()=>u});var i=r(838),n=r(4675),a=r(801),o=r(9838),c=r(9543),l=t([n,a,o,c]);[n,a,o,c]=l.then?(await l)():l;const{hardline:h}=i.doc.builders;class u{constructor(t,e){this.kind=n.q3.YulSwitchStatement;let r=(0,a.sQ)(t);this.expression=new o.h(t.expression,e),this.cases=new c.q(t.cases,e),r=(0,a.D5)(r,[this.expression,this.cases]),this.comments=r.comments,this.loc=r.loc}print(t,e){return["switch ",t.call(e,"expression"),h,t.call(e,"cases")]}}s()}catch(t){s(t)}}))},1376:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{D:()=>o});var i=r(4675),n=r(6563),a=t([i]);i=(a.then?(await a)():a)[0];const o=(0,n.n)([i.q3.AdditiveExpression,i.q3.MultiplicativeExpression,i.q3.ExponentiationExpression,i.q3.AssignmentExpression,i.q3.BitwiseAndExpression,i.q3.BitwiseOrExpression,i.q3.BitwiseXorExpression,i.q3.EqualityExpression,i.q3.InequalityExpression,i.q3.AndExpression,i.q3.OrExpression,i.q3.ShiftExpression]);s()}catch(t){s(t)}}))},1390:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{j:()=>l});var i=r(4675),n=r(801),a=r(1e3),o=r(6603),c=t([i,n,o]);[i,n,o]=c.then?(await c)():c;class l{constructor(t){this.kind=i.q3.DecimalNumberExpression;let e=(0,n.sQ)(t);this.literal=t.literal.unparse(),t.unit&&(this.unit=new o.c(t.unit)),e=(0,n.D5)(e,[this.unit]),this.comments=e.comments,this.loc=e.loc}print(t,e){return(0,a.I)(" ",[this.literal,t.call(e,"unit")])}}s()}catch(t){s(t)}}))},1406:(t,e,r)=>{r.a(t,(async(t,s)=>{try{r.d(e,{K3:()=>di,Rj:()=>hi,Wp:()=>pi,tQ:()=>ui});var i=r(8664),n=r(4863),a=r(9340),o=r(6015);const{getEnvironment:p}=i.cA,{exit:m}=i.NS,{getStderr:y}=i.vF,{getStdin:f}=i.bX,{getStdout:g}=i.Uo,{getDirectories:w}=n.jw,{Descriptor:v,filesystemErrorCode:x}=n.gK,{Error:b}=a.z3,{InputStream:_,OutputStream:E}=a.oS,{getRandomBytes:T}=o.yT;let S=[],k=new DataView(new ArrayBuffer);const R=t=>k.buffer===t.buffer?k:k=new DataView(t.buffer),A=()=>{},C="undefined"!=typeof process&&process.versions&&process.versions.node;let L;async function I(t){return C?(L=L||await Promise.resolve().then(r.bind(r,9031)),WebAssembly.compile(await L.readFile(t))):fetch(t).then(WebAssembly.compileStreaming)}function K(t){return"undefined"==typeof FinalizationRegistry?{unregister(){}}:new FinalizationRegistry(t)}function N(t){if(t&&O.call(t,"payload"))return t.payload;if(t instanceof Error)throw t;return t}const D=[],O=Object.prototype.hasOwnProperty,P=WebAssembly.instantiate,q=1<<30;function F(t,e){const r=t[0]&~q;return 0===r?(t.push(0),t.push(e|q),(t.length>>1)-1):(t[0]=t[r<<1],t[r<<1]=0,t[1+(r<<1)]=e|q,r)}function U(t,e){const r=t[e<<1],s=t[1+(e<<1)],i=!!(s&q),n=s&~q;if(0===s||r&q)throw new TypeError("Invalid handle");return t[e<<1]=t[0]|q,t[0]=e|q,{rep:n,scope:r,own:i}}const M=Symbol.for("cabiDispose"),Y=Symbol("handle"),V=Symbol.for("cabiRep"),j=Symbol.dispose||Symbol.for("dispose"),B=t=>BigInt.asUintN(64,BigInt(t));function H(t){return t>>>0}const $=new TextDecoder,Q=new TextEncoder;let G=0;function W(t,e,r){if("string"!=typeof t)throw new TypeError("expected a string");if(0===t.length)return G=0,1;let s=Q.encode(t),i=e(0,0,1,s.length);return new Uint8Array(r.buffer).set(s,i),G=s.length,i}const z=Symbol.for("nodejs.util.inspect.custom");let X,J;const Z=[q,0],tt=new Map;let et=0;function rt(){const t=y();if(!(t instanceof E))throw new TypeError('Resource error: Not a valid "OutputStream" resource.');var e=t[Y];if(!e){const r=t[V]||++et;tt.set(r,t),e=F(Z,r)}return e}D[1]=Z;const st=[q,0],it=new Map;let nt,at,ot,ct=0;function lt(){const t=f();if(!(t instanceof _))throw new TypeError('Resource error: Not a valid "InputStream" resource.');var e=t[Y];if(!e){const r=t[V]||++ct;it.set(r,t),e=F(st,r)}return e}function ht(){const t=g();if(!(t instanceof E))throw new TypeError('Resource error: Not a valid "OutputStream" resource.');var e=t[Y];if(!e){const r=t[V]||++et;tt.set(r,t),e=F(Z,r)}return e}function ut(t){let e;e=t?{tag:"err",val:void 0}:{tag:"ok",val:void 0},m(e)}function dt(t){var e=p(),r=e.length,s=ot(0,0,4,16*r);for(let t=0;t<e.length;t++){const r=e[t],h=s+16*t;var[i,n]=r,a=W(i,ot,at),o=G;R(at).setInt32(h+4,o,!0),R(at).setInt32(h+0,a,!0);var c=W(n,ot,at),l=G;R(at).setInt32(h+12,l,!0),R(at).setInt32(h+8,c,!0)}R(at).setInt32(t+4,r,!0),R(at).setInt32(t+0,s,!0)}D[2]=st;const pt=[q,0],mt=new Map;let yt=0;function ft(t,e,r){var s=t,i=pt[1+(s<<1)]&~q,n=mt.get(i);let a;n||(n=Object.create(v.prototype),Object.defineProperty(n,Y,{writable:!0,value:s}),Object.defineProperty(n,V,{writable:!0,value:i})),S.push(n);try{a={tag:"ok",val:n.writeViaStream(BigInt.asUintN(64,e))}}catch(t){a={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var o=a;switch(o.tag){case"ok":{const t=o.val;if(R(at).setInt8(r+0,0,!0),!(t instanceof E))throw new TypeError('Resource error: Not a valid "OutputStream" resource.');var c=t[Y];if(!c){const e=t[V]||++et;tt.set(e,t),c=F(Z,e)}R(at).setInt32(r+4,c,!0);break}case"err":{const t=o.val;R(at).setInt8(r+0,1,!0);var l=t;let e;switch(l){case"access":e=0;break;case"would-block":e=1;break;case"already":e=2;break;case"bad-descriptor":e=3;break;case"busy":e=4;break;case"deadlock":e=5;break;case"quota":e=6;break;case"exist":e=7;break;case"file-too-large":e=8;break;case"illegal-byte-sequence":e=9;break;case"in-progress":e=10;break;case"interrupted":e=11;break;case"invalid":e=12;break;case"io":e=13;break;case"is-directory":e=14;break;case"loop":e=15;break;case"too-many-links":e=16;break;case"message-size":e=17;break;case"name-too-long":e=18;break;case"no-device":e=19;break;case"no-entry":e=20;break;case"no-lock":e=21;break;case"insufficient-memory":e=22;break;case"insufficient-space":e=23;break;case"not-directory":e=24;break;case"not-empty":e=25;break;case"not-recoverable":e=26;break;case"unsupported":e=27;break;case"no-tty":e=28;break;case"no-such-device":e=29;break;case"overflow":e=30;break;case"not-permitted":e=31;break;case"pipe":e=32;break;case"read-only":e=33;break;case"invalid-seek":e=34;break;case"text-file-busy":e=35;break;case"cross-device":e=36;break;default:throw new TypeError(`"${l}" is not one of the cases of error-code`)}R(at).setInt8(r+4,e,!0);break}default:throw new TypeError("invalid variant specified for result")}}function gt(t,e){var r=t,s=pt[1+(r<<1)]&~q,i=mt.get(s);let n;i||(i=Object.create(v.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);try{n={tag:"ok",val:i.appendViaStream()}}catch(t){n={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var a=n;switch(a.tag){case"ok":{const t=a.val;if(R(at).setInt8(e+0,0,!0),!(t instanceof E))throw new TypeError('Resource error: Not a valid "OutputStream" resource.');var o=t[Y];if(!o){const e=t[V]||++et;tt.set(e,t),o=F(Z,e)}R(at).setInt32(e+4,o,!0);break}case"err":{const t=a.val;R(at).setInt8(e+0,1,!0);var c=t;let r;switch(c){case"access":r=0;break;case"would-block":r=1;break;case"already":r=2;break;case"bad-descriptor":r=3;break;case"busy":r=4;break;case"deadlock":r=5;break;case"quota":r=6;break;case"exist":r=7;break;case"file-too-large":r=8;break;case"illegal-byte-sequence":r=9;break;case"in-progress":r=10;break;case"interrupted":r=11;break;case"invalid":r=12;break;case"io":r=13;break;case"is-directory":r=14;break;case"loop":r=15;break;case"too-many-links":r=16;break;case"message-size":r=17;break;case"name-too-long":r=18;break;case"no-device":r=19;break;case"no-entry":r=20;break;case"no-lock":r=21;break;case"insufficient-memory":r=22;break;case"insufficient-space":r=23;break;case"not-directory":r=24;break;case"not-empty":r=25;break;case"not-recoverable":r=26;break;case"unsupported":r=27;break;case"no-tty":r=28;break;case"no-such-device":r=29;break;case"overflow":r=30;break;case"not-permitted":r=31;break;case"pipe":r=32;break;case"read-only":r=33;break;case"invalid-seek":r=34;break;case"text-file-busy":r=35;break;case"cross-device":r=36;break;default:throw new TypeError(`"${c}" is not one of the cases of error-code`)}R(at).setInt8(e+4,r,!0);break}default:throw new TypeError("invalid variant specified for result")}}function wt(t,e){var r=t,s=pt[1+(r<<1)]&~q,i=mt.get(s);let n;i||(i=Object.create(v.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);try{n={tag:"ok",val:i.getType()}}catch(t){n={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var a=n;switch(a.tag){case"ok":{const t=a.val;R(at).setInt8(e+0,0,!0);var o=t;let r;switch(o){case"unknown":r=0;break;case"block-device":r=1;break;case"character-device":r=2;break;case"directory":r=3;break;case"fifo":r=4;break;case"symbolic-link":r=5;break;case"regular-file":r=6;break;case"socket":r=7;break;default:throw new TypeError(`"${o}" is not one of the cases of descriptor-type`)}R(at).setInt8(e+1,r,!0);break}case"err":{const t=a.val;R(at).setInt8(e+0,1,!0);var c=t;let r;switch(c){case"access":r=0;break;case"would-block":r=1;break;case"already":r=2;break;case"bad-descriptor":r=3;break;case"busy":r=4;break;case"deadlock":r=5;break;case"quota":r=6;break;case"exist":r=7;break;case"file-too-large":r=8;break;case"illegal-byte-sequence":r=9;break;case"in-progress":r=10;break;case"interrupted":r=11;break;case"invalid":r=12;break;case"io":r=13;break;case"is-directory":r=14;break;case"loop":r=15;break;case"too-many-links":r=16;break;case"message-size":r=17;break;case"name-too-long":r=18;break;case"no-device":r=19;break;case"no-entry":r=20;break;case"no-lock":r=21;break;case"insufficient-memory":r=22;break;case"insufficient-space":r=23;break;case"not-directory":r=24;break;case"not-empty":r=25;break;case"not-recoverable":r=26;break;case"unsupported":r=27;break;case"no-tty":r=28;break;case"no-such-device":r=29;break;case"overflow":r=30;break;case"not-permitted":r=31;break;case"pipe":r=32;break;case"read-only":r=33;break;case"invalid-seek":r=34;break;case"text-file-busy":r=35;break;case"cross-device":r=36;break;default:throw new TypeError(`"${c}" is not one of the cases of error-code`)}R(at).setInt8(e+1,r,!0);break}default:throw new TypeError("invalid variant specified for result")}}function vt(t,e){var r=t,s=pt[1+(r<<1)]&~q,i=mt.get(s);let n;i||(i=Object.create(v.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);try{n={tag:"ok",val:i.stat()}}catch(t){n={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var a=n;switch(a.tag){case"ok":{const t=a.val;R(at).setInt8(e+0,0,!0);var{type:o,linkCount:c,size:l,dataAccessTimestamp:h,dataModificationTimestamp:u,statusChangeTimestamp:d}=t,p=o;let r;switch(p){case"unknown":r=0;break;case"block-device":r=1;break;case"character-device":r=2;break;case"directory":r=3;break;case"fifo":r=4;break;case"symbolic-link":r=5;break;case"regular-file":r=6;break;case"socket":r=7;break;default:throw new TypeError(`"${p}" is not one of the cases of descriptor-type`)}R(at).setInt8(e+8,r,!0),R(at).setBigInt64(e+16,B(c),!0),R(at).setBigInt64(e+24,B(l),!0);var m=h;if(null==m)R(at).setInt8(e+32,0,!0);else{const t=m;R(at).setInt8(e+32,1,!0);var{seconds:y,nanoseconds:f}=t;R(at).setBigInt64(e+40,B(y),!0),R(at).setInt32(e+48,H(f),!0)}var g=u;if(null==g)R(at).setInt8(e+56,0,!0);else{const t=g;R(at).setInt8(e+56,1,!0);var{seconds:w,nanoseconds:x}=t;R(at).setBigInt64(e+64,B(w),!0),R(at).setInt32(e+72,H(x),!0)}var b=d;if(null==b)R(at).setInt8(e+80,0,!0);else{const t=b;R(at).setInt8(e+80,1,!0);var{seconds:_,nanoseconds:E}=t;R(at).setBigInt64(e+88,B(_),!0),R(at).setInt32(e+96,H(E),!0)}break}case"err":{const t=a.val;R(at).setInt8(e+0,1,!0);var T=t;let r;switch(T){case"access":r=0;break;case"would-block":r=1;break;case"already":r=2;break;case"bad-descriptor":r=3;break;case"busy":r=4;break;case"deadlock":r=5;break;case"quota":r=6;break;case"exist":r=7;break;case"file-too-large":r=8;break;case"illegal-byte-sequence":r=9;break;case"in-progress":r=10;break;case"interrupted":r=11;break;case"invalid":r=12;break;case"io":r=13;break;case"is-directory":r=14;break;case"loop":r=15;break;case"too-many-links":r=16;break;case"message-size":r=17;break;case"name-too-long":r=18;break;case"no-device":r=19;break;case"no-entry":r=20;break;case"no-lock":r=21;break;case"insufficient-memory":r=22;break;case"insufficient-space":r=23;break;case"not-directory":r=24;break;case"not-empty":r=25;break;case"not-recoverable":r=26;break;case"unsupported":r=27;break;case"no-tty":r=28;break;case"no-such-device":r=29;break;case"overflow":r=30;break;case"not-permitted":r=31;break;case"pipe":r=32;break;case"read-only":r=33;break;case"invalid-seek":r=34;break;case"text-file-busy":r=35;break;case"cross-device":r=36;break;default:throw new TypeError(`"${T}" is not one of the cases of error-code`)}R(at).setInt8(e+8,r,!0);break}default:throw new TypeError("invalid variant specified for result")}}D[3]=pt;const xt=[q,0],bt=new Map;let _t,Et,Tt,St,kt,Rt,At,Ct,Lt,It,Kt,Nt,Dt,Ot,Pt,qt=0;function Ft(t,e){var r=t,s=xt[1+(r<<1)]&~q,i=bt.get(s);i||(i=Object.create(b.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);const n=x(i);for(const t of S)t[Y]=void 0;S=[];var a=n;if(null==a)R(at).setInt8(e+0,0,!0);else{const t=a;R(at).setInt8(e+0,1,!0);var o=t;let r;switch(o){case"access":r=0;break;case"would-block":r=1;break;case"already":r=2;break;case"bad-descriptor":r=3;break;case"busy":r=4;break;case"deadlock":r=5;break;case"quota":r=6;break;case"exist":r=7;break;case"file-too-large":r=8;break;case"illegal-byte-sequence":r=9;break;case"in-progress":r=10;break;case"interrupted":r=11;break;case"invalid":r=12;break;case"io":r=13;break;case"is-directory":r=14;break;case"loop":r=15;break;case"too-many-links":r=16;break;case"message-size":r=17;break;case"name-too-long":r=18;break;case"no-device":r=19;break;case"no-entry":r=20;break;case"no-lock":r=21;break;case"insufficient-memory":r=22;break;case"insufficient-space":r=23;break;case"not-directory":r=24;break;case"not-empty":r=25;break;case"not-recoverable":r=26;break;case"unsupported":r=27;break;case"no-tty":r=28;break;case"no-such-device":r=29;break;case"overflow":r=30;break;case"not-permitted":r=31;break;case"pipe":r=32;break;case"read-only":r=33;break;case"invalid-seek":r=34;break;case"text-file-busy":r=35;break;case"cross-device":r=36;break;default:throw new TypeError(`"${o}" is not one of the cases of error-code`)}R(at).setInt8(e+1,r,!0)}}function Ut(t,e){var r=t,s=Z[1+(r<<1)]&~q,i=tt.get(s);let n;i||(i=Object.create(E.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);try{n={tag:"ok",val:i.checkWrite()}}catch(t){n={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var a=n;switch(a.tag){case"ok":{const t=a.val;R(at).setInt8(e+0,0,!0),R(at).setBigInt64(e+8,B(t),!0);break}case"err":{const t=a.val;R(at).setInt8(e+0,1,!0);var o=t;switch(o.tag){case"last-operation-failed":{const t=o.val;if(R(at).setInt8(e+8,0,!0),!(t instanceof b))throw new TypeError('Resource error: Not a valid "Error" resource.');var c=t[Y];if(!c){const e=t[V]||++qt;bt.set(e,t),c=F(xt,e)}R(at).setInt32(e+12,c,!0);break}case"closed":R(at).setInt8(e+8,1,!0);break;default:throw new TypeError(`invalid variant tag value \`${JSON.stringify(o.tag)}\` (received \`${o}\`) specified for \`StreamError\``)}break}default:throw new TypeError("invalid variant specified for result")}}function Mt(t,e,r,s){var i=t,n=Z[1+(i<<1)]&~q,a=tt.get(n);a||(a=Object.create(E.prototype),Object.defineProperty(a,Y,{writable:!0,value:i}),Object.defineProperty(a,V,{writable:!0,value:n})),S.push(a);var o=e,c=r,l=new Uint8Array(at.buffer.slice(o,o+1*c));let h;try{h={tag:"ok",val:a.write(l)}}catch(t){h={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var u=h;switch(u.tag){case"ok":u.val,R(at).setInt8(s+0,0,!0);break;case"err":{const t=u.val;R(at).setInt8(s+0,1,!0);var d=t;switch(d.tag){case"last-operation-failed":{const t=d.val;if(R(at).setInt8(s+4,0,!0),!(t instanceof b))throw new TypeError('Resource error: Not a valid "Error" resource.');var p=t[Y];if(!p){const e=t[V]||++qt;bt.set(e,t),p=F(xt,e)}R(at).setInt32(s+8,p,!0);break}case"closed":R(at).setInt8(s+4,1,!0);break;default:throw new TypeError(`invalid variant tag value \`${JSON.stringify(d.tag)}\` (received \`${d}\`) specified for \`StreamError\``)}break}default:throw new TypeError("invalid variant specified for result")}}function Yt(t,e,r,s){var i=t,n=Z[1+(i<<1)]&~q,a=tt.get(n);a||(a=Object.create(E.prototype),Object.defineProperty(a,Y,{writable:!0,value:i}),Object.defineProperty(a,V,{writable:!0,value:n})),S.push(a);var o=e,c=r,l=new Uint8Array(at.buffer.slice(o,o+1*c));let h;try{h={tag:"ok",val:a.blockingWriteAndFlush(l)}}catch(t){h={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var u=h;switch(u.tag){case"ok":u.val,R(at).setInt8(s+0,0,!0);break;case"err":{const t=u.val;R(at).setInt8(s+0,1,!0);var d=t;switch(d.tag){case"last-operation-failed":{const t=d.val;if(R(at).setInt8(s+4,0,!0),!(t instanceof b))throw new TypeError('Resource error: Not a valid "Error" resource.');var p=t[Y];if(!p){const e=t[V]||++qt;bt.set(e,t),p=F(xt,e)}R(at).setInt32(s+8,p,!0);break}case"closed":R(at).setInt8(s+4,1,!0);break;default:throw new TypeError(`invalid variant tag value \`${JSON.stringify(d.tag)}\` (received \`${d}\`) specified for \`StreamError\``)}break}default:throw new TypeError("invalid variant specified for result")}}function Vt(t,e){var r=t,s=Z[1+(r<<1)]&~q,i=tt.get(s);let n;i||(i=Object.create(E.prototype),Object.defineProperty(i,Y,{writable:!0,value:r}),Object.defineProperty(i,V,{writable:!0,value:s})),S.push(i);try{n={tag:"ok",val:i.blockingFlush()}}catch(t){n={tag:"err",val:N(t)}}for(const t of S)t[Y]=void 0;S=[];var a=n;switch(a.tag){case"ok":a.val,R(at).setInt8(e+0,0,!0);break;case"err":{const t=a.val;R(at).setInt8(e+0,1,!0);var o=t;switch(o.tag){case"last-operation-failed":{const t=o.val;if(R(at).setInt8(e+4,0,!0),!(t instanceof b))throw new TypeError('Resource error: Not a valid "Error" resource.');var c=t[Y];if(!c){const e=t[V]||++qt;bt.set(e,t),c=F(xt,e)}R(at).setInt32(e+8,c,!0);break}case"closed":R(at).setInt8(e+4,1,!0);break;default:throw new TypeError(`invalid variant tag value \`${JSON.stringify(o.tag)}\` (received \`${o}\`) specified for \`StreamError\``)}break}default:throw new TypeError("invalid variant specified for result")}}function jt(t,e){var r=T(BigInt.asUintN(64,t)),s=r.byteLength,i=ot(0,0,1,1*s),n=new Uint8Array(r.buffer||r,r.byteOffset,1*s);new Uint8Array(at.buffer,i,1*s).set(n),R(at).setInt32(e+4,s,!0),R(at).setInt32(e+0,i,!0)}function Bt(t){var e=w(),r=e.length,s=ot(0,0,4,12*r);for(let t=0;t<e.length;t++){const r=e[t],l=s+12*t;var[i,n]=r;if(!(i instanceof v))throw new TypeError('Resource error: Not a valid "Descriptor" resource.');var a=i[Y];if(!a){const t=i[V]||++yt;mt.set(t,i),a=F(pt,t)}R(at).setInt32(l+0,a,!0);var o=W(n,ot,at),c=G;R(at).setInt32(l+8,c,!0),R(at).setInt32(l+4,o,!0)}R(at).setInt32(t+4,r,!0),R(at).setInt32(t+0,s,!0)}D[0]=xt;class Ht{constructor(){throw new Error('"TerminalKindExtensions" resource does not define a constructor')}}Ht.isIdentifier=function(t){return!!Dt(l[t])},Ht.isTrivia=function(t){return!!Ot(l[t])},Ht.isValid=function(t){return!!Pt(l[t])};const $t=[q,0],Qt=K((t=>{const{rep:e}=U($t,t);X[18](e)}));let Gt,Wt,zt;D[4]=$t;class Xt{constructor(){throw new Error('"NonterminalNode" resource does not define a constructor')}}Xt.prototype[z]=function(t,e,r){const s=Object.getPrototypeOf(this)[z];try{return delete Object.getPrototypeOf(this)[z],r(this,{...e,depth:t,getters:!0,showHidden:!0})}finally{Object.getPrototypeOf(this)[z]=s}},Object.defineProperty(Xt.prototype,"id",{get:function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;return Gt(e)>>>0}}),Object.defineProperty(Xt.prototype,"kind",{get:function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;const r=Wt(e);return c[r]}}),Object.defineProperty(Xt.prototype,"textLength",{get:function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;const r=zt(e);return{utf8:R(at).getInt32(r+0,!0)>>>0,utf16:R(at).getInt32(r+4,!0)>>>0,line:R(at).getInt32(r+8,!0)>>>0,column:R(at).getInt32(r+12,!0)>>>0}}});const Jt=[q,0],Zt=K((t=>{const{rep:e}=U(Jt,t);X[19](e)}));let te;D[5]=Jt,Xt.prototype.children=function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;const r=te(e);var s=R(at).getInt32(r+4,!0),i=R(at).getInt32(r+0,!0),n=[];for(let t=0;t<s;t++){const e=i+12*t;let r;switch(R(at).getUint8(e+4,!0)){case 0:var a=R(at).getInt32(e+8,!0),o=new.target===Xt?this:Object.create(Xt.prototype);Object.defineProperty(o,Y,{writable:!0,value:a}),Qt.register(o,a,o),Object.defineProperty(o,j,{writable:!0,value:function(){Qt.unregister(o),U($t,a),o[j]=A,o[Y]=void 0,X[18]($t[1+(a<<1)]&~q)}}),r=o;break;case 1:var c=R(at).getInt32(e+8,!0),l=new.target===Ce?this:Object.create(Ce.prototype);Object.defineProperty(l,Y,{writable:!0,value:c}),Zt.register(l,c,l),Object.defineProperty(l,j,{writable:!0,value:function(){Zt.unregister(l),U(Jt,c),l[j]=A,l[Y]=void 0,X[19](Jt[1+(c<<1)]&~q)}}),r=l}n.push({label:h[R(at).getUint8(e+0,!0)],node:r})}const u=n;return Et(r),u};const ee=[q,0],re=K((t=>{const{rep:e}=U(ee,t);X[21](e)}));let se,ie,ne;D[7]=ee,Xt.prototype.descendants=function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q,r=se(e),s=new.target===ir?this:Object.create(ir.prototype);return Object.defineProperty(s,Y,{writable:!0,value:r}),re.register(s,r,s),Object.defineProperty(s,j,{writable:!0,value:function(){re.unregister(s),U(ee,r),s[j]=A,s[Y]=void 0,X[21](ee[1+(r<<1)]&~q)}}),s},Xt.prototype.unparse=function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;const r=ie(e);var s=R(at).getInt32(r+0,!0),i=R(at).getInt32(r+4,!0);const n=$.decode(new Uint8Array(at.buffer,s,i));return Tt(r),n},Xt.prototype.toJson=function(){var t=this[Y];if(!(t&&$t[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var e=$t[1+(t<<1)]&~q;const r=ne(e);var s=R(at).getInt32(r+0,!0),i=R(at).getInt32(r+4,!0);const n=$.decode(new Uint8Array(at.buffer,s,i));return Tt(r),n};const ae=[q,0],oe=K((t=>{const{rep:e}=U(ae,t);X[20](e)}));let ce,le,he,ue,de,pe,me,ye,fe,ge,we,ve,xe,be,_e,Ee,Te,Se,ke,Re,Ae;D[6]=ae,Xt.prototype.createCursor=function(t){var e=this[Y];if(!(e&&$t[1+(e<<1)]&q))throw new TypeError('Resource error: Not a valid "NonterminalNode" resource.');var r=$t[1+(e<<1)]&~q,{utf8:s,utf16:i,line:n,column:a}=t,o=ce(r,H(s),H(i),H(n),H(a)),c=new.target===Le?this:Object.create(Le.prototype);return Object.defineProperty(c,Y,{writable:!0,value:o}),oe.register(c,o,c),Object.defineProperty(c,j,{writable:!0,value:function(){oe.unregister(c),U(ae,o),c[j]=A,c[Y]=void 0,X[20](ae[1+(o<<1)]&~q)}}),c};class Ce{constructor(){throw new Error('"TerminalNode" resource does not define a constructor')}}Ce.prototype[z]=function(t,e,r){const s=Object.getPrototypeOf(this)[z];try{return delete Object.getPrototypeOf(this)[z],r(this,{...e,depth:t,getters:!0,showHidden:!0})}finally{Object.getPrototypeOf(this)[z]=s}},Object.defineProperty(Ce.prototype,"id",{get:function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;return le(e)>>>0}}),Object.defineProperty(Ce.prototype,"kind",{get:function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;const r=he(e);return l[r]}}),Object.defineProperty(Ce.prototype,"textLength",{get:function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;const r=ue(e);return{utf8:R(at).getInt32(r+0,!0)>>>0,utf16:R(at).getInt32(r+4,!0)>>>0,line:R(at).getInt32(r+8,!0)>>>0,column:R(at).getInt32(r+12,!0)>>>0}}}),Ce.prototype.children=function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;const r=de(e);var s=R(at).getInt32(r+4,!0),i=R(at).getInt32(r+0,!0),n=[];for(let t=0;t<s;t++){const e=i+12*t;let r;switch(R(at).getUint8(e+4,!0)){case 0:var a=R(at).getInt32(e+8,!0),o=new.target===Xt?this:Object.create(Xt.prototype);Object.defineProperty(o,Y,{writable:!0,value:a}),Qt.register(o,a,o),Object.defineProperty(o,j,{writable:!0,value:function(){Qt.unregister(o),U($t,a),o[j]=A,o[Y]=void 0,X[18]($t[1+(a<<1)]&~q)}}),r=o;break;case 1:var c=R(at).getInt32(e+8,!0),l=new.target===Ce?this:Object.create(Ce.prototype);Object.defineProperty(l,Y,{writable:!0,value:c}),Zt.register(l,c,l),Object.defineProperty(l,j,{writable:!0,value:function(){Zt.unregister(l),U(Jt,c),l[j]=A,l[Y]=void 0,X[19](Jt[1+(c<<1)]&~q)}}),r=l}n.push({label:h[R(at).getUint8(e+0,!0)],node:r})}const u=n;return Et(r),u},Ce.prototype.descendants=function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q,r=pe(e),s=new.target===ir?this:Object.create(ir.prototype);return Object.defineProperty(s,Y,{writable:!0,value:r}),re.register(s,r,s),Object.defineProperty(s,j,{writable:!0,value:function(){re.unregister(s),U(ee,r),s[j]=A,s[Y]=void 0,X[21](ee[1+(r<<1)]&~q)}}),s},Ce.prototype.unparse=function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;const r=me(e);var s=R(at).getInt32(r+0,!0),i=R(at).getInt32(r+4,!0);const n=$.decode(new Uint8Array(at.buffer,s,i));return Tt(r),n},Ce.prototype.toJson=function(){var t=this[Y];if(!(t&&Jt[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "TerminalNode" resource.');var e=Jt[1+(t<<1)]&~q;const r=ye(e);var s=R(at).getInt32(r+0,!0),i=R(at).getInt32(r+4,!0);const n=$.decode(new Uint8Array(at.buffer,s,i));return Tt(r),n};class Le{constructor(){throw new Error('"Cursor" resource does not define a constructor')}}Le.prototype.reset=function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q;fe(e)},Le.prototype.complete=function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q;ge(e)},Le.prototype.isCompleted=function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q;return!!we(e)},Le.prototype.clone=function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q,r=ve(e),s=new.target===Le?this:Object.create(Le.prototype);return Object.defineProperty(s,Y,{writable:!0,value:r}),oe.register(s,r,s),Object.defineProperty(s,j,{writable:!0,value:function(){oe.unregister(s),U(ae,r),s[j]=A,s[Y]=void 0,X[20](ae[1+(r<<1)]&~q)}}),s},Le.prototype.spawn=function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q,r=xe(e),s=new.target===Le?this:Object.create(Le.prototype);return Object.defineProperty(s,Y,{writable:!0,value:r}),oe.register(s,r,s),Object.defineProperty(s,j,{writable:!0,value:function(){oe.unregister(s),U(ae,r),s[j]=A,s[Y]=void 0,X[20](ae[1+(r<<1)]&~q)}}),s},Object.defineProperty(Le.prototype,"node",{get:function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q;const r=be(e);let s;switch(R(at).getUint8(r+0,!0)){case 0:var i=R(at).getInt32(r+4,!0),n=new.target===Xt?this:Object.create(Xt.prototype);Object.defineProperty(n,Y,{writable:!0,value:i}),Qt.register(n,i,n),Object.defineProperty(n,j,{writable:!0,value:function(){Qt.unregister(n),U($t,i),n[j]=A,n[Y]=void 0,X[18]($t[1+(i<<1)]&~q)}}),s=n;break;case 1:var a=R(at).getInt32(r+4,!0),o=new.target===Ce?this:Object.create(Ce.prototype);Object.defineProperty(o,Y,{writable:!0,value:a}),Zt.register(o,a,o),Object.defineProperty(o,j,{writable:!0,value:function(){Zt.unregister(o),U(Jt,a),o[j]=A,o[Y]=void 0,X[19](Jt[1+(a<<1)]&~q)}}),s=o}return s}}),Object.defineProperty(Le.prototype,"label",{get:function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))throw new TypeError('Resource error: Not a valid "Cursor" resource.');var e=ae[1+(t<<1)]&~q;const r=_e(e);return h[r]}}),Object.defineProperty(Le.prototype,"textOffset",{get:function(){var t=this[Y];if(!(t&&ae[1+(t<<1)]&q))thr