webhook-action/node_modules/prettier/parser-meriyah.js

19 lines
158 KiB
JavaScript
Raw Normal View History

2022-11-10 10:43:16 +00:00
(function(e){if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};i.prettierPlugins=i.prettierPlugins||{},i.prettierPlugins.meriyah=e()}})(function(){"use strict";var F=(d,m)=>()=>(m||d((m={exports:{}}).exports,m),m.exports);var i2=F((E3,Ce)=>{var A1=function(d){return d&&d.Math==Math&&d};Ce.exports=A1(typeof globalThis=="object"&&globalThis)||A1(typeof window=="object"&&window)||A1(typeof self=="object"&&self)||A1(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var L2=F((D3,we)=>{we.exports=function(d){try{return!!d()}catch{return!0}}});var J2=F((C3,qe)=>{var Ut=L2();qe.exports=!Ut(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var x1=F((w3,Be)=>{var Jt=L2();Be.exports=!Jt(function(){var d=function(){}.bind();return typeof d!="function"||d.hasOwnProperty("prototype")})});var P1=F((q3,Se)=>{var Xt=x1(),y1=Function.prototype.call;Se.exports=Xt?y1.bind(y1):function(){return y1.apply(y1,arguments)}});var Oe=F(Le=>{"use strict";var Fe={}.propertyIsEnumerable,Te=Object.getOwnPropertyDescriptor,zt=Te&&!Fe.call({1:2},1);Le.f=zt?function(m){var k=Te(this,m);return!!k&&k.enumerable}:Fe});var p1=F((S3,Ie)=>{Ie.exports=function(d,m){return{enumerable:!(d&1),configurable:!(d&2),writable:!(d&4),value:m}}});var D2=F((F3,Ve)=>{var Re=x1(),Ne=Function.prototype,Ht=Ne.bind,uu=Ne.call,Kt=Re&&Ht.bind(uu,uu);Ve.exports=Re?function(d){return d&&Kt(d)}:function(d){return d&&function(){return uu.apply(d,arguments)}}});var Me=F((T3,_e)=>{var je=D2(),Wt=je({}.toString),Yt=je("".slice);_e.exports=function(d){return Yt(Wt(d),8,-1)}});var Je=F((L3,Ue)=>{var $t=i2(),Zt=D2(),Qt=L2(),Gt=Me(),eu=$t.Object,xt=Zt("".split);Ue.exports=Qt(function(){return!eu("z").propertyIsEnumerable(0)})?function(d){return Gt(d)=="String"?xt(d,""):eu(d)}:eu});var iu=F((O3,Xe)=>{var pt=i2(),uo=pt.TypeError;Xe.exports=function(d){if(d==null)throw uo("Can't call method on "+d);return d}});var E1=F((I3,ze)=>{var eo=Je(),io=iu();ze.exports=function(d){return eo(io(d))}});var C2=F((R3,He)=>{He.exports=function(d){return typeof d=="function"}});var Z2=F((N3,Ke)=>{var no=C2();Ke.exports=function(d){return typeof d=="object"?d!==null:no(d)}});var D1=F((V3,We)=>{var nu=i2(),to=C2(),oo=function(d){return to(d)?d:void 0};We.exports=function(d,m){return arguments.length<2?oo(nu[d]):nu[d]&&nu[d][m]}});var $e=F((j3,Ye)=>{var lo=D2();Ye.exports=lo({}.isPrototypeOf)});var Qe=F((_3,Ze)=>{var fo=D1();Ze.exports=fo("navigator","userAgent")||""});var ni=F((M3,ii)=>{var ei=i2(),tu=Qe(),Ge=ei.process,xe=ei.Deno,pe=Ge&&Ge.versions||xe&&xe.version,ui=pe&&pe.v8,P2,C1;ui&&(P2=ui.split("."),C1=P2[0]>0&&P2[0]<4?1:+(P2[0]+P2[1]));!C1&&tu&&(P2=tu.match(/Edge\/(\d+)/),(!P2||P2[1]>=74)&&(P2=tu.match(/Chrome\/(\d+)/),P2&&(C1=+P2[1])));ii.exports=C1});var ou=F((U3,oi)=>{var ti=ni(),co=L2();oi.exports=!!Object.getOwnPropertySymbols&&!co(function(){var d=Symbol();return!String(d)||!(Object(d)instanceof Symbol)||!Symbol.sham&&ti&&ti<41})});var lu=F((J3,li)=>{var so=ou();li.exports=so&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var fu=F((X3,fi)=>{var ao=i2(),go=D1(),ho=C2(),mo=$e(),bo=lu(),ko=ao.Object;fi.exports=bo?function(d){return typeof d=="symbol"}:function(d){var m=go("Symbol");return ho(m)&&mo(m.prototype,ko(d))}});var si=F((z3,ci)=>{var ro=i2(),vo=ro.String;ci.exports=function(d){try{return vo(d)}catch{return"Object"}}});var di=F((H3,ai)=>{var Ao=i2(),yo=C2(),Po=si(),Eo=Ao.TypeError;ai.exports=function(d){if(yo(d))return d;throw Eo(Po(d)+" is not a function")}});var hi=F((K3,gi)=>{var Do=di();gi.exports=function(d,m){var k=d[m];return k==null?void 0:Do(k)}});var bi=F((W3,mi)=>{var Co=i2(),cu=P1(),su=C2(),au=Z2(),wo=Co.TypeError;mi.exports=function(d,m){var k,f;if(m==="string"&&su(k=d.toString)&&!au(f=cu(k,d))||su(k=d.valueOf)&&!au(f=cu(k,d))||m!=="string"&&su(k=d.toString)&&!au(f=cu(k,d)))return f;throw wo("Can't convert object to primitive value"
`,g0={EOL:_u,tmpdir:ju,tmpDir:Vu,networkInterfaces:a0,getNetworkInterfaces:d0,release:s0,type:c0,cpus:f0,totalmem:l0,freemem:o0,uptime:t0,loadavg:n0,hostname:i0,endianness:e0}}}),x4=l2({"node-modules-polyfills-commonjs:os"(d,m){n2();var k=(G4(),Y4(u0));if(k&&k.default){m.exports=k.default;for(let f in k)m.exports[f]=k[f]}else k&&(m.exports=k)}}),p4=l2({"node_modules/detect-newline/index.js"(d,m){"use strict";n2();var k=f=>{if(typeof f!="string")throw new TypeError("Expected a string");let P=f.match(/(?:\r?\n)/g)||[];if(P.length===0)return;let S=P.filter(T=>T===`\r
`).length,q=P.length-S;return S>q?`\r
`:`
`};m.exports=k,m.exports.graceful=f=>typeof f=="string"&&k(f)||`
`}}),u3=l2({"node_modules/jest-docblock/build/index.js"(d){"use strict";n2(),Object.defineProperty(d,"__esModule",{value:!0}),d.extract=Z,d.parse=t2,d.parseWithComments=V,d.print=J,d.strip=L;function m(){let I=x4();return m=function(){return I},I}function k(){let I=f(p4());return k=function(){return I},I}function f(I){return I&&I.__esModule?I:{default:I}}var P=/\*\/$/,S=/^\/\*\*/,q=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,T=/(^|\s+)\/\/([^\r\n]*)/g,r=/^(\r?\n)+/,K=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Y=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,X=/(\r?\n|^) *\* ?/g,p=[];function Z(I){let u2=I.match(q);return u2?u2[0].trimLeft():""}function L(I){let u2=I.match(q);return u2&&u2[0]?I.substring(u2[0].length):I}function t2(I){return V(I).pragmas}function V(I){let u2=(0,k().default)(I)||m().EOL;I=I.replace(S,"").replace(P,"").replace(X,"$1");let m2="";for(;m2!==I;)m2=I,I=I.replace(K,"".concat(u2,"$1 $2").concat(u2));I=I.replace(r,"").trimRight();let c2=Object.create(null),R2=I.replace(Y,"").replace(r,"").trimRight(),s2;for(;s2=Y.exec(I);){let N2=s2[2].replace(T,"");typeof c2[s2[1]]=="string"||Array.isArray(c2[s2[1]])?c2[s2[1]]=p.concat(c2[s2[1]],N2):c2[s2[1]]=N2}return{comments:R2,pragmas:c2}}function J(I){let{comments:u2="",pragmas:m2={}}=I,c2=(0,k().default)(u2)||m().EOL,R2="/**",s2=" *",N2=" */",w2=Object.keys(m2),O1=w2.map(g2=>H(g2,m2[g2])).reduce((g2,n1)=>g2.concat(n1),[]).map(g2=>s2+" "+g2+c2).join("");if(!u2){if(w2.length===0)return"";if(w2.length===1&&!Array.isArray(m2[w2[0]])){let g2=m2[w2[0]];return"".concat(R2," ").concat(H(w2[0],g2)[0]).concat(N2)}}let I1=u2.split(c2).map(g2=>"".concat(s2," ").concat(g2)).join(c2)+c2;return R2+c2+(u2?I1:"")+(u2&&w2.length?s2+c2:"")+O1+N2}function H(I,u2){return p.concat(u2).map(m2=>"@".concat(I," ").concat(m2).trim())}}}),e3=l2({"src/common/end-of-line.js"(d,m){"use strict";n2();function k(q){let T=q.indexOf("\r");return T>=0?q.charAt(T+1)===`
`?"crlf":"cr":"lf"}function f(q){switch(q){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function P(q,T){let r;switch(T){case`
`:r=/\n/g;break;case"\r":r=/\r/g;break;case`\r
`:r=/\r\n/g;break;default:throw new Error('Unexpected "eol" '.concat(JSON.stringify(T),"."))}let K=q.match(r);return K?K.length:0}function S(q){return q.replace(/\r\n?/g,`
`)}m.exports={guessEndOfLine:k,convertEndOfLineToChars:f,countEndOfLineChars:P,normalizeEndOfLine:S}}}),i3=l2({"src/language-js/utils/get-shebang.js"(d,m){"use strict";n2();function k(f){if(!f.startsWith("#!"))return"";let P=f.indexOf(`
`);return P===-1?f:f.slice(0,P)}m.exports=k}}),n3=l2({"src/language-js/pragma.js"(d,m){"use strict";n2();var{parseWithComments:k,strip:f,extract:P,print:S}=u3(),{normalizeEndOfLine:q}=e3(),T=i3();function r(X){let p=T(X);p&&(X=X.slice(p.length+1));let Z=P(X),{pragmas:L,comments:t2}=k(Z);return{shebang:p,text:X,pragmas:L,comments:t2}}function K(X){let p=Object.keys(r(X).pragmas);return p.includes("prettier")||p.includes("format")}function Y(X){let{shebang:p,text:Z,pragmas:L,comments:t2}=r(X),V=f(Z),J=S({pragmas:Object.assign({format:""},L),comments:t2.trimStart()});return(p?"".concat(p,`
`):"")+q(J)+(V.startsWith(`
`)?`
`:`
`)+V}m.exports={hasPragma:K,insertPragma:Y}}}),t3=l2({"src/utils/is-non-empty-array.js"(d,m){"use strict";n2();function k(f){return Array.isArray(f)&&f.length>0}m.exports=k}}),h0=l2({"src/language-js/loc.js"(d,m){"use strict";n2();var k=t3();function f(r,K){let{ignoreDecorators:Y}=K||{};if(!Y){let X=r.declaration&&r.declaration.decorators||r.decorators;if(k(X))return f(X[0])}return r.range?r.range[0]:r.start}function P(r){return r.range?r.range[1]:r.end}function S(r,K){let Y=f(r);return Number.isInteger(Y)&&Y===f(K)}function q(r,K){let Y=P(r);return Number.isInteger(Y)&&Y===P(K)}function T(r,K){return S(r,K)&&q(r,K)}m.exports={locStart:f,locEnd:P,hasSameLocStart:S,hasSameLoc:T}}}),o3=l2({"src/language-js/parse/utils/create-parser.js"(d,m){"use strict";n2();var{hasPragma:k}=n3(),{locStart:f,locEnd:P}=h0();function S(q){return q=typeof q=="function"?{parse:q}:q,Object.assign({astFormat:"estree",hasPragma:k,locStart:f,locEnd:P},q)}m.exports=S}}),l3=l2({"src/language-js/utils/is-ts-keyword-type.js"(d,m){"use strict";n2();function k(f){let{type:P}=f;return P.startsWith("TS")&&P.endsWith("Keyword")}m.exports=k}}),f3=l2({"src/language-js/utils/is-block-comment.js"(d,m){"use strict";n2();var k=new Set(["Block","CommentBlock","MultiLine"]),f=P=>k.has(P==null?void 0:P.type);m.exports=f}}),c3=l2({"src/language-js/utils/is-type-cast-comment.js"(d,m){"use strict";n2();var k=f3();function f(P){return k(P)&&P.value[0]==="*"&&/@type\b/.test(P.value)}m.exports=f}}),s3=l2({"src/utils/get-last.js"(d,m){"use strict";n2();var k=f=>f[f.length-1];m.exports=k}}),m0=l2({"src/language-js/parse/postprocess/visit-node.js"(d,m){"use strict";n2();function k(f,P){if(Array.isArray(f)){for(let S=0;S<f.length;S++)f[S]=k(f[S],P);return f}if(f&&typeof f=="object"&&typeof f.type=="string"){let S=Object.keys(f);for(let q=0;q<S.length;q++)f[S[q]]=k(f[S[q]],P);return P(f)||f}return f}m.exports=k}}),b0=l2({"src/language-js/parse/postprocess/throw-syntax-error.js"(d,m){"use strict";n2();var k=pn();function f(P,S){let{start:q,end:T}=P.loc;throw k(S,{start:{line:q.line,column:q.column+1},end:{line:T.line,column:T.column+1}})}m.exports=f}}),a3=l2({"src/language-js/parse/postprocess/typescript.js"(d,m){"use strict";n2();var k=m0(),f=b0();function P(T,r,K){let Y=T.decorators;if(!Array.isArray(Y))return;let X=r.decorators;(!Array.isArray(X)||X.length!==Y.length||Y.some(p=>{let Z=K.get(p);return!Z||!X.includes(Z)}))&&f(r,"Leading decorators must be attached to a class declaration")}function S(T,r){T.kind!==167||T.modifiers&&!T.modifiers.some(X=>X.kind===126)||T.initializer&&r.value===null&&f(r,"Abstract property cannot have an initializer")}function q(T,r){let{esTreeNodeToTSNodeMap:K,tsNodeToESTreeNodeMap:Y}=r.tsParseResult;k(T,X=>{let p=K.get(X);if(!p)return;let Z=Y.get(p);Z===X&&(P(p,Z,Y),S(p,Z))})}m.exports={throwErrorForInvalidNodes:q}}}),d3=l2({"src/language-js/parse/postprocess/index.js"(d,m){"use strict";n2();var{locStart:k,locEnd:f}=h0(),P=l3(),S=c3(),q=s3(),T=m0(),{throwErrorForInvalidNodes:r}=a3(),K=b0();function Y(L,t2){if(t2.parser==="typescript"&&/@|abstract/.test(t2.originalText)&&r(L,t2),t2.parser!=="typescript"&&t2.parser!=="flow"&&t2.parser!=="acorn"&&t2.parser!=="espree"&&t2.parser!=="meriyah"){let J=new Set;L=T(L,H=>{H.leadingComments&&H.leadingComments.some(S)&&J.add(k(H))}),L=T(L,H=>{if(H.type==="ParenthesizedExpression"){let{expression:I}=H;if(I.type==="TypeCastExpression")return I.range=H.range,I;let u2=k(H);if(!J.has(u2))return I.extra=Object.assign(Object.assign({},I.extra),{},{parenthesized:!0}),I}})}return L=T(L,J=>{switch(J.type){case"ChainExpression":return X(J.expression);case"LogicalExpression":{if(p(J))return Z(J);break}case"VariableDeclaration":{let H=q(J.declarations);H&&H.init&&V(J,H);break}case"TSParenthesizedType":return P(J.typeAnnotation)||J.typeAnnotation.type==="TSThisType"||(J.typeAnnotation.range=[k(J),f(J)]),J.typeAnnotation;case"TSTypeParameter":if(typeof J.name=="string"){let H=k(J);J.name={type:"Identifier",name:J.name,range:[H,H+J.name.length]}}break;case"ObjectExpression":if(t2.parser==="typescript"){let H=J.properties.
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",T