svelte-prune 0.10.0 → 0.10.1
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.
- package/analysis-a7wbx6mr.js +1 -0
- package/index-34y0pc8q.js +2 -0
- package/index-4960rqxx.js +3 -0
- package/{index-jxng1156.js → index-4992cggh.js} +5 -5
- package/{index-z8hj1913.js → index-6g116bmb.js} +1 -1
- package/index-gdmk0qve.js +2 -0
- package/index-n6hffmks.js +22 -0
- package/index-wkcyw7a9.js +9 -0
- package/{index-v520xws8.js → index-xt8m9vw2.js} +2 -2
- package/index-zq01wexv.js +2 -0
- package/index.js +1 -1
- package/internal-analysis.d.ts +7 -7
- package/internal-analysis.js +1 -1
- package/internal.d.ts +2 -2
- package/internal.js +1 -1
- package/loader.js +1 -1
- package/package.json +1 -1
- package/tailwind-sources-w3ata1x1.js +1 -0
- package/variant-tables-tr82shep.js +1 -0
- package/vite.js +1 -1
- package/webpack.js +1 -1
- package/analysis-ah6ws3px.js +0 -1
- package/index-17bw6v3k.js +0 -2
- package/index-45rna84h.js +0 -9
- package/index-c4dndsx9.js +0 -2
- package/index-fhqjbrb9.js +0 -3
- package/index-k2z70ex7.js +0 -22
- package/index-pykm4v5k.js +0 -2
- package/tailwind-sources-8wvzbxes.js +0 -1
- package/variant-tables-zha5f3x0.js +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{We,W,C,je,V,ze,c,y,ee,Pe,m,b,T,j,g,v,te,f,S,Me,de,Re,me,B,M,z,ye,Le}from"./index-wkcyw7a9.js";import{ge,_,R,ie,xe}from"./index-4960rqxx.js";import{ne,h,l,s,re,se,oe,q,ae,x,L,le,be,p,F,O,o,w,pe,ue,K,Se,u,E,N,G,k}from"./index-4992cggh.js";import{readFileSync as hv,realpathSync as fv}from"node:fs";import Zt from"node:path";import{readFile as Zy}from"node:fs/promises";import eg from"node:path";import{existsSync as Lm,readFileSync as na,statSync as op}from"node:fs";import Di from"node:path";var ko=new Set(["$state","$state.raw","$derived","$derived.by","$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"]),Eo=new Set(["$state","$derived","$props","$bindable","$effect","$inspect","$host"]);class To{node;parent;porous;index;declarations=new Map;types=new Map;constructor(D,H,X,Y){this.node=D,this.parent=H,this.porous=X,this.index=Y}get(D){for(let H=this;H;H=H.parent){let X=H.declarations.get(D);if(X!==void 0)return X}return null}getType(D){return this.lookup(D,ki)}lookup(D,H){if(H===cn)return this.get(D);let X=H===ki?bh:Sh;for(let Y=this;Y;Y=Y.parent){if(H===ki){let we=Y.types.get(D);if(we!==void 0)return we}let ce=Y.declarations.get(D);if(ce!==void 0&&X.has(ce.kind))return ce}return null}}class _o{name;kind;node;declaration;initial;scope;references=[];rune=null;prop=null;constructor(D,H,X,Y,ce,we){this.name=D,this.kind=H,this.node=X,this.declaration=Y,this.initial=ce,this.scope=we}}class ar{node;parent;scope;binding=null;reads;writes;mutates;store=!1;type;meaning;constructor(D,H,X,Y,ce,we,ke,ve){this.node=D,this.parent=H,this.scope=X,this.reads=Y,this.writes=ce,this.mutates=we,this.type=ke,this.meaning=ve}}var cn=0,ki=1,vh=2,Co=3,bh=new Set(["import","class","enum"]),Sh=new Set(["import","enum","namespace"]);function wh(D){return D==="MethodDefinition"||D.startsWith("TS")}var Io=Object.assign(Object.create(null),v),$o=Object.create(null);for(let[D,H]of Object.entries(g)){let X=Io[D]??[],Y=H.filter((ce)=>!X.includes(ce));$o[D]={values:X,types:Y.length>0?Y:null,all:H}}var kh=new Set(["SvelteElement","RegularElement","SvelteFragment","Component","SvelteComponent","SvelteSelf","SlotElement"]),Eh=new Map;function or(D,H){return new lr(D,!1,H?.types===!0)}class lr{module;instance;instanceProgram=null;component;ast;scopes=[];scopeIn;synthetic=new Map;recorded;made=new Map;declared=new Map;references=new Map;pending=[];declarators=[];implicit=[];stores=new Map;types;inType=!1;inferScope=null;constructor(D,H,X){if(this.ast=D,this.scopeIn=H?new Map:null,this.types=X,D.type==="Program")this.component=!1,this.module=this.scope(D,null,!1),this.instance=this.module,this.made.set(D,this.module),this.visit(D,null,this.module);else{this.component=!0;let Y=D.module?.content??null,ce=D.instance?.content??null;this.module=this.scope(Y,null,!1),this.instance=this.scope(ce,this.module,!1),this.instanceProgram=ce,this.scopeIn?.set(D,this.module);for(let[we,ke]of[[D.module,this.module],[D.instance,this.instance]]){if(we===void 0)continue;this.scopeIn?.set(we,ke),this.made.set(we.content,ke);for(let ve of we.attributes)this.visit(ve,we,ke);this.visit(we.content,we,ke)}this.visit(D.fragment,D,this.instance)}this.declareImplicit(),this.resolve(),this.findRunesAndProps()}scopeOf(D){let H=this.synthetic.get(D);if(H!==void 0)return H;if(this.scopeIn!==null)return this.scopeIn.get(D)??null;this.recorded??=new lr(this.ast,!0,this.types);let X=this.recorded.scopeIn?.get(D);return X===void 0?null:this.scopes[X.index]}scope(D,H,X){let Y=new To(D,H,X,this.scopes.length);return this.scopes.push(Y),Y}bindingOf(D){return this.declared.get(D)??this.references.get(D)?.binding??null}referenceOf(D){return this.references.get(D)??null}declaredIn(D){return this.made.get(D)?.declarations??Eh}names(){let D=new Set;for(let H of this.scopes)for(let[X,Y]of H.declarations){let{declaration:ce,initial:we}=Y;if(Y.kind==="import"&&(ce.importKind==="type"||we?.importKind==="type"))continue;D.add(X)}for(let H of this.references.values())if(!H.type)D.add(H.node.name);return D}allReferences(){return this.references.values()}allDeclared(){return this.declared.entries()}child(D,H,X){let Y=this.scope(H,D,X);return this.made.set(H,Y),Y}declare(D,H,X,Y,ce,we){let ke=D;if(Y==="var")while(ke.porous&&ke.parent!==null)ke=ke.parent;let ve=Y==="type"||Y==="interface"||Y==="type-param"?ke.types:ke.declarations,Ee=ve.get(X);if(Ee!==void 0&&Ee.declaration.type!=="TSDeclareFunction"){if(H!==null)this.declared.set(H,Ee);return}let Ce=new _o(X,Y,H,ce,we,ke);if(ve.set(X,Ce),H!==null)this.declared.set(H,Ce)}reference(D,H,X,Y,ce,we,ke=cn,ve=this.inType){this.pending.push(ve?new ar(D,H,X,!1,!1,!1,!0,ke):new ar(D,H,X,Y,ce,we,!1,ke))}referenceName(D,H,X,Y){let ce=D.split(".")[0],we={type:"Identifier",name:ce,start:H,end:H+ce.length};this.synthetic.set(we,Y),this.reference(we,X,Y,!0,!1,!1)}visit(D,H,X){switch(this.scopeIn?.set(D,X),D.type){case"Identifier":if(H!==null&&(this.inType?Ch(D,H):b(D,H)))this.reference(D,H,X,!0,!1,!1);this.visitFields(D,X);return;case"ImportDeclaration":for(let Y of D.specifiers){if(this.scopeIn?.set(Y,X),this.scopeIn?.set(Y.local,X),Y.type==="ImportSpecifier")this.scopeIn?.set(Y.imported,X);this.declare(X,Y.local,Y.local.name,"import",Y,D)}this.visit(D.source,D,X);for(let Y of D.attributes??[])this.visit(Y,D,X);return;case"ExportNamedDeclaration":if(D.declaration)this.visit(D.declaration,D,X);for(let Y of D.specifiers)if(this.scopeIn?.set(Y,X),this.scopeIn?.set(Y.local,X),this.scopeIn?.set(Y.exported,X),!D.source&&Y.local.type==="Identifier")this.reference(Y.local,Y,X,!0,!1,!1,this.types?Co:cn,this.types&&(D.exportKind==="type"||Y.exportKind==="type"));if(D.source)this.visit(D.source,D,X);for(let Y of D.attributes??[])this.visit(Y,D,X);return;case"VariableDeclaration":this.visitDeclaration(D,H,X);return;case"FunctionDeclaration":if(D.id)this.scopeIn?.set(D.id,X),this.declare(X,D.id,D.id.name,"function",D,D);this.visitFunction(D,this.child(X,D,!0));return;case"FunctionExpression":{let Y=this.child(X,D,!0);if(D.id)this.scopeIn?.set(D.id,Y),this.declare(Y,D.id,D.id.name,"function",D,D);this.visitFunction(D,Y);return}case"ArrowFunctionExpression":this.visitFunction(D,this.child(X,D,!0));return;case"ClassDeclaration":case"ClassExpression":{let Y=this.types&&D.typeParameters!==void 0,ce=D.id&&D.type==="ClassExpression"||Y?this.child(X,D,!1):X;if(D.id){let we=D.type==="ClassExpression"?ce:X;this.scopeIn?.set(D.id,we),this.declare(we,D.id,D.id.name,"class",D,D)}for(let we of D.decorators??[])this.visit(we,D,X);if(this.declareTypeParameters(D.typeParameters,ce),D.superClass)this.visit(D.superClass,D,ce);this.visitType(D.superTypeParameters,D,ce),this.visitType(D.implements,D,ce),this.visit(D.body,D,ce);return}case"BlockStatement":this.visitFields(D,this.child(X,D,!(H!==null&&Ah(H)&&H.body===D)));return;case"StaticBlock":this.visitFields(D,this.child(X,D,!1));return;case"ForStatement":case"SwitchStatement":this.visitFields(D,this.child(X,D,!0));return;case"ForInStatement":case"ForOfStatement":{let Y=this.child(X,D,!0);if(D.left.type==="VariableDeclaration")this.visit(D.left,D,Y);else this.visitTarget(D.left,D,Y,!1);this.visit(D.right,D,Y),this.visit(D.body,D,Y);return}case"CatchClause":{if(!D.param)break;let Y=this.child(X,D,!0);this.declarePattern(D.param,D,Y,"catch",D,null),this.visit(D.body,D,Y);return}case"AssignmentExpression":this.visitTarget(D.left,D,X,D.operator!=="="),this.visit(D.right,D,X);return;case"UpdateExpression":this.visitTarget(D.argument,D,X,!0);return;case"LabeledStatement":if(H===this.instanceProgram&&D.label.name==="$"){this.visitReactive(D,X);return}break;case"TSEnumDeclaration":{this.scopeIn?.set(D.id,X),this.declare(X,D.id,D.id.name,"enum",D,D);let Y=this.child(X,D,!1);for(let ce of D.members)if(this.scopeIn?.set(ce,Y),this.scopeIn?.set(ce.id,Y),ce.id.type==="Identifier")this.declare(Y,ce.id,ce.id.name,"enum-member",ce,ce.initializer??null);for(let ce of D.members)if(ce.initializer)this.visit(ce.initializer,ce,Y);return}case"TSModuleDeclaration":if(this.scopeIn?.set(D.id,X),D.id.type==="Identifier"&&!D.global)this.declare(X,D.id,D.id.name,"namespace",D,D);if(D.body)this.visit(D.body,D,this.child(X,D,!1));return;case"TSImportEqualsDeclaration":{this.scopeIn?.set(D.id,X),this.declare(X,D.id,D.id.name,"import",D,D.moduleReference);let Y=D.moduleReference;while(Y.type==="TSQualifiedName")this.scopeIn?.set(Y,X),this.scopeIn?.set(Y.right,X),Y=Y.left;if(Y.type==="Identifier")this.scopeIn?.set(Y,X),this.reference(Y,D,X,!0,!1,!1);else this.visit(Y,D,X);return}case"TSDeclareFunction":if(D.id){if(this.scopeIn?.set(D.id,X),!X.declarations.has(D.id.name))this.declare(X,D.id,D.id.name,"function",D,D)}if(this.types)this.visitSignature(D,D.typeParameters,D.params,D.returnType,X);return;case"Fragment":this.visitFields(D,this.child(X,D,!1));return;case"RegularElement":case"SvelteElement":case"SlotElement":case"SvelteFragment":this.visitFields(D,this.child(X,D,!1));return;case"Component":case"SvelteComponent":case"SvelteSelf":this.visitComponent(D,X);return;case"LetDirective":this.visitLet(D,X);return;case"EachBlock":this.visitEach(D,X);return;case"AwaitBlock":this.visitAwait(D,X);return;case"SnippetBlock":{this.scopeIn?.set(D.expression,X);let{name:Y}=D.expression;this.declare(X,D.expression,Y,"snippet",D,D);let ce=this.child(X,D,!1);for(let we of D.parameters??[])this.declarePattern(we,D,ce,"snippet-param",D,null);this.visit(D.body,D,ce);return}case"BindDirective":if(D.expression.type==="SequenceExpression")break;this.visitTarget(D.expression,D,X,!0);return;case"TransitionDirective":case"AnimateDirective":case"UseDirective":{this.referenceName(D.name,D.start+Th(D),D,X);break}case"StyleDirective":if(D.value===!0)this.referenceName(D.name,D.start+6,D,X);break}if(this.types&&wh(D.type)&&this.visitTyped(D,X))return;this.visitFields(D,X)}visitTyped(D,H){switch(D.type){case"MethodDefinition":{if(D.typeParameters===void 0)return!1;this.visitChild(D.decorators,D,H),this.visit(D.key,D,H);let X=this.child(H,D,!1);return this.declareTypeParameters(D.typeParameters,X),this.visit(D.value,D,X),!0}case"TSDeclareMethod":return this.visitSignature(D,D.typeParameters,D.params,D.returnType,H),!0;case"TSFunctionType":case"TSConstructorType":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":return this.visitSignature(D,D.typeParameters,D.parameters,D.typeAnnotation,H),!0;case"TSMethodSignature":if(D.computed)this.visit(D.key,D,H);else this.scopeIn?.set(D.key,H);return this.visitSignature(D,D.typeParameters,D.parameters,D.typeAnnotation,H),!0;case"TSTypeAliasDeclaration":case"TSInterfaceDeclaration":{let X=D.type==="TSTypeAliasDeclaration"?"type":"interface";this.scopeIn?.set(D.id,H),this.declare(H,D.id,D.id.name,X,D,D);let Y=D.typeParameters?this.child(H,D,!1):H;if(this.declareTypeParameters(D.typeParameters,Y),D.type==="TSTypeAliasDeclaration")this.visitType(D.typeAnnotation,D,Y);else this.visitType(D.extends,D,Y),this.visitType(D.body,D,Y);return!0}case"TSTypeReference":return this.visitEntityName(D.typeName,D,H,ki),this.visitChild(D.typeArguments,D,H),!0;case"TSExpressionWithTypeArguments":return this.visitEntityName(D.expression,D,H,ki),this.visitChild(D.typeParameters,D,H),!0;case"TSTypeQuery":return this.visitEntityName(D.exprName,D,H,cn),this.visitChild(D.typeArguments,D,H),!0;case"TSImportType":{this.visit(D.argument,D,H);let X=D.qualifier;while(X!==void 0){if(this.scopeIn?.set(X,H),X.type!=="TSQualifiedName")break;this.scopeIn?.set(X.right,H),X=X.left}return this.visitChild(D.typeArguments,D,H),!0}case"TSMappedType":{let X=D.typeParameter;this.scopeIn?.set(X,H),this.visitChild(X.constraint,X,H);let Y=this.child(H,D,!1);return this.declare(Y,null,X.name,"type-param",X,null),this.visitChild(D.nameType,D,Y),this.visitChild(D.typeAnnotation,D,Y),!0}case"TSConditionalType":{this.visit(D.checkType,D,H);let X=this.child(H,D,!1),Y=this.inferScope;return this.inferScope=X,this.visit(D.extendsType,D,X),this.inferScope=Y,this.visit(D.trueType,D,X),this.visit(D.falseType,D,H),!0}case"TSInferType":{let X=D.typeParameter;return this.scopeIn?.set(X,H),this.declare(this.inferScope??H,null,X.name,"type-param",X,null),this.visitChild(X.constraint,X,H),!0}}return!1}visitFields(D,H){if(this.types){this.visitTypedFields(D,H);return}let X=Io[D.type];if(X===void 0)throw Error(`unknown node type: ${D.type}`);let Y=y(D);for(let ce=0;ce<X.length;ce++){let we=Y[X[ce]];if(Array.isArray(we))for(let ke=0;ke<we.length;ke++){let ve=we[ke];if(c(ve))this.visit(ve,D,H)}else if(c(we))this.visit(we,D,H)}}visitTypedFields(D,H){let X=$o[D.type];if(X===void 0)throw Error(`unknown node type: ${D.type}`);if(this.inType){this.visitKeys(D,X.all,H);return}if(X.types!==null){let Y=y(D);for(let ce=0;ce<X.types.length;ce++){let we=Y[X.types[ce]];if(we!=null)this.visitType(we,D,H)}}this.visitKeys(D,X.values,H)}visitKeys(D,H,X){let Y=y(D);for(let ce=0;ce<H.length;ce++){let we=Y[H[ce]];if(Array.isArray(we))for(let ke=0;ke<we.length;ke++){let ve=we[ke];if(c(ve))this.visit(ve,D,X)}else if(c(we))this.visit(we,D,X)}}visitChild(D,H,X){if(Array.isArray(D))for(let Y=0;Y<D.length;Y++){let ce=D[Y];if(c(ce))this.visit(ce,H,X)}else if(c(D))this.visit(D,H,X)}visitType(D,H,X){if(!this.types||D===void 0||D===null)return;let Y=this.inType;this.inType=!0,this.visitChild(D,H,X),this.inType=Y}declareTypeParameters(D,H){if(!this.types||D===void 0)return;this.scopeIn?.set(D,H);for(let X of D.params)this.scopeIn?.set(X,H),this.declare(H,null,X.name,"type-param",X,null);for(let X of D.params)this.visitType(X.constraint,X,H),this.visitType(X.default,X,H)}visitSignature(D,H,X,Y,ce){let we=this.child(ce,D,!0);this.declareTypeParameters(H,we),this.declareParameters(X,D,we),this.visitType(Y,D,we)}declareParameters(D,H,X){for(let Y of D){if(Y.type==="Identifier"&&Y.name==="this"){if(this.scopeIn?.set(Y,X),this.types)this.visitType(Y.typeAnnotation,Y,X);continue}this.declarePattern(Y,H,X,"param",H,null)}}visitEntityName(D,H,X,Y){if(D.type==="TSImportType"){this.visit(D,H,X);return}let ce=D,we=H;while(ce.type==="TSQualifiedName")this.scopeIn?.set(ce,X),this.scopeIn?.set(ce.right,X),we=ce,ce=ce.left;if(this.scopeIn?.set(ce,X),ce.name==="this")return;let ke=ce!==D&&Y===ki;this.reference(ce,we,X,!0,!1,!1,ke?vh:Y)}visitDeclaration(D,H,X){let Y=D.kind==="await using"?"using":D.kind;if(H?.type==="ConstTag")Y="const-tag";for(let ce of D.declarations)if(this.scopeIn?.set(ce,X),this.declarePattern(ce.id,ce,X,Y,ce,ce.init??null),this.declarators.push([ce,X]),ce.init)this.visit(ce.init,ce,X)}visitFunction(D,H){if(this.types)this.declareTypeParameters(D.typeParameters,H);if(this.declareParameters(D.params,D,H),this.types)this.visitType(D.returnType,D,H);this.visit(D.body,D,H)}declarePattern(D,H,X,Y,ce,we){switch(this.scopeIn?.set(D,X),D.type){case"Identifier":this.declare(X,D,D.name,Y,ce,we);break;case"ObjectPattern":for(let ke of D.properties){if(this.scopeIn?.set(ke,X),ke.type==="RestElement"){this.declarePattern(ke,D,X,Y,ce,we);continue}if(ke.computed)this.visit(ke.key,ke,X);else this.scopeIn?.set(ke.key,X);this.declarePattern(ke.value,ke,X,Y,ce,we)}break;case"ArrayPattern":for(let ke of D.elements)if(ke)this.declarePattern(ke,D,X,Y,ce,we);break;case"RestElement":this.declarePattern(D.argument,D,X,Y,ce,we);break;case"AssignmentPattern":this.declarePattern(D.left,D,X,Y,ce,we),this.visit(D.right,D,X);break;case"TSParameterProperty":this.declarePattern(D.parameter,D,X,Y,ce,we);break;default:this.visit(D,H,X);return}if("decorators"in D&&D.decorators)for(let ke of D.decorators)this.visit(ke,D,X);if(this.types&&"typeAnnotation"in D&&D.typeAnnotation)this.visitType(D.typeAnnotation,D,X)}visitTarget(D,H,X,Y){switch(this.scopeIn?.set(D,X),D.type){case"Identifier":this.reference(D,H,X,Y,!0,!1);return;case"MemberExpression":{let ce=D,we=H;while(ce.type==="MemberExpression"){if(this.scopeIn?.set(ce,X),ce.computed)this.visit(ce.property,ce,X);else this.scopeIn?.set(ce.property,X);we=ce,ce=ce.object}if(ce.type==="Identifier")this.scopeIn?.set(ce,X),this.reference(ce,we,X,!0,!1,!0);else this.visit(ce,we,X);return}case"ObjectPattern":for(let ce of D.properties){if(this.scopeIn?.set(ce,X),ce.type==="RestElement"){this.visitTarget(ce,D,X,!1);continue}if(ce.computed)this.visit(ce.key,ce,X);else this.scopeIn?.set(ce.key,X);this.visitTarget(ce.value,ce,X,!1)}return;case"ArrayPattern":for(let ce of D.elements)if(ce)this.visitTarget(ce,D,X,!1);return;case"RestElement":this.visitTarget(D.argument,D,X,!1);return;case"AssignmentPattern":this.visitTarget(D.left,D,X,!1),this.visit(D.right,D,X);return}if(D.type==="TSAsExpression"||D.type==="TSSatisfiesExpression"||D.type==="TSNonNullExpression"||D.type==="TSTypeAssertion"){if(this.visitTarget(D.expression,D,X,Y),D.type!=="TSNonNullExpression")this.visitType(D.typeAnnotation,D,X);return}this.visit(D,H,X)}visitReactive(D,H){let X=this.child(H,D,!1);this.scopeIn?.set(D.label,H);let{body:Y}=D;if(Y.type==="ExpressionStatement"&&Y.expression.type==="AssignmentExpression"){let{left:ce,right:we}=Y.expression;for(let ke of m(ce))if(!ke.name.startsWith("$"))this.implicit.push([ke,D,we])}this.visit(Y,D,X)}visitComponent(D,H){if(D.type==="Component")this.referenceName(D.name,D.start+1,D,H);let X=Ao(D)!==null,Y=this.scope(D,H,!1),ce=X?H:Y;if(this.made.set(D,ce),D.type==="SvelteComponent")this.visit(D.expression,D,H);for(let we of D.attributes)this.visit(we,D,we.type==="LetDirective"?ce:H);this.scopeIn?.set(D.fragment,Y);for(let we of D.fragment.nodes){let ke=Ao(we);this.visit(we,D.fragment,ke===null?Y:this.child(H,we,!1))}}visitLet(D,H){if(D.expression===null){this.declare(H,null,D.name,"let-directive",D,null);return}let X=(Y)=>{switch(this.scopeIn?.set(Y,H),Y.type){case"Identifier":this.declare(H,Y,Y.name,"let-directive",D,null);return;case"ObjectExpression":for(let ce of Y.properties)if(this.scopeIn?.set(ce,H),ce.type==="SpreadElement")X(ce.argument);else this.scopeIn?.set(ce.key,H),X(ce.value);return;case"ArrayExpression":for(let ce of Y.elements){if(ce===null)continue;if(ce.type==="SpreadElement")this.scopeIn?.set(ce,H),X(ce.argument);else X(ce)}}};X(D.expression)}visitEach(D,H){if(this.visit(D.expression,D,H),D.fallback)this.visit(D.fallback,D,H);let X=this.child(H,D,!1);if(D.context)this.declarePattern(D.context,D,X,"each",D,null);if(D.index!==void 0)this.declare(X,null,D.index,"each-index",D,D);if(D.key)this.visit(D.key,D,X);this.scopeIn?.set(D.body,X);for(let Y of D.body.nodes)this.visit(Y,D.body,X)}visitAwait(D,H){if(this.visit(D.expression,D,H),D.pending)this.visit(D.pending,D,H);for(let[X,Y,ce]of[[D.then,D.value,"await-value"],[D.catch,D.error,"await-error"]]){if(X===null)continue;this.visit(X,D,H);let we=this.made.get(X);if(Y!==null&&we!==void 0)this.declarePattern(Y,D,we,ce,D,null)}}declareImplicit(){for(let[D,H,X]of this.implicit)if(this.instance.get(D.name)===null)this.declare(this.instance,D,D.name,"reactive",H,X)}resolve(){let D=new Set;for(let H of this.pending){let{node:X}=H,Y=this.declared.get(X);if(Y!==void 0&&Y.kind!=="reactive")continue;this.references.set(X,H);let{meaning:ce}=H,we;if(ce===cn)we=H.scope.get(X.name);else if(ce!==Co)we=H.scope.lookup(X.name,ce);else if(H.type)we=H.scope.getType(X.name)??H.scope.get(X.name);else if(we=H.scope.get(X.name),we===null){if(we=H.scope.getType(X.name),we!==null)H.type=!0,H.reads=!1}if(we===null&&this.component&&ce!==ki){let ke=this.storeOf(X.name);if(ke!==!1)H.store=!0,H.mutates||=H.writes,H.reads=!H.type,H.writes=!1,we=ke}if(we!==null){H.binding=we;let ke=we.references.at(-1);if(ke!==void 0&&ke.node.start>X.start)D.add(we);we.references.push(H)}}for(let H of D)H.references.sort((X,Y)=>X.node.start-Y.node.start)}storeOf(D){let H=this.stores.get(D);if(H!==void 0)return H;let X=!1;if(D.length>1&&D.startsWith("$")&&!D.startsWith("$$")){let Y=this.instance.get(D.slice(1));if(!Eo.has(D))X=Y;else if(Y!==null){let ce=Y.initial,we=No(ce,this.instance,null);if((we===null||D!=="$props"&&we==="$props")&&!(D==="$derived"&&ce?.type==="ImportDeclaration"&&ce.source.value==="svelte/store"))X=Y}}return this.stores.set(D,X),X}findRunesAndProps(){for(let[D,H]of this.declarators){let X=No(D.init??null,H,this.references);if(X===null)continue;for(let Y of m(D.id)){let ce=this.declared.get(Y);if(ce?.declaration===D)ce.rune=X}if(X!=="$props")continue;if(D.id.type==="Identifier"){let Y=this.declared.get(D.id);if(Y)Y.initial=null;continue}if(D.id.type!=="ObjectPattern")continue;for(let Y of D.id.properties){if(Y.type==="RestElement"){for(let ke of m(Y)){let ve=this.declared.get(ke);if(ve)ve.initial=null}continue}let ce=Y.value.type==="AssignmentPattern"?Y.value.left:Y.value,we=ce.type==="Identifier"?this.declared.get(ce):void 0;if(we===void 0||Y.computed)continue;we.prop=_h(Y.key),we.initial=Y.value.type==="AssignmentPattern"?Nh(Y.value.right):null}}this.findLegacyProps()}findLegacyProps(){if(this.instanceProgram===null)return;for(let D of this.instanceProgram.body){if(D.type!=="ExportNamedDeclaration")continue;let{declaration:H}=D;if(H?.type==="VariableDeclaration"){if(H.kind!=="let"&&H.kind!=="var")continue;for(let X of H.declarations)for(let Y of m(X.id)){let ce=this.declared.get(Y);if(ce)ce.prop=Y.name}continue}if(D.source)continue;for(let X of D.specifiers){if(X.local.type!=="Identifier")continue;let Y=this.instance.declarations.get(X.local.name);if(Y?.kind!=="let"&&Y?.kind!=="var")continue;Y.prop=X.exported.type==="Identifier"?X.exported.name:String(X.exported.value)}}}}function Ch(D,H){switch(H.type){case"TSPropertySignature":case"TSMethodSignature":return H.computed===!0&&D===H.key;case"TSTypePredicate":return D===H.parameterName;default:return b(D,H)}}function Ah(D){return D.type==="ArrowFunctionExpression"||D.type==="FunctionExpression"||D.type==="FunctionDeclaration"}function Ao(D){if(!kh.has(D.type)||!("attributes"in D))return null;for(let H of D.attributes??[])if(H.type==="Attribute"&&H.name==="slot"&&Array.isArray(H.value)&&H.value.length===1&&H.value[0].type==="Text")return H.value[0].data;return null}function No(D,H,X){if(D?.type!=="CallExpression")return null;let Y=D.callee,ce="";while(Y.type==="MemberExpression"){if(Y.computed||Y.property.type!=="Identifier")return null;ce=`.${Y.property.name}${ce}`,Y=Y.object}if(Y.type==="CallExpression"&&Y.callee.type==="Identifier")ce=`()${ce}`,Y=Y.callee;if(Y.type!=="Identifier")return null;if(X!==null){let we=X.get(Y);if(we?.binding!==null||we.store)return null}else if(H.get(Y.name)!==null)return null;return ce=Y.name+ce,ko.has(ce)?ce:null}function Nh(D){if(D.type==="CallExpression"&&D.callee.type==="Identifier"&&D.callee.name==="$bindable"){let[H]=D.arguments;return H===void 0||H.type==="SpreadElement"?null:H}return D}function Th(D){if(D.type==="UseDirective")return 4;if(D.type==="AnimateDirective")return 8;if(D.intro&&D.outro)return 11;return D.intro?3:4}function _h(D){if(D.type==="Identifier")return D.name;return D.type==="Literal"?String(D.value):null}var cr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},pr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Ih={5:pr,"5module":pr+" export import",6:pr+" const class extends export import super"},Oo=/^in(stanceof)?$/,$h=/\p{ID_Start}/u,Ph=/[\p{ID_Continue}\u200c\u200d]/u;function Qt(D,H){if(D<65)return D===36;if(D<91)return!0;if(D<97)return D===95;if(D<123)return!0;if(D>65535&&H===!1)return!1;return D>=170&&$h.test(String.fromCodePoint(D))}function ei(D,H){if(D<48)return D===36;if(D<58)return!0;if(D<65)return!1;if(D<91)return!0;if(D<97)return D===95;if(D<123)return!0;if(D>65535&&H===!1)return!1;return D>=170&&Ph.test(String.fromCodePoint(D))}var pt=function(D,H){if(H===void 0)H={};this.label=D,this.keyword=H.keyword,this.beforeExpr=!!H.beforeExpr,this.startsExpr=!!H.startsExpr,this.isLoop=!!H.isLoop,this.isAssign=!!H.isAssign,this.prefix=!!H.prefix,this.postfix=!!H.postfix,this.binop=H.binop||null,this.updateContext=null};function Bt(D,H){return new pt(D,{beforeExpr:!0,binop:H})}var Ft={beforeExpr:!0},_t={startsExpr:!0},dr={};function ct(D,H){if(H===void 0)H={};return H.keyword=D,dr[D]=new pt(D,H)}var Te={num:new pt("num",_t),regexp:new pt("regexp",_t),string:new pt("string",_t),name:new pt("name",_t),privateId:new pt("privateId",_t),eof:new pt("eof"),bracketL:new pt("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new pt("]"),braceL:new pt("{",{beforeExpr:!0,startsExpr:!0}),braceR:new pt("}"),parenL:new pt("(",{beforeExpr:!0,startsExpr:!0}),parenR:new pt(")"),comma:new pt(",",Ft),semi:new pt(";",Ft),colon:new pt(":",Ft),dot:new pt("."),question:new pt("?",Ft),questionDot:new pt("?."),arrow:new pt("=>",Ft),template:new pt("template"),invalidTemplate:new pt("invalidTemplate"),ellipsis:new pt("...",Ft),backQuote:new pt("`",_t),dollarBraceL:new pt("${",{beforeExpr:!0,startsExpr:!0}),eq:new pt("=",{beforeExpr:!0,isAssign:!0}),assign:new pt("_=",{beforeExpr:!0,isAssign:!0}),incDec:new pt("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new pt("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Bt("||",1),logicalAND:Bt("&&",2),bitwiseOR:Bt("|",3),bitwiseXOR:Bt("^",4),bitwiseAND:Bt("&",5),equality:Bt("==/!=/===/!==",6),relational:Bt("</>/<=/>=",7),bitShift:Bt("<</>>/>>>",8),plusMin:new pt("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Bt("%",10),star:Bt("*",10),slash:Bt("/",10),starstar:new pt("**",{beforeExpr:!0}),coalesce:Bt("??",1),_break:ct("break"),_case:ct("case",Ft),_catch:ct("catch"),_continue:ct("continue"),_debugger:ct("debugger"),_default:ct("default",Ft),_do:ct("do",{isLoop:!0,beforeExpr:!0}),_else:ct("else",Ft),_finally:ct("finally"),_for:ct("for",{isLoop:!0}),_function:ct("function",_t),_if:ct("if"),_return:ct("return",Ft),_switch:ct("switch"),_throw:ct("throw",Ft),_try:ct("try"),_var:ct("var"),_const:ct("const"),_while:ct("while",{isLoop:!0}),_with:ct("with"),_new:ct("new",{beforeExpr:!0,startsExpr:!0}),_this:ct("this",_t),_super:ct("super",_t),_class:ct("class",_t),_extends:ct("extends",Ft),_export:ct("export"),_import:ct("import",_t),_null:ct("null",_t),_true:ct("true",_t),_false:ct("false",_t),_in:ct("in",{beforeExpr:!0,binop:7}),_instanceof:ct("instanceof",{beforeExpr:!0,binop:7}),_typeof:ct("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:ct("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:ct("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},It=/\r\n?|\n|\u2028|\u2029/,Mh=new RegExp(It.source,"g");function Ii(D){return D===10||D===13||D===8232||D===8233}function Vo(D,H,X){if(X===void 0)X=D.length;for(var Y=H;Y<X;Y++){var ce=D.charCodeAt(Y);if(Ii(ce))return Y<X-1&&ce===13&&D.charCodeAt(Y+1)===10?Y+2:Y+1}return-1}var Do=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,wt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Rh=Object.prototype,{hasOwnProperty:Lh,toString:Oh}=Rh,hn=Object.hasOwn||function(D,H){return Lh.call(D,H)},Po=Array.isArray||function(D){return Oh.call(D)==="[object Array]"},Mo=Object.create(null);function zn(D){return Mo[D]||(Mo[D]=new RegExp("^(?:"+D.replace(/ /g,"|")+")$"))}function Xn(D){if(D<=65535)return String.fromCharCode(D);return D-=65536,String.fromCharCode((D>>10)+55296,(D&1023)+56320)}var Vh=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,un=function(D,H){this.line=D,this.column=H};un.prototype.offset=function(D){return new un(this.line,this.column+D)};var Yn=function(D,H,X){if(this.start=H,this.end=X,D.sourceFile!==null)this.source=D.sourceFile};function Bo(D,H){for(var X=1,Y=0;;){var ce=Vo(D,Y,H);if(ce<0)return new un(X,H-Y);++X,Y=ce}}var ur={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ro=!1;function Dh(D){var H={};for(var X in ur)H[X]=D&&hn(D,X)?D[X]:ur[X];if(H.ecmaVersion==="latest")H.ecmaVersion=1e8;else if(H.ecmaVersion==null){if(!Ro&&typeof console==="object"&&console.warn)Ro=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
2
|
+
Defaulting to 2020, but this will stop working in the future.`);H.ecmaVersion=11}else if(H.ecmaVersion>=2015)H.ecmaVersion-=2009;if(H.allowReserved==null)H.allowReserved=H.ecmaVersion<5;if(!D||D.allowHashBang==null)H.allowHashBang=H.ecmaVersion>=14;if(Po(H.onToken)){var Y=H.onToken;H.onToken=function(ce){return Y.push(ce)}}if(Po(H.onComment))H.onComment=Bh(H,H.onComment);if(H.sourceType==="commonjs"&&H.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return H}function Bh(D,H){return function(X,Y,ce,we,ke,ve){var Ee={type:X?"Block":"Line",value:Y,start:ce,end:we};if(D.locations)Ee.loc=new Yn(this,ke,ve);if(D.ranges)Ee.range=[ce,we];H.push(Ee)}}var Ei=1,Ci=2,mr=4,Fo=8,yr=16,Uo=32,Qn=64,jo=128,Ai=256,fn=512,Wo=1024,Jn=Ei|Ci|Ai;function gr(D,H){return Ci|(D?mr:0)|(H?Fo:0)}var Kn=0,xr=1,oi=2,qo=3,zo=4,Ko=5,St=function(D,H,X){this.options=D=Dh(D),this.sourceFile=D.sourceFile,this.keywords=zn(Ih[D.ecmaVersion>=6?6:D.sourceType==="module"?"5module":5]);var Y="";if(D.allowReserved!==!0){if(Y=cr[D.ecmaVersion>=6?6:D.ecmaVersion===5?5:3],D.sourceType==="module")Y+=" await"}this.reservedWords=zn(Y);var ce=(Y?Y+" ":"")+cr.strict;if(this.reservedWordsStrict=zn(ce),this.reservedWordsStrictBind=zn(ce+" "+cr.strictBind),this.input=String(H),this.containsEsc=!1,this.pos=X||0,this.curLine=1,D.startLocation)this.lineStart=this.pos-D.startLocation.column,this.curLine=D.startLocation.line;else if(X){if(this.lineStart=this.input.lastIndexOf(`
|
|
3
|
+
`,X-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(It).length}else this.lineStart=0;if(this.type=Te.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=D.sourceType==="module",this.strict=this.inModule||D.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&D.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ci:Ei),this.regexpState=null,this.privateNameStack=[]},Ut={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};St.prototype.parse=function(){var D=this,H=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return D.parseTopLevel(H)})};Ut.inFunction.get=function(){return(this.currentVarScope().flags&Ci)>0};Ut.inGenerator.get=function(){return(this.currentVarScope().flags&Fo)>0};Ut.inAsync.get=function(){return(this.currentVarScope().flags&mr)>0};Ut.canAwait.get=function(){for(var D=this.scopeStack.length-1;D>=0;D--){var H=this.scopeStack[D],X=H.flags;if(X&(Ai|fn))return!1;if(X&Ci)return(X&mr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ut.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Ei)return!0;return!1};Ut.allowSuper.get=function(){var D=this.currentThisScope(),H=D.flags;return(H&Qn)>0||this.options.allowSuperOutsideMethod};Ut.allowDirectSuper.get=function(){return(this.currentThisScope().flags&jo)>0};Ut.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ut.allowNewDotTarget.get=function(){for(var D=this.scopeStack.length-1;D>=0;D--){var H=this.scopeStack[D],X=H.flags;if(X&(Ai|fn)||X&Ci&&!(X&yr))return!0}return!1};Ut.allowUsing.get=function(){var D=this.currentScope(),H=D.flags;if(H&Wo)return!1;if(!this.inModule&&H&Ei)return!1;return!0};Ut.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ai)>0};St.extend=function(){var D=[],H=arguments.length;while(H--)D[H]=arguments[H];var X=this;for(var Y=0;Y<D.length;Y++)X=D[Y](X);return X};St.parse=function(D,H){return new this(H,D).parse()};St.parseExpressionAt=function(D,H,X){var Y=new this(X,D,H);return Y.nextToken(),Y.parseExpression()};St.tokenizer=function(D,H){return new this(H,D)};Object.defineProperties(St.prototype,Ut);var Nt=St.prototype,Fh=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Nt.strictDirective=function(D){if(this.options.ecmaVersion<5)return!1;for(;;){wt.lastIndex=D,D+=wt.exec(this.input)[0].length;var H=Fh.exec(this.input.slice(D));if(!H)return!1;if((H[1]||H[2])==="use strict"){wt.lastIndex=D+H[0].length;var X=wt.exec(this.input),Y=X.index+X[0].length,ce=this.input.charAt(Y);return ce===";"||ce==="}"||It.test(X[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(ce)||ce==="!"&&this.input.charAt(Y+1)==="="||ce==="i"&&Uh(this,Y))}if(D+=H[0].length,wt.lastIndex=D,D+=wt.exec(this.input)[0].length,this.input[D]===";")D++}};function Uh(D,H){var X=H+1,Y=Math.min(D.input.length,H+11);while(X<Y){var ce=D.fullCharCodeAt(X);if(!ei(ce,!0))break;X+=ce<=65535?1:2}return X===H+2&&D.input.slice(H,X)==="in"||X===H+10&&D.input.slice(H,X)==="instanceof"}Nt.eat=function(D){if(this.type===D)return this.next(),!0;else return!1};Nt.isContextual=function(D){return this.type===Te.name&&this.value===D&&!this.containsEsc};Nt.eatContextual=function(D){if(!this.isContextual(D))return!1;return this.next(),!0};Nt.catchStackOverflow=function(D){try{return D()}catch(H){if(H instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(H.message)||/\btoo much recursion\b/i.test(H.message)))this.raise(this.start,"Not enough stack space to parse input");else throw H}};Nt.expectContextual=function(D){if(!this.eatContextual(D))this.unexpected()};Nt.canInsertSemicolon=function(){return this.type===Te.eof||this.type===Te.braceR||It.test(this.input.slice(this.lastTokEnd,this.start))};Nt.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};Nt.semicolon=function(){if(!this.eat(Te.semi)&&!this.insertSemicolon())this.unexpected()};Nt.afterTrailingComma=function(D,H){if(this.type===D){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!H)this.next();return!0}};Nt.expect=function(D){this.eat(D)||this.unexpected()};Nt.unexpected=function(D){this.raise(D!=null?D:this.start,"Unexpected token")};var Zn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Nt.checkPatternErrors=function(D,H){if(!D)return;if(D.trailingComma>-1)this.raiseRecoverable(D.trailingComma,"Comma is not permitted after the rest element");var X=H?D.parenthesizedAssign:D.parenthesizedBind;if(X>-1)this.raiseRecoverable(X,H?"Assigning to rvalue":"Parenthesized pattern")};Nt.checkExpressionErrors=function(D,H){if(!D)return!1;var{shorthandAssign:X,doubleProto:Y}=D;if(!H)return X>=0||Y>=0;if(X>=0)this.raise(X,"Shorthand property assignments are valid only in destructuring patterns");if(Y>=0)this.raiseRecoverable(Y,"Redefinition of __proto__ property")};Nt.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};Nt.isSimpleAssignTarget=function(D){if(D.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(D.expression);return D.type==="Identifier"||D.type==="MemberExpression"};var Je=St.prototype;Je.parseTopLevel=function(D){var H=Object.create(null);if(!D.body)D.body=[];while(this.type!==Te.eof){var X=this.parseStatement(null,!0,H);D.body.push(X)}if(this.inModule)for(var Y=0,ce=Object.keys(this.undefinedExports);Y<ce.length;Y+=1){var we=ce[Y];this.raiseRecoverable(this.undefinedExports[we].start,"Export '"+we+"' is not defined")}return this.adaptDirectivePrologue(D.body),this.next(),D.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(D,"Program")};var vr={kind:"loop"},jh={kind:"switch"};Je.isLet=function(D){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;wt.lastIndex=this.pos;var H=wt.exec(this.input),X=this.pos+H[0].length,Y=this.fullCharCodeAt(X);if(Y===91||Y===92)return!0;if(D)return!1;if(Y===123)return!0;if(Qt(Y)){var ce=X;do X+=Y<=65535?1:2;while(ei(Y=this.fullCharCodeAt(X)));if(Y===92)return!0;var we=this.input.slice(ce,X);if(!Oo.test(we))return!0}return!1};Je.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;wt.lastIndex=this.pos;var D=wt.exec(this.input),H=this.pos+D[0].length,X;return!It.test(this.input.slice(this.pos,H))&&this.input.slice(H,H+8)==="function"&&(H+8===this.input.length||!(ei(X=this.fullCharCodeAt(H+8))||X===92))};Je.isUsingKeyword=function(D,H){if(this.options.ecmaVersion<17||!this.isContextual(D?"await":"using"))return!1;wt.lastIndex=this.pos;var X=wt.exec(this.input),Y=this.pos+X[0].length;if(It.test(this.input.slice(this.pos,Y)))return!1;if(D){var ce=Y+5,we;if(this.input.slice(Y,ce)!=="using"||ce===this.input.length||ei(we=this.fullCharCodeAt(ce))||we===92)return!1;wt.lastIndex=ce;var ke=wt.exec(this.input);if(Y=ce+ke[0].length,ke&&It.test(this.input.slice(ce,Y)))return!1}var ve=this.fullCharCodeAt(Y);if(!Qt(ve)&&ve!==92)return!1;var Ee=Y;do Y+=ve<=65535?1:2;while(ei(ve=this.fullCharCodeAt(Y)));if(ve===92)return!0;var Ce=this.input.slice(Ee,Y);if(Oo.test(Ce))return!1;if(H&&!D&&Ce==="of"){wt.lastIndex=Y;var Ae=wt.exec(this.input);if(Y=Y+Ae[0].length,this.input.charCodeAt(Y)!==61||(ve=this.input.charCodeAt(Y+1))===61||ve===62)return!1}return!0};Je.isAwaitUsing=function(D){return this.isUsingKeyword(!0,D)};Je.isUsing=function(D){return this.isUsingKeyword(!1,D)};Je.parseStatement=function(D,H,X){var Y=this.type,ce=this.startNode(),we;if(this.isLet(D))Y=Te._var,we="let";switch(Y){case Te._break:case Te._continue:return this.parseBreakContinueStatement(ce,Y.keyword);case Te._debugger:return this.parseDebuggerStatement(ce);case Te._do:return this.parseDoStatement(ce);case Te._for:return this.parseForStatement(ce);case Te._function:if(D&&(this.strict||D!=="if"&&D!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(ce,!1,!D);case Te._class:if(D)this.unexpected();return this.parseClass(ce,!0);case Te._if:return this.parseIfStatement(ce);case Te._return:return this.parseReturnStatement(ce);case Te._switch:return this.parseSwitchStatement(ce);case Te._throw:return this.parseThrowStatement(ce);case Te._try:return this.parseTryStatement(ce);case Te._const:case Te._var:if(we=we||this.value,D&&we!=="var")this.unexpected();return this.parseVarStatement(ce,we);case Te._while:return this.parseWhileStatement(ce);case Te._with:return this.parseWithStatement(ce);case Te.braceL:return this.parseBlock(!0,ce);case Te.semi:return this.parseEmptyStatement(ce);case Te._export:case Te._import:if(this.options.ecmaVersion>10&&Y===Te._import){wt.lastIndex=this.pos;var ke=wt.exec(this.input),ve=this.pos+ke[0].length,Ee=this.input.charCodeAt(ve);if(Ee===40||Ee===46)return this.parseExpressionStatement(ce,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!H)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return Y===Te._import?this.parseImport(ce):this.parseExport(ce,X);default:if(this.isAsyncFunction()){if(D)this.unexpected();return this.next(),this.parseFunctionStatement(ce,!0,!D)}var Ce=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(Ce){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(D)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(Ce==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(ce,!1,Ce),this.semicolon(),this.finishNode(ce,"VariableDeclaration")}var Ae=this.value,_e=this.parseExpression();if(Y===Te.name&&_e.type==="Identifier"&&this.eat(Te.colon))return this.parseLabeledStatement(ce,Ae,_e,D);else return this.parseExpressionStatement(ce,_e)}};Je.parseBreakContinueStatement=function(D,H){var X=H==="break";if(this.next(),this.eat(Te.semi)||this.insertSemicolon())D.label=null;else if(this.type!==Te.name)this.unexpected();else D.label=this.parseIdent(),this.semicolon();var Y=0;for(;Y<this.labels.length;++Y){var ce=this.labels[Y];if(D.label==null||ce.name===D.label.name){if(ce.kind!=null&&(X||ce.kind==="loop"))break;if(D.label&&X)break}}if(Y===this.labels.length)this.raise(D.start,"Unsyntactic "+H);return this.finishNode(D,X?"BreakStatement":"ContinueStatement")};Je.parseDebuggerStatement=function(D){return this.next(),this.semicolon(),this.finishNode(D,"DebuggerStatement")};Je.parseDoStatement=function(D){if(this.next(),this.labels.push(vr),D.body=this.parseStatement("do"),this.labels.pop(),this.expect(Te._while),D.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(Te.semi);else this.semicolon();return this.finishNode(D,"DoWhileStatement")};Je.parseForStatement=function(D){this.next();var H=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(vr),this.enterScope(0),this.expect(Te.parenL),this.type===Te.semi){if(H>-1)this.unexpected(H);return this.parseFor(D,null)}var X=this.isLet();if(this.type===Te._var||this.type===Te._const||X){var Y=this.startNode(),ce=X?"let":this.value;return this.next(),this.parseVar(Y,!0,ce),this.finishNode(Y,"VariableDeclaration"),this.parseForAfterInit(D,Y,H)}var we=this.isContextual("let"),ke=!1,ve=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ve){var Ee=this.startNode();if(this.next(),ve==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(Ee,!0,ve),this.finishNode(Ee,"VariableDeclaration"),this.parseForAfterInit(D,Ee,H)}var Ce=this.containsEsc,Ae=new Zn,_e=this.start,Ne=H>-1?this.parseExprSubscripts(Ae,"await"):this.parseExpression(!0,Ae);if(this.type===Te._in||(ke=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(H>-1){if(this.type===Te._in)this.unexpected(H);D.await=!0}else if(ke&&this.options.ecmaVersion>=8){if(Ne.start===_e&&!Ce&&Ne.type==="Identifier"&&Ne.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)D.await=!1}if(we&&ke)this.raise(Ne.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(Ne,!1,Ae),this.checkLValPattern(Ne),this.parseForIn(D,Ne)}else this.checkExpressionErrors(Ae,!0);if(H>-1)this.unexpected(H);return this.parseFor(D,Ne)};Je.parseForAfterInit=function(D,H,X){if((this.type===Te._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&H.declarations.length===1){if(this.type===Te._in){if((H.kind==="using"||H.kind==="await using")&&!H.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&X>-1)this.unexpected(X)}else if(this.options.ecmaVersion>=9)D.await=X>-1;return this.parseForIn(D,H)}if(X>-1)this.unexpected(X);return this.parseFor(D,H)};Je.parseFunctionStatement=function(D,H,X){return this.next(),this.parseFunction(D,pn|(X?0:hr),!1,H)};Je.parseIfStatement=function(D){return this.next(),D.test=this.parseParenExpression(),D.consequent=this.parseStatement("if"),D.alternate=this.eat(Te._else)?this.parseStatement("if"):null,this.finishNode(D,"IfStatement")};Je.parseReturnStatement=function(D){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(Te.semi)||this.insertSemicolon())D.argument=null;else D.argument=this.parseExpression(),this.semicolon();return this.finishNode(D,"ReturnStatement")};Je.parseSwitchStatement=function(D){this.next(),D.discriminant=this.parseParenExpression(),D.cases=[],this.expect(Te.braceL),this.labels.push(jh),this.enterScope(Wo);var H;for(var X=!1;this.type!==Te.braceR;)if(this.type===Te._case||this.type===Te._default){var Y=this.type===Te._case;if(H)this.finishNode(H,"SwitchCase");if(D.cases.push(H=this.startNode()),H.consequent=[],this.next(),Y)H.test=this.parseExpression();else{if(X)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");X=!0,H.test=null}this.expect(Te.colon)}else{if(!H)this.unexpected();H.consequent.push(this.parseStatement(null))}if(this.exitScope(),H)this.finishNode(H,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(D,"SwitchStatement")};Je.parseThrowStatement=function(D){if(this.next(),It.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return D.argument=this.parseExpression(),this.semicolon(),this.finishNode(D,"ThrowStatement")};var Wh=[];Je.parseCatchClauseParam=function(){var D=this.parseBindingAtom(),H=D.type==="Identifier";return this.enterScope(H?Uo:0),this.checkLValPattern(D,H?zo:oi),this.expect(Te.parenR),D};Je.parseTryStatement=function(D){if(this.next(),D.block=this.parseBlock(),D.handler=null,this.type===Te._catch){var H=this.startNode();if(this.next(),this.eat(Te.parenL))H.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();H.param=null,this.enterScope(0)}H.body=this.parseBlock(!1),this.exitScope(),D.handler=this.finishNode(H,"CatchClause")}if(D.finalizer=this.eat(Te._finally)?this.parseBlock():null,!D.handler&&!D.finalizer)this.raise(D.start,"Missing catch or finally clause");return this.finishNode(D,"TryStatement")};Je.parseVarStatement=function(D,H,X){return this.next(),this.parseVar(D,!1,H,X),this.semicolon(),this.finishNode(D,"VariableDeclaration")};Je.parseWhileStatement=function(D){return this.next(),D.test=this.parseParenExpression(),this.labels.push(vr),D.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(D,"WhileStatement")};Je.parseWithStatement=function(D){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),D.object=this.parseParenExpression(),D.body=this.parseStatement("with"),this.finishNode(D,"WithStatement")};Je.parseEmptyStatement=function(D){return this.next(),this.finishNode(D,"EmptyStatement")};Je.parseLabeledStatement=function(D,H,X,Y){for(var ce=0,we=this.labels;ce<we.length;ce+=1){var ke=we[ce];if(ke.name===H)this.raise(X.start,"Label '"+H+"' is already declared")}var ve=this.type.isLoop?"loop":this.type===Te._switch?"switch":null;for(var Ee=this.labels.length-1;Ee>=0;Ee--){var Ce=this.labels[Ee];if(Ce.statementStart===D.start)Ce.statementStart=this.start,Ce.kind=ve;else break}return this.labels.push({name:H,kind:ve,statementStart:this.start}),D.body=this.parseStatement(Y?Y.indexOf("label")===-1?Y+"label":Y:"label"),this.labels.pop(),D.label=X,this.finishNode(D,"LabeledStatement")};Je.parseExpressionStatement=function(D,H){return D.expression=H,this.semicolon(),this.finishNode(D,"ExpressionStatement")};Je.parseBlock=function(D,H,X){if(D===void 0)D=!0;if(H===void 0)H=this.startNode();if(H.body=[],this.expect(Te.braceL),D)this.enterScope(0);while(this.type!==Te.braceR){var Y=this.parseStatement(null);H.body.push(Y)}if(X)this.strict=!1;if(this.next(),D)this.exitScope();return this.finishNode(H,"BlockStatement")};Je.parseFor=function(D,H){return D.init=H,this.expect(Te.semi),D.test=this.type===Te.semi?null:this.parseExpression(),this.expect(Te.semi),D.update=this.type===Te.parenR?null:this.parseExpression(),this.expect(Te.parenR),D.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(D,"ForStatement")};Je.parseForIn=function(D,H){var X=this.type===Te._in;if(this.next(),H.type==="VariableDeclaration"&&H.declarations[0].init!=null&&(!X||this.options.ecmaVersion<8||this.strict||H.kind!=="var"||H.declarations[0].id.type!=="Identifier"))this.raise(H.start,(X?"for-in":"for-of")+" loop variable declaration may not have an initializer");return D.left=H,D.right=X?this.parseExpression():this.parseMaybeAssign(),this.expect(Te.parenR),D.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(D,X?"ForInStatement":"ForOfStatement")};Je.parseVar=function(D,H,X,Y){D.declarations=[],D.kind=X;for(;;){var ce=this.startNode();if(this.parseVarId(ce,X),this.eat(Te.eq))ce.init=this.parseMaybeAssign(H);else if(!Y&&X==="const"&&!(this.type===Te._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!Y&&(X==="using"||X==="await using")&&this.options.ecmaVersion>=17&&this.type!==Te._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+X+" declaration");else if(!Y&&ce.id.type!=="Identifier"&&!(H&&(this.type===Te._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else ce.init=null;if(D.declarations.push(this.finishNode(ce,"VariableDeclarator")),!this.eat(Te.comma))break}return D};Je.parseVarId=function(D,H){D.id=H==="using"||H==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(D.id,H==="var"?xr:oi,!1)};var pn=1,hr=2,Go=4;Je.parseFunction=function(D,H,X,Y,ce){if(this.initFunction(D),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!Y){if(this.type===Te.star&&H&hr)this.unexpected();D.generator=this.eat(Te.star)}if(this.options.ecmaVersion>=8)D.async=!!Y;if(H&pn){if(D.id=H&Go&&this.type!==Te.name?null:this.parseIdent(),D.id&&!(H&hr))this.checkLValSimple(D.id,this.strict||D.generator||D.async?this.treatFunctionsAsVar?xr:oi:qo)}var we=this.yieldPos,ke=this.awaitPos,ve=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(gr(D.async,D.generator)),!(H&pn))D.id=this.type===Te.name?this.parseIdent():null;return this.parseFunctionParams(D),this.parseFunctionBody(D,X,!1,ce),this.yieldPos=we,this.awaitPos=ke,this.awaitIdentPos=ve,this.finishNode(D,H&pn?"FunctionDeclaration":"FunctionExpression")};Je.parseFunctionParams=function(D){this.expect(Te.parenL),D.params=this.parseBindingList(Te.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Je.parseClass=function(D,H){this.next();var X=this.strict;this.strict=!0,this.parseClassId(D,H),this.parseClassSuper(D);var Y=this.enterClassBody(),ce=this.startNode(),we=!1;ce.body=[],this.expect(Te.braceL);while(this.type!==Te.braceR){var ke=this.parseClassElement(D.superClass!==null);if(ke){if(ce.body.push(ke),ke.type==="MethodDefinition"&&ke.kind==="constructor"){if(we)this.raiseRecoverable(ke.start,"Duplicate constructor in the same class");we=!0}else if(ke.key&&ke.key.type==="PrivateIdentifier"&&qh(Y,ke))this.raiseRecoverable(ke.key.start,"Identifier '#"+ke.key.name+"' has already been declared")}}return this.strict=X,this.next(),D.body=this.finishNode(ce,"ClassBody"),this.exitClassBody(),this.finishNode(D,H?"ClassDeclaration":"ClassExpression")};Je.parseClassElement=function(D){if(this.eat(Te.semi))return null;var H=this.options.ecmaVersion,X=this.startNode(),Y="",ce=!1,we=!1,ke="method",ve=!1;if(this.eatContextual("static")){if(H>=13&&this.eat(Te.braceL))return this.parseClassStaticBlock(X),X;if(this.isClassElementNameStart()||this.type===Te.star)ve=!0;else Y="static"}if(X.static=ve,!Y&&H>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===Te.star)&&!this.canInsertSemicolon())we=!0;else Y="async";if(!Y&&(H>=9||!we)&&this.eat(Te.star))ce=!0;if(!Y&&!we&&!ce){var Ee=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())ke=Ee;else Y=Ee}if(Y)X.computed=!1,X.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),X.key.name=Y,this.finishNode(X.key,"Identifier");else this.parseClassElementName(X);if(H<13||this.type===Te.parenL||ke!=="method"||ce||we){var Ce=!X.static&&Gn(X,"constructor"),Ae=Ce&&D;if(Ce&&ke!=="method")this.raise(X.key.start,"Constructor can't have get/set modifier");X.kind=Ce?"constructor":ke,this.parseClassMethod(X,ce,we,Ae)}else this.parseClassField(X);return X};Je.isClassElementNameStart=function(){return this.type===Te.name||this.type===Te.privateId||this.type===Te.num||this.type===Te.string||this.type===Te.bracketL||this.type.keyword};Je.parseClassElementName=function(D){if(this.type===Te.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");D.computed=!1,D.key=this.parsePrivateIdent()}else this.parsePropertyName(D)};Je.parseClassMethod=function(D,H,X,Y){var ce=D.key;if(D.kind==="constructor"){if(H)this.raise(ce.start,"Constructor can't be a generator");if(X)this.raise(ce.start,"Constructor can't be an async method")}else if(D.static&&Gn(D,"prototype"))this.raise(ce.start,"Classes may not have a static property named prototype");var we=D.value=this.parseMethod(H,X,Y);if(D.kind==="get"&&we.params.length!==0)this.raiseRecoverable(we.start,"getter should have no params");if(D.kind==="set"&&we.params.length!==1)this.raiseRecoverable(we.start,"setter should have exactly one param");if(D.kind==="set"&&we.params[0].type==="RestElement")this.raiseRecoverable(we.params[0].start,"Setter cannot use rest params");return this.finishNode(D,"MethodDefinition")};Je.parseClassField=function(D){if(Gn(D,"constructor"))this.raise(D.key.start,"Classes can't have a field named 'constructor'");else if(D.static&&Gn(D,"prototype"))this.raise(D.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(Te.eq))this.enterScope(fn|Qn),D.value=this.parseMaybeAssign(),this.exitScope();else D.value=null;return this.semicolon(),this.finishNode(D,"PropertyDefinition")};Je.parseClassStaticBlock=function(D){D.body=[];var H=this.labels;this.labels=[],this.enterScope(Ai|Qn);while(this.type!==Te.braceR){var X=this.parseStatement(null);D.body.push(X)}return this.next(),this.exitScope(),this.labels=H,this.finishNode(D,"StaticBlock")};Je.parseClassId=function(D,H){if(this.type===Te.name){if(D.id=this.parseIdent(),H)this.checkLValSimple(D.id,oi,!1)}else{if(H===!0)this.unexpected();D.id=null}};Je.parseClassSuper=function(D){D.superClass=this.eat(Te._extends)?this.parseExprSubscripts(null,!1):null};Je.enterClassBody=function(){var D={declared:Object.create(null),used:[]};return this.privateNameStack.push(D),D.declared};Je.exitClassBody=function(){var D=this.privateNameStack.pop(),{declared:H,used:X}=D;if(!this.options.checkPrivateFields)return;var Y=this.privateNameStack.length,ce=Y===0?null:this.privateNameStack[Y-1];for(var we=0;we<X.length;++we){var ke=X[we];if(!hn(H,ke.name))if(ce)ce.used.push(ke);else this.raiseRecoverable(ke.start,"Private field '#"+ke.name+"' must be declared in an enclosing class")}};function qh(D,H){var X=H.key.name,Y=D[X],ce="true";if(H.type==="MethodDefinition"&&(H.kind==="get"||H.kind==="set"))ce=(H.static?"s":"i")+H.kind;if(Y==="iget"&&ce==="iset"||Y==="iset"&&ce==="iget"||Y==="sget"&&ce==="sset"||Y==="sset"&&ce==="sget")return D[X]="true",!1;else if(!Y)return D[X]=ce,!1;else return!0}function Gn(D,H){var{computed:X,key:Y}=D;return!X&&(Y.type==="Identifier"&&Y.name===H||Y.type==="Literal"&&Y.value===H)}Je.parseExportAllDeclaration=function(D,H){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))D.exported=this.parseModuleExportName(),this.checkExport(H,D.exported,this.lastTokStart);else D.exported=null;if(this.expectContextual("from"),this.type!==Te.string)this.unexpected();if(D.source=this.parseExprAtom(),this.options.ecmaVersion>=16)D.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(D,"ExportAllDeclaration")};Je.parseExport=function(D,H){if(this.next(),this.eat(Te.star))return this.parseExportAllDeclaration(D,H);if(this.eat(Te._default))return this.checkExport(H,"default",this.lastTokStart),D.declaration=this.parseExportDefaultDeclaration(),this.finishNode(D,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(D.declaration=this.parseExportDeclaration(D),D.declaration.type==="VariableDeclaration")this.checkVariableExport(H,D.declaration.declarations);else this.checkExport(H,D.declaration.id,D.declaration.id.start);if(D.specifiers=[],D.source=null,this.options.ecmaVersion>=16)D.attributes=[]}else{if(D.declaration=null,D.specifiers=this.parseExportSpecifiers(H),this.eatContextual("from")){if(this.type!==Te.string)this.unexpected();if(D.source=this.parseExprAtom(),this.options.ecmaVersion>=16)D.attributes=this.parseWithClause()}else{for(var X=0,Y=D.specifiers;X<Y.length;X+=1){var ce=Y[X];if(this.checkUnreserved(ce.local),this.checkLocalExport(ce.local),ce.local.type==="Literal")this.raise(ce.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(D.source=null,this.options.ecmaVersion>=16)D.attributes=[]}this.semicolon()}return this.finishNode(D,"ExportNamedDeclaration")};Je.parseExportDeclaration=function(D){return this.parseStatement(null)};Je.parseExportDefaultDeclaration=function(){var D;if(this.type===Te._function||(D=this.isAsyncFunction())){var H=this.startNode();if(this.next(),D)this.next();return this.parseFunction(H,pn|Go,!1,D)}else if(this.type===Te._class){var X=this.startNode();return this.parseClass(X,"nullableID")}else{var Y=this.parseMaybeAssign();return this.semicolon(),Y}};Je.checkExport=function(D,H,X){if(!D)return;if(typeof H!=="string")H=H.type==="Identifier"?H.name:H.value;if(hn(D,H))this.raiseRecoverable(X,"Duplicate export '"+H+"'");D[H]=!0};Je.checkPatternExport=function(D,H){var X=H.type;if(X==="Identifier")this.checkExport(D,H,H.start);else if(X==="ObjectPattern")for(var Y=0,ce=H.properties;Y<ce.length;Y+=1){var we=ce[Y];this.checkPatternExport(D,we)}else if(X==="ArrayPattern")for(var ke=0,ve=H.elements;ke<ve.length;ke+=1){var Ee=ve[ke];if(Ee)this.checkPatternExport(D,Ee)}else if(X==="Property")this.checkPatternExport(D,H.value);else if(X==="AssignmentPattern")this.checkPatternExport(D,H.left);else if(X==="RestElement")this.checkPatternExport(D,H.argument)};Je.checkVariableExport=function(D,H){if(!D)return;for(var X=0,Y=H;X<Y.length;X+=1){var ce=Y[X];this.checkPatternExport(D,ce.id)}};Je.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};Je.parseExportSpecifier=function(D){var H=this.startNode();return H.local=this.parseModuleExportName(),H.exported=this.eatContextual("as")?this.parseModuleExportName():H.local,this.checkExport(D,H.exported,H.exported.start),this.finishNode(H,"ExportSpecifier")};Je.parseExportSpecifiers=function(D){var H=[],X=!0;this.expect(Te.braceL);while(!this.eat(Te.braceR)){if(!X){if(this.expect(Te.comma),this.afterTrailingComma(Te.braceR))break}else X=!1;H.push(this.parseExportSpecifier(D))}return H};Je.parseImport=function(D){if(this.next(),this.type===Te.string)D.specifiers=Wh,D.source=this.parseExprAtom();else D.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),D.source=this.type===Te.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)D.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(D,"ImportDeclaration")};Je.parseImportSpecifier=function(){var D=this.startNode();if(D.imported=this.parseModuleExportName(),this.eatContextual("as"))D.local=this.parseIdent();else this.checkUnreserved(D.imported),D.local=D.imported;return this.checkLValSimple(D.local,oi),this.finishNode(D,"ImportSpecifier")};Je.parseImportDefaultSpecifier=function(){var D=this.startNode();return D.local=this.parseIdent(),this.checkLValSimple(D.local,oi),this.finishNode(D,"ImportDefaultSpecifier")};Je.parseImportNamespaceSpecifier=function(){var D=this.startNode();return this.next(),this.expectContextual("as"),D.local=this.parseIdent(),this.checkLValSimple(D.local,oi),this.finishNode(D,"ImportNamespaceSpecifier")};Je.parseImportSpecifiers=function(){var D=[],H=!0;if(this.type===Te.name){if(D.push(this.parseImportDefaultSpecifier()),!this.eat(Te.comma))return D}if(this.type===Te.star)return D.push(this.parseImportNamespaceSpecifier()),D;this.expect(Te.braceL);while(!this.eat(Te.braceR)){if(!H){if(this.expect(Te.comma),this.afterTrailingComma(Te.braceR))break}else H=!1;D.push(this.parseImportSpecifier())}return D};Je.parseWithClause=function(){var D=[];if(!this.eat(Te._with))return D;this.expect(Te.braceL);var H={},X=!0;while(!this.eat(Te.braceR)){if(!X){if(this.expect(Te.comma),this.afterTrailingComma(Te.braceR))break}else X=!1;var Y=this.parseImportAttribute(),ce=Y.key.type==="Identifier"?Y.key.name:Y.key.value;if(hn(H,ce))this.raiseRecoverable(Y.key.start,"Duplicate attribute key '"+ce+"'");H[ce]=!0,D.push(Y)}return D};Je.parseImportAttribute=function(){var D=this.startNode();if(D.key=this.type===Te.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(Te.colon),this.type!==Te.string)this.unexpected();return D.value=this.parseExprAtom(),this.finishNode(D,"ImportAttribute")};Je.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Te.string){var D=this.parseLiteral(this.value);if(Vh.test(D.value))this.raise(D.start,"An export name cannot include a lone surrogate.");return D}return this.parseIdent(!0)};Je.adaptDirectivePrologue=function(D){for(var H=0;H<D.length&&this.isDirectiveCandidate(D[H]);++H)D[H].directive=D[H].expression.raw.slice(1,-1)};Je.isDirectiveCandidate=function(D){return this.options.ecmaVersion>=5&&D.type==="ExpressionStatement"&&D.expression.type==="Literal"&&typeof D.expression.value==="string"&&(this.input[D.start]==='"'||this.input[D.start]==="'")};var jt=St.prototype;jt.toAssignable=function(D,H,X){if(this.options.ecmaVersion>=6&&D)switch(D.type){case"Identifier":if(this.inAsync&&D.name==="await")this.raise(D.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(D.type="ObjectPattern",X)this.checkPatternErrors(X,!0);for(var Y=0,ce=D.properties;Y<ce.length;Y+=1){var we=ce[Y];if(this.toAssignable(we,H),we.type==="RestElement"&&(we.argument.type==="ArrayPattern"||we.argument.type==="ObjectPattern"))this.raise(we.argument.start,"Unexpected token")}break;case"Property":if(D.kind!=="init")this.raise(D.key.start,"Object pattern can't contain getter or setter");this.toAssignable(D.value,H);break;case"ArrayExpression":if(D.type="ArrayPattern",X)this.checkPatternErrors(X,!0);this.toAssignableList(D.elements,H);break;case"SpreadElement":if(D.type="RestElement",this.toAssignable(D.argument,H),D.argument.type==="AssignmentPattern")this.raise(D.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(D.operator!=="=")this.raise(D.left.end,"Only '=' operator can be used for specifying default value.");D.type="AssignmentPattern",delete D.operator,this.toAssignable(D.left,H);break;case"ParenthesizedExpression":this.toAssignable(D.expression,H,X);break;case"ChainExpression":this.raiseRecoverable(D.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!H)break;default:this.raise(D.start,"Assigning to rvalue")}else if(X)this.checkPatternErrors(X,!0);return D};jt.toAssignableList=function(D,H){var X=D.length;for(var Y=0;Y<X;Y++){var ce=D[Y];if(ce)this.toAssignable(ce,H)}if(X){var we=D[X-1];if(this.options.ecmaVersion===6&&H&&we&&we.type==="RestElement"&&we.argument.type!=="Identifier")this.unexpected(we.argument.start)}return D};jt.parseSpread=function(D){var H=this.startNode();return this.next(),H.argument=this.parseMaybeAssign(!1,D),this.finishNode(H,"SpreadElement")};jt.parseRestBinding=function(){var D=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==Te.name)this.unexpected();return D.argument=this.parseBindingAtom(),this.finishNode(D,"RestElement")};jt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case Te.bracketL:var D=this.startNode();return this.next(),D.elements=this.parseBindingList(Te.bracketR,!0,!0),this.finishNode(D,"ArrayPattern");case Te.braceL:return this.parseObj(!0)}return this.parseIdent()};jt.parseBindingList=function(D,H,X,Y){var ce=[],we=!0;while(!this.eat(D)){if(we)we=!1;else this.expect(Te.comma);if(H&&this.type===Te.comma)ce.push(null);else if(X&&this.afterTrailingComma(D))break;else if(this.type===Te.ellipsis){var ke=this.parseRestBinding();if(this.parseBindingListItem(ke),ce.push(ke),this.type===Te.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(D);break}else ce.push(this.parseAssignableListItem(Y))}return ce};jt.parseAssignableListItem=function(D){var H=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(H),H};jt.parseBindingListItem=function(D){return D};jt.parseMaybeDefault=function(D,H,X){if(X=X||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(Te.eq))return X;var Y=this.startNodeAt(D,H);return Y.left=X,Y.right=this.parseMaybeAssign(),this.finishNode(Y,"AssignmentPattern")};jt.checkLValSimple=function(D,H,X){if(H===void 0)H=Kn;var Y=H!==Kn;switch(D.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(D.name))this.raiseRecoverable(D.start,(Y?"Binding ":"Assigning to ")+D.name+" in strict mode");if(Y){if(H===oi&&D.name==="let")this.raiseRecoverable(D.start,"let is disallowed as a lexically bound name");if(X){if(hn(X,D.name))this.raiseRecoverable(D.start,"Argument name clash");X[D.name]=!0}if(H!==Ko)this.declareName(D.name,H,D.start)}break;case"ChainExpression":this.raiseRecoverable(D.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(Y)this.raiseRecoverable(D.start,"Binding member expression");break;case"ParenthesizedExpression":if(Y)this.raiseRecoverable(D.start,"Binding parenthesized expression");return this.checkLValSimple(D.expression,H,X);default:this.raise(D.start,(Y?"Binding":"Assigning to")+" rvalue")}};jt.checkLValPattern=function(D,H,X){if(H===void 0)H=Kn;switch(D.type){case"ObjectPattern":for(var Y=0,ce=D.properties;Y<ce.length;Y+=1){var we=ce[Y];this.checkLValInnerPattern(we,H,X)}break;case"ArrayPattern":for(var ke=0,ve=D.elements;ke<ve.length;ke+=1){var Ee=ve[ke];if(Ee)this.checkLValInnerPattern(Ee,H,X)}break;default:this.checkLValSimple(D,H,X)}};jt.checkLValInnerPattern=function(D,H,X){if(H===void 0)H=Kn;switch(D.type){case"Property":this.checkLValInnerPattern(D.value,H,X);break;case"AssignmentPattern":this.checkLValPattern(D.left,H,X);break;case"RestElement":this.checkLValPattern(D.argument,H,X);break;default:this.checkLValPattern(D,H,X)}};var Yt=function(D,H,X,Y,ce){this.token=D,this.isExpr=!!H,this.preserveSpace=!!X,this.override=Y,this.generator=!!ce},gt={b_stat:new Yt("{",!1),b_expr:new Yt("{",!0),b_tmpl:new Yt("${",!1),p_stat:new Yt("(",!1),p_expr:new Yt("(",!0),q_tmpl:new Yt("`",!0,!0,function(D){return D.tryReadTemplateToken()}),f_stat:new Yt("function",!1),f_expr:new Yt("function",!0),f_expr_gen:new Yt("function",!0,!1,null,!0),f_gen:new Yt("function",!1,!1,null,!0)},$i=St.prototype;$i.initialContext=function(){return[gt.b_stat]};$i.curContext=function(){return this.context[this.context.length-1]};$i.braceIsBlock=function(D){var H=this.curContext();if(H===gt.f_expr||H===gt.f_stat)return!0;if(D===Te.colon&&(H===gt.b_stat||H===gt.b_expr))return!H.isExpr;if(D===Te._return||D===Te.name&&this.exprAllowed)return It.test(this.input.slice(this.lastTokEnd,this.start));if(D===Te._else||D===Te.semi||D===Te.eof||D===Te.parenR||D===Te.arrow)return!0;if(D===Te.braceL)return H===gt.b_stat;if(D===Te._var||D===Te._const||D===Te.name)return!1;return!this.exprAllowed};$i.inGeneratorContext=function(){for(var D=this.context.length-1;D>=1;D--){var H=this.context[D];if(H.token==="function")return H.generator}return!1};$i.updateContext=function(D){var H,X=this.type;if(X.keyword&&D===Te.dot)this.exprAllowed=!1;else if(H=X.updateContext)H.call(this,D);else this.exprAllowed=X.beforeExpr};$i.overrideContext=function(D){if(this.curContext()!==D)this.context[this.context.length-1]=D};Te.parenR.updateContext=Te.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var D=this.context.pop();if(D===gt.b_stat&&this.curContext().token==="function")D=this.context.pop();this.exprAllowed=!D.isExpr};Te.braceL.updateContext=function(D){this.context.push(this.braceIsBlock(D)?gt.b_stat:gt.b_expr),this.exprAllowed=!0};Te.dollarBraceL.updateContext=function(){this.context.push(gt.b_tmpl),this.exprAllowed=!0};Te.parenL.updateContext=function(D){var H=D===Te._if||D===Te._for||D===Te._with||D===Te._while;this.context.push(H?gt.p_stat:gt.p_expr),this.exprAllowed=!0};Te.incDec.updateContext=function(){};Te._function.updateContext=Te._class.updateContext=function(D){if(D.beforeExpr&&D!==Te._else&&!(D===Te.semi&&this.curContext()!==gt.p_stat)&&!(D===Te._return&&It.test(this.input.slice(this.lastTokEnd,this.start)))&&!((D===Te.colon||D===Te.braceL)&&this.curContext()===gt.b_stat))this.context.push(gt.f_expr);else this.context.push(gt.f_stat);this.exprAllowed=!1};Te.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};Te.backQuote.updateContext=function(){if(this.curContext()===gt.q_tmpl)this.context.pop();else this.context.push(gt.q_tmpl);this.exprAllowed=!1};Te.star.updateContext=function(D){if(D===Te._function){var H=this.context.length-1;if(this.context[H]===gt.f_expr)this.context[H]=gt.f_expr_gen;else this.context[H]=gt.f_gen}this.exprAllowed=!0};Te.name.updateContext=function(D){var H=!1;if(this.options.ecmaVersion>=6&&D!==Te.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())H=!0}this.exprAllowed=H};var st=St.prototype;st.checkPropClash=function(D,H,X){if(this.options.ecmaVersion>=9&&D.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(D.computed||D.method||D.shorthand))return;var Y=D.key,ce;switch(Y.type){case"Identifier":ce=Y.name;break;case"Literal":ce=String(Y.value);break;default:return}var we=D.kind;if(this.options.ecmaVersion>=6){if(ce==="__proto__"&&we==="init"){if(H.proto)if(X){if(X.doubleProto<0)X.doubleProto=Y.start}else this.raiseRecoverable(Y.start,"Redefinition of __proto__ property");H.proto=!0}return}ce="$"+ce;var ke=H[ce];if(ke){var ve;if(we==="init")ve=this.strict&&ke.init||ke.get||ke.set;else ve=ke.init||ke[we];if(ve)this.raiseRecoverable(Y.start,"Redefinition of property")}else ke=H[ce]={init:!1,get:!1,set:!1};ke[we]=!0};st.parseExpression=function(D,H){var X=this;return this.catchStackOverflow(function(){var{start:Y,startLoc:ce}=X,we=X.parseMaybeAssign(D,H);if(X.type===Te.comma){var ke=X.startNodeAt(Y,ce);ke.expressions=[we];while(X.eat(Te.comma))ke.expressions.push(X.parseMaybeAssign(D,H));return X.finishNode(ke,"SequenceExpression")}return we})};st.parseMaybeAssign=function(D,H,X){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(D);else this.exprAllowed=!1;var Y=!1,ce=-1,we=-1,ke=-1;if(H)ce=H.parenthesizedAssign,we=H.trailingComma,ke=H.doubleProto,H.parenthesizedAssign=H.trailingComma=-1;else H=new Zn,Y=!0;var ve=this.start,Ee=this.startLoc;if(this.type===Te.parenL||this.type===Te.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=D==="await";var Ce=this.parseMaybeConditional(D,H);if(X)Ce=X.call(this,Ce,ve,Ee);if(this.type.isAssign){var Ae=this.startNodeAt(ve,Ee);if(Ae.operator=this.value,this.type===Te.eq)Ce=this.toAssignable(Ce,!1,H);if(!Y){if(H.parenthesizedAssign=H.trailingComma=-1,H.shorthandAssign>=Ce.start)H.shorthandAssign=-1;if(H.doubleProto>=Ce.start)H.doubleProto=-1}if(this.type===Te.eq)this.checkLValPattern(Ce);else this.checkLValSimple(Ce);if(Ae.left=Ce,this.next(),Ae.right=this.parseMaybeAssign(D),ke>-1)H.doubleProto=ke;return this.finishNode(Ae,"AssignmentExpression")}else if(Y)this.checkExpressionErrors(H,!0);if(ce>-1)H.parenthesizedAssign=ce;if(we>-1)H.trailingComma=we;return Ce};st.parseMaybeConditional=function(D,H){var X=this.start,Y=this.startLoc,ce=this.parseExprOps(D,H);if(this.checkExpressionErrors(H))return ce;if(!(ce.type==="ArrowFunctionExpression"&&ce.start===X)&&this.eat(Te.question)){var we=this.startNodeAt(X,Y);return we.test=ce,we.consequent=this.parseMaybeAssign(),this.expect(Te.colon),we.alternate=this.parseMaybeAssign(D),this.finishNode(we,"ConditionalExpression")}return ce};st.parseExprOps=function(D,H){var X=this.start,Y=this.startLoc,ce=this.parseMaybeUnary(H,!1,!1,D);if(this.checkExpressionErrors(H))return ce;return ce.start===X&&ce.type==="ArrowFunctionExpression"?ce:this.parseExprOp(ce,X,Y,-1,D)};st.parseExprOp=function(D,H,X,Y,ce){var we=this.type.binop;if(we!=null&&(!ce||this.type!==Te._in)){if(we>Y){var ke=this.type===Te.logicalOR||this.type===Te.logicalAND,ve=this.type===Te.coalesce;if(ve)we=Te.logicalAND.binop;var Ee=this.value;this.next();var Ce=this.start,Ae=this.startLoc,_e=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,ce),Ce,Ae,we,ce),Ne=this.buildBinary(H,X,D,_e,Ee,ke||ve);if(ke&&this.type===Te.coalesce||ve&&(this.type===Te.logicalOR||this.type===Te.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(Ne,H,X,Y,ce)}}return D};st.buildBinary=function(D,H,X,Y,ce,we){if(Y.type==="PrivateIdentifier")this.raise(Y.start,"Private identifier can only be left side of binary expression");var ke=this.startNodeAt(D,H);return ke.left=X,ke.operator=ce,ke.right=Y,this.finishNode(ke,we?"LogicalExpression":"BinaryExpression")};st.parseMaybeUnary=function(D,H,X,Y){var ce=this.start,we=this.startLoc,ke;if(this.isContextual("await")&&this.canAwait)ke=this.parseAwait(Y),H=!0;else if(this.type.prefix){var ve=this.startNode(),Ee=this.type===Te.incDec;if(ve.operator=this.value,ve.prefix=!0,this.next(),ve.argument=this.parseMaybeUnary(null,!0,Ee,Y),this.checkExpressionErrors(D,!0),Ee)this.checkLValSimple(ve.argument);else if(this.strict&&ve.operator==="delete"&&Ho(ve.argument))this.raiseRecoverable(ve.start,"Deleting local variable in strict mode");else if(ve.operator==="delete"&&fr(ve.argument))this.raiseRecoverable(ve.start,"Private fields can not be deleted");else H=!0;ke=this.finishNode(ve,Ee?"UpdateExpression":"UnaryExpression")}else if(!H&&this.type===Te.privateId){if((Y||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(ke=this.parsePrivateIdent(),this.type!==Te._in)this.unexpected()}else{if(ke=this.parseExprSubscripts(D,Y),this.checkExpressionErrors(D))return ke;while(this.type.postfix&&!this.canInsertSemicolon()){var Ce=this.startNodeAt(ce,we);Ce.operator=this.value,Ce.prefix=!1,Ce.argument=ke,this.checkLValSimple(ke),this.next(),ke=this.finishNode(Ce,"UpdateExpression")}}if(!X&&!(ke.type==="ArrowFunctionExpression"&&ke.start===ce)&&this.eat(Te.starstar))if(H)this.unexpected(this.lastTokStart);else return this.buildBinary(ce,we,ke,this.parseMaybeUnary(null,!1,!1,Y),"**",!1);else return ke};function Ho(D){return D.type==="Identifier"||D.type==="ParenthesizedExpression"&&Ho(D.expression)}function fr(D){return D.type==="MemberExpression"&&D.property.type==="PrivateIdentifier"||D.type==="ChainExpression"&&fr(D.expression)||D.type==="ParenthesizedExpression"&&fr(D.expression)}st.parseExprSubscripts=function(D,H){var X=this.start,Y=this.startLoc,ce=-1,we=-1;if(D)ce=D.doubleProto,we=D.shorthandAssign,D.doubleProto=D.shorthandAssign=-1;var ke=this.parseExprAtom(D,H);if(ke.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return ke;var ve=this.parseSubscripts(ke,X,Y,!1,H);if(D){if(ve.end>ke.end){if(this.checkExpressionErrors(D,!0),D.parenthesizedAssign>=ve.start)D.parenthesizedAssign=-1;if(D.parenthesizedBind>=ve.start)D.parenthesizedBind=-1;if(D.trailingComma>=ve.start)D.trailingComma=-1}if(ce>-1)D.doubleProto=ce;if(we>-1)D.shorthandAssign=we}return ve};st.parseSubscripts=function(D,H,X,Y,ce){var we=this.options.ecmaVersion>=8&&D.type==="Identifier"&&D.name==="async"&&this.lastTokEnd===D.end&&!this.canInsertSemicolon()&&D.end-D.start===5&&this.potentialArrowAt===D.start,ke=!1;while(!0){var ve=this.parseSubscript(D,H,X,Y,we,ke,ce);if(ve.optional)ke=!0;if(ve.end===D.end||ve.type==="ArrowFunctionExpression"){if(ke){var Ee=this.startNodeAt(H,X);Ee.expression=ve,ve=this.finishNode(Ee,"ChainExpression")}return ve}D=ve,we=!1}};st.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(Te.arrow)};st.parseSubscriptAsyncArrow=function(D,H,X,Y){return this.parseArrowExpression(this.startNodeAt(D,H),X,!0,Y)};st.parseSubscript=function(D,H,X,Y,ce,we,ke){var ve=this.options.ecmaVersion>=11,Ee=ve&&this.eat(Te.questionDot);if(Y&&Ee)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Ce=this.eat(Te.bracketL);if(Ce||Ee&&this.type!==Te.parenL&&this.type!==Te.backQuote||this.eat(Te.dot)){var Ae=this.startNodeAt(H,X);if(Ae.object=D,Ce)Ae.property=this.parseExpression(),this.expect(Te.bracketR);else if(this.type===Te.privateId&&D.type!=="Super")Ae.property=this.parsePrivateIdent();else Ae.property=this.parseIdent(this.options.allowReserved!=="never");if(Ae.computed=!!Ce,ve)Ae.optional=Ee;D=this.finishNode(Ae,"MemberExpression")}else if(!Y&&this.eat(Te.parenL)){var _e=new Zn,Ne=this.yieldPos,$e=this.awaitPos,De=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Oe=this.parseExprList(Te.parenR,this.options.ecmaVersion>=8,!1,_e);if(ce&&!Ee&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(_e,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=Ne,this.awaitPos=$e,this.awaitIdentPos=De,this.parseSubscriptAsyncArrow(H,X,Oe,ke)}this.checkExpressionErrors(_e,!0),this.yieldPos=Ne||this.yieldPos,this.awaitPos=$e||this.awaitPos,this.awaitIdentPos=De||this.awaitIdentPos;var qe=this.startNodeAt(H,X);if(qe.callee=D,qe.arguments=Oe,ve)qe.optional=Ee;D=this.finishNode(qe,"CallExpression")}else if(this.type===Te.backQuote){if(Ee||we)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var He=this.startNodeAt(H,X);He.tag=D,He.quasi=this.parseTemplate({isTagged:!0}),D=this.finishNode(He,"TaggedTemplateExpression")}return D};st.parseExprAtom=function(D,H,X){if(this.type===Te.slash)this.readRegexp();var Y,ce=this.potentialArrowAt===this.start;switch(this.type){case Te._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(Y=this.startNode(),this.next(),this.type===Te.parenL&&!this.allowDirectSuper)this.raise(Y.start,"super() call outside constructor of a subclass");if(this.type!==Te.dot&&this.type!==Te.bracketL&&this.type!==Te.parenL)this.unexpected();return this.finishNode(Y,"Super");case Te._this:return Y=this.startNode(),this.next(),this.finishNode(Y,"ThisExpression");case Te.name:var we=this.start,ke=this.startLoc,ve=this.containsEsc,Ee=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ve&&Ee.name==="async"&&!this.canInsertSemicolon()&&this.eat(Te._function))return this.overrideContext(gt.f_expr),this.parseFunction(this.startNodeAt(we,ke),0,!1,!0,H);if(ce&&!this.canInsertSemicolon()){if(this.eat(Te.arrow))return this.parseArrowExpression(this.startNodeAt(we,ke),[Ee],!1,H);if(this.options.ecmaVersion>=8&&Ee.name==="async"&&this.type===Te.name&&!ve&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(Ee=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(Te.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(we,ke),[Ee],!0,H)}}return Ee;case Te.regexp:var Ce=this.value;return Y=this.parseLiteral(Ce.value),Y.regex={pattern:Ce.pattern,flags:Ce.flags},Y;case Te.num:case Te.string:return this.parseLiteral(this.value);case Te._null:case Te._true:case Te._false:return Y=this.startNode(),Y.value=this.type===Te._null?null:this.type===Te._true,Y.raw=this.type.keyword,this.next(),this.finishNode(Y,"Literal");case Te.parenL:var Ae=this.start,_e=this.parseParenAndDistinguishExpression(ce,H);if(D){if(D.parenthesizedAssign<0&&!this.isSimpleAssignTarget(_e))D.parenthesizedAssign=Ae;if(D.parenthesizedBind<0)D.parenthesizedBind=Ae}return _e;case Te.bracketL:return Y=this.startNode(),this.next(),Y.elements=this.parseExprList(Te.bracketR,!0,!0,D),this.finishNode(Y,"ArrayExpression");case Te.braceL:return this.overrideContext(gt.b_expr),this.parseObj(!1,D);case Te._function:return Y=this.startNode(),this.next(),this.parseFunction(Y,0);case Te._class:return this.parseClass(this.startNode(),!1);case Te._new:return this.parseNew();case Te.backQuote:return this.parseTemplate();case Te._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(X);else return this.unexpected();default:return this.parseExprAtomDefault()}};st.parseExprAtomDefault=function(){this.unexpected()};st.parseExprImport=function(D){var H=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===Te.parenL&&!D)return this.parseDynamicImport(H);else if(this.type===Te.dot){var X=this.startNodeAt(H.start,H.loc&&H.loc.start);return X.name="import",H.meta=this.finishNode(X,"Identifier"),this.parseImportMeta(H)}else this.unexpected()};st.parseDynamicImport=function(D){if(this.next(),D.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(Te.parenR))if(this.expect(Te.comma),!this.afterTrailingComma(Te.parenR)){if(D.options=this.parseMaybeAssign(),!this.eat(Te.parenR)){if(this.expect(Te.comma),!this.afterTrailingComma(Te.parenR))this.unexpected()}}else D.options=null;else D.options=null;else if(!this.eat(Te.parenR)){var H=this.start;if(this.eat(Te.comma)&&this.eat(Te.parenR))this.raiseRecoverable(H,"Trailing comma is not allowed in import()");else this.unexpected(H)}return this.finishNode(D,"ImportExpression")};st.parseImportMeta=function(D){this.next();var H=this.containsEsc;if(D.property=this.parseIdent(!0),D.property.name!=="meta")this.raiseRecoverable(D.property.start,"The only valid meta property for import is 'import.meta'");if(H)this.raiseRecoverable(D.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(D.start,"Cannot use 'import.meta' outside a module");return this.finishNode(D,"MetaProperty")};st.parseLiteral=function(D){var H=this.startNode();if(H.value=D,H.raw=this.input.slice(this.start,this.end),H.raw.charCodeAt(H.raw.length-1)===110)H.bigint=H.value!=null?H.value.toString():H.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(H,"Literal")};st.parseParenExpression=function(){this.expect(Te.parenL);var D=this.parseExpression();return this.expect(Te.parenR),D};st.shouldParseArrow=function(D){return!this.canInsertSemicolon()};st.parseParenAndDistinguishExpression=function(D,H){var X=this.start,Y=this.startLoc,ce,we=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ke=this.start,ve=this.startLoc,Ee=[],Ce=!0,Ae=!1,_e=new Zn,Ne=this.yieldPos,$e=this.awaitPos,De;this.yieldPos=0,this.awaitPos=0;while(this.type!==Te.parenR)if(Ce?Ce=!1:this.expect(Te.comma),we&&this.afterTrailingComma(Te.parenR,!0)){Ae=!0;break}else if(this.type===Te.ellipsis){if(De=this.start,Ee.push(this.parseParenItem(this.parseRestBinding())),this.type===Te.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Ee.push(this.parseMaybeAssign(!1,_e,this.parseParenItem));var Oe=this.lastTokEnd,qe=this.lastTokEndLoc;if(this.expect(Te.parenR),D&&this.shouldParseArrow(Ee)&&this.eat(Te.arrow))return this.checkPatternErrors(_e,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Ne,this.awaitPos=$e,this.parseParenArrowList(X,Y,Ee,H);if(!Ee.length||Ae)this.unexpected(this.lastTokStart);if(De)this.unexpected(De);if(this.checkExpressionErrors(_e,!0),this.yieldPos=Ne||this.yieldPos,this.awaitPos=$e||this.awaitPos,Ee.length>1)ce=this.startNodeAt(ke,ve),ce.expressions=Ee,this.finishNodeAt(ce,"SequenceExpression",Oe,qe);else ce=Ee[0]}else ce=this.parseParenExpression();if(this.options.preserveParens){var He=this.startNodeAt(X,Y);return He.expression=ce,this.finishNode(He,"ParenthesizedExpression")}else return ce};st.parseParenItem=function(D){return D};st.parseParenArrowList=function(D,H,X,Y){return this.parseArrowExpression(this.startNodeAt(D,H),X,!1,Y)};var zh=[];st.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var D=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===Te.dot){var H=this.startNodeAt(D.start,D.loc&&D.loc.start);H.name="new",D.meta=this.finishNode(H,"Identifier"),this.next();var X=this.containsEsc;if(D.property=this.parseIdent(!0),D.property.name!=="target")this.raiseRecoverable(D.property.start,"The only valid meta property for new is 'new.target'");if(X)this.raiseRecoverable(D.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(D.start,"'new.target' can only be used in functions and class static block");return this.finishNode(D,"MetaProperty")}var Y=this.start,ce=this.startLoc;if(D.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),Y,ce,!0,!1),D.callee.type==="Super")this.raiseRecoverable(Y,"Invalid use of 'super'");if(this.eat(Te.parenL))D.arguments=this.parseExprList(Te.parenR,this.options.ecmaVersion>=8,!1);else D.arguments=zh;return this.finishNode(D,"NewExpression")};st.parseTemplateElement=function(D){var H=D.isTagged,X=this.startNode();if(this.type===Te.invalidTemplate){if(!H)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");X.value={raw:this.value.replace(/\r\n?/g,`
|
|
4
|
+
`),cooked:null}}else X.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
5
|
+
`),cooked:this.value};return this.next(),X.tail=this.type===Te.backQuote,this.finishNode(X,"TemplateElement")};st.parseTemplate=function(D){if(D===void 0)D={};var H=D.isTagged;if(H===void 0)H=!1;var X=this.startNode();this.next(),X.expressions=[];var Y=this.parseTemplateElement({isTagged:H});X.quasis=[Y];while(!Y.tail){if(this.type===Te.eof)this.raise(this.pos,"Unterminated template literal");this.expect(Te.dollarBraceL),X.expressions.push(this.parseExpression()),this.expect(Te.braceR),X.quasis.push(Y=this.parseTemplateElement({isTagged:H}))}return this.next(),this.finishNode(X,"TemplateLiteral")};st.isAsyncProp=function(D){return!D.computed&&D.key.type==="Identifier"&&D.key.name==="async"&&(this.type===Te.name||this.type===Te.num||this.type===Te.string||this.type===Te.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Te.star)&&!It.test(this.input.slice(this.lastTokEnd,this.start))};st.parseObj=function(D,H){var X=this.startNode(),Y=!0,ce={};X.properties=[],this.next();while(!this.eat(Te.braceR)){if(!Y){if(this.expect(Te.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(Te.braceR))break}else Y=!1;var we=this.parseProperty(D,H);if(!D)this.checkPropClash(we,ce,H);X.properties.push(we)}return this.finishNode(X,D?"ObjectPattern":"ObjectExpression")};st.parseProperty=function(D,H){var X=this.startNode(),Y,ce,we,ke;if(this.options.ecmaVersion>=9&&this.eat(Te.ellipsis)){if(D){if(X.argument=this.parseIdent(!1),this.type===Te.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(X,"RestElement")}if(X.argument=this.parseMaybeAssign(!1,H),this.type===Te.comma&&H&&H.trailingComma<0)H.trailingComma=this.start;return this.finishNode(X,"SpreadElement")}if(this.options.ecmaVersion>=6){if(X.method=!1,X.shorthand=!1,D||H)we=this.start,ke=this.startLoc;if(!D)Y=this.eat(Te.star)}var ve=this.containsEsc;if(this.parsePropertyName(X),!D&&!ve&&this.options.ecmaVersion>=8&&!Y&&this.isAsyncProp(X))ce=!0,Y=this.options.ecmaVersion>=9&&this.eat(Te.star),this.parsePropertyName(X);else ce=!1;return this.parsePropertyValue(X,D,Y,ce,we,ke,H,ve),this.finishNode(X,"Property")};st.parseGetterSetter=function(D){var H=D.key.name;this.parsePropertyName(D),D.value=this.parseMethod(!1),D.kind=H;var X=D.kind==="get"?0:1;if(D.value.params.length!==X){var Y=D.value.start;if(D.kind==="get")this.raiseRecoverable(Y,"getter should have no params");else this.raiseRecoverable(Y,"setter should have exactly one param")}else if(D.kind==="set"&&D.value.params[0].type==="RestElement")this.raiseRecoverable(D.value.params[0].start,"Setter cannot use rest params")};st.parsePropertyValue=function(D,H,X,Y,ce,we,ke,ve){if((X||Y)&&this.type===Te.colon)this.unexpected();if(this.eat(Te.colon))D.value=H?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ke),D.kind="init";else if(this.options.ecmaVersion>=6&&this.type===Te.parenL){if(H)this.unexpected();D.method=!0,D.value=this.parseMethod(X,Y),D.kind="init"}else if(!H&&!ve&&this.options.ecmaVersion>=5&&!D.computed&&D.key.type==="Identifier"&&(D.key.name==="get"||D.key.name==="set")&&(this.type!==Te.comma&&this.type!==Te.braceR&&this.type!==Te.eq)){if(X||Y)this.unexpected();this.parseGetterSetter(D)}else if(this.options.ecmaVersion>=6&&!D.computed&&D.key.type==="Identifier"){if(X||Y)this.unexpected();if(this.checkUnreserved(D.key),D.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=ce;if(H)D.value=this.parseMaybeDefault(ce,we,this.copyNode(D.key));else if(this.type===Te.eq&&ke){if(ke.shorthandAssign<0)ke.shorthandAssign=this.start;D.value=this.parseMaybeDefault(ce,we,this.copyNode(D.key))}else D.value=this.copyNode(D.key);D.kind="init",D.shorthand=!0}else this.unexpected()};st.parsePropertyName=function(D){if(this.options.ecmaVersion>=6)if(this.eat(Te.bracketL))return D.computed=!0,D.key=this.parseMaybeAssign(),this.expect(Te.bracketR),D.key;else D.computed=!1;return D.key=this.type===Te.num||this.type===Te.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};st.initFunction=function(D){if(D.id=null,this.options.ecmaVersion>=6)D.generator=D.expression=!1;if(this.options.ecmaVersion>=8)D.async=!1};st.parseMethod=function(D,H,X){var Y=this.startNode(),ce=this.yieldPos,we=this.awaitPos,ke=this.awaitIdentPos;if(this.initFunction(Y),this.options.ecmaVersion>=6)Y.generator=D;if(this.options.ecmaVersion>=8)Y.async=!!H;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(gr(H,Y.generator)|Qn|(X?jo:0)),this.expect(Te.parenL),Y.params=this.parseBindingList(Te.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(Y,!1,!0,!1),this.yieldPos=ce,this.awaitPos=we,this.awaitIdentPos=ke,this.finishNode(Y,"FunctionExpression")};st.parseArrowExpression=function(D,H,X,Y){var ce=this.yieldPos,we=this.awaitPos,ke=this.awaitIdentPos;if(this.enterScope(gr(X,!1)|yr),this.initFunction(D),this.options.ecmaVersion>=8)D.async=!!X;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,D.params=this.toAssignableList(H,!0),this.parseFunctionBody(D,!0,!1,Y),this.yieldPos=ce,this.awaitPos=we,this.awaitIdentPos=ke,this.finishNode(D,"ArrowFunctionExpression")};st.parseFunctionBody=function(D,H,X,Y){var ce=H&&this.type!==Te.braceL,we=this.strict,ke=!1;if(ce)D.body=this.parseMaybeAssign(Y),D.expression=!0,this.checkParams(D,!1);else{var ve=this.options.ecmaVersion>=7&&!this.isSimpleParamList(D.params);if(!we||ve){if(ke=this.strictDirective(this.end),ke&&ve)this.raiseRecoverable(D.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var Ee=this.labels;if(this.labels=[],ke)this.strict=!0;if(this.checkParams(D,!we&&!ke&&!H&&!X&&this.isSimpleParamList(D.params)),this.strict&&D.id)this.checkLValSimple(D.id,Ko);D.body=this.parseBlock(!1,void 0,ke&&!we),D.expression=!1,this.adaptDirectivePrologue(D.body.body),this.labels=Ee}this.exitScope()};st.isSimpleParamList=function(D){for(var H=0,X=D;H<X.length;H+=1){var Y=X[H];if(Y.type!=="Identifier")return!1}return!0};st.checkParams=function(D,H){var X=Object.create(null);for(var Y=0,ce=D.params;Y<ce.length;Y+=1){var we=ce[Y];this.checkLValInnerPattern(we,xr,H?null:X)}};st.parseExprList=function(D,H,X,Y){var ce=[],we=!0;while(!this.eat(D)){if(!we){if(this.expect(Te.comma),H&&this.afterTrailingComma(D))break}else we=!1;var ke=void 0;if(X&&this.type===Te.comma)ke=null;else if(this.type===Te.ellipsis){if(ke=this.parseSpread(Y),Y&&this.type===Te.comma&&Y.trailingComma<0)Y.trailingComma=this.start}else ke=this.parseMaybeAssign(!1,Y);ce.push(ke)}return ce};st.checkUnreserved=function(D){var{start:H,end:X,name:Y}=D;if(this.inGenerator&&Y==="yield")this.raiseRecoverable(H,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&Y==="await")this.raiseRecoverable(H,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Jn)&&Y==="arguments")this.raiseRecoverable(H,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(Y==="arguments"||Y==="await"))this.raise(H,"Cannot use "+Y+" in class static initialization block");if(this.keywords.test(Y))this.raise(H,"Unexpected keyword '"+Y+"'");if(this.options.ecmaVersion<6&&this.input.slice(H,X).indexOf("\\")!==-1)return;var ce=this.strict?this.reservedWordsStrict:this.reservedWords;if(ce.test(Y)){if(!this.inAsync&&Y==="await")this.raiseRecoverable(H,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(H,"The keyword '"+Y+"' is reserved")}};st.parseIdent=function(D){var H=this.parseIdentNode();if(this.next(!!D),this.finishNode(H,"Identifier"),!D){if(this.checkUnreserved(H),H.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=H.start}return H};st.parseIdentNode=function(){var D=this.startNode();if(this.type===Te.name)D.name=this.value;else if(this.type.keyword){if(D.name=this.type.keyword,(D.name==="class"||D.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=Te.name}else this.unexpected();return D};st.parsePrivateIdent=function(){var D=this.startNode();if(this.type===Te.privateId)D.name=this.value;else this.unexpected();if(this.next(),this.finishNode(D,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(D.start,"Private field '#"+D.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(D);return D};st.parseYield=function(D){if(!this.yieldPos)this.yieldPos=this.start;var H=this.startNode();if(this.next(),this.type===Te.semi||this.canInsertSemicolon()||this.type!==Te.star&&!this.type.startsExpr)H.delegate=!1,H.argument=null;else H.delegate=this.eat(Te.star),H.argument=this.parseMaybeAssign(D);return this.finishNode(H,"YieldExpression")};st.parseAwait=function(D){if(!this.awaitPos)this.awaitPos=this.start;var H=this.startNode();return this.next(),H.argument=this.parseMaybeUnary(null,!0,!1,D),this.finishNode(H,"AwaitExpression")};var Hn=St.prototype;Hn.raise=function(D,H){var X=Bo(this.input,D);if(H+=" ("+X.line+":"+X.column+")",this.sourceFile)H+=" in "+this.sourceFile;var Y=SyntaxError(H);throw Y.pos=D,Y.loc=X,Y.raisedAt=this.pos,Y};Hn.raiseRecoverable=Hn.raise;Hn.curPosition=function(){if(this.options.locations)return new un(this.curLine,this.pos-this.lineStart)};var fi=St.prototype,Kh=function(D){this.flags=D,this.var=[],this.lexical=[],this.functions=[]};fi.enterScope=function(D){this.scopeStack.push(new Kh(D))};fi.exitScope=function(){this.scopeStack.pop()};fi.treatFunctionsAsVarInScope=function(D){return D.flags&Ci||!this.inModule&&D.flags&Ei};fi.declareName=function(D,H,X){var Y=!1;if(H===oi){var ce=this.currentScope();if(Y=ce.lexical.indexOf(D)>-1||ce.functions.indexOf(D)>-1||ce.var.indexOf(D)>-1,ce.lexical.push(D),this.inModule&&ce.flags&Ei)delete this.undefinedExports[D]}else if(H===zo){var we=this.currentScope();we.lexical.push(D)}else if(H===qo){var ke=this.currentScope();if(this.treatFunctionsAsVar)Y=ke.lexical.indexOf(D)>-1;else Y=ke.lexical.indexOf(D)>-1||ke.var.indexOf(D)>-1;ke.functions.push(D)}else for(var ve=this.scopeStack.length-1;ve>=0;--ve){var Ee=this.scopeStack[ve];if(Ee.lexical.indexOf(D)>-1&&!(Ee.flags&Uo&&Ee.lexical[0]===D)||!this.treatFunctionsAsVarInScope(Ee)&&Ee.functions.indexOf(D)>-1){Y=!0;break}if(Ee.var.push(D),this.inModule&&Ee.flags&Ei)delete this.undefinedExports[D];if(Ee.flags&Jn)break}if(Y)this.raiseRecoverable(X,"Identifier '"+D+"' has already been declared")};fi.checkLocalExport=function(D){if(this.scopeStack[0].lexical.indexOf(D.name)===-1&&this.scopeStack[0].var.indexOf(D.name)===-1)this.undefinedExports[D.name]=D};fi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};fi.currentVarScope=function(){for(var D=this.scopeStack.length-1;;D--){var H=this.scopeStack[D];if(H.flags&(Jn|fn|Ai))return H}};fi.currentThisScope=function(){for(var D=this.scopeStack.length-1;;D--){var H=this.scopeStack[D];if(H.flags&(Jn|fn|Ai)&&!(H.flags&yr))return H}};var es=function(D,H,X){if(this.type="",this.start=H,this.end=0,D.options.locations)this.loc=new Yn(D,X);if(D.options.directSourceFile)this.sourceFile=D.options.directSourceFile;if(D.options.ranges)this.range=[H,0]},dn=St.prototype;dn.startNode=function(){return new es(this,this.start,this.startLoc)};dn.startNodeAt=function(D,H){return new es(this,D,H)};function Xo(D,H,X,Y){if(D.type=H,D.end=X,this.options.locations)D.loc.end=Y;if(this.options.ranges)D.range[1]=X;return D}dn.finishNode=function(D,H){return Xo.call(this,D,H,this.lastTokEnd,this.lastTokEndLoc)};dn.finishNodeAt=function(D,H,X,Y){return Xo.call(this,D,H,X,Y)};dn.copyNode=function(D){var H=new es(this,D.start,this.startLoc);for(var X in D)H[X]=D[X];return H};var Yo=function(){};Yo.prototype.reset=function(){};St.prototype.validateRegExpFlags=function(){};St.prototype.validateRegExpPattern=function(){};var br=function(D){if(this.type=D.type,this.value=D.value,this.start=D.start,this.end=D.end,D.options.locations)this.loc=new Yn(D,D.startLoc,D.endLoc);if(D.options.ranges)this.range=[D.start,D.end]},lt=St.prototype;lt.next=function(D){if(!D&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new br(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};lt.getToken=function(){return this.next(),new br(this)};if(typeof Symbol<"u")lt[Symbol.iterator]=function(){var D=this;return{next:function(){var H=D.getToken();return{done:H.type===Te.eof,value:H}}}};lt.nextToken=function(){var D=this.curContext();if(!D||!D.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(Te.eof);if(D.override)return D.override(this);else this.readToken(this.fullCharCodeAtPos())};lt.readToken=function(D){if(Qt(D,this.options.ecmaVersion>=6)||D===92)return this.readWord();return this.getTokenFromCode(D)};lt.fullCharCodeAt=function(D){var H=this.input.charCodeAt(D);if(H<=55295||H>=56320)return H;var X=this.input.charCodeAt(D+1);return X<=56319||X>=57344?H:(H<<10)+X-56613888};lt.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};lt.skipBlockComment=function(){var D=this.options.onComment&&this.curPosition(),H=this.pos,X=this.input.indexOf("*/",this.pos+=2);if(X===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=X+2,this.options.locations)for(var Y=void 0,ce=H;(Y=Vo(this.input,ce,this.pos))>-1;)++this.curLine,ce=this.lineStart=Y;if(this.options.onComment)this.options.onComment(!0,this.input.slice(H+2,X),H,this.pos,D,this.curPosition())};lt.skipLineComment=function(D){var H=this.pos,X=this.options.onComment&&this.curPosition(),Y=this.input.charCodeAt(this.pos+=D);while(this.pos<this.input.length&&!Ii(Y))Y=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(H+D,this.pos),H,this.pos,X,this.curPosition())};lt.skipSpace=function(){e:while(this.pos<this.input.length){var D=this.input.charCodeAt(this.pos);switch(D){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(D>8&&D<14||D>=5760&&Do.test(String.fromCharCode(D)))++this.pos;else break e}}};lt.finishToken=function(D,H){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var X=this.type;this.type=D,this.value=H,this.updateContext(X)};lt.readToken_dot=function(){var D=this.input.charCodeAt(this.pos+1);if(D>=48&&D<=57)return this.readNumber(!0);var H=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&D===46&&H===46)return this.pos+=3,this.finishToken(Te.ellipsis);else return++this.pos,this.finishToken(Te.dot)};lt.readToken_slash=function(){var D=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(D===61)return this.finishOp(Te.assign,2);return this.finishOp(Te.slash,1)};lt.readToken_mult_modulo_exp=function(D){var H=this.input.charCodeAt(this.pos+1),X=1,Y=D===42?Te.star:Te.modulo;if(this.options.ecmaVersion>=7&&D===42&&H===42)++X,Y=Te.starstar,H=this.input.charCodeAt(this.pos+2);if(H===61)return this.finishOp(Te.assign,X+1);return this.finishOp(Y,X)};lt.readToken_pipe_amp=function(D){var H=this.input.charCodeAt(this.pos+1);if(H===D){if(this.options.ecmaVersion>=12){var X=this.input.charCodeAt(this.pos+2);if(X===61)return this.finishOp(Te.assign,3)}return this.finishOp(D===124?Te.logicalOR:Te.logicalAND,2)}if(H===61)return this.finishOp(Te.assign,2);return this.finishOp(D===124?Te.bitwiseOR:Te.bitwiseAND,1)};lt.readToken_caret=function(){var D=this.input.charCodeAt(this.pos+1);if(D===61)return this.finishOp(Te.assign,2);return this.finishOp(Te.bitwiseXOR,1)};lt.readToken_plus_min=function(D){var H=this.input.charCodeAt(this.pos+1);if(H===D){if(H===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||It.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(Te.incDec,2)}if(H===61)return this.finishOp(Te.assign,2);return this.finishOp(Te.plusMin,1)};lt.readToken_lt_gt=function(D){var H=this.input.charCodeAt(this.pos+1),X=1;if(H===D){if(X=D===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+X)===61)return this.finishOp(Te.assign,X+1);return this.finishOp(Te.bitShift,X)}if(H===33&&D===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(H===61)X=2;return this.finishOp(Te.relational,X)};lt.readToken_eq_excl=function(D){var H=this.input.charCodeAt(this.pos+1);if(H===61)return this.finishOp(Te.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(D===61&&H===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(Te.arrow);return this.finishOp(D===61?Te.eq:Te.prefix,1)};lt.readToken_question=function(){var D=this.options.ecmaVersion;if(D>=11){var H=this.input.charCodeAt(this.pos+1);if(H===46){var X=this.input.charCodeAt(this.pos+2);if(X<48||X>57)return this.finishOp(Te.questionDot,2)}if(H===63){if(D>=12){var Y=this.input.charCodeAt(this.pos+2);if(Y===61)return this.finishOp(Te.assign,3)}return this.finishOp(Te.coalesce,2)}}return this.finishOp(Te.question,1)};lt.readToken_numberSign=function(){var D=this.options.ecmaVersion,H=35;if(D>=13){if(++this.pos,H=this.fullCharCodeAtPos(),Qt(H,!0)||H===92)return this.finishToken(Te.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Xn(H)+"'")};lt.getTokenFromCode=function(D){switch(D){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(Te.parenL);case 41:return++this.pos,this.finishToken(Te.parenR);case 59:return++this.pos,this.finishToken(Te.semi);case 44:return++this.pos,this.finishToken(Te.comma);case 91:return++this.pos,this.finishToken(Te.bracketL);case 93:return++this.pos,this.finishToken(Te.bracketR);case 123:return++this.pos,this.finishToken(Te.braceL);case 125:return++this.pos,this.finishToken(Te.braceR);case 58:return++this.pos,this.finishToken(Te.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(Te.backQuote);case 48:var H=this.input.charCodeAt(this.pos+1);if(H===120||H===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(H===111||H===79)return this.readRadixNumber(8);if(H===98||H===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(D);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(D);case 124:case 38:return this.readToken_pipe_amp(D);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(D);case 60:case 62:return this.readToken_lt_gt(D);case 61:case 33:return this.readToken_eq_excl(D);case 63:return this.readToken_question();case 126:return this.finishOp(Te.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Xn(D)+"'")};lt.finishOp=function(D,H){var X=this.input.slice(this.pos,this.pos+H);return this.pos+=H,this.finishToken(D,X)};lt.readRegexp=function(){var D,H,X=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(X,"Unterminated regular expression");var Y=this.input.charAt(this.pos);if(It.test(Y))this.raise(X,"Unterminated regular expression");if(!D){if(Y==="[")H=!0;else if(Y==="]"&&H)H=!1;else if(Y==="/"&&!H)break;D=Y==="\\"}else D=!1;++this.pos}var ce=this.input.slice(X,this.pos);++this.pos;var we=this.pos,ke=this.readWord1();if(this.containsEsc)this.unexpected(we);var ve=this.regexpState||(this.regexpState=new Yo(this));ve.reset(X,ce,ke),this.validateRegExpFlags(ve),this.validateRegExpPattern(ve);var Ee=null;try{Ee=new RegExp(ce,ke)}catch(Ce){}return this.finishToken(Te.regexp,{pattern:ce,flags:ke,value:Ee})};lt.readInt=function(D,H,X){var Y=this.options.ecmaVersion>=12&&H===void 0,ce=X&&this.input.charCodeAt(this.pos)===48,we=this.pos,ke=0,ve=0;for(var Ee=0,Ce=H==null?1/0:H;Ee<Ce;++Ee,++this.pos){var Ae=this.input.charCodeAt(this.pos),_e=void 0;if(Y&&Ae===95){if(ce)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(ve===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(Ee===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");ve=Ae;continue}if(Ae>=97)_e=Ae-97+10;else if(Ae>=65)_e=Ae-65+10;else if(Ae>=48&&Ae<=57)_e=Ae-48;else _e=1/0;if(_e>=D)break;ve=Ae,ke=ke*D+_e}if(Y&&ve===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===we||H!=null&&this.pos-we!==H)return null;return ke};function Gh(D,H){if(H)return parseInt(D,8);return parseFloat(D.replace(/_/g,""))}function Qo(D){if(typeof BigInt!=="function")return null;return BigInt(D.replace(/_/g,""))}lt.readRadixNumber=function(D){var H=this.pos;this.pos+=2;var X=this.readInt(D);if(X==null)this.raise(this.start+2,"Expected number in radix "+D);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)X=Qo(this.input.slice(H,this.pos)),++this.pos;else if(Qt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(Te.num,X)};lt.readNumber=function(D){var H=this.pos;if(!D&&this.readInt(10,void 0,!0)===null)this.raise(H,"Invalid number");var X=this.pos-H>=2&&this.input.charCodeAt(H)===48;if(X&&this.strict)this.raise(H,"Invalid number");var Y=this.input.charCodeAt(this.pos);if(!X&&!D&&this.options.ecmaVersion>=11&&Y===110){var ce=Qo(this.input.slice(H,this.pos));if(++this.pos,Qt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(Te.num,ce)}if(X&&/[89]/.test(this.input.slice(H,this.pos)))X=!1;if(Y===46&&!X)++this.pos,this.readInt(10),Y=this.input.charCodeAt(this.pos);if((Y===69||Y===101)&&!X){if(Y=this.input.charCodeAt(++this.pos),Y===43||Y===45)++this.pos;if(this.readInt(10)===null)this.raise(H,"Invalid number")}if(Qt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var we=Gh(this.input.slice(H,this.pos),X);return this.finishToken(Te.num,we)};lt.readCodePoint=function(){var D=this.input.charCodeAt(this.pos),H;if(D===123){if(this.options.ecmaVersion<6)this.unexpected();var X=++this.pos;if(H=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,H>1114111)this.invalidStringToken(X,"Code point out of bounds")}else H=this.readHexChar(4);return H};lt.readString=function(D){var H="",X=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var Y=this.input.charCodeAt(this.pos);if(Y===D)break;if(Y===92)H+=this.input.slice(X,this.pos),H+=this.readEscapedChar(!1),X=this.pos;else if(Y===8232||Y===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(Ii(Y))this.raise(this.start,"Unterminated string constant");++this.pos}}return H+=this.input.slice(X,this.pos++),this.finishToken(Te.string,H)};var Jo={};lt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(D){if(D===Jo)this.readInvalidTemplateToken();else throw D}this.inTemplateElement=!1};lt.invalidStringToken=function(D,H){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Jo;else this.raise(D,H)};lt.readTmplToken=function(){var D="",H=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var X=this.input.charCodeAt(this.pos);if(X===96||X===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===Te.template||this.type===Te.invalidTemplate))if(X===36)return this.pos+=2,this.finishToken(Te.dollarBraceL);else return++this.pos,this.finishToken(Te.backQuote);return D+=this.input.slice(H,this.pos),this.finishToken(Te.template,D)}if(X===92)D+=this.input.slice(H,this.pos),D+=this.readEscapedChar(!0),H=this.pos;else if(Ii(X)){switch(D+=this.input.slice(H,this.pos),++this.pos,X){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:D+=`
|
|
6
|
+
`;break;default:D+=String.fromCharCode(X);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;H=this.pos}else++this.pos}};lt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(Te.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
|
|
7
|
+
`)++this.pos;case`
|
|
8
|
+
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};lt.readEscapedChar=function(D){var H=this.input.charCodeAt(++this.pos);switch(++this.pos,H){case 110:return`
|
|
9
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Xn(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(D){var X=this.pos-1;this.invalidStringToken(X,"Invalid escape sequence in template string")}default:if(H>=48&&H<=55){var Y=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],ce=parseInt(Y,8);if(ce>255)Y=Y.slice(0,-1),ce=parseInt(Y,8);if(this.pos+=Y.length-1,H=this.input.charCodeAt(this.pos),(Y!=="0"||H===56||H===57)&&(this.strict||D))this.invalidStringToken(this.pos-1-Y.length,D?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(ce)}if(Ii(H)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(H)}};lt.readHexChar=function(D){var H=this.pos,X=this.readInt(16,D);if(X===null)this.invalidStringToken(H,"Bad character escape sequence");return X};lt.readWord1=function(){this.containsEsc=!1;var D="",H=!0,X=this.pos,Y=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var ce=this.fullCharCodeAtPos();if(ei(ce,Y))this.pos+=ce<=65535?1:2;else if(ce===92){this.containsEsc=!0,D+=this.input.slice(X,this.pos);var we=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var ke=this.readCodePoint();if(!(H?Qt:ei)(ke,Y))this.invalidStringToken(we,"Invalid Unicode escape");D+=Xn(ke),X=this.pos}else break;H=!1}return D+this.input.slice(X,this.pos)};lt.readWord=function(){var D=this.readWord1(),H=Te.name;if(this.keywords.test(D))H=dr[D];return this.finishToken(H,D)};var Hh="8.19.0";St.acorn={Parser:St,version:Hh,defaultOptions:ur,Position:un,SourceLocation:Yn,getLineInfo:Bo,Node:es,TokenType:pt,tokTypes:Te,keywordTypes:dr,TokContext:Yt,tokContexts:gt,isIdentifierChar:ei,isIdentifierStart:Qt,Token:br,isNewLine:Ii,lineBreak:It,lineBreakG:Mh,nonASCIIwhitespace:Do};function mn(D){return(H)=>D(H)}function ts(...D){return St.extend(...D)}function yn(D,H,X){for(let Y=H;Y<X;Y++){let ce=D.charCodeAt(Y);if(ce===10||ce===13||ce===8232||ce===8233)return!0}return!1}var Lo=new WeakMap;function $t(D,H){if(D===void 0)return!1;if(D.length<16)return D.includes(H);let X=Lo.get(D);if(X===void 0||X.length>D.length)X={names:new Set,length:0},Lo.set(D,X);while(X.length<D.length)X.names.add(D[X.length++]);return X.names.has(H)}function Zo(D){return{support:"typescript",parser:D}}function el(D){return D&&"parser"in D?D.parser:void 0}function tl(D){return D&&"names"in D?D.names:void 0}function is(){throw Error('svelte-ast: parsing TypeScript needs `typescript` from "svelte-ast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var Xh=/^\t+/;class et extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(D,H,X){super(`${X}
|
|
10
|
+
https://svelte.dev/e/${H}`);this.code=H,this.reason=X;let Y=typeof D==="number"?D:D?.start,ce=typeof D==="number"?D:D?.end;if(Y!==void 0)this.position=[Y,ce??Y],this.start=C(this.position[0]),this.end=C(this.position[1]),this.frame=Yh(this.start.line-1,this.end.column)}}var il=(D)=>D.replace(Xh,(H)=>" ".repeat(H.length));function Yh(D,H){let X=Math.max(0,D-2),Y=[];for(let we=X;we<D+3;we++){let ke=ze(we);if(ke===void 0)break;Y.push(ke)}let ce=String(X+Y.length+1).length;return Y.map((we,ke)=>{let ve=`${String(X+ke+1).padStart(ce," ")}: ${il(we)}`;if(X+ke!==D)return ve;return`${ve}
|
|
11
|
+
${" ".repeat(ce+2+il(we.slice(0,H)).length)}^`}).join(`
|
|
12
|
+
`)}function rl(D){throw new et(D,"attribute_duplicate","Attributes need to be unique")}function al(D){throw new et(D,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function ss(D,H){throw new et(D,"block_duplicate_clause",`${H} cannot appear more than once within a block`)}function ol(D){throw new et(D,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function ll(D){throw new et(D,"block_invalid_elseif","'elseif' should be 'else if'")}function cl(D,H,X){throw new et(D,"block_invalid_placement",`{#${H} ...} block cannot be ${X}`)}function pl(D){throw new et(D,"block_unclosed","Block was left open")}function ul(D){throw new et(D,"block_unexpected_close","Unexpected block closing tag")}function hl(D){throw new et(D,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function fl(D){throw new et(D,"css_empty_declaration","Declaration cannot be empty")}function kr(D){throw new et(D,"css_expected_identifier","Expected a valid CSS identifier")}function dl(D){throw new et(D,"css_selector_invalid","Invalid selector")}function ml(D){throw new et(D,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function Er(D){throw new et(D,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function yl(D){throw new et(D,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function gl(D,H){throw new et(D,"directive_missing_name",`\`${H}\` name cannot be empty`)}function xl(D,H){throw new et(D,"element_invalid_closing_tag",`\`</${H}>\` attempted to close an element that was not open`)}function vl(D,H,X){throw new et(D,"element_invalid_closing_tag_autoclosed",`\`</${H}>\` attempted to close element that was already automatically closed by \`<${X}>\` (cannot nest \`<${X}>\` inside \`<${H}>\`)`)}function Cr(D,H){throw new et(D,"element_unclosed",`\`<${H}>\` was left open`)}function Ar(D){throw new et(D,"expected_attribute_value","Expected attribute value")}function bl(D){throw new et(D,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function Nr(D){throw new et(D,"expected_identifier","Expected an identifier")}function Sl(D){throw new et(D,"expected_pattern","Expected identifier or destructure pattern")}function wl(D){throw new et(D,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function di(D,H){throw new et(D,"expected_token",`Expected token ${H}`)}function kl(D){throw new et(D,"expected_whitespace","Expected whitespace")}function Qh(D,H){throw new et(D,"js_parse_error",`${H}`)}function El(D){throw new et(D,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Cl(D){throw new et(D,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function Al(D,H){throw new et(D,"script_invalid_attribute_value",`If the \`${H}\` attribute is supplied, it must be a boolean attribute`)}function Nl(D){throw new et(D,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Tl(D,H){throw new et(D,"script_reserved_attribute",`The \`${H}\` attribute is reserved and cannot be used`)}function _l(D){throw new et(D,"style_duplicate","A component can have a single top-level `<style>` element")}function Il(D){throw new et(D,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function $l(D){throw new et(D,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function Tr(D){throw new et(D,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function Pl(D,H){throw new et(D,"svelte_meta_duplicate",`A component can only have one \`<${H}>\` element`)}function Ml(D,H){throw new et(D,"svelte_meta_invalid_content",`<${H}> cannot have children`)}function Rl(D,H){throw new et(D,"svelte_meta_invalid_placement",`\`<${H}>\` tags cannot be inside elements or blocks`)}function Ll(D,H){throw new et(D,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${H}`)}function Ol(D){throw new et(D,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Vl(D){throw new et(D,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function rs(D,H){throw new et(D,"svelte_options_invalid_attribute_value",`Value must be ${H}, if specified`)}function Dl(D){throw new et(D,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function Bl(D){throw new et(D,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function Fl(D){throw new et(D,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function _r(D){throw new et(D,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Ul(D){throw new et(D,"svelte_options_reserved_tagname","Tag name is reserved")}function jl(D,H){throw new et(D,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${H}'`)}function Wl(D){throw new et(D,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function ql(D,H,X){throw new et(D,"tag_invalid_placement",`{@${H} ...} tag cannot be ${X}`)}function Wt(D){throw new et(D,"unexpected_eof","Unexpected end of input")}function zl(D,H){throw new et(D,"unexpected_reserved_word",`'${H}' is a reserved word in JavaScript and cannot be used here`)}function Kl(D){throw new et(D,"unterminated_string_constant","Unterminated string constant")}function Gl(D){throw new et(D,"void_element_invalid_content","Void elements cannot have children or closing tags")}var Pi="",Hl=[],as=0,kt=[],Et=0;function Jh(D,H){Pi=D,Hl=H,as=0}function Zh(){return as}function ef(D,H,X,Y){as=Y}function tf(D,H,X,Y,ce,we){as=Y;let ke=H;if(D&&ke.includes(`
|
|
13
|
+
`)){let Ee=Pi.lastIndexOf(`
|
|
14
|
+
`,X-1)+1,Ce=Ee,Ae=Pi.charCodeAt(Ce);while(Ae===32||Ae===9)Ae=Pi.charCodeAt(++Ce);if(Ce>Ee)ke=nf(ke,Pi.slice(Ee,Ce))}let ve={type:D?"Block":"Line",value:ke,start:X,end:Y};if(ce&&we)ve.loc={start:ce,end:we};Hl.push(ve)}function nf(D,H){let X=D.startsWith(H)?H.length:0,Y="",ce=D.indexOf(`
|
|
15
|
+
`,X);while(ce!==-1){if(Y+=D.slice(X,ce+1),X=ce+1,D.startsWith(H,X))X+=H.length;ce=D.indexOf(`
|
|
16
|
+
`,X)}return Y+D.slice(X)}function sf(D,H,X){let Y=0,ce=H.length;while(Y<ce){let we=Y+ce>>>1;if(H[we].start<X)Y=we+1;else ce=we}if(Y>=H.length)return;if(kt=H.slice(Y).map(({type:we,value:ke,start:ve,end:Ee})=>({type:we,value:ke,start:ve,end:Ee})),Et=0,wr(D,void 0,!1),Et<kt.length&&(kt[Et].start>=D.end||D.type==="Program")){D.trailingComments??=[];while(Et<kt.length)D.trailingComments.push(kt[Et++])}}var rf=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function nl(D,H){for(let X=D;X<H;X++){let Y=Pi.charCodeAt(X);if(Y!==44&&Y!==41&&Y!==32&&Y!==9)return!0}return!1}function wr(D,H,X){while(Et<kt.length&&kt[Et].start<D.start)D.leadingComments??=[],D.leadingComments.push(kt[Et++]);if(Et>=kt.length)return;let Y=kt[Et].start;if(Y<D.end||!nl(D.end,Y)){let ce=y(D),we=rf.get(D.type),ke=we===void 0?void 0:ce[we],ve=Array.isArray(ke)&&ke.length===0;for(let Ee in ce){if(Et>=kt.length)return;if(Ee==="type")continue;let Ce=ce[Ee];if(Array.isArray(Ce)){let Ae=Ee===we;for(let _e=0;_e<Ce.length;_e++){let Ne=Ce[_e];if(c(Ne))wr(Ne,D,Ae?_e===Ce.length-1:ve)}}else if(c(Ce))wr(Ce,D,ve)}if(Et>=kt.length)return}if(H!==void 0&&D.end===H.end)return;if(X)while(Et<kt.length){if(H&&kt[Et].start>=H.end)break;D.trailingComments??=[],D.trailingComments.push(kt[Et++])}else if(D.end<=kt[Et].start&&!nl(D.end,kt[Et].start))D.trailingComments=[kt[Et++]]}var os=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),ls=!1,gn=1,af=2,of=32,lf=256,cf=gn|af|lf,pf=2,uf=3,hf=4,ff=/\r\n?|\n|\u2028|\u2029/,sl=new Map;function ns(D){if(!(D instanceof RegExp))return D;let H=sl.get(D);if(!H){let X=new Set(D.source.slice(4,-2).split("|"));H={test:(Y)=>X.has(Y)},sl.set(D,H)}return H}var Ir=mn((D)=>class extends D{declareName(H,X,Y){let ce=!1;if(X===pf){let we=this.currentScope();if(ce=$t(we.lexical,H)||$t(we.functions,H)||$t(we.var,H),we.lexical.push(H),this.inModule&&we.flags&gn)delete this.undefinedExports[H]}else if(X===hf)this.currentScope().lexical.push(H);else if(X===uf){let we=this.currentScope();ce=this.treatFunctionsAsVar?$t(we.lexical,H):$t(we.lexical,H)||$t(we.var,H),we.functions.push(H)}else for(let we=this.scopeStack.length-1;we>=0;--we){let ke=this.scopeStack[we];if($t(ke.lexical,H)&&!(ke.flags&of&&ke.lexical[0]===H)||!this.treatFunctionsAsVarInScope(ke)&&$t(ke.functions,H)){ce=!0;break}if(ke.var.push(H),this.inModule&&ke.flags&gn)delete this.undefinedExports[H];if(ke.flags&cf)break}if(ce)this.raiseRecoverable(Y,`Identifier '${H}' has already been declared`)}}),$r=mn((D)=>{let{keywordTypes:H,tokTypes:X}=D.acorn,Y=new Map("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this const class extends export import super".split(" ").map((we)=>[we,H[we]])),ce;return class extends D{constructor(we,ke,ve){super(we,ke,ve);this.keywords=ns(this.keywords),this.reservedWords=ns(this.reservedWords),this.reservedWordsStrict=ns(this.reservedWordsStrict),this.reservedWordsStrictBind=ns(this.reservedWordsStrictBind),ce??=this.context[0]}reset(we,ke,ve){if(super.reset?.(we,ke,ve),this.input=we,this.containsEsc=!1,this.pos=ke,ve)this.lineStart=ke-ve.column,this.curLine=ve.line;else this.lineStart=we.lastIndexOf(`
|
|
17
|
+
`,ke-1)+1,this.curLine=this.options.locations?we.slice(0,this.lineStart).split(ff).length:1;this.type=X.eof,this.value=null,this.start=this.end=ke,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=ke;let Ee=this.context;if(Ee.length!==1||Ee[0]!==ce)this.context=this.initialContext();if(this.exprAllowed=!0,this.strict=!0,this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels.length>0)this.labels=[];for(let _e in this.undefinedExports){this.undefinedExports=Object.create(null);break}let Ce=this.scopeStack,Ae=Ce[0];if(Ce.length!==1||Ae.flags!==gn||Ae.var.length>0||Ae.lexical.length>0||Ae.functions.length>0||Ae.tsTypes!==void 0||Ae.tsExportOnly!==void 0||Ae.tsEnums!==void 0)this.scopeStack=[],this.enterScope(gn);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(we,ke){let ve=super.parseParenAndDistinguishExpression(we,ke);if(ve.type==="ParenthesizedExpression")ls=!0;return ve}checkUnreserved(we){if(os.has(we.name))super.checkUnreserved(we)}canInsertSemicolon(){let we=this.type;return we===X.eof||we===X.braceR||yn(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let we=this.input,ke=this.options.locations,ve=this.pos,Ee=we.charCodeAt(ve);for(;;)if(Ee===32||Ee===9)Ee=we.charCodeAt(++ve);else if(Ee===10){if(Ee=we.charCodeAt(++ve),ke)this.curLine++,this.lineStart=ve}else break;if(this.pos=ve,Ee===47||Ee<33||Ee>=128)super.skipSpace()}readWord1(){let we=this.input,ke=this.pos,ve=ke,Ee=we.charCodeAt(ve),Ce=0;while(Ee>=97&&Ee<=122||Ee>=65&&Ee<=90||Ee>=48&&Ee<=57||Ee===95||Ee===36)Ce=Math.imul(Ce,31)+Ee|0,Ee=we.charCodeAt(++ve);if(Ee>=128||Ee===92)return super.readWord1();return this.containsEsc=!1,this.pos=ve,We(we,ke,ve,Ce)}readWord(){let we=this.readWord1();return this.finishToken(Y.get(we)??X.name,we)}}}),Xl=ts(Ir,$r),df=/ \(\d+:\d+\)$/;function Mi(D){return D}function Yl(D){return D instanceof SyntaxError&&"pos"in D&&typeof D.pos==="number"}function cs(D,H,X,Y,ce,we=D.root.comments.length){let ke=D.root.comments;Jh(H,ke);let ve={onComment:D.comments?tf:ef,sourceType:"module",ecmaVersion:16,locations:D.loc,preserveParens:Y};if(D.lfOnly)ve.startLocation=C(X);let Ee=D.isTypeScript?D.typescript:Xl;if(!Ee)is();let Ce;try{Ce=ce(Ee,ve)}catch(Ae){if(!Yl(Ae))throw Ae;Qh(Ae.pos,Ae.message.replace(df,""))}if(ke.length>we)sf(Mi(Ce),ke,X);return Ce}function ps(D,H,X=0){return Mi(cs(D,H,0,!1,(Y,ce)=>{if(X>0&&ce.locations)ce.startLocation=C(X);let we=new Y(ce,H,X).parse();return we.start=0,we},0))}function mf(D,H){if(!H)return{line:1,column:0};let{column:X}=C(D);return{line:je(D-X)+1,column:X}}var yf={count:0},Sr,gf=(D)=>D.parseExpression();function xf(D,H,X,Y,ce){let we=Sr;if(Sr=void 0,we?.ParserClass===D&&we.onComment===H.onComment&&we.locations===H.locations&&we.parser.reset)we.parser.reset(X,Y,H.startLocation);else we={ParserClass:D,onComment:H.onComment,locations:H.locations,parser:new D(H,X,Y)};let ke=we.parser;ke.nextToken();let ve=ce(ke);return ke.input="",Sr=we,ve}function Ql(D,H,X,Y){return yf.count+=1,ls=!1,cs(D,H,X,!0,(ce,we)=>(we.startLocation??=mf(X,we.locations),xf(ce,we,H,X,Y)))}function Ri(D,H,X,Y=!1){let ce=Mi(Ql(D,H,X,gf)),we=Math.max(ce.end,Zh());return{node:ls&&!Y?Pr(ce):ce,end:we}}function Jl(D,H,X){let Y=D.root.comments.length,ce=!0,we=Ql(D,H,X,(ve)=>{let Ee={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},Ce=ve.parseMaybeConditional(void 0,Ee);if(ve.type!==Xl.acorn.tokTypes.eof)return ce=!1,Ce;let Ae=ve.toAssignable(Ce,!1,Ee);return ve.checkLValPattern(Ae),Ae});if(!ce){D.root.comments.length=Y;return}let ke=Mi(we);return ls?Pr(ke):ke}function Zl(D,H,X){return Mi(cs(D,H,X,!1,(Y,ce)=>{let we=new Y(ce,H,X);try{return we.nextToken(),we.parseStatement(null,!0,Object.create(null))}catch(ke){if(Yl(ke)&&ke.pos===H.length)Wt(H.length);throw ke}}))}function ec(D,H,X){let Y=cs(D,H,0,!1,(ce,we)=>{let ke=new ce(we,H,0),ve=ke.startNode(),Ee=[],Ce=Object.create(null);return X((Ae)=>{ke.pos=Ae,ke.context=ke.initialContext(),ke.exprAllowed=!0,ke.nextToken();let _e=ke.parseStatement(null,!0,Ce);return Ee.push(_e),_e.end}),ve.body=Ee,ke.finishNode(ve,"Program")});return Mi(Y).body}function Pr(D){let H=D;while(H.type==="ParenthesizedExpression")H=H.expression;return ee(H,Pr),H}var vf=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],bf=/[:!]/;function Sf(D){let H;return()=>(H??=wf(D),H)}function wf(D){let H=new Map,X=0,Y="";for(let ce of D.split(" ")){let we=ce.search(bf);Y=Y.slice(0,Number.parseInt(ce[0],36))+ce.slice(1,we);let ke=Number.parseInt(ce.slice(we+1),36);if(H.set(`${Y};`,ke),ce[we]==="!")H.set(Y,ke);X=Math.max(X,Y.length+1)}return{table:H,longest:X}}var ic=Sf("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),Mr=(D)=>D>=48&&D<=57,kf=(D)=>Mr(D)||D>=65&&D<=70||D>=97&&D<=102,tc=(D)=>Mr(D)||D>=65&&D<=90||D>=97&&D<=122,us=0;function Ef(D,H,X,Y){if(D.charCodeAt(H)===35){let ve=(D.charCodeAt(H+1)|32)===120,Ee=H+(ve?2:1),Ce=Ee;while(Ce<D.length&&(ve?kf:Mr)(D.charCodeAt(Ce)))Ce++;if(Ce===Ee)return 0;return us=D.charCodeAt(Ce)===59?Ce+1:Ce,Number.parseInt(D.slice(Ee,Ce),ve?16:10)}let{table:ce,longest:we}=Y(),ke=H;while(ke-H<we&&tc(D.charCodeAt(ke)))ke++;if(D.charCodeAt(ke)===59){let ve=ce.get(D.slice(H,ke+1));if(ve!==void 0)return us=ke+1,ve}for(let ve=ke;ve>H;ve--){let Ee=ce.get(D.slice(H,ve));if(Ee===void 0)continue;if(X){let Ce=D.charCodeAt(ve);if(tc(Ce)||Ce===95||Ce===61)continue}return us=ve,Ee}return 0}function Cf(D,H){if(D===10&&!H)return 32;if(D<128)return D;if(D<=159)return vf[D-128];if(D>=55296&&D<=57343)return 0;if(D<=196607)return D;if(D>=917504&&D<=917631||D>=917760&&D<=917999)return D;return 0}function hs(D,H,X){let Y=D.indexOf("&");if(Y===-1)return D;let ce="",we=0;while(Y!==-1){let ke=Ef(D,Y+1,H,X);if(ke)ce+=D.slice(we,Y)+String.fromCodePoint(Cf(ke,H)),we=us;Y=D.indexOf("&",ke?we:Y+1)}return ce+D.slice(we)}var nc=new WeakMap;function Rr(D,H){let X=nc.get(D);if(X===void 0)nc.set(D,[H]);else X.push(H)}var Af=/\r(?!\n)|[\u2028\u2029]/,bc=/\s*}/y;function Dr(D,H){let X=D.codePointAt(H);if(X===void 0||!Qt(X,!0))return H;let Y=H+(X<=65535?1:2),ce=D.codePointAt(Y);while(ce!==void 0&&ei(ce,!0))Y+=ce<=65535?1:2,ce=D.codePointAt(Y);return Y}class Sc{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(D,H,X,Y={}){if(this.source=D,this.loc=Y.loc??!1,this.lfOnly=this.loc&&!Af.test(D),this.isTypeScript=re(D),this.typescript=X.typescript,this.isTypeScript&&!this.typescript)is();this.entityNames=X.entityNames,this.css=Y.css??!0,this.script=Y.script??!0,this.comments=Y.comments??!0,this.root={type:"Root",start:0,end:H,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(D){if(D.length===1)return this.source.charCodeAt(this.index)===D.charCodeAt(0);return this.source.startsWith(D,this.index)}matchRegex(D){return D.lastIndex=this.index,D.exec(this.source)?.[0]??null}eat(D,H=!1){if(this.match(D))return this.index+=D.length,!0;if(H)di(this.index,D);return!1}read(D){let H=this.matchRegex(D);if(H)this.index+=H.length;return H}readUntil(D){if(this.index>=this.source.length)Wt(this.source.length);let H=this.source.indexOf(D,this.index),X=H===-1?this.source.length:H,Y=this.source.slice(this.index,X);return this.index=X,Y}allowWhitespace(){this.index=s(this.source,this.index)}requireWhitespace(){if(!l(this.source.charCodeAt(this.index)))kl(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(D,H){return this.loc?{start:C(D),end:C(H)}:void 0}readIdentifierName(){let D=this.index,H=Dr(this.source,D),X=this.source.slice(D,H);if(this.index=H,os.has(X))zl(D,X);let Y={type:"Identifier",name:X,start:D,end:H};if(this.loc)Y.loc=this.sourceLocation(D,H);return Y}current(){return this.stack[this.stack.length-1]}append(D){this.fragments[this.fragments.length-1].nodes.push(D)}open(D,H){this.append(D),this.stack.push(D),this.fragments.push(H)}setFragment(D){this.fragments[this.fragments.length-1]=D}close(){this.stack.pop(),this.fragments.pop()}}var Nf={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function Br(D,H,X,Y){return{type:"Literal",start:H,end:X,value:Y,raw:D.slice(H,X)}}function sc(D,H){let X=D.charCodeAt(H);if(X===34||X===39){for(let ce=H+1;ce<D.length;ce++){let we=D.charCodeAt(ce);if(we===X)return Br(D,H,ce+1,D.slice(H+1,ce));if(we===92||we===10||we===13)return null}return null}let Y=H;for(;Y<D.length;Y++){let ce=D.charCodeAt(Y);if(ce<48||ce>57)break}if(Y===H||X===48&&Y-H>1)return null;return Br(D,H,Y,Number(D.slice(H,Y)))}function Tf(D,H,X){let Y=Dr(D,H);if(Y===H)return sc(D,H);let ce=D.slice(H,Y);if(ce==="true"||ce==="false"||ce==="null")return Br(D,H,Y,ce==="null"?null:ce==="true");if(os.has(ce))return null;let we={type:"Identifier",start:H,end:Y,name:ce};for(let ke=Y;;){let ve=D.charCodeAt(ke);if(ve===40){let Ae=_f(D,ke+1,X);if(!Ae)return null;we={type:"CallExpression",start:H,end:Ae.end,callee:we,arguments:Ae.arguments,optional:!1},ke=Ae.end;continue}let Ee,Ce;if(ve===46){if(Ce=Dr(D,ke+1),Ce===ke+1)return null;Ee={type:"Identifier",start:ke+1,end:Ce,name:D.slice(ke+1,Ce)}}else if(ve===91){if(Ee=sc(D,ke+1),!Ee||D.charCodeAt(Ee.end)!==93)return null;Ce=Ee.end+1}else return we;we={type:"MemberExpression",start:H,end:Ce,object:we,property:Ee,computed:ve===91,optional:!1},ke=Ce}}function _f(D,H,X){let Y=[],ce=s(D,H);if(D.charCodeAt(ce)===41)return{arguments:Y,end:ce+1};for(;;){let we=ds(D,ce,X);if(!we)return null;Y.push(we),ce=s(D,we.end);let ke=D.charCodeAt(ce);if(ke===41)return{arguments:Y,end:ce+1};if(ke!==44)return null;if(ce=s(D,ce+1),D.charCodeAt(ce)===41)return null}}function qr(D,H,X){let Y=D.charCodeAt(H),ce=D.charCodeAt(H+1);if(!(Y===33&&ce!==61)&&!(Y===45&&ce!==45&&ce!==61))return Tf(D,H,X);let we=qr(D,s(D,H+1),X);if(!we)return null;return{type:"UnaryExpression",start:H,end:we.end,operator:Y===33?"!":"-",prefix:!0,argument:we}}function rc(D,H,X){let Y=D.charCodeAt(H),ce=D.charCodeAt(H+1);switch(Y){case 124:return ce===124&&D.charCodeAt(H+2)!==61?"||":null;case 38:return ce===38&&D.charCodeAt(H+2)!==61?"&&":null;case 63:return ce===63&&D.charCodeAt(H+2)!==61?"??":null;case 61:if(ce!==61)return null;return D.charCodeAt(H+2)===61?"===":"==";case 33:if(ce!==61)return null;return D.charCodeAt(H+2)===61?"!==":"!=";case 60:case 62:if(X||ce===Y)return null;if(ce===61)return Y===60?"<=":">=";return Y===60?"<":">";case 43:return ce===43||ce===61?null:"+";case 45:return ce===45||ce===61?null:"-";case 42:return ce===42||ce===61?null:"*";case 47:return ce===47||ce===42||ce===61?null:"/";case 37:return ce===61?null:"%";default:return null}}function Fr(D,H,X,Y){if(wc(D.charCodeAt(H.end)))return H;let ce=s(D,H.end),we=rc(D,ce,Y);if(we===null)return H;let ke=Nf[we];if(ke<=X)return H;let ve=qr(D,s(D,ce+we.length),Y);if(!ve)return null;let Ee=Fr(D,ve,we==="??"?2:ke,Y);if(!Ee)return null;let Ce;if(we==="||"||we==="&&"||we==="??"){let Ae=rc(D,s(D,Ee.end),Y);if(we==="??"?Ae==="||"||Ae==="&&":Ae==="??")return null;Ce={type:"LogicalExpression",start:H.start,end:Ee.end,left:H,operator:we,right:Ee}}else Ce={type:"BinaryExpression",start:H.start,end:Ee.end,left:H,operator:we,right:Ee};return Fr(D,Ce,X,Y)}function ds(D,H,X){let Y=qr(D,H,X);if(!Y)return null;let ce=Fr(D,Y,-1,X);if(!ce||wc(D.charCodeAt(ce.end)))return ce;let we=s(D,ce.end);if(D.charCodeAt(we)!==63)return ce;let ke=D.charCodeAt(we+1);if(ke===46||ke===63)return null;let ve=ds(D,s(D,we+1),X);if(!ve)return null;let Ee=s(D,ve.end);if(D.charCodeAt(Ee)!==58)return null;let Ce=ds(D,s(D,Ee+1),X);if(!Ce)return null;return{type:"ConditionalExpression",start:ce.start,end:Ce.end,test:ce,consequent:ve,alternate:Ce}}function wc(D){return D===125||D===41||D===44||D===58}function If(D,H){let X=D.charCodeAt(s(D,H));return X===125||X===41}function $f(D,H,X){let Y=ds(D,H,X);return Y&&If(D,Y.end)?Y:null}function Jt(D){switch(D.loc={start:V(D.start),end:V(D.end)},D.type){case"MemberExpression":Jt(D.object),Jt(D.property);break;case"CallExpression":Jt(D.callee);for(let H of D.arguments)Jt(H);break;case"UnaryExpression":Jt(D.argument);break;case"BinaryExpression":case"LogicalExpression":Jt(D.left),Jt(D.right);break;case"ConditionalExpression":Jt(D.test),Jt(D.consequent),Jt(D.alternate);break}}function Pt(D){let H=!D.loc||D.lfOnly?$f(D.source,D.index,D.isTypeScript):null;if(H){if(D.index=H.end,D.loc)Jt(H);return H}let{node:X,end:Y}=Ri(D,D.source,D.index);return D.index=Y,X}var Pf=new Set(["server","client","worker","test","default"]);function Mf(D,H,X){let{source:Y,index:ce}=D;if(ce>=Y.length)Wt(Y.length);let we=se(Y,ce);if(we===-1)Cr(Y.length,"script");D.index=oe(Y,we);let ke=D.script?ps(D,Y.slice(0,we),ce):{type:"Program",start:ce,end:we,body:[],sourceType:"module"};if(ke.start=ce,ke.loc)Object.assign(ke.loc.start,V(H)),Object.assign(ke.loc.end,V(D.index));else if(D.loc)ke.loc={start:V(H),end:V(D.index)};let ve="default";for(let Ee of X){if(Pf.has(Ee.name))Tl(Ee,Ee.name);if(Ee.name==="module"){if(Ee.value!==!0)Al(Ee,Ee.name);ve="module"}if(Ee.name==="context"){let Ce=Ee.value;if(!Array.isArray(Ce)||Ce.length!==1||Ce[0].type!=="Text"||Ce[0].data!=="module")Nl(Ee);ve="module"}}return{type:"Script",start:H,end:D.index,context:ve,content:ke,attributes:X}}var Rf=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,Lf=/\d+(\.\d+)?%/y,Of=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,Vf=/\s*>/y,mi=-1,kc=34,Df=35,Bf=36,Ff=38,Ec=39,Uf=40,jf=41,gs=42,Wf=43,qf=45,zf=46,Cc=47,Ur=58,Kf=59,Gf=60,ac=61,Hf=62,Xf=91,zr=92,Yf=93,Qf=94,Ac=123,jr=124,Jf=125,Nc=126,ms=[];function Zf(D,H,X){let Y=D.index;ms=[];let ce=D.css?td(D):ed(D),we=D.index;return D.eat("</style",!0),D.read(Vf),{type:"StyleSheet",start:H,end:D.index,attributes:X,children:ce,comments:ms,content:{start:Y,end:we,styles:D.source.slice(Y,we),comment:null}}}function ed(D){return D.index=ae(D.source,D.index),[]}function td(D){let H=[];for(;;){if(Li(D,!0),D.match("</style")||D.index>=D.source.length)break;H.push(D.match("@")?Tc(D):_c(D))}return H}function Tc(D){let H=D.index;D.eat("@",!0);let X=Ni(D),Y=Kr(D,!0),ce=null;if(D.match("{"))ce=Pc(D);else D.eat(";",!0);return{type:"Atrule",start:H,end:D.index,name:X,prelude:Y,block:ce}}function _c(D){let H=D.index;return{type:"Rule",prelude:Ic(D,!1),block:Pc(D),start:H,end:D.index}}function Ic(D,H){let X=[];Li(D,!0);let Y=D.index;while(D.index<D.source.length){X.push(id(D,H));let ce=D.index;if(Li(D,!0),D.match(H?")":"{"))return{type:"SelectorList",start:Y,end:ce,children:X};D.eat(",",!0),Li(D,!0)}return Wt(D.source.length)}function oc(D,H){return{type:"RelativeSelector",combinator:D,selectors:[],start:H,end:-1}}function id(D,H){let{source:X,index:Y}=D,ce=[],we=oc(null,D.index);while(D.index<X.length){let ke=D.index,ve=X.charCodeAt(ke),Ee=we.selectors;if(ve===Ff)D.index++,Ee.push({type:"NestingSelector",name:"&",start:ke,end:D.index});else if(ve===gs)D.index++,Ee.push(lc(D,ke,"*"));else if(ve===Df)D.index++,Ee.push({type:"IdSelector",name:Ni(D),start:ke,end:D.index});else if(ve===zf)D.index++,Ee.push({type:"ClassSelector",name:Ni(D),start:ke,end:D.index});else if(ve===Ur){let Ne=X.charCodeAt(ke+1)===Ur;D.index+=Ne?2:1;let $e=Ni(D),De=null;if(D.eat("("))De=Ic(D,!0),D.eat(")",!0);if(Ne)Ee.push({type:"PseudoElementSelector",name:$e,start:ke,end:D.index,...De&&{args:De}});else Ee.push({type:"PseudoClassSelector",name:$e,args:De,start:ke,end:D.index})}else if(ve===Xf)D.index++,Ee.push(nd(D,ke));else{let Ne=H?D.read(Rf):null,$e=!Ne&&h(ve)?D.read(Lf):null;if(Ne)Ee.push({type:"Nth",value:Ne,start:ke,end:D.index});else if($e)Ee.push({type:"Percentage",value:$e,start:ke,end:D.index});else if($c(X,ke)===0){let De=Ni(D);Ee.push(lc(D,ke,De))}}let Ce=D.index;Li(D,!1);let Ae=D.match(",")||D.match(H?")":"{");if(D.index=Ce,Ae)return we.end=Ce,ce.push(we),{type:"ComplexSelector",start:Y,end:Ce,children:ce};let _e=sd(D);if(_e){if(we.selectors.length>0)we.end=Ce,ce.push(we);if(we=oc(_e,_e.start),D.allowWhitespace(),D.match(",")||D.match(H?")":"{"))dl(D.index)}}return Wt(X.length)}function lc(D,H,X){let Y=X,ce;if(D.eat("|"))ce=Y,Y=D.eat("*")?"*":Ni(D);return{type:"TypeSelector",name:Y,...ce!==void 0&&{namespace:ce},start:H,end:D.index}}function nd(D,H){let X=D.source;D.allowWhitespace();let Y=Ni(D);D.allowWhitespace();let ce=null,we=null,ke=X.charCodeAt(D.index);if(ke===ac)we="=";else if((ke===Nc||ke===Qf||ke===Bf||ke===gs||ke===jr)&&X.charCodeAt(D.index+1)===ac)we=X.slice(D.index,D.index+2);if(we)D.index+=we.length,D.allowWhitespace(),ce=ld(D);D.allowWhitespace();let ve=D.index;while(Rc(X.charCodeAt(D.index)))D.index++;let Ee=D.index>ve?X.slice(ve,D.index):null;return D.allowWhitespace(),D.eat("]",!0),{type:"AttributeSelector",start:H,end:D.index,name:Y,matcher:we,value:ce,flags:Ee}}function $c(D,H){let X=D.charCodeAt(H);if(X===Wf||X===Nc||X===Hf)return 1;if(X===jr&&D.charCodeAt(H+1)===jr)return 2;return 0}function sd(D){let H=D.index;D.allowWhitespace();let X=D.index,Y=$c(D.source,X);if(Y>0){D.index+=Y;let ce=D.index;return D.allowWhitespace(),{type:"Combinator",name:D.source.slice(X,ce),start:X,end:ce}}if(D.index!==H)return{type:"Combinator",name:" ",start:H,end:D.index};return null}function Pc(D){let H=D.index;D.eat("{",!0);let X=[];while(D.index<D.source.length){if(Li(D,!0),D.match("}"))break;X.push(rd(D))}return D.eat("}",!0),{type:"Block",start:H,end:D.index,children:X}}function rd(D){if(D.match("@"))return Tc(D);let H=D.index;Kr(D,!1);let X=D.source.charCodeAt(D.index);return D.index=H,X===Ac?_c(D):ad(D)}function ad(D){let{source:H,index:X}=D;if(X>=H.length)Wt(H.length);let Y=X;while(Y<H.length){let Ee=H.charCodeAt(Y);if(Ee===Ur||l(Ee))break;Y++}let ce=H.slice(X,Y);D.index=Y,D.allowWhitespace(),D.eat(":");let we=D.index;D.allowWhitespace();let ke=Kr(D,!0);if(!ke&&!ce.startsWith("--"))fl({start:X,end:we});let ve=D.index;if(!D.match("}"))D.eat(";",!0);return{type:"Declaration",start:X,end:ve,property:ce,value:ke}}function Kr(D,H){let X=D.source,Y=X.length,ce="",we=D.index,ke=null,ve=!1,Ee=!1,Ce=mi,Ae=D.index;while(Ae<Y){let _e=X.charCodeAt(Ae);if(ve){ve=!1,Ae++;continue}if(_e===zr){ve=!0,Ae++;continue}if(_e===Ce)Ce=mi;else if(_e===jf)Ee=!1;else if(Ce===mi&&(_e===kc||_e===Ec))Ce=_e;else if(_e===Uf){if(od(X,ce,we,Ae))Ee=!0}else if((_e===Kf||_e===Ac||_e===Jf)&&!Ee&&Ce===mi){if(D.index=Ae,!H)return"";if(ce+=X.slice(we,Ae),ke){let Ne=ce.length-ce.trimStart().length;for(let $e of ke)$e.position=Math.max(0,($e.position??0)-Ne)}return ce.trim()}else if(_e===Cc&&!Ee&&Ce===mi&&X.charCodeAt(Ae+1)===gs){ce+=X.slice(we,Ae),D.index=Ae;let Ne=Mc(D);if(H)Ne.position=ce.length,ms.push(Ne),ke??=[],ke.push(Ne);Ae=D.index,we=Ae;continue}Ae++}return D.index=Y,Wt(Y)}function od(D,H,X,Y){if(Y-X>=3)return D.charCodeAt(Y-3)===117&&D.charCodeAt(Y-2)===114&&D.charCodeAt(Y-1)===108;return(H+D.slice(X,Y)).endsWith("url")}function ld(D){let H=D.source,X=mi;if(D.eat('"'))X=kc;else if(D.eat("'"))X=Ec;let Y=D.index,ce=!1,we=Y;while(we<H.length){let ke=H.charCodeAt(we);if(ce)ce=!1;else if(ke===zr)ce=!0;else if(X===mi?ke===Yf||l(ke):ke===X)return D.index=X===mi?we:we+1,H.slice(Y,we).trim();we++}return D.index=we,Wt(H.length)}function Ni(D){let{source:H,index:X}=D,Y=H.charCodeAt(X);if(h(Y)||Y===qf&&h(H.charCodeAt(X+1)))kr(X);let ce="",we=X,ke=X;while(ke<H.length){let ve=H.charCodeAt(ke);if(ve===zr){ce+=H.slice(we,ke),D.index=ke;let Ee=D.matchRegex(Of);if(Ee){let Ce=String.fromCodePoint(Number.parseInt(Ee.slice(1),16));ce+=Ce==="\\"?"\\\\":Ce,ke+=Ee.length}else ce+=`\\${H[ke+1]}`,ke+=2;we=ke}else if(ve>=160||cd(ve))ke++;else break}if(ce+=H.slice(we,ke),D.index=ke,ce==="")kr(X);return ce}function Li(D,H){let X=D.source;D.allowWhitespace();for(;;){let Y=X.charCodeAt(D.index);if(Y===Cc&&X.charCodeAt(D.index+1)===gs){let ce=Mc(D);if(H)ms.push(ce)}else if(Y===Gf&&D.eat("<!--"))D.readUntil("-->"),D.eat("-->",!0);else break;D.allowWhitespace()}}function Mc(D){let H=D.index;D.eat("/*",!0);let X=D.readUntil("*/");return D.eat("*/",!0),{type:"CSSComment",value:X,start:H,end:D.index}}function Rc(D){return D>=65&&D<=90||D>=97&&D<=122}function cd(D){return Rc(D)||h(D)||D===95||D===45}var Lr=/<\/textarea(\s[^>]*)?>/iy,pd=/^![a-zA-Z]+$/,ud=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,hd=/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u,Or="\\u200C\\u200D",fd=new RegExp(`^(?:\\p{Lu}[$${Or}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Or}\\p{ID_Continue}]*(?:\\.[$${Or}\\p{ID_Continue}]+)+)$`,"u"),dd=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Gr=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),cc=[...Gr.keys()],md=`${cc.slice(0,-1).join(", ")} or ${cc.at(-1)}`,yd=62,pc=123;function xs(D,H){let X=D.index;if(X>=D.source.length)Wt(D.source.length);let Y=L(D.source,X,H);return D.index=Y,{name:D.source.slice(X,Y),start:X,end:Y,loc:D.sourceLocation(X,Y)}}var xn=(D,H,X,Y=X)=>({start:D,end:H,type:"Text",raw:X,data:Y});function gd(D){let H=D.charCodeAt(0);if(H>=97&&H<=122&&!D.includes("."))return!1;return fd.test(D)}function xd(D){let H=!0;for(let X=0;X<D.length&&H;X++){let Y=D.charCodeAt(X);H=Y>=97&&Y<=122||X>0&&Y>=48&&Y<=57}return H&&D.length>0||pd.test(D)||ud.test(D)||hd.test(D)}function uc(D,H){for(let X=D.length-1;X>=0;X--){let Y=H(D[X]);if(Y!==void 0)return Y}return!1}function vd(D,H,X){let Y=Gr.get(H);if(Y)return Y[0];if(X)return"Component";if(H==="title"){if(uc(D.stack,({type:ce})=>{if(ce==="SvelteHead")return!0;return ce==="RegularElement"||ce==="Component"?!1:void 0}))return"TitleElement"}if(H==="slot"){if(!uc(D.stack,(ce)=>ce.type==="RegularElement"&&ce.attributes.some((we)=>we.type==="Attribute"&&we.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function bd(D){let H=D.index++;if(D.eat("!--")){let X=D.readUntil("-->");D.eat("-->",!0),D.append({type:"Comment",start:H,end:D.index,data:X})}else if(D.eat("/"))Sd(D,H);else kd(D,H)}function Sd(D,H){let{name:X}=xs(D,!1);if(D.allowWhitespace(),D.eat(">",!0),q(X))Gl(H);let Y=D.current();while(!("name"in Y)||Y.name!==X){if(Y.type==="RegularElement"){if(D.lastAutoClosedTag?.tag!==X)Lc(D,Y,H,`</${X}>`)}else{let ce=D.lastAutoClosedTag;if(ce?.tag===X)vl(H,X,ce.reason);xl(H,X)}Y.end=H,D.close(),Y=D.current()}if(Y.end=D.index,D.close(),D.stack.length<(D.lastAutoClosedTag?.depth??0))D.lastAutoClosedTag=void 0}function Lc(D,H,X,Y){Rr(D.root,{code:"element_implicitly_closed",start:H.start,end:H.fragment.nodes[0]?.start??X,by:Y,closing:`</${H.name}>`})}function wd(D,H,X){return{type:D,start:H,end:-1,name:X}}function kd(D,H){let X=xs(D,!1),{name:Y}=X,ce=Gr.get(Y);if(!ce&&Y.startsWith("svelte:"))Ll(X,md);let we=gd(Y);if(!we&&!xd(Y))Wl(X);if(ce?.[1]){if(D.metaTags.has(Y))Pl(H,Y);if(D.current().type!=="Root")Rl(H,Y);D.metaTags.add(Y)}let ke=wd(vd(D,Y,we),H,Y);if(D.loc)ke.name_loc=X.loc;ke.attributes=[],ke.fragment={type:"Fragment",nodes:[]},D.allowWhitespace();let ve=D.current();if(ve.type==="RegularElement"&&ge(ve.name,Y))Lc(D,ve,H,`<${Y}>`),ve.end=H,D.close(),D.lastAutoClosedTag={tag:ve.name,reason:Y,depth:D.stack.length};if((Y==="script"||Y==="style")&&D.current().type==="Root"){let Ee=[];ke.attributes=Ee,dc(D,Ee,_d),Cd(D,ke,H,Ee);return}if(dc(D,ke.attributes,$d),ke.type==="SvelteComponent"){let Ee=hc(ke);if(!Ee)$l(H);if(!Vr(Ee.value))Il(Ee.start);ke.expression=fc(Ee.value)}else if(ke.type==="SvelteElement"){let Ee=hc(ke);if(!Ee)Tr(H);if(Ee.value===!0)Tr(Ee);if(!Vr(Ee.value))Rr(D.root,{code:"svelte_element_invalid_this",start:Ee.start,end:Ee.end});ke.tag=Vr(Ee.value)?fc(Ee.value):Td(Ee.value[0])}if(!D.eat("/")&&!q(Y))if(D.eat(">",!0),Y==="textarea")ke.fragment.nodes=Vc(D,(Ee,Ce)=>(Lr.lastIndex=Ce,Lr.test(Ee)),"inside <textarea>"),D.read(Lr);else if(Y==="script"||Y==="style")ke.fragment.nodes.push(Ed(D,`</${Y}>`));else{D.open(ke,ke.fragment);return}else D.eat(">",!0);ke.end=D.index,D.append(ke)}function Ed(D,H){let X=D.index,Y=D.source.indexOf(H,X);D.index=Y===-1?D.source.length:Y;let ce=xn(X,D.index,D.source.slice(X,D.index));return D.eat(H,!0),ce}function Cd(D,H,X,Y){D.eat(">",!0);let ce=Ad(D.root.fragment.nodes,X);if(H.name==="style"){let ve=Zf(D,X,Y);if(ve.content.comment=ce,D.root.css)_l(X);D.root.css=ve;return}let we=Mf(D,X,Y);if(ce&&D.comments)we.content.leadingComments=[{type:"Line",value:ce.data}];let ke=we.context==="module"?"module":"instance";if(D.root[ke])Cl(X);D.root[ke]=we}function Ad(D,H){let X=D.length-1;if(X<0||D[X].end!==H)return null;for(let Y=X;Y>=0;Y--){let ce=D[Y];if(ce.type==="Comment")return ce;if(ce.type!=="Text"||ce.data.trim())return null}return null}var Nd=(D)=>D.type==="Attribute"&&D.name==="this";function hc(D){let H=D.attributes.find(Nd);if(H)D.attributes.splice(D.attributes.indexOf(H),1);return H}function Vr(D){if(D===!0)return!1;if(!Array.isArray(D))return!0;return D.length===1&&D[0].type==="ExpressionTag"}function fc(D){return(Array.isArray(D)?D[0]:D).expression}function Td(D){if(D.type!=="Text")return D.expression;return{type:"Literal",value:D.data,raw:`'${D.raw}'`,start:D.start,end:D.end}}function dc(D,H,X){let Y=new Set;for(;;){let ce=X(D);if(!ce)return;let{type:we}=ce;if(we==="Attribute"||we==="BindDirective"||we==="StyleDirective"||we==="ClassDirective"){let ke=`${we==="BindDirective"?"Attribute":we}${ce.name}`;if(Y.has(ke))rl(ce);if(ce.name!=="this")Y.add(ke)}H.push(ce),D.allowWhitespace()}}function Hr(D,H,X,Y,ce){return D.loc?{type:"Attribute",start:X,end:Y,name:H.name,name_loc:H.loc,value:ce}:{type:"Attribute",start:X,end:Y,name:H.name,value:ce}}function Oc(D){if(x(D.source.charCodeAt(D.index)))di(D.index,"=")}function _d(D){let H=D.index,X=xs(D,!0);if(!X.name)return null;let Y=!0;if(D.eat("=")){D.allowWhitespace();let{source:ce}=D,we=D.index,ke=x(ce.charCodeAt(we)),ve=-1;if(ke){let Ae=ce.indexOf(ce[we],we+1);if(Ae!==-1)ve=Ae+1}if(ve===-1){ve=we;while(ve<ce.length&&ce.charCodeAt(ve)!==yd&&!l(ce.charCodeAt(ve)))ve++;if(ve===we)Ar(we)}D.index=ve;let Ee=ke?1:0,Ce=ce.slice(we+Ee,ve-Ee);Y=[xn(ve-Ce.length-Ee,ve-Ee,Ce,hs(Ce,!0,D.entityNames))]}return Oc(D),Hr(D,X,H,D.index,Y)}function Id(D){let H=D.index,X=D.match("/*");if(!X&&!D.match("//"))return!1;D.index+=2;let Y=D.readUntil(X?"*/":`
|
|
18
|
+
`);if(X)D.eat("*/");let ce={type:X?"Block":"Line",start:H,end:D.index,value:Y},we=D.sourceLocation(H,D.index);if(we)ce.loc=we;if(D.comments)D.root.comments.push(ce);return!0}function $d(D){while(Id(D))D.allowWhitespace();let H=D.index;if(D.eat("{"))return Pd(D,H);let X=xs(D,!0);if(!X.name)return null;let Y=D.index;D.allowWhitespace();let ce=!0;if(D.eat("=")){if(D.allowWhitespace(),D.match("/>"))ce=[xn(D.index,D.index+1,"/")],D.index++;else ce=Ld(D);Y=D.index}else Oc(D);let we=X.name.indexOf(":"),ke=we>0?dd.get(X.name.slice(0,we)):void 0;return ke?Rd(D,ke,X,we,H,Y,ce):Hr(D,X,H,Y,ce)}function Pd(D,H){if(D.allowWhitespace(),D.eat("@attach")){D.requireWhitespace();let ce=Pt(D);return D.eatClosingBrace(),{type:"AttachTag",start:H,end:D.index,expression:ce}}if(D.eat("...")){let ce=Pt(D);return D.eatClosingBrace(),{type:"SpreadAttribute",start:H,end:D.index,expression:ce}}let X=D.readIdentifierName();if(X.name==="")al(H);D.eatClosingBrace();let Y={type:"ExpressionTag",start:X.start,end:X.end,expression:X};return Hr(D,X,H,D.index,Y)}function Md(D){if(D===!0)return;return Array.isArray(D)?D[0]:D}function Rd(D,H,X,Y,ce,we,ke){let[ve,...Ee]=X.name.slice(Y+1).split("|");if(ve==="")gl({start:ce,end:ce+Y+1},X.name);let Ce={start:ce,end:we,type:H,name:ve};if(D.loc)Ce.name_loc=X.loc;if(H==="StyleDirective")return Ce.modifiers=Ee,Ce.value=ke,Ce;let Ae=Md(ke);if(Ae&&(Array.isArray(ke)&&ke.length>1||Ae.type==="Text"))yl(Ae.start);if(Ce.expression=Ae?.expression??null,Ce.modifiers=Ee,H==="TransitionDirective"){let _e=X.name.slice(0,Y);Ce.intro=_e!=="out",Ce.outro=_e!=="in"}if((H==="BindDirective"||H==="ClassDirective")&&!Ce.expression)Ce.expression={start:ce+Y+1,end:we,type:"Identifier",name:ve};return Ce}function Ld(D){let H=D.source.charCodeAt(D.index),X=x(H);if(X){if(D.index++,D.source.charCodeAt(D.index)===H)return D.index++,[xn(D.index-1,D.index-1,"")]}let Y;try{Y=Vc(D,X?(ce,we)=>ce.charCodeAt(we)===H:le,"in attribute value",X?H:void 0)}catch(ce){let we=ce instanceof et&&ce.code==="js_parse_error"?ce.position?.[0]:void 0;if(we!==void 0&&D.source.startsWith("/>",we-1))D.index=we,di(we,X?String.fromCharCode(H):"}");throw ce}if(X)D.index++;else if(Y.length===0)Ar(D.index);return X||Y.length>1||Y[0].type==="Text"?Y:Y[0]}function Vc(D,H,X,Y){let{source:ce}=D,we=[],ke=D.index,ve=(Ee)=>{if(Ee<=ke)return;let Ce=ce.slice(ke,Ee);we.push(xn(ke,Ee,Ce,hs(Ce,!0,D.entityNames)))};while(D.index<ce.length){let Ee=D.index;if(H(ce,Ee))return ve(Ee),we;if(ce.charCodeAt(Ee)!==pc){if(D.index++,Y!==void 0)while(D.index<ce.length&&ce.charCodeAt(D.index)!==pc&&ce.charCodeAt(D.index)!==Y)D.index++;continue}D.index++;let Ce=ce.charCodeAt(D.index);if(Ce===35||Ce===64){D.index++;let _e=D.index;while(D.index<ce.length&&ce.charCodeAt(D.index)>=97&&ce.charCodeAt(D.index)<=122)D.index++;let Ne=ce.slice(_e,D.index);(Ce===35?cl:ql)(Ee,Ne,X)}ve(Ee),D.allowWhitespace();let Ae=Pt(D);D.eatClosingBrace(),we.push({type:"ExpressionTag",start:Ee,end:D.index,expression:Ae}),ke=D.index}Wt(ce.length)}var Od=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),Vd=new Map([["type",(D,H)=>{if(H!=="String"&&H!=="Number"&&H!=="Boolean"&&H!=="Array"&&H!=="Object")return!1;return D.type=H,!0}],["reflect",(D,H)=>{if(typeof H!=="boolean")return!1;return D.reflect=H,!0}],["attribute",(D,H)=>{if(typeof H!=="string")return!1;return D.attribute=H,!0}]]),mc="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",Dd=new RegExp(`^[a-z]${mc}*-${mc}*$`,"u"),Bd=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),fs=(D)=>(H,X)=>{let Y=ys(X);if(typeof Y!=="boolean")rs(X,"true or false");H[D]=Y},Fd=new Map([["runes",fs("runes")],["immutable",fs("immutable")],["preserveWhitespace",fs("preserveWhitespace")],["accessors",fs("accessors")],["namespace",(D,H)=>{let X=Od.get(ys(H));if(!X)rs(H,'"html", "mathml" or "svg"');D.namespace=X}],["css",(D,H)=>{if(ys(H)!=="injected")rs(H,'"injected"');D.css="injected"}],["tag",(D,H)=>Ol(H)],["customElement",(D,H)=>{let X=Wd(H);if(X)D.customElement=X}]]);function Ud(D){let H=[],X={start:D.start,end:D.end,attributes:H};for(let Y of D.attributes){if(Y.type!=="Attribute")Vl(Y);H.push(Y);let ce=Fd.get(Y.name);if(!ce)jl(Y,Y.name);ce(X,Y)}return X}function ys({value:D}){if(D===!0)return!0;let H=Array.isArray(D)?D:[D];if(H.length===0)return!0;if(H.length>1)return null;let[X]=H;if(X.type==="Text")return X.data;return X.expression.type==="Literal"?X.expression.value:null}function yc(D,H){if(typeof H!=="string")_r(D);if(!H)return;if(!Dd.test(H))_r(D);if(Bd.has(H))Ul(D)}function Wr(D){return D.type==="Property"&&!D.computed&&D.key.type==="Identifier"}function jd(D,H){let X=new Map;for(let Y of D.properties){if(!Wr(Y))H();if(!X.has(Y.key.name))X.set(Y.key.name,Y.value)}return X}function Wd(D){let H=()=>Dl(D);if(D.value===!0)H();let X=Array.isArray(D.value)?D.value[0]:D.value;if(X.type==="Text"){let Ae=ys(D);return yc(D,Ae),{tag:Ae}}let{expression:Y}=X;if(Y.type!=="ObjectExpression"){if(Y.type==="Literal"&&Y.value===null)return;H()}let ce=jd(Y,H),we={},ke=ce.get("tag");if(ke){let Ae=ke.type==="Literal"?ke.value:void 0;yc(null,Ae),we.tag=Ae}let ve=ce.get("props");if(ve){let Ae=()=>Bl(D);if(ve.type!=="ObjectExpression")Ae();we.props={};for(let _e of ve.properties){if(!Wr(_e)||_e.value.type!=="ObjectExpression")Ae();let Ne={};we.props[_e.key.name]=Ne;for(let $e of _e.value.properties){if(!Wr($e)||$e.value.type!=="Literal")Ae();if(!Vd.get($e.key.name)?.(Ne,$e.value.value))Ae()}}}let Ee=ce.get("shadow");if(Ee)if(Ee.type==="ObjectExpression")we.shadow=Ee;else if(Ee.type==="Literal"&&(Ee.value==="open"||Ee.value==="none"))we.shadow=Ee.value;else Fl(D);let Ce=ce.get("extend");if(Ce)we.extend=Ce;return we}var qd={"{":"}","(":")","[":"]"};function Xr(D,H,X=qd){let Y=Object.values(X),ce=[],we=H;while(we<D.length){let ke=D[we++];if(ke==="'"||ke==='"'||ke==="`")we=zd(D,we,ke);else if(ke===">"&&D[we-2]==="="&&Y.includes(">"));else if(Object.hasOwn(X,ke))ce.push(ke);else if(Y.includes(ke)){let ve=X[ce.pop()??""];if(ke!==ve)di(we-1,ve);if(ce.length===0)return we}}Wt(D.length)}function zd(D,H,X){let Y=H;while(Y<D.length){let ce=D[Y++];if(ce===X)return Y;if(ce==="\\")Y++;else if(X==="`"&&ce==="$"&&D[Y]==="{")Y=Xr(D,Y)}Kl(H)}var Kd=/\?(?=\s*:)/g;function vs(D){let H=D.index,X=D.readIdentifierName();if(X.name!=="")return{...X,typeAnnotation:gc(D)};let Y=D.source[D.index];if(Y!=="{"&&Y!=="[")Sl(D.index);D.index=Xr(D.source,H);let ce=Jl(D,D.source.slice(0,D.index),H)??Gd(D,H);Pe(ce,"ObjectPattern","ArrayPattern");let we=gc(D);if(ce.typeAnnotation=we,we)ce.end=we.end;return ce}function Gd(D,H){let{node:X}=Ri(D,`${D.source.slice(0,D.index)} = 1`,H);return Pe(X,"AssignmentExpression"),X.left}function gc(D){let H=D.index;if(D.allowWhitespace(),!D.eat(":")){D.index=H;return}let X="_ as ",Y=D.index-X.length,ce=D.source.slice(0,Y)+X+D.source.slice(D.index).replace(Kd," "),we=Ri(D,ce,Y).node;if(we.type==="AssignmentExpression"){let ke=we.right.start;while(ce[ke]!=="=")ke-=1;we=Ri(D,ce.slice(0,ke),Y).node}if(we.type==="SequenceExpression")we=we.expressions[0];return D.index=we.end,{type:"TSTypeAnnotation",start:H,end:D.index,typeAnnotation:we.type==="TSAsExpression"?we.typeAnnotation:void 0}}var Hd={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},li=()=>({type:"Fragment",nodes:[]});function Xd(D,H){if(D.eat("if")){D.requireWhitespace();let X=Pt(D);D.eatClosingBrace();let Y=li();D.open({type:"IfBlock",elseif:!1,start:H,end:-1,test:X,consequent:Y,alternate:null},Y)}else if(D.eat("each"))Qd(D,H);else if(D.eat("await")){D.requireWhitespace();let X=Pt(D);D.allowWhitespace();let Y={type:"AwaitBlock",start:H,end:-1,expression:X,value:null,error:null,pending:null,then:null,catch:null},ce=li();if(D.eat("then"))Y.value=xc(D),Y.then=ce;else if(D.eat("catch"))Y.error=xc(D),Y.catch=ce;else Y.pending=ce;D.eat("}",!0),D.open(Y,ce)}else if(D.eat("key")){D.requireWhitespace();let X=Pt(D);D.eatClosingBrace();let Y=li();D.open({type:"KeyBlock",start:H,end:-1,expression:X,fragment:Y},Y)}else if(D.eat("snippet"))Jd(D,H);else bl(D.index)}function xc(D){if(D.matchRegex(bc))return D.allowWhitespace(),null;D.requireWhitespace();let H=vs(D);return D.allowWhitespace(),H}function Yd(D){let H={assertion:null},X=D.end,Y=(we)=>{if(we.type==="TSAsExpression"&&we.end===D.end)return H.assertion=we,X=we.expression.end,we.expression;return ee(we,Y),we},ce=D;if(D.type==="TSAsExpression")H.assertion=D,ce=D.expression,X=ce.end;else ee(D,Y);return ce.end=X,{expression:ce,assertion:H.assertion}}function Qd(D,H){D.requireWhitespace();let X=D.source,Y;while(!Y)try{Y=Pt(D)}catch(Ee){let Ce=((Ee instanceof et?Ee.position:void 0)?.[0]??H)-2;while(Ce>H&&D.source.slice(Ce,Ce+2)!=="as")Ce-=1;if(Ce<=H)throw D.source=X,Ee;D.source=X.slice(0,Ce)}if(D.source=X,D.allowWhitespace(),!D.match("as")){if(Y.type==="SequenceExpression")Y=Y.expressions[0];let Ee=Yd(Y);if(Y=Ee.expression,Ee.assertion){let Ce=Ee.assertion.typeAnnotation.start-2;while(D.source.slice(Ce,Ce+2)!=="as")Ce-=1;D.index=Ce}}let ce=null,we,ke;if(D.eat("as"))D.requireWhitespace(),ce=vs(D);else D.index=Y.end;if(D.allowWhitespace(),D.eat(",")){if(D.allowWhitespace(),we=D.readIdentifierName().name,!we)Nr(D.index);D.allowWhitespace()}if(D.eat("("))D.allowWhitespace(),ke=Pt(D),D.allowWhitespace(),D.eat(")",!0),D.allowWhitespace();D.eat("}",!0);let ve=li();D.open({type:"EachBlock",start:H,end:-1,expression:Y,body:ve,context:ce,index:we,key:ke},ve)}function Jd(D,H){D.requireWhitespace();let X=D.readIdentifierName();if(X.name==="")Nr(D.index);D.allowWhitespace();let Y=D.index,ce;if(D.isTypeScript&&D.match("<")){let Ee=Xr(D.source,Y,{"<":">"});ce=D.source.slice(Y+1,Ee-1),D.index=Ee}D.allowWhitespace(),D.eat("(",!0);let we=1;while(D.index<D.source.length&&(!D.match(")")||we!==1)){if(D.match("("))we++;if(D.match(")"))we--;D.index+=1}D.eat(")",!0);let{node:ke}=Ri(D,`${D.source.slice(0,D.index)} => {}`,Y,!0);D.eatClosingBrace();let ve=li();D.open({type:"SnippetBlock",start:H,end:-1,expression:X,typeParams:ce,parameters:ke.type==="ArrowFunctionExpression"?ke.params:void 0,body:ve},ve)}function Zd(D,H){let X=D.index-1,Y=D.current();if(Y.type==="IfBlock"){if(!D.eat("else"))di(X,"{:else} or {:else if}");if(D.eat("if"))ll(X);if(Y.alternate)ss(X,"{:else}");if(D.allowWhitespace(),Y.alternate=li(),D.setFragment(Y.alternate),D.eat("if")){D.requireWhitespace();let ce=Pt(D);D.eatClosingBrace();let we=li();D.open({start:H,end:-1,type:"IfBlock",elseif:!0,test:ce,consequent:we,alternate:null},we)}else D.eatClosingBrace()}else if(Y.type==="EachBlock"){if(!D.eat("else"))di(X,"{:else}");if(Y.fallback)ss(X,"{:else}");D.eatClosingBrace(),Y.fallback=li(),D.setFragment(Y.fallback)}else if(Y.type==="AwaitBlock"){let ce;if(D.eat("then"))ce="then";else if(D.eat("catch"))ce="catch";else di(X,"{:then ...} or {:catch ...}");if(Y[ce])ss(X,`{:${ce}}`);if(!D.eat("}")){D.requireWhitespace();let ke=vs(D);if(ce==="then")Y.value=ke;else Y.error=ke;D.eatClosingBrace()}let we=li();Y[ce]=we,D.setFragment(we)}else ol(X)}function em(D){let H=D.current(),X=Hd[H.type];if(!X)ul(D.index-1);D.eat(X,!0),D.eatClosingBrace();while(H.type==="IfBlock"&&H.elseif)H.end=D.index,D.close(),H=D.current();H.end=D.index,D.close()}function tm(D){return D.type==="CallExpression"||D.type==="ChainExpression"&&D.expression.type==="CallExpression"}function im(D,H){if(D.eat("html")){D.requireWhitespace();let X=Pt(D);D.eatClosingBrace(),D.append({type:"HtmlTag",start:H,end:D.index,expression:X})}else if(D.eat("debug")){let X=[];if(!D.read(bc)){let Y=Pt(D),ce=Y.type==="SequenceExpression"?Y.expressions:[Y];for(let we of ce){if(we.type!=="Identifier")ml(we.start);X.push(we)}D.eatClosingBrace()}D.append({type:"DebugTag",start:H,end:D.index,identifiers:X})}else if(D.eat("const")){D.requireWhitespace();let X=vs(D);D.allowWhitespace(),D.eat("=",!0),D.allowWhitespace();let Y=D.index,ce=Pt(D),we=D.index;if(ce.type==="SequenceExpression"&&!D.source.slice(Y,ce.start).includes("("))hl(ce);D.eatClosingBrace();let ke={type:"VariableDeclarator",id:X,init:ce,start:X.start,end:we};D.append({type:"ConstTag",start:H,end:D.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[ke],start:H+2,end:D.index-1}})}else if(D.eat("render")){D.requireWhitespace();let X=Pt(D);if(!tm(X))El(X);D.eatClosingBrace(),D.append({type:"RenderTag",start:H,end:D.index,expression:X})}else wl(D.index)}var nm=/(?:var|interface|enum)\b/y,sm=/(?:let|const|type)\b/y;function rm(D){let H=D.index;if(D.index+=1,D.allowWhitespace(),D.eat("#"))Xd(D,H);else if(D.eat(":"))Zd(D,H);else if(D.eat("@"))im(D,H);else if(D.match("/")&&!D.match("/*")&&!D.match("//"))D.index+=1,em(D);else if(!am(D,H)){let X=Pt(D);D.eatClosingBrace(),D.append({type:"ExpressionTag",start:H,end:D.index,expression:X})}}function am(D,H){let X=D.index,Y=D.matchRegex(nm);if(Y)Er({start:X,end:X+Y.length});if(!D.matchRegex(sm))return!1;let ce=D.root.comments.length,we=Zl(D,D.source,X);if(we.type==="ExpressionStatement")return D.root.comments.length=ce,!1;if(we.type!=="VariableDeclaration"||we.kind!=="let"&&we.kind!=="const")Er(we);return D.index=we.end,D.eatClosingBrace(),D.append({type:"DeclarationTag",start:H,end:D.index,declaration:we}),!0}function om(D){let{source:H,index:X}=D;if(D.nextAngle<X)D.nextAngle=vc(H,"<",X);if(D.nextBrace<X)D.nextBrace=vc(H,"{",X);let Y=Math.min(D.nextAngle,D.nextBrace);D.index=Y;let ce=H.slice(X,Y);D.append({type:"Text",start:X,end:Y,raw:ce,data:hs(ce,!1,D.entityNames)})}function vc(D,H,X){let Y=D.indexOf(H,X);return Y===-1?D.length:Y}function Dc(D,H,X){let Y=lm(D,H,X);while(Y.index<Y.source.length)pm(Y);return cm(Y)}function lm(D,H,X){let Y=ne(D);return W(Y),new Sc(Y.trimEnd(),Y.length,X,H)}function cm(D){if(D.stack.length>1){let ce=D.current();if(ce.end=ce.start+1,ce.type==="RegularElement")Cr(ce,ce.name);pl(ce)}let{nodes:H}=D.root.fragment,X=H.findIndex((ce)=>ce.type==="SvelteOptions"),Y=H[X];if(Y?.type==="SvelteOptions"){H.splice(X,1),D.root.options=Ud(Y);let{nodes:ce}=Y.fragment;if(ce.length>0)Ml({start:ce[0].start,end:ce[ce.length-1].end},Y.name)}return D.root}function pm(D){if(D.match("<"))bd(D);else if(D.match("{"))rm(D);else om(D)}function Bc(D,H,X){return W(D),ps({isTypeScript:H.typescript??!1,typescript:X,loc:H.loc??!1,comments:H.comments??!0,root:{comments:[]}},D)}function Fc(D,H,X){W(D);let Y={isTypeScript:H.typescript??!1,typescript:X,loc:!1,comments:!1,root:{comments:[]}};return ec(Y,D,(ce)=>be(D,H.localExports??!0,ce))}function Uc(D={}){let H=el(D.typescript),X={typescript:H,entityNames:tl(D.entities)??ic};return{parse:(Y,ce)=>Dc(Y,ce,X),parseModule:(Y,ce={})=>Bc(Y,ce,H),parseImportsExports:(Y,ce={})=>Fc(Y,ce,H)}}var Yr=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,um=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),hm=new Set("public private protected readonly declare abstract override static accessor".split(" ")),fm=new Set("public private protected readonly override".split(" ")),dm=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),mm=new Set("var let const function class interface enum".split(" ")),jc=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),Wc=1,ym=32,gm=256,xm=0,vm=1,bn=2,bm=3,Sm=4,Qr=6,qc=7,Yc=256,ta=1024,wm=8|ta,km=bn|Yc,zc=1,Em=2,Kc=40,Cm=41,Am=44,Gc=46,Hc=58,vn=61,Xc=60,Nm=62,bs=123,Tm=91,Jr=42,_m=35,Zr=34,ea=39,Im=SyntaxError("speculative parse failed"),Qc=mn((D)=>{let{tokTypes:H,keywordTypes:X,isIdentifierChar:Y,isIdentifierStart:ce}=D.acorn,we=new D.acorn.TokenType("@");class ke extends D{inType=!1;$4=!1;$5=!1;$7=null;$l=null;$j=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(ve,Ee,Ce){super(ve,Ee,Ce);let Ae=this.options.onComment;if(typeof Ae==="function")this.options.onComment=(_e,Ne,$e,De,Oe,qe)=>{if($e<this.$t)return;this.$t=De,Ae.call(this,_e,Ne,$e,De,Oe,qe)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$l=null,this.$j=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(ve){if(ve===64)return++this.pos,this.finishToken(we);return super.getTokenFromCode(ve)}readToken_lt_gt(ve){if(this.inType)return this.finishOp(H.relational,1);return super.readToken_lt_gt(ve)}$a(ve){let Ee=this.inType;this.inType=!0;let Ce=ve();if(this.inType=Ee,!Ee&&this.type===H.relational)this.pos=this.start,this.nextToken();return Ce}$1(){return this.type===H.relational&&this.value==="<"}$p(){if(this.type===H.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(H.relational,"<");return this.$1()}$c(){return this.type===H.relational&&this.value===">"}$u(){return this.type===H.prefix&&this.value==="!"}hasPrecedingLineBreak(){return yn(this.input,this.lastTokEnd,this.start)}$d(ve=this.pos){return Yr.lastIndex=ve,Yr.exec(this.input),Yr.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let ve=this.$d(),Ee=ve;while(Ee<this.input.length&&Y(this.input.charCodeAt(Ee)))Ee++;return this.input.slice(ve,Ee)}$b(){return!yn(this.input,this.pos,this.$d())}$14(){return this.$b()&&ce(this.$2())&&!Object.hasOwn(X,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$4:this.$4,$5:this.$5,$7:this.$7,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$16(ve){this.pos=ve.pos,this.type=ve.type,this.value=ve.value,this.start=ve.start,this.end=ve.end,this.startLoc=ve.startLoc,this.endLoc=ve.endLoc,this.lastTokStart=ve.lastTokStart,this.lastTokEnd=ve.lastTokEnd,this.lastTokStartLoc=ve.lastTokStartLoc,this.lastTokEndLoc=ve.lastTokEndLoc,this.curLine=ve.curLine,this.lineStart=ve.lineStart,this.context=ve.context,this.exprAllowed=ve.exprAllowed,this.containsEsc=ve.containsEsc,this.inType=ve.inType,this.$4=ve.$4,this.$5=ve.$5,this.$7=ve.$7,this.$j=!1,this.scopeStack.length=ve.scopes,this.privateNameStack.length=ve.privateNames,this.labels=ve.labels,this.labels.length=ve.labelCount,this.strict=ve.strict,this.yieldPos=ve.yieldPos,this.awaitPos=ve.awaitPos,this.awaitIdentPos=ve.awaitIdentPos,this.potentialArrowAt=ve.potentialArrowAt,this.potentialArrowInForAwait=ve.potentialArrowInForAwait}raise(ve,Ee){if(this.$n>0)throw Im;return super.raise(ve,Ee)}$1y(ve,Ee){try{super.raise(ve,Ee)}catch(Ce){if(Ce instanceof SyntaxError)Ce.$1z=!0;throw Ce}throw Error("unreachable")}$g(ve,Ee=!1){let Ce=this.$15();this.$n++;try{let Ae=ve();if(Ee||Ae===void 0)this.$16(Ce);return Ae}catch(Ae){if(!(Ae instanceof SyntaxError)||!Ee&&Ae.$1z)throw Ae;this.$16(Ce);return}finally{this.$n--}}$v(ve){return this.$g(ve,!0)===!0}$17(ve){if(ve.end=this.lastTokEnd,this.options.locations)ve.loc.end=this.lastTokEndLoc}$q(ve,Ee){if(ve.start=Ee.start,this.options.locations)ve.loc.start=Ee.loc.start}$6(ve=!1){let Ee=this.startNode();return Ee.typeAnnotation=this.$a(()=>(this.next(),ve?this.$20():this.$0())),this.finishNode(Ee,"TSTypeAnnotation")}$h(ve,Ee){if(Ee&&this.eat(H.question))ve.optional=!0,this.$17(ve);if(this.type===H.colon)ve.typeAnnotation=this.$6(),this.$17(ve);return ve}$20(){if(this.type!==H.name&&this.type!==H._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&ce(this.$2())){let ve=this.startNode();if(this.next(),ve.parameterName=this.type===H._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(ve,!0);return ve.asserts=!0,ve.typeAnnotation=null,this.finishNode(ve,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let ve=this.startNode();return ve.parameterName=this.type===H._this?this.$w():this.parseIdent(!0),this.$x(ve,!1)}return this.$0()}$x(ve,Ee){this.next();let Ce=this.startNode();return Ce.typeAnnotation=this.$0(),ve.typeAnnotation=this.finishNode(Ce,"TSTypeAnnotation"),ve.asserts=Ee,this.finishNode(ve,"TSTypePredicate")}$w(){let ve=this.startNode();return this.next(),this.finishNode(ve,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let ve=this.$0();if(this.type!==H.eof)this.unexpected();return ve}$0(){let ve=this.$18();if(this.$4||this.type!==H._extends||this.hasPrecedingLineBreak())return ve;let Ee=this.startNodeAt(ve.start,ve.loc?.start);return this.next(),Ee.checkType=ve,Ee.extendsType=this.$i(!0,()=>this.$18()),this.expect(H.question),Ee.trueType=this.$i(!1,()=>this.$0()),this.expect(H.colon),Ee.falseType=this.$i(!1,()=>this.$0()),this.finishNode(Ee,"TSConditionalType")}$i(ve,Ee){let Ce=this.$4;this.$4=ve;let Ae=Ee();return this.$4=Ce,Ae}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===H._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",H.bitwiseOR,()=>this.$1a("TSIntersectionType",H.bitwiseAND,()=>this.$1b()))}$19(ve){let Ee=this.startNode();if(ve==="TSConstructorType"){if(Ee.abstract=this.isContextual("abstract"),Ee.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(Ee,H.arrow)),this.finishNode(Ee,ve)}$r(ve,Ee){if(this.$1())ve.typeParameters=this.$8();if(this.expect(H.parenL),ve.parameters=this.parseBindingList(H.parenR,!1,!0),this.type===Ee)ve.typeAnnotation=this.$6(!0);else if(Ee===H.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==H.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===H.parenR||this.type===H.ellipsis)return!0;if(this.type===H.name||this.type===H._this)this.next();else if(this.type===H.braceL||this.type===H.bracketL)this.parseBindingAtom();else return!1;let ve=this.type;if(ve===H.colon||ve===H.comma||ve===H.question||ve===H.eq)return!0;if(ve!==H.parenR)return!1;return this.next(),this.type===H.arrow})}$1a(ve,Ee,Ce){let Ae=this.startNode(),_e=this.eat(Ee),Ne=[];do Ne.push(Ce());while(this.eat(Ee));if(Ne.length===1&&!_e)return Ne[0];return Ae.types=Ne,this.finishNode(Ae,ve)}$1b(){if(this.type===H.name&&!this.containsEsc){let ve=this.value;if(ve==="keyof"||ve==="unique"||ve==="readonly"){let Ee=this.startNode();return this.next(),Ee.operator=ve,Ee.typeAnnotation=this.$1b(),this.finishNode(Ee,"TSTypeOperator")}if(ve==="infer"){let Ee=this.startNode();this.next();let Ce=this.startNode();Ce.name=this.$y();let Ae=this.$g(()=>this.$22());if(Ae)Ce.constraint=Ae;return Ee.typeParameter=this.finishNode(Ce,"TSTypeParameter"),this.finishNode(Ee,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(H._extends))return;let ve=this.$i(!0,()=>this.$0());return this.$4||this.type!==H.question?ve:void 0}$y(){if(this.type!==H.name&&!this.type.keyword)this.unexpected();let ve=this.type===H.name?this.value:this.type.keyword;return this.next(),ve}$23(){let ve=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(H.bracketL)){let Ee=this.startNodeAt(ve.start,ve.loc?.start);if(this.eat(H.bracketR))Ee.elementType=ve,ve=this.finishNode(Ee,"TSArrayType");else Ee.objectType=ve,Ee.indexType=this.$0(),this.expect(H.bracketR),ve=this.finishNode(Ee,"TSIndexedAccessType")}return ve}$24(){switch(this.type){case H.name:case H._void:case H._null:{let ve=um.get(this.value);if(ve&&(this.type!==H.name||!this.containsEsc&&this.$2()!==Gc)){let Ee=this.startNode();return this.next(),this.finishNode(Ee,ve)}return this.$1c()}case H.string:case H.num:case H._true:case H._false:{let ve=this.startNode();return ve.literal=this.parseExprAtom(),this.finishNode(ve,"TSLiteralType")}case H.plusMin:{if(this.value!=="-")break;let ve=this.startNode(),Ee=this.startNode();if(this.next(),this.type!==H.num)this.unexpected();return Ee.operator="-",Ee.prefix=!0,Ee.argument=this.parseExprAtom(),ve.literal=this.finishNode(Ee,"UnaryExpression"),this.finishNode(ve,"TSLiteralType")}case H.backQuote:return this.$25();case H._this:{let ve=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let Ee=this.startNodeAt(ve.start,ve.loc?.start);return Ee.parameterName=ve,this.$x(Ee,!1)}return ve}case H._typeof:return this.$26();case H._import:return this.$1d();case H.braceL:return this.$27()?this.$28():this.$29();case H.bracketL:return this.$2a();case H.parenL:{let ve=this.startNode();return this.next(),ve.typeAnnotation=this.$0(),this.expect(H.parenR),this.finishNode(ve,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let ve=this.startNode();if(ve.typeName=this.$k(),!this.hasPrecedingLineBreak()&&this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSTypeReference")}$k(){let ve=this.parseIdent(!0);while(this.eat(H.dot)){let Ee=this.startNodeAt(ve.start,ve.loc?.start);Ee.left=ve,Ee.right=this.parseIdent(!0),ve=this.finishNode(Ee,"TSQualifiedName")}return ve}$26(){let ve=this.startNode();if(this.next(),ve.exprName=this.type===H._import?this.$1d():this.$k(),!this.hasPrecedingLineBreak()&&this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSTypeQuery")}$1d(){let ve=this.startNode();if(this.next(),ve.argument=this.$1e(),this.eat(H.dot))ve.qualifier=this.$k();if(this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSImportType")}$z(){if(this.type!==H.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(H.parenL);let ve=this.$z();return this.expect(H.parenR),ve}$25(){let ve=this.startNode(),Ee=this.startNode();this.next(),Ee.expressions=[];let Ce=this.parseTemplateElement({isTagged:!1});Ee.quasis=[Ce];while(!Ce.tail){if(this.type===H.eof)this.raise(this.pos,"Unterminated template literal");this.expect(H.dollarBraceL),Ee.expressions.push(this.$0()),this.expect(H.braceR),Ce=this.parseTemplateElement({isTagged:!1}),Ee.quasis.push(Ce)}return this.next(),ve.literal=this.finishNode(Ee,"TemplateLiteral"),this.finishNode(ve,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===H.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==H.bracketL)return!1;if(this.next(),this.type!==H.name)return!1;return this.next(),this.type===H._in})}$28(){let ve=this.startNode();if(this.expect(H.braceL),this.type===H.plusMin)ve.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))ve.readonly=!0;this.expect(H.bracketL);let Ee=this.startNode();if(Ee.name=this.$y(),this.expect(H._in),Ee.constraint=this.$0(),ve.typeParameter=this.finishNode(Ee,"TSTypeParameter"),ve.nameType=this.eatContextual("as")?this.$0():null,this.expect(H.bracketR),this.type===H.plusMin)ve.optional=this.value,this.next(),this.expect(H.question);else if(this.eat(H.question))ve.optional=!0;if(this.eat(H.colon))ve.typeAnnotation=this.$0();return this.semicolon(),this.expect(H.braceR),this.finishNode(ve,"TSMappedType")}$29(){let ve=this.startNode();return ve.members=this.$1f(),this.finishNode(ve,"TSTypeLiteral")}$1f(){this.expect(H.braceL);let ve=[];while(!this.eat(H.braceR))ve.push(this.$2b());return ve}$2b(){let ve=this.startNode(),Ee="TSPropertySignature",Ce=this.type===H._new?this.$2():-1;if(this.type===H.parenL||this.$1())Ee="TSCallSignatureDeclaration",this.$r(ve,H.colon);else if(Ce===Kc||Ce===Xc)Ee="TSConstructSignatureDeclaration",this.next(),this.$r(ve,H.colon);else{let Ae=this.type===H._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),ve.readonly=!0;if(this.type===H.bracketL&&this.$1g())return this.$1h(ve);let _e="method";if(Ae)ve.key=Ae;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))_e=this.value,this.next();this.parsePropertyName(ve)}if(this.eat(H.question))ve.optional=!0;if(this.type===H.parenL||this.$1()){if(Ee="TSMethodSignature",_e!=="method")ve.kind=_e;this.$r(ve,H.colon),ve.kind=_e}else if(this.type===H.colon)ve.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(ve,Ee)}$1i(){if(!this.eat(H.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==H.name)return!1;return this.next(),this.type===H.colon})}$1h(ve){if(this.expect(H.bracketL),ve.parameters=[this.$h(this.parseIdent(),!1)],this.expect(H.bracketR),this.type===H.colon)ve.typeAnnotation=this.$6();return this.$1i(),this.finishNode(ve,"TSIndexSignature")}$2a(){let ve=this.startNode();this.expect(H.bracketL),ve.elementTypes=[];while(!this.eat(H.bracketR))if(ve.elementTypes.push(this.$2c()),this.type!==H.bracketR)this.expect(H.comma);return this.finishNode(ve,"TSTupleType")}$2c(){let ve=this.start,Ee=this.startLoc,Ce=this.eat(H.ellipsis),Ae;if((this.type===H.name||this.type.keyword)&&this.$2d()){let _e=this.startNode();_e.label=this.parseIdent(!0),_e.optional=this.eat(H.question),this.expect(H.colon),_e.elementType=this.$0(),Ae=this.finishNode(_e,"TSNamedTupleMember")}else if(Ae=this.$0(),this.eat(H.question)){let _e=this.startNodeAt(Ae.start,Ae.loc?.start);_e.typeAnnotation=Ae,Ae=this.finishNode(_e,"TSOptionalType")}if(Ce){let _e=this.startNodeAt(ve,Ee);_e.typeAnnotation=Ae,Ae=this.finishNode(_e,"TSRestType")}return Ae}$2d(){let ve=this.$d();if(this.input.charCodeAt(ve)===63)ve=this.$d(ve+1);return this.input.charCodeAt(ve)===Hc}$8(){return this.$a(()=>{let ve=this.startNode();this.next(),ve.params=[];while(!this.$c()){let Ee=this.startNode();while((this.type===H._const||this.type===H._in||this.isContextual("out"))&&ce(this.$2()))Ee[this.value]=!0,this.next();if(Ee.name=this.$y(),this.eat(H._extends))Ee.constraint=this.$0();if(this.eat(H.eq))Ee.default=this.$0();if(ve.params.push(this.finishNode(Ee,"TSTypeParameter")),!this.$c()){if(this.expect(H.comma),this.$c())ve.extra={trailingComma:this.lastTokStart}}}if(this.next(),ve.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(ve,"TSTypeParameterDeclaration")})}$e(ve=!1){return this.$a(()=>{let Ee=this.startNode();this.next(),Ee.params=[];while(!this.$c())if(Ee.params.push(this.$0()),!this.$c())this.expect(H.comma);if(Ee.params.length===0)this.unexpected();if(ve){let Ce=this.input.charCodeAt(this.start+1);if(Ce===vn||Ce===Nm)this.unexpected()}return this.next(),this.finishNode(Ee,"TSTypeParameterInstantiation")})}$1j(){let ve=[];do{let Ee=this.startNode();if(Ee.expression=this.$k(),this.$1())Ee.typeParameters=this.$e();ve.push(this.finishNode(Ee,"TSExpressionWithTypeArguments"))}while(this.eat(H.comma));return ve}$1k(ve=!1){if(this.type!==H.name||this.containsEsc){if(this.type===H._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(ve);return this.$1l(this.startNode(),this.value)}$2e(ve){switch(ve){case"interface":case"type":case"namespace":return this.$14();case"enum":return ce(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let Ee=this.$2();return this.$b()&&(Ee===Zr||Ee===ea||ce(Ee))}case"declare":return this.$b()&&dm.has(this.$3());case"global":return this.$b()&&this.$2()===bs}return!1}$1l(ve,Ee){switch(Ee){case"interface":return this.$1m(ve);case"type":return this.$2g(ve);case"enum":return this.$10(ve);case"abstract":return this.$1n(ve,!0);case"global":return ve.global=!0,ve.id=this.parseIdent(),ve.body=this.$11(),this.finishNode(ve,"TSModuleDeclaration")}return this.$2h(ve)}$2f(ve){let Ee=this.$5;this.$5=!0;let Ce=this.startNode();this.next();let Ae=this.value;if(Ae==="const"&&this.$3()==="enum")Ce.const=!0;if(!ve&&mm.has(Ae))Ce.declare=!0;let _e;if(Ce.const)_e=this.$10(Ce);else if(Ae==="var"||Ae==="let"||Ae==="const")_e=this.parseVarStatement(Ce,Ae,!0);else if(Ae==="function")this.next(),_e=this.parseFunction(Ce,zc,!1,!1);else if(Ae==="class")_e=this.parseClass(Ce,!0);else _e=this.$1l(Ce,Ae);return _e.declare=!0,this.$5=Ee,_e}$1n(ve,Ee){return this.next(),ve.abstract=!0,this.parseClass(ve,Ee)}$1m(ve){if(this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,qc),this.$1())ve.typeParameters=this.$8();return this.$a(()=>{if(this.eat(H._extends))ve.extends=this.$1j();let Ee=this.startNode();Ee.body=this.$1f(),ve.body=this.finishNode(Ee,"TSInterfaceBody")}),this.finishNode(ve,"TSInterfaceDeclaration")}$2g(ve){if(this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,Qr),this.$1())ve.typeParameters=this.$8();return ve.typeAnnotation=this.$a(()=>(this.expect(H.eq),this.$0())),this.semicolon(),this.finishNode(ve,"TSTypeAliasDeclaration")}$10(ve){if(this.type===H._const)ve.const=!0,this.next();this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,km),this.expect(H.braceL),ve.members=[];while(!this.eat(H.braceR)){let Ee=this.startNode();if(Ee.id=this.type===H.string?this.parseExprAtom():this.parseIdent(!0),this.eat(H.eq))Ee.initializer=this.parseMaybeAssign();if(ve.members.push(this.finishNode(Ee,"TSEnumMember")),this.type!==H.braceR)this.expect(H.comma)}return this.finishNode(ve,"TSEnumDeclaration")}$2h(ve){if(this.next(),this.type===H.string){if(ve.id=this.parseExprAtom(),this.type===H.braceL)ve.body=this.$11();else this.semicolon();return this.finishNode(ve,"TSModuleDeclaration")}return ve.id=this.parseIdent(),this.checkLValSimple(ve.id,wm),this.$1o(ve)}$1o(ve){if(this.eat(H.dot)){let Ee=this.startNode();Ee.id=this.parseIdent(),ve.body=this.$1o(Ee)}else ve.body=this.$11();return this.finishNode(ve,"TSModuleDeclaration")}$11(){this.enterScope(gm);let ve=this.startNode();this.enterScope(0),this.expect(H.braceL),ve.body=[];while(!this.eat(H.braceR))ve.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(ve,"TSModuleBlock")}$1p(ve,Ee){if(ve.isExport=Ee,ve.id=this.parseIdent(),this.checkLValSimple(ve.id,bn),this.expect(H.eq),this.isContextual("require")&&this.$2()===Kc){let Ce=this.startNode();this.next(),Ce.expression=this.$1e(),ve.moduleReference=this.finishNode(Ce,"TSExternalModuleReference")}else ve.moduleReference=this.$k();return this.semicolon(),this.finishNode(ve,"TSImportEqualsDeclaration")}$2i(){let ve=this.$d();if(this.input.charCodeAt(ve)!==vn)return!1;let Ee=this.input.charCodeAt(ve+1);return Ee!==vn&&Ee!==62}parseStatement(ve,Ee,Ce){if(this.type===we)this.$1q(!0);let Ae=this.$1k();if(Ae)return Ae;return super.parseStatement(ve,Ee,Ce)}parseVarStatement(ve,Ee,Ce){return super.parseVarStatement(ve,Ee,Ce||this.$5)}parseVarId(ve,Ee){if(super.parseVarId(ve,Ee),ve.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),ve.definite=!0;this.$h(ve.id,!1)}parseCatchClauseParam(){let ve=this.$h(this.parseBindingAtom(),!1),Ee=ve.type==="Identifier";return this.enterScope(Ee?ym:0),this.checkLValPattern(ve,Ee?Sm:bn),this.expect(H.parenR),ve}parseImport(ve){if(this.next(),ve.importKind="value",this.type===H.string)ve.specifiers=[],ve.source=this.parseExprAtom();else{if(this.isContextual("type")){let Ee=this.$2();if(Ee===bs||Ee===Jr||ce(Ee)&&this.$3()!=="from")ve.importKind="type",this.next()}if(this.type===H.name&&this.$2i())return this.$1p(ve,!1);ve.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),ve.source=this.$z()}return this.$1r(ve),this.semicolon(),this.finishNode(ve,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=H._with;return this.type===H._with?super.parseWithClause():void 0}$1r(ve){let Ee=this.parseWithClause();if(Ee)ve.attributes=Ee}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(ve){return this.$1s("exportKind",()=>super.parseExportSpecifier(ve))}$1s(ve,Ee){let Ce=this.isContextual("type")?this.$2():-1;if(Ce===Zr||Ce===ea||ce(Ce)&&this.$3()!=="as"){let _e=this.startNode();this.next();let Ne=Ee();return this.$q(Ne,_e),Ne[ve]="type",Ne}let Ae=Ee();return Ae[ve]="value",Ae}parseExport(ve,Ee){if(this.next(),this.eat(H._import)){if(ve.importKind="value",this.isContextual("type")&&ce(this.$2())&&this.$3()!=="from")ve.importKind="type",this.next();return this.$1p(ve,!0)}if(this.eat(H.eq))return ve.expression=this.parseExpression(),this.semicolon(),this.finishNode(ve,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),ve.id=this.parseIdent(),this.semicolon(),this.finishNode(ve,"TSNamespaceExportDeclaration");if(ve.exportKind="value",this.isContextual("type")){let _e=this.$2();if(_e===bs||_e===Jr)ve.exportKind="type",this.next()}if(this.eat(H.star))return this.parseExportAllDeclaration(ve,Ee);if(this.eat(H._default)){if(this.isContextual("interface")&&this.$14())ve.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")ve.declaration=this.$1n(this.startNode(),"nullableID");else ve.declaration=this.parseExportDefaultDeclaration();return this.finishNode(ve,"ExportDefaultDeclaration")}let Ce=this.isContextual("declare"),Ae=this.$1k(!0);if(Ae||this.shouldParseExportStatement()){if(ve.declaration=Ae??this.parseStatement(null),Ce||ve.declaration.type==="TSInterfaceDeclaration"||ve.declaration.type==="TSTypeAliasDeclaration")ve.exportKind="type";return ve.specifiers=[],ve.source=null,this.finishNode(ve,"ExportNamedDeclaration")}if(ve.declaration=null,ve.specifiers=this.parseExportSpecifiers(Ee),this.eatContextual("from"))ve.source=this.$z(),this.$1r(ve);else{for(let _e of ve.specifiers)if(this.checkUnreserved(_e.local),this.checkLocalExport(_e.local),_e.local.type==="Literal")this.raise(_e.local.start,"A string literal cannot be used as an exported binding without `from`.");ve.source=null}return this.semicolon(),this.finishNode(ve,"ExportNamedDeclaration")}parseFunction(ve,Ee,Ce,Ae,_e){let Ne=Ee&zc;if(Ne)this.$f=ve,this.$o=ve.start;super.parseFunction(ve,Ee,Ce,Ae,_e),this.$f=null;let $e=!ve.body;if($e)ve.type="TSDeclareFunction";if(Ne&&ve.id){if($e){if(this.$5&&this.currentScope().flags&Wc)this.declareName(ve.id.name,ta,ve.id.start);this.checkLValSimple(ve.id,xm)}else if(!(Ee&Em)){let De=bm;if(this.strict||ve.generator||ve.async)De=this.treatFunctionsAsVar?vm:bn;this.checkLValSimple(ve.id,De)}}return ve}parseFunctionParams(ve){if(this.$1())ve.typeParameters=this.$8();if(super.parseFunctionParams(ve),this.type===H.colon)ve.returnType=this.$6(!0)}parseFunctionBody(ve,Ee,Ce,Ae){if(Ce&&this.type===H.colon)ve.returnType=this.$6(!0);if(Ee||this.type===H.braceL||ve.start!==this.$o){super.parseFunctionBody(ve,Ee,Ce,Ae);return}this.semicolon(),this.exitScope()}parseMethod(ve,Ee,Ce){let Ae=this.$l;this.$l=null,this.$j=!0;let _e=super.parseMethod(ve,Ee,Ce);if(!_e.body)_e.type="TSDeclareMethod";if(Ae)_e.typeParameters=Ae;return _e}parseBindingList(ve,Ee,Ce,Ae){let _e=Ae===!0||this.$j;return this.$j=!1,super.parseBindingList(ve,Ee,Ce,_e)}$s(ve){if(!ve&&!this.$b())return!1;let Ee=this.$2();return Ee===Tm||Ee===bs||Ee===Jr||Ee===Gc||Ee===_m||Ee===Zr||Ee===ea||Ee>=48&&Ee<=57||ce(Ee)}parseAssignableListItem(ve){let Ee=this.$12(),Ce=this.start,Ae=this.startLoc,_e,Ne=!1,$e=!1;if(ve)while(this.type===H.name&&fm.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")Ne=!0;else if(this.value==="override")$e=!0;else _e=this.value;this.next()}let De;if(this.type===H._this)De=this.startNode(),De.name="this",this.next(),this.finishNode(De,"Identifier");else De=this.parseBindingAtom();let Oe=this.type===H.eq?this.parseMaybeDefault(Ce,Ae,De):this.parseMaybeDefault(De.start,De.loc?.start,this.$h(De,!0));if(Ee.length>0)Oe.decorators=Ee;if(!_e&&!Ne&&!$e)return Oe;if(Oe.type!=="Identifier"&&Oe.type!=="AssignmentPattern")this.raise(Ce,"A parameter property may not be declared using a binding pattern.");let qe=this.startNodeAt(Ce,Ae);if(_e)qe.accessibility=_e;if(Ne)qe.readonly=!0;if($e)qe.override=!0;return qe.parameter=Oe,this.finishNode(qe,"TSParameterProperty")}parseBindingListItem(ve){if(ve.type==="RestElement")this.$h(ve,!0);return ve}checkLValSimple(ve,Ee,Ce){if(this.$f&&ve===this.$f.id){this.$f=null;return}if(!Ee&&jc.has(ve.type)){this.checkLValSimple(ve.expression,Ee,Ce);return}switch(ve.type){case"TSParameterProperty":this.checkLValInnerPattern(ve.parameter,Ee,Ce);return;case"Identifier":if(ve.name==="this")return}super.checkLValSimple(ve,Ee,Ce)}toAssignable(ve,Ee,Ce){if(ve&&!Ee&&jc.has(ve.type))return ve;return super.toAssignable(ve,Ee,Ce)}declareName(ve,Ee,Ce){let Ae=this.currentScope();if(Ee&ta){this.$1t(Ae,ve),Ae.$1u??=[],Ae.$1u.push(ve);return}if(Ee===Qr||Ee===qc){if(Ae.$13??=[],Ee===Qr&&$t(Ae.$13,ve))this.raise(Ce,`type '${ve}' has already been declared.`);Ae.$13.push(ve),this.$1t(Ae,ve);return}if(Ee&Yc){if(Ae.$1v??=[],$t(Ae.$1v,ve))return;super.declareName(ve,bn,Ce),Ae.$1v.push(ve);return}super.declareName(ve,Ee,Ce)}$1t(ve,Ee){if(this.inModule&&ve.flags&Wc)delete this.undefinedExports[Ee]}checkLocalExport(ve){for(let Ee=this.scopeStack.length-1;Ee>=0;Ee--){let Ce=this.scopeStack[Ee];if($t(Ce.$13,ve.name)||$t(Ce.$1u,ve.name))return}super.checkLocalExport(ve)}checkExport(){}raiseRecoverable(ve,Ee){if(Ee==="Duplicate constructor in the same class")return;super.raiseRecoverable(ve,Ee)}$12(){let ve=[];while(this.type===we)ve.push(this.$1w());return ve}$1q(ve){let Ee=this.$9[this.$9.length-1];while(this.type===we)Ee.push(this.$1w());if(this.type===H._export){if(!ve)this.unexpected()}else if(this.type!==H._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let ve=this.startNode();this.next(),this.$9.push([]);let Ee=this.start,Ce=this.startLoc,Ae;if(this.type===H.parenL){if(this.next(),Ae=this.parseExpression(),this.expect(H.parenR),this.options.preserveParens){let Ne=this.startNodeAt(Ee,Ce);Ne.expression=Ae,Ae=this.finishNode(Ne,"ParenthesizedExpression")}}else{Ae=this.parseIdent(!1);while(this.eat(H.dot)){let Ne=this.startNodeAt(Ee,Ce);Ne.object=Ae,Ne.property=this.parseIdent(!0),Ne.computed=!1,Ae=this.finishNode(Ne,"MemberExpression")}}let _e=this.$p()?this.$e(!0):void 0;if(this.eat(H.parenL)){let Ne=this.startNodeAt(Ae.start,Ae.loc?.start);if(Ne.callee=Ae,Ne.arguments=this.parseExprList(H.parenR,!1,!1),_e)Ne.typeArguments=_e;Ae=this.finishNode(Ne,"CallExpression")}else if(_e){let Ne=this.startNodeAt(Ae.start,Ae.loc?.start);Ne.expression=Ae,Ne.typeArguments=_e,Ae=this.finishNode(Ne,"TSInstantiationExpression")}return ve.expression=Ae,this.$9.pop(),this.finishNode(ve,"Decorator")}shouldParseExportStatement(){return this.type===we||super.shouldParseExportStatement()}parseExprAtom(ve,Ee,Ce){if(this.type===we)this.$1q(!1);return super.parseExprAtom(ve,Ee,Ce)}parseProperty(ve,Ee){if(ve||this.type!==we)return super.parseProperty(ve,Ee);let Ce=this.$12(),Ae=super.parseProperty(ve,Ee);if(Ae.type==="SpreadElement")this.raise(Ae.start,"Decorators can't be used with SpreadElement");return Ae.decorators=Ce,Ae}parseClassId(ve,Ee){let Ce=this.$9.length-1,Ae=this.$9[Ce];if(Ae.length>0)ve.decorators=Ae,this.$q(ve,Ae[0]),this.$9[Ce]=[];if(!this.isContextual("implements")||Ee===!0)super.parseClassId(ve,Ee);if(this.$1())ve.typeParameters=this.$8()}parseClassSuper(ve){if(super.parseClassSuper(ve),ve.superClass&&this.$1())ve.superTypeParameters=this.$e(!0);if(this.eatContextual("implements"))ve.implements=this.$a(()=>this.$1j())}parseClassElement(ve){if(this.type===we){let $e=this.$12();if(this.type===H.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let De=this.parseClassElement(ve);return De.decorators=$e,this.$q(De,$e[0]),De}if(this.eat(H.semi))return null;let Ee=this.startNode();while(this.type===H.name&&hm.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let $e=this.value;if(this.next(),$e==="static"&&this.type===H.braceL)return this.next(),this.parseClassStaticBlock(Ee),Ee;if($e==="public"||$e==="private"||$e==="protected")Ee.accessibility=$e;else Ee[$e]=!0}if(this.type===H.bracketL&&this.$1g())return this.$1h(Ee);Ee.static??=!1;let Ce="",Ae=!1,_e=!1,Ne="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===H.star)&&!this.canInsertSemicolon())_e=!0;else Ce="async";if(!Ce&&this.eat(H.star))Ae=!0;if(!Ce&&!_e&&!Ae){let $e=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())Ne=$e;else Ce=$e}if(Ce)Ee.computed=!1,Ee.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),Ee.key.name=Ce,this.finishNode(Ee.key,"Identifier");else this.parseClassElementName(Ee);if(this.eat(H.question))Ee.optional=!0;if(this.type===H.parenL||this.$1()||Ne!=="method"||Ae||_e){let $e=Ee.key,De=!Ee.static&&!Ee.computed&&($e.type==="Identifier"&&$e.name==="constructor"||$e.type==="Literal"&&$e.value==="constructor");if(Ee.kind=De?"constructor":Ne,this.$1())Ee.typeParameters=this.$8();this.$o=this.start,this.parseClassMethod(Ee,Ae,_e,De&&ve)}else{if(!Ee.optional&&this.$u())this.next(),Ee.definite=!0;if(this.type===H.colon)Ee.typeAnnotation=this.$6();this.parseClassField(Ee)}return Ee}parseMaybeAssign(ve,Ee,Ce){if(this.$p()){let Ae=this.$g(()=>{let _e=this.$8(),Ne=super.parseMaybeAssign(ve,Ee,Ce);if(Ne.type!=="ArrowFunctionExpression")return;return Ne.typeParameters=_e,this.$q(Ne,_e),Ne});if(Ae)return Ae}return super.parseMaybeAssign(ve,Ee,Ce)}parseMaybeUnary(ve,Ee,Ce,Ae){if(this.$p()){let _e=this.startNode();return _e.typeAnnotation=this.$a(()=>{this.next();let Ne=this.$0();if(!this.$c())this.unexpected();return this.next(),Ne}),_e.expression=this.parseMaybeUnary(null,!1,!1,Ae),this.finishNode(_e,"TSTypeAssertion")}return super.parseMaybeUnary(ve,Ee,Ce,Ae)}parseMaybeConditional(ve,Ee){let Ce=this.start,Ae=this.startLoc,_e=this.parseExprOps(ve,Ee);if(this.checkExpressionErrors(Ee))return _e;if(this.type===H.question&&!(_e.type==="ArrowFunctionExpression"&&_e.start===Ce)&&!this.$2j()){this.next();let Ne=this.startNodeAt(Ce,Ae);return Ne.test=_e,Ne.consequent=this.parseMaybeAssign(),this.expect(H.colon),Ne.alternate=this.parseMaybeAssign(ve),this.finishNode(Ne,"ConditionalExpression")}return _e}$2j(){let ve=this.$d(),Ee=this.input.charCodeAt(ve);if(Ee===Hc||Ee===Am||Ee===Cm)return!0;return Ee===vn&&this.input.charCodeAt(ve+1)!==vn}parseParenItem(ve){return this.$h(ve,!0)}$1x(){if(this.type!==H.colon)return!0;let ve=this.$g(()=>{let Ee=this.$6(!0);return this.type===H.arrow&&!this.canInsertSemicolon()?Ee:void 0});if(!ve)return!1;return this.$7=ve,!0}shouldParseArrow(ve){return this.$1x()&&super.shouldParseArrow(ve)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(ve,Ee,Ce,Ae){if(this.$7)ve.returnType=this.$7,this.$7=null;return super.parseArrowExpression(ve,Ee,Ce,Ae)}parseExprList(ve,Ee,Ce,Ae){if(!this.$m)return super.parseExprList(ve,Ee,Ce,Ae);this.$m=!1;let _e=[],Ne=!0;while(!this.eat(ve)){if(Ne)Ne=!1;else if(this.expect(H.comma),Ee&&this.afterTrailingComma(ve))break;if(this.type===H.ellipsis){let $e=this.parseSpread(Ae);if(this.eat(H.question))$e.optional=!0;if(this.type===H.colon)$e.typeAnnotation=this.$6();_e.push($e)}else _e.push(this.parseMaybeAssign(!1,Ae,this.parseParenItem))}return _e}parseSubscript(ve,Ee,Ce,Ae,_e,Ne,$e){if(this.$u()&&!this.hasPrecedingLineBreak()){let Oe=this.startNodeAt(Ee,Ce);return this.exprAllowed=!1,this.next(),Oe.expression=ve,this.finishNode(Oe,"TSNonNullExpression")}if(_e&&this.$1()){let Oe=this.$g(()=>this.$2k(Ee,Ce,$e));if(Oe)return Oe}let De=this.type===H.questionDot&&this.$2()===Xc;if(this.$1()||De||this.type===H.bitShift&&this.value==="<<"){let Oe=this.$g(()=>{if(De)this.next();this.$p();let qe=this.$e(!0);if(this.type===H.parenL&&!Ae)return qe;if(this.type===H.backQuote)return De?void 0:qe;if(De)return;if(this.$c()||this.type===H.bitShift||this.type.startsExpr&&this.type!==H.parenL&&!this.hasPrecedingLineBreak())return;return qe});if(Oe){let qe=this.startNodeAt(Ee,Ce);if(this.type===H.parenL&&!Ae){if(this.next(),qe.callee=ve,qe.arguments=this.parseExprList(H.parenR,!0,!1),qe.typeArguments=Oe,De)ve.optional=!0;if(De||Ne)qe.optional=De;return this.finishNode(qe,"CallExpression")}if(this.type===H.backQuote)return qe.tag=ve,qe.quasi=this.parseTemplate({isTagged:!0}),qe.typeArguments=Oe,this.finishNode(qe,"TaggedTemplateExpression");return qe.expression=ve,qe.typeArguments=Oe,this.finishNode(qe,"TSInstantiationExpression")}}if(_e&&this.type===H.parenL)this.$m=!0;return super.parseSubscript(ve,Ee,Ce,Ae,_e,Ne,$e)}$2k(ve,Ee,Ce){let Ae=this.startNodeAt(ve,Ee);if(Ae.typeParameters=this.$8(),this.expect(H.parenL),Ae.params=this.parseBindingList(H.parenR,!1,!0),this.type===H.colon)Ae.returnType=this.$6(!0);if(this.type!==H.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(Ae,Ae.params,!0,Ce)}parseDynamicImport(ve){if(this.next(),ve.source=this.parseMaybeAssign(),this.eat(H.comma)&&this.type!==H.parenR)ve.arguments=[this.parseExpression()];return this.expect(H.parenR),this.finishNode(ve,"ImportExpression")}parseNew(){let ve=super.parseNew();if(ve.callee?.type!=="TSInstantiationExpression")return ve;let Ee=this.startNodeAt(ve.start,ve.loc?.start);return Ee.callee=ve.callee.expression,Ee.typeArguments=ve.callee.typeArguments,Ee.arguments=ve.arguments,this.finishNodeAt(Ee,"NewExpression",ve.end,ve.loc?.end)}parseExprOp(ve,Ee,Ce,Ae,_e){if(H._in.binop>Ae&&this.type===H.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let Ne=this.value==="satisfies",$e=this.startNodeAt(Ee,Ce);return $e.expression=ve,$e.typeAnnotation=this.$a(()=>{if(this.next(),!Ne&&this.type===H._const){let De=this.startNode();return De.typeName=this.parseIdent(!0),this.finishNode(De,"TSTypeReference")}return this.$0()}),this.finishNode($e,Ne?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp($e,Ee,Ce,Ae,_e)}return super.parseExprOp(ve,Ee,Ce,Ae,_e)}parseGetterSetter(ve){ve.kind=ve.key.name,super.parseGetterSetter(ve)}parsePropertyValue(ve,Ee,Ce,Ae,_e,Ne,$e,De){if(!Ee&&this.$1()){if(this.$l=this.$8(),this.type!==H.parenL)this.unexpected();ve.kind="init"}return super.parsePropertyValue(ve,Ee,Ce,Ae,_e,Ne,$e,De)}}return ke});var Jc=ts(Ir,Qc,$r);var Zc=Zo(Jc);var{parse:I,parseModule:Ss}=Uc({typescript:Zc});function ti(D,H){if(!D)return;let X=(Y)=>{H(Y),S(Y,X)};X(D)}import{readFileSync as $m}from"node:fs";import ep from"node:path";var qt={kind:"value"},Tt={kind:"unknown"};function Oi(D,H){let X=D;for(let Y of H){if(X.kind!=="members")return X.kind==="value"?qt:Tt;X=X.member(Y)}if(X.kind==="members")return X.self?{kind:"component",key:X.self}:qt;return X}function U(D){let H=new Map,X=new Map,Y=new Map;function ce(Ne){if(H.has(Ne))return H.get(Ne)??null;let $e;try{let De=$m(ep.join(D,Ne),"utf8");if(Ne.endsWith(".svelte")){let{module:Oe,typescript:qe}=_(De);$e=tp(Oe?De.slice(Oe.content.start,Oe.content.end):"",qe)}else $e=tp(De,Ne.endsWith(".ts"))}catch{$e=null}return H.set(Ne,$e),$e}function we(Ne,$e){let De=de(ep.join(D,Ne),$e);if(!De)return;let Oe=Re(D,De);return Oe.startsWith("..")?void 0:Oe}function ke(Ne){let $e=Y.get(Ne);if($e===void 0)$e=ve(Ne),Y.set(Ne,$e);return $e}function ve(Ne){let $e=new Set,De=[Ne];for(let Oe=De.pop();Oe!==void 0;Oe=De.pop()){if($e.has(Oe))continue;if($e.add(Oe),Oe.endsWith(".svelte"))return!0;let qe=ce(Oe);if(!qe||qe.unread)return!0;let He=[...Array.from(qe.imports.values(),({source:Ze})=>Ze),...Array.from(qe.reExports.values(),({source:Ze})=>Ze),...qe.namespaces.values(),...qe.stars];for(let Ze of He){if(!Ze.startsWith("."))continue;let Ye=we(Oe,Ze);if(Ye===void 0)return!0;De.push(Ye)}}return!1}function Ee(Ne,$e,De){if(!$e.startsWith("."))return qt;let Oe=we(Ne,$e);if(Oe===void 0)return Tt;if(De==="*")return{kind:"members",member:(qe)=>Ce(Oe,qe)??qt};return Ce(Oe,De)??qt}function Ce(Ne,$e){let De=`${Ne}\x00${$e}`;if(X.has(De))return X.get(De)??null;X.set(De,Tt);let Oe=Ae(Ne,$e);return X.set(De,Oe),Oe}function Ae(Ne,$e){if(Ne.endsWith(".svelte")&&$e==="default")return{kind:"component",key:Ne};let De=ce(Ne);if(!De||De.unread)return Tt;let Oe=De.reExports.get($e);if(Oe)return Ee(Ne,Oe.source,Oe.local);let qe=De.namespaces.get($e);if(qe!==void 0)return Ee(Ne,qe,"*");let He=_e(Ne,De,$e);if(He!==null)return He;if($e==="default")return null;let Ze=new Set;for(let Ge of De.stars)if(Ge.startsWith("."))Ze.add(we(Ne,Ge));let Ye=null;for(let Ge of Ze){let tt=Ge===void 0?Tt:Ce(Ge,$e);if(tt===null)continue;if(Ye!==null&&!Rm(Ye,tt))return Tt;Ye=tt}return Ye}function _e(Ne,$e,De){if(!$e.code.includes("export"))return null;if(!ke(Ne))return new RegExp(`\\b${De.replace(Pm,"\\$&")}\\b`).test($e.code)?qt:null;let Oe=$e.exportLists.get(De),qe=Oe===void 0?void 0:$e.imports.get(Oe);if(qe)return Ee(Ne,qe.source,qe.imported);let He=$e.body();if(!He)return Tt;let Ze=new Set,Ye=(at)=>{if(!at)return Tt;let ht=!1;return ti(at,(ut)=>{if(ht||ut.type!=="Identifier")return;if(tt(ut.name).kind!=="value")ht=!0}),ht?Tt:qt},Ge=(at,ht)=>{if(at?.type==="VariableDeclaration"){for(let ut of at.declarations)if(ut.id.type==="Identifier"){if(ut.id.name===ht)return ut.init?xt(ut.init):qt}else if(m(ut.id).some((ft)=>ft.name===ht))return Ye(ut.init)}else if((at?.type==="FunctionDeclaration"||at?.type==="ClassDeclaration")&&at.id?.name===ht)return Ye(at);return},tt=(at)=>{if(Ze.has(at))return qt;Ze.add(at);try{let ht=$e.imports.get(at);if(ht)return Ee(Ne,ht.source,ht.imported);for(let ut of He){let ft=Ge(ut.type==="ExportNamedDeclaration"||ut.type==="ExportDefaultDeclaration"?ut.declaration:ut,at);if(ft)return ft}return qt}finally{Ze.delete(at)}},xt=(at)=>{switch(at.type){case"Identifier":return tt(at.name);case"ObjectExpression":return Xt(at,void 0);case"CallExpression":{let{callee:ht,arguments:ut}=at;if(ht.type==="MemberExpression"&&!ht.computed&&ht.object.type==="Identifier"&&ht.object.name==="Object"&&ht.property.type==="Identifier"&&ht.property.name==="assign"&&ut.length===2&&ut[1].type==="ObjectExpression"){let ft=xt(ut[0]);if(ft.kind==="unknown"||ft.kind==="members")return Tt;return Xt(ut[1],ft.kind==="component"?ft.key:void 0)}return Ye(at)}default:return Ye(at)}},Xt=(at,ht)=>{let ut=new Map;for(let ft of at.properties){if(ft.type!=="Property"||ft.computed||ft.kind!=="init")return Tt;let ui=ft.key.type==="Identifier"?ft.key.name:ft.key.type==="Literal"?String(ft.key.value):void 0;if(ui===void 0)return Tt;ut.set(ui,ft.value)}return{kind:"members",self:ht,member:(ft)=>{let ui=ut.get(ft);return ui?xt(ui):qt}}};for(let at of He){if(at.type==="ExportDefaultDeclaration"){if(De==="default")return xt(at.declaration);continue}if(at.type!=="ExportNamedDeclaration"||at.source)continue;let ht=Ge(at.declaration,De);if(ht)return ht;for(let ut of at.specifiers){if((ut.exported.type==="Identifier"?ut.exported.name:String(ut.exported.value))!==De)continue;return ut.local.type==="Identifier"?tt(ut.local.name):Tt}}return null}return{exportOf:(Ne,$e)=>Ce(Ne,$e)??qt,importOf:Ee}}var Pm=/[.*+?^${}()|[\]\\]/g,Mm=/^export\s*\{\s*\}\s*;?$/;function Rm(D,H){if(D.kind==="value"||H.kind==="value")return D.kind===H.kind;return D.kind==="component"&&H.kind==="component"&&D.key===H.key}function tp(D,H){let X=null,Y={reExports:new Map,namespaces:new Map,stars:[],imports:new Map,exportLists:new Map,unread:!1,code:D,body:()=>{if(X===null)try{X=Ss(D,{typescript:H,comments:!1}).body}catch{X=void 0}return X}};for(let ce of p(D,{exportLists:!0})){if(!ce.source){if(ce.kind==="export"&&ce.specifiers.length>0){for(let{typeOnly:ke,local:ve,exported:Ee}of ce.specifiers)if(!ke&&Ee)Y.exportLists.set(Ee,ve)}else if(ce.kind==="import"||!Mm.test(D.slice(ce.start,ce.end)))Y.unread=!0;continue}if(ce.typeOnly)continue;let we=ce.source.value;if(ce.kind==="import"){for(let ke of ce.specifiers){if(ke.typeOnly)continue;Y.imports.set(ke.local,{source:we,imported:ke.kind==="namespace"?"*":ke.imported})}continue}for(let ke of ce.specifiers){if(ke.typeOnly)continue;if(ke.kind==="all")Y.stars.push(we);else if(ke.kind==="namespace"&&ke.exported)Y.namespaces.set(ke.exported,we);else if(ke.exported)Y.reExports.set(ke.exported,{source:we,local:ke.local})}}return Y}function yi(D,H,X){for(let{name:Y}of m(H))ia(D,Y,X)}function ia(D,H,X){if(D.unknownNames.add(H),!D.unknownReasons.has(H))D.unknownReasons.set(H,X)}var Ui="function";class wn extends Error{}var Om=new Set(["$state","$state.raw","$derived"]);function Vm(D,H){let[X]=m(H.id),Y=X&&D.scopes.bindingOf(X)?.rune,{init:ce}=H;if(!Y||ce?.type!=="CallExpression")return;let[we]=ce.arguments;return{rune:Y,argument:we&&we.type!=="SpreadElement"?we:null}}var ip=new Map;function fe(D,H){let X=Di.join(D,H),{mtimeMs:Y}=op(X),ce=ip.get(X);if(ce?.mtimeMs===Y)return ce.model;let we=ji(na(X,"utf8"),H,cp(D));return ip.set(X,{mtimeMs:Y,model:we}),we}var Bi=0;function lp(){Bi++}var np=new Map;function Dm(D){let H=np.get(D);if(H?.checked!==Bi)H={checked:Bi,resolver:U(D)},np.set(D,H);return H.resolver}function cp(D){return(H,X,Y)=>{let ce=Dm(D).importOf(H,X,Y);if(ce.kind==="component")return{component:ce.key};if(ce.kind==="members")return{members:ce};if(Y==="*")return;let we=Bm(D,H,X);if(!we)return;let ke=Um(D,we,Y);return ke!==void 0?{string:ke}:{helper:()=>Fm(D,we,Y)}}}function Bm(D,H,X){let Y=Di.posix.join(Di.posix.dirname(H),X);return[Y,`${Y}.js`].find((ce)=>ce.endsWith(".js")&&Lm(Di.join(D,ce)))}var sp=new Map;function P(D,H){let X=Di.join(D,H),Y=sp.get(X);if(Y?.checked===Bi)return Y.model;let{mtimeMs:ce}=op(X);if(Y?.mtimeMs===ce)return Y.checked=Bi,Y.model;let we;try{we=sa(na(X,"utf8"),H,cp(D));for(let ke of we.ast.module?.content.body??[]){if(ke.type!=="ExportNamedDeclaration")continue;let ve=ke.declaration?ke.declaration.type==="VariableDeclaration"?ke.declaration.declarations.flatMap((Ee)=>m(Ee.id)):[]:ke.specifiers.flatMap((Ee)=>Ee.local.type==="Identifier"?[Ee.local]:[]);for(let{name:Ee}of ve)we.escapes.set(Ee,{full:!0,paths:[]})}}catch{we=void 0}return sp.set(X,{mtimeMs:ce,checked:Bi,model:we}),we}function Fm(D,H,X){let Y=P(D,H);if(!Y||Y.unknownNames.has(X))return;for(let ce of Y.ast.module?.content.body??[]){if(ce.type!=="ExportNamedDeclaration")continue;let{declaration:we}=ce;if(we?.type==="FunctionDeclaration"){if(we.id?.name===X)return{model:Y,fn:we}}else if(we?.type==="VariableDeclaration"&&we.kind==="const"){for(let{id:ke,init:ve}of we.declarations)if(ke.type==="Identifier"&&ke.name===X&&(ve?.type==="ArrowFunctionExpression"||ve?.type==="FunctionExpression"))return{model:Y,fn:ve}}}return}function Um(D,H,X){let Y=na(Di.join(D,H),"utf8"),ce=new RegExp(`^export const ${X.replaceAll("$","\\$")} = (["'])([^"'\\\\\\n]*)\\1;?[ \\t]*$`,"gm"),we=[...Y.matchAll(ce)];return we.length===1?we[0][2]:void 0}function sa(D,H,X,Y=!1){let ce=Ss(D,{typescript:Y,comments:!1}),we={type:"Root",start:0,end:D.length,options:null,fragment:{type:"Fragment",nodes:[]},css:null,module:{type:"Script",start:0,end:D.length,context:"module",content:ce,attributes:[]},comments:[],js:[]};return ji(D,H,X,we)}function ji(D,H,X=()=>{return},Y){let ce=Y??I(D,{comments:!1,css:!1}),we={key:H,code:D,ast:ce,scopes:or(ce),props:new Map,propNames:new Map,customElement:ce.options?.attributes.some((Ne)=>Ne.name==="customElement")??!1,declarations:new Map,functions:new Map,reactiveDeclarations:new WeakSet,unknownNames:new Set,unknownReasons:new Map,guardedWrites:new Map,componentImports:new Map,otherImports:new Set,packageImports:new Map,memberImports:new Map,importedStrings:new Map,importedHelpers:new Map,storeImports:new Map,providedContexts:new Set,providesUnknownContext:!1,contextObjects:new Map,contextLeaks:new Map,readsUnknownContext:!1,escapes:ny(ce)},ke=new Set;for(let Ne of[ce.module,ce.instance]){if(!Ne)continue;let $e=Ne===ce.instance;for(let De of Ne.content.body)Qm(we,De,$e,X,$e?ke:void 0)}for(let Ne of ce.instance?.content.body??[]){if(Ne.type!=="ExportNamedDeclaration"||Ne.declaration||Ne.source)continue;for(let{local:$e,exported:De}of Ne.specifiers){if($e.type!=="Identifier")continue;if(!we.props.has($e.name)){if(!ke.has($e.name))continue;let Oe=we.declarations.get($e.name);we.declarations.delete($e.name),we.props.set($e.name,Oe===Ui?null:Oe??null)}we.propNames.set($e.name,De.type==="Identifier"?De.name:String(De.value))}}let ve=new Map;for(let Ne of ry(we.scopes)){if(Ne.kind==="reactive"&&Ne.node)ve.set(Ne.node,Ne.name);for(let $e of Ne.references)if($e.writes||$e.mutates)ve.set($e.node,$e.store?`$${Ne.name}`:Ne.name)}let Ee=new Set,Ce=(Ne,$e)=>ti(Ne,(De)=>{let Oe=De.type==="Identifier"&&ve.get(De);if(!Oe)return;ve.delete(De),ia(we,Oe,$e),Ee.add(Oe)}),Ae=(Ne)=>T(D,Ne).line,_e=Ym(ce);ti(ce,(Ne)=>{switch(Ne.type){case"AssignmentExpression":{let $e=_e.get(Ne);if(we.reactiveDeclarations.has(Ne))ti(Ne.left,(De)=>{if(De.type==="Identifier")ve.delete(De)});else if($e?.length&&Ne.operator==="="&&Ne.left.type==="Identifier"&&!Ne.left.name.startsWith("$")&&ve.get(Ne.left)===Ne.left.name){let{name:De}=Ne.left;ve.delete(Ne.left);let Oe=we.guardedWrites.get(De)??[];Oe.push({guards:$e,value:Ne.right,line:Ae(Ne.start)}),we.guardedWrites.set(De,Oe)}else Ce(Ne.left,`is assigned at line ${Ae(Ne.start)}`);break}case"UpdateExpression":Ce(Ne.argument,`is updated at line ${Ae(Ne.start)}`);break;case"BindDirective":Ce(Ne.expression,`is bound with \`bind:\` at line ${Ae(Ne.start)}`);break;case"CallExpression":if(Ne.callee.type==="Identifier"&&Ne.callee.name==="setContext"){let $e=Fi(Ne.arguments[0],we);if($e===void 0)we.providesUnknownContext=!0;else we.providedContexts.add($e)}break}});for(let[Ne,$e]of ve)ia(we,$e,`is assigned at line ${Ae(Ne.start)}`),Ee.add($e);if(we.restPropsName&&Ee.has(we.restPropsName))we.restPropsName=void 0;return Wm(we,_e),we}var jm=/\b(?:get|set)Context\b|\bgetAllContexts\b/;function Wm(D,H){let{ast:X,code:Y}=D;if(!jm.test(Y))return;let ce=new Map;f(X,{enter(ke,ve){ce.set(ke,ve)}});let we=(ke,ve)=>{let Ee=D.contextLeaks.get(ke)??new Set;Ee.add(ve),D.contextLeaks.set(ke,Ee)};ti(X,(ke)=>{if(ke.type!=="CallExpression"||ke.callee.type!=="Identifier")return;let[ve,Ee]=ke.arguments;if(ke.callee.name==="getAllContexts")D.readsUnknownContext=!0;else if(ke.callee.name==="getContext"){let Ce=Fi(ve,D);if(Ce===void 0)D.readsUnknownContext=!0;else Xm(D,ke,Ce,ce,we)}else if(ke.callee.name==="setContext"){let Ce=Fi(ve,D);if(Ce===void 0)return;let Ae=D.contextObjects.get(Ce)??[];Ae.push(qm(D,Ee,ce,H)),D.contextObjects.set(Ce,Ae)}})}function qm(D,H,X,Y){let ce=H,we=[];if(H?.type==="Identifier"){let Ce=ra(D,H);if(!Ce)return null;for(let Ae of Ce.binding.references){if(Ae.node===H)continue;let _e=zm(D,Ae.parent,Ae.node);if(_e===void 0)return null;we.push(_e)}ce=Ce.declarator.init}if(ce?.type!=="ObjectExpression")return null;let ke=new Map,ve=[];for(let Ce of ce.properties){if(Ce.type!=="Property"||Ce.kind!=="init")return null;let Ae=A(Ce);if(Ae===void 0)return null;ve.push({name:Ae,property:Ce,store:Km(D,Ce.value)})}let Ee=new Set(ve.flatMap(({property:Ce,store:Ae})=>Ae?[Ae.wrapped?Ce.value:Ce]:[]));for(let{name:Ce,store:Ae}of ve){let _e=Ae&&Hm(D,Ae.id,Ee,X,Y);if(!Ae||!_e){ke.set(Ce,null);continue}let Ne=ve.filter(($e)=>$e.name!==Ce&&$e.store?.id.name===Ae.id.name).map(($e)=>$e.name);ke.set(Ce,{..._e,readOnly:Ae.wrapped,aliases:Ne})}return{properties:ke,unlessProvided:we}}function zm(D,H,X){if(H.type!=="CallExpression"||!H.arguments.includes(X)||H.callee.type!=="MemberExpression"||!H.callee.optional||H.callee.object.type!=="CallExpression")return;let Y=H.callee.object;return Y.callee.type==="Identifier"&&Y.callee.name==="getContext"?Fi(Y.arguments[0],D):void 0}function Km(D,H){if(H.type==="Identifier")return{id:H,wrapped:!1};return H.type==="CallExpression"&&H.callee.type==="Identifier"&&D.storeImports.get(H.callee.name)==="readonly"&&H.arguments.length===1&&H.arguments[0].type==="Identifier"?{id:H.arguments[0],wrapped:!0}:void 0}function ra(D,H){let X=D.scopes.bindingOf(H),Y=X?.declaration;return X&&Wi(X,D)&&X.kind==="const"&&Y?.type==="VariableDeclarator"?{binding:X,declarator:Y}:void 0}function A(D){if(!D.computed&&D.key.type==="Identifier")return D.key.name;return D.key.type==="Literal"?String(D.key.value):void 0}function Gm(D,H,X){let Y=H,ce=X.get(H);if(ce?.type==="ArrayExpression")Y=ce,ce=X.get(ce);return ce?.type==="CallExpression"&&ce.arguments[0]===Y&&ce.callee.type==="Identifier"&&D.storeImports.get(ce.callee.name)==="derived"}function Hm(D,H,X,Y,ce){let we=ra(D,H);if(!we)return null;let{binding:ke,declarator:ve}=we;if(ve.init?.type!=="CallExpression"||ve.init.callee.type!=="Identifier"||D.storeImports.get(ve.init.callee.name)!=="writable"||ve.init.arguments.length>1||ve.init.arguments[0]?.type==="SpreadElement")return null;let Ee=[];for(let Ae of ke.references){let{parent:_e}=Ae;if(X.has(_e)||Gm(D,Ae.node,Y))continue;if(Ae.store&&!Ae.writes&&!Ae.mutates)continue;if(Ae.store&&_e.type==="AssignmentExpression"&&_e.operator==="="&&_e.left===Ae.node&&ce.has(_e))Ee.push(_e.right);else if(!Ae.store&&_e.type==="MemberExpression"&&_e.object===Ae.node&&!_e.computed&&_e.property.type==="Identifier"&&_e.property.name==="set"){let Ne=Y.get(_e),[$e]=Ne?.type==="CallExpression"?Ne.arguments:[];if(Ne?.type!=="CallExpression"||Ne.callee!==_e||Ne.arguments.length!==1||$e.type==="SpreadElement"||!ce.has(Ne))return null;Ee.push($e)}else return null}let[Ce]=ve.init.arguments;return{initial:Ce??null,writes:Ee}}function Xm(D,H,X,Y,ce){let we=H,ke=Y.get(H);if(ke?.type==="MemberExpression"&&ke.object===H&&!ke.computed&&ke.property.type==="Identifier"){ce(X,ke.property.name);return}if(ke?.type==="LogicalExpression"&&ke.left===we)we=ke,ke=Y.get(ke);let ve=rp(D,ke,we);if(!ve){ce(X,"*");return}if(ve.id.type==="ObjectPattern"){for(let Ce of ve.id.properties){let Ae=Ce.type==="Property"?A(Ce):void 0;if(Ce.type!=="Property"||Ae===void 0){ce(X,"*");return}let _e=Ce.value.type==="AssignmentPattern"?Ce.value.left:Ce.value;if(_e.type!=="Identifier"||!ap(D,_e))ce(X,Ae)}return}if(ve.id.type!=="Identifier"){ce(X,"*");return}let Ee=D.scopes.bindingOf(ve.id);for(let Ce of Ee?.references??[]){let{parent:Ae}=Ce;if(Ce.writes||Ce.mutates){ce(X,"*");return}if(Ae.type==="MemberExpression"&&Ae.object===Ce.node&&!Ae.computed&&Ae.property.type==="Identifier"){let _e=Ae.property.name,Ne=Ae,$e=Y.get(Ne);if($e?.type==="ChainExpression")Ne=$e,$e=Y.get($e);if($e?.type==="LogicalExpression"&&$e.left===Ne)Ne=$e,$e=Y.get($e);let De=rp(D,$e,Ne);if(De?.id.type!=="Identifier"||!ap(D,De.id))ce(X,_e)}else if(!(Ae.type==="IfStatement"&&Ae.test===Ce.node)&&!(Ae.type==="ConditionalExpression"&&Ae.test===Ce.node)&&!(Ae.type==="UnaryExpression"&&Ae.operator==="!")){ce(X,"*");return}}}function rp(D,H,X){if(H?.type!=="VariableDeclarator"||H.init!==X)return;return D.ast.instance?.content.body.find((ce)=>ce.type==="VariableDeclaration"&&ce.kind==="const"&&ce.declarations.includes(H))?H:void 0}function ap(D,H){return D.scopes.bindingOf(H)?.references.every((Y)=>Y.store&&!Y.writes&&!Y.mutates)??!1}function Ym(D){let H=new Map,X=(Y,ce)=>{switch(Y.type){case"BlockStatement":for(let we of Y.body)X(we,ce);return;case"IfStatement":if(X(Y.consequent,[...ce,{test:Y.test,holds:!0}]),Y.alternate)X(Y.alternate,[...ce,{test:Y.test,holds:!1}]);return;case"ExpressionStatement":H.set(Y.expression,ce);return}};for(let Y of D.instance?.content.body??[])if(Y.type==="LabeledStatement"&&Y.label.name==="$")X(Y.body,[]);return H}var aa=new WeakSet;function Sn(D,H,X,Y){let ce={start:H.start,end:H.end},we=(ke,ve)=>{let Ee={type:"MemberExpression",object:X,property:ke,computed:ve,optional:!1,...ce};return aa.add(Ee),Ee};switch(H.type){case"Identifier":D.declarations.set(H.name,X),Y?.add(H.name);return;case"ObjectPattern":for(let ke of H.properties){let ve=ke.type!=="Property"?void 0:!ke.computed&&ke.key.type==="Identifier"?ke.key.name:ke.key.type==="Literal"&&typeof ke.key.value==="string"?ke.key.value:void 0;if(ke.type!=="Property"||ve===void 0){yi(D,ke.type==="RestElement"?ke.argument:ke.value,"is declared by destructuring");continue}Sn(D,ke.value,we({type:"Identifier",name:ve},!1),Y)}return;case"ArrayPattern":for(let[ke,ve]of H.elements.entries()){if(!ve)continue;if(ve.type==="RestElement"){yi(D,ve.argument,"is declared by destructuring");continue}Sn(D,ve,we({type:"Literal",value:ke},!0),Y)}return;case"AssignmentPattern":Sn(D,H.left,{type:"ConditionalExpression",test:{type:"BinaryExpression",operator:"===",left:X,right:{type:"Identifier",name:"undefined"}},consequent:H.right,alternate:X,...ce},Y);return;default:yi(D,H,"is declared by destructuring")}}function Qm(D,H,X,Y,ce){if(H.type==="ImportDeclaration"){let Ee=String(H.source.value),Ce=Ee.startsWith(".");for(let Ae of H.specifiers){let _e=Ae.local.name;if(!Ce)D.packageImports.set(_e,Ee);let Ne=Ae.type==="ImportDefaultSpecifier"?"default":Ae.type==="ImportNamespaceSpecifier"?"*":Ae.imported.type==="Identifier"?Ae.imported.name:void 0,$e=Ce&&Ne?Y(D.key,Ee,Ne):void 0;if($e&&"component"in $e)D.componentImports.set(_e,$e.component);else if(D.otherImports.add(_e),$e&&"members"in $e)D.memberImports.set(_e,$e.members);else if($e&&"string"in $e)D.importedStrings.set(_e,$e.string);else if($e)D.importedHelpers.set(_e,$e.helper);if(Ee==="svelte/store"&&Ne)D.storeImports.set(_e,Ne)}return}let we=H.type==="ExportNamedDeclaration",ke=we?H.declaration:H;if(!ke)return;if(ke.type==="VariableDeclaration"){for(let Ee of ke.declarations){let Ce=Vm(D,Ee);if(Ce?.rune==="$props"&&X){sy(D,Ee.id);continue}if(Ee.id.type!=="Identifier"){if(we||Ce||!Ee.init)yi(D,Ee.id,"is declared by destructuring");else Sn(D,Ee.id,Ee.init,ke.kind==="let"?ce:void 0);continue}let Ae=Ce&&Om.has(Ce.rune)?Ce.argument:Ee.init??null,{name:_e}=Ee.id;if(we&&X&&ke.kind!=="const")D.props.set(_e,Ae),D.propNames.set(_e,_e);else if(D.declarations.set(_e,Ae),ke.kind==="let")ce?.add(_e)}return}if(ke.type==="FunctionDeclaration"&&ke.id){D.declarations.set(ke.id.name,Ui),D.functions.set(ke.id.name,ke);return}let ve=H.type==="LabeledStatement"&&H.label.name==="$"&&H.body.type==="ExpressionStatement"&&H.body.expression.type==="AssignmentExpression"&&H.body.expression.operator==="="?H.body.expression:void 0;if(ve?.left.type==="ObjectPattern"){if(m(ve.left).map(({name:Ce})=>Ce).some((Ce)=>Ce.startsWith("$")||D.declarations.has(Ce)||D.props.has(Ce)))return;Sn(D,ve.left,ve.right,void 0),D.reactiveDeclarations.add(ve)}else if(ve?.left.type==="Identifier"){let{name:Ee}=ve.left;if(Ee.startsWith("$")&&!Ee.startsWith("$$")||D.declarations.has(Ee)||D.props.has(Ee))return;D.declarations.set(Ee,ve.right),D.reactiveDeclarations.add(ve)}}function Jm(D,H,X){switch(D?.type){case"ExpressionTag":{let Y=X.at(-1),ce=X.at(-2);return!(Y?.type==="Attribute"&&(ce?.type==="Component"||ce?.type==="SvelteComponent"||ce?.type==="SvelteSelf"||ce?.type==="SlotElement"))}case"IfStatement":case"IfBlock":case"ConditionalExpression":return D.test===H;case"UnaryExpression":return D.operator==="!"||D.operator==="typeof";case"BinaryExpression":return["===","!==","==","!="].includes(D.operator);case"ClassDirective":return!0;default:return!1}}function Zm(D,H){switch(D?.type){case"AssignmentExpression":return D.left===H;case"UpdateExpression":case"BindDirective":return!0;case"UnaryExpression":return D.operator==="delete";case"CallExpression":case"NewExpression":return D.callee===H;default:return!1}}function ey(D){let H=D[D.length-1];for(let X=D.length-2;X>=0;X--){let Y=D[X];switch(Y.type){case"VariableDeclarator":return Y.id===H&&H!==D[D.length-1];case"Property":if(Y.value!==H||D[X-1]?.type!=="ObjectPattern")return!1;break;case"AssignmentPattern":if(Y.left!==H)return!1;break;case"RestElement":case"ObjectPattern":case"ArrayPattern":break;default:return!1}H=Y}return!1}var ks=new Set(["includes","some","every"]);function ty(D,H){if(D?.type!=="CallExpression"||D.callee!==H||H.type!=="MemberExpression"||H.computed||H.property.type!=="Identifier"||!ks.has(H.property.name)||D.arguments.length!==1)return;let{name:X}=H.property;return X==="includes"||oa(D.arguments[0])?X:void 0}function oa(D){if(D.type!=="ArrowFunctionExpression"&&D.type!=="FunctionExpression"||D.async||D.generator||D.params.length>1)return!1;let H=!0;return ti(D.body,(X)=>{switch(X.type){case"AssignmentExpression":case"UpdateExpression":case"CallExpression":case"NewExpression":case"AwaitExpression":case"YieldExpression":case"TaggedTemplateExpression":case"ThisExpression":H=!1;break;case"UnaryExpression":if(X.operator==="delete")H=!1;break}}),H&&la(D)!==void 0}function la(D){if(D.body.type!=="BlockStatement")return D.body;let[H]=D.body.body;return D.body.body.length===1&&H.type==="ReturnStatement"?H.argument??void 0:void 0}function iy(D,H){return D?.type==="AssignmentExpression"&&D.left===H||D?.type==="UpdateExpression"||D?.type==="BindDirective"}function ny(D){let H=new Map,X=(ve)=>{let Ee=H.get(ve);if(!Ee)Ee={full:!1,paths:[]},H.set(ve,Ee);return Ee},Y=[],ce=new Set,we=new Set,ke=[];f(D,{enter(ve,Ee,Ce){if(ke.push(ve),ve.type==="EachBlock"&&ve.expression.type==="Identifier"&&ve.context){let Oe=ve.expression.name;for(let[qe,He]of Vi(ve.context,[]))Y.push([Oe,qe,He])}if(ve.type!=="Identifier"||!b(ve,Ee))return;if(ve.name==="$$props"){let Oe=ws(Ee);X(Oe===void 0?"*":`$$props.${Oe}`).full=!0;return}if(Ee?.type==="VariableDeclarator"&&Ce==="id"||ey(ke)||Ee?.type==="ExportSpecifier"||Ee?.type==="EachBlock"&&(Ce==="expression"||Ce==="context"))return;let Ae=[],_e=ve,Ne=ke.length-1;for(;;){let Oe=ke[Ne-1];if(Oe?.type!=="MemberExpression"||Oe.object!==_e)break;Ae.push(ws(Oe)??"*"),_e=Oe,Ne--}let $e=ke[Ne-1],De=_e!==ve?ty($e,_e):void 0;if($e?.type==="AssignmentExpression"&&$e.left===ve)ce.add(ve.name),we.add(ve.name);else if(De)X(ve.name).paths.push([...Ae.slice(0,-1),`()${De}`]);else if(Zm($e,_e)){if(X(ve.name).full=!0,_e===ve&&iy($e,ve))ce.add(ve.name)}else if(Ae.length>0)X(ve.name).paths.push(Ae);else if(!Jm($e,_e,ke.slice(0,Math.max(0,Ne-1))))X(ve.name).full=!0},leave(){ke.pop()}});for(let[,ve]of Y)if(we.has(ve))X(ve).full=!0;for(let[ve,Ee,Ce]of Y.reverse()){let Ae=H.get(Ee);if(!Ae)continue;let _e=X(ve);if(!Ce){_e.paths.push(["[]"]);continue}if(ce.has(Ee))_e.paths.push(["[]",...Ce].slice(0,-1));if(Ae.full)_e.paths.push(["[]",...Ce]);for(let Ne of Ae.paths)_e.paths.push(["[]",...Ce,...Ne])}return H}function Vi(D,H){switch(D.type){case"Identifier":return[[D.name,H]];case"AssignmentPattern":return Vi(D.left,H);case"RestElement":return Vi(D.argument,null);case"ObjectPattern":return D.properties.flatMap((X)=>{if(X.type!=="Property")return Vi(X,null);let Y=A(X);return Vi(X.value,H&&Y!==void 0?[...H,Y]:null)});case"ArrayPattern":return D.elements.flatMap((X,Y)=>X?Vi(X,H&&[...H,String(Y)]):[]);default:return m(D).map(({name:X})=>[X,null])}}function ws(D){if(D?.type!=="MemberExpression")return;let{property:H,computed:X}=D;if(!X&&H.type==="Identifier")return H.name;return X&&H.type==="Literal"&&typeof H.value==="string"?H.value:void 0}function sy(D,H){if(H.type!=="ObjectPattern"){yi(D,H,"holds every prop (`$props()`)");return}for(let X of H.properties){if(X.type==="RestElement"){if(yi(D,X.argument,"is the rest of `$props()`"),X.argument.type==="Identifier")D.restPropsName=X.argument.name;continue}if(X.computed){yi(D,X.value,"has a computed `$props()` key");continue}let Y=A(X),{value:ce}=X,[we,ke]=ce.type==="AssignmentPattern"?[ce.left,ce.right]:[ce,null];if(Y===void 0||we.type!=="Identifier"){yi(D,ce,"is a nested `$props()` pattern");continue}let ve=D.scopes.bindingOf(we);D.props.set(we.name,ve?ve.initial:ke),D.propNames.set(we.name,Y)}}function ry(D){let H=[...D.instance.declarations.values()];if(D.module!==D.instance)H.push(...D.module.declarations.values());return H}function Fi(D,H){if(D?.type==="Literal")return typeof D.value==="string"?D.value:void 0;if(D?.type!=="Identifier")return;let X=H.scopes.bindingOf(D);if(!X||!Wi(X,H))return;let Y=H.importedStrings.get(D.name);if(Y!==void 0)return Y;let ce=ra(H,D)?.declarator.init;return ce?.type==="Literal"&&typeof ce.value==="string"?ce.value:void 0}function Wi(D,H){return D.scope===H.scopes.instance||D.scope===H.scopes.module}var mt=Symbol("object"),Mt=Symbol("empty array"),e=Symbol("unknown");var ay=new Map([!0,!1,null,void 0,"",mt,Mt].map((D)=>[D,new Set([D])]));function t(...D){return D.length===1&&ay.get(D[0])||new Set(D)}var n=t(void 0),qi=t(!0,!1),pp=t();function r(D,H){if(D===e||H===e)return e;if(H.size===0)return D;if(D.size===0)return H;let X=new Set([...D,...H]);return X.size>32?e:X}function bt(D,H){if(D===e)return e;if(D.size===1){let[Y]=D;return H(Y)}let X=new Set;for(let Y of D){let ce=H(Y);if(ce===e)return e;for(let we of ce)X.add(we);if(X.size>32)return e}return X}function ca(D,H){if(D===e||D.size===0)return!1;for(let X of D)if(!H(X))return!1;return!0}function d(D){return typeof D==="object"&&D!==null&&D.kind!=="store"}function zi(D){return typeof D==="object"&&D!==null&&D.kind==="store"}function a(D){return D===mt||D===Mt||d(D)||zi(D)}function kn(D){return D===Mt||d(D)}var pa=32,oy=1e4,ly=new Map,cy=new Map,fp=new WeakMap,py=0;function dp(D,H,X){let Y=D.get(H);if(!Y){if(D.size>=oy)D.clear();Y=X(),D.set(H,Y)}return Y}function gi(D){if(D===e)return"?";return[...D].map((H)=>{if(d(H))return`#${fp.get(H)}`;if(zi(H))return`$(${gi(H.value)})`;if(H===mt)return"o";if(H===Mt)return"[]";return typeof H==="string"?JSON.stringify(H):String(H)}).sort().join("|")}function mp(D,H){return D===H||gi(D)===gi(H)}function En(D){let H=D.kind==="object"?`{${[...D.props].map(([X,Y])=>`${JSON.stringify(X)}:${gi(Y)}`).sort().join(",")}}`:`[${D.elements.map(gi).join(",")}]`;return dp(ly,H,()=>(fp.set(D,py++),D))}function Es(D){let H=D!==e&&[...D].some(a)?e:D;return t(dp(cy,gi(H),()=>({kind:"store",value:H})))}var up=/^(?:0|[1-9]\d*)$/,uy=new Set(Object.getOwnPropertyNames(Object.prototype));function Ki(D,H){if(typeof D==="string"&&H==="length")return t(D.length);if(D===Mt){if(H==="length")return t(0);return up.test(H)?n:e}if(!d(D))return e;if(D.kind==="array"){if(H==="length")return t(D.elements.length);if(!up.test(H))return e;return D.elements[Number(H)]??n}let X=D.props.get(H);if(X)return X;return uy.has(H)?e:n}function Cs(D){return bt(D,(H)=>{if(H===Mt)return pp;if(d(H)&&H.kind==="array")return H.elements.reduce(r,pp);return e})}function Gi(D){return ca(D,(H)=>H===Mt)}function As(D){return a(D)||Boolean(D)}function Ct(D){return D===null||D===void 0}function At(D){if(D===e||D.size===0)return"either";let H=0;for(let X of D)if(As(X))H++;if(H===D.size)return"truthy";return H===0?"falsy":"either"}function Cn(D){return ca(D,(H)=>!Ct(H))}function ua(D){return ca(D,Ct)}var hp=new Map([["===",(D,H)=>D===H],["!==",(D,H)=>D!==H],["==",(D,H)=>D==H],["!=",(D,H)=>D!=H]]),hy=new Map([["<",(D,H)=>D<H],[">",(D,H)=>D>H],["<=",(D,H)=>D<=H],[">=",(D,H)=>D>=H]]);function Hi(D,H,X){if(H===e||X===e)return e;return bt(H,(Y)=>bt(X,(ce)=>{if(a(Y)||a(ce)){let ve=a(Y)?ce:Y;if(!hp.has(D)||a(ve)||D.length===2&&!Ct(ve))return e;return t(D.startsWith("!"))}let we=hy.get(D);if(we){if(!(typeof Y==="number"&&typeof ce==="number")&&!(typeof Y==="string"&&typeof ce==="string"))return e;return t(we(Y,ce))}let ke=hp.get(D);if(ke)return t(ke(Y,ce));if(D==="+"&&(typeof Y==="string"||typeof ce==="string"))return t(String(Y)+String(ce));return e}))}function yp(D){return bt(D,(H)=>{if(H===mt)return t("object","function");return t(a(H)||H===null?"object":typeof H)})}function Xi(D){return bt(D,(H)=>a(H)?e:t(String(H)))}function gp(D){if(D===e)return"dynamic";return[...D].map((H)=>{if(H===mt)return"object";if(H===Mt)return"[]";if(d(H)||zi(H))return H.kind;return H===void 0?"undefined":JSON.stringify(H)}).sort().join(", ")}function Ti(D,H){return D.open||D.eventsUnknown||D.events.has(H)}function ii(D=!1){return{open:D,props:new Map,omitted:new Set,slots:new Map,slotsUnknown:!1,siteCount:0,appSites:[],unknownBecause:new Map,events:new Set,eventsUnknown:!1}}function xp(D,H){if(D===H)return!0;if(D===void 0||H===void 0||D===e||H===e)return!1;if(D.size!==H.size)return!1;for(let X of D)if(!H.has(X))return!1;return!0}function Ns(D,H){if(D.open)return D;if(H.customElement)return{...D,open:!0,reason:"is a custom element"};let{instance:X}=D;if(X===void 0)return D;let Y=new Set(H.propNames.values());if(X===null||[...X].some((ce)=>Y.has(ce)||ce==="$on"))return{...D,open:!0,reason:"is bound with `bind:this`, and its instance may set its props"};return D}function fy(D,H){if(!D.children||H!==void 0&&H<5)return D.props;let X=new Map(D.props);return X.set("children",H===void 0?r(D.props.get("children")??n,t(mt)):t(mt)),X}function An(D,H,X,Y){let ce=D.siteCount===0,we=fy(H,Y);if(H.location)D.appSites.push(H);if(H.open&&!D.open)D.open=!0,D.openReason=H.reason,ce=!0;for(let[ve,Ee]of H.why??[]){if(D.unknownBecause.has(ve))continue;let Ce=typeof Ee==="string"?Ee:Ee();if(Ce)D.unknownBecause.set(ve,Ce)}for(let[ve,Ee]of we){let Ce=D.props.get(ve);if(D.siteCount>0&&Ce===void 0&&!D.omitted.has(ve))D.omitted.add(ve),ce=!0;let Ae=Ce===void 0?Ee:r(Ce,Ee);if(!xp(Ce,Ae))D.props.set(ve,Ae),ce=!0}let ke=(ve)=>{if(!(we.has(ve)||D.omitted.has(ve)))D.omitted.add(ve),ce=!0};for(let ve of X)ke(ve);for(let ve of D.props.keys())ke(ve);if(!H.events){if(!D.eventsUnknown)ce=!0;D.eventsUnknown=!0}else for(let ve of H.events){if(D.events.has(ve))continue;D.events.add(ve),ce=!0}if(H.slots===null){if(!D.slotsUnknown)ce=!0;D.slotsUnknown=!0}else{let ve=new Set([...D.slots.keys(),...H.slots]);for(let Ee of ve){let Ce=D.slots.get(Ee),Ae=Ce??(D.siteCount>0?t(void 0):t()),_e=r(Ae,t(H.slots.has(Ee)?!0:void 0));if(!xp(Ce,_e))D.slots.set(Ee,_e),ce=!0}}return D.siteCount++,ce}var dy=new Map,my=new Map;function ni(D,H,X,Y={}){return{model:D,usage:H,context:X,memo:new Map,pending:new Set,locals:dy,imported:Y.imported??my,svelteMajor:Y.svelteMajor}}function _s(D,H){let X=H.model.scopes.bindingOf(D);return X&&!Wi(X,H.model)?X:void 0}function Is(D,H){return H.propNames.get(D)??D}function yy(D,H){let X=_s(D,H);if(!X)return ma(D.name,H);if(X.name!==D.name)return e;return H.locals.get(X)??vy(X,H)}function gy(D,H){let{declaration:X}=D;switch(X.type){case"VariableDeclarator":{let{init:Y}=X;return D.kind==="const-tag"&&Y?{pattern:X.id,value:(ce)=>i(Y,ce)}:void 0}case"EachBlock":{let{context:Y,expression:ce}=X;return D.kind==="each"&&Y?{pattern:Y,value:(we)=>Cs(i(ce,we))}:void 0}case"SnippetBlock":{if(D.kind!=="snippet-param"||!D.node)return;let{node:Y}=D,ce=X.parameters.findIndex((ke)=>ke.start<=Y.start&&Y.end<=ke.end),we=xy(X,H);if(ce<0||!we)return;return{pattern:X.parameters[ce],value:(ke)=>{let ve=t();for(let Ee of we){let Ce=Ee.arguments[ce];if(Ce?.type==="SpreadElement")return e;if(ve=r(ve,Ce?i(Ce,ke):n),ve===e)return e}return ve}}}default:return}}var vp=new WeakMap;function xy(D,H){let X=vp.get(D);if(X!==void 0)return X;let Y=H.scopes.bindingOf(D.expression),ce=Y?.scope.node?.type,we=[];if(!Y||ce===void 0||ce==="Component"||ce.startsWith("Svelte"))we=null;else for(let{node:ke,parent:ve}of Y.references){if(ve.type!=="CallExpression"||ve.callee!==ke){we=null;break}we.push(ve)}return vp.set(D,we),we}function vy(D,H){let X=gy(D,H.model),Y=`#nested:${D.node?.start}`;if(!X||H.pending.has(Y))return e;H.pending.add(Y);try{let ce=X.value(H);if(X.pattern!==D.node){let we=new Map;xi(X.pattern,ce,we,H),ce=we.get(D)??e}return D.kind==="each"?ce:Cp(ce,D.name,H.model)}finally{H.pending.delete(Y)}}function ma(D,H){if(D==="undefined")return n;let{model:X}=H;if(X.unknownNames.has(D))return e;let Y=H.memo.get(D);if(Y!==void 0)return Y;if(H.pending.has(D))return e;H.pending.add(D);let ce;try{ce=Cp(by(ky(D,H),D,H),D,X)}finally{H.pending.delete(D)}return H.memo.set(D,ce),ce}function by(D,H,X){let Y=X.model.guardedWrites.get(H);if(!Y||D===e)return D;for(let ce of Ep(Y,X)){let we=i(ce.value,X);if(we===e||[...we].some(a))return e;D=r(D,we)}return D}function Ep(D,H){return D.filter(({guards:X})=>X.every(({test:Y,holds:ce})=>{let we=At(i(Y,H));return we==="either"||we==="truthy"===ce}))}function Cp(D,H,X){if(D===e||![...D].some(kn))return D;let Y=X.escapes.get(H);return!X.escapes.get("*")?.full&&!X.escapes.get(`$$props.${Is(H,X)}`)?.full&&!Y?.full&&!(Y?.paths??[]).some((we)=>Sy(D,we))?D:Ap(D)}function Ap(D){return bt(D,(H)=>t(kn(H)?mt:H))}function Sy(D,H){let X=D;for(let Y of H)if(X=Y==="[]"?Cs(X):Y==="*"?bt(X,wy):Y.startsWith("()")?bt(X,(ce)=>ga(ce)||typeof ce==="string"?t():e):bt(X,(ce)=>Ct(ce)?n:Ki(ce,Y)),X===e)return!0;return X===e||[...X].some((Y)=>a(Y)&&!zi(Y))}function wy(D){if(Ct(D))return n;if(!d(D))return e;let H=n;for(let X of D.kind==="object"?D.props.values():D.elements)H=r(H,X);return H}function Yi(D,H){let X=Cs(i(D.expression,H)),Y=H.locals,ce=new Map(Y);return xi(D.context,X,ce,H),H.locals=ce,()=>{H.locals=Y}}function xi(D,H,X,Y){switch(D?.type){case"Identifier":{let ce=Y.model.scopes.bindingOf(D);if(ce)X.set(ce,H);return}case"AssignmentPattern":xi(D.left,Np(H,D.right,Y),X,Y);return;case"RestElement":xi(D.argument,e,X,Y);return;case"ObjectPattern":for(let ce of D.properties){if(ce.type!=="Property"){xi(ce,e,X,Y);continue}let we=A(ce),ke=we===void 0?e:bt(H,(ve)=>Ct(ve)?t():Ki(ve,we));xi(ce.value,ke,X,Y)}return;case"ArrayPattern":for(let[ce,we]of D.elements.entries()){if(!we)continue;let ke=bt(H,(ve)=>Ct(ve)?t():ve===Mt||d(ve)&&ve.kind==="array"?Ki(ve,String(ce)):e);xi(we,ke,X,Y)}return}}function Np(D,H,X){if(D===e||!D.has(void 0))return D;let Y=new Set(D);return Y.delete(void 0),r(Y,i(H,X))}function ky(D,H){let{model:X,usage:Y}=H;if(X.props.has(D)){if(Y.open)return e;let ke=X.props.get(D),ve=ke?i(ke,H):n,Ee=Is(D,X),Ce=Y.props.get(Ee);if(Ce===void 0)return ve;let Ae=Ce===e||Ce.has(void 0);return Y.omitted.has(Ee)||Ae?r(Ce,ve):Ce}let ce=X.declarations.get(D);if(ce===Ui)return t(mt);if(ce!==void 0)return ce?i(ce,H):n;if(X.componentImports.has(D))return t(mt);let we=H.imported.get(D);if(we&&X.otherImports.has(D))return we;if(D.startsWith("$")&&!D.startsWith("$$")&&D.length>1)return bt(ma(D.slice(1),H),(ke)=>Ct(ke)?n:zi(ke)?ke.value:e);return e}function Nn(D,H){let{name:X}=D;return(X==="$$props"||X==="$$restProps"||X===H.model.restPropsName)&&!_s(D,H)}function Tp(D,H){let{model:X,usage:Y}=D;if(Y.open)return;let we=new Set(H!=="$$props"?X.propNames.values():[]),ke=H!==X.restPropsName,ve=new Map;for(let[Ee,Ce]of Y.props){if(we.has(Ee))continue;let Ae=Y.omitted.has(Ee);if(ke&&Ee==="children"){let{svelteMajor:_e}=D;if(_e===void 0)Ae=!0;else if(_e>=5)continue}ve.set(Ee,{value:Ce,maybeAbsent:Ae,why:Y.unknownBecause.get(Ee)})}return ve}function Qi(D,H){if(D.type==="Identifier"&&Nn(D,H))return Tp(H,D.name);return Ey(i(D,H))}function Ey(D){if(D===e||D.size===0)return;let H=[];for(let Y of D)if(Ct(Y))H.push(new Map);else if(d(Y)&&Y.kind==="object")H.push(Y.props);else return;let X=new Map;for(let Y of H)for(let[ce,we]of Y){let ke=X.get(ce);X.set(ce,{value:ke?r(ke.value,we):we,maybeAbsent:!1})}for(let[Y,ce]of X)ce.maybeAbsent=H.some((we)=>!we.has(Y));return X}var Cy=8,Ay=/[\\/]/,bp=40;function ha(D,H){let{start:X,end:Y}=D,ce=H.model.code.slice(X,Y).replace(/\s+/g," ");return ce.length>bp?`${ce.slice(0,bp-1)}…`:ce}function ya(D,H,X=0){if(X>Cy||i(D,H)!==e)return;let Y=(ce)=>ce?ya(ce,H,X+1):void 0;switch(D.type){case"Identifier":{let ce=_s(D,H);if(!ce)return Ty(D.name,H,X);let we=ce.name===D.name&&ce.kind==="const-tag"&&ce.declaration.type==="VariableDeclarator"&&ce.declaration.init,ke=we&&Y(we);return ke?`\`${D.name}\`: ${ke}`:`\`${D.name}\` ${Ny[ce.kind]??"is declared in a nested scope"}`}case"CallExpression":{let{callee:ce}=D,we=Ps(D,H)?D.arguments:ce.type==="MemberExpression"&&!ce.computed&&ce.property.type==="Identifier"&&ks.has(ce.property.name)?[ce.object]:[];for(let ke of we){let ve=Y(ke);if(ve)return ve}return`calls \`${ha(D.callee,H)}()\``}case"MemberExpression":return`reads \`${ha(D,H)}\``;case"TemplateLiteral":for(let ce of D.expressions){let we=Y(ce);if(we)return we}break;case"BinaryExpression":case"LogicalExpression":return Y(D.left)??Y(D.right);case"ConditionalExpression":return Y(D.test)??Y(D.consequent)??Y(D.alternate);case"UnaryExpression":return Y(D.argument);case"ChainExpression":return Y(D.expression)}return`\`${ha(D,H)}\` isn't read by the analysis`}function $s(D,H){let X=H.locals;return()=>{let Y=H.locals;H.locals=X;try{return ya(D,H)}finally{H.locals=Y}}}var Ny={param:"is a parameter","snippet-param":"is a snippet parameter",each:"is an `{#each}` item the analysis can't read","each-index":"is an `{#each}` index","let-directive":"comes from a slot (`let:`)","const-tag":"is declared by `{@const}`","await-value":"is what an `{#await}` resolves to","await-error":"is what an `{#await}` rejects with"};function Ty(D,H,X){let{model:Y,usage:ce}=H,we=Y.key.split(Ay).pop()??Y.key,ke=Y.unknownReasons.get(D);if(ke)return`\`${D}\` ${ke}`;let ve=Y.guardedWrites.get(D),Ee=ve&&Ep(ve,H)[0];if(Ee&&ma(D,H)===e)return`\`${D}\` is assigned at line ${Ee.line}`;if(Y.props.has(D)){if(ce.open)return`\`${D}\` is a prop of ${we}, which is rendered with any props${ce.openReason?` (${ce.openReason})`:""}`;let Ae=ce.unknownBecause.get(Is(D,Y));return Ae?`\`${D}\` comes from ${Ae}`:`\`${D}\` is passed a value the analysis can't read`}let Ce=Y.declarations.get(D);if(Ce&&Ce!==Ui){let Ae=ya(Ce,H,X+1);if(Ae)return`\`${D}\`: ${Ae}`}if(Y.otherImports.has(D))return`\`${D}\` is imported`;if(D.startsWith("$")&&!D.startsWith("$$"))return`\`${D}\` reads a store`;return`\`${D}\` isn't declared in ${we}`}function _p(D,H){let X=At(D);return X==="either"?qi:t(X==="truthy"!==H)}function i(D,H){let X=j(D);if(X!==D)return i(X,H);switch(D.type){case"Literal":return"regex"in D&&D.regex?t(mt):typeof D.value==="bigint"?e:t(D.value);case"Identifier":return yy(D,H);case"TemplateLiteral":{let Y=t(D.quasis[0].value.cooked??"");for(let[ce,we]of D.expressions.entries())Y=Hi("+",Hi("+",Y,Xi(i(we,H))),t(D.quasis[ce+1].value.cooked??""));return Y}case"LogicalExpression":{let Y=()=>i(D.right,H);return bt(i(D.left,H),(ce)=>{if(D.operator==="&&")return As(ce)?Y():t(ce);if(D.operator==="||")return As(ce)?t(ce):Y();return Ct(ce)?Y():t(ce)})}case"ConditionalExpression":{let Y=At(i(D.test,H));if(Y==="truthy")return i(D.consequent,H);if(Y==="falsy")return i(D.alternate,H);return r(i(D.consequent,H),i(D.alternate,H))}case"UnaryExpression":switch(D.operator){case"void":return n;case"typeof":return yp(i(D.argument,H));case"!":return _p(i(D.argument,H),!0);default:return e}case"BinaryExpression":return Hi(D.operator,i(D.left,H),i(D.right,H));case"SequenceExpression":return i(D.expressions[D.expressions.length-1],H);case"CallExpression":return _y(D,H);case"MemberExpression":return Fy(D,H);case"ChainExpression":return i(D.expression,H);case"ArrayExpression":if(D.elements.length===0)return t(Mt);if(D.elements.length>pa||D.elements.some((Y)=>Y?.type==="SpreadElement"))return t(mt);return t(En({kind:"array",elements:D.elements.map((Y)=>Y?i(Y,H):n)}));case"ObjectExpression":return jy(D,H);case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":return t(mt);default:return e}}function _y(D,H){let{callee:X,arguments:Y}=D,ce=Ps(D,H);if(ce)return Iy(D,ce,H);if(X.type!=="Identifier"||H.model.unknownNames.has(X.name)||_s(X,H))return e;let[we]=Y,ke=()=>we&&we.type!=="SpreadElement"?i(we,H):e;switch(X.name){case"Boolean":return _p(ke(),!1);case"String":return Xi(ke());case"getContext":{let Ce=Fi(we,H.model);return Ce===void 0?e:H.context(Ce)}}if(H.model.storeImports.get(X.name)==="readable"&&Y.length<=1)return Es(we?ke():n);let ve=Vy(X.name,H);if(ve)return wp(ve,Y,H,H);let Ee=H.model.importedHelpers.get(X.name)?.();if(!Ee)return e;return wp(Ee.fn,Y,H,ni(Ee.model,ii(),()=>e))}var Ip=new Map([["abs",Math.abs],["ceil",Math.ceil],["floor",Math.floor],["max",Math.max],["min",Math.min],["round",Math.round],["sign",Math.sign],["trunc",Math.trunc]]),ga=(D)=>D===Mt||d(D)&&D.kind==="array";function Ps(D,H){let{callee:X}=D;if(X.type!=="MemberExpression"||X.computed||X.optional||X.property.type!=="Identifier"||D.arguments.some((ke)=>ke.type==="SpreadElement"))return;let Y=X.property.name,{object:ce}=X;if(ce.type==="Identifier"){let ke=!H.model.scopes.bindingOf(ce);if(ke&&ce.name==="Array"&&Y==="isArray")return{kind:"isArray",name:Y};if(ke&&ce.name==="Math"&&Ip.has(Y))return{kind:"math",name:Y}}if(!ks.has(Y))return;if(ce.type==="Super"||D.arguments.length!==1)return;if(Y!=="includes"&&!oa(D.arguments[0]))return;let we=i(ce,H);if(we===e||![...we].every((ke)=>ga(ke)||Y==="includes"&&typeof ke==="string"))return;return{kind:Y,arrays:[...we]}}function Iy(D,H,X){let Y=D.arguments;switch(H.kind){case"isArray":{let ce=Y[0]?i(Y[0],X):n;return bt(ce,(we)=>ga(we)?t(!0):we===mt?qi:t(!1))}case"math":return My(Ip.get(H.name),Y.map((ce)=>i(ce,X)));case"includes":{let ce=i(Y[0],X);if(ce===e)return e;let we=t();for(let ke of H.arrays)we=r(we,typeof ke==="string"?Ry(ke,ce):Ly(Sp(ke),ce));return we}case"some":case"every":{let ce=Y[0],we=la(ce),[ke]=ce.params,ve=H.kind==="some"?"truthy":"falsy",Ee=t();for(let Ce of H.arrays){let Ae=!1,_e=!1;for(let Ne of Sp(Ce)){let $e=$y(X,ke,Ne,()=>At(i(we,X)));if($e===ve)Ae=!0;else if($e==="either")_e=!0}Ee=r(Ee,Ae?t(H.kind==="some"):_e?qi:t(H.kind==="every"))}return Ee}}}function Sp(D){return d(D)&&D.kind==="array"?D.elements:[]}function $y(D,H,X,Y){let ce=D.locals,we=new Map(ce);if(H)xi(H,X,we,D);D.locals=we;try{return Y()}finally{D.locals=ce}}var Py=32;function My(D,H){let X=[[]];for(let Y of H){if(Y===e)return e;let ce=[];for(let we of Y){if(typeof we!=="number")return e;for(let ke of X)ce.push([...ke,we])}if(ce.length>Py)return e;X=ce}return t(...X.map((Y)=>D(...Y)))}function Ry(D,H){return bt(H,(X)=>typeof X==="string"?t(D.includes(X)):e)}function Ly(D,H){return bt(H,(X)=>{if(a(X))return qi;let Y=!1;for(let ce of D){if(ce===e){Y=!0;continue}let we=[...ce].filter((ke)=>!a(ke)&&Oy(ke,X));if(we.length===ce.size)return t(!0);if(we.length>0)Y=!0}return Y?qi:t(!1)})}function Oy(D,H){return D===H||Number.isNaN(D)&&Number.isNaN(H)}function Vy(D,H){let{model:X,usage:Y}=H,ce;if(X.props.has(D)){if(Y.open||Y.props.has(Is(D,X)))return;ce=X.props.get(D)}else{let we=X.declarations.get(D);ce=we===Ui?X.functions.get(D):we}if((ce?.type==="ArrowFunctionExpression"||ce?.type==="FunctionExpression"||ce?.type==="FunctionDeclaration")&&!ce.async&&!ce.generator)return ce;return}var Dy=8,da=0;function wp(D,H,X,Y){if(H.some((Ce)=>Ce.type==="SpreadElement"))return e;let ce=`call:${Y.model.key}:${D.start}`;if(Y.pending.has(ce)||da>=Dy)return e;let we=H.map((Ce)=>i(Ce,X)),ke=`${ce}(${we.map(gi).join(",")})`,ve=X.memo.get(ke);if(ve!==void 0)return ve;let Ee=By(D,we,Y,ce);return X.memo.set(ke,Ee),Ee}function By(D,H,X,Y){let ce=X.locals,we=new Map(ce);X.locals=we,X.pending.add(Y),da++;try{for(let[ve,Ee]of D.params.entries()){let Ce=H[ve]??n;if(!Ts(Ee,Ce,we,X))return e}if(D.body.type!=="BlockStatement")return i(D.body,X);let ke=t();for(let ve of D.body.body)switch(ve.type){case"ReturnStatement":return r(ke,fa(ve,X));case"VariableDeclaration":{if(ve.kind!=="const")return e;for(let Ee of ve.declarations)if(!Ee.init||!Ts(Ee.id,i(Ee.init,X),we,X))return e;break}case"IfStatement":{let Ee=kp(ve.consequent),Ce=ve.alternate?kp(ve.alternate):null;if(!Ee||Ce===void 0)return e;let Ae=At(i(ve.test,X));if(Ae!=="falsy"){if(ke=r(ke,fa(Ee,X)),Ae==="truthy")return ke}if(Ce)return r(ke,fa(Ce,X));break}default:return e}return r(ke,n)}finally{da--,X.pending.delete(Y),X.locals=ce}}function kp(D){if(D.type==="ReturnStatement")return D;if(D.type==="BlockStatement"&&D.body.length===1){let[H]=D.body;if(H.type==="ReturnStatement")return H}return}function fa(D,H){return D.argument?i(D.argument,H):n}function Ts(D,H,X,Y){switch(D.type){case"Identifier":{let ce=Y.model.scopes.bindingOf(D);if(!ce)return!1;return X.set(ce,Ap(H)),!0}case"AssignmentPattern":return Ts(D.left,Np(H,D.right,Y),X,Y);case"ObjectPattern":for(let ce of D.properties){if(ce.type!=="Property"||ce.computed||ce.key.type!=="Identifier")return!1;let we=ce.key.name,ke=bt(H,(ve)=>Ct(ve)?t():Ki(ve,we));if(!Ts(ce.value,ke,X,Y))return!1}return!0;default:return!1}}function Fy(D,H){let{object:X,property:Y,computed:ce,optional:we}=D;if(X.type==="Identifier"){if(X.name==="$$slots"&&!ce&&Y.type==="Identifier"){let{usage:Ce}=H;if(Ce.open||Ce.slotsUnknown)return e;return Ce.slots.get(Y.name)??n}if(Nn(X,H)){let Ce=ws(D);if(Ce===void 0)return e;let Ae=Tp(H,X.name);if(!Ae)return e;let _e=Ae.get(Ce);if(!_e)return n;return _e.maybeAbsent?r(_e.value,n):_e.value}}if(X.type==="Super")return e;let ke=i(X,H);if(we&&ke!==e&&ke.size===1&&ke.has(void 0))return n;let ve=ce?Uy(i(Y,H)):Y.type==="Identifier"?[Y.name]:void 0;if(ve===void 0)return e;let Ee=aa.has(D);return bt(ke,(Ce)=>{if(we&&Ct(Ce))return n;if(Ee&&Ct(Ce))return t();let Ae=t();for(let _e of ve)Ae=r(Ae,Ki(Ce,_e));return Ae})}function Uy(D){if(D===e)return;let H=[];for(let X of D){if(a(X))return;H.push(String(X))}return H.length>0?H:void 0}function jy(D,H){if(D.properties.length>pa)return t(mt);let X=new Map;for(let Y of D.properties){if(Y.type!=="Property"||Y.kind!=="init")return t(mt);let ce=A(Y);if(ce===void 0||ce==="__proto__")return t(mt);X.set(ce,i(Y.value,H))}return t(En({kind:"object",props:X}))}var $p=new WeakMap;function Ms(D){let H=$p.get(D);if(!H)H=Wy(D),$p.set(D,H);return H}function Rs(D,H){let X=new Set;for(let Y of D.reads){let{property:ce}=Y;if(!Y.computed){if(ce.type!=="Identifier")return null;X.add(ce.name);continue}let we=i(ce,H);if(we===e)return null;for(let ke of we){if(typeof ke==="symbol"||typeof ke==="object"&&ke!==null)return null;X.add(String(ke))}}return X}function Wy(D){let H=new Map,{ast:X,scopes:Y}=D,we=[...X.module?.content.body??[],...X.instance?.content.body??[]].flatMap((ve)=>ve.type==="VariableDeclaration"&&ve.kind==="const"?ve.declarations:[]);if(we.length===0)return H;let ke=new Set;if(f(X.fragment,{enter(ve){if(ve.type==="SvelteComponent")ke.add(ve.expression)}}),ke.size===0)return H;for(let{id:ve,init:Ee}of we){if(ve.type!=="Identifier"||Ee?.type!=="ObjectExpression")continue;let Ce=new Map,Ae=new Map,Ne=Ee.properties.every((Oe)=>{if(Oe.type!=="Property"||Oe.kind!=="init"||Oe.computed||Oe.method||Oe.value.type!=="Identifier")return!1;let{key:qe,value:He}=Oe,Ze=qe.type==="Identifier"?qe.name:qe.type==="Literal"&&(typeof qe.value==="string"||typeof qe.value==="number")?String(qe.value):void 0,Ye=D.componentImports.get(He.name);if(Ze===void 0||Ze==="__proto__"||Ce.has(Ze)||Ye===void 0||Y.bindingOf(He)?.kind!=="import")return!1;return Ce.set(Ze,Ye),Ae.set(Ze,Oe),!0})?Y.bindingOf(ve):null;if(!Ne||Ne.references.length===0)continue;let $e=[];if(Ne.references.every(({parent:Oe,node:qe})=>{if(Oe.type!=="MemberExpression"||Oe.object!==qe||!ke.has(Oe))return!1;return $e.push(Oe),!0}))H.set(Ee,{entries:Ce,properties:Ae,reads:$e})}return H}function qy(D){return bt(D,(H)=>Ct(H)?t(""):a(H)?e:t(String(H)))}function Ji(D,H){let{tokens:X}=H;if(!X||!D.includes(X.marker))return;for(let Y of X.text(D))if(Y.endsWith("-"))H.prefixes.add(Y);else H.classes.add(Y)}function Q(D,H,X){let Y={classes:new Set,prefixes:new Set,childSites:[],tokens:K(H.spec),library:H,calls:X},{ast:ce}=D.model;for(let we of[ce.module,ce.instance,ce.fragment])if(we)Vt(we,D,Y);return Y}function Pp(D,H,X){for(let Y of D)Vt(Y,H,X)}function Vt(D,H,X){switch(D.type){case"ImportDeclaration":return;case"Literal":if(typeof D.value==="string")Ji(D.value,X);return;case"TemplateLiteral":{let Y=X.tokens?.marker;if(Y!==void 0&&D.quasis.some((ce)=>ce.value.raw.includes(Y))){let ce=i(D,H);if(ce!==e){for(let we of ce)if(typeof we==="string")Ji(we,X);Pp(D.expressions,H,X);return}}break}case"Attribute":{let Y=X.tokens?.marker,ce=Array.isArray(D.value)?D.value:[];if(Y===void 0||!ce.some((ke)=>ke.type==="ExpressionTag")||!ce.some((ke)=>ke.type==="Text"&&ke.data.includes(Y)))break;let we=t("");for(let ke of ce)we=Hi("+",we,ke.type==="Text"?t(ke.data):qy(i(ke.expression,H)));if(we===e)break;for(let ke of we)if(typeof ke==="string")Ji(ke,X);for(let ke of ce)if(ke.type==="ExpressionTag")Vt(ke,H,X);return}case"TemplateElement":Ji(D.value.raw,X);return;case"Text":Ji(D.data,X);return;case"Identifier":{let Y=H.model.componentImports.get(D.name);if(Y)X.childSites.push(xa(Y));if(H.model.memberImports.has(D.name))throw new wn(`${H.model.key} uses \`${D.name}\`, an object of components, as a value`);return}case"ObjectExpression":{let Y=Ms(H.model).get(D);if(!Y)break;let ce=Rs(Y,H);for(let[we,ke]of Y.entries)if(!ce||ce.has(we))X.childSites.push(xa(ke));return}case"MemberExpression":{let{object:Y,property:ce}=D;if(Y.type!=="Identifier")break;let we=H.model.memberImports.get(Y.name);if(!we||D.computed||ce.type!=="Identifier")break;let ke=Oi(we,[ce.name]);if(ke.kind==="component")X.childSites.push(xa(ke.key));else if(ke.kind!=="value")throw new wn(`${H.model.key} uses \`${Y.name}.${ce.name}\`, which couldn't be resolved, as a value`);return}case"LogicalExpression":{Vt(D.left,H,X);let Y=i(D.left,H),ce=At(Y);if(!(D.operator==="&&"&&ce==="falsy"||D.operator==="||"&&ce==="truthy"||D.operator==="??"&&Cn(Y)))Vt(D.right,H,X);return}case"ConditionalExpression":case"IfStatement":case"IfBlock":{Vt(D.test,H,X);let Y=At(i(D.test,H));if(Y!=="falsy")Vt(D.consequent,H,X);if(Y!=="truthy"&&D.alternate)Vt(D.alternate,H,X);return}case"EachBlock":{if(Vt(D.expression,H,X),!Gi(i(D.expression,H))){let Y=Yi(D,H);try{if(D.key)Vt(D.key,H,X);Vt(D.body,H,X)}finally{Y()}}if(D.fallback)Vt(D.fallback,H,X);return}case"ClassDirective":{if(Vt(D.expression,H,X),At(i(D.expression,H))!=="falsy")Ji(D.name,X);return}case"Component":{let Y=zy(D.name,H,X.library);if(!Y)break;let ce=Mp(D,Y,H);if(ce.open&&ce.reason)ce.reason=`${Rp(D,H)} ${ce.reason}`;X.childSites.push(ce);break}case"SvelteSelf":X.childSites.push(Mp(D,H.model.key,H));break;case"CallExpression":if(X.calls?.watched.has(D))X.calls.call(D);break}Pp(Me(D),H,X)}function xa(D){return{component:D,open:!0,props:new Map,slots:null}}function Mp(D,H,X){return Sa(D,H,{value:(Y)=>i(Y,X),spread:(Y)=>Qi(Y,X),explain:Ky(D,X),instance:(Y)=>ba(Y,X.model.scopes),forwards:(Y)=>Ti(X.usage,Y)})}function zy(D,H,X){let{model:Y}=H,[ce,...we]=D.split("."),ke=Y.memberImports.get(ce);if(ke){let Ee=Oi(ke,we);if(Ee.kind==="component")return Ee.key;if(Ee.kind==="value")return}else{let Ee=we.length===0?Y.componentImports.get(D):void 0;if(Ee)return Ee;if(!Y.otherImports.has(ce))return}let ve=Y.packageImports.get(ce);if(ve!==void 0&&!X.isSpecifier(ve))return;throw new wn(`${Y.key} renders <${D}>, which couldn't be resolved`)}function Rp(D,H){return`${H.model.key.split("/").pop()}:${T(H.model.code,D.start).line}`}function Ky(D,H){return(X)=>{let Y=$s(X,H);return()=>{let ce=Y();return ce&&`${Rp(D,H)} ${ce}`}}}var Gy=32;function Hy(D,H){let{value:X}=D;if(X===!0)return t(!0);if(!Array.isArray(X))return H(X.expression);if(X.length===1&&X[0].type==="ExpressionTag"){let ce=H(X[0].expression);return r(ce,Xi(ce))}let Y=new Set([""]);for(let ce of X){let we=ce.type==="Text"?t(ce.data):Xi(H(ce.expression));if(we===e)return e;let ke=new Set;for(let ve of Y)for(let Ee of we)ke.add(ve+String(Ee));if(ke.size>Gy)return e;Y=ke}return Y}var Xy=/^\s*$/;function Yy(D){let H=new Set,X=[],Y=!1;for(let ce of D.nodes){if(ce.type==="Comment")continue;if(ce.type==="Text"&&Xy.test(ce.data))continue;if(ce.type==="SnippetBlock"){let{name:ve}=ce.expression;X.push(ve),H?.add(ve==="children"?"default":ve);continue}let we="attributes"in ce?ce.attributes.find((ve)=>ve.type==="Attribute"&&ve.name==="slot"):void 0;if(!we){Y=!0,H?.add("default");continue}let ke=Array.isArray(we.value)?we.value:null;if(ke?.length===1&&ke[0].type==="Text")H?.add(ke[0].data);else H=null}return{slots:H,snippets:X,children:Y}}function va(D){return D.why??=new Map,D.why}function Qy(D,H){let{value:X}=D,ce=(X===!0?[]:Array.isArray(X)?X:[X]).flatMap((we)=>we.type==="Text"?[]:[H(we.expression)]);return()=>{for(let we of ce){let ke=we();if(ke)return ke}return}}var Jy=new Set(["$destroy","$on"]);function ba(D,H){if(D.type!=="Identifier")return null;let X=H.bindingOf(D);if(!X)return null;let Y=new Set;for(let{node:ce,parent:we,mutates:ke}of X.references){if(ke)return null;switch(we.type){case"BindDirective":if(we.name==="this"&&we.expression===ce)continue;return null;case"MemberExpression":{let{property:ve}=we;if(we.object!==ce||we.computed||ve.type!=="Identifier"||ve.name.startsWith("$")&&!Jy.has(ve.name))return null;Y.add(ve.name);continue}case"AssignmentExpression":if(we.left===ce&&we.operator==="=")continue;return null;case"LogicalExpression":if(we.left===ce&&we.operator==="&&")continue;return null;case"IfStatement":case"IfBlock":case"ConditionalExpression":if(we.test===ce)continue;return null;case"UnaryExpression":case"BinaryExpression":continue;default:return null}}return Y}function Sa(D,H,{value:X,spread:Y,explain:ce,instance:we,forwards:ke}){let{slots:ve,snippets:Ee,children:Ce}=Yy(D.fragment),Ae=new Set,_e={component:H,open:!1,props:new Map,slots:ve,...Ce&&{children:Ce},events:Ae};for(let Ne of D.attributes)switch(Ne.type){case"OnDirective":if(Ne.expression||ke(Ne.name))Ae.add(Ne.name);break;case"SpreadAttribute":{let $e=Y(Ne.expression);if(!$e){_e.open=!0,_e.reason="spreads props";break}for(let[De,{value:Oe,maybeAbsent:qe,why:He}]of $e){if(De==="slot"||De.startsWith("--"))continue;let Ze=_e.props.get(De);if(_e.props.set(De,qe?r(Ze??n,Oe):Oe),Oe===e&&He)va(_e).set(De,He)}break}case"Attribute":{if(Ne.name==="slot"||Ne.name.startsWith("--"))break;let $e=Hy(Ne,X);if(_e.props.set(Ne.name,$e),$e===e)va(_e).set(Ne.name,Qy(Ne,ce));break}case"BindDirective":{if(Ne.name==="this"){_e.instance=we(Ne.expression);break}_e.props.set(Ne.name,e);let $e=ce(Ne.expression);va(_e).set(Ne.name,()=>$e()??"is bound with `bind:`");break}}for(let Ne of Ee)_e.props.set(Ne,t(mt));return _e}var tg=/setContext\(\s*["']([^"']+)["']/g,ig=/\bget(?:All)?Contexts?\(/,ng=/setContext\(\s*(?!["'][^"']*["']\s*[,)])/,Lp=new Map;async function sg(D){let H=await k(D.root,D.spec.srcDir),X=Lp.get(D.src);if(X?.signature===H)return X.sources;let Y=await rg(D);return Lp.set(D.src,{signature:H,sources:Y}),Y}async function rg(D){let{src:H}=D,X={scriptTokens:new Set,componentContexts:new Set,scriptContexts:new Set,unknownScriptContext:!1,scriptReadsContext:!1,scriptContextReads:new Set},Y=await E(H),ce=await Promise.all(Y.map((we)=>Zy(eg.join(H,we),"utf8")));for(let[we,ke]of Y.entries()){let ve=ce[we],Ee=ke.endsWith(".js");if(Ee){if(K(D.spec)?.script(ve,X.scriptTokens),ig.test(ve)){let Ae=P(H,ke);if(!Ae||Ae.readsUnknownContext)X.scriptReadsContext=!0;else for(let _e of Ae.contextLeaks.keys())X.scriptContextReads.add(_e)}}for(let Ae of ve.matchAll(tg))(Ee?X.scriptContexts:X.componentContexts).add(Ae[1]);if(!ng.test(ve))continue;let Ce=Ee?P(H,ke):fe(H,ke);if(Ee&&(!Ce||Ce.providesUnknownContext))X.unknownScriptContext=!0;for(let Ae of Ce?.providedContexts??[])(Ee?X.scriptContexts:X.componentContexts).add(Ae)}return X}var ag=16;function og(D,H,X,Y,ce){let we=new Map,ke=new Map;for(let Ee of ce)ke.set(Ee,new Set(["*"]));for(let Ee of H.keys()){let Ce=D(Ee);if(Ce.readsUnknownContext)return we;for(let[Ae,_e]of Ce.contextLeaks){let Ne=ke.get(Ae)??new Set;for(let $e of _e)Ne.add($e);ke.set(Ae,Ne)}}let ve=new Set;for(let[Ee,Ce]of H){let Ae=D(Ee);if(Ae.contextObjects.size===0)continue;let _e=ni(Ae,Ce,X,{svelteMajor:Y});for(let[Ne,$e]of Ae.contextObjects){let De=ke.get(Ne);if(!$e.every((qe)=>qe!==null)){ve.add(Ne);continue}if($e.some((qe)=>qe?.unlessProvided.some((He)=>{let Ze=X(He);return Ze===e||![...Ze].every(Ct)}))){ve.add(Ne);continue}let Oe=we.get(Ne)??n;for(let qe of $e){let He=new Map;for(let[Ze,Ye]of qe.properties){let Ge=Ye&&(Ye.readOnly&&Ye.aliases.length===0||![Ze,...Ye.aliases].some((tt)=>De?.has("*")||De?.has(tt)));He.set(Ze,Ge?lg(Ye,_e):e)}Oe=r(Oe,t(En({kind:"object",props:He})))}we.set(Ne,Oe)}}for(let Ee of ve)we.delete(Ee);return we}function lg(D,H){let X=D.initial?i(D.initial,H):n;for(let Y of D.writes)X=r(X,i(Y,H));return Es(X)}function cg(D,H){if(D.size!==H.size)return!1;for(let[X,Y]of D){let ce=H.get(X);if(!ce||!mp(Y,ce))return!1}return!0}function pg(D,H,X){let{svelteMajor:Y}=X,ce=new Set,we=new Set,ke=(ve)=>{for(let Ee of ve.classes)ce.add(Ee);for(let Ee of ve.prefixes)we.add(Ee)};for(let[ve,Ee]of D.sites){let Ce=D.live.get(ve);if(Ee.length===1&&Ce){ke(Ce);continue}let Ae=H(ve);for(let _e of Ee){let Ne=ii();An(Ne,_e,Ae.propNames.values(),Y),ke(Q(ni(Ae,Ne,D.resolver,{svelteMajor:Y}),X))}}return{classes:ce,prefixes:we}}function ug(D,H,X,Y,ce,we,ke){let{svelteMajor:ve}=ke,Ee={keys:new Set,unknown:!1,values:new Map};for(let Ce=0;;Ce++){let Ae=new Map,_e=new Map,Ne=new Map,$e=new Set,De=X(Ee),Oe=(He)=>{let Ze=D(He.component),Ye=Ae.get(He.component);if(!Ye)Ye=ii(),Ae.set(He.component,Ye);if(Y.has(He.component)&&!He.open)He={...He,open:!0,reason:"excluded"};He=Ns(He,Ze);let Ge=Ne.get(He.component);if(!Ge)Ge=[],Ne.set(He.component,Ge);if(Ge.push(He),An(Ye,He,Ze.propNames.values(),ve))$e.add(He.component)};for(let He of H)Oe(He);for(let He of $e){$e.delete(He);let Ze=D(He),Ye=Ae.get(He);if(!Ye)continue;let Ge=Q(ni(Ze,Ye,De,{svelteMajor:ve}),ke);_e.set(He,Ge);for(let tt of Ge.childSites)Oe(tt)}let qe={keys:new Set(Ee.keys),unknown:Ee.unknown,values:ce&&Ce<ag?og(D,Ae,De,ve,we):new Map};for(let He of Ae.keys()){let Ze=D(He);for(let Ye of Ze.providedContexts)qe.keys.add(Ye);qe.unknown||=Ze.providesUnknownContext}if(qe.keys.size===Ee.keys.size&&qe.unknown===Ee.unknown&&cg(Ee.values,qe.values))return{usages:Ae,resolver:De,live:_e,sites:Ne};Ee=qe}}function Op(D,H){for(let X of H)if(D.startsWith(X))return!0;return!1}async function wa(D){let{library:H}=D;lp();let X=await sg(H),Y=D.options??{},ce=new Map,we=(Ye)=>{let Ge=ce.get(Ye);if(!Ge)Ge=fe(H.src,Ye),ce.set(Ye,Ge);return Ge},ke=new Set((Y.exclude??[]).flatMap((Ye)=>{let Ge=H.components.get(Ye);return Ge?[Ge]:[]})),ve=new Map;for(let[Ye,Ge]of Object.entries(Y.assume??{})){let tt=H.components.get(Ye);if(!tt)continue;ve.set(tt,new Map(Object.entries(Ge).map(([xt,Xt])=>[xt,t(...Xt)])))}let Ee=[],Ce=new Set,Ae=!1,_e=!1,Ne=!1;for(let Ye of D.modules){Ne||=Ye.openAll;for(let Ge of Ye.providedContexts)Ce.add(Ge);Ae||=Ye.providesUnknownContext===!0,_e||=Ye.readsLibraryContext===!0;for(let Ge of Ye.sites){let tt=ve.get(Ge.component);if(tt&&!Ge.open){let xt=new Map(Ge.props);for(let[Xt,at]of tt)if(xt.get(Xt)===e)xt.set(Xt,at);Ee.push({...Ge,props:xt})}else Ee.push(Ge)}}if(Ne)for(let Ye of D.bundled)Ee.push({component:Ye,open:!0,props:new Map,slots:null});let $e=Ae||X.unknownScriptContext,De=ug(we,Ee,(Ye)=>(Ge)=>{if(Ye.unknown||$e||Ce.has(Ge)||X.scriptContexts.has(Ge)||!X.componentContexts.has(Ge))return e;if(!Ye.keys.has(Ge))return n;return Ye.values.get(Ge)??e},ke,!X.scriptReadsContext&&!_e,X.scriptContextReads,H),Oe=[...X.scriptTokens].filter((Ye)=>Ye.endsWith("-")),qe=new Map,He,Ze=(Ye)=>{let Ge=qe.get(Ye);if(Ge===void 0)He??=pg(De,we,H),Ge=!He.classes.has(Ye)&&!Op(Ye,He.prefixes)&&!X.scriptTokens.has(Ye)&&!Op(Ye,Oe),qe.set(Ye,Ge);return Ge};return{liveComponents:new Set(De.usages.keys()),usages:De.usages,isPruned:Ze,scopeFor(Ye){let Ge=De.usages.get(Ye);return Ge?ni(we(Ye),Ge,De.resolver,{svelteMajor:H.svelteMajor}):void 0}}}import Dt from"node:path";function ka(D,H,X){if(H?.openAll)return!0;let Y=H?.libraryImports;if(!Y)return!1;return X===D.barrelKey?Y.barrel:Y.components.has(X)}function Dp(D,H){let X=new Map,Y=new Set;for(let ce of D){Y.add(ce);let we=Dt.basename(ce),ke=X.get(we);if(ke)ke.push(ce);else X.set(we,[ce])}return{files:Y,byName:X,resolved:H}}function Tn(D){return Dt.isAbsolute(D)}function Ea(D,{from:H,apps:X},Y){if(Y.startsWith(D.srcPrefix))return;let ce=Y.startsWith("."),we=Dt.posix.basename(Y);if(Y.endsWith(".svelte")){if(ce){let Ce=Dt.resolve(Dt.dirname(H),Y);return X.files.has(Ce)?{keys:[Ce],exact:!0}:void 0}let ve=X.resolved?.get(ue(H,Y));if(ve&&X.files.has(ve))return{keys:[ve],exact:!0};let Ee=X.byName.get(we);return Ee?{keys:Ee,exact:!1}:void 0}let ke;if(ce){let ve=Dt.resolve(Dt.dirname(H),Y);ke=[`${ve}.svelte`,Dt.join(ve,"index.svelte")].filter((Ee)=>X.files.has(Ee))}else ke=[...X.byName.get(`${we}.svelte`)??[],...(X.byName.get("index.svelte")??[]).filter((ve)=>Dt.basename(Dt.dirname(ve))===we)];return ke.length>0?{keys:ke,exact:!1}:void 0}function Ca(D,H,X,Y,ce){for(let{kind:we,source:ke,start:ve,end:Ee}of D){if(we==="glob"){Y.openApps=!0;continue}if(ke===null){if(Y.openApps=!0,X.patterns.argument.test(H.slice(ve,Ee)))Y.openAll=!0;continue}if(ke===X.name)Y.openAll=!0,Y.libraryImports.barrel=!0;let Ce=X.patterns.directComponentPath.exec(ke)?.[1];if(Ce)Y.dynamic.push(Ce),Y.libraryImports.components.add(Ce);else if(ke!==X.name&&X.isSpecifier(ke))Y.anyValue=!0;let Ae=ce&&Ea(X,ce,ke);if(Ae)Y.openAppComponents.push(...Ae.keys)}}var hg=/\.[cm]?[jt]sx?$/,Vp=/\s+as\s+/,fg=/(["'])([^"'\n]+\.svelte)\1/g;function Ls(D,H){let X=D.spec.contextKeyPrefix,Y=H.includes(X)?[...H.matchAll(D.patterns.contextKey)].map((we)=>we[2]):[],ce=()=>D.patterns.scriptSpecifier.test(H);return{providedContexts:new Set(Y),providesUnknownContext:H.includes("setContext")&&(ce()||H.split(X).length-1>Y.length),readsLibraryContext:H.includes("getAllContexts")||H.includes("getContext")&&(H.includes(X)||ce())}}function Aa(){return{components:new Map,appComponents:new Set,exports:new Map,objects:new Set,reExported:[],dynamic:[],openAll:!1,openAppComponents:[],openApps:!1,libraryImports:{components:new Set,barrel:!1},values:new Set,anyValue:!1}}function Bp(D){return D.anyValue?"any":D.values}function Fp(D,H,X,Y){if(!D.includes(H.name)&&!(Y&&(D.includes("import")||D.includes("export"))))return;for(let ce of p(D)){let we=ce.source?.value;if(!we||ce.typeOnly)continue;let ke=we===H.name,ve=H.patterns.directComponentPath.exec(we)?.[1],Ee=Y&&Ea(H,Y,we);if(ke)X.libraryImports.barrel=!0;if(ve)X.libraryImports.components.add(ve);if(!ke&&!ve&&H.isSpecifier(we)&&!F.test(we))X.anyValue=!0;if(ce.kind==="export"){for(let Ae of ce.specifiers){if(Ae.typeOnly)continue;if(ke&&Ae.kind!=="named")X.openAll=!0;let _e=ke?H.exportOf(Ae.local):null;if(_e&&_e.kind!=="component"){if(_e.kind!=="value")X.openAll=!0;else X.values.add(Ae.local);continue}let Ne=_e?_e.key:ve;if(Ne)X.reExported.push(Ne),X.libraryImports.components.add(Ne)}if(Ee)X.openAppComponents.push(...Ee.keys);continue}let Ce=H.patterns.componentSource.test(we);for(let Ae of ce.specifiers){if(Ae.typeOnly)continue;if(Ce)X.objects.add(Ae.local);if(Ee)if(Ee.exact&&Ae.kind==="default")X.components.set(Ae.local,Ee.keys[0]),X.appComponents.add(Ae.local);else X.openAppComponents.push(...Ee.keys);else if(ke){if(Ae.kind==="namespace")X.anyValue=!0;let _e=Ae.kind==="namespace"?{kind:"members",member:(Ne)=>H.exportOf(Ne)}:H.exportOf(Ae.imported);if(_e.kind==="component")X.components.set(Ae.local,_e.key),X.libraryImports.components.add(_e.key);else if(_e.kind!=="value")X.exports.set(Ae.local,_e);else X.values.add(Ae.imported)}else if(ve&&Ae.kind==="default")X.components.set(Ae.local,ve)}}}function zt(D,H,X,Y=1){return{component:D,open:!0,props:new Map,slots:null,location:{file:H,line:Y},reason:X}}function dg(D,H,X,Y){let ce=Aa(),we=Y&&{from:H,apps:Y};return Fp(D,X,ce,we),Ca(R(D),D,X,ce,we),{sites:[...ce.components.values(),...ce.reExported,...ce.dynamic,...ce.openAppComponents].map((ke)=>zt(ke,H,"used from a script module")),openAll:ce.exports.size>0||ce.openAll,openApps:ce.openApps,...Ls(X,D),file:H,libraryImports:ce.libraryImports,libraryValues:Bp(ce)}}function Up(D,H,X,Y,ce){let we=Aa(),ke=ce&&{from:H,apps:ce};Ca(xe(D),D,X,we,ke);let ve=new Set,Ee={sites:we.dynamic.map((Ae)=>zt(Ae,H,Y)),openAll:we.openAll,...Ls(X,D),file:H,libraryImports:we.libraryImports,libraryValues:ve};if(ke){Ee.openApps=we.openApps;for(let Ae of D.matchAll(fg))for(let _e of Ea(X,ke,Ae[2])?.keys??[])Ee.sites.push(zt(_e,H,Y,T(D,Ae.index).line));for(let Ae of we.openAppComponents)Ee.sites.push(zt(Ae,H,Y))}if(!D.includes(X.name))return Ee;let Ce=new Set;for(let Ae of D.matchAll(X.patterns.barrelImport)){if(Ce.add(Ae.index+Ae[0].length-X.name.length-2),Ae[1])continue;for(let _e of Ae[2].split(",")){let Ne=_e.trim();if(Ne===""||Ne.startsWith("type "))continue;let $e=X.exportOf(Ne.split(Vp)[0]);if($e.kind==="component")Ee.sites.push(zt($e.key,H,Y,T(D,Ae.index).line)),we.libraryImports.components.add($e.key);else if($e.kind!=="value")Ee.openAll=!0;else ve.add(Ne.split(Vp)[0])}}if(X.patterns.valueSubpath.test(D))Ee.libraryValues="any";for(let Ae of D.matchAll(X.patterns.barrelSpecifier))if(we.libraryImports.barrel=!0,!Ce.has(Ae.index))Ee.openAll=!0;for(let Ae of D.matchAll(X.patterns.directComponentSpecifier))Ee.sites.push(zt(Ae[1],H,Y,T(D,Ae.index).line)),we.libraryImports.components.add(Ae[1]);return Ee}function jp(D,H,X,Y){if(H.endsWith(".svelte"))return Ta(D,H,X,{apps:Y});if(hg.test(H))return dg(D,H,X,Y);return Up(D,H,X,"not a Svelte or script file",Y)}function mg(D,H,X,Y,ce,we){let ke;try{let ve=we.model??ji(D,X,void 0,H),Ee=we.usage??ii(!0);ke=Na(ve,X,Ee,we.constants,ce)}catch{}return{value:(ve)=>{if(ve.type==="Identifier"&&Y.has(ve.name))return t(mt);return ke?i(ve,ke):xg(ve,Y)},spread:(ve)=>ke?Qi(ve,ke):void 0,explain:(ve)=>ke?$s(ve,ke):()=>"isn't a literal",bindEach:(ve)=>ke?Yi(ve,ke):()=>{},instance:(ve)=>ke?ba(ve,ke.model.scopes):null,forwards:(ve)=>!ke||Ti(ke.usage,ve)}}function Na(D,H,X,Y,ce){return ni(D,X,()=>e,{imported:gg(D,H,Y),svelteMajor:ce.svelteMajor})}var yg=["",".ts",".js",".mts",".mjs","/index.ts","/index.js"];function gg(D,H,X){let Y=new Map;if(!X)return Y;for(let ce of[D.ast.module,D.ast.instance])for(let we of ce?.content.body??[]){if(we.type!=="ImportDeclaration")continue;let ke=String(we.source.value);if(!ke.startsWith("."))continue;let ve=Dt.resolve(Dt.dirname(H),ke),Ee=yg.map((Ce)=>X(ve+Ce)).find(Boolean);if(!Ee)continue;for(let Ce of we.specifiers){if(Ce.type!=="ImportSpecifier"||Ce.imported.type!=="Identifier")continue;let Ae=Ee.get(Ce.imported.name);if(Ae)Y.set(Ce.local.name,Ae)}}return Y}function xg(D,H){switch(D.type){case"Literal":if("regex"in D&&D.regex)return t(mt);return typeof D.value==="bigint"?e:t(D.value);case"TemplateLiteral":return D.expressions.length===0?t(D.quasis[0].value.cooked??""):e;case"Identifier":if(D.name==="undefined")return n;return H.has(D.name)?t(mt):e;case"ArrayExpression":return t(D.elements.length===0?Mt:mt);case"ObjectExpression":case"ArrowFunctionExpression":case"FunctionExpression":return t(mt);default:return e}}function vg(D,H){let X=H.replaceAll("$","\\$");return(D.match(new RegExp(`(?<![\\w$])${X}(?![\\w$])`,"g"))?.length??0)>1}function Ta(D,H,X,Y={}){let{apps:ce}=Y;if(!ce&&!D.includes(X.name))return{sites:[],openAll:!1,...Ls(X,D),file:H};let we;try{we=Y.model?.ast??I(D,{comments:!1,css:!1})}catch{return Up(D,H,X,"could not be parsed",ce)}let ke=Aa(),ve=ce&&{from:H,apps:ce};for(let Oe of[we.module,we.instance])if(Oe)Fp(D.slice(Oe.content.start,Oe.content.end),X,ke,ve);Ca(ie(D,[we.module,we.instance].flatMap((Oe)=>Oe?[Oe.content]:[])),D,X,ke,ve);let Ee={sites:[...ke.reExported.map((Oe)=>zt(Oe,H,"re-exported")),...ke.dynamic.map((Oe)=>zt(Oe,H,"imported dynamically")),...ke.openAppComponents.map((Oe)=>zt(Oe,H,"imported dynamically or through an alias"))],openAll:ke.openAll,openApps:ke.openApps,...Ls(X,D),file:H,libraryImports:ke.libraryImports,libraryValues:Bp(ke)},Ce=new Set,Ae=(Oe)=>T(D,Oe.start).line,_e=mg(D,we,H,ke.objects,X,Y),Ne=(Oe,qe)=>{let He=Sa(Oe,qe,{..._e,explain:(Ze)=>{let Ye=_e.explain(Ze);return()=>{let Ge=Ye();return Ge&&`${Dt.basename(H)}:${Ae(Oe)} ${Ge}`}}});He.location={file:H,line:Ae(Oe)},Ee.sites.push(He)},$e=(Oe)=>{ti(Oe,(qe)=>{if(qe.type==="Component")Ce.add(qe.name.split(".")[0]);if(qe.type==="Identifier"&&(ke.components.has(qe.name)||ke.exports.has(qe.name)))Ce.add(qe.name)})},De=(Oe,qe)=>{switch(Oe.type){case"ImportDeclaration":return;case"IfBlock":{De(Oe.test,Oe);let He=At(_e.value(Oe.test));if(He==="falsy")$e(Oe.consequent);else De(Oe.consequent,Oe);if(Oe.alternate)if(He==="truthy")$e(Oe.alternate);else De(Oe.alternate,Oe);return}case"EachBlock":{if(De(Oe.expression,Oe),Gi(_e.value(Oe.expression)))$e(Oe.body);else{let He=_e.bindEach(Oe);try{if(Oe.key)De(Oe.key,Oe);De(Oe.body,Oe)}finally{He()}}if(Oe.fallback)De(Oe.fallback,Oe);return}case"Component":{let[He,...Ze]=Oe.name.split("."),Ye=ke.exports.get(He),Ge;if(Ye){Ce.add(He);let tt=Oi(Ye,Ze);if(tt.kind==="unknown")Ee.openAll=!0;else if(tt.kind==="component")Ge=tt.key}else if(Ze.length===0)Ge=ke.components.get(Oe.name);if(Ge)Ce.add(He),Ne(Oe,Ge);break}case"SvelteSelf":if(ce)Ne(Oe,H);break;case"Identifier":{let He=ke.components.get(Oe.name);if(He){Ce.add(Oe.name),Ee.sites.push(zt(He,H,"used as a value",Ae(Oe)));return}let Ze=ke.exports.get(Oe.name);if(!Ze)return;Ce.add(Oe.name);let Ye=qe?.type==="MemberExpression"&&qe.object===Oe&&!qe.computed&&qe.property.type==="Identifier"?Oi(Ze,[qe.property.name]):Tt;if(Ye.kind==="component")Ee.sites.push(zt(Ye.key,H,"used as a value",Ae(Oe)));else if(Ye.kind!=="value")Ee.openAll=!0;return}}S(Oe,(He)=>De(He,Oe))};for(let Oe of[we.module,we.instance,we.fragment])if(Oe)De(Oe,null);for(let Oe of ke.exports.keys())if(!Ce.has(Oe))Ee.openAll=!0;for(let[Oe,qe]of ke.components)if(!Ce.has(Oe)&&(ke.appComponents.has(Oe)||vg(D,Oe)))Ee.sites.push(zt(qe,H,`${Oe} is imported but not rendered as a tag`));return Ee}var bg=/\.[cm]?[jt]s$/,Sg=/\.[cm]?ts$/;function wg(D){let H=new Map;for(let{file:Y,code:ce}of D)if(bg.test(Y)&&ce.includes("export"))H.set(Y,ce);let X=new Map;return(Y)=>{if(!X.has(Y)){let ce=H.get(Y);X.set(Y,ce===void 0?void 0:kg(Y,ce))}return X.get(Y)}}function kg(D,H){let X;try{X=sa(H,D,void 0,Sg.test(D))}catch{return}let Y=ii(!0),ce=ni(X,Y,()=>e),we=new Map;for(let[ke,ve]of Eg(X)){let Ee=i({type:"Identifier",name:ve},ce);if(Ee===e||[...Ee].some(a))continue;we.set(ke,Ee)}return we.size>0?we:void 0}function Eg(D){let H=[];for(let X of D.ast.module?.content.body??[]){if(X.type!=="ExportNamedDeclaration"||X.source)continue;let{declaration:Y}=X;if(Y?.type==="VariableDeclaration"){for(let ce of Y.declarations)if(ce.id.type==="Identifier")H.push([ce.id.name,ce.id.name])}for(let ce of X.specifiers)if(ce.local.type==="Identifier"&&ce.exported.type==="Identifier")H.push([ce.exported.name,ce.local.name])}return H}function J(D,H,X){let Y=new Map,ce=[];for(let Ge of D)if(Ge.file.endsWith(".svelte"))Y.set(Ge.file,Ge.code);else ce.push(Ge);let we=Dp(Y.keys(),X),ke=new Map,ve=(Ge)=>{if(!ke.has(Ge)){let tt;try{tt=ji(Y.get(Ge)??"",Ge)}catch{}ke.set(Ge,tt)}return ke.get(Ge)},Ee=wg(ce),Ce=(Ge,tt)=>Ta(Y.get(Ge)??"",Ge,H,{apps:we,usage:tt,model:ve(Ge),constants:Ee}),Ae=ce.map(({file:Ge,code:tt})=>jp(tt,Ge,H,we)),_e=new Set,Ne=new Map,$e=!1;for(let Ge of[...Ae,...[...Y.keys()].map((tt)=>Ce(tt))]){if(Ge.file)Ne.set(Ge.file,Ge);$e||=Ge.openApps===!0;for(let tt of Ge.sites)if(Tn(tt.component))_e.add(tt.component)}let De=new Map,Oe=new Map,qe=new Set,He=(Ge)=>{if(!Y.has(Ge.component))return;let tt=De.get(Ge.component);if(!tt)tt=ii(),De.set(Ge.component,tt);let xt=ve(Ge.component),Xt=$e?{...Ge,open:!0}:xt?Ns(Ge,xt):Ge,at=xt?.propNames.values()??[];if(An(tt,Xt,at,H.svelteMajor))qe.add(Ge.component)};for(let Ge of Y.keys())if($e||!_e.has(Ge))He({component:Ge,open:!0,props:new Map,slots:null});for(let Ge of Ae)for(let tt of Ge.sites)if(Tn(tt.component))He(tt);for(let Ge of qe){qe.delete(Ge);let tt=Ce(Ge,De.get(Ge));Oe.set(Ge,tt);for(let xt of tt.sites)if(Tn(xt.component))He(xt)}let Ze=(Ge)=>({...Ge,sites:Ge.sites.filter((tt)=>!Tn(tt.component))}),Ye=new Set([...De].filter(([,Ge])=>!Ge.open).map(([Ge])=>Ge));return{modules:[...Ae,...Oe.values()].map(Ze),read:Ne,closed:Ye,scopeFor(Ge){let tt=De.get(Ge),xt=ve(Ge);return Ye.has(Ge)&&tt&&xt?Na(xt,Ge,tt,Ee,H):void 0}}}import{statSync as Cg}from"node:fs";import qp from"node:path";class zp extends Se{root;components;constructor(D,H,X){super(D);this.root=H,this.components=X}get src(){return qp.join(this.root,this.spec.srcDir)}exports;exportOf(D){return this.exports??=U(this.src),this.exports.exportOf(this.spec.barrel,D)}svelte;get svelteMajor(){return this.svelte??={major:G("svelte",this.root)},this.svelte.major}}var Wp=new Map;function Ve(D,H){let X=qp.join(H,D.srcDir,D.barrel),{mtimeMs:Y}=Cg(X),ce=`${D.name}\x00${H}`,we=Wp.get(ce);if(we?.mtimeMs!==Y){let ke=new Map,ve=u(D).srcPrefix;for(let[Ee,Ce]of me(H,D))if(Ce.name==="default"&&Ce.path.endsWith(".svelte"))ke.set(Ee,Ce.path.slice(ve.length));we={mtimeMs:Y,components:ke},Wp.set(ce,we)}return new zp(D,H,we.components)}function _n(D,H){return Ve(D,N(D.name,H))}var _a=new Set("altGlyph altGlyphDef altGlyphItem animate animateColor animateMotion animateTransform circle clipPath color-profile cursor defs desc discard ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font font-face font-face-format font-face-name font-face-src font-face-uri foreignObject g glyph glyphRef hatch hatchpath hkern image line linearGradient marker mask mesh meshgradient meshpatch meshrow metadata missing-glyph mpath path pattern polygon polyline radialGradient rect set solidcolor stop svg switch symbol text textPath tref tspan unknown use view vkern".split(" ")),Gp=new Set("annotation annotation-xml maction math merror mfrac mi mmultiscripts mn mo mover mpadded mphantom mprescripts mroot mrow ms mspace msqrt mstyle msub msubsup msup mtable mtd mtext mtr munder munderover semantics".split(" ")),Ag=/[.*+?^${}()|[\]\\]/g,Hp=new RegExp(`<(?:svelte:element|${[..._a,...Gp].map((D)=>D.replace(Ag,"\\$&")).join("|")})[\\s/>]`),Ng=new Set(["Fragment","Root","Component","SvelteComponent","SvelteFragment","SnippetBlock","SlotElement"]),Tg=new Set(["EachBlock","IfBlock","AwaitBlock","Fragment","KeyBlock"]);function Xp(D,H){if(_a.has(D.name))return!0;if(D.name!=="a"&&D.name!=="title")return!1;if(H!==void 0)return H;return D.name==="a"&&D.fragment.nodes.some((X)=>X.type==="RegularElement"&&X.name!=="svg"&&_a.has(X.name))}function Ia(D,H){if(D.type!=="RegularElement")return"html";if(Xp(D,H))return"svg";return Gp.has(D.name)?"mathml":"html"}function _g(D,H){let X="keep",Y=(ce)=>{if(ce.type==="RegularElement"||ce.type==="SvelteElement"){let ke=Ia(ce,H);if(ke==="html")return X="html",!1;if(X==="keep")X=ke;return!0}if(ce.type==="Text"){if(ce.data.trim()!=="")X="maybe_html";return!0}if(!Tg.has(ce.type))return!0;let we=!0;return S(ce,(ke)=>{if(we)we=Y(ke)}),we};for(let ce of D)if(!Y(ce))return"html";return X}function Ig(D,H,X,Y){if(H?.type==="RegularElement"||H?.type==="SvelteElement"){if(H.type==="RegularElement"&&H.name==="foreignObject")return"html";return Ia(H,Y)}if(H===null||Ng.has(H.type)){let we=_g(X,Y);if(we!=="keep"&&we!=="maybe_html")return we}let ce=null;for(let we of X){if(we.type!=="RegularElement")continue;let ke=Ia(we,Y);if(ke==="html")return"html";ce=ce===null||ce===ke?ke:"html"}return ce??D}function Kp(D){let H=[],X=(Y,ce,we,ke)=>{if(Y.type==="Fragment"){let Ee=Ig(we,ce,Y.nodes,ke);for(let Ce of Y.nodes){if(Ce.type==="Text"||Ce.type==="RegularElement")H.push({start:Ce.start,end:Ce.end,text:Ce.type==="Text",ns:Ee});X(Ce,Y,Ee,ke)}return}let ve=Y.type==="RegularElement"?Xp(Y,ke):ke;S(Y,(Ee)=>{if(Ee.type==="Fragment")X(Ee,Y,we,ve);else X(Ee,ce,we,ke)})};return X(D.fragment,null,"html",void 0),H}function $g(D,H){let X=0,Y=D.runs.length-1;while(X<=Y){let ce=X+Y>>1,[we,ke,ve]=D.runs[ce];if(H<we)Y=ce-1;else if(H>=we+ve)X=ce+1;else return ke+H-we}return}function Yp(D,H,X){let Y=Kp(D),ce=new Map,we=[];for(let ve of Y)if(ve.text)we.push(ve);else ce.set(ve.start,ve.ns);let ke=(ve)=>{let Ee=0,Ce=we.length-1;while(Ee<=Ce){let Ae=Ee+Ce>>1;if(ve<we[Ae].start)Ce=Ae-1;else if(ve>=we[Ae].end)Ee=Ae+1;else return we[Ae]}return};for(let ve of Kp(H)){let Ee=$g(X,ve.start);if(Ee===void 0)continue;let Ce=ve.text?ke(Ee)?.ns:ce.get(Ee);if(Ce!==void 0&&Ce!==ve.ns)return!0}return!1}var Pg=new Set(["Identifier","MemberExpression","ChainExpression","LogicalExpression","ConditionalExpression","UnaryExpression","BinaryExpression","TemplateLiteral","CallExpression"]);function Mg(D,H){if(!D)return!1;switch(D.type){case"AssignmentExpression":case"ForInStatement":case"ForOfStatement":return H==="left";case"UpdateExpression":return H==="argument";case"VariableDeclarator":return H==="id";case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return H==="params"||H==="id";case"CatchClause":return H==="param";case"ObjectPattern":case"ArrayPattern":case"RestElement":case"AssignmentPattern":case"ImportSpecifier":case"ExportSpecifier":return!0;case"UnaryExpression":return D.operator==="delete";case"CallExpression":case"NewExpression":return H==="callee";case"MemberExpression":return H==="object";case"TaggedTemplateExpression":return H==="tag"||H==="quasi";case"SnippetBlock":case"EachBlock":case"AwaitBlock":return H!=="expression";case"LabeledStatement":return H==="label";default:return!1}}function $a(D){if(D===e||D.size!==1)return null;let[H]=D;if(a(H))return null;if(H===void 0)return"void 0";if(typeof H==="number"){if(!Number.isFinite(H)||Object.is(H,-0)||Math.abs(H)>Number.MAX_SAFE_INTEGER)return null;return H<0?`(${H})`:String(H)}return JSON.stringify(H)}function Rg(D,H){let X=i(D.left,H),Y=At(X);return D.operator==="&&"?Y==="falsy":D.operator==="||"?Y==="truthy":Cn(X)}function yt(D,H){switch(D.type){case"Literal":case"Identifier":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"TemplateLiteral":return D.expressions.every((Y)=>yt(Y,H));case"UnaryExpression":return D.operator!=="delete"&&yt(D.argument,H);case"BinaryExpression":return yt(D.left,H)&&yt(D.right,H);case"LogicalExpression":return yt(D.left,H)&&(H!==void 0&&Rg(D,H)||yt(D.right,H));case"ConditionalExpression":return yt(D.test,H)&&yt(D.consequent,H)&&yt(D.alternate,H);case"ArrayExpression":return D.elements.every((Y)=>!Y||Y.type!=="SpreadElement"&&yt(Y,H));case"ObjectExpression":return D.properties.every((Y)=>Y.type==="Property"&&!Y.computed&&Y.kind==="init"&&yt(Y.value,H))}let X=j(D);if(X!==D)return yt(X,H);if(!H)return!1;switch(D.type){case"ThisExpression":return!0;case"ChainExpression":return yt(D.expression,H);case"MemberExpression":{if(D.object.type==="Identifier"&&D.object.name==="$$slots")return!D.computed;let Y=!D.computed||D.property.type==="Literal";if(D.object.type==="Identifier"&&Nn(D.object,H)&&Y)return!0;let ce=i(D.object,H);if(ce===e||ce.size===0)return!1;let we=!D.computed&&D.property.type==="Identifier"&&D.property.name==="length";return(Y&&[...ce].every((ke)=>kn(ke)||typeof ke==="string"&&we)||D.optional===!0&&ua(ce))&&yt(D.object,H)}case"CallExpression":{let Y=D.arguments.every((we)=>we.type!=="SpreadElement"&&yt(we,H)),{callee:ce}=D;if(ce.type==="MemberExpression")return Y&&Ps(D,H)!==void 0&&yt(ce.object,H);return ce.type==="Identifier"&&["Boolean","String","getContext"].includes(ce.name)&&!H.model.unknownNames.has(ce.name)&&Y}default:return!1}}function Lg(D){let H=new Set,X=D.instance?.content.body??[],Y=new Set;for(let ce of X)if(ce.type==="ImportDeclaration"&&ce.source.value==="svelte"){for(let we of ce.specifiers)if(we.type==="ImportSpecifier"&&we.imported.type==="Identifier"&&we.imported.name==="createEventDispatcher")Y.add(we.local.name)}if(Y.size===0)return H;for(let ce of X){if(ce.type!=="VariableDeclaration"||ce.kind!=="const")continue;for(let{id:we,init:ke}of ce.declarations)if(we.type==="Identifier"&&ke?.type==="CallExpression"&&ke.callee.type==="Identifier"&&Y.has(ke.callee.name))H.add(we.name)}return H}function iu(D){return D?.type==="RegularElement"||D?.type==="SvelteElement"}function Og(D){return D===e||[...D].some((H)=>H==null)}function Vg(D){let H=new Set;return f(D.fragment,{enter(X,Y){if(X.type!=="Attribute"||X.name!=="value"||!iu(Y)||X.value===!0)return;return f(X,{enter(ce,we){if(ce.type==="Identifier"&&b(ce,we))H.add(ce.name)}}),te}}),H}function Qp(D){return D?.type==="Component"||D?.type==="SvelteSelf"||D?.type==="SvelteComponent"}function Pa(D){return D}var Jp=/^[ \t\r\n]+|[ \t\r\n]+$/g,Dg=/^(?:<!--[\s\S]*?-->[ \t\r\n]*)+/,Bg=/(?:[ \t\r\n]*<!--[\s\S]*?-->)+$/,Fg=/(?<=-->)[ \t\r\n]+/g,Ug=/[ \t\r\n]+(?=<!--)/g,jg=/[ \t\r\n]$/,Wg=/^[ \t\r\n]/,Zp=/^[ \t\r\n]*$/,qg=new Set(["pre","textarea"]),zg=new Set(["select","tr","table","tbody","thead","tfoot","colgroup","datalist"]);function Z(D,H){let{code:X,ast:Y}=D.model,ce=H?.emptyBlock??"{#if false}<!---->{/if}",we=H?.unwrap??!1,ke=[],ve=0,Ee=[],Ce=()=>{let Ke=Ee.at(-1);return Ke?.type==="RegularElement"&&zg.has(Ke.name)},Ae=(Ke,nt)=>{let{start:ot,end:Qe}=Pa(Ke);ke.push({start:ot,end:Qe,print:()=>nt})},_e=(Ke,nt)=>{ke.push({start:Ke.start,end:Ke.end,print:(ot)=>M("(",ot(nt.start,nt.end),")")})},Ne=(Ke)=>i(Ke,D);function $e(Ke,nt,ot){if(!Pg.has(j(Ke).type)||Mg(nt,ot))return!1;if(Ke.type==="Identifier"&&(Ke.name==="undefined"||!b(Ke,nt)))return!1;let Qe=$a(Ne(Ke));if(Qe===null||!yt(Ke,D))return!1;return Ae(Ke,Qe),!0}function De(Ke){return Ke.type==="Identifier"&&(Ke.name==="$$restProps"||Ke.name===D.model.restPropsName)&&Nn(Ke,D)&&Qi(Ke,D)?.size===0}let Oe=Lg(D.model.ast);function qe(Ke){if(Oe.size===0||Ke.type!=="CallExpression"||Ke.optional||Ke.callee.type!=="Identifier"||!Oe.has(Ke.callee.name)||Ke.arguments.length===0||Ke.arguments.some((Qe)=>Qe.type==="SpreadElement"))return;let nt=D.model.scopes.bindingOf(Ke.callee);if(!nt||!Wi(nt,D.model))return;let ot=Ne(Ke.arguments[0]);if(ot===e||ot.size===0||[...ot].some((Qe)=>typeof Qe!=="string"||Ti(D.usage,Qe)))return;return Ke}function He(Ke,nt){let ot=nt.arguments;if(ot.every((rt)=>yt(rt,D))){Ae(Ke,";");return}let Qe=ot[0],it=ot[ot.length-1];ke.push({start:nt.start,end:nt.end,print:(rt)=>M("void (",rt(Pa(Qe).start,Pa(it).end),")")});for(let rt of ot)Ge(rt,nt,"arguments")}function Ze(Ke){return yt(Ke,D)?At(Ne(Ke)):"either"}function Ye(Ke){S(Ke,(nt,ot)=>Ge(nt,Ke,ot),v)}function Ge(Ke,nt,ot){switch(Ke.type){case"ImportDeclaration":case"BindDirective":case"LetDirective":case"ObjectPattern":case"ArrayPattern":case"RestElement":case"AssignmentPattern":return;case"ExpressionStatement":{let Qe=qe(Ke.expression);if(Qe)He(Ke,Qe);else Ye(Ke.expression);return}case"LabeledStatement":{let{body:Qe}=Ke,it=Ke.label.name==="$"&&nt?.type==="Program"&&Qe.type==="ExpressionStatement"?qe(Qe.expression):void 0;if(it&&it.arguments.every((rt)=>yt(rt,D))){Ae(Ke,"");return}break}case"LogicalExpression":{if($e(Ke,nt,ot))return;let{left:Qe,right:it,operator:rt}=Ke,dt=Ne(Qe),Ot=At(dt);if(rt==="&&"&&Ot==="falsy"||rt==="||"&&Ot==="truthy"||rt==="??"&&Cn(dt))Ae(it,"void 0"),Ge(Qe,Ke,"left");else if(yt(Qe,D)&&(rt==="&&"&&Ot==="truthy"||rt==="||"&&Ot==="falsy"||rt==="??"&&ua(dt)))_e(Ke,it),Ge(it,Ke,"right");else Ye(Ke);return}case"ConditionalExpression":{if($e(Ke,nt,ot))return;let Qe=At(Ne(Ke.test));if(Qe==="either")break;let[it,rt]=Qe==="truthy"?["consequent","alternate"]:["alternate","consequent"],dt=Ke[it];if(yt(Ke.test,D))_e(Ke,dt);else Ae(Ke[rt],"void 0"),Ge(Ke.test,Ke,"test");Ge(dt,Ke,it);return}case"IfStatement":{let Qe=Ze(Ke.test);if(Qe==="either")break;let it=Qe==="truthy"?"consequent":"alternate",rt=Ke[it];if(ke.push({start:Ke.start,end:Ke.end,print:(dt)=>rt?dt(rt.start,rt.end):";"}),rt)Ge(rt,Ke,it);return}case"IfBlock":Xt(Ke,nt);return;case"SpreadAttribute":if(Qp(nt)&&De(Ke.expression)){Ae(Ke,"");return}break;case"SpreadElement":{if(nt?.type!=="ObjectExpression"||!De(Ke.argument))break;let{properties:Qe}=nt,it=Qe.indexOf(Ke),rt=Qe[it+1],dt=Qe[it-1],Ot=rt?Ke.start:dt?.end??Ke.start,vt=rt?rt.start:Ke.end;ke.push({start:Ot,end:vt,print:()=>""});return}case"OnDirective":if(Ke.expression===null&&!Ti(D.usage,Ke.name)&&(Ke.modifiers.length===0||Qp(nt)))Ae(Ke,"");return;case"ObjectExpression":{let Qe=Ms(D.model).get(Ke),it=Qe&&Rs(Qe,D);if(!(Qe&&it)||[...Qe.entries.keys()].every((dt)=>it.has(dt)))break;let rt=[...Qe.properties].filter(([dt])=>it.has(dt)).map(([,dt])=>dt);ke.push({start:Ke.start,end:Ke.end,print:(dt)=>rt.length===0?"{}":M("{ ",...rt.flatMap((Ot,vt)=>[...vt>0?[", "]:[],dt(Ot.start,Ot.end)])," }")});return}case"EachBlock":{if(yt(Ke.expression,D)&&Gi(Ne(Ke.expression))){let it=xt(Ke,nt),{fallback:rt}=Ke;if(rt)Ge(rt,Ke,"fallback");ke.push({start:Ke.start,end:Ke.end,print:(dt)=>it(dt,rt)});return}Ge(Ke.expression,Ke,"expression");let Qe=Yi(Ke,D);try{if(Ke.key)Ge(Ke.key,Ke,"key");Ge(Ke.body,Ke,"body")}finally{Qe()}if(Ke.fallback)Ge(Ke.fallback,Ke,"fallback");return}case"ClassDirective":{let Qe=Ze(Ke.expression);if(Qe==="falsy"){Ae(Ke,"");return}if(Qe==="truthy"&&Ke.expression.type!=="Literal"){Ae(Ke,`class:${Ke.name}={true}`);return}break}case"Attribute":{let{value:Qe}=Ke;if(Ke.name==="value"&&iu(nt)&&Qe!==!0&&!Array.isArray(Qe)&&Og(Ne(Qe.expression)))return;if(Qe!==!0&&!Array.isArray(Qe)&&X[Ke.start]==="{"&&Qe.expression.type==="Identifier"){let it=$a(Ne(Qe.expression));if(it!==null)Ae(Ke,`${Ke.name}={${it}}`);return}break}case"Property":{if(nt?.type==="ObjectExpression"&&Ke.shorthand&&Ke.value.type==="Identifier"){let Qe=$a(Ne(Ke.value));if(Qe!==null){Ae(Ke,`${Ke.value.name}: ${Qe}`);return}}break}case"Fragment":Ee.push(nt),Ye(Ke),Ee.pop();return;case"RegularElement":if(qg.has(Ke.name)){ve++,Ye(Ke),ve--;return}break;default:if($e(Ke,nt,ot))return}Ye(Ke)}function tt(Ke,nt){let ot=nt?.nodes??[];return ot.length>0?Ke(ot[0].start,ot[ot.length-1].end):M()}function xt(Ke,nt){let ot=nt?.type==="Fragment"?nt.nodes:[],Qe=ot.indexOf(Ke),it=ot[Qe-1],rt=ot[Qe+1],dt=Qe===0||it?.type==="Text"&&jg.test(it.data)||Qe===1&&it?.type==="Text"&&Zp.test(it.data),Ot=Qe===ot.length-1||rt?.type==="Text"&&Wg.test(rt.data),vt=ve>0||dt&&Ot?ce:"",hi=ve===0,rr=Ce();return(jn,Wn)=>{let qn=tt(jn,Wn);if(qn.text.replace(Jp,"")==="")return vt;if(!we||rr||Wn?.nodes.some((wo)=>wo.type==="ConstTag"||wo.type==="SnippetBlock"))return M("{#if true}",qn,"{/if}");if(!hi)return qn;let wi=ye(qn,Jp),bo=Dg.exec(wi.text);if(bo)wi=ye(wi,Fg,0,bo[0].length);let So=Bg.exec(wi.text);if(So)wi=ye(wi,Ug,So.index);return wi}}function Xt(Ke,nt){let ot=[],Qe=Ke;for(;;){ot.push({test:Qe.test,body:Qe.consequent});let vt=Qe.alternate?.nodes.length===1?Qe.alternate.nodes[0]:void 0;if(vt?.type!=="IfBlock"||!vt.elseif)break;Qe=vt}let it=Qe.alternate,rt=[],dt=!1;for(let vt of ot){let hi=Ze(vt.test);if(hi==="falsy"){dt=!0;continue}if(hi==="truthy"){dt=dt||vt!==ot.at(-1)||it!==null,it=vt.body;break}rt.push(vt)}for(let vt of rt)Ge(vt.test,Ke,"test"),Ge(vt.body,Ke,"consequent");if(it)Ge(it,Ke,"alternate");if(!dt&&rt.length>0)return;let Ot=xt(Ke,nt);ke.push({start:Ke.start,end:Ke.end,print:(vt)=>{if(rt.length===0)return Ot(vt,it);let hi=[];for(let[rr,{test:jn,body:Wn}]of rt.entries())hi.push(`{${rr===0?"#if":":else if"} `,vt(jn.start,jn.end),"}",tt(vt,Wn));if(it&&it.nodes.length>0)hi.push("{:else}",tt(vt,it));return M(...hi,"{/if}")}})}if(Y.module)Ge(Y.module,null,"module");if(Y.instance)Ge(Y.instance,null,"instance");Ge(Y.fragment,null,"fragment");let{css:at}=Y,ht=Y.fragment.nodes.filter((Ke)=>!(Ke.type==="Text"&&Zp.test(Ke.data))).at(-1);if(at&&ht&&ht.end<=at.start&&ke.length>0)ke.push({start:ht.end,end:ht.end,print:()=>Yg,silences:!0});let ut=[...ke].sort((Ke,nt)=>Ke.start-nt.start||nt.end-Ke.end).filter((Ke,nt)=>H?.editFilter?.(nt,Ke)??!0),ft=0,ui=(Ke,nt)=>{let ot=[],Qe=Ke;for(let it of ut){if(it.start<Qe||it.end>nt||it.start>=nt)continue;if(ot.push(B(X,Qe,it.start),it.print(ui)),Qe=it.end,!it.silences)ft++}return ot.push(B(X,Qe,nt)),M(...ot)},Un=ui(0,X.length),nr=Un.text===X?Y:void 0;if(ft>0&&Hp.test(X)){if(nr=I(Un.text,{comments:!1,css:!1}),Yp(Y,nr,Un))return we?Z(D,{...H,unwrap:!1}):Kg(X)}let{mapped:sr,dropped:xh}=sx(Un,H?.dropUnused!==!1,ft>0,nr,Zg(D)),vo;return{code:sr.text,mapped:sr,edits:ft,dropped:xh,unrendered:()=>(vo??=ft>0?Gg(sr.text):[],vo)}}function Kg(D){return{code:D,mapped:B(D,0,D.length),edits:0,dropped:0,unrendered:()=>[]}}function Gg(D){let H=I(D,{comments:!1,css:!1}),X=new Map;for(let ce of[H.module,H.instance])for(let we of ce?.content.body??[])if(we.type==="ImportDeclaration"&&typeof we.source.value==="string"&&we.source.value.endsWith(".svelte"))X.set(we.source.value,we.specifiers.map((ke)=>ke.local.name));if(X.size===0)return[];let Y=new Set;return f(H,{enter(ce,we){if(ce.type==="ImportDeclaration")return te;if(ce.type==="Component")Y.add(ce.name.split(".")[0]);if(ce.type==="Identifier"&&b(ce,we))Y.add(ce.name)}}),[...X].filter(([,ce])=>!ce.some((we)=>Y.has(we))).map(([ce])=>ce)}var Hg=8;function Os(D,H){D.set(H,(D.get(H)??0)+1)}function eu(D,H,X){let Y=new Map,ce=(we,ke)=>{if(Os(we,ke),ke.startsWith("$")&&!ke.startsWith("$$"))Os(we,ke.slice(1))};return f(D,{enter(we,ke,ve){if(we.type==="Identifier"&&!Xg(ke,ve)&&b(we,ke)){if(!H.has(we))ce(Y,we.name);if(X&&ke?.type!=="ExportSpecifier")ce(X,we.name)}if(we.type==="ClassDirective"||we.type==="BindDirective"||we.type==="LetDirective"||we.type==="StyleDirective"||we.type==="UseDirective"||we.type==="TransitionDirective"||we.type==="AnimateDirective"){let Ee=we.name.split(".")[0];if(Os(Y,Ee),X)Os(X,Ee)}}}),Y}function Xg(D,H){switch(D?.type){case"VariableDeclarator":case"FunctionDeclaration":case"FunctionExpression":case"ClassDeclaration":case"ClassExpression":return H==="id";default:return!1}}var Yg="<!-- svelte-ignore css-unused-selector css_unused_selector -->",Qg=`// svelte-ignore unused-export-let export_let_unused
|
|
19
|
+
`;function Jg(D,H){let X=new Map;for(let ce of D){if(ce.type!=="VariableDeclaration")continue;for(let we of ce.declarations)if(we.id.type==="Identifier")X.set(we.id.name,ce.start)}let Y=new Set;for(let ce of D){if(ce.type!=="ExportNamedDeclaration"||ce.source)continue;let{declaration:we}=ce,ke=!we?ce.specifiers.map((ve)=>ve.local):we.type==="VariableDeclaration"&&we.kind==="let"?we.declarations.map((ve)=>ve.id):[];for(let ve of ke){if(ve.type!=="Identifier"||H.has(ve.name))continue;Y.add(ce.start);let Ee=X.get(ve.name);if(Ee!==void 0)Y.add(Ee)}}return[...Y]}function Zg(D){let{model:H,usage:X}=D;if(X.open||H.customElement)return nu;let Y=(ke)=>X.props.has(H.propNames.get(ke)??ke),ce=Vg(H.ast),we=(ke)=>!Y(ke)&&!ce.has(ke);if(!tx.test(H.code))return{removable:()=>!0,local:we};return{removable:we,local:we}}var nu={removable:()=>!1,local:()=>!1};function ex(D,H){if(D.type!=="ExportNamedDeclaration"||D.declaration?.type!=="VariableDeclaration"||D.declaration.kind!=="let"||!D.declaration.declarations.every(({id:X})=>X.type==="Identifier"&&H(X.name)))return;return{start:D.start,end:D.declaration.start}}var tx=/\$\$(?:restProps|props)\b/;function ix(D,H){if(D.type!=="ExportNamedDeclaration"||D.declaration?.type!=="VariableDeclaration"||D.declaration.kind!=="let"||D.declaration.declarations.length!==1)return;let[{id:X,init:Y}]=D.declaration.declarations;if(X.type!=="Identifier"||!H(X.name))return;if(Y&&!yt(Y))return;return{name:X.name,statement:D,own:[X]}}function nx(D,H){let X=new Set;for(let ke of D){if(ke.type!=="ExportNamedDeclaration")continue;if(ke.declaration?.type==="VariableDeclaration"){for(let ve of ke.declaration.declarations)if(ve.id.type==="Identifier")X.add(ve.id.name)}for(let ve of ke.specifiers)if(ve.local.type==="Identifier")X.add(ve.local.name)}let Y=(ke)=>!X.has(ke)&&!(ke.startsWith("$")&&!ke.startsWith("$$")),ce=new Set;for(let ke of D){let ve=ke;if(ve.type==="TSDeclareFunction"&&ve.id?.type==="Identifier")ce.add(ve.id.name)}let we=[];for(let ke of D){let ve=ix(ke,H);if(ve)we.push(ve);else if(ke.type==="LabeledStatement"&&ke.label.name==="$"&&ke.body.type==="ExpressionStatement"){let{expression:Ee}=ke.body;if(Ee.type==="AssignmentExpression"&&Ee.operator==="="&&Ee.left.type==="Identifier"&&Y(Ee.left.name)&&yt(Ee.right))we.push({name:Ee.left.name,statement:ke,own:[Ee.left,ke.label]})}else if(ke.type==="VariableDeclaration"&&ke.declarations.length===1){let[{id:Ee,init:Ce}]=ke.declarations;if(Ee.type==="Identifier"&&Y(Ee.name)&&(!Ce||yt(Ce)))we.push({name:Ee.name,statement:ke,own:[Ee]})}else if(ke.type==="FunctionDeclaration"&&ke.id&&Y(ke.id.name)&&!ce.has(ke.id.name))we.push({name:ke.id.name,statement:ke,own:[ke.id]})}return we}function tu(D,H){for(let[X,Y]of H){let ce=(D.get(X)??0)-Y;if(ce>0)D.set(X,ce);else D.delete(X)}}function sx(D,H,X,Y,ce=nu){if(!H&&!X)return{mapped:D,dropped:0};let we=Y??I(D.text,{comments:!1,css:!1}),ke=we.instance?.content.body??[],ve=H?nx(ke,ce.removable):[],Ee=new Set(ve.flatMap((Oe)=>Oe.own)),Ce=X?new Map:void 0,Ae=eu(we,Ee,Ce),_e=[],Ne=ve;for(let Oe=0;Oe<Hg;Oe++){let qe=Ne.filter((He)=>!Ae.has(He.name));if(qe.length===0)break;for(let He of qe){_e.push(He);let Ze=Ce&&new Map;if(tu(Ae,eu(He.statement,Ee,Ze)),Ce&&Ze)tu(Ce,Ze)}Ne=Ne.filter((He)=>!qe.includes(He))}let $e=_e.map(({statement:Oe})=>({start:Oe.start,end:Oe.end})),De=new Set(_e.map(({statement:Oe})=>Oe.start));if(H)for(let Oe of ke){if(De.has(Oe.start))continue;let qe=ex(Oe,ce.local);if(qe)$e.push(qe),De.add(Oe.start)}for(let Oe of Ce?Jg(ke,Ce):[])if(!De.has(Oe))$e.push({start:Oe,end:Oe,text:Qg});return $e.sort((Oe,qe)=>Oe.start-qe.start),{mapped:z(D,$e),dropped:_e.length}}import{globSync as Xx,readdirSync as Yx,readFileSync as xo}from"node:fs";import ir from"node:path";var Za=9,ci=10,an=12,Si=13,Us=32,rx=33,js=34,Ws=39,eo=40,Mn=41,Rn=42,ax=43,Vn=44,Ln=45,vu=46,nn=47,Ua=58,ja=59,ox=62,lx=64,bu=91,pi=92,Su=93,cx=95,px=108,ux=114,hx=117,wu=123,ku=125,fx=126,dx=8232,mx=8233,yx=65279,gx=65534,Wa=0,On=1,to=2,io=3,Eu=4,Cu=Symbol("bail");function Kt(){throw Cu}var su=1,ru=2,Ma=4,au=8,ou=16,lu=32;class In{type;flags;parent;nodes;before;start;end;textStart;textEnd;name;text;constructor(D,H,X){this.type=D,this.flags=H!==null?H.flags&Ma:0,this.parent=H,this.nodes=D===0||D===1||D===2?[]:null,this.before=X,this.start=X,this.end=X,this.textStart=0,this.textEnd=0,this.name="",this.text=null}set(D,H){this.flags=H?this.flags|D:this.flags&~D}get semi(){return(this.flags&su)!==0}set semi(D){this.set(su,D)}get semicolon(){return(this.flags&ru)!==0}set semicolon(D){this.set(ru,D)}get readDecls(){return(this.flags&Ma)!==0}set readDecls(D){this.set(Ma,D)}get removed(){return(this.flags&au)!==0}set removed(D){this.set(au,D)}get dirty(){return(this.flags&ou)!==0}set dirty(D){this.set(ou,D)}get rewritten(){return(this.flags&lu)!==0}set rewritten(D){this.set(lu,D)}read(D){return this.text??D.slice(this.textStart,this.textEnd)}}var qa=1,Au=2,_i=4,qs=8;function si(D){let H=new D.constructor(D.length*2);return H.set(D),H}class Nu{start;propEnd;valueStart;valueEnd;end;flags;text=new Map;count=0;before=null;removed=0;constructor(D){this.start=new Int32Array(D),this.propEnd=new Int32Array(D),this.valueStart=new Int32Array(D),this.valueEnd=new Int32Array(D),this.end=new Int32Array(D),this.flags=new Uint8Array(D)}push(D,H,X,Y,ce,we){let ke=this.count;if(ke===this.start.length)this.start=si(this.start),this.propEnd=si(this.propEnd),this.valueStart=si(this.valueStart),this.valueEnd=si(this.valueEnd),this.end=si(this.end),this.flags=si(this.flags);return this.start[ke]=D,this.propEnd[ke]=H,this.valueStart[ke]=X,this.valueEnd[ke]=Y,this.end[ke]=ce,this.flags[ke]=we,this.count=ke+1,ke}setBefore(D,H){let X=this.before;if(X===null)X=new Int32Array(this.start.length);else if(D===X.length)X=si(X);X[D]=H,this.before=X}}class Tu{css;decls;map;out=[];cursor=0;constructor(D,H,X){this.css=D,this.decls=H,this.map=X}copy(D,H){this.out.push(this.css.slice(D,H)),this.map?.copy(this.css,D,H)}insert(D,H){this.out.push(D),this.map?.insert(D,H)}flush(D){if(D>this.cursor)this.copy(this.cursor,D);this.cursor=D}emit(D){return this.body(D),this.flush(this.css.length),this.out.join("")}body(D){let H=D.nodes,X=this.decls,Y=X.removed>0,ce=0,we=-1;for(let Ce=0;Ce<H.length;Ce++){let Ae=H[Ce];if(typeof Ae==="number"){if(Y&&(X.flags[Ae]&_i)!==0){if((X.flags[Ae]&qs)!==0)ce++;continue}we=ce}else{if(Ae.removed)continue;if(Ae.type!==Eu)we=ce}ce++}let ke=-1,ve=-1;if(D.type===Wa&&H.length>1){let Ce=H[0];if(typeof Ce!=="number"){if(Ce.removed)ke=Ce.before,ve=Ce.start}else if(Y&&(X.flags[Ce]&_i)!==0)ke=X.before[Ce],ve=X.start[Ce]}let Ee=0;for(let Ce=0;Ce<H.length;Ce++){let Ae=H[Ce];if(typeof Ae==="number"){if(Y&&(X.flags[Ae]&_i)!==0){if(Ee!==0||D.type!==Wa)this.skipDecl(Ae,-1,-1);else if(Ce===0){let $e=X.before;this.skipDecl(Ae,$e[Ae],X.start[Ae])}else this.skipDecl(Ae,ke,ve);continue}}else if(Ae.removed){this.flush(Ae.before),this.cursor=Ae.semi&&Ae.type!==On?Ae.end+1:Ae.end;continue}if(ke!==-1&&Ee===0)this.copy(ke,ve),this.cursor=typeof Ae==="number"?X.start[Ae]:Ae.start;let _e=Ee!==we||D.semicolon,Ne=Ee<ce-1;if(typeof Ae==="number"){let $e=X.flags[Ae],De=($e&Au)!==0;this.semicolon(X.end[Ae],($e&qa)!==0,_e||De&&Ne)}else if(Ae.type===On){if(Ae.rewritten)this.flush(Ae.textStart),this.insert(Ae.text,Ae.textStart),this.cursor=Ae.textEnd;this.body(Ae)}else if(Ae.type===to)this.body(Ae);else if(Ae.type===io)this.semicolon(Ae.end,Ae.semi,_e||Ne);Ee++}}skipDecl(D,H,X){let Y=this.decls,ce=Y.flags[D];if(this.flush(Y.before[D]),H!==-1&&(ce&qs)!==0)this.copy(H,X),this.cursor=xx(this.css,Y.end[D]);else this.cursor=Y.end[D]+((ce&qa)!==0?1:0)}semicolon(D,H,X){if(H===X)return;if(this.flush(D),X)this.insert(";",D);else this.cursor=D+1}}function xx(D,H){let X=H;for(;X<D.length;X++){let Y=D.charCodeAt(X);if(Y!==Us&&Y!==Za&&Y!==ci&&Y!==Si&&Y!==an)break}return X}var zs="\x00",cu=String.raw`\\(?:[\da-fA-F]{1,6}(?:\r\n|[ \t\n\r\f])?|[^\n\r\f])`,Ra=new RegExp(String.raw`(?:--|-?(?:[A-Za-z_\u0080-\uffff]|${cu}))(?:[\w\-\u0080-\uffff]|${cu})*`,"y"),vx=/\\(?:([\da-fA-F]{1,6})(?:\r\n|[ \t\n\r\f])?|([\s\S]))/g,bx=new Set(["initial","inherit","unset","revert","revert-layer"]);function Sx(D){if(!D.includes("\\"))return D;return D.replace(vx,(H,X,Y)=>{if(X===void 0)return Y;let ce=Number.parseInt(X,16);return ce===0||ce>=55296&&ce<=57343||ce>1114111?"�":String.fromCodePoint(ce)})}function wx(D){return D===Us||D===Za||D===ci||D===an||D===Si}function Vs(D,H,X){for(;;)if(X&&wx(D.charCodeAt(H)))H++;else if(D.startsWith("/*",H)){let Y=D.indexOf("*/",H+2);H=Y===-1?D.length:Y+2}else return H}function pu(D){let H=D.includes("\x00")?D.replaceAll("\x00","�"):D,X=[],Y=0;for(;;){Y=Vs(H,Y,!0);let ce="";for(;;){Ra.lastIndex=Y;let we=Ra.exec(H);if(we===null)return;let ke=Sx(we[0]);if(bx.has(ke.toLowerCase()))return;if(ce+=(ce&&zs)+ke,Y=Vs(H,Ra.lastIndex,!1),H.charCodeAt(Y)!==vu)break;Y=Vs(H,Y+1,!1)}if(X.push(ce),Y=Vs(H,Y,!0),Y===H.length)return X;if(H.charCodeAt(Y)!==Vn)return;Y++}}var sn=0,bi=1,tn=2,Pn=3,uu=4,_u=5,kx=6,za=7,Ka=8,Iu=9,$u=10,Zi=11,en=12,Ga=13,$n=14;function La(D){return D===bi||D===tn}var Fs=1,no=2,so=4,Ha=8,Pu=16,Mu=new Uint8Array(128),Dn=(D,H)=>{for(let X of D)Mu[X.charCodeAt(0)]|=H};Dn(`
|
|
20
|
+
\r\f`,Fs|no|so);Dn(`!"#'():;@[\\]{}/`,no);Dn(`"#'()/;[\\]{}`,so);Dn("0123456789abcdefABCDEF",Ha);Dn(`\r
|
|
21
|
+
"'(/\\`,Pu);function vi(D,H){return D<128&&(Mu[D]&H)!==0}function Ex(D,H){let X=H-1;while(D.charCodeAt(X)===pi)X--;return(H-1-X)%2===1}function Oa(D,H,X){let Y=X;do if(Y=D.indexOf(H,Y+1),Y===-1)Kt();while(Ex(D,Y));return Y+1}class Ru{css;length;pos;kind=sn;from;to;words=0;urlDepths=[];unsafeEnd=-1;constructor(D,H){this.css=D,this.length=D.length,this.pos=H,this.from=H,this.to=H}next(){let D=this.css,H=this.length,X=this.pos;if(this.from=X,X>=H)return this.to=X,this.kind=sn,sn;let Y=X+1,ce,we=D.charCodeAt(X);switch(we){case Us:case ci:case Za:case Si:case an:while(Y<H&&vi(D.charCodeAt(Y),Fs))Y++;ce=bi;break;case wu:ce=Zi;break;case ku:ce=en;break;case Ua:ce=Ga;break;case ja:ce=$n;break;case bu:ce=Iu;break;case Su:ce=$u;break;case Mn:ce=Ka;break;case eo:Y=this.paren(X),ce=Y===X+1?za:kx;break;case js:Y=Oa(D,'"',X),ce=uu;break;case Ws:Y=Oa(D,"'",X),ce=uu;break;case lx:while(Y<H&&!vi(D.charCodeAt(Y),so))Y++;ce=_u;break;case pi:Y=this.escapeEnd(X),ce=Pn;break;default:if(we===nn&&D.charCodeAt(Y)===Rn){let ke=D.indexOf("*/",X+2);if(ke===-1)Kt();Y=ke+2,ce=tn;break}Y=this.wordEnd(Y),this.pushWord(X,Y),ce=Pn}return this.pos=Y,this.to=Y,this.kind=ce,ce}wordEnd(D){let H=this.css,X=this.length;while(D<X){let Y=H.charCodeAt(D);if(vi(Y,no)){if(Y!==nn||H.charCodeAt(D+1)===Rn)break}D++}return D}escapeEnd(D){let H=this.css,X=D+1;while(H.charCodeAt(X)===pi)X++;if((X-D)%2===0||X>=this.length)return X;let Y=H.charCodeAt(X);if(Y===nn||vi(Y,Fs))return X;if(X++,vi(Y,Ha)){while(vi(H.charCodeAt(X),Ha))X++;if(H.charCodeAt(X)===Us)X++}return X}paren(D){let H=this.css,X=H.charCodeAt(D+1);if(this.popWord()&&X!==js&&X!==Ws&&!vi(X,Fs))return Oa(H,")",D);if(D<=this.unsafeEnd)return D+1;let Y=H.indexOf(")",D+1);if(Y===-1)return this.unsafeEnd=this.length,D+1;for(let ce=D+1;ce<Y;ce++)if(vi(H.charCodeAt(ce),Pu)){let we=H.charCodeAt(ce-1);if(we!==ci&&we!==Si&&we!==dx&&we!==mx)return this.unsafeEnd=Y,D+1}return Y+1}pushWord(D,H){let X=++this.words,Y=this.css;if(H-D===3&&Y.charCodeAt(D)===hx&&Y.charCodeAt(D+1)===ux&&Y.charCodeAt(D+2)===px)this.urlDepths.push(X)}popWord(){let D=this.words;if(D===0)return!1;this.words=D-1;let H=this.urlDepths;if(H.length>0&&H[H.length-1]===D)return H.pop(),!0;return!1}}var Cx=1000;class Lu{css;decls;scanner;readDeclsIn;readValues;container;trivia;semicolon=!1;depth=0;kinds=new Uint8Array(256);starts=new Int32Array(256);ends=new Int32Array(256);count=0;closers=[];constructor(D,H,X=!1){this.css=D,this.decls=new Nu(Math.max(64,D.length>>5)),this.readDeclsIn=H,this.readValues=X;let Y=D.charCodeAt(0),ce=Y===yx||Y===gx?1:0;this.scanner=new Ru(D,ce),this.container=new In(Wa,null,ce),this.trivia=ce}parse(){let D=this.scanner,H=this.container;for(;;)switch(D.next()){case bi:break;case tn:this.comment();break;case _u:this.atRule();break;case $n:this.straySemicolon();break;case en:this.close(D.to);break;case Zi:this.count=0,this.rule();break;case sn:if(this.container!==H)Kt();return this.seal(H,this.css.length),H;default:this.declarationOrRule()}}add(D){this.container.nodes.push(D)}open(D){if(++this.depth>Cx)Kt();this.add(D),this.container=D,this.trivia=this.scanner.to,this.semicolon=!1}close(D){let H=this.container,X=H.parent;if(X===null)Kt();this.seal(H,D),this.semicolon=!1,this.depth--,this.container=X,this.trivia=D}seal(D,H){if(D.nodes.length>0)D.semicolon=this.semicolon;D.end=H}comment(){let D=this.scanner,H=new In(Eu,this.container,this.trivia);H.start=D.from,H.end=D.to,this.add(H),this.trivia=D.to}straySemicolon(){let D=this.container.nodes,H=D[D.length-1];if(typeof H==="object"&&H.type===On&&!H.semi)H.semi=!0,H.end=this.scanner.to,this.trivia=this.scanner.to}push(D,H,X){let Y=this.count;if(Y===this.kinds.length)this.kinds=si(this.kinds),this.starts=si(this.starts),this.ends=si(this.ends);this.kinds[Y]=D,this.starts[Y]=H,this.ends[Y]=X,this.count=Y+1}skipTrivia(D,H){while(D<H&&La(this.kinds[D]))D++;return D}trimTrivia(D,H){while(H>D&&La(this.kinds[H-1]))H--;return H}nest(D,H,X){let Y=this.closers;if(H>0&&D===Y[H-1])return H-1;if(D===za)Y[H]=Ka;else if(D===Iu)Y[H]=$u;else if(D===Zi&&X)Y[H]=en;else return H;return H+1}atRule(){let D=this.scanner,{from:H,to:X}=D;if(X===H+1)Kt();let Y=0;this.count=0;let ce;for(;;){if(ce=D.next(),Y=this.nest(ce,Y,Y>0),Y===0&&(ce===$n||ce===Zi||ce===en))break;if(ce===sn)break;this.push(ce,D.from,D.to)}let we=ce===Zi,ke=new In(we?to:io,this.container,this.trivia);if(ke.start=H,ke.name=this.css.slice(H+1,X),this.readDeclsIn?.has(ke.name.toLowerCase()))ke.readDecls=!0;let ve=this.skipTrivia(0,this.count),Ee=this.trimTrivia(ve,this.count);if(ve<Ee)ke.textStart=this.starts[ve],ke.textEnd=this.ends[Ee-1],ke.text=this.cleanText(ve,Ee);if(this.semicolon=!1,we){this.open(ke);return}if(this.add(ke),ce===$n)ke.semi=!0,ke.end=D.from,this.semicolon=!0,this.trivia=D.to;else if(ce===en)ke.end=D.from,D.pos=D.from;else ke.end=ve<Ee?ke.textEnd:D.from,this.trivia=ke.end}declarationOrRule(){let D=this.scanner,H=this.css,X=D.from,Y=D.kind===Pn&&H.charCodeAt(X)===Ln&&H.charCodeAt(X+1)===Ln,ce=-1,we=0,ke=D.kind;this.count=0;for(;;){let ve=this.nest(ke,we,Y&&ce!==-1);if(ve!==we)we=ve;else if(we===0){if(ke===Ga){if(ce===-1)ce=this.count}else if(ke===$n){if(ce===-1)Kt();this.declaration(ce,Y,!0);return}else if(ke===Zi){this.rule();return}else if(ke===en){D.pos=D.from;break}}if(ke===sn){if(we>0)Kt();break}this.push(ke,D.from,D.to),ke=D.next()}if(ce===-1)Kt();this.declaration(ce,Y,!1)}rule(){let D=new In(On,this.container,this.trivia),H=this.trimTrivia(0,this.count);if(H===0)D.start=D.textStart=D.textEnd=this.scanner.from;else D.start=D.textStart=this.starts[0],D.textEnd=this.ends[H-1],D.text=this.cleanText(0,H);this.open(D)}declaration(D,H,X){let Y=this.css,ce=this.kinds,we=this.starts,ke=this.ends;if(ce[0]!==Pn)Kt();for(let qe=1;qe<D;qe++)if(!La(ce[qe]))Kt();let ve=we[0],Ee=Y.charCodeAt(ve);if(Ee===Rn||Ee===cx)ve++;if(!H){let qe=0;for(let He=D+1;He<this.count;He++){let Ze=ce[He];if(Ze===za)qe++;else if(Ze===Ka)qe--;else if(Ze===Ga&&qe===0&&!(ce[He-1]===Pn&&ke[He-1]-we[He-1]===6&&Y.startsWith("progid",we[He-1])))Kt()}}let Ce=X||H?this.count:this.trimTrivia(D+1,this.count),Ae=ke[Ce-1],_e=ke[D],Ne=Ae,$e=null;if(this.readValues||this.container.readDecls)[_e,Ne,$e]=this.value(D+1,Ce,H);let De=(X?qa:0)|(H?Au:0);if(this.readValues){for(let qe=Ce;qe<this.count;qe++)if(ce[qe]===tn)De|=qs}let Oe=this.decls.push(ve,ke[0],_e,Ne,Ae,De);if($e!==null)this.decls.text.set(Oe,$e);if(this.readValues)this.decls.setBefore(Oe,this.trivia);this.add(Oe),this.semicolon=X,this.trivia=X?this.scanner.to:Ae}value(D,H,X){let Y=this.kinds,ce=this.starts,we=this.ends,ke=this.skipTrivia(D,H),ve=H,Ee=this.trimTrivia(ke,H)-1;if(Ee>=ke){let Ce=this.css.slice(ce[Ee],we[Ee]).toLowerCase();if(Ce==="!important"){ve=Ee;while(ve>ke&&Y[ve-1]===bi)ve--}else if(Ce==="important")ve=this.barewordImportant(ke,H,Ee-ke)}if(ve===ke)ke=D;if(!X&&ve>ke&&Y[ve-1]===bi)ve--;if(ve===ke)return[we[D-1],we[D-1],null];return[ce[ke],we[ve-1],this.cleanText(ke,ve)]}barewordImportant(D,H,X){let Y=this.css,ce="",we=H;for(let ke=X;ke>=1;ke--){if(hu(ce)&&this.kinds[D+ke]!==bi)break;we--,ce=Y.slice(this.starts[we],this.ends[we])+ce}return hu(ce)?we:H}cleanText(D,H){let X=this.kinds,Y=D;while(Y<H&&X[Y]!==tn)Y++;if(Y===H)return null;let ce=this.css,we=this.starts,ke=this.ends,ve=ce.slice(we[D],we[Y]),Ee=ve.charCodeAt(ve.length-1);for(;Y<H;Y++){if(X[Y]===tn&&(Y===D||Y===H-1||X[Y-1]===bi||X[Y+1]===bi||Ee===Vn))continue;let Ce=we[Y],Ae=ke[Y];if(Ae>Ce)ve+=ce.slice(Ce,Ae),Ee=ce.charCodeAt(Ae-1)}return ve}}function hu(D){return D.trim().charCodeAt(0)===rx}var fu=Object.freeze([]),Ax=32,Hs=1,Xs=3,Ou=4,ri=new Uint8Array(128);for(let D=48;D<=57;D++)ri[D]=Hs;for(let D=65;D<=90;D++)ri[D]=Xs;for(let D=97;D<=122;D++)ri[D]=Xs;ri[95]=Xs;ri[Ln]=Hs;for(let D of[32,9,10,13,12])ri[D]=Ou;function Gt(D,H){return H<D.length?D.charCodeAt(H):-1}function Nx(D){return D<128?D>=0&&(ri[D]&Hs)!==0:!0}function du(D){return D<128?D>=0&&ri[D]===Xs:!0}function Ks(D){return D>=0&&D<128&&ri[D]===Ou}function Tx(D){return D>=48&&D<=57||D>=97&&D<=102||D>=65&&D<=70}function rn(D,H){if(Gt(D,H)!==pi||H+1>=D.length)return!1;let X=D.charCodeAt(H+1);return X!==ci&&X!==Si&&X!==an}function _x(D,H){let X=Gt(D,H);if(du(X)||rn(D,H))return!0;if(X!==Ln)return!1;let Y=Gt(D,H+1);return du(Y)||Y===Ln||rn(D,H+1)}var Rt=0;function Vu(D,H){let X=H+1,Y=X;while(Y<D.length&&Y-X<6&&Tx(D.charCodeAt(Y)))Y++;if(Y===X){let we=D.codePointAt(X);return Rt=X+(we>65535?2:1),String.fromCodePoint(we)}let ce=Number.parseInt(D.slice(X,Y),16);if(ce===0||ce>=55296&&ce<=57343||ce>1114111)ce=65533;if(Gt(D,Y)===Si&&Gt(D,Y+1)===ci)Y+=2;else if(Ks(Gt(D,Y)))Y++;return Rt=Y,String.fromCodePoint(ce)}function Gs(D,H){let X=D.length;while(H<X){let Y=D.charCodeAt(H);if(Y<128&&(ri[Y]&Hs)===0)break;H++}return H}function Du(D,H){let X=H;if(H=Gs(D,H),!rn(D,H))return Rt=H,D.slice(X,H);let Y="";do Y+=D.slice(X,H)+Vu(D,H),X=Rt,H=Gs(D,Rt);while(rn(D,H));return Rt=H,Y+D.slice(X,H)}function Va(D,H){H=Gs(D,H);while(rn(D,H))Vu(D,H),H=Gs(D,Rt);return H}function Xa(D,H,X){if(X===nn){if(Gt(D,H+1)!==Rn)return H;let Y=D.indexOf("*/",H+2);return Y===-1?D.length:Y+2}if(X===js||X===Ws){for(H++;H<D.length;H++){let Y=D.charCodeAt(H);if(Y===X)break;if(Y===pi)H++;else if(Y===ci||Y===Si||Y===an)break}return H<D.length?H+1:D.length}if(X!==pi)return H;return Math.min(H+2,D.length)}function mu(D,H,X){let Y=1;while(H<D.length){let ce=D.charCodeAt(H);if(ce===X){if(H++,--Y===0)return H}else if(ce===eo&&X===Mn)H++,Y++;else if(ce===nn||ce===js||ce===Ws||ce===pi){let we=Xa(D,H,ce);H=we===H?H+1:we}else H++}return H}function Ds(D,H){return{classes:D??fu,negated:H??fu}}function Da(D,H){if(D===null){let X=[];return X.push(H),X}for(let X=0;X<D.length;X++){let Y=D[X];if(Y.length===H.length&&Y===H)return D}return D.push(H),D}var Ya=0,Qa=1,Ja=2,Ba=["is","where","matches","-webkit-any","-moz-any"];function yu(D,H,X,Y){if(X-H!==Y.length)return!1;for(let ce=0;ce<Y.length;ce++){let we=D.charCodeAt(H+ce);if((we>=65&&we<=90?we+32:we)!==Y.charCodeAt(ce))return!1}return!0}function Ix(D,H,X){for(let Y=H;Y<X;Y++)if(D.charCodeAt(Y)===pi){let ce=Du(D,H).toLowerCase();return ce==="not"?Qa:Ba.includes(ce)?Ja:Ya}if(yu(D,H,X,"not"))return Qa;for(let Y=0;Y<Ba.length;Y++)if(yu(D,H,X,Ba[Y]))return Ja;return Ya}var Bu=[];function Fu(D,H,X){let Y=[],ce=[],we=null,ke=null,ve=!1,Ee=" ";while(H<D.length){let Ce=D.charCodeAt(H);if(Ce===Vn||Ce===Mn&&X>0)break;if(Ks(Ce)){if(H++,ve)Y.push(Ds(we,ke)),we=null,ke=null,ve=!1,Ee=" ";continue}if(Ce===nn&&Gt(D,H+1)===Rn){H=Xa(D,H,Ce);continue}if(Ce===ox||Ce===ax||Ce===fx){if(H++,ve)Y.push(Ds(we,ke)),we=null,ke=null,ve=!1;else if(Y.length===0)Y.push(Ds(null,null));Ee=D[H-1];continue}if(!ve){if(Y.length>0)ce.push(Ee);ve=!0}if(Nx(Ce))H=Va(D,H+1);else if(Ce===vu&&_x(D,H+1))we=Da(we,Du(D,H+1)),H=Rt;else if(Ce===Ua){H++;let Ae=Gt(D,H)===Ua;if(Ae)H++;let _e=H;if(H=Va(D,H),Gt(D,H)!==eo)continue;let Ne=Ae||X>=Ax?Ya:Ix(D,_e,H);if(H++,Ne===Qa){let $e=gu(D,H,X+1);H=Rt;for(let De=0;De<$e.length;De++){let Oe=$e[De].classes;for(let qe=0;qe<Oe.length;qe++)ke=Da(ke,Oe[qe])}}else if(Ne===Ja){let $e=gu(D,H,X+1);H=Rt;let De=$e[0].classes;for(let Oe=0;Oe<De.length;Oe++){let qe=!0;for(let He=1;He<$e.length&&qe;He++)qe=$e[He].classes.includes(De[Oe]);if(qe)we=Da(we,De[Oe])}}else H=mu(D,H,Mn)}else if(Ce===bu)H=mu(D,H+1,Su);else if(rn(D,H))H=Va(D,H);else{let Ae=Xa(D,H,Ce);H=Ae===H?H+1:Ae}}if(ve||Y.length===ce.length)Y.push(Ds(we,ke));return Rt=H,Bu=ce,Y}function gu(D,H,X){let Y=[];for(;;){let ce=Fu(D,H,X);if(H=Rt,Y.push(ce[ce.length-1]),Gt(D,H)!==Vn)break;H++}return Rt=Gt(D,H)===Mn?H+1:H,Y}function $x(D,H,X){while(H<X&&Ks(D.charCodeAt(H)))H++;while(X>H&&Ks(D.charCodeAt(X-1))){let Y=0;while(X-2-Y>=H&&D.charCodeAt(X-2-Y)===pi)Y++;if(Y%2===1)break;X--}return D.slice(H,X)}function Px(D,H){return{text:D,compounds:H,combinators:Bu,subject:H[H.length-1]}}function Mx(D){let H=[];for(let X=0;;){let Y=Fu(D,X,0),ce=Rt,we=$x(D,X,ce);if(we!=="")H.push(Px(we,Y));if(ce>=D.length)return H;X=ce+1}}var Rx=new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function Bs(D,H){let X=D.charCodeAt(H);if(X===ci||X===an)return!0;return X===Si&&D.charCodeAt(H+1)!==ci}class Uu{lineStarts;bytes=new Uint8Array(1024);length=0;lineEmpty=!0;genColumn=0;prevGenColumn=0;prevSrcLine=0;prevSrcColumn=0;srcLineHint=0;constructor(D){let H=[0];for(let X=0;X<D.length;X++)if(Bs(D,X))H.push(X+1);this.lineStarts=H}reserve(D){if(this.length+D<=this.bytes.length)return;let H=new Uint8Array(Math.max(this.bytes.length*2,this.length+D));H.set(this.bytes.subarray(0,this.length)),this.bytes=H}vlq(D){let H=D<0?-D<<1|1:D<<1,X=this.bytes;do{let Y=H&31;if(H>>>=5,H>0)Y|=32;X[this.length++]=Rx[Y]}while(H>0)}segment(D){let H=this.lineStarts,X=this.srcLineHint;if(H[X]<=D)while(X+1<H.length&&H[X+1]<=D)X++;else{X=0;let we=H.length-1;while(X<we){let ke=X+we+1>>1;if(H[ke]<=D)X=ke;else we=ke-1}}this.srcLineHint=X;let Y=X,ce=D-H[X];if(this.reserve(29),!this.lineEmpty)this.bytes[this.length++]=Vn;this.lineEmpty=!1,this.vlq(this.genColumn-this.prevGenColumn),this.vlq(0),this.vlq(Y-this.prevSrcLine),this.vlq(ce-this.prevSrcColumn),this.prevGenColumn=this.genColumn,this.prevSrcLine=Y,this.prevSrcColumn=ce}newline(){this.reserve(1),this.bytes[this.length++]=ja,this.lineEmpty=!0,this.genColumn=0,this.prevGenColumn=0}copy(D,H,X){if(H>=X)return;this.segment(H);for(let Y=H;Y<X;Y++){if(Bs(D,Y)){if(this.newline(),Y+1<X)this.segment(Y+1);continue}this.genColumn++;let ce=D.charCodeAt(Y);if((ce===wu||ce===ku||ce===ja)&&Y+1<X&&!Bs(D,Y+1))this.segment(Y+1)}}insert(D,H){if(D==="")return;this.segment(H);for(let X=0;X<D.length;X++)if(Bs(D,X))this.newline();else this.genColumn++}mappings(){return new TextDecoder().decode(this.bytes.subarray(0,this.length))}}class ju{selector;list=null;constructor(D){this.selector=D}get parsed(){return this.list??=Mx(this.selector),this.list}}class Wu{removed=0;css;decls;options;constructor(D,H,X){this.css=D,this.decls=H,this.options=X}run(D){let{rule:H,atRule:X,decl:Y}=this.options;if(H||X||Y)this.visit(D,!0);while(D.dirty)D.dirty=!1,this.visit(D,!1);if(this.options.discardEmpty!==!1)new qu(this.css,this.decls).children(D,"")}visit(D,H){if(D.type===On)this.visitRule(D);else if(D.type===to||D.type===io)this.visitAtRule(D);let X=D.nodes;if(D.removed||X===null)return;let Y=H?this.options.decl:void 0;for(let ce=0;ce<X.length;ce++){let we=X[ce];if(typeof we==="number"){if(Y)this.visitDecl(D,we,Y);continue}if(we.removed)continue;if(H||we.dirty)we.dirty=!1,this.visit(we,H)}}visitRule(D){let H=this.options.rule;if(!H)return;let X=D.read(this.css),Y=H(new ju(X));if(Y===!1)this.remove(D);else if(typeof Y==="string"&&Y!==X)D.text=Y,D.rewritten=!0,Fa(D)}visitAtRule(D){let H=this.options.atRule;if(!H)return;if(H({name:D.name,params:D.read(this.css),walkDecls:(X)=>{if(!D.readDecls)throw Error(`walkDecls: add "${D.name}" to readDecls`);if(D.nodes!==null)this.walkDecls(D.nodes,X)}})===!1)this.remove(D)}visitDecl(D,H,X){let{css:Y,decls:ce}=this;if(X({prop:Y.slice(ce.start[H],ce.propEnd[H]),value:ce.text.get(H)??Y.slice(ce.valueStart[H],ce.valueEnd[H])})===!1)ce.flags[H]|=_i,ce.removed++,this.removed++,Fa(D)}walkDecls(D,H){let{css:X,decls:Y}=this;for(let ce=0;ce<D.length;ce++){let we=D[ce];if(typeof we==="number"){if(Y.removed>0&&(Y.flags[we]&_i)!==0)continue;H(X.slice(Y.start[we],Y.propEnd[we]),Y.text.get(we)??X.slice(Y.valueStart[we],Y.valueEnd[we]))}else if(!we.removed&&we.nodes!==null)this.walkDecls(we.nodes,H)}}remove(D){D.removed=!0,this.removed++,Fa(D.parent)}}function Fa(D){for(let H=D;H!==null&&!H.dirty;H=H.parent)H.dirty=!0}function Lx(D){return D.name.length===5&&D.name.toLowerCase()==="layer"}class qu{css;decls;scopes=[null];anonymous=0;constructor(D,H){this.css=D,this.decls=H}children(D,H){let X=D.nodes,Y=this.decls.removed>0,ce=0;for(let we=0;we<X.length;we++){let ke=X[we];if(typeof ke==="number"){if(Y&&(this.decls.flags[ke]&(_i|qs))===_i)continue}else{if(ke.removed)continue;if(this.visit(ke,H),ke.removed)continue}ce++}return ce}visit(D,H){if(D.rewritten&&D.text===""){D.removed=!0;return}let X=Lx(D);if(D.nodes===null){let ke=X?pu(D.read(this.css)):void 0;if(ke)for(let ve of ke)this.declare(H,ve);return}let Y,ce=H;if(X){let ke=pu(D.read(this.css));if(ke?.length===1)Y=ke[0];ce=xu(H,Y??zs+this.anonymous++)}else this.scopes.push(null);let we=this.children(D,ce);if(!X)this.scopes.pop();if(we===0&&(!X||D.read(this.css).trim()===""||Y!==void 0&&this.declared(ce)))D.removed=!0;else if(Y!==void 0)this.declare(H,Y)}declared(D){return this.scopes.some((H)=>H?.has(D)===!0)}declare(D,H){let X=this.scopes,Y=X[X.length-1];if(Y===null)Y=new Set,X[X.length-1]=Y;let ce=D;for(let we of H.split(zs))ce=xu(ce,we),Y.add(ce)}}function xu(D,H){return D===""?H:D+zs+H}function Bn(D,H={}){let X=new Lu(D,H.readDecls&&new Set(H.readDecls.map((Ee)=>Ee.toLowerCase())),H.decl!==void 0),Y;try{Y=X.parse()}catch(Ee){if(Ee!==Cu)throw Ee;return{css:D,skipped:!0,removed:0}}let ce=new Wu(D,X.decls,H);ce.run(Y);let{map:we}=H,ke=we?new Uu(D):null,ve={css:new Tu(D,X.decls,ke).emit(Y),skipped:!1,removed:ce.removed};if(ke){let{source:Ee="input.css",includeContent:Ce=!0}=typeof we==="object"?we:{};ve.map={version:3,sources:[Ee],...Ce&&{sourcesContent:[D]},names:[],mappings:ke.mappings()}}return ve}var fo=10,Qu=12,mo=13;var Ju=34,Zu=39,eh=40,Qs=41,th=42,Ox=43,ih=44,lo=45,Vx=46,yo=47,zu=58;var Dx=62;var Bx=91,on=92,Fx=93;var Ux=126;var Ku=Object.freeze([]),jx=32,er=1,tr=3,nh=4,ai=new Uint8Array(128);for(let D=48;D<=57;D++)ai[D]=er;for(let D=65;D<=90;D++)ai[D]=tr;for(let D=97;D<=122;D++)ai[D]=tr;ai[95]=tr;ai[lo]=er;for(let D of[32,9,10,13,12])ai[D]=nh;function Ht(D,H){return H<D.length?D.charCodeAt(H):-1}function Wx(D){return D<128?D>=0&&(ai[D]&er)!==0:!0}function Gu(D){return D<128?D>=0&&ai[D]===tr:!0}function Js(D){return D>=0&&D<128&&ai[D]===nh}function qx(D){return D>=48&&D<=57||D>=97&&D<=102||D>=65&&D<=70}function ln(D,H){if(Ht(D,H)!==on||H+1>=D.length)return!1;let X=D.charCodeAt(H+1);return X!==fo&&X!==mo&&X!==Qu}function zx(D,H){let X=Ht(D,H);if(Gu(X)||ln(D,H))return!0;if(X!==lo)return!1;let Y=Ht(D,H+1);return Gu(Y)||Y===lo||ln(D,H+1)}var Lt=0;function sh(D,H){let X=H+1,Y=X;while(Y<D.length&&Y-X<6&&qx(D.charCodeAt(Y)))Y++;if(Y===X){let we=D.codePointAt(X);return Lt=X+(we>65535?2:1),String.fromCodePoint(we)}let ce=Number.parseInt(D.slice(X,Y),16);if(ce===0||ce>=55296&&ce<=57343||ce>1114111)ce=65533;if(Ht(D,Y)===mo&&Ht(D,Y+1)===fo)Y+=2;else if(Js(Ht(D,Y)))Y++;return Lt=Y,String.fromCodePoint(ce)}function Zs(D,H){let X=D.length;while(H<X){let Y=D.charCodeAt(H);if(Y<128&&(ai[Y]&er)===0)break;H++}return H}function rh(D,H){let X=H;if(H=Zs(D,H),!ln(D,H))return Lt=H,D.slice(X,H);let Y="";do Y+=D.slice(X,H)+sh(D,H),X=Lt,H=Zs(D,Lt);while(ln(D,H));return Lt=H,Y+D.slice(X,H)}function ro(D,H){H=Zs(D,H);while(ln(D,H))sh(D,H),H=Zs(D,Lt);return H}function co(D,H,X){if(X===yo){if(Ht(D,H+1)!==th)return H;let Y=D.indexOf("*/",H+2);return Y===-1?D.length:Y+2}if(X===Ju||X===Zu){for(H++;H<D.length;H++){let Y=D.charCodeAt(H);if(Y===X)break;if(Y===on)H++;else if(Y===fo||Y===mo||Y===Qu)break}return H<D.length?H+1:D.length}if(X!==on)return H;return Math.min(H+2,D.length)}function Hu(D,H,X){let Y=1;while(H<D.length){let ce=D.charCodeAt(H);if(ce===X){if(H++,--Y===0)return H}else if(ce===eh&&X===Qs)H++,Y++;else if(ce===yo||ce===Ju||ce===Zu||ce===on){let we=co(D,H,ce);H=we===H?H+1:we}else H++}return H}function Ys(D,H){return{classes:D??Ku,negated:H??Ku}}function ao(D,H){if(D===null){let X=[];return X.push(H),X}for(let X=0;X<D.length;X++){let Y=D[X];if(Y.length===H.length&&Y===H)return D}return D.push(H),D}var po=0,uo=1,ho=2,oo=["is","where","matches","-webkit-any","-moz-any"];function Xu(D,H,X,Y){if(X-H!==Y.length)return!1;for(let ce=0;ce<Y.length;ce++){let we=D.charCodeAt(H+ce);if((we>=65&&we<=90?we+32:we)!==Y.charCodeAt(ce))return!1}return!0}function Kx(D,H,X){for(let Y=H;Y<X;Y++)if(D.charCodeAt(Y)===on){let ce=rh(D,H).toLowerCase();return ce==="not"?uo:oo.includes(ce)?ho:po}if(Xu(D,H,X,"not"))return uo;for(let Y=0;Y<oo.length;Y++)if(Xu(D,H,X,oo[Y]))return ho;return po}var ah=[];function oh(D,H,X){let Y=[],ce=[],we=null,ke=null,ve=!1,Ee=" ";while(H<D.length){let Ce=D.charCodeAt(H);if(Ce===ih||Ce===Qs&&X>0)break;if(Js(Ce)){if(H++,ve)Y.push(Ys(we,ke)),we=null,ke=null,ve=!1,Ee=" ";continue}if(Ce===yo&&Ht(D,H+1)===th){H=co(D,H,Ce);continue}if(Ce===Dx||Ce===Ox||Ce===Ux){if(H++,ve)Y.push(Ys(we,ke)),we=null,ke=null,ve=!1;else if(Y.length===0)Y.push(Ys(null,null));Ee=D[H-1];continue}if(!ve){if(Y.length>0)ce.push(Ee);ve=!0}if(Wx(Ce))H=ro(D,H+1);else if(Ce===Vx&&zx(D,H+1))we=ao(we,rh(D,H+1)),H=Lt;else if(Ce===zu){H++;let Ae=Ht(D,H)===zu;if(Ae)H++;let _e=H;if(H=ro(D,H),Ht(D,H)!==eh)continue;let Ne=Ae||X>=jx?po:Kx(D,_e,H);if(H++,Ne===uo){let $e=Yu(D,H,X+1);H=Lt;for(let De=0;De<$e.length;De++){let Oe=$e[De].classes;for(let qe=0;qe<Oe.length;qe++)ke=ao(ke,Oe[qe])}}else if(Ne===ho){let $e=Yu(D,H,X+1);H=Lt;let De=$e[0].classes;for(let Oe=0;Oe<De.length;Oe++){let qe=!0;for(let He=1;He<$e.length&&qe;He++)qe=$e[He].classes.includes(De[Oe]);if(qe)we=ao(we,De[Oe])}}else H=Hu(D,H,Qs)}else if(Ce===Bx)H=Hu(D,H+1,Fx);else if(ln(D,H))H=ro(D,H);else{let Ae=co(D,H,Ce);H=Ae===H?H+1:Ae}}if(ve||Y.length===ce.length)Y.push(Ys(we,ke));return Lt=H,ah=ce,Y}function Yu(D,H,X){let Y=[];for(;;){let ce=oh(D,H,X);if(H=Lt,Y.push(ce[ce.length-1]),Ht(D,H)!==ih)break;H++}return Lt=Ht(D,H)===Qs?H+1:H,Y}function Gx(D,H,X){while(H<X&&Js(D.charCodeAt(H)))H++;while(X>H&&Js(D.charCodeAt(X-1))){let Y=0;while(X-2-Y>=H&&D.charCodeAt(X-2-Y)===on)Y++;if(Y%2===1)break;X--}return D.slice(H,X)}function Hx(D,H){return{text:D,compounds:H,combinators:ah,subject:H[H.length-1]}}function lh(D){let H=[];for(let X=0;;){let Y=oh(D,X,0),ce=Lt,we=Gx(D,X,ce);if(we!=="")H.push(Hx(we,Y));if(ce>=D.length)return H;X=ce+1}}function Qx(D,H){let X=new Set;for(let Y of D){let ce=Y.split("/"),we=Y.startsWith("@")?2:1,ke=ce.slice(0,we).join("/"),ve=ce.slice(we).join("/");if(!ve)throw Error(`\`styles.stylesheets\` names "${Y}", not a file in a package.`);let Ee=N(ke,H),Ce=ve.includes("*")?Xx(ve,{cwd:Ee}):[ve].filter((Ae)=>{try{return xo(ir.join(Ee,Ae)),!0}catch{return!1}});if(Ce.length===0)throw Error(`\`styles.stylesheets\` names "${Y}", which matches no file.`);for(let Ae of Ce)X.add(ir.join(Ee,Ae))}return[...X]}function Jx(){return{classes:new Set,properties:new Set,keyframes:new Set}}var go=/^(?:-[a-z]+-)?keyframes$/i;function Zx(D,H){Bn(D,{discardEmpty:!1,rule:({parsed:X})=>{for(let Y of X)for(let{classes:ce,negated:we}of Y.compounds){for(let ke of ce)H.classes.add(ke);for(let ke of we)H.classes.add(ke)}},atRule:({name:X,params:Y})=>{if(go.test(X))H.keyframes.add(ph(Y.trim()))},decl:({prop:X})=>{if(X.startsWith("--"))H.properties.add(X)}})}var ev=/^(["']).*\1$/;function ph(D){return ev.test(D)?D.slice(1,-1):D}var uh=/[\w-]+/g,tv=/(--[\w-]*)(?:\$\{|["'`]\s*\+)/g;function ch(D,H){for(let[X]of D.matchAll(uh))H.words.add(X);for(let[,X]of D.matchAll(tv))H.propertyPrefixes.push(X)}var iv=/var\(\s*(--[\w-]+)/g,nv=8;function sv(D,H,X){let Y=(ke)=>X.words.has(ke)||X.propertyPrefixes.some((ve)=>ke.startsWith(ve)),ce=0,we=0;for(let ke=0;ke<nv;ke++){let ve=new Set,Ee=new Set,Ce=(Ne)=>{for(let[,$e]of Ne.matchAll(iv))ve.add($e);for(let[$e]of Ne.matchAll(uh))Ee.add($e)};Bn(D,{discardEmpty:!1,atRule:({name:Ne,params:$e})=>{if(!go.test(Ne))Ce($e)},decl:({value:Ne})=>{Ce(Ne)}});let Ae=0;if(D=Bn(D,{atRule:({name:Ne,params:$e})=>{if(!go.test(Ne))return;let De=ph($e.trim());if(!H.keyframes.has(De)||Ee.has(De)||X.words.has(De))return;return ce++,Ae++,!1},decl:({prop:Ne})=>{if(!Ne.startsWith("--")||!H.properties.has(Ne)||ve.has(Ne)||Y(Ne))return;return we++,Ae++,!1}}).css,Ae===0)break}return{css:D,rules:ce,declarations:we}}function rv(D){let H=D.startsWith(":is(")?3:D.startsWith(":where(")?6:-1;if(H===-1||!D.endsWith(")"))return;let X=0,Y="";for(let ce=H;ce<D.length;ce++){let we=D[ce];if(Y){if(we==="\\")ce++;else if(we===Y)Y=""}else if(we==='"'||we==="'")Y=we;else if(we==="(")X++;else if(we===")"&&--X===0)return ce===D.length-1?D.slice(H+1,D.length-1):void 0}return}function av(D,H=()=>!1){let X=new Map,Y=(we)=>{let ke=X.get(we);if(ke===void 0)ke=D(we),X.set(we,ke);return ke},ce=(we)=>{if(H(we.text))return!0;let ke=rv(we.text);if(ke!==void 0)return lh(ke).some(ce);return we.compounds.every(({classes:ve})=>!ve.some(Y))};return(we)=>{let ke=0,ve=0;return{css:Bn(we,{rule:({selector:Ce,parsed:Ae})=>{if(!Ce.includes("."))return;let _e=Ae.filter(ce);if(_e.length===Ae.length)return;if(_e.length===0)return ke++,!1;return ve+=Ae.length-_e.length,_e.map(({text:Ne})=>Ne).join(", ")}}).css,rules:ke,selectors:ve,declarations:0}}}var ov=/[\w-]/;function lv(D,H){let X=`.${H.replace(/[^\w-]/g,"\\$&")}`;for(let Y=D.indexOf(X);Y!==-1;Y=D.indexOf(X,Y+1)){let ce=D[Y+X.length];if(ce===void 0||!ov.test(ce))return!0}return!1}function cv(D,H){return H.some((X)=>{if(typeof X==="string")return lv(D,X.startsWith(".")?X.slice(1):X);return X.lastIndex=0,X.test(D)})}function Ie(D){let{spec:H,projectRoot:X,isPruned:Y}=D,ce=K(H);if(!H.styles||!ce)return;let we=Jx();for(let Ne of Qx(H.styles.stylesheets,X))Zx(xo(Ne,"utf8"),we);let ke=we.classes,ve={words:new Set,propertyPrefixes:[]};for(let{code:Ne}of D.files)ch(Ne,ve);for(let Ne of uv(H,X))ch(Ne,ve);let Ee=new Set(H.styles.keep??[]);for(let{code:Ne}of D.files){if(!Ne.includes(ce.marker))continue;for(let $e of ce.text(Ne))Ee.add($e.startsWith(".")?$e.slice(1):$e)}let Ce=(Ne)=>Ne.includes(ce.marker)&&ce.text(Ne).includes(`.${Ne}`),Ae=D.safelist??[],_e=av((Ne)=>ke.has(Ne)&&!Ee.has(Ne)&&Ce(Ne)&&Y(`.${Ne}`),Ae.length>0?(Ne)=>cv(Ne,Ae):void 0);return(Ne)=>{let $e=_e(Ne),De=sv($e.css,we,ve);return{css:De.css,rules:$e.rules+De.rules,selectors:$e.selectors,declarations:De.declarations}}}var pv=/\.(?:svelte|[cm]?[jt]s)$/;function uv(D,H){let X=ir.join(N(D.name,H),D.srcDir);return Yx(X,{recursive:!0,encoding:"utf8"}).filter((Y)=>pv.test(Y)&&!Y.includes("node_modules")).map((Y)=>xo(ir.join(X,Y),"utf8"))}function Fn(D,H,{feature:X,fallback:Y}){return`${u(D).logPrefix} ${X} could not analyze this build (${pe(H)}); ${Y}.`}var dv=/[\\/]node_modules[\\/]/;function mv(D,H,X){let Y=o(H);if(!O(Y)){if(dv.test(Y)&&!X.includes(D.name))return;return{file:Y,code:X}}if(Y!==H)return;try{return{file:Y,code:hv(Y,"utf8")}}catch{return{file:`${Y}.js`,code:X}}}function Be(D,H,X){let Y=_n(D,H),ce=new Map;return{add(we,ke){let ve=mv(D,we,ke);if(ve)ce.set(we,ve);else ce.delete(we)},retain(we){for(let ke of ce.keys())if(!we.has(ke))ce.delete(ke)},async analyze(we,ke,ve){try{let Ee=new Set;for(let _e of we){let Ne=Y.moduleKey(_e);if(Ne)Ee.add(Ne)}let Ce=J(ce.values(),Y),Ae=gv(Y,Ce,ve);return dh(await wa({library:Y,bundled:Ee,modules:Ae?[...Ce.modules,Ae]:Ce.modules,options:ke}),Y)}catch(Ee){return{warning:Fn(D,Ee,X)}}}}}var yv="imported in a way the analysis can't read (an alias?)";function hh(D,H,X){return{component:D,open:!0,props:new Map,slots:null,...X!==void 0&&{location:{file:X,line:1}},reason:H}}function fh(){return{sites:[],openAll:!1,providedContexts:new Set}}function gv(D,H,X){let Y=fh();for(let{id:ce,importer:we,specifier:ke}of X){let ve=D.importKey(ce),Ee=o(we);if(!ve||D.moduleKey(Ee))continue;if((ke===void 0||D.isSpecifier(ke))&&ka(D,H.read.get(Ee),ve))continue;if(ve===D.barrelKey)Y.openAll=!0;else Y.sites.push(hh(ve,yv,Ee))}return Y.openAll||Y.sites.length>0?Y:void 0}function dh(D,H){return{analysis:D,library:H,liveComponents:new Set([...D.liveComponents].map((X)=>Zt.posix.parse(X).name)),isPruned:D.isPruned}}async function Fe(D){try{let H=_n(D.library,D.projectRoot),X=[];for(let Y of D.components){let ce=H.moduleKey(Y)??H.components.get(Y);if(ce)X.push(ce)}return await mh(H,(D.appUsage??J(D.files,H)).modules,X,D.options)}catch(H){return{warning:Fn(D.library,H,D.failure)}}}async function mh(D,H,X,Y){let ce=new Set(H.flatMap((ve)=>ve.sites.map((Ee)=>Ee.component))),we=new Set(X),ke=fh();for(let ve of we)if(!ce.has(ve))ke.sites.push(hh(ve,"not found in `content`"));return dh(await wa({library:D,bundled:we,modules:[...H,ke],options:Y}),D)}function Ue(D,H,X){return[" Prop-aware:",...gh(D,X),` Classes pruned by props: ${H.size}`]}function yh(D,H){for(let[X,Y]of D.library.components)if(Y===H)return X;return Zt.posix.parse(H).name}function gh(D,H){let X=[],Y=(we)=>Zt.isAbsolute(we)?Zt.relative(H,we):we,ce=[...D.analysis.usages].filter(([,we])=>we.appSites.length>0).sort(([we],[ke])=>we.localeCompare(ke));for(let[we,ke]of ce){let ve=yh(D,we),Ee=ke.appSites.length;X.push(` ${ve} (${Ee} call site${Ee===1?"":"s"})`);let Ce=ke.appSites.find((Ne)=>Ne.open);if(Ce){let Ne=Ce.location?` at ${Y(Ce.location.file)}:${Ce.location.line}`:"";X.push(` every variant kept: ${Ce.reason??"open"}${Ne}`);continue}if(ke.open){X.push(` every variant kept: ${ke.openReason??"open"}`);continue}let Ae=new Set(ke.appSites.flatMap((Ne)=>[...Ne.props.keys()])),_e=(Ne)=>{let $e=ke.unknownBecause.get(Ne);return $e?`: ${$e}`:""};for(let Ne of[...Ae].sort()){let $e=ke.props.get(Ne);if($e===void 0)continue;let De=ke.omitted.has(Ne)?" (+ default)":"",Oe=$e===e?_e(Ne):"";X.push(` ${Ne.padEnd(16)} ${gp($e)}${De}${Oe}`)}for(let[Ne,$e]of[...ke.props].sort(([De],[Oe])=>De.localeCompare(Oe))){if(Ae.has(Ne)||$e!==e)continue;if(!ke.unknownBecause.has(Ne))continue;X.push(` ${Ne.padEnd(16)} dynamic${_e(Ne)}`)}}return X}async function he(D){let H,X,Y;try{X=_n(D.library,D.projectRoot),H=J(D.files,X,D.resolvedImports);let $e=H.modules.some((De)=>De.openAll)?(await E(X.src)).filter(O):H.modules.flatMap((De)=>De.sites.map((Oe)=>Oe.component));Y=await mh(X,H.modules,$e,{})}catch($e){return{warning:Fn(D.library,$e,D.failure)}}let ce=fv(X.src),we=new Map,ke=0,ve=[],Ee=[],Ce,Ae=($e,De,Oe)=>{ke+=Oe.edits,we.set($e,{code:Oe.code,map:Le(Oe.mapped,De.model.code,Zt.basename($e))})};try{for(let $e of Y.analysis.liveComponents){let De=Y.analysis.scopeFor($e);if(!De)continue;let Oe=Z(De,D.options);Ae(Zt.join(ce,$e),De,Oe),ve.push({key:$e,edits:Oe.edits,dropped:Oe.dropped,unrendered:()=>Oe.unrendered().map((qe)=>Zt.posix.join(Zt.posix.dirname($e),qe))})}for(let $e of H.closed){let De=H.scopeFor($e);if(!De)continue;let Oe=Z(De,D.options);if(Ee.push({file:$e,edits:Oe.edits}),Oe.edits>0)Ae(w($e)??$e,De,Oe)}Ce=D.library.tailwind===!0?await(await import("./variant-tables-tr82shep.js")).specializeTables(X,[...H.read.values()],($e)=>Y.analysis.scopeFor($e)):{modules:new Map,pruned:0,emptied:0,keys:0,compounds:0,kept:new Map};for(let[$e,{mapped:De,source:Oe}]of Ce.modules){let qe=Zt.join(ce,$e);we.set(qe,{code:De.text,map:Le(De,Oe,Zt.basename(qe))})}}catch($e){return{warning:Fn(D.library,$e,D.failure)}}let _e=new Map([...H.read].map(([$e,De])=>[w($e)??$e,De])),Ne;try{Ne=Ie({spec:D.library,projectRoot:D.projectRoot,isPruned:Y.isPruned,files:D.files,safelist:D.safelist})}catch($e){return{warning:Fn(D.library,$e,D.failure)}}return{...Ne&&{pruneStyles:Ne},sources:we,edits:ke,closed:H.closed,readImport:($e,De)=>{let Oe=X.importKey(De);return!Oe||ka(X,_e.get($e),Oe)},apps:Ee.filter(($e)=>$e.edits>0).length,renderable:Y.analysis.liveComponents,tables:{...Ce,modules:Ce.modules.size},report:()=>xv(Y,ve,Ee,Ce,D.projectRoot,D.failure.feature)}}function xv(D,H,X,Y,ce,we){let ke=(Oe)=>yh(D,Oe),{spec:ve}=D.library,Ee=H.filter((Oe)=>Oe.edits>0).sort((Oe,qe)=>qe.edits-Oe.edits||Oe.key.localeCompare(qe.key)),Ce=Ee.reduce((Oe,qe)=>Oe+qe.edits,0),Ae=Ee.reduce((Oe,qe)=>Oe+qe.dropped,0),_e=Math.max(0,...Ee.map(({key:Oe})=>ke(Oe).length)),Ne=new Set(Ee.flatMap(({unrendered:Oe})=>Oe().filter((qe)=>!D.analysis.liveComponents.has(qe)))),$e=["",`${ve.tool===we?we:`${ve.tool} ${we}`} report`,` Rewrote ${Ee.length} of ${H.length} ${ve.label} components (${Ce} edits, ${Ae} declarations dropped):`];for(let Oe of Ee){let qe=Oe.unrendered().length>0?` no longer renders ${Oe.unrendered().map(ke).join(", ")}`:"";$e.push(` ${ke(Oe.key).padEnd(_e)} ${String(Oe.edits).padStart(4)} edit${Oe.edits===1?" ":"s"}${qe}`)}let De=X.filter((Oe)=>Oe.edits>0).map((Oe)=>({...Oe,name:Zt.relative(ce,Oe.file)})).sort((Oe,qe)=>qe.edits-Oe.edits||Oe.name.localeCompare(qe.name));if(X.length>0){$e.push(` Rewrote ${De.length} of ${X.length} app components whose every call site is known:`);let Oe=Math.max(0,...De.map(({name:qe})=>qe.length));for(let qe of De)$e.push(` ${qe.name.padEnd(Oe)} ${String(qe.edits).padStart(4)} edit${qe.edits===1?"":"s"}`)}if(Y.modules.size>0)$e.push(` Rewrote ${Y.pruned+Y.emptied} tailwind-variants tables in ${Y.modules.size} modules: ${Y.pruned} pruned (${Y.keys} variant keys, ${Y.compounds} compound variants), ${Y.emptied} nothing calls emptied`);for(let[Oe,qe]of[...Y.kept].sort())$e.push(` every class kept: ${Oe} (${qe})`);return $e.push(` No longer bundled (${Ne.size}): ${[...Ne].map(ke).sort().join(", ")||"none"}`," Call sites:",...gh(D,ce)),$e}async function Xe(D,H,X,Y){try{let{writeTailwindSources:ce}=await import("./tailwind-sources-w3ata1x1.js");await ce(_n(D,H),H,X&&{sources:X.sources,liveComponents:X.renderable});return}catch(ce){return`${u(D).logPrefix} ${Y.feature} could not write ${D.label} for Tailwind (${pe(ce)}); its \`@source\` may be out of date.`}}
|
|
22
|
+
export{I,U,fe,P,A,e,t,n,r,d,a,i,Q,J,Ve,Z,Ie,Be,Fe,Ue,he,Xe};
|