@unocss/inspector 0.51.4 → 0.51.6

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
+ import{s as T,t as R,d as B,x as I,y as W,r as k,u as j,z as D,A as U,B as Z,j as u,c as C,g as b,w as $,e as f,C as M,_ as q,o as E,k as S,D as V,E as N,n as P,h as G,v as K,i as H,M as J,F as L,m as Q,l as X,q as Y,G as tt}from"./index-d5355ee7.js";const F=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;function et(t={}){const c=t.prefix??"un-",o=t.prefixedOnly??!1,p=t.trueToNonValued??!1;let d;return{name:"attributify",match(v,{generator:l}){var m,i;const s=T(v);if(!s)return;let a=s[1];if(a.startsWith(c))a=a.slice(c.length);else if(o)return;const e=s[2],[,_="",n=e]=e.match(F)||[];if(n==="~"||p&&n==="true"||!n)return`${_}${a}`;if(d==null){const h=(i=(m=l==null?void 0:l.config)==null?void 0:m.separators)==null?void 0:i.join("|");h?d=new RegExp(`^(.*\\](?:${h}))(\\[[^\\]]+?\\])$`):d=!1}if(d){const[,h,r]=e.match(d)||[];if(r)return`${h}${_}${a}-${r}`}return`${_}${a}-${n}`}}}const lt=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,rt=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,w=/[\s'"`;>]+/,st={name:"attributify",extract:({content:t,cursor:c})=>{const o=t.matchAll(lt);let p,d=0;for(const r of o){const[,x,y]=r,g=r.index+x.length;if(c>g&&c<=g+y.length){d=g,p=y;break}}if(!p)return null;const v=p.matchAll(rt);let l=0,s,a;for(const r of v){const[x,y,g]=r,A=d+r.index;if(c>A&&c<=A+x.length){l=A,s=y,a=g==null?void 0:g.slice(1);break}}if(!s||s==="class"||s==="className"||s===":class")return null;if(a===void 0)return{extracted:s,resolveReplacement(r){return{start:l,end:l+s.length,replacement:r}}};const e=l+s.length+2;let _=w.exec(a),n=0,m;for(;_;){const[r]=_;if(c>e+n&&c<=e+n+_.index){m=a.slice(n,n+_.index);break}n+=_.index+r.length,_=w.exec(a.slice(n))}m===void 0&&(m=a.slice(n));const[,i="",h]=m.match(F)||[];return{extracted:`${i}${s}-${h}`,transformSuggestions(r){return r.filter(x=>x.startsWith(`${i}${s}-`)).map(x=>i+x.slice(i.length+s.length+1))},resolveReplacement(r){return{start:n+e,end:n+e+m.length,replacement:i+r.slice(i.length+s.length+1)}}}}},nt=["v-bind:",":"],z=/[\s'"`;]+/g,at=/<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|[^>]*?)*)/g,ct=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,O=["placeholder","fill","opacity"];function ot(t){const c=(t==null?void 0:t.ignoreAttributes)??O,o=(t==null?void 0:t.nonValuedAttribute)??!0,p=(t==null?void 0:t.trueToNonValued)??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:d}){const v=Array.from(d.matchAll(at)).flatMap(l=>Array.from((l[1]||"").matchAll(ct))).flatMap(([,l,...s])=>{const a=s.filter(Boolean).join("");if(c.includes(l))return[];for(const e of nt)if(l.startsWith(e)){l=l.slice(e.length);break}if(!a){if(R(l)&&o!==!1){const e=[`[${l}=""]`];return p&&e.push(`[${l}="true"]`),e}return[]}return["class","className"].includes(l)?a.split(z).filter(R):t!=null&&t.prefixedOnly&&t.prefix&&!l.startsWith(t.prefix)?[]:a.split(z).filter(e=>!!e&&e!==":").map(e=>`[${l}~="${e}"]`)});return new Set(v)}}}function it(t={}){t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??O;const c=[et(t)],o=[ot(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:c,extractors:o,options:t,autocomplete:{extractors:[st]},extractorDefault:t.strict?!1:void 0}}const ut={key:0,"h-full":"","of-hidden":""},dt=f("div",{op50:""}," Module ",-1),ft=f("div",{"i-carbon-launch":""},null,-1),mt=f("div",{op50:""}," Matched Rules ",-1),ht=f("div",{op50:""}," CSS Size ",-1),_t=f("span",{op50:""},"gzipped",-1),pt={key:0,"row-span-3":""},xt=f("div",{op50:""}," Potentially Unmatched ",-1),yt={"h-full":"","of-hidden":""},vt=B({__name:"ModuleInfo",props:{id:null},setup(t){const c=t,{data:o}=I(W(c,"id")),p=c.id.split(/\./g).pop(),d=k(null),v=j(d,"module-scrolls");function l(){fetch(`/__open-in-editor?file=${encodeURIComponent(c.id)}`)}const{extractors:s}=it({strict:!0}),a=D(async()=>{var m;const n=new Set;if(s){const i={code:((m=o.value)==null?void 0:m.code)||""};for(const h of s){const r=await h.extract(i);r==null||r.forEach(x=>n.add(x))}}return Array.from(n).filter(i=>!i.startsWith("[")).filter(i=>{var h;return!((h=o.value)!=null&&h.matched.includes(i))})}),e=k(!1),_=U(Z(()=>{var n;return(n=o.value)==null?void 0:n.css}),e);return(n,m)=>{const i=L,h=q,r=Q,x=X;return u(o)?(E(),C("div",ut,[b(h,{ref_key:"status",ref:d,grid:"~ cols-3 gap-4"},{default:$(()=>{var y;return[f("div",null,[dt,f("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:l},[b(i,{id:u(o).id,"mr-1":""},null,8,["id"]),ft])]),f("div",null,[mt,S(" "+V(u(o).matched.length),1)]),f("div",null,[ht,S(" "+V(((((y=u(o))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),_t]),u(a).length?(E(),C("div",pt,[xt,f("code",null,V(u(a).join(", ")),1)])):M("",!0)]}),_:1},512),f("div",yt,[b(u(J),null,{default:$(()=>[b(u(N),{size:"50"},{default:$(()=>[b(r,{"h-full":"","model-value":u(o).code,"read-only":!0,mode:u(p),matched:u(o).matched,class:"scrolls module-scrolls",style:P(u(v))},null,8,["model-value","mode","matched","style"])]),_:1}),b(u(N),{size:"50"},{default:$(()=>[f("div",null,[b(x,{border:"l b gray-400/20",title:"Output CSS"},{default:$(()=>[f("label",null,[G(f("input",{"onUpdate:modelValue":m[0]||(m[0]=y=>H(e)?e.value=y:null),type:"checkbox"},null,512),[[K,u(e)]]),S(" Prettify ")])]),_:1}),b(r,{"h-full":"",b:"l main","model-value":u(_),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:P(u(v))},null,8,["model-value","style"])])]),_:1})]),_:1})])])):M("",!0)}}}),gt=B({__name:"[id]",setup(t){const c=tt();return(o,p)=>{const d=vt;return E(),Y(d,{id:u(c).params.id},null,8,["id"])}}});export{gt as default};
@@ -276,7 +276,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
276
276
  `),cooked:h===null?null:h.slice(1,D)},g.tail=y,this.next();let v=this.finishNode(g,"TemplateElement");return this.resetEndLocation(v,Ai(this.state.lastTokEndLoc,D)),v}parseTemplate(l){let o=this.startNode();o.expressions=[];let a=this.parseTemplateElement(l);for(o.quasis=[a];!a.tail;)o.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),o.quasis.push(a=this.parseTemplateElement(l));return this.finishNode(o,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(l,o,a,c){a&&this.expectPlugin("recordAndTuple");let h=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let d=Object.create(null),g=!0,y=this.startNode();for(y.properties=[],this.next();!this.match(l);){if(g)g=!1;else if(this.expect(12),this.match(l)){this.addTrailingCommaExtraToNode(y);break}let x;o?x=this.parseBindingProperty():(x=this.parsePropertyDefinition(c),this.checkProto(x,a,d,c)),a&&!this.isObjectProperty(x)&&x.type!=="SpreadElement"&&this.raise(Qe.InvalidRecordProperty,{at:x}),x.shorthand&&this.addExtra(x,"shorthand",!0),y.properties.push(x)}this.next(),this.state.inFSharpPipelineDirectBody=h;let D="ObjectExpression";return o?D="ObjectPattern":a&&(D="RecordExpression"),this.finishNode(y,D)}addTrailingCommaExtraToNode(l){this.addExtra(l,"trailingComma",this.state.lastTokStart),this.addExtra(l,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(l){return!l.computed&&l.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(l){let o=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Qe.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)o.push(this.parseDecorator());let a=this.startNode(),c=!1,h=!1,d;if(this.match(21))return o.length&&this.unexpected(),this.parseSpread();o.length&&(a.decorators=o,o=[]),a.method=!1,l&&(d=this.state.startLoc);let g=this.eat(55);this.parsePropertyNamePrefixOperator(a);let y=this.state.containsEsc,D=this.parsePropertyName(a,l);if(!g&&!y&&this.maybeAsyncOrAccessorProp(a)){let x=D.name;x==="async"&&!this.hasPrecedingLineBreak()&&(c=!0,this.resetPreviousNodeTrailingComments(D),g=this.eat(55),this.parsePropertyName(a)),(x==="get"||x==="set")&&(h=!0,this.resetPreviousNodeTrailingComments(D),a.kind=x,this.match(55)&&(g=!0,this.raise(Qe.AccessorIsGenerator,{at:this.state.curPosition(),kind:x}),this.next()),this.parsePropertyName(a))}return this.parseObjPropValue(a,d,g,c,!1,h,l)}getGetterSetterExpectedParamCount(l){return l.kind==="get"?0:1}getObjectOrClassMethodParams(l){return l.params}checkGetterSetterParams(l){var o;let a=this.getGetterSetterExpectedParamCount(l),c=this.getObjectOrClassMethodParams(l);c.length!==a&&this.raise(l.kind==="get"?Qe.BadGetterArity:Qe.BadSetterArity,{at:l}),l.kind==="set"&&((o=c[c.length-1])==null?void 0:o.type)==="RestElement"&&this.raise(Qe.BadSetterRestParameter,{at:l})}parseObjectMethod(l,o,a,c,h){if(h){let d=this.parseMethod(l,o,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(d),d}if(a||o||this.match(10))return c&&this.unexpected(),l.kind="method",l.method=!0,this.parseMethod(l,o,a,!1,!1,"ObjectMethod")}parseObjectProperty(l,o,a,c){if(l.shorthand=!1,this.eat(14))return l.value=a?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(c),this.finishNode(l,"ObjectProperty");if(!l.computed&&l.key.type==="Identifier"){if(this.checkReservedWord(l.key.name,l.key.loc.start,!0,!1),a)l.value=this.parseMaybeDefault(o,V(l.key));else if(this.match(29)){let h=this.state.startLoc;c!=null?c.shorthandAssignLoc===null&&(c.shorthandAssignLoc=h):this.raise(Qe.InvalidCoverInitializedName,{at:h}),l.value=this.parseMaybeDefault(o,V(l.key))}else l.value=V(l.key);return l.shorthand=!0,this.finishNode(l,"ObjectProperty")}}parseObjPropValue(l,o,a,c,h,d,g){let y=this.parseObjectMethod(l,a,c,h,d)||this.parseObjectProperty(l,o,h,g);return y||this.unexpected(),y}parsePropertyName(l,o){if(this.eat(0))l.computed=!0,l.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:a,value:c}=this.state,h;if(Xe(a))h=this.parseIdentifier(!0);else switch(a){case 132:h=this.parseNumericLiteral(c);break;case 131:h=this.parseStringLiteral(c);break;case 133:h=this.parseBigIntLiteral(c);break;case 134:h=this.parseDecimalLiteral(c);break;case 136:{let d=this.state.startLoc;o!=null?o.privateKeyLoc===null&&(o.privateKeyLoc=d):this.raise(Qe.UnexpectedPrivateField,{at:d}),h=this.parsePrivateName();break}default:this.unexpected()}l.key=h,a!==136&&(l.computed=!1)}return l.key}initFunction(l,o){l.id=null,l.generator=!1,l.async=o}parseMethod(l,o,a,c,h,d){let g=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;this.initFunction(l,a),l.generator=o,this.scope.enter(Oa|ou|(g?Fa:0)|(h?Sl:0)),this.prodParam.enter(de(a,l.generator)),this.parseFunctionParams(l,c);let y=this.parseFunctionBodyAndFinish(l,d,!0);return this.prodParam.exit(),this.scope.exit(),y}parseArrayLike(l,o,a,c){a&&this.expectPlugin("recordAndTuple");let h=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let d=this.startNode();return this.next(),d.elements=this.parseExprList(l,!a,c,d),this.state.inFSharpPipelineDirectBody=h,this.finishNode(d,a?"TupleExpression":"ArrayExpression")}parseArrowExpression(l,o,a,c){this.scope.enter(Oa|Cl);let h=de(a,!1);!this.match(5)&&this.prodParam.hasIn&&(h|=he),this.prodParam.enter(h),this.initFunction(l,a);let d=this.state.maybeInArrowParameters;return o&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(l,o,c)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(l,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=d,this.finishNode(l,"ArrowFunctionExpression")}setArrowFunctionParameters(l,o,a){this.toAssignableList(o,a,!1),l.params=o}parseFunctionBodyAndFinish(l,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.parseFunctionBody(l,!1,a),this.finishNode(l,o)}parseFunctionBody(l,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,c=o&&!this.match(5);if(this.expressionScope.enter(E()),c)l.body=this.parseMaybeAssign(),this.checkParams(l,!1,o,!1);else{let h=this.state.strict,d=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|se),l.body=this.parseBlock(!0,!1,g=>{let y=!this.isSimpleParamList(l.params);g&&y&&this.raise(Qe.IllegalLanguageModeDirective,{at:(l.kind==="method"||l.kind==="constructor")&&l.key?l.key.loc.end:l});let D=!h&&this.state.strict;this.checkParams(l,!this.state.strict&&!o&&!a&&!y,o,D),this.state.strict&&l.id&&this.checkIdentifier(l.id,Ip,D)}),this.prodParam.exit(),this.state.labels=d}this.expressionScope.exit()}isSimpleParameter(l){return l.type==="Identifier"}isSimpleParamList(l){for(let o=0,a=l.length;o<a;o++)if(!this.isSimpleParameter(l[o]))return!1;return!0}checkParams(l,o,a){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,h=!o&&new Set,d={type:"FormalParameters"};for(let g of l.params)this.checkLVal(g,{in:d,binding:Uu,checkClashes:h,strictModeChanged:c})}parseExprList(l,o,a,c){let h=[],d=!0;for(;!this.eat(l);){if(d)d=!1;else if(this.expect(12),this.match(l)){c&&this.addTrailingCommaExtraToNode(c),this.next();break}h.push(this.parseExprListItem(o,a))}return h}parseExprListItem(l,o,a){let c;if(this.match(12))l||this.raise(Qe.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),c=null;else if(this.match(21)){let h=this.state.startLoc;c=this.parseParenItem(this.parseSpread(o),h)}else if(this.match(17)){this.expectPlugin("partialApplication"),a||this.raise(Qe.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let h=this.startNode();this.next(),c=this.finishNode(h,"ArgumentPlaceholder")}else c=this.parseMaybeAssignAllowIn(o,this.parseParenItem);return c}parseIdentifier(l){let o=this.startNode(),a=this.parseIdentifierName(l);return this.createIdentifier(o,a)}createIdentifier(l,o){return l.name=o,l.loc.identifierName=o,this.finishNode(l,"Identifier")}parseIdentifierName(l){let o,{startLoc:a,type:c}=this.state;Xe(c)?o=this.state.value:this.unexpected();let h=At(c);return l?h&&this.replaceToken(130):this.checkReservedWord(o,a,h,!1),this.next(),o}checkReservedWord(l,o,a,c){if(!(l.length>10||!$p(l))){if(a&&Qu(l)){this.raise(Qe.UnexpectedKeyword,{at:o,keyword:l});return}if((this.state.strict?c?is:Ua:qc)(l,this.inModule)){this.raise(Qe.UnexpectedReservedWord,{at:o,reservedWord:l});return}else if(l==="yield"){if(this.prodParam.hasYield){this.raise(Qe.YieldBindingIdentifier,{at:o});return}}else if(l==="await"){if(this.prodParam.hasAwait){this.raise(Qe.AwaitBindingIdentifier,{at:o});return}if(this.scope.inStaticBlock){this.raise(Qe.AwaitBindingIdentifierInStaticBlock,{at:o});return}this.expressionScope.recordAsyncArrowParametersError({at:o})}else if(l==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(Qe.ArgumentsInClass,{at:o});return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(l){let o=this.startNodeAt(l);return this.expressionScope.recordParameterInitializerError(Qe.AwaitExpressionFormalParameter,{at:o}),this.eat(55)&&this.raise(Qe.ObsoleteAwaitStar,{at:o}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(o.argument=this.parseMaybeUnary(null,!0)),this.finishNode(o,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:l}=this.state;return l===53||l===10||l===0||ts(l)||l===101&&!this.state.containsEsc||l===135||l===56||this.hasPlugin("v8intrinsic")&&l===54}parseYield(){let l=this.startNode();this.expressionScope.recordParameterInitializerError(Qe.YieldInParameter,{at:l}),this.next();let o=!1,a=null;if(!this.hasPrecedingLineBreak())switch(o=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!o)break;default:a=this.parseMaybeAssign()}return l.delegate=o,l.argument=a,this.finishNode(l,"YieldExpression")}checkPipelineAtInfixOperator(l,o){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&l.type==="SequenceExpression"&&this.raise(Qe.PipelineHeadSequenceExpression,{at:o})}parseSmartPipelineBodyInStyle(l,o){if(this.isSimpleReference(l)){let a=this.startNodeAt(o);return a.callee=l,this.finishNode(a,"PipelineBareFunction")}else{let a=this.startNodeAt(o);return this.checkSmartPipeTopicBodyEarlyErrors(o),a.expression=l,this.finishNode(a,"PipelineTopicExpression")}}isSimpleReference(l){switch(l.type){case"MemberExpression":return!l.computed&&this.isSimpleReference(l.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(l){if(this.match(19))throw this.raise(Qe.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(Qe.PipelineTopicUnused,{at:l})}withTopicBindingContext(l){let o=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return l()}finally{this.state.topicContext=o}}withSmartMixTopicForbiddingContext(l){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let o=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return l()}finally{this.state.topicContext=o}}else return l()}withSoloAwaitPermittingContext(l){let o=this.state.soloAwait;this.state.soloAwait=!0;try{return l()}finally{this.state.soloAwait=o}}allowInAnd(l){let o=this.prodParam.currentFlags();if(he&~o){this.prodParam.enter(o|he);try{return l()}finally{this.prodParam.exit()}}return l()}disallowInAnd(l){let o=this.prodParam.currentFlags();if(he&o){this.prodParam.enter(o&~he);try{return l()}finally{this.prodParam.exit()}}return l()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(l){let o=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let c=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),o,l);return this.state.inFSharpPipelineDirectBody=a,c}parseModuleExpression(){this.expectPlugin("moduleBlocks");let l=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let o=this.startNodeAt(this.state.endLoc);this.next();let a=this.initializeScopes(!0);this.enterInitialScopes();try{l.body=this.parseProgram(o,8,"module")}finally{a()}return this.finishNode(l,"ModuleExpression")}parsePropertyNamePrefixOperator(l){}},gc={kind:"loop"},Hp={kind:"switch"},gg=/[\uD800-\uDFFF]/u,Uh=/in(?:stanceof)?/y;function yg(l,o){for(let a=0;a<l.length;a++){let c=l[a],{type:h}=c;if(typeof h=="number"){{if(h===136){let{loc:d,start:g,value:y,end:D}=c,x=g+1,v=Ai(d.start,1);l.splice(a,1,new Jo({type:Sr(27),value:"#",start:g,end:x,startLoc:d.start,endLoc:v}),new Jo({type:Sr(130),value:y,start:x,end:D,startLoc:v,endLoc:d.end})),a++;continue}if(ts(h)){let{loc:d,start:g,value:y,end:D}=c,x=g+1,v=Ai(d.start,1),S;o.charCodeAt(g)===96?S=new Jo({type:Sr(22),value:"`",start:g,end:x,startLoc:d.start,endLoc:v}):S=new Jo({type:Sr(8),value:"}",start:g,end:x,startLoc:d.start,endLoc:v});let k,T,$,w;h===24?(T=D-1,$=Ai(d.end,-1),k=y===null?null:y.slice(1,-1),w=new Jo({type:Sr(22),value:"`",start:T,end:D,startLoc:$,endLoc:d.end})):(T=D-2,$=Ai(d.end,-2),k=y===null?null:y.slice(1,-2),w=new Jo({type:Sr(23),value:"${",start:T,end:D,startLoc:$,endLoc:d.end})),l.splice(a,1,S,new Jo({type:Sr(20),value:k,start:x,end:T,startLoc:v,endLoc:$}),w),a+=2;continue}}c.type=Sr(h)}}return l}var Og=class extends ro{parseTopLevel(l,o){return l.program=this.parseProgram(o),l.comments=this.state.comments,this.options.tokens&&(l.tokens=yg(this.tokens,this.input)),this.finishNode(l,"File")}parseProgram(l){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:137,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.options.sourceType;if(l.sourceType=a,l.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(l,!0,!0,o),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[h,d]of Array.from(this.scope.undefinedExports))this.raise(Qe.ModuleExportUndefined,{at:d,localName:h});let c;return o===137?c=this.finishNode(l,"Program"):c=this.finishNodeAt(l,"Program",Ai(this.state.startLoc,-1)),c}stmtToDirective(l){let o=l;o.type="Directive",o.value=o.expression,delete o.expression;let a=o.value,c=a.value,h=this.input.slice(a.start,a.end),d=a.value=h.slice(1,-1);return this.addExtra(a,"raw",h),this.addExtra(a,"rawValue",d),this.addExtra(a,"expressionValue",c),a.type="DirectiveLiteral",o}parseInterpreterDirective(){if(!this.match(28))return null;let l=this.startNode();return l.value=this.state.value,this.next(),this.finishNode(l,"InterpreterDirective")}isLet(){return this.isContextual(99)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(l,o){if(Io(l)){if(Uh.lastIndex=o,Uh.test(this.input)){let a=this.codePointAtPos(Uh.lastIndex);if(!ya(a)&&a!==92)return!1}return!0}else return l===92}chStartsBindingPattern(l){return l===91||l===123}hasFollowingBindingAtom(){let l=this.nextTokenStart(),o=this.codePointAtPos(l);return this.chStartsBindingPattern(o)||this.chStartsBindingIdentifier(o,l)}hasFollowingBindingIdentifier(){let l=this.nextTokenStart(),o=this.codePointAtPos(l);return this.chStartsBindingIdentifier(o,l)}startsUsingForOf(){let l=this.lookahead();return l.type===101&&!l.containsEsc?!1:(this.expectPlugin("explicitResourceManagement"),!0)}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=0;return this.options.annexB&&!this.state.strict&&(o|=4,l&&(o|=8)),this.parseStatementLike(o)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(l){let o=null;return this.match(26)&&(o=this.parseDecorators(!0)),this.parseStatementContent(l,o)}parseStatementContent(l,o){let a=this.state.type,c=this.startNode(),h=!!(l&2),d=!!(l&4),g=l&1;switch(a){case 60:return this.parseBreakContinueStatement(c,!0);case 63:return this.parseBreakContinueStatement(c,!1);case 64:return this.parseDebuggerStatement(c);case 90:return this.parseDoWhileStatement(c);case 91:return this.parseForStatement(c);case 68:if(this.lookaheadCharCode()===46)break;return d||this.raise(this.state.strict?Qe.StrictFunction:this.options.annexB?Qe.SloppyFunctionAnnexB:Qe.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(c,!1,!h&&d);case 80:return h||this.unexpected(),this.parseClass(this.maybeTakeDecorators(o,c),!0);case 69:return this.parseIfStatement(c);case 70:return this.parseReturnStatement(c);case 71:return this.parseSwitchStatement(c);case 72:return this.parseThrowStatement(c);case 73:return this.parseTryStatement(c);case 105:if(this.hasFollowingLineBreak()||this.state.containsEsc||!this.hasFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(Qe.UnexpectedUsingDeclaration,{at:this.state.startLoc}):h||this.raise(Qe.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(c,"using");case 99:{if(this.state.containsEsc)break;let x=this.nextTokenStart(),v=this.codePointAtPos(x);if(v!==91&&(!h&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(v,x)&&v!==123))break}case 75:h||this.raise(Qe.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let x=this.state.value;return this.parseVarStatement(c,x)}case 92:return this.parseWhileStatement(c);case 76:return this.parseWithStatement(c);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(c);case 83:{let x=this.lookaheadCharCode();if(x===40||x===46)break}case 82:{!this.options.allowImportExportEverywhere&&!g&&this.raise(Qe.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let x;return a===83?(x=this.parseImport(c),x.type==="ImportDeclaration"&&(!x.importKind||x.importKind==="value")&&(this.sawUnambiguousESM=!0)):(x=this.parseExport(c,o),(x.type==="ExportNamedDeclaration"&&(!x.exportKind||x.exportKind==="value")||x.type==="ExportAllDeclaration"&&(!x.exportKind||x.exportKind==="value")||x.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(x),x}default:if(this.isAsyncFunction())return h||this.raise(Qe.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(c,!0,!h&&d)}let y=this.state.value,D=this.parseExpression();return ot(a)&&D.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(c,y,D,l):this.parseExpressionStatement(c,D,o)}assertModuleNodeAllowed(l){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(Qe.ImportOutsideModule,{at:l})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(l,o,a){return l&&(o.decorators&&o.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(Qe.DecoratorsBeforeAfterExport,{at:o.decorators[0]}),o.decorators.unshift(...l)):o.decorators=l,this.resetStartLocationFromNode(o,l[0]),a&&this.resetStartLocationFromNode(a,o)),o}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(l){let o=[];do o.push(this.parseDecorator());while(this.match(26));if(this.match(82))l||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(Qe.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(Qe.UnexpectedLeadingDecorator,{at:this.state.startLoc});return o}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let l=this.startNode();if(this.next(),this.hasPlugin("decorators")){let o=this.state.startLoc,a;if(this.match(10)){let c=this.state.startLoc;this.next(),a=this.parseExpression(),this.expect(11),a=this.wrapParenthesis(c,a);let h=this.state.startLoc;l.expression=this.parseMaybeDecoratorArguments(a),this.getPluginOption("decorators","allowCallParenthesized")===!1&&l.expression!==a&&this.raise(Qe.DecoratorArgumentsOutsideParentheses,{at:h})}else{for(a=this.parseIdentifier(!1);this.eat(16);){let c=this.startNodeAt(o);c.object=a,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),c.property=this.parsePrivateName()):c.property=this.parseIdentifier(!0),c.computed=!1,a=this.finishNode(c,"MemberExpression")}l.expression=this.parseMaybeDecoratorArguments(a)}}else l.expression=this.parseExprSubscripts();return this.finishNode(l,"Decorator")}parseMaybeDecoratorArguments(l){if(this.eat(10)){let o=this.startNodeAtNode(l);return o.callee=l,o.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(o.arguments),this.finishNode(o,"CallExpression")}return l}parseBreakContinueStatement(l,o){return this.next(),this.isLineTerminator()?l.label=null:(l.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(l,o),this.finishNode(l,o?"BreakStatement":"ContinueStatement")}verifyBreakContinue(l,o){let a;for(a=0;a<this.state.labels.length;++a){let c=this.state.labels[a];if((l.label==null||c.name===l.label.name)&&(c.kind!=null&&(o||c.kind==="loop")||l.label&&o))break}if(a===this.state.labels.length){let c=o?"BreakStatement":"ContinueStatement";this.raise(Qe.IllegalBreakContinue,{at:l,type:c})}}parseDebuggerStatement(l){return this.next(),this.semicolon(),this.finishNode(l,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let l=this.parseExpression();return this.expect(11),l}parseDoWhileStatement(l){return this.next(),this.state.labels.push(gc),l.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),l.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(l,"DoWhileStatement")}parseForStatement(l){this.next(),this.state.labels.push(gc);let o=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(o=this.state.lastTokStartLoc),this.scope.enter(ju),this.expect(10),this.match(13))return o!==null&&this.unexpected(o),this.parseFor(l,null);let a=this.isContextual(99),c=this.isContextual(105)&&!this.hasFollowingLineBreak(),h=a&&this.hasFollowingBindingAtom()||c&&this.hasFollowingBindingIdentifier()&&this.startsUsingForOf();if(this.match(74)||this.match(75)||h){let x=this.startNode(),v=this.state.value;this.next(),this.parseVar(x,!0,v);let S=this.finishNode(x,"VariableDeclaration"),k=this.match(58);return k&&c&&this.raise(Qe.ForInUsing,{at:S}),(k||this.isContextual(101))&&S.declarations.length===1?this.parseForIn(l,S,o):(o!==null&&this.unexpected(o),this.parseFor(l,S))}let d=this.isContextual(95),g=new fe,y=this.parseExpression(!0,g),D=this.isContextual(101);if(D&&(a&&this.raise(Qe.ForOfLet,{at:y}),o===null&&d&&y.type==="Identifier"&&this.raise(Qe.ForOfAsync,{at:y})),D||this.match(58)){this.checkDestructuringPrivate(g),this.toAssignable(y,!0);let x=D?"ForOfStatement":"ForInStatement";return this.checkLVal(y,{in:{type:x}}),this.parseForIn(l,y,o)}else this.checkExpressionErrors(g,!0);return o!==null&&this.unexpected(o),this.parseFor(l,y)}parseFunctionStatement(l,o,a){return this.next(),this.parseFunction(l,1|(a?2:0)|(o?8:0))}parseIfStatement(l){return this.next(),l.test=this.parseHeaderExpression(),l.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),l.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(l,"IfStatement")}parseReturnStatement(l){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(Qe.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?l.argument=null:(l.argument=this.parseExpression(),this.semicolon()),this.finishNode(l,"ReturnStatement")}parseSwitchStatement(l){this.next(),l.discriminant=this.parseHeaderExpression();let o=l.cases=[];this.expect(5),this.state.labels.push(Hp),this.scope.enter(ju);let a;for(let c;!this.match(8);)if(this.match(61)||this.match(65)){let h=this.match(61);a&&this.finishNode(a,"SwitchCase"),o.push(a=this.startNode()),a.consequent=[],this.next(),h?a.test=this.parseExpression():(c&&this.raise(Qe.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),c=!0,a.test=null),this.expect(14)}else a?a.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),a&&this.finishNode(a,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(l,"SwitchStatement")}parseThrowStatement(l){return this.next(),this.hasPrecedingLineBreak()&&this.raise(Qe.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),l.argument=this.parseExpression(),this.semicolon(),this.finishNode(l,"ThrowStatement")}parseCatchClauseParam(){let l=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&l.type==="Identifier"?Lu:0),this.checkLVal(l,{in:{type:"CatchClause"},binding:uc}),l}parseTryStatement(l){if(this.next(),l.block=this.parseBlock(),l.handler=null,this.match(62)){let o=this.startNode();this.next(),this.match(10)?(this.expect(10),o.param=this.parseCatchClauseParam(),this.expect(11)):(o.param=null,this.scope.enter(ju)),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),l.handler=this.finishNode(o,"CatchClause")}return l.finalizer=this.eat(67)?this.parseBlock():null,!l.handler&&!l.finalizer&&this.raise(Qe.NoCatchOrFinally,{at:l}),this.finishNode(l,"TryStatement")}parseVarStatement(l,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.next(),this.parseVar(l,!1,o,a),this.semicolon(),this.finishNode(l,"VariableDeclaration")}parseWhileStatement(l){return this.next(),l.test=this.parseHeaderExpression(),this.state.labels.push(gc),l.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(l,"WhileStatement")}parseWithStatement(l){return this.state.strict&&this.raise(Qe.StrictWith,{at:this.state.startLoc}),this.next(),l.object=this.parseHeaderExpression(),l.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(l,"WithStatement")}parseEmptyStatement(l){return this.next(),this.finishNode(l,"EmptyStatement")}parseLabeledStatement(l,o,a,c){for(let d of this.state.labels)d.name===o&&this.raise(Qe.LabelRedeclaration,{at:a,labelName:o});let h=Ct(this.state.type)?"loop":this.match(71)?"switch":null;for(let d=this.state.labels.length-1;d>=0;d--){let g=this.state.labels[d];if(g.statementStart===l.start)g.statementStart=this.state.start,g.kind=h;else break}return this.state.labels.push({name:o,kind:h,statementStart:this.state.start}),l.body=c&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),l.label=a,this.finishNode(l,"LabeledStatement")}parseExpressionStatement(l,o,a){return l.expression=o,this.semicolon(),this.finishNode(l,"ExpressionStatement")}parseBlock(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2?arguments[2]:void 0,c=this.startNode();return l&&this.state.strictErrors.clear(),this.expect(5),o&&this.scope.enter(ju),this.parseBlockBody(c,l,!1,8,a),o&&this.scope.exit(),this.finishNode(c,"BlockStatement")}isValidDirective(l){return l.type==="ExpressionStatement"&&l.expression.type==="StringLiteral"&&!l.expression.extra.parenthesized}parseBlockBody(l,o,a,c,h){let d=l.body=[],g=l.directives=[];this.parseBlockOrModuleBlockBody(d,o?g:void 0,a,c,h)}parseBlockOrModuleBlockBody(l,o,a,c,h){let d=this.state.strict,g=!1,y=!1;for(;!this.match(c);){let D=a?this.parseModuleItem():this.parseStatementListItem();if(o&&!y){if(this.isValidDirective(D)){let x=this.stmtToDirective(D);o.push(x),!g&&x.value.value==="use strict"&&(g=!0,this.setStrict(!0));continue}y=!0,this.state.strictErrors.clear()}l.push(D)}h&&h.call(this,g),d||this.setStrict(!1),this.next()}parseFor(l,o){return l.init=o,this.semicolon(!1),l.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),l.update=this.match(11)?null:this.parseExpression(),this.expect(11),l.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(l,"ForStatement")}parseForIn(l,o,a){let c=this.match(58);return this.next(),c?a!==null&&this.unexpected(a):l.await=a!==null,o.type==="VariableDeclaration"&&o.declarations[0].init!=null&&(!c||!this.options.annexB||this.state.strict||o.kind!=="var"||o.declarations[0].id.type!=="Identifier")&&this.raise(Qe.ForInOfLoopInitializer,{at:o,type:c?"ForInStatement":"ForOfStatement"}),o.type==="AssignmentPattern"&&this.raise(Qe.InvalidLhs,{at:o,ancestor:{type:"ForStatement"}}),l.left=o,l.right=c?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),l.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(l,c?"ForInStatement":"ForOfStatement")}parseVar(l,o,a){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,h=l.declarations=[];for(l.kind=a;;){let d=this.startNode();if(this.parseVarId(d,a),d.init=this.eat(29)?o?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,d.init===null&&!c&&(d.id.type!=="Identifier"&&!(o&&(this.match(58)||this.isContextual(101)))?this.raise(Qe.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):a==="const"&&!(this.match(58)||this.isContextual(101))&&this.raise(Qe.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),h.push(this.finishNode(d,"VariableDeclarator")),!this.eat(12))break}return l}parseVarId(l,o){o==="using"&&!this.inModule&&this.match(96)&&this.raise(Qe.AwaitInUsingBinding,{at:this.state.startLoc});let a=this.parseBindingAtom();this.checkLVal(a,{in:{type:"VariableDeclarator"},binding:o==="var"?Uu:_a}),l.id=a}parseAsyncFunctionExpression(l){return this.parseFunction(l,8)}parseFunction(l){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=o&2,c=!!(o&1),h=c&&!(o&4),d=!!(o&8);this.initFunction(l,d),this.match(55)&&(a&&this.raise(Qe.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),l.generator=!0),c&&(l.id=this.parseFunctionId(h));let g=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(Oa),this.prodParam.enter(de(d,l.generator)),c||(l.id=this.parseFunctionId()),this.parseFunctionParams(l,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(l,c?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),c&&!a&&this.registerFunctionStatementId(l),this.state.maybeInArrowParameters=g,l}parseFunctionId(l){return l||ot(this.state.type)?this.parseIdentifier():null}parseFunctionParams(l,o){this.expect(10),this.expressionScope.enter(ip()),l.params=this.parseBindingList(11,41,2|(o?4:0)),this.expressionScope.exit()}registerFunctionStatementId(l){l.id&&this.scope.declareName(l.id.name,!this.options.annexB||this.state.strict||l.generator||l.async?this.scope.treatFunctionsAsVar?Uu:_a:lc,l.id.loc.start)}parseClass(l,o,a){this.next();let c=this.state.strict;return this.state.strict=!0,this.parseClassId(l,o,a),this.parseClassSuper(l),l.body=this.parseClassBody(!!l.superClass,c),this.finishNode(l,o?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(l){return!l.computed&&!l.static&&(l.key.name==="constructor"||l.key.value==="constructor")}parseClassBody(l,o){this.classScope.enter();let a={hadConstructor:!1,hadSuperClass:l},c=[],h=this.startNode();if(h.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(c.length>0)throw this.raise(Qe.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){c.push(this.parseDecorator());continue}let d=this.startNode();c.length&&(d.decorators=c,this.resetStartLocationFromNode(d,c[0]),c=[]),this.parseClassMember(h,d,a),d.kind==="constructor"&&d.decorators&&d.decorators.length>0&&this.raise(Qe.DecoratorConstructor,{at:d})}}),this.state.strict=o,this.next(),c.length)throw this.raise(Qe.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(h,"ClassBody")}parseClassMemberFromModifier(l,o){let a=this.parseIdentifier(!0);if(this.isClassMethod()){let c=o;return c.kind="method",c.computed=!1,c.key=a,c.static=!1,this.pushClassMethod(l,c,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let c=o;return c.computed=!1,c.key=a,c.static=!1,l.body.push(this.parseClassProperty(c)),!0}return this.resetPreviousNodeTrailingComments(a),!1}parseClassMember(l,o,a){let c=this.isContextual(104);if(c){if(this.parseClassMemberFromModifier(l,o))return;if(this.eat(5)){this.parseClassStaticBlock(l,o);return}}this.parseClassMemberWithIsStatic(l,o,a,c)}parseClassMemberWithIsStatic(l,o,a,c){let h=o,d=o,g=o,y=o,D=o,x=h,v=h;if(o.static=c,this.parsePropertyNamePrefixOperator(o),this.eat(55)){x.kind="method";let w=this.match(136);if(this.parseClassElementName(x),w){this.pushClassPrivateMethod(l,d,!0,!1);return}this.isNonstaticConstructor(h)&&this.raise(Qe.ConstructorIsGenerator,{at:h.key}),this.pushClassMethod(l,h,!0,!1,!1,!1);return}let S=ot(this.state.type)&&!this.state.containsEsc,k=this.match(136),T=this.parseClassElementName(o),$=this.state.startLoc;if(this.parsePostMemberNameModifiers(v),this.isClassMethod()){if(x.kind="method",k){this.pushClassPrivateMethod(l,d,!1,!1);return}let w=this.isNonstaticConstructor(h),F=!1;w&&(h.kind="constructor",a.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(Qe.DuplicateConstructor,{at:T}),w&&this.hasPlugin("typescript")&&o.override&&this.raise(Qe.OverrideOnConstructor,{at:T}),a.hadConstructor=!0,F=a.hadSuperClass),this.pushClassMethod(l,h,!1,!1,w,F)}else if(this.isClassProperty())k?this.pushClassPrivateProperty(l,y):this.pushClassProperty(l,g);else if(S&&T.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(T);let w=this.eat(55);v.optional&&this.unexpected($),x.kind="method";let F=this.match(136);this.parseClassElementName(x),this.parsePostMemberNameModifiers(v),F?this.pushClassPrivateMethod(l,d,w,!0):(this.isNonstaticConstructor(h)&&this.raise(Qe.ConstructorIsAsync,{at:h.key}),this.pushClassMethod(l,h,w,!0,!1,!1))}else if(S&&(T.name==="get"||T.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(T),x.kind=T.name;let w=this.match(136);this.parseClassElementName(h),w?this.pushClassPrivateMethod(l,d,!1,!1):(this.isNonstaticConstructor(h)&&this.raise(Qe.ConstructorIsAccessor,{at:h.key}),this.pushClassMethod(l,h,!1,!1,!1,!1)),this.checkGetterSetterParams(h)}else if(S&&T.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(T);let w=this.match(136);this.parseClassElementName(g),this.pushClassAccessorProperty(l,D,w)}else this.isLineTerminator()?k?this.pushClassPrivateProperty(l,y):this.pushClassProperty(l,g):this.unexpected()}parseClassElementName(l){let{type:o,value:a}=this.state;if((o===130||o===131)&&l.static&&a==="prototype"&&this.raise(Qe.StaticPrototype,{at:this.state.startLoc}),o===136){a==="constructor"&&this.raise(Qe.ConstructorClassPrivateField,{at:this.state.startLoc});let c=this.parsePrivateName();return l.key=c,c}return this.parsePropertyName(l)}parseClassStaticBlock(l,o){var a;this.scope.enter(Fa|Ru|ou);let c=this.state.labels;this.state.labels=[],this.prodParam.enter(K);let h=o.body=[];this.parseBlockOrModuleBlockBody(h,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=c,l.body.push(this.finishNode(o,"StaticBlock")),(a=o.decorators)!=null&&a.length&&this.raise(Qe.DecoratorStaticBlock,{at:o})}pushClassProperty(l,o){!o.computed&&(o.key.name==="constructor"||o.key.value==="constructor")&&this.raise(Qe.ConstructorClassField,{at:o.key}),l.body.push(this.parseClassProperty(o))}pushClassPrivateProperty(l,o){let a=this.parseClassPrivateProperty(o);l.body.push(a),this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),Zu,a.key.loc.start)}pushClassAccessorProperty(l,o,a){if(!a&&!o.computed){let h=o.key;(h.name==="constructor"||h.value==="constructor")&&this.raise(Qe.ConstructorClassField,{at:h})}let c=this.parseClassAccessorProperty(o);l.body.push(c),a&&this.classScope.declarePrivateName(this.getPrivateNameSV(c.key),Zu,c.key.loc.start)}pushClassMethod(l,o,a,c,h,d){l.body.push(this.parseMethod(o,a,c,h,d,"ClassMethod",!0))}pushClassPrivateMethod(l,o,a,c){let h=this.parseMethod(o,a,c,!1,!1,"ClassPrivateMethod",!0);l.body.push(h);let d=h.kind==="get"?h.static?pc:hc:h.kind==="set"?h.static?qu:Bl:Zu;this.declareClassPrivateMethodInScope(h,d)}declareClassPrivateMethodInScope(l,o){this.classScope.declarePrivateName(this.getPrivateNameSV(l.key),o,l.key.loc.start)}parsePostMemberNameModifiers(l){}parseClassPrivateProperty(l){return this.parseInitializer(l),this.semicolon(),this.finishNode(l,"ClassPrivateProperty")}parseClassProperty(l){return this.parseInitializer(l),this.semicolon(),this.finishNode(l,"ClassProperty")}parseClassAccessorProperty(l){return this.parseInitializer(l),this.semicolon(),this.finishNode(l,"ClassAccessorProperty")}parseInitializer(l){this.scope.enter(Fa|ou),this.expressionScope.enter(E()),this.prodParam.enter(K),l.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(l,o,a){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Np;if(ot(this.state.type))l.id=this.parseIdentifier(),o&&this.declareNameFromIdentifier(l.id,c);else if(a||!o)l.id=null;else throw this.raise(Qe.MissingClassName,{at:this.state.startLoc})}parseClassSuper(l){l.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(l,o){let a=this.maybeParseExportDefaultSpecifier(l),c=!a||this.eat(12),h=c&&this.eatExportStar(l),d=h&&this.maybeParseExportNamespaceSpecifier(l),g=c&&(!d||this.eat(12)),y=a||h;if(h&&!d){if(a&&this.unexpected(),o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:l});return this.parseExportFrom(l,!0),this.finishNode(l,"ExportAllDeclaration")}let D=this.maybeParseExportNamedSpecifiers(l);a&&c&&!h&&!D&&this.unexpected(null,5),d&&g&&this.unexpected(null,97);let x;if(y||D){if(x=!1,o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:l});this.parseExportFrom(l,y)}else x=this.maybeParseExportDeclaration(l);if(y||D||x){var v;let S=l;if(this.checkExport(S,!0,!1,!!S.source),((v=S.declaration)==null?void 0:v.type)==="ClassDeclaration")this.maybeTakeDecorators(o,S.declaration,S);else if(o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:l});return this.finishNode(S,"ExportNamedDeclaration")}if(this.eat(65)){let S=l,k=this.parseExportDefaultExpression();if(S.declaration=k,k.type==="ClassDeclaration")this.maybeTakeDecorators(o,k,S);else if(o)throw this.raise(Qe.UnsupportedDecoratorExport,{at:l});return this.checkExport(S,!0,!0),this.finishNode(S,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(l){return this.eat(55)}maybeParseExportDefaultSpecifier(l){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=this.parseIdentifier(!0),l.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(l){if(this.isContextual(93)){l.specifiers||(l.specifiers=[]);let o=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),o.exported=this.parseModuleExportName(),l.specifiers.push(this.finishNode(o,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(l){if(this.match(5)){l.specifiers||(l.specifiers=[]);let o=l.exportKind==="type";return l.specifiers.push(...this.parseExportSpecifiers(o)),l.source=null,l.declaration=null,this.hasPlugin("importAssertions")&&(l.assertions=[]),!0}return!1}maybeParseExportDeclaration(l){return this.shouldParseExportDeclaration()?(l.specifiers=[],l.source=null,this.hasPlugin("importAssertions")&&(l.assertions=[]),l.declaration=this.parseExportDeclaration(l),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let l=this.nextTokenStart();return!Gc.test(this.input.slice(this.state.pos,l))&&this.isUnparsedContextual(l,"function")}parseExportDefaultExpression(){let l=this.startNode();if(this.match(68))return this.next(),this.parseFunction(l,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(l,13);if(this.match(80))return this.parseClass(l,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Qe.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(Qe.UnsupportedDefaultExport,{at:this.state.startLoc});let o=this.parseMaybeAssignAllowIn();return this.semicolon(),o}parseExportDeclaration(l){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:l}=this.state;if(ot(l)){if(l===95&&!this.state.containsEsc||l===99)return!1;if((l===128||l===127)&&!this.state.containsEsc){let{type:c}=this.lookahead();if(ot(c)&&c!==97||c===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let o=this.nextTokenStart(),a=this.isUnparsedContextual(o,"from");if(this.input.charCodeAt(o)===44||ot(this.state.type)&&a)return!0;if(this.match(65)&&a){let c=this.input.charCodeAt(this.nextTokenStartSince(o+4));return c===34||c===39}return!1}parseExportFrom(l,o){if(this.eatContextual(97)){l.source=this.parseImportSource(),this.checkExport(l);let a=this.maybeParseImportAssertions();a&&(l.assertions=a,this.checkJSONModuleImport(l))}else o&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){let{type:l}=this.state;return l===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Qe.DecoratorBeforeExport,{at:this.state.startLoc}),!0):l===74||l===75||l===68||l===80||this.isLet()||this.isAsyncFunction()}checkExport(l,o,a,c){if(o){if(a){if(this.checkDuplicateExports(l,"default"),this.hasPlugin("exportDefaultFrom")){var h;let d=l.declaration;d.type==="Identifier"&&d.name==="from"&&d.end-d.start===4&&!((h=d.extra)!=null&&h.parenthesized)&&this.raise(Qe.ExportDefaultFromAsIdentifier,{at:d})}}else if(l.specifiers&&l.specifiers.length)for(let d of l.specifiers){let{exported:g}=d,y=g.type==="Identifier"?g.name:g.value;if(this.checkDuplicateExports(d,y),!c&&d.local){let{local:D}=d;D.type!=="Identifier"?this.raise(Qe.ExportBindingIsString,{at:d,localName:D.value,exportName:y}):(this.checkReservedWord(D.name,D.loc.start,!0,!1),this.scope.checkLocalExport(D))}}else if(l.declaration){if(l.declaration.type==="FunctionDeclaration"||l.declaration.type==="ClassDeclaration"){let d=l.declaration.id;if(!d)throw new Error("Assertion failure");this.checkDuplicateExports(l,d.name)}else if(l.declaration.type==="VariableDeclaration")for(let d of l.declaration.declarations)this.checkDeclaration(d.id)}}}checkDeclaration(l){if(l.type==="Identifier")this.checkDuplicateExports(l,l.name);else if(l.type==="ObjectPattern")for(let o of l.properties)this.checkDeclaration(o);else if(l.type==="ArrayPattern")for(let o of l.elements)o&&this.checkDeclaration(o);else l.type==="ObjectProperty"?this.checkDeclaration(l.value):l.type==="RestElement"?this.checkDeclaration(l.argument):l.type==="AssignmentPattern"&&this.checkDeclaration(l.left)}checkDuplicateExports(l,o){this.exportedIdentifiers.has(o)&&(o==="default"?this.raise(Qe.DuplicateDefaultExport,{at:l}):this.raise(Qe.DuplicateExport,{at:l,exportName:o})),this.exportedIdentifiers.add(o)}parseExportSpecifiers(l){let o=[],a=!0;for(this.expect(5);!this.eat(8);){if(a)a=!1;else if(this.expect(12),this.eat(8))break;let c=this.isContextual(128),h=this.match(131),d=this.startNode();d.local=this.parseModuleExportName(),o.push(this.parseExportSpecifier(d,h,l,c))}return o}parseExportSpecifier(l,o,a,c){return this.eatContextual(93)?l.exported=this.parseModuleExportName():o?l.exported=Se(l.local):l.exported||(l.exported=V(l.local)),this.finishNode(l,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let l=this.parseStringLiteral(this.state.value),o=l.value.match(gg);return o&&this.raise(Qe.ModuleExportNameHasLoneSurrogate,{at:l,surrogateCharCode:o[0].charCodeAt(0)}),l}return this.parseIdentifier(!0)}isJSONModuleImport(l){return l.assertions!=null?l.assertions.some(o=>{let{key:a,value:c}=o;return c.value==="json"&&(a.type==="Identifier"?a.name==="type":a.value==="type")}):!1}checkImportReflection(l){if(l.module){var o;(l.specifiers.length!==1||l.specifiers[0].type!=="ImportDefaultSpecifier")&&this.raise(Qe.ImportReflectionNotBinding,{at:l.specifiers[0].loc.start}),((o=l.assertions)==null?void 0:o.length)>0&&this.raise(Qe.ImportReflectionHasAssertion,{at:l.specifiers[0].loc.start})}}checkJSONModuleImport(l){if(this.isJSONModuleImport(l)&&l.type!=="ExportAllDeclaration"){let{specifiers:o}=l;if(o!=null){let a=o.find(c=>{let h;if(c.type==="ExportSpecifier"?h=c.local:c.type==="ImportSpecifier"&&(h=c.imported),h!==void 0)return h.type==="Identifier"?h.name!=="default":h.value!=="default"});a!==void 0&&this.raise(Qe.ImportJSONBindingNotDefault,{at:a.loc.start})}}}parseMaybeImportReflection(l){let o=!1;if(this.isContextual(125)){let a=this.lookahead(),c=a.type;ot(c)?(c!==97||this.input.charCodeAt(this.nextTokenStartSince(a.end))===102)&&(o=!0):c!==12&&(o=!0)}o?(this.expectPlugin("importReflection"),this.next(),l.module=!0):this.hasPlugin("importReflection")&&(l.module=!1)}parseImport(l){if(l.specifiers=[],!this.match(131)){this.parseMaybeImportReflection(l);let a=!this.maybeParseDefaultImportSpecifier(l)||this.eat(12),c=a&&this.maybeParseStarImportSpecifier(l);a&&!c&&this.parseNamedImportSpecifiers(l),this.expectContextual(97)}l.source=this.parseImportSource();let o=this.maybeParseImportAssertions();if(o)l.assertions=o;else{let a=this.maybeParseModuleAttributes();a&&(l.attributes=a)}return this.checkImportReflection(l),this.checkJSONModuleImport(l),this.semicolon(),this.finishNode(l,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(l){return ot(this.state.type)}parseImportSpecifierLocal(l,o,a){o.local=this.parseIdentifier(),l.specifiers.push(this.finishImportSpecifier(o,a))}finishImportSpecifier(l,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_a;return this.checkLVal(l.local,{in:{type:o},binding:a}),this.finishNode(l,o)}parseAssertEntries(){let l=[],o=new Set;do{if(this.match(8))break;let a=this.startNode(),c=this.state.value;if(o.has(c)&&this.raise(Qe.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:c}),o.add(c),this.match(131)?a.key=this.parseStringLiteral(c):a.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(Qe.ModuleAttributeInvalidValue,{at:this.state.startLoc});a.value=this.parseStringLiteral(this.state.value),l.push(this.finishNode(a,"ImportAttribute"))}while(this.eat(12));return l}maybeParseModuleAttributes(){if(this.match(76)&&!this.hasPrecedingLineBreak())this.expectPlugin("moduleAttributes"),this.next();else return this.hasPlugin("moduleAttributes")?[]:null;let l=[],o=new Set;do{let a=this.startNode();if(a.key=this.parseIdentifier(!0),a.key.name!=="type"&&this.raise(Qe.ModuleAttributeDifferentFromType,{at:a.key}),o.has(a.key.name)&&this.raise(Qe.ModuleAttributesWithDuplicateKeys,{at:a.key,key:a.key.name}),o.add(a.key.name),this.expect(14),!this.match(131))throw this.raise(Qe.ModuleAttributeInvalidValue,{at:this.state.startLoc});a.value=this.parseStringLiteral(this.state.value),this.finishNode(a,"ImportAttribute"),l.push(a)}while(this.eat(12));return l}maybeParseImportAssertions(){if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.expectPlugin("importAssertions"),this.next();else return this.hasPlugin("importAssertions")?[]:null;this.eat(5);let l=this.parseAssertEntries();return this.eat(8),l}maybeParseDefaultImportSpecifier(l){return this.shouldParseDefaultImport(l)?(this.parseImportSpecifierLocal(l,this.startNode(),"ImportDefaultSpecifier"),!0):!1}maybeParseStarImportSpecifier(l){if(this.match(55)){let o=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(l,o,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(l){let o=!0;for(this.expect(5);!this.eat(8);){if(o)o=!1;else{if(this.eat(14))throw this.raise(Qe.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let a=this.startNode(),c=this.match(131),h=this.isContextual(128);a.imported=this.parseModuleExportName();let d=this.parseImportSpecifier(a,c,l.importKind==="type"||l.importKind==="typeof",h,void 0);l.specifiers.push(d)}}parseImportSpecifier(l,o,a,c,h){if(this.eatContextual(93))l.local=this.parseIdentifier();else{let{imported:d}=l;if(o)throw this.raise(Qe.ImportBindingIsString,{at:l,importName:d.value});this.checkReservedWord(d.name,l.loc.start,!0,!0),l.local||(l.local=V(d))}return this.finishImportSpecifier(l,"ImportSpecifier",h)}isThisParam(l){return l.type==="Identifier"&&l.name==="this"}},Kf=class extends Og{constructor(l,o){l=Vr(l),super(l,o),this.options=l,this.initializeScopes(),this.plugins=Dg(this.options.plugins),this.filename=l.sourceFilename}getScopeHandler(){return pu}parse(){this.enterInitialScopes();let l=this.startNode(),o=this.startNode();return this.nextToken(),l.errors=null,this.parseTopLevel(l,o),l.errors=this.state.errors,l}};function Dg(l){let o=new Map;for(let a of l){let[c,h]=Array.isArray(a)?a:[a,{}];o.has(c)||o.set(c,h||{})}return o}function xg(l,o){var a;if(((a=o)==null?void 0:a.sourceType)==="unambiguous"){o=Object.assign({},o);try{o.sourceType="module";let c=ap(o,l),h=c.parse();if(c.sawUnambiguousESM)return h;if(c.ambiguousScriptDifferentAst)try{return o.sourceType="script",ap(o,l).parse()}catch{}else h.program.sourceType="script";return h}catch(c){try{return o.sourceType="script",ap(o,l).parse()}catch{}throw c}}else return ap(o,l).parse()}function bg(l,o){let a=ap(o,l);return a.options.strictMode&&(a.state.strict=!0),a.getExpression()}function yc(l){let o={};for(let a of Object.keys(l))o[a]=Sr(l[a]);return o}var vg=yc(st);function ap(l,o){let a=Kf;return l!=null&&l.plugins&&(Bo(l.plugins),a=Cg(l.plugins)),new a(l,o)}var ed={};function Cg(l){let o=Ls.filter(h=>Vi(l,h)),a=o.join("/"),c=ed[a];if(!c){c=Kf;for(let h of o)c=As[h](c);ed[a]=c}return c}xn.parse=xg,xn.parseExpression=bg,xn.tokTypes=vg}}),xl=$e({"src/language-js/parse/json.js"(xn,Xr){oe();var Vr=gl(),Ar=tu(),hr=yl(),Nr=wa();function er(){let kn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{allowComments:wi=!0}=kn;return function(Mr){let{parseExpression:Fi}=Tu(),Ps;try{Ps=Fi(Mr,{tokens:!0,ranges:!0})}catch(Rn){throw Nr(Rn)}if(!wi&&Vr(Ps.comments))throw bn(Ps.comments[0],"Comment");return oi(Ps),Ps}}function bn(kn,wi){let[Mr,Fi]=[kn.loc.start,kn.loc.end].map(Ps=>{let{line:Rn,column:Pi}=Ps;return{line:Rn,column:Pi+1}});return Ar(`${wi} is not allowed in JSON.`,{start:Mr,end:Fi})}function oi(kn){switch(kn.type){case"ArrayExpression":for(let wi of kn.elements)wi!==null&&oi(wi);return;case"ObjectExpression":for(let wi of kn.properties)oi(wi);return;case"ObjectProperty":if(kn.computed)throw bn(kn.key,"Computed key");if(kn.shorthand)throw bn(kn.key,"Shorthand property");kn.key.type!=="Identifier"&&oi(kn.key),oi(kn.value);return;case"UnaryExpression":{let{operator:wi,argument:Mr}=kn;if(wi!=="+"&&wi!=="-")throw bn(kn,`Operator '${kn.operator}'`);if(Mr.type==="NumericLiteral"||Mr.type==="Identifier"&&(Mr.name==="Infinity"||Mr.name==="NaN"))return;throw bn(Mr,`Operator '${wi}' before '${Mr.type}'`)}case"Identifier":if(kn.name!=="Infinity"&&kn.name!=="NaN"&&kn.name!=="undefined")throw bn(kn,`Identifier '${kn.name}'`);return;case"TemplateLiteral":if(Vr(kn.expressions))throw bn(kn.expressions[0],"'TemplateLiteral' with expression");for(let wi of kn.quasis)oi(wi);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw bn(kn,`'${kn.type}'`)}}var bi=er(),di={json:hr({parse:bi,hasPragma(){return!0}}),json5:hr(bi),"json-stringify":hr({parse:er({allowComments:!1}),astFormat:"estree-json"})};Xr.exports=di}});oe();var Uc=Ce(),tc=De(),rc=xt(),ma=yl(),ku=wa(),ga=Dl(),nc=xl(),ic={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication",["decorators",{decoratorsBeforeExport:!1}],"importAssertions","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors"],tokens:!0,ranges:!0},Wc=["recordAndTuple",{syntaxType:"hash"}],Fu="v8intrinsic",_u=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],mo=function(xn){let Xr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ic;return Object.assign(Object.assign({},Xr),{},{plugins:[...Xr.plugins,...xn]})},zo=/@(?:no)?flow\b/;function Yo(xn,Xr){if(Xr.filepath&&Xr.filepath.endsWith(".js.flow"))return!0;let Vr=tc(xn);Vr&&(xn=xn.slice(Vr.length));let Ar=rc(xn,0);return Ar!==!1&&(xn=xn.slice(0,Ar)),zo.test(xn)}function No(xn,Xr,Vr){let Ar=Tu()[xn],hr=Ar(Xr,Vr),Nr=hr.errors.find(er=>!$u.has(er.reasonCode));if(Nr)throw Nr;return hr}function To(xn){for(var Xr=arguments.length,Vr=new Array(Xr>1?Xr-1:0),Ar=1;Ar<Xr;Ar++)Vr[Ar-1]=arguments[Ar];return function(hr,Nr){let er=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if((er.parser==="babel"||er.parser==="__babel_estree")&&Yo(hr,er))return er.parser="babel-flow",Pa(hr,Nr,er);let bn=Vr;er.__babelSourceType==="script"&&(bn=bn.map(kn=>Object.assign(Object.assign({},kn),{},{sourceType:"script"}))),/#[[{]/.test(hr)&&(bn=bn.map(kn=>mo([Wc],kn)));let oi=/%[A-Z]/.test(hr);hr.includes("|>")?bn=(oi?[..._u,Fu]:_u).flatMap(kn=>bn.map(wi=>mo([kn],wi))):oi&&(bn=bn.map(kn=>mo([Fu],kn)));let{result:bi,error:di}=Uc(...bn.map(kn=>()=>No(xn,hr,kn)));if(!bi)throw ku(di);return er.originalText=hr,ga(bi,er)}}var pi=To("parse",mo(["jsx","flow"])),Pa=To("parse",mo(["jsx",["flow",{all:!0,enums:!0}]])),bl=To("parse",mo(["jsx","typescript"]),mo(["typescript"])),ru=To("parse",mo(["jsx","flow","estree"])),Bu=To("parseExpression",mo(["jsx"])),Ta=To("parseExpression",mo(["typescript"])),$u=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","UnexpectedParameterModifier","MixedLabeledAndUnlabeledElements","InvalidTupleMemberLabel","NonClassMethodPropertyHasAbstractModifer","ReadonlyForMethodSignature","ClassMethodHasDeclare","ClassMethodHasReadonly","InvalidModifierOnTypeMember","DuplicateAccessibilityModifier","IndexSignatureHasDeclare","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","UnsupportedPropertyDecorator","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Nu=ma(pi),nu=ma(bl),Iu=ma(Bu),vl=ma(Ta);Ot.exports={parsers:Object.assign(Object.assign({babel:Nu,"babel-flow":ma(Pa),"babel-ts":nu},nc),{},{__js_expression:Iu,__vue_expression:Iu,__vue_ts_expression:vl,__vue_event_binding:Nu,__vue_ts_event_binding:nu,__babel_estree:ma(ru)})}});return fi()})})(i5);const s5=Jm(Ny);function o5(r,e,t){const n={css:t5,html:n5,babel:s5};return Fs(()=>{if(!lo(e))return lo(r)||"/* empty */";try{return KI.format(lo(r)||"",{parser:t,plugins:[n[t]],singleQuote:!0,semi:!1})}catch(i){return console.error(i),`/* Error on prettifying: ${i.message} */
277
277
  ${lo(r)||""}`}})}function a5(r,e=!0){return o5(r,e,"css")}const u5={"h-full":""},l5={p:"x4 y2",grid:"~ cols-4 gap-4"},c5=Di("div",{op80:""}," Presets ",-1),p5={op50:"","ws-pre":""},h5={overflow:"auto"},f5=Di("div",{op80:""}," Rules ",-1),d5=Di("span",{op50:""},"dynamic",-1),m5=Di("br",null,null,-1),g5=Di("span",{op50:""},"static",-1),y5=Di("div",{op80:""}," Variants ",-1),O5=Di("div",{op80:""}," Shortcuts ",-1),D5={key:0},x5=Di("div",{op80:""}," Config File ",-1),b5=Di("div",{op80:""}," Version ",-1),v5={op50:"","ws-pre":""},C5={b:"t main",p:"x4 y2",grid:"~ cols-4 gap-4"},S5=Di("div",{op80:""}," Included Files ",-1),E5=Di("div",{op80:""}," CSS Size ",-1),A5=Di("span",{op50:""},"gzipped",-1),w5=Di("div",{op80:""}," Matched Rules ",-1),P5=Di("div",{op80:""}," Layers ",-1),T5={op50:"","ws-pre":""},k5=Cu({__name:"Overview",setup(r){const e=co(null),t=HI(e,"overview-scrolls");YO.execute();const n=co(!1),i=a5(Fs(()=>{var s;return(s=kd.value)==null?void 0:s.css}),n);return(s,u)=>{const p=GI,f=UI,m=LI,O=II;return qs(),Uo("div",u5,[ws(m,{ref_key:"status",ref:e,p0:""},{default:Vl(()=>{var b,N,W,pe,Re,Ye,ke,dt,kt,zt,Gt,Tr,br,vr,kr,Ur,dn,Nn;return[Di("div",l5,[Di("div",null,[c5,Di("div",p5,aa((W=(N=(b=Xi(Mo))==null?void 0:b.config)==null?void 0:N.presets)==null?void 0:W.map(_i=>_i.name).join(`
278
278
  `)),1)]),Di("div",h5,[f5,yu(" "+aa((Ye=(Re=(pe=Xi(Mo))==null?void 0:pe.config)==null?void 0:Re.rulesDynamic)==null?void 0:Ye.length)+" ",1),d5,m5,yu(" "+aa(Object.keys(((dt=(ke=Xi(Mo))==null?void 0:ke.config)==null?void 0:dt.rulesStaticMap)||{}).length)+" ",1),g5]),Di("div",null,[y5,yu(" "+aa((Gt=(zt=(kt=Xi(Mo))==null?void 0:kt.config)==null?void 0:zt.variants)==null?void 0:Gt.length),1)]),Di("div",null,[O5,yu(" "+aa((Tr=Xi(Mo))==null?void 0:Tr.config.shortcuts.length),1)]),(br=Xi(Mo))!=null&&br.configPath?(qs(),Uo("div",D5,[x5,ws(p,{id:Xi(Mo).configPath},null,8,["id"])])):lf("",!0),Di("div",null,[b5,Di("div",v5,aa((vr=Xi(Mo))==null?void 0:vr.version),1)])]),Di("div",C5,[Di("div",null,[S5,yu(" "+aa((kr=Xi(Mo))==null?void 0:kr.modules.length),1)]),Di("div",null,[E5,yu(" "+aa(((((Ur=Xi(kd))==null?void 0:Ur.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),A5]),Di("div",null,[w5,yu(" "+aa((dn=Xi(kd))==null?void 0:dn.matched.length),1)]),Di("div",null,[P5,Di("div",T5,aa((Nn=Xi(kd))==null?void 0:Nn.layers.join(`
279
- `)),1)])]),ws(f,{border:"t gray-400/20",title:"Output CSS"},{default:Vl(()=>[Di("label",null,[aw(Di("input",{"onUpdate:modelValue":u[0]||(u[0]=_i=>no(n)?n.value=_i:null),type:"checkbox"},null,512),[[oP,Xi(n)]]),yu(" Prettify ")])]),_:1})]}),_:1},512),ws(O,{"model-value":Xi(i),"read-only":!0,mode:"css",class:"overview-scrolls",style:Mf(Xi(t))},null,8,["model-value","style"])])}}}),F5={};function _5(r,e){const t=k5;return qs(),bp(t)}const B5=yE(F5,[["render",_5]]),$5=()=>My(()=>import("./repl-08362db9.js"),[]),N5=()=>My(()=>import("./_id_-1aefeabd.js"),[]),I5=[{name:"repl",path:"/repl",component:$5,props:!0},{name:"index",path:"/",component:B5,props:!0},{name:"module-id",path:"/module/:id",component:N5,props:!0}];/*!
279
+ `)),1)])]),ws(f,{border:"t gray-400/20",title:"Output CSS"},{default:Vl(()=>[Di("label",null,[aw(Di("input",{"onUpdate:modelValue":u[0]||(u[0]=_i=>no(n)?n.value=_i:null),type:"checkbox"},null,512),[[oP,Xi(n)]]),yu(" Prettify ")])]),_:1})]}),_:1},512),ws(O,{"model-value":Xi(i),"read-only":!0,mode:"css",class:"overview-scrolls",style:Mf(Xi(t))},null,8,["model-value","style"])])}}}),F5={};function _5(r,e){const t=k5;return qs(),bp(t)}const B5=yE(F5,[["render",_5]]),$5=()=>My(()=>import("./repl-d03c225c.js"),[]),N5=()=>My(()=>import("./_id_-5a26a69c.js"),[]),I5=[{name:"repl",path:"/repl",component:$5,props:!0},{name:"index",path:"/",component:B5,props:!0},{name:"module-id",path:"/module/:id",component:N5,props:!0}];/*!
280
280
  * vue-router v4.1.6
281
281
  * (c) 2022 Eduardo San Martin Morote
282
282
  * @license MIT
@@ -1,3 +1,3 @@
1
- import{d as x,r as b,u as S,a as k,b as V,f as B,o as h,c as w,e as s,g as a,w as m,h as C,i as p,v as R,j as e,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-cf11438e.js";const L={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},M=s("div",null," REPL Playground ",-1),T=s("div",{op60:""}," Edit your code below to test and play UnoCSS's matching and generating. ",-1),j={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},q=x({__name:"ReplPlayground",setup(y){const r=b(null),l=S(r,"repl-scrolls"),t=k("unocss:inspector:repl",`<div class="text-sm hover:text-red">
1
+ import{d as x,r as b,u as S,a as k,b as V,f as B,o as h,c as w,e as s,g as a,w as m,h as C,i as p,v as R,j as e,k as P,n as f,_ as E,l as N,m as U,p as $,q as I}from"./index-d5355ee7.js";const L={"h-full":"",grid:"~ rows-[max-content_1fr]","of-hidden":""},M=s("div",null," REPL Playground ",-1),T=s("div",{op60:""}," Edit your code below to test and play UnoCSS's matching and generating. ",-1),j={"h-full":"","of-hidden":"",grid:"","grid-cols-2":""},q=x({__name:"ReplPlayground",setup(y){const r=b(null),l=S(r,"repl-scrolls"),t=k("unocss:inspector:repl",`<div class="text-sm hover:text-red">
2
2
  Hello World
3
3
  </div>`),o=V("unocss-inspector-safelist",!1),{data:d}=B(t,o);return(H,n)=>{var i,_;const v=E,g=N,u=U;return h(),w("div",L,[s("div",{ref_key:"status",ref:r},[a(v,null,{default:m(()=>[M,T]),_:1}),a(g,{border:"b gray-400/20",title:""},{default:m(()=>[s("label",null,[C(s("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>p(o)?o.value=c:null),type:"checkbox"},null,512),[[R,e(o)]]),P(" Include safelist ")])]),_:1})],512),s("div",j,[a(u,{modelValue:e(t),"onUpdate:modelValue":n[1]||(n[1]=c=>p(t)?t.value=c:null),mode:"html",matched:((i=e(d))==null?void 0:i.matched)||[],class:"scrolls repl-scrolls",style:f(e(l))},null,8,["modelValue","matched","style"]),a(u,{"b-l":"","b-main":"","model-value":((_=e(d))==null?void 0:_.css)||"/* empty */","read-only":!0,mode:"css",class:"scrolls repl-scrolls",style:f(e(l))},null,8,["model-value","style"])])])}}}),z={};function D(y,r){const l=q;return h(),I(l)}const A=$(z,[["render",D]]);export{A as default};
@@ -8,7 +8,7 @@
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com" />
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
10
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;400&family=Fira+Code&display=swap" rel="stylesheet" />
11
- <script type="module" crossorigin src="/__unocss/assets/index-cf11438e.js"></script>
11
+ <script type="module" crossorigin src="/__unocss/assets/index-d5355ee7.js"></script>
12
12
  <link rel="stylesheet" href="/__unocss/assets/index-f6a4fc7d.css">
13
13
  </head>
14
14
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/inspector",
3
- "version": "0.51.4",
3
+ "version": "0.51.6",
4
4
  "description": "The inspector UI for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- import{s as O,t as k,d as B,x as I,y as W,r as C,u as j,z as D,A as U,B as Z,j as d,c as M,g as b,w as A,e as m,C as N,_ as q,o as R,k as S,D as V,E as P,n as w,h as G,v as K,i as H,M as J,F as L,m as Q,l as X,q as Y,G as tt}from"./index-cf11438e.js";const F=/^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;function et(t={}){const c=t.prefix??"un-",i=t.prefixedOnly??!1,p=t.trueToNonValued??!1;let f;return{name:"attributify",match(v,{generator:e}){var h,u;const s=O(v);if(!s)return;let n=s[1];if(n.startsWith(c))n=n.slice(c.length);else if(i)return;const r=s[2],[,o="",a=r]=r.match(F)||[];if(a==="~"||p&&a==="true"||!a)return`${o}${n}`;if(f==null){const _=(u=(h=e==null?void 0:e.config)==null?void 0:h.separators)==null?void 0:u.join("|");_?f=new RegExp(`^(.*\\](?:${_}))(\\[[^\\]]+?\\])$`):f=!1}if(f){const[,_,l]=r.match(f)||[];if(l)return`${_}${o}${n}-${l}`}return`${o}${n}-${a}`}}}const lt=/(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g,rt=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g,z=/[\s'"`;>]+/,st={name:"attributify",extract:({content:t,cursor:c})=>{const i=t.matchAll(lt);let p,f=0;for(const l of i){const[,x,y]=l,g=l.index+x.length;if(c>g&&c<=g+y.length){f=g,p=y;break}}if(!p)return null;const v=p.matchAll(rt);let e=0,s,n;for(const l of v){const[x,y,g]=l,$=f+l.index;if(c>$&&c<=$+x.length){e=$,s=y,n=g==null?void 0:g.slice(1);break}}if(!s||s==="class"||s==="className"||s===":class")return null;if(n===void 0)return{extracted:s,resolveReplacement(l){return{start:e,end:e+s.length,replacement:l}}};const r=e+s.length+2;let o=z.exec(n),a=0,h;for(;o;){const[l]=o;if(c>r+a&&c<=r+a+o.index){h=n.slice(a,a+o.index);break}a+=o.index+l.length,o=z.exec(n.slice(a))}h===void 0&&(h=n.slice(a));const[,u="",_]=h.match(F)||[];return{extracted:`${u}${s}-${_}`,transformSuggestions(l){return l.filter(x=>x.startsWith(`${u}${s}-`)).map(x=>u+x.slice(u.length+s.length+1))},resolveReplacement(l){return{start:a+r,end:a+r+h.length,replacement:u+l.slice(u.length+s.length+1)}}}}},nt=["v-bind:",":"],E=/[\s'"`;]+/g,at=/<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|[^>]*?)*)/g,ct=/([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms,T=["placeholder","fill","opacity"];function ot(t){const c=(t==null?void 0:t.ignoreAttributes)??T,i=(t==null?void 0:t.nonValuedAttribute)??!0,p=(t==null?void 0:t.trueToNonValued)??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:f}){const v=Array.from(f.matchAll(at)).flatMap(e=>Array.from((e[1]||"").matchAll(ct))).flatMap(([,e,...s])=>{const n=s.filter(Boolean).join("");if(c.includes(e))return[];for(const r of nt)if(e.startsWith(r)){e=e.slice(r.length);break}if(!n){if(k(e)&&i!==!1){const r=[`[${e}=""]`];return p&&r.push(`[${e}="true"]`),r}return[]}if(["class","className"].includes(e))return n.split(E).filter(k);{if(t!=null&&t.prefixedOnly&&t.prefix&&!e.startsWith(t.prefix))return[];const r=Array.from(n.matchAll(/(?:[\?:].*?)(["'])([^\1]*?)\1/gms)).map(([,,o])=>o.split(E)).flat();return(r.length?r:n.split(E)).filter(o=>!!o&&o!==":").map(o=>`[${e}~="${o}"]`)}});return new Set(v)}}}function it(t={}){t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??T;const c=[et(t)],i=[ot(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:c,extractors:i,options:t,autocomplete:{extractors:[st]},extractorDefault:t.strict?!1:void 0}}const ut={key:0,"h-full":"","of-hidden":""},dt=m("div",{op50:""}," Module ",-1),ft=m("div",{"i-carbon-launch":""},null,-1),mt=m("div",{op50:""}," Matched Rules ",-1),ht=m("div",{op50:""}," CSS Size ",-1),_t=m("span",{op50:""},"gzipped",-1),pt={key:0,"row-span-3":""},xt=m("div",{op50:""}," Potentially Unmatched ",-1),yt={"h-full":"","of-hidden":""},vt=B({__name:"ModuleInfo",props:{id:null},setup(t){const c=t,{data:i}=I(W(c,"id")),p=c.id.split(/\./g).pop(),f=C(null),v=j(f,"module-scrolls");function e(){fetch(`/__open-in-editor?file=${encodeURIComponent(c.id)}`)}const{extractors:s}=it({strict:!0}),n=D(async()=>{var h;const a=new Set;if(s){const u={code:((h=i.value)==null?void 0:h.code)||""};for(const _ of s){const l=await _.extract(u);l==null||l.forEach(x=>a.add(x))}}return Array.from(a).filter(u=>!u.startsWith("[")).filter(u=>{var _;return!((_=i.value)!=null&&_.matched.includes(u))})}),r=C(!1),o=U(Z(()=>{var a;return(a=i.value)==null?void 0:a.css}),r);return(a,h)=>{const u=L,_=q,l=Q,x=X;return d(i)?(R(),M("div",ut,[b(_,{ref_key:"status",ref:f,grid:"~ cols-3 gap-4"},{default:A(()=>{var y;return[m("div",null,[dt,m("a",{"cursor-pointer":"",op80:"","hover:op100":"",onClick:e},[b(u,{id:d(i).id,"mr-1":""},null,8,["id"]),ft])]),m("div",null,[mt,S(" "+V(d(i).matched.length),1)]),m("div",null,[ht,S(" "+V(((((y=d(i))==null?void 0:y.gzipSize)||0)/1024).toFixed(2))+" KiB ",1),_t]),d(n).length?(R(),M("div",pt,[xt,m("code",null,V(d(n).join(", ")),1)])):N("",!0)]}),_:1},512),m("div",yt,[b(d(J),null,{default:A(()=>[b(d(P),{size:"50"},{default:A(()=>[b(l,{"h-full":"","model-value":d(i).code,"read-only":!0,mode:d(p),matched:d(i).matched,class:"scrolls module-scrolls",style:w(d(v))},null,8,["model-value","mode","matched","style"])]),_:1}),b(d(P),{size:"50"},{default:A(()=>[m("div",null,[b(x,{border:"l b gray-400/20",title:"Output CSS"},{default:A(()=>[m("label",null,[G(m("input",{"onUpdate:modelValue":h[0]||(h[0]=y=>H(r)?r.value=y:null),type:"checkbox"},null,512),[[K,d(r)]]),S(" Prettify ")])]),_:1}),b(l,{"h-full":"",b:"l main","model-value":d(o),"read-only":!0,mode:"css",class:"scrolls module-scrolls",style:w(d(v))},null,8,["model-value","style"])])]),_:1})]),_:1})])])):N("",!0)}}}),gt=B({__name:"[id]",setup(t){const c=tt();return(i,p)=>{const f=vt;return R(),Y(f,{id:d(c).params.id},null,8,["id"])}}});export{gt as default};