sveld 0.40.1 → 0.40.3

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/browser.js CHANGED
@@ -1,119 +1,119 @@
1
- function bd(e){return e}var De=Symbol("sveld.parsedComponentTypeScriptMetadata"),Mo=Symbol("sveld.parsedComponentPropIgnores");function Oo(e){return e[De]}var xr=Array(2048).fill(void 0);function vd(){xr.fill(void 0)}function Bo(e,t,n,i){let r=i&2047,s=xr[r];if(s!==void 0&&s.length===n-t&&e.startsWith(s,t))return s;let l=e.slice(t,n);return xr[r]=l,l}var kt="",Ce=[0],Ve=0,Ct=0,qe;function Fo(e){vd(),kt=e,Ce=[0],Ve=0,Ct=0,qe=void 0}function Er(e){while(Ve<=e){let t=kt.indexOf(`
2
- `,Ve);if(t===-1){Ve=Number.POSITIVE_INFINITY;return}Ve=t+1,Ce.push(Ve)}}function jo(e){let t=[0],n=e.indexOf(`
1
+ function vd(e){return e}var $e=Symbol("sveld.parsedComponentTypeScriptMetadata"),Fo=Symbol("sveld.parsedComponentPropIgnores");function jo(e){return e[$e]}var br=Array(2048).fill(void 0);function Sd(){br.fill(void 0)}function qo(e,t,n,i){let r=i&2047,s=br[r];if(s!==void 0&&s.length===n-t&&e.startsWith(s,t))return s;let a=e.slice(t,n);return br[r]=a,a}var kt="",Ce=[0],Ge=0,Ct=0,Ve;function Vo(e){Sd(),kt=e,Ce=[0],Ge=0,Ct=0,Ve=void 0}function vr(e){while(Ge<=e){let t=kt.indexOf(`
2
+ `,Ge);if(t===-1){Ge=Number.POSITIVE_INFINITY;return}Ge=t+1,Ce.push(Ge)}}function Go(e){let t=[0],n=e.indexOf(`
3
3
  `);while(n!==-1)t.push(n+1),n=e.indexOf(`
4
- `,n+1);return t}function Wn(e,t,n){let i=0,r=e.length-1;if(t>=e[n])i=n;else r=n-1;if(i<r&&t<e[i+1])r=i;while(i<r){let s=i+r+1>>>1;if(e[s]<=t)i=s;else r=s-1}return i}function ke(e){return Er(e),Ct=Wn(Ce,e,Ct),{line:Ct+1,column:e-Ce[Ct],character:e}}var gr=/\r\n?|\n|\u2028|\u2029/g,Sd=/[\r\u2028\u2029]/;function qo(e){if(qe===void 0){qe=Sd.test(kt)?[]:null,gr.lastIndex=0;while(qe!==null&&gr.exec(kt)!==null)qe.push(gr.lastIndex)}if(qe===null)return Er(e),Wn(Ce,e,Ct);let t=0,n=qe.length;while(t<n){let i=t+n>>>1;if(qe[i]<=e)t=i+1;else n=i}return t}function ot(e){let{line:t,column:n}=ke(e);return{line:t,column:n}}function Vo(e){while(Ce.length<=e+1&&Ve!==Number.POSITIVE_INFINITY)Er(Ve);if(e>=Ce.length)return;let t=e+1<Ce.length?Ce[e+1]-1:kt.length;return kt.slice(Ce[e],t)}function br(e){let t,n=0;return(i)=>(t??=jo(e),n=Wn(t,i,n),{line:n+1,column:i-t[n]})}function Ne(e){return typeof e==="object"&&e!==null&&typeof at(e).type==="string"}function at(e){return e}function zt(e,t){let n=at(e);for(let i in n){let r=n[i];if(Array.isArray(r)){for(let s=0;s<r.length;s++)if(Ne(r[s]))r[s]=t(r[s])}else if(Ne(r))n[i]=t(r)}}function zn(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}function vr(e){let t=[];return lt(e,t),t}function lt(e,t){switch(e.type){case"Identifier":t.push(e);return;case"ObjectPattern":for(let n of e.properties)lt(n.type==="RestElement"?n.argument:n.value,t);return;case"ArrayPattern":for(let n of e.elements)if(n!==null)lt(n,t);return;case"RestElement":lt(e.argument,t);return;case"AssignmentPattern":lt(e.left,t);return;case"TSParameterProperty":lt(e.parameter,t);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":lt(e.expression,t)}}function Sr(e,t){if(e.type!=="Identifier")return!1;if(t===null)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"Property":case"PropertyDefinition":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"MetaProperty":case"ImportAttribute":case"ExportAllDeclaration":case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":case"TSExportAssignment":return e===t.expression;case"TSEnumMember":return e===t.initializer;case"TSParameterProperty":case"TSEnumDeclaration":case"TSImportEqualsDeclaration":return!0;default:return!t.type.startsWith("TS")}}var pt={Root:["module","instance","fragment","css"],Script:["attributes","content"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:["expression"],HtmlTag:["expression"],ConstTag:["declaration"],DeclarationTag:["declaration"],DebugTag:["identifiers"],RenderTag:["expression"],AttachTag:["expression"],Attribute:["value"],SpreadAttribute:["expression"],AnimateDirective:["expression"],BindDirective:["expression"],ClassDirective:["expression"],LetDirective:["expression"],OnDirective:["expression"],StyleDirective:["value"],TransitionDirective:["expression"],UseDirective:["expression"],Component:["attributes","fragment"],TitleElement:["attributes","fragment"],SlotElement:["attributes","fragment"],RegularElement:["attributes","fragment"],SvelteBody:["attributes","fragment"],SvelteBoundary:["attributes","fragment"],SvelteComponent:["expression","attributes","fragment"],SvelteDocument:["attributes","fragment"],SvelteElement:["tag","attributes","fragment"],SvelteFragment:["attributes","fragment"],SvelteHead:["attributes","fragment"],SvelteOptions:["attributes","fragment"],SvelteSelf:["attributes","fragment"],SvelteWindow:["attributes","fragment"],IfBlock:["test","consequent","alternate"],EachBlock:["expression","context","key","body","fallback"],AwaitBlock:["expression","pending","value","then","error","catch"],KeyBlock:["expression","fragment"],SnippetBlock:["expression","parameters","body"],StyleSheet:["attributes","children"],Rule:["prelude","block"],Atrule:["block"],SelectorList:["children"],ComplexSelector:["children"],RelativeSelector:["combinator","selectors"],Combinator:[],TypeSelector:[],IdSelector:[],ClassSelector:[],AttributeSelector:[],PseudoElementSelector:["args"],PseudoClassSelector:["args"],Percentage:[],Nth:[],NestingSelector:[],Block:["children"],Declaration:[],Program:["body"],ExpressionStatement:["expression"],BlockStatement:["body"],StaticBlock:["body"],EmptyStatement:[],DebuggerStatement:[],WithStatement:["object","body"],ReturnStatement:["argument"],LabeledStatement:["label","body"],BreakStatement:["label"],ContinueStatement:["label"],IfStatement:["test","consequent","alternate"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],CatchClause:["param","body"],WhileStatement:["test","body"],DoWhileStatement:["body","test"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","typeParameters","params","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],ArrowFunctionExpression:["typeParameters","params","returnType","body"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassBody:["body"],MethodDefinition:["decorators","key","typeParameters","value"],PropertyDefinition:["decorators","key","typeAnnotation","value"],Property:["decorators","key","value"],ThisExpression:[],Super:[],Literal:[],Identifier:["decorators","typeAnnotation"],PrivateIdentifier:[],ArrayExpression:["elements"],ObjectExpression:["properties"],UnaryExpression:["argument"],UpdateExpression:["argument"],BinaryExpression:["left","right"],LogicalExpression:["left","right"],AssignmentExpression:["left","right"],MemberExpression:["object","property"],ConditionalExpression:["test","consequent","alternate"],CallExpression:["callee","typeArguments","arguments"],NewExpression:["callee","typeArguments","arguments"],SequenceExpression:["expressions"],TemplateLiteral:["quasis","expressions"],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],SpreadElement:["argument"],RestElement:["decorators","argument","typeAnnotation"],YieldExpression:["argument"],AwaitExpression:["argument"],ImportExpression:["source","options","arguments"],ChainExpression:["expression"],ParenthesizedExpression:["expression"],MetaProperty:["meta","property"],ObjectPattern:["decorators","properties","typeAnnotation"],ArrayPattern:["decorators","elements","typeAnnotation"],AssignmentPattern:["decorators","left","right"],ImportDeclaration:["specifiers","source","attributes"],ImportSpecifier:["imported","local"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportAttribute:["key","value"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExportDefaultDeclaration:["declaration"],ExportAllDeclaration:["exported","source","attributes"],Decorator:["expression"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterDeclaration:["params"],TSTypeParameterInstantiation:["params"],TSTypeParameter:["constraint","default"],TSAnyKeyword:[],TSBigIntKeyword:[],TSBooleanKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSNamedTupleMember:["label","elementType"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSLiteralType:["literal"],TSTypeReference:["typeName","typeArguments"],TSQualifiedName:["left","right"],TSTypeQuery:["exprName","typeArguments"],TSImportType:["argument","qualifier","typeArguments"],TSTypeLiteral:["members"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSFunctionType:["typeParameters","parameters","typeAnnotation"],TSConstructorType:["typeParameters","parameters","typeAnnotation"],TSIndexSignature:["decorators","parameters","typeAnnotation"],TSTypePredicate:["parameterName","typeAnnotation"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSDeclareFunction:["id","typeParameters","params","returnType"],TSDeclareMethod:["typeParameters","params","returnType"],TSParameterProperty:["parameter"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSNonNullExpression:["expression"],TSInstantiationExpression:["expression","typeArguments"]};var w=[],wt={...pt,FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],ArrowFunctionExpression:["params","body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],MethodDefinition:["decorators","key","value"],PropertyDefinition:["decorators","key","value"],Identifier:["decorators"],CallExpression:["callee","arguments"],NewExpression:["callee","arguments"],TaggedTemplateExpression:["tag","quasi"],RestElement:["decorators","argument"],ObjectPattern:["decorators","properties"],ArrayPattern:["decorators","elements"],TSTypeAnnotation:w,TSTypeParameterDeclaration:w,TSTypeParameterInstantiation:w,TSTypeParameter:w,TSArrayType:w,TSTupleType:w,TSNamedTupleMember:w,TSOptionalType:w,TSRestType:w,TSUnionType:w,TSIntersectionType:w,TSConditionalType:w,TSInferType:w,TSParenthesizedType:w,TSTypeOperator:w,TSIndexedAccessType:w,TSMappedType:w,TSLiteralType:w,TSTypeReference:w,TSTypeQuery:w,TSImportType:w,TSTypeLiteral:w,TSPropertySignature:w,TSMethodSignature:w,TSCallSignatureDeclaration:w,TSConstructSignatureDeclaration:w,TSFunctionType:w,TSConstructorType:w,TSIndexSignature:w,TSTypePredicate:w,TSInterfaceDeclaration:w,TSInterfaceBody:w,TSExpressionWithTypeArguments:w,TSTypeAliasDeclaration:w,TSNamespaceExportDeclaration:w,TSDeclareFunction:["id"],TSDeclareMethod:w,TSAsExpression:["expression"],TSSatisfiesExpression:["expression"],TSTypeAssertion:["expression"],TSInstantiationExpression:["expression"]},Td=Object.assign(Object.create(null),pt),Cd=Object.assign(Object.create(null),wt),Go=[],Ut=Symbol("sveast.walk.stop"),ie=Symbol("sveast.walk.skip");function z(e,t,n){Un(e,null,null,null,t,kd(n))}function kd(e){if(e===void 0||e===pt)return Ad;if(e===wt)return Pd;return(t)=>wd(e,t.type)}function wd(e,t){return Object.hasOwn(e,t)?e[t]:void 0}var Nv=Object.freeze([]);function Un(e,t,n,i,r,s){let l=s(e);if(l===void 0)throw Error(`unknown node type: ${e.type}`);let o=r.enter?.(e,t,n,i);if(o===Ut)return!0;if(o!==ie){if(o!==e&&Ne(o))return _d(o,t,n,i,r,s);let a=at(e);for(let p=0;p<l.length;p++){let c=l[p],u=a[c];if(Array.isArray(u))for(let f=0;f<u.length;f++){let h=u[f];if(Ne(h)&&Un(h,e,c,f,r,s))return!0}else if(Ne(u)&&Un(u,e,c,null,r,s))return!0}}return r.leave?.(e,t,n,i)===Ut}function Ad(e){let t=e.type;if(t==="Identifier")return e.typeAnnotation===void 0&&e.decorators===void 0?Go:pt.Identifier;if(t==="Literal")return pt.Literal;if(t==="Text")return pt.Text;return Td[t]}function Pd(e){let t=e.type;if(t==="Identifier")return e.decorators===void 0?Go:wt.Identifier;if(t==="Literal")return wt.Literal;if(t==="Text")return wt.Text;return Cd[t]}function _d(e,t,n,i,r,s){if(t===null||n===null)throw Error("walk can't replace the node it was called with");let l=at(t),o=l[n];if(i===null)l[n]=e;else if(Array.isArray(o))o[i]=e;return Un(e,t,n,i,r,s)}function $e(e){return typeof e==="object"&&e!==null}function Ge(e){return $e(e)&&e.type==="Literal"}function b(e){return $e(e)&&e.type==="Identifier"&&typeof e.name==="string"}function He(e){return $e(e)&&e.type==="MemberExpression"}function re(e){return $e(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Dd(e){return $e(e)&&e.type==="CallExpression"}function me(e,t){return Dd(e)&&b(e.callee)&&e.callee.name===t}function At(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?At(e.expression):e}function Ho(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?e.typeAnnotation:void 0}function Nd(e){return $e(e)&&e.type==="NewExpression"}function Tr(e,t){return Nd(e)&&b(e.callee)&&e.callee.name===t}function Wo(e){if(!$e(e))return null;if(e.type==="Literal")return e.value==null?null:String(e.value);if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1)return t[0]?.value?.cooked??null}return null}function K(e){if(b(e))return e.name;if(Ge(e))return e.value==null?void 0:String(e.value);return}var $d=new Set(["Component","SvelteComponent","SvelteSelf"]),Id=new Set(["RegularElement","SvelteElement"]);function Pt(e){return $d.has(e)}function ct(e){return Id.has(e)}function Kn(e,t,n=0,i=e.length,r=0){let s=r;for(let l=n;l<i;l++){let o=e.charCodeAt(l);if(o===34||o===39||o===96){l=Ld(e,l,i);continue}if(o===123||o===40||o===91||o===60)s++;else if(o===125||o===41||o===93||o===62&&e.charCodeAt(l-1)!==61){if(s>0)s--}if(t?.(l,s)===!0)break}return s}function Ld(e,t,n){let i=e.charCodeAt(t);for(let r=t+1;r<n;r++){let s=e.charCodeAt(r);if(s===92)r++;else if(s===i)return r}return n-1}function B(e,t){let n=[],i=0;return Kn(e,(r,s)=>{if(s===0&&t.includes(e[r]))n.push(e.slice(i,r)),i=r+1;return!1}),n.push(e.slice(i)),n}function Cr(e,t,n=0){let i=-1;return Kn(e,(r,s)=>{if(t(r,s))i=r;return i!==-1},n),i}function Kt(e,t){return Cr(e,(n,i)=>i===0&&t.includes(e[n]))}function _t(e){return Cr(e,(t,n)=>n===0&&e[t]==="="&&e[t+1]===">")}function We(e,t){return Cr(e,(n,i)=>i===0,t)}function kr(e){let t=e.trim();return t.startsWith("[")&&We(t,0)===t.length-1}function zo(e){if(!e)return;let t=_t(e);if(t===-1)return;return e.slice(t+2).trim()||void 0}var Rd=new Set(["null","undefined"]);function Jn(e){if(!e)return!1;let t=B(e,"|").map((i)=>i.trim()).filter((i)=>i&&!Rd.has(i));if(t.length!==1)return!1;let[n]=t;while(n.startsWith("(")&&We(n,0)===n.length-1)n=n.slice(1,-1).trim();return(n.startsWith("(")||n.startsWith("<"))&&_t(n)!==-1}function wr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLocator:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],additionalImportedTypes:new Map,wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,jsDocSlots:new Map,renderedSlots:new Set,slotsUntracked:!1,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,typedDispatcherEventNames:new Set,explicitDefaultPropNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,typeCasts:{constAssertions:new WeakSet,typeAssertions:new WeakMap},contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:void 0,sveldIgnoreDirectives:new Map,propIgnoreCodes:new Map}}function Ar(e,t){return e.propLocalToPublicName.get(t)??t}function Xn(e,t,n=t){e.propLocalToPublicName.set(n,t)}function Pr(e,t){return e.props.get(Ar(e,t))}function Jt(e,t){return Pr(e,t)?.type}var Uo={"prop-unknown-type":{severity:"warning",label:"Props without inferred types"},"context-any-type":{severity:"warning",label:"Context values typed as `any`"},"bind-this-type-mismatch":{severity:"warning",label:"bind:this props declared with an element type they're never bound to"},"slot-missing-type":{severity:"warning",label:"@slot/@snippet tags missing a {Type} annotation"},"slot-not-rendered":{severity:"warning",label:"@slot/@snippet tags for slots the component doesn't render"},"event-no-source":{severity:"warning",label:"@event tags with no dispatch or callback"},"dispatch-escapes":{severity:"warning",label:"Dispatchers passed to functions sveld can't follow"},"example-compile-error":{severity:"error",label:"@example blocks that failed to compile"},"example-syntax-error":{severity:"error",label:"@example blocks that failed to parse"},"syntax-skipped":{severity:"error",label:"Component syntax sveld skipped"},"type-syntax-error":{severity:"error",label:"JSDoc types that aren't valid TypeScript"},"rest-props-unresolved":{severity:"warning",label:"$$restProps spread only onto components"},"context-duplicate-key":{severity:"warning",label:"Duplicate setContext keys"},"context-key-unresolved":{severity:"warning",label:"setContext keys sveld couldn't resolve"},"context-value-unresolved":{severity:"warning",label:"setContext values sveld couldn't describe"},"spread-unresolved":{severity:"warning",label:"Unresolved spreads widened to Record<string, any>"},"export-unresolved":{severity:"warning",label:"Unresolved named export specifiers"},"module-export-conflict":{severity:"warning",label:"Module-script exports colliding with generated names"},"extend-props-target-missing":{severity:"error",label:"@extends/@extendProps targets that couldn't be verified"},"extend-props-duplicate":{severity:"warning",label:"Duplicate @extends/@extendProps tags"},"extend-props-override":{severity:"warning",label:"Own props overriding an @extends target's prop"},"jsdoc-unknown-tag":{severity:"warning",label:"Unknown JSDoc tags"},"typedef-duplicate":{severity:"warning",label:"Duplicate @typedef/@callback names"},"property-duplicate":{severity:"warning",label:"Duplicate @property names"},"generics-conflict":{severity:"warning",label:"Duplicate @generics/@template names"},"event-description-ambiguous":{severity:"warning",label:"Text after an @event read as the next tag's description"},"jsdoc-tag-dropped":{severity:"warning",label:"Passthrough JSDoc tags that couldn't attach"},"internal-typedef-referenced":{severity:"error",label:"Public types referencing an @internal typedef"},"cross-file-unresolved":{severity:"warning",label:"Imports a standalone parse couldn't read"},"export-ambiguous":{severity:"warning",label:"Ambiguous `export *` names left out of the entry exports"}};function Yn(e){return{...e,code:_r[e.kind],severity:Uo[e.kind].severity}}var Md=Object.keys(Uo),_r=Object.fromEntries(Md.map((e)=>[e,`sveld/${e}`]));function D(e,t,n,i,r){e.diagnosticRecords.push(Dr(e,t,n,i,r))}function Dr(e,t,n,i,r){return Yn({component:e.componentFilePath,kind:t,name:n,message:i,...r?{source:r}:{},...Nr(e,t,n)?{ignored:!0}:{}})}function Ko(e,t){return`${e}:${t}`}function ze(e,t,n,i){if(!i||i.length===0)return;let r=Ko(t,n),s=e.sveldIgnoreDirectives.get(r)??new Set;for(let l of i)s.add(l);e.sveldIgnoreDirectives.set(r,s)}function Xt(e,t,n){if(ze(e,"prop-unknown-type",t,n),ze(e,"bind-this-type-mismatch",t,n),n&&n.length>0)e.propIgnoreCodes.set(t,n)}function Nr(e,t,n){let i=e.sveldIgnoreDirectives.get(Ko(t,n));if(!i)return!1;return i.has("")||i.has(_r[t])}var $r="/**",Jo="*",Qn="*/",Od="```",Ir=/^\s+/,Xo=/\s/,Bd=/^@[^\s/]+(?=\s|$)/,Fd=/^@(\S+)\s*/,jd=new Set(["extends","extendProps","generics","template","typedef"]);function Yt(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!Xo.test(e[t]))break;t++}return t}function qd(e,t){let n=e.slice(Yt(e)),i=!1;if(t)n=n.slice($r.length),i=!0;else if(n.startsWith(Jo)&&!n.startsWith(Qn))n=n.slice(Jo.length),i=!0;let r=n.slice(0,Yt(n));n=n.slice(r.length);let s=n.trimEnd(),l=s.endsWith(Qn)?s.slice(0,-Qn.length).trimEnd():n;return{indent:i?r.slice(1):r,content:l}}function Vd(e,t,n){let i=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,i)}function Gd(e){let t=[],n=0;while(!0){let i=e.indexOf($r,n);if(i===-1)break;let r=e.lastIndexOf(`
5
- `,i-1)+1;if(e.charCodeAt(i+$r.length)===42||e.slice(r,i).trim()!==""){n=i+1;continue}let s=[],l=r,o=!1,a=0;while(l<=e.length){let p=e.indexOf(`
6
- `,l),c=p===-1?e.length:p,u=Vd(e,l,c),{indent:f,content:h}=qd(u,s.length===0);s.push({raw:u,start:l,number:s.length,indent:f,content:h});let m=u.trimEnd();if(m.endsWith(Qn)){o=!0,a=l+m.length,n=c;break}if(p===-1)break;l=p+1}if(!o)break;t.push({start:i,end:a,lines:s})}return t}function Hd(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function Wd(e){let t=[[]],n=!1;for(let i of e){if(Bd.test(i.content)&&!n)t.push([i]);else t[t.length-1].push(i);if(Qt(i.content))n=!n}return t}function Qt(e){return zd(e,Od)%2===1}function zd(e,t){let n=0,i=e.indexOf(t);while(i!==-1)n++,i=e.indexOf(t,i+t.length);return n}function Yo(e){return e.map((t)=>t.indent+t.content).join(`
7
- `)}function Ud(e){let t=0;while(t<e.length-1&&e[t].content.trim()==="")t++;if(e[t].content[0]!=="{")return null;let n=e.slice(t).map((a)=>a.content).join(`
8
- `),i=We(n,0);if(i===-1)return null;let r=[],s=i+1;for(let a=t;s>0;a++){let p=e[a].content.length;r.push(Math.min(s,p)),s-=p+1}let l=t+r.length-1;return{type:r.map((a,p)=>{let c=t+p,u=e[c].content.slice(0,a);if(e[c].content=e[c].content.slice(a).replace(Ir,""),c>0)e[c].continuesType=!0;return p===0?u:e[c].indent+u}).join(`
9
- `).slice(1,-1),endIndex:l}}function Kd(e){let t=e.content.match(Ir)?.[0]??"",n=e.content.slice(t.length),i=0,r=0,s=n[0]==='"'||n[0]==="'"?n.indexOf(n[0],1):-1;if(s===-1)for(let c of n){if(i===0&&Xo.test(c))break;if(c==="[")i++;if(c==="]")i--;r++}else r=s+1;let l=i===0?n.slice(0,r):"";if(!l)return null;let o=l,a=!1,p;if(l.startsWith("[")&&l.endsWith("]")){a=!0;let u=l.slice(1,-1).split("=");if(o=u[0].trim(),u.length>1)p=u.slice(1).join("=").trim();if(!o)return null}if(o.length>1&&(o[0]==='"'||o[0]==="'")&&o[o.length-1]===o[0])o=o.slice(1,-1);return e.content=n.slice(r).replace(Ir,""),{name:o,optional:a,default:p}}function Jd(e){let t=e[0],n=t.content.match(Fd),i=n?n[1]:"",r=n?t.content.slice(n[0].length):t.content,s=r.trimEnd(),l=e.slice(1).map((h)=>h.indent+h.content),o=(s?[s,...l]:l).join(`
10
- `);t.content=r,t.tag=i;let a=Ud(e),p=a?.type??"",c=a?.endIndex??0;if(jd.has(i))while(c<e.length-1&&e[c].content.trim()==="")c++;let u=Kd(e[c]),f=Yo(e.slice(c));return{tag:i,name:u?.name??"",type:p,optional:u?.optional??!1,default:u?.default,description:f,text:o,lines:e}}function Xd(e,t,n){let i=Hd(e);for(let[l,o]of i.entries())o.number=l;let r=Wd(i),s=r.slice(1).map(Jd);return{description:Yo(r[0]),tags:s,start:t,end:n,lines:i}}function Zt(e){return Gd(e).map(({start:t,end:n,lines:i})=>Xd(i,t,n))}var Yd=/\s/;function Lr(e,t,n){let i=t;while(i<n){let r=e[i];if(r==="/"&&e[i+1]==="/"){let s=e.indexOf(`
4
+ `,n+1);return t}function zn(e,t,n){let i=0,r=e.length-1;if(t>=e[n])i=n;else r=n-1;if(i<r&&t<e[i+1])r=i;while(i<r){let s=i+r+1>>>1;if(e[s]<=t)i=s;else r=s-1}return i}function ke(e){return vr(e),Ct=zn(Ce,e,Ct),{line:Ct+1,column:e-Ce[Ct],character:e}}var Er=/\r\n?|\n|\u2028|\u2029/g,Td=/[\r\u2028\u2029]/;function Ho(e){if(Ve===void 0){Ve=Td.test(kt)?[]:null,Er.lastIndex=0;while(Ve!==null&&Er.exec(kt)!==null)Ve.push(Er.lastIndex)}if(Ve===null)return vr(e),zn(Ce,e,Ct);let t=0,n=Ve.length;while(t<n){let i=t+n>>>1;if(Ve[i]<=e)t=i+1;else n=i}return t}function st(e){let{line:t,column:n}=ke(e);return{line:t,column:n}}function Wo(e){while(Ce.length<=e+1&&Ge!==Number.POSITIVE_INFINITY)vr(Ge);if(e>=Ce.length)return;let t=e+1<Ce.length?Ce[e+1]-1:kt.length;return kt.slice(Ce[e],t)}function Sr(e){let t,n=0;return(i)=>(t??=Go(e),n=zn(t,i,n),{line:n+1,column:i-t[n]})}function Ie(e){return typeof e==="object"&&e!==null&&typeof ot(e).type==="string"}function ot(e){return e}function zt(e,t){let n=ot(e);for(let i in n){let r=n[i];if(Array.isArray(r)){for(let s=0;s<r.length;s++)if(Ie(r[s]))r[s]=t(r[s])}else if(Ie(r))n[i]=t(r)}}function Un(e,...t){if(!t.some((n)=>n===e.type))throw Error(`expected ${t.join(" or ")}, got ${e.type}`)}function Tr(e){let t=[];return at(e,t),t}function at(e,t){switch(e.type){case"Identifier":t.push(e);return;case"ObjectPattern":for(let n of e.properties)at(n.type==="RestElement"?n.argument:n.value,t);return;case"ArrayPattern":for(let n of e.elements)if(n!==null)at(n,t);return;case"RestElement":at(e.argument,t);return;case"AssignmentPattern":at(e.left,t);return;case"TSParameterProperty":at(e.parameter,t);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":at(e.expression,t)}}function Cr(e,t){if(e.type!=="Identifier")return!1;if(t===null)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"Property":case"PropertyDefinition":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"MetaProperty":case"ImportAttribute":case"ExportAllDeclaration":case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":case"TSExportAssignment":return e===t.expression;case"TSEnumMember":return e===t.initializer;case"TSParameterProperty":case"TSEnumDeclaration":case"TSImportEqualsDeclaration":return!0;default:return!t.type.startsWith("TS")}}var lt={Root:["module","instance","fragment","css"],Script:["attributes","content"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:["expression"],HtmlTag:["expression"],ConstTag:["declaration"],DeclarationTag:["declaration"],DebugTag:["identifiers"],RenderTag:["expression"],AttachTag:["expression"],Attribute:["value"],SpreadAttribute:["expression"],AnimateDirective:["expression"],BindDirective:["expression"],ClassDirective:["expression"],LetDirective:["expression"],OnDirective:["expression"],StyleDirective:["value"],TransitionDirective:["expression"],UseDirective:["expression"],Component:["attributes","fragment"],TitleElement:["attributes","fragment"],SlotElement:["attributes","fragment"],RegularElement:["attributes","fragment"],SvelteBody:["attributes","fragment"],SvelteBoundary:["attributes","fragment"],SvelteComponent:["expression","attributes","fragment"],SvelteDocument:["attributes","fragment"],SvelteElement:["tag","attributes","fragment"],SvelteFragment:["attributes","fragment"],SvelteHead:["attributes","fragment"],SvelteOptions:["attributes","fragment"],SvelteSelf:["attributes","fragment"],SvelteWindow:["attributes","fragment"],IfBlock:["test","consequent","alternate"],EachBlock:["expression","context","key","body","fallback"],AwaitBlock:["expression","pending","value","then","error","catch"],KeyBlock:["expression","fragment"],SnippetBlock:["expression","parameters","body"],StyleSheet:["attributes","children"],Rule:["prelude","block"],Atrule:["block"],SelectorList:["children"],ComplexSelector:["children"],RelativeSelector:["combinator","selectors"],Combinator:[],TypeSelector:[],IdSelector:[],ClassSelector:[],AttributeSelector:[],PseudoElementSelector:["args"],PseudoClassSelector:["args"],Percentage:[],Nth:[],NestingSelector:[],Block:["children"],Declaration:[],Program:["body"],ExpressionStatement:["expression"],BlockStatement:["body"],StaticBlock:["body"],EmptyStatement:[],DebuggerStatement:[],WithStatement:["object","body"],ReturnStatement:["argument"],LabeledStatement:["label","body"],BreakStatement:["label"],ContinueStatement:["label"],IfStatement:["test","consequent","alternate"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],CatchClause:["param","body"],WhileStatement:["test","body"],DoWhileStatement:["body","test"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","typeParameters","params","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],ArrowFunctionExpression:["typeParameters","params","returnType","body"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassBody:["body"],MethodDefinition:["decorators","key","typeParameters","value"],PropertyDefinition:["decorators","key","typeAnnotation","value"],Property:["decorators","key","value"],ThisExpression:[],Super:[],Literal:[],Identifier:["decorators","typeAnnotation"],PrivateIdentifier:[],ArrayExpression:["elements"],ObjectExpression:["properties"],UnaryExpression:["argument"],UpdateExpression:["argument"],BinaryExpression:["left","right"],LogicalExpression:["left","right"],AssignmentExpression:["left","right"],MemberExpression:["object","property"],ConditionalExpression:["test","consequent","alternate"],CallExpression:["callee","typeArguments","arguments"],NewExpression:["callee","typeArguments","arguments"],SequenceExpression:["expressions"],TemplateLiteral:["quasis","expressions"],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],SpreadElement:["argument"],RestElement:["decorators","argument","typeAnnotation"],YieldExpression:["argument"],AwaitExpression:["argument"],ImportExpression:["source","options","arguments"],ChainExpression:["expression"],ParenthesizedExpression:["expression"],MetaProperty:["meta","property"],ObjectPattern:["decorators","properties","typeAnnotation"],ArrayPattern:["decorators","elements","typeAnnotation"],AssignmentPattern:["decorators","left","right"],ImportDeclaration:["specifiers","source","attributes"],ImportSpecifier:["imported","local"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportAttribute:["key","value"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExportDefaultDeclaration:["declaration"],ExportAllDeclaration:["exported","source","attributes"],Decorator:["expression"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterDeclaration:["params"],TSTypeParameterInstantiation:["params"],TSTypeParameter:["constraint","default"],TSAnyKeyword:[],TSBigIntKeyword:[],TSBooleanKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSNamedTupleMember:["label","elementType"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSLiteralType:["literal"],TSTypeReference:["typeName","typeArguments"],TSQualifiedName:["left","right"],TSTypeQuery:["exprName","typeArguments"],TSImportType:["argument","qualifier","typeArguments"],TSTypeLiteral:["members"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSFunctionType:["typeParameters","parameters","typeAnnotation"],TSConstructorType:["typeParameters","parameters","typeAnnotation"],TSIndexSignature:["decorators","parameters","typeAnnotation"],TSTypePredicate:["parameterName","typeAnnotation"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSDeclareFunction:["id","typeParameters","params","returnType"],TSDeclareMethod:["typeParameters","params","returnType"],TSParameterProperty:["parameter"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSNonNullExpression:["expression"],TSInstantiationExpression:["expression","typeArguments"]};var w=[],wt={...lt,FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],ArrowFunctionExpression:["params","body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],MethodDefinition:["decorators","key","value"],PropertyDefinition:["decorators","key","value"],Identifier:["decorators"],CallExpression:["callee","arguments"],NewExpression:["callee","arguments"],TaggedTemplateExpression:["tag","quasi"],RestElement:["decorators","argument"],ObjectPattern:["decorators","properties"],ArrayPattern:["decorators","elements"],TSTypeAnnotation:w,TSTypeParameterDeclaration:w,TSTypeParameterInstantiation:w,TSTypeParameter:w,TSArrayType:w,TSTupleType:w,TSNamedTupleMember:w,TSOptionalType:w,TSRestType:w,TSUnionType:w,TSIntersectionType:w,TSConditionalType:w,TSInferType:w,TSParenthesizedType:w,TSTypeOperator:w,TSIndexedAccessType:w,TSMappedType:w,TSLiteralType:w,TSTypeReference:w,TSTypeQuery:w,TSImportType:w,TSTypeLiteral:w,TSPropertySignature:w,TSMethodSignature:w,TSCallSignatureDeclaration:w,TSConstructSignatureDeclaration:w,TSFunctionType:w,TSConstructorType:w,TSIndexSignature:w,TSTypePredicate:w,TSInterfaceDeclaration:w,TSInterfaceBody:w,TSExpressionWithTypeArguments:w,TSTypeAliasDeclaration:w,TSNamespaceExportDeclaration:w,TSDeclareFunction:["id"],TSDeclareMethod:w,TSAsExpression:["expression"],TSSatisfiesExpression:["expression"],TSTypeAssertion:["expression"],TSInstantiationExpression:["expression"]},Cd=Object.assign(Object.create(null),lt),kd=Object.assign(Object.create(null),wt),zo=[],Ut=Symbol("sveast.walk.stop"),ie=Symbol("sveast.walk.skip");function z(e,t,n){Kn(e,null,null,null,t,wd(n))}function wd(e){if(e===void 0||e===lt)return Pd;if(e===wt)return _d;return(t)=>Ad(e,t.type)}function Ad(e,t){return Object.hasOwn(e,t)?e[t]:void 0}var Iv=Object.freeze([]);function Kn(e,t,n,i,r,s){let a=s(e);if(a===void 0)throw Error(`unknown node type: ${e.type}`);let o=r.enter?.(e,t,n,i);if(o===Ut)return!0;if(o!==ie){if(o!==e&&Ie(o))return Dd(o,t,n,i,r,s);let l=ot(e);for(let p=0;p<a.length;p++){let c=a[p],u=l[c];if(Array.isArray(u))for(let f=0;f<u.length;f++){let h=u[f];if(Ie(h)&&Kn(h,e,c,f,r,s))return!0}else if(Ie(u)&&Kn(u,e,c,null,r,s))return!0}}return r.leave?.(e,t,n,i)===Ut}function Pd(e){let t=e.type;if(t==="Identifier")return e.typeAnnotation===void 0&&e.decorators===void 0?zo:lt.Identifier;if(t==="Literal")return lt.Literal;if(t==="Text")return lt.Text;return Cd[t]}function _d(e){let t=e.type;if(t==="Identifier")return e.decorators===void 0?zo:wt.Identifier;if(t==="Literal")return wt.Literal;if(t==="Text")return wt.Text;return kd[t]}function Dd(e,t,n,i,r,s){if(t===null||n===null)throw Error("walk can't replace the node it was called with");let a=ot(t),o=a[n];if(i===null)a[n]=e;else if(Array.isArray(o))o[i]=e;return Kn(e,t,n,i,r,s)}function Le(e){return typeof e==="object"&&e!==null}function He(e){return Le(e)&&e.type==="Literal"}function b(e){return Le(e)&&e.type==="Identifier"&&typeof e.name==="string"}function We(e){return Le(e)&&e.type==="MemberExpression"}function re(e){return Le(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function Nd(e){return Le(e)&&e.type==="CallExpression"}function me(e,t){return Nd(e)&&b(e.callee)&&e.callee.name===t}function At(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?At(e.expression):e}function Uo(e){return e?.type==="TSAsExpression"||e?.type==="TSSatisfiesExpression"?e.typeAnnotation:void 0}function $d(e){return Le(e)&&e.type==="NewExpression"}function kr(e,t){return $d(e)&&b(e.callee)&&e.callee.name===t}function Ko(e){if(!Le(e))return null;if(e.type==="Literal")return e.value==null?null:String(e.value);if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1)return t[0]?.value?.cooked??null}return null}function K(e){if(b(e))return e.name;if(He(e))return e.value==null?void 0:String(e.value);return}var Id=new Set(["Component","SvelteComponent","SvelteSelf"]),Ld=new Set(["RegularElement","SvelteElement"]);function Pt(e){return Id.has(e)}function pt(e){return Ld.has(e)}function Jn(e,t,n=0,i=e.length,r=0){let s=r;for(let a=n;a<i;a++){let o=e.charCodeAt(a);if(o===34||o===39||o===96){a=Rd(e,a,i);continue}if(o===123||o===40||o===91||o===60)s++;else if(o===125||o===41||o===93||o===62&&e.charCodeAt(a-1)!==61){if(s>0)s--}if(t?.(a,s)===!0)break}return s}function Rd(e,t,n){let i=e.charCodeAt(t);for(let r=t+1;r<n;r++){let s=e.charCodeAt(r);if(s===92)r++;else if(s===i)return r}return n-1}function O(e,t){let n=[],i=0;return Jn(e,(r,s)=>{if(s===0&&t.includes(e[r]))n.push(e.slice(i,r)),i=r+1;return!1}),n.push(e.slice(i)),n}function wr(e,t,n=0){let i=-1;return Jn(e,(r,s)=>{if(t(r,s))i=r;return i!==-1},n),i}function Kt(e,t){return wr(e,(n,i)=>i===0&&t.includes(e[n]))}function _t(e){return wr(e,(t,n)=>n===0&&e[t]==="="&&e[t+1]===">")}function ze(e,t){return wr(e,(n,i)=>i===0,t)}function Ar(e){let t=e.trim();return t.startsWith("[")&&ze(t,0)===t.length-1}function Jo(e){if(!e)return;let t=_t(e);if(t===-1)return;return e.slice(t+2).trim()||void 0}var Md=new Set(["null","undefined"]);function Xn(e){if(!e)return!1;let t=O(e,"|").map((i)=>i.trim()).filter((i)=>i&&!Md.has(i));if(t.length!==1)return!1;let[n]=t;while(n.startsWith("(")&&ze(n,0)===n.length-1)n=n.slice(1,-1).trim();return(n.startsWith("(")||n.startsWith("<"))&&_t(n)!==-1}function Pr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLocator:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],additionalImportedTypes:new Map,wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,jsDocSlots:new Map,renderedSlots:new Set,slotsUntracked:!1,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,typedDispatcherEventNames:new Set,explicitDefaultPropNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,typeCasts:{constAssertions:new WeakSet,typeAssertions:new WeakMap},contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:void 0,sveldIgnoreDirectives:new Map,propIgnoreCodes:new Map}}function _r(e,t){return e.propLocalToPublicName.get(t)??t}function Yn(e,t,n=t){e.propLocalToPublicName.set(n,t)}function Dr(e,t){return e.props.get(_r(e,t))}function Jt(e,t){return Dr(e,t)?.type}var Xo={"prop-unknown-type":{severity:"warning",label:"Props without inferred types"},"context-any-type":{severity:"warning",label:"Context values typed as `any`"},"bind-this-type-mismatch":{severity:"warning",label:"bind:this props declared with an element type they're never bound to"},"slot-missing-type":{severity:"warning",label:"@slot/@snippet tags missing a {Type} annotation"},"slot-not-rendered":{severity:"warning",label:"@slot/@snippet tags for slots the component doesn't render"},"event-no-source":{severity:"warning",label:"@event tags with no dispatch or callback"},"dispatch-escapes":{severity:"warning",label:"Dispatchers passed to functions sveld can't follow"},"example-compile-error":{severity:"error",label:"@example blocks that failed to compile"},"example-syntax-error":{severity:"error",label:"@example blocks that failed to parse"},"syntax-skipped":{severity:"error",label:"Component syntax sveld skipped"},"type-syntax-error":{severity:"error",label:"JSDoc types that aren't valid TypeScript"},"rest-props-unresolved":{severity:"warning",label:"$$restProps spread only onto components"},"context-duplicate-key":{severity:"warning",label:"Duplicate setContext keys"},"context-key-unresolved":{severity:"warning",label:"setContext keys sveld couldn't resolve"},"context-value-unresolved":{severity:"warning",label:"setContext values sveld couldn't describe"},"spread-unresolved":{severity:"warning",label:"Unresolved spreads widened to Record<string, any>"},"export-unresolved":{severity:"warning",label:"Unresolved named export specifiers"},"module-export-conflict":{severity:"warning",label:"Module-script exports colliding with generated names"},"extend-props-target-missing":{severity:"error",label:"@extends/@extendProps targets that couldn't be verified"},"extend-props-duplicate":{severity:"warning",label:"Duplicate @extends/@extendProps tags"},"extend-props-override":{severity:"warning",label:"Own props overriding an @extends target's prop"},"jsdoc-unknown-tag":{severity:"warning",label:"Unknown JSDoc tags"},"typedef-duplicate":{severity:"warning",label:"Duplicate @typedef/@callback names"},"property-duplicate":{severity:"warning",label:"Duplicate @property names"},"generics-conflict":{severity:"warning",label:"Duplicate @generics/@template names"},"event-description-ambiguous":{severity:"warning",label:"Text after an @event read as the next tag's description"},"jsdoc-tag-dropped":{severity:"warning",label:"Passthrough JSDoc tags that couldn't attach"},"internal-typedef-referenced":{severity:"error",label:"Public types referencing an @internal typedef"},"cross-file-unresolved":{severity:"warning",label:"Imports a standalone parse couldn't read"},"export-ambiguous":{severity:"warning",label:"Ambiguous `export *` names left out of the entry exports"}};function Qn(e){return{...e,code:Nr[e.kind],severity:Xo[e.kind].severity}}var Od=Object.keys(Xo),Nr=Object.fromEntries(Od.map((e)=>[e,`sveld/${e}`]));function D(e,t,n,i,r){e.diagnosticRecords.push($r(e,t,n,i,r))}function $r(e,t,n,i,r){return Qn({component:e.componentFilePath,kind:t,name:n,message:i,...r?{source:r}:{},...Ir(e,t,n)?{ignored:!0}:{}})}function Yo(e,t){return`${e}:${t}`}function Ue(e,t,n,i){if(!i||i.length===0)return;let r=Yo(t,n),s=e.sveldIgnoreDirectives.get(r)??new Set;for(let a of i)s.add(a);e.sveldIgnoreDirectives.set(r,s)}function Xt(e,t,n){if(Ue(e,"prop-unknown-type",t,n),Ue(e,"bind-this-type-mismatch",t,n),n&&n.length>0)e.propIgnoreCodes.set(t,n)}function Ir(e,t,n){let i=e.sveldIgnoreDirectives.get(Yo(t,n));if(!i)return!1;return i.has("")||i.has(Nr[t])}var Lr="/**",Qo="*",Zn="*/",Bd="```",Rr=/^\s+/,Zo=/\s/,Fd=/^@[^\s/]+(?=\s|$)/,jd=/^@(\S+)\s*/,qd=new Set(["extends","extendProps","generics","template","typedef"]);function Yt(e){let t=0;while(t<e.length){let n=e.charCodeAt(t);if(n!==32&&n!==9&&n!==13&&n!==10&&!Zo.test(e[t]))break;t++}return t}function Vd(e,t){let n=e.slice(Yt(e)),i=!1;if(t)n=n.slice(Lr.length),i=!0;else if(n.startsWith(Qo)&&!n.startsWith(Zn))n=n.slice(Qo.length),i=!0;let r=n.slice(0,Yt(n));n=n.slice(r.length);let s=n.trimEnd(),a=s.endsWith(Zn)?s.slice(0,-Zn.length).trimEnd():n;return{indent:i?r.slice(1):r,content:a}}function Gd(e,t,n){let i=n>t&&e.charCodeAt(n-1)===13?n-1:n;return e.slice(t,i)}function Hd(e){let t=[],n=0;while(!0){let i=e.indexOf(Lr,n);if(i===-1)break;let r=e.lastIndexOf(`
5
+ `,i-1)+1;if(e.charCodeAt(i+Lr.length)===42||e.slice(r,i).trim()!==""){n=i+1;continue}let s=[],a=r,o=!1,l=0;while(a<=e.length){let p=e.indexOf(`
6
+ `,a),c=p===-1?e.length:p,u=Gd(e,a,c),{indent:f,content:h}=Vd(u,s.length===0);s.push({raw:u,start:a,number:s.length,indent:f,content:h});let m=u.trimEnd();if(m.endsWith(Zn)){o=!0,l=a+m.length,n=c;break}if(p===-1)break;a=p+1}if(!o)break;t.push({start:i,end:l,lines:s})}return t}function Wd(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function zd(e){let t=[[]],n=!1;for(let i of e){if(Fd.test(i.content)&&!n)t.push([i]);else t[t.length-1].push(i);if(Qt(i.content))n=!n}return t}function Qt(e){return Ud(e,Bd)%2===1}function Ud(e,t){let n=0,i=e.indexOf(t);while(i!==-1)n++,i=e.indexOf(t,i+t.length);return n}function ea(e){return e.map((t)=>t.indent+t.content).join(`
7
+ `)}function Kd(e){let t=0;while(t<e.length-1&&e[t].content.trim()==="")t++;if(e[t].content[0]!=="{")return null;let n=e.slice(t).map((l)=>l.content).join(`
8
+ `),i=ze(n,0);if(i===-1)return null;let r=[],s=i+1;for(let l=t;s>0;l++){let p=e[l].content.length;r.push(Math.min(s,p)),s-=p+1}let a=t+r.length-1;return{type:r.map((l,p)=>{let c=t+p,u=e[c].content.slice(0,l);if(e[c].content=e[c].content.slice(l).replace(Rr,""),c>0)e[c].continuesType=!0;return p===0?u:e[c].indent+u}).join(`
9
+ `).slice(1,-1),endIndex:a}}function Jd(e){let t=e.content.match(Rr)?.[0]??"",n=e.content.slice(t.length),i=0,r=0,s=n[0]==='"'||n[0]==="'"?n.indexOf(n[0],1):-1;if(s===-1)for(let c of n){if(i===0&&Zo.test(c))break;if(c==="[")i++;if(c==="]")i--;r++}else r=s+1;let a=i===0?n.slice(0,r):"";if(!a)return null;let o=a,l=!1,p;if(a.startsWith("[")&&a.endsWith("]")){l=!0;let u=a.slice(1,-1).split("=");if(o=u[0].trim(),u.length>1)p=u.slice(1).join("=").trim();if(!o)return null}if(o.length>1&&(o[0]==='"'||o[0]==="'")&&o[o.length-1]===o[0])o=o.slice(1,-1);return e.content=n.slice(r).replace(Rr,""),{name:o,optional:l,default:p}}function Xd(e){let t=e[0],n=t.content.match(jd),i=n?n[1]:"",r=n?t.content.slice(n[0].length):t.content,s=r.trimEnd(),a=e.slice(1).map((h)=>h.indent+h.content),o=(s?[s,...a]:a).join(`
10
+ `);t.content=r,t.tag=i;let l=Kd(e),p=l?.type??"",c=l?.endIndex??0;if(qd.has(i))while(c<e.length-1&&e[c].content.trim()==="")c++;let u=Jd(e[c]),f=ea(e.slice(c));return{tag:i,name:u?.name??"",type:p,optional:u?.optional??!1,default:u?.default,description:f,text:o,lines:e}}function Yd(e,t,n){let i=Wd(e);for(let[a,o]of i.entries())o.number=a;let r=zd(i),s=r.slice(1).map(Xd);return{description:ea(r[0]),tags:s,start:t,end:n,lines:i}}function Zt(e){return Hd(e).map(({start:t,end:n,lines:i})=>Yd(i,t,n))}var Qd=/\s/;function Mr(e,t,n){let i=t;while(i<n){let r=e[i];if(r==="/"&&e[i+1]==="/"){let s=e.indexOf(`
11
11
  `,i+2);if(s===-1||s>=n)return!0;i=s+1}else if(r==="/"&&e[i+1]==="*"&&e[i+2]!=="*"){let s=e.indexOf("*/",i+2);if(s===-1||s+2>n)return!1;i=s+2}else if(r===" "||r===`
12
- `||r==="\t"||r==="\r"||Yd.test(r))i++;else return!1}return!0}var Qd=/^-\s*/;function Zn(e){let t=[],n,i=!1;for(let r of e){let s=Qt(r);if(n!==void 0){if(s)t.push(r.trim()),n=void 0;else t.push(r.slice(Math.min(n,Yt(r))).trimEnd());continue}let l=r.trim();if(l===""){i=t.length>0;continue}if(i)t.push("");if(i=!1,t.push(l),s)n=Yt(r)}return t.join(`
13
- `).trimEnd()}function Dt(e){return e?.replace(Qd,"").trim()}function Zo(e){let t=e.name?`${e.name} ${e.description}`:e.description;return Dt(Zn(t.split(`
14
- `)))}function Rr(e){let t=0;while(e[t+1]?.continuesType)t++;return t}var ei=new Set(["since","example","see"]),Mr=new Set(["bindable","default","required"]);function Zd(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function ti(e){let t=e.trim();return t===""?!0:t}function ea(e){let t=e.startsWith("/*")?e:`/*${e}`;return t.endsWith("*/")?t:`${t}*/`}function we(e){return e==="*"?"any":e.trim()}function ef(e){return ii(Zt(ea(e)))}function ni(e){let{type:t}=ef(e);return t?we(t.type):void 0}var tf=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function Or(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Zt(t),e.parsedJsDocByText.set(t,n);return n}function ii(e){let t=e[0]?.tags??[],n,i=[],r,s,l,o=!1,a=[],p=[],c=[];for(let u of t)if(u.tag==="type")n=u;else if(u.tag==="param")i.push(u);else if(u.tag==="returns"||u.tag==="return")r=u;else if(u.tag==="deprecated")l??=ti(u.text);else if(u.tag==="ignore"||u.tag==="internal")o=!0;else if(u.tag==="sveld-ignore")c.push(u.name);else if(ei.has(u.tag))p.push(u);else if(u.tag==="bindable"){if(u.type)continue;let f=`${u.name}${u.description?` ${u.description}`:""}`.trim();if(f==="readonly"||f==="writable")s??=f}else if(!tf.has(u.tag))a.push(u);return{type:n,param:i,returns:r,binding:s,deprecated:l,internal:o,additional:a,passthrough:p,ignore:c,description:e[0]?.description}}function nf(e,t){let n=e.jsDocBlocksByStart.get(t.start);return n?.end===t.end?[n]:void 0}function ta(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let i=t.length-1;i>=0;i--){let r=t[i];if(!r||typeof r!=="object"||!("value"in r)||!("end"in r))continue;if(typeof r.end!=="number"||!("start"in r)||typeof r.start!=="number")continue;if("type"in r&&r.type==="Line"||!String(r.value).startsWith("*"))continue;if(Lr(e.source,r.end,n))return r}return}var rf=new Set(["ArrowFunctionExpression","FunctionExpression"]);function na(e){let t=new Set,n=(r)=>{let{leadingComments:s,start:l}=r,o=ta(e,s,l);if(o)t.add(o.start)};for(let r of e.funcDecls.values())n(r);let i=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:r,isModule:s}of i)for(let l of r?.content.body??[]){let o=l.type==="ExportNamedDeclaration",a=l.type==="ExportNamedDeclaration"?l.declaration:l;if(a?.type==="FunctionDeclaration"){if(o)n(l)}else if(a?.type==="ClassDeclaration"&&s){n(o?l:a);for(let p of a.body.body)if(p.type==="MethodDefinition")n(p)}else if(a?.type==="VariableDeclaration"&&(s||!o||a.kind==="const")&&a.declarations.length===1&&rf.has(a.declarations[0].init?.type??""))n(l)}return t}var sf=new Set(["slot","snippet","event","typedef","callback","restProps","extends","extendProps","csspart","cssprop","cssproperty"]);function j(e,t){let n=ta(e,t?.leadingComments,t?.start);return n&&uf(e,n)}function of(e,t,n){let i=e;if(t)i=`${e} extends ${t}`;if(n)i+=` = ${n}`;return i}var af=/^[^\s,]+/,Qo=/^\s*,\s*([^\s,]+)/;function Br(e,t){let n=e.optional?e.name:af.exec(e.name)?.[0];if(!n)return[];let i=[{name:n,constraint:of(n,t,e.default)}],r=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let s=Qo.exec(r);s;s=Qo.exec(r))i.push({name:s[1],constraint:s[1]}),r=r.slice(s[0].length);return i}var lf=new Set(["","any","object","Object"]),pf=/^[A-Za-z_$][\w$]*$/;function cf(e){let t=new Map;for(let{name:n,type:i,optional:r}of e){let[s,l,...o]=n.split(".");if(!l||o.length>0)continue;let a=t.get(s)??[],p=pf.test(l)?l:JSON.stringify(l);a.push(`${p}${r?"?":""}: ${we(i)||"any"}`),t.set(s,a)}return e.filter((n)=>!n.name.includes(".")).map((n)=>{let i=t.get(n.name),r=we(n.type),s=Dt(Zn(n.description.split(`
15
- `)));return{name:n.name,type:i&&lf.has(r)?`{ ${i.join("; ")} }`:r,...s?{description:s}:{},optional:n.optional}})}function uf(e,t){let n=nf(e,t)??Or(e,ea(t.value));if(n[0]?.tags.some(({tag:c})=>sf.has(c)))return;let i=ii(n),r=i.param.length>0?cf(i.param):void 0,s;if(e.functionDocCommentStarts.has(t.start)){let c=i.additional.filter((u)=>u.tag==="template"&&u.name);if(c.length>0)s=c.flatMap((u)=>Br(u,we(u.type))).map(({constraint:u})=>u).join(", ")}let l=i.additional.filter((c)=>c.tag!=="template"&&c.tag!=="generics"),o=i.description?.trim(),a=(c)=>{let u=[...o?[o]:[],...c.map((f)=>`@${f.tag}${f.text?` ${f.text}`:""}`)];return u.length>0?u.join(`
16
- `):void 0},p=l.find((c)=>c.tag==="default"&&c.text.trim());return{type:i.type?we(i.type.type):void 0,params:r,returnType:i.returns?we(i.returns.type):void 0,description:a(l),binding:i.binding,deprecated:i.deprecated,tags:Zd(i.passthrough),sveldIgnore:i.ignore.length>0?i.ignore:void 0,internal:i.internal,typeParameters:s,...p?{explicitDefault:p.text.trim(),descriptionWithoutDefault:a(l.filter((c)=>c!==p))}:{}}}var df=/[^\S\r\n]*[\r\n]+\s*/g;function ia(e,t){if(!e.source||t<0||t>e.source.length)return;return e.sourceLocator??=br(e.source),e.sourceLocator(t)}function ri(e,t,n){if(t===void 0||n===void 0||n<t)return;let i=ia(e,t),r=ia(e,n);if(!i||!r)return;return{start:i,end:r}}function Fr(e){if(!$e(e))return{};return{start:typeof e.start==="number"?e.start:void 0,end:typeof e.end==="number"?e.end:void 0}}function C(e,t){let{start:n,end:i}=Fr(t);return ri(e,n,i)}function Ae(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let a=n[n.length-1];if(a.tag!==void 0||!a.raw.trim().endsWith("*/"))break;n.pop()}let i=n[0],r=i.raw.indexOf(`@${i.tag??""}`),s=i.start+Math.max(r,0),l=n[n.length-1],o=l.start+l.raw.length;return ri(e,s,o)}function q(e,t,n){return e.source?.slice(t,n)}function Ue(e,t){let{start:n,end:i}=Fr(t);if(n===void 0||i===void 0)return;return q(e,n,i)}var ff=/\s+/g;function oe(e,t){return Ue(e,t)?.replace(df," ")}var hf=/^[ \t]*/,mf=/\r?\n/g;function Ke(e,t){let{source:n}=e,{start:i,end:r}=Fr(t);if(n===void 0||i===void 0||r===void 0)return;let s=[];for(let f of e.parsed?.comments??[])if(f.start>=i&&f.end<=r)s.push({start:f.start,end:f.end});z(t,{enter(f){if(f.type==="TemplateElement"){let h=n.slice(f.start,f.end).replace(mf,"\\n");s.push({start:f.start,end:f.end,text:h})}else if(f.type==="Literal"&&(typeof f.value==="string"||("regex"in f)))s.push({start:f.start,end:f.end,text:n.slice(f.start,f.end)})}}),s.sort((f,h)=>f.start-h.start);let l=(f)=>f.replace(ff,(h)=>h.includes(`
12
+ `||r==="\t"||r==="\r"||Qd.test(r))i++;else return!1}return!0}var Zd=/^-\s*/;function ei(e){let t=[],n,i=!1;for(let r of e){let s=Qt(r);if(n!==void 0){if(s)t.push(r.trim()),n=void 0;else t.push(r.slice(Math.min(n,Yt(r))).trimEnd());continue}let a=r.trim();if(a===""){i=t.length>0;continue}if(i)t.push("");if(i=!1,t.push(a),s)n=Yt(r)}return t.join(`
13
+ `).trimEnd()}function Dt(e){return e?.replace(Zd,"").trim()}function na(e){let t=e.name?`${e.name} ${e.description}`:e.description;return Dt(ei(t.split(`
14
+ `)))}function Or(e){let t=0;while(e[t+1]?.continuesType)t++;return t}var ti=new Set(["since","example","see"]),Br=new Set(["bindable","default","required"]);function ef(e){return e.length>0?e.map((t)=>({name:t.tag,body:t.text})):void 0}function ni(e){let t=e.trim();return t===""?!0:t}function ia(e){let t=e.startsWith("/*")?e:`/*${e}`;return t.endsWith("*/")?t:`${t}*/`}function we(e){return e==="*"?"any":e.trim()}function tf(e){return ri(Zt(ia(e)))}function ii(e){let{type:t}=tf(e);return t?we(t.type):void 0}var nf=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function Fr(e,t){let n=e.parsedJsDocByText.get(t);if(n===void 0)n=Zt(t),e.parsedJsDocByText.set(t,n);return n}function ri(e){let t=e[0]?.tags??[],n,i=[],r,s,a,o=!1,l=[],p=[],c=[];for(let u of t)if(u.tag==="type")n=u;else if(u.tag==="param")i.push(u);else if(u.tag==="returns"||u.tag==="return")r=u;else if(u.tag==="deprecated")a??=ni(u.text);else if(u.tag==="ignore"||u.tag==="internal")o=!0;else if(u.tag==="sveld-ignore")c.push(u.name);else if(ti.has(u.tag))p.push(u);else if(u.tag==="bindable"){if(u.type)continue;let f=`${u.name}${u.description?` ${u.description}`:""}`.trim();if(f==="readonly"||f==="writable")s??=f}else if(!nf.has(u.tag))l.push(u);return{type:n,param:i,returns:r,binding:s,deprecated:a,internal:o,additional:l,passthrough:p,ignore:c,description:e[0]?.description}}function rf(e,t){let n=e.jsDocBlocksByStart.get(t.start);return n?.end===t.end?[n]:void 0}function ra(e,t,n){if(!t||t.length===0||n===void 0||!e.source)return;for(let i=t.length-1;i>=0;i--){let r=t[i];if(!r||typeof r!=="object"||!("value"in r)||!("end"in r))continue;if(typeof r.end!=="number"||!("start"in r)||typeof r.start!=="number")continue;if("type"in r&&r.type==="Line"||!String(r.value).startsWith("*"))continue;if(Mr(e.source,r.end,n))return r}return}var sf=new Set(["ArrowFunctionExpression","FunctionExpression"]);function sa(e){let t=new Set,n=(r)=>{let{leadingComments:s,start:a}=r,o=ra(e,s,a);if(o)t.add(o.start)};for(let r of e.funcDecls.values())n(r);let i=[{root:e.parsed?.module,isModule:!0},{root:e.parsed?.instance,isModule:!1}];for(let{root:r,isModule:s}of i)for(let a of r?.content.body??[]){let o=a.type==="ExportNamedDeclaration",l=a.type==="ExportNamedDeclaration"?a.declaration:a;if(l?.type==="FunctionDeclaration"){if(o)n(a)}else if(l?.type==="ClassDeclaration"&&s){n(o?a:l);for(let p of l.body.body)if(p.type==="MethodDefinition")n(p)}else if(l?.type==="VariableDeclaration"&&(s||!o||l.kind==="const")&&l.declarations.length===1&&sf.has(l.declarations[0].init?.type??""))n(a)}return t}var of=new Set(["slot","snippet","event","typedef","callback","restProps","extends","extendProps","csspart","cssprop","cssproperty"]);function j(e,t){let n=ra(e,t?.leadingComments,t?.start);return n&&df(e,n)}function af(e,t,n){let i=e;if(t)i=`${e} extends ${t}`;if(n)i+=` = ${n}`;return i}var lf=/^[^\s,]+/,ta=/^\s*,\s*([^\s,]+)/;function jr(e,t){let n=e.optional?e.name:lf.exec(e.name)?.[0];if(!n)return[];let i=[{name:n,constraint:af(n,t,e.default)}],r=`${e.optional?"":e.name.slice(n.length)} ${e.description}`;for(let s=ta.exec(r);s;s=ta.exec(r))i.push({name:s[1],constraint:s[1]}),r=r.slice(s[0].length);return i}var pf=new Set(["","any","object","Object"]),cf=/^[A-Za-z_$][\w$]*$/;function uf(e){let t=new Map;for(let{name:n,type:i,optional:r}of e){let[s,a,...o]=n.split(".");if(!a||o.length>0)continue;let l=t.get(s)??[],p=cf.test(a)?a:JSON.stringify(a);l.push(`${p}${r?"?":""}: ${we(i)||"any"}`),t.set(s,l)}return e.filter((n)=>!n.name.includes(".")).map((n)=>{let i=t.get(n.name),r=we(n.type),s=Dt(ei(n.description.split(`
15
+ `)));return{name:n.name,type:i&&pf.has(r)?`{ ${i.join("; ")} }`:r,...s?{description:s}:{},optional:n.optional}})}function df(e,t){let n=rf(e,t)??Fr(e,ia(t.value));if(n[0]?.tags.some(({tag:c})=>of.has(c)))return;let i=ri(n),r=i.param.length>0?uf(i.param):void 0,s;if(e.functionDocCommentStarts.has(t.start)){let c=i.additional.filter((u)=>u.tag==="template"&&u.name);if(c.length>0)s=c.flatMap((u)=>jr(u,we(u.type))).map(({constraint:u})=>u).join(", ")}let a=i.additional.filter((c)=>c.tag!=="template"&&c.tag!=="generics"),o=i.description?.trim(),l=(c)=>{let u=[...o?[o]:[],...c.map((f)=>`@${f.tag}${f.text?` ${f.text}`:""}`)];return u.length>0?u.join(`
16
+ `):void 0},p=a.find((c)=>c.tag==="default"&&c.text.trim());return{type:i.type?we(i.type.type):void 0,params:r,returnType:i.returns?we(i.returns.type):void 0,description:l(a),binding:i.binding,deprecated:i.deprecated,tags:ef(i.passthrough),sveldIgnore:i.ignore.length>0?i.ignore:void 0,internal:i.internal,typeParameters:s,...p?{explicitDefault:p.text.trim(),descriptionWithoutDefault:l(a.filter((c)=>c!==p))}:{}}}var ff=/[^\S\r\n]*[\r\n]+\s*/g;function oa(e,t){if(!e.source||t<0||t>e.source.length)return;return e.sourceLocator??=Sr(e.source),e.sourceLocator(t)}function si(e,t,n){if(t===void 0||n===void 0||n<t)return;let i=oa(e,t),r=oa(e,n);if(!i||!r)return;return{start:i,end:r}}function qr(e){if(!Le(e))return{};return{start:typeof e.start==="number"?e.start:void 0,end:typeof e.end==="number"?e.end:void 0}}function C(e,t){let{start:n,end:i}=qr(t);return si(e,n,i)}function Ae(e,t){if(!t||t.length===0)return;let n=[...t];while(n.length>1){let l=n[n.length-1];if(l.tag!==void 0||!l.raw.trim().endsWith("*/"))break;n.pop()}let i=n[0],r=i.raw.indexOf(`@${i.tag??""}`),s=i.start+Math.max(r,0),a=n[n.length-1],o=a.start+a.raw.length;return si(e,s,o)}function q(e,t,n){return e.source?.slice(t,n)}function Ke(e,t){let{start:n,end:i}=qr(t);if(n===void 0||i===void 0)return;return q(e,n,i)}var hf=/\s+/g;function oe(e,t){return Ke(e,t)?.replace(ff," ")}var mf=/^[ \t]*/,yf=/\r?\n/g;function Je(e,t){let{source:n}=e,{start:i,end:r}=qr(t);if(n===void 0||i===void 0||r===void 0)return;let s=[];for(let f of e.parsed?.comments??[])if(f.start>=i&&f.end<=r)s.push({start:f.start,end:f.end});z(t,{enter(f){if(f.type==="TemplateElement"){let h=n.slice(f.start,f.end).replace(yf,"\\n");s.push({start:f.start,end:f.end,text:h})}else if(f.type==="Literal"&&(typeof f.value==="string"||("regex"in f)))s.push({start:f.start,end:f.end,text:n.slice(f.start,f.end)})}}),s.sort((f,h)=>f.start-h.start);let a=(f)=>f.replace(hf,(h)=>h.includes(`
17
17
  `)?h.slice(h.lastIndexOf(`
18
- `)):" "),o="",a="",p=i;for(let f of s){if(a+=n.slice(p,f.start),p=f.end,f.text===void 0){a+=" ";continue}o+=l(a)+f.text,a=""}o+=l(a+n.slice(p,r));let c=n.lastIndexOf(`
19
- `,i-1)+1,u=hf.exec(n.slice(c,i))?.[0]??"";return o.split(`
18
+ `)):" "),o="",l="",p=i;for(let f of s){if(l+=n.slice(p,f.start),p=f.end,f.text===void 0){l+=" ";continue}o+=a(l)+f.text,l=""}o+=a(l+n.slice(p,r));let c=n.lastIndexOf(`
19
+ `,i-1)+1,u=mf.exec(n.slice(c,i))?.[0]??"";return o.split(`
20
20
  `).map((f,h)=>(h>0&&f.startsWith(u)?f.slice(u.length):f).trimEnd()).filter((f,h)=>h===0||f!=="").join(`
21
- `).trim()}var yf=/\*\//g,gf=/[.*+?^${}()|[\]\\]/g;function en(e){return e.replace(gf,"\\$&")}function Nt(e){return e.replace(yf,"*\\/")}function ye(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}var xf=new Intl.Collator("en");function Ie(e,t){return xf.compare(e,t)}function oa(e){return e.type==="Identifier"?e.name:e.right.name}function aa(e){return e.type==="Identifier"?e.name:aa(e.left)}function la(e,t,n){let i=t?.start,r=t?.end;if(i===void 0||r===void 0)return;return q(e,i+n,r)?.trim()}function ae(e,t){return la(e,t,1)}function ut(e,t){return la(e,t,0)}function Le(e,t,n,i,r=new Set){if(!t)return;let s=(l)=>Le(e,l,n,i,r);z(t,{enter(l){switch(l.type){case"TSInterfaceDeclaration":for(let o of l.extends??[])ra(e,o.expression,o.typeParameters?.params,n,i,r);return sa(l.body.body,s),ie;case"TSTypeAliasDeclaration":case"TSTypeAnnotation":return s(l.typeAnnotation),ie;case"TSTypeLiteral":return sa(l.members,s),ie;case"TSTypeReference":return ra(e,l.typeName,l.typeArguments?.params,n,i,r),ie}}})}function Ef(e,t){let n=new Map;for(let i of Array.from(t).sort()){let r=e.valueImportBindingsByLocalName.get(i)??e.additionalImportedTypes.get(i),s=e.typeImportBindingsByLocalName.get(i)??(r?{...r,specifierType:"named"}:void 0);if(!s)continue;let l=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")l.default.push(s.localName);else if(s.specifierType==="namespace")l.namespace.push(s.localName);else l.named.push({imported:s.importedName,local:s.localName});n.set(s.source,l)}return Array.from(n.entries()).sort(([i],[r])=>Ie(i,r)).map(([i,r])=>{if(r.namespace.length>0)return r.namespace.map((a)=>`import type * as ${a} from "${i}";`).join(`
22
- `);let s=r.named.map(({imported:a,local:p})=>{if(!a||a===p)return p;return`${a} as ${p}`}),l=r.default[0],o=s.length>0?`{ ${s.join(", ")} }`:"";if(l&&o)return`import type ${l}, ${o} from "${i}";`;if(l)return`import type ${l} from "${i}";`;return`import type ${o} from "${i}";`})}function ra(e,t,n,i,r,s){let l=aa(t);if(e.typeImportBindingsByLocalName.has(l)||e.valueImportBindingsByLocalName.has(l))i.add(l);let o=e.localTypeDeclarationsByName.get(l);if(o&&!s.has(l))r.add(l),s.add(l),Le(e,o.node,i,r,s),s.delete(l);for(let a of n??[])Le(e,a,i,r,s)}function sa(e,t){for(let n of e)if(n.type==="TSPropertySignature")t(n.typeAnnotation?.typeAnnotation)}function F(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function bf(e){if(!e.const)return;let t=e.id.name,n=[];for(let i of e.members){let r=i.initializer;if(r?.type!=="Literal")return;let s=r.value;if(typeof s==="string")n.push(JSON.stringify(s));else if(typeof s==="number")n.push(String(s));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function pa(e,t){let n=bf(t);if(n)return n;let i=q(e,t.start,t.end)?.trim();return i?`declare ${i}`:void 0}var vf=/\/\*\*((?:(?!\*\/)[\s\S])*)\*\/\s*$/;function Sf(e,t,n){if(t===void 0)return;let i=q(e,t,n),r=i&&vf.exec(i);return r?ni(r[0]):void 0}function jr(e,t){let n=[],i="start"in t&&typeof t.start==="number"?t.start:void 0,r=(s)=>t.params.length===1?"arg":`arg${s}`;for(let[s,l]of t.params.entries()){let o=Sf(e,i,l.start);i=l.end;let a=l.type==="TSParameterProperty"?l.parameter:l;if(a.type==="RestElement"){F(e,a.typeAnnotation?.typeAnnotation),n.push({name:a.argument.type==="Identifier"?a.argument.name:"rest",type:ae(e,a.typeAnnotation)??o,optional:!1,rest:!0});continue}let p=a.type==="AssignmentPattern",c=p?a.left:a,u="typeAnnotation"in c?c.typeAnnotation:void 0;F(e,u?.typeAnnotation),n.push({name:c.type==="Identifier"?c.name:r(s),type:ae(e,u)??o,optional:p||"optional"in a&&a.optional===!0,rest:!1})}F(e,t.returnType?.typeAnnotation);for(let s of t.typeParameters?.params??[])F(e,s.constraint),F(e,s.default);return{params:n,returnType:ae(e,t.returnType),typeParameters:ut(e,t.typeParameters)||void 0}}function $t(e,t,n="any"){let{params:i,returnType:r,typeParameters:s}=jr(e,t),l=i.map(({name:a,type:p,optional:c,rest:u})=>u?`...${a}: ${p??"any[]"}`:`${a}${c?"?":""}: ${p??"any"}`),o=r!==void 0||s!==void 0||i.some((a)=>a.type!==void 0);return{signature:`${s??""}(${l.join(", ")}) => ${r??n}`,hasAnnotations:o}}function tn(e){return e.length>0?e.slice():void 0}function ca(e){let t=tn(e.pendingCallDefaultCandidates),n=tn(e.pendingConstDefaultCandidates.filter((o)=>o.location!=="props"||!e.explicitDefaultPropNames.has(o.propName))),i=tn(e.pendingContextKeyCandidates),r=tn(e.pendingDispatchEscapeCandidates);if(!t&&!n&&!i&&!r)return;let s=tn(e.deferredEventNoSourceDiagnostics),l=r&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0;return{...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...i?{pendingContextKeyCandidates:i}:{},...r?{pendingDispatchEscapeCandidates:r}:{},...s?{deferredEventNoSourceDiagnostics:s}:{},...l?{untypedJsDocEventNames:l}:{}}}function ua(e){let t=new Set,n=new Set;for(let a of e.additionalTypeDependencyNodes)Le(e,a,t,n);for(let a of e.additionalImportedTypes.keys())t.add(a);let i=Array.from(e.localTypeDeclarationsByName.values()).filter((a)=>a.exported).sort((a,p)=>a.start-p.start);for(let a of i)Le(e,a.node,t,n);let r=i.map((a)=>`export ${a.code}`),s=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,l=s?.canonicalType;if(s&&l){for(let a of s.referencedImportedTypes)t.add(a);for(let a of s.referencedLocalTypes)n.add(a)}if(!l&&t.size===0&&n.size===0&&r.length===0)return;let o=Array.from(n).map((a)=>e.localTypeDeclarationsByName.get(a)).filter((a)=>a!==void 0&&!a.exported).sort((a,p)=>a.start-p.start).map((a)=>a.code);return{...l?{canonicalPropsType:l}:{},canonicalPropNames:s&&l?Array.from(s.props.keys()).sort():[],localTypeDeclarations:o,...r.length>0?{moduleTypeDeclarations:r}:{},typeImportStatements:Ef(e,t)}}function Tf(e,t,n,i,r){for(let s of e){if(s.type!=="Block"||s.start<n||s.end>i)continue;r.push({start:s.start,end:s.end,isJsDoc:s.end-s.start>4&&t.startsWith("/**",s.start)})}}function Cf(e,t){for(let n of e){let{start:i}=n,r=n.type==="ExportNamedDeclaration"?n.declaration:n;if(r?.type==="FunctionDeclaration"){if(r.id?.name)t.push({name:r.id.name,start:i})}else if(r?.type==="VariableDeclaration"){for(let s of r.declarations)if(s.id.type==="Identifier"&&s.id.name)t.push({name:s.id.name,start:i})}}}function kf(e,t,n){let i=0,r=e.length;while(i<r){let s=i+r>>>1;if(e[s].end<=t)i=s+1;else r=s}for(let s=i-1;s>=0;s--){let l=e[s];if(!l.isJsDoc)continue;return Lr(n,l.end,t)?l:void 0}return}function wf(e){let t=new Map;if(!e.source)return t;let n=[],i=[],r=e.parsed?.comments??[];for(let s of[e.parsed?.module,e.parsed?.instance]){let l=s?.content;if(!l)continue;Tf(r,e.source,l.start,l.end,n),Cf(l.body,i)}n.sort((s,l)=>s.end-l.end);for(let s of i){let l=kf(n,s.start,e.source);if(!l)continue;let o=Or(e,e.source.slice(l.start,l.end)),{type:a,description:p,ignore:c,internal:u}=ii(o);if(c.length>0)ze(e,"context-any-type",s.name,c);if(!a&&!p&&!u)continue;t.set(s.name,{type:a?we(a.type):void 0,description:p||a&&Zo(a),internal:u||void 0})}return t}function fa(e,t){return e.variableInfoCache??=wf(e),e.variableInfoCache.get(t)}function dt(e,t){let n=Pr(e,t);if(n?.type)return{type:n.type,description:n.description,internal:n.internal};let i=fa(e,t),r=e.explicitVariableTypesByName.get(t);if(r)return{type:r,description:i?.description,internal:i?.internal};if(!i?.type)return null;return{type:i.type,description:i.description,internal:i.internal}}function ft(e,t){let n=dt(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))F(e,e.explicitVariableTypeNodesByName.get(t));return n}function qr(e,t){let n=fa(e,t);return{...n?.description?{description:n.description}:{},...n?.internal?{internal:!0}:{}}}function ge(e,t){for(let i of e.vars)if(i.declarations.some((r)=>r.id.type==="Identifier"&&r.id.name===t))return da(e,i);let n=e.funcDecls.get(t);return n&&da(e,n)}function da(e,t){let n=j(e,t);if(n)return n;for(let i of[e.parsed?.instance,e.parsed?.module])for(let r of i?.content.body??[])if(r.type==="ExportNamedDeclaration"&&r.declaration===t)return j(e,r);return}var Af=/\w/,Pf=/^readonly\s+/;function Vr(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let i=B(n.slice(1,-1),";,").map((r)=>r.trim().replace(Pf,""));for(let r of i){if(!r.startsWith(t))continue;let s=r.slice(t.length);if(Af.test(s.charAt(0)))continue;let l=s.trimStart(),o=l.startsWith("?");if(o)l=l.slice(1).trimStart();if(!l.startsWith(":"))continue;let a=l.slice(1).trim();return o?`${a} | undefined`:a}return}function ha(e,t){if(t.computed||t.object.type!=="Identifier"||t.property.type!=="Identifier")return;let n=t.object.name,i=t.property.name;if(e.wholePropsLocals.has(n))return Jt(e,i);let r=Jt(e,n)??dt(e,n)?.type;if(!r)return;return Vr(r,i)}var _f=/(?:_|[^\p{ID_Continue}$])+/u,Df=/^[\p{ID_Start}$]/u;function Gr(e){let i=`${e.split(_f).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`;return Df.test(i)?i:`_${i}`}var Nf=/^\{([\s\S]*)\}$/,$f=/^[A-Za-z_$][\w$]*$/,If=/^readonly\s+/,Lf=/^\[[\w$]+\s*:[^\]]+\]$/;function Re(e,{skipIndexSignatures:t=!1}={}){let n=e.trim(),i=Nf.exec(n);if(!i)return null;let r=i[1].trim();if(r==="")return[];let s=[];for(let l of B(r,";,")){let o=l.trim();if(!o)continue;let a=Kt(o,":");if(a===-1)return null;let p=o.slice(0,a).trim().replace(If,""),c=o.slice(a+1).trim();if(!c)return null;if(t&&Lf.test(p))continue;let u=!1;if(p.endsWith("?"))u=!0,p=p.slice(0,-1).trim();if(!$f.test(p))return null;s.push({name:p,type:c,optional:u})}return s}function si({imported:e}){return e.type==="Identifier"?e.name:e.value}function nn(e,t){let n=t.source.value;if(typeof n!=="string"||t.importKind==="type")return;for(let i of t.specifiers){if(i.type!=="ImportSpecifier"||i.importKind==="type")continue;let r=i.local.name,s=si(i);e.valueImportBindingsByLocalName.set(r,{localName:r,importedName:s,source:n})}}function rn(e){return[e.importedName,...e.members??[]].join(".")}function Hr(e,t){let n=[],i=t;while(He(i)){if(i.computed||!b(i.property))return;n.unshift(i.property.name),i=i.object}if(!b(i))return;return sn(e,i.name,n)}function sn(e,t,n=[]){let i=(s,l,o)=>o.length>0?{source:s,importedName:l,members:o}:{source:s,importedName:l},r=e.valueImportBindingsByLocalName.get(t);if(r)return i(r.source,r.importedName,n);for(let s of[e.parsed?.instance,e.parsed?.module])for(let l of s?.content.body??[]){if(l.type!=="ImportDeclaration")continue;let o=l.source.value;if(l.importKind==="type"||typeof o!=="string")continue;let a=l.specifiers.find((p)=>p.local.name===t);if(a?.type==="ImportDefaultSpecifier")return i(o,"default",n);if(a?.type==="ImportNamespaceSpecifier"&&n.length>0)return i(o,n[0],n.slice(1))}return}function oi(e,t){if(!He(t))return;return Hr(e,t)}function ma(e){let t=new Map;for(let n of e.content.body){if(n.type!=="ImportDeclaration"||n.importKind==="type")continue;let i=n.source.value;if(typeof i!=="string")continue;for(let r of n.specifiers){if(r.type==="ImportSpecifier"&&r.importKind==="type")continue;let s=r.local.name,l;if(r.type==="ImportDefaultSpecifier")l="default";else if(r.type==="ImportNamespaceSpecifier")l="*";else l=si(r);t.set(s,{from:i,imported:l})}}return t}function Wr(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){nn(e,n);continue}let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i)}}function ai(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function zr(e){let t=[];return z(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return ie;if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function on(e,t,n){if(!t)return;Xn(e,t);let i=e.props.get(t);e.props.set(t,i?{...i,...n}:n)}function li(e,t,n,i){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:i,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:i,...t.pendingConstDefault})}var Rf=new Map([["Date","Date"],["Map","Map<any, any>"],["Set","Set<any>"],["WeakMap","WeakMap<object, any>"],["WeakSet","WeakSet<object>"],["Array","any[]"],["RegExp","RegExp"],["Regexp","RegExp"],["Error","Error"]]);function xe(e,t,n=0){let i=Bf(e,t,n),r=t&&typeof t==="object"?va(e,t):void 0;return r===void 0?i:{...i,type:r}}var Mf=/^\s*\(\s*$/;function va(e,t){let{constAssertions:n,typeAssertions:i}=e.typeCasts;if(n.has(t))return Me(t,"const");let r=i.get(t);if(r)return F(e,r),oe(e,r);return Of(e,t)}function Of(e,t){let n="start"in t&&typeof t.start==="number"?t.start:void 0;if(n===void 0)return;let i=e.parsed?.comments.findLast((r)=>r.end<=n);if(i?.type!=="Block"||!i.value.startsWith("*"))return;if(!Mf.test(q(e,i.end,n)??""))return;return ni(i.value)}function an(e){return e&&typeof e==="object"&&"type"in e?e:void 0}function Bf(e,t,n){let i=an(t);if(!i)return{value:void 0,type:void 0,isFunction:!1};let r=ba(e,i),s=(l,o)=>({value:l,type:o,isFunction:!1,defaultValue:r});switch(i.type){case"ObjectExpression":case"ArrayExpression":return s(Ke(e,i),Me(i,"widen"));case"BinaryExpression":return s(Ke(e,i),se(e,i,n));case"ArrowFunctionExpression":case"FunctionExpression":return{...s(Ea(e,i),Ca(e,i)),isFunction:!0};case"UnaryExpression":return s(Ke(e,i),se(e,i,n));case"LogicalExpression":case"ConditionalExpression":case"SequenceExpression":{let l=Ke(e,i),o=l!==void 0&&i.type==="SequenceExpression"?`(${l})`:l;return s(o,se(e,i,n))}case"NewExpression":{let{callee:l}=i,o=b(l)?Rf.get(l.name)??l.name:void 0;return s(Ue(e,i),o)}case"CallExpression":return Ff(e,i,r,n);case"Identifier":{let{name:l}=i;if(n<5){let o=cn(e,l);if(o){let p=xe(e,Hf(o),n+1),c=ge(e,l);return{...p,resolvedType:c?.type??p.resolvedType,resolvedDescription:c?.description??p.resolvedDescription,resolvedParams:c?.params??p.resolvedParams,resolvedReturnType:c?.returnType??p.resolvedReturnType}}let a=e.funcDecls.get(l);if(a){let p=ge(e,l);return{value:Ea(e,a),type:void 0,isFunction:!0,defaultValue:ba(e,a),resolvedType:p?.type??Ta(e,p,a),resolvedDescription:p?.description,resolvedParams:p?.params,resolvedReturnType:p?.returnType}}}return ya(s(Ue(e,i)),e.valueImportBindingsByLocalName.get(l))}case"MemberExpression":return ya(s(Ue(e,i),th(i)?"number":void 0),oi(e,i));case"TemplateLiteral":return s(Ue(e,i),"string");case"Literal":return typeof i.raw==="string"?s(i.raw,ht(i)):s(void 0);default:return s(void 0)}}function ya(e,t){if(!t)return e;let{source:n,importedName:i,members:r}=t;return{...e,pendingConstDefault:{importSource:n,importedName:i,...r?{members:r}:{}}}}function Ff(e,t,n,i){let r=Ue(e,t),{callee:s}=t,l=b(s)?s.name:void 0;if((l==="$derived"||l==="$state")&&t.arguments.length===1&&i<5)return{...xe(e,t.arguments[0],i+1),value:r,defaultValue:n};let o={value:r,type:void 0,isFunction:!1,defaultValue:n};if(l){let a=Wf(e,l);if(a?.declared)return{...o,resolvedType:a.type};if(a)return{...o,type:a.type};if(e.funcDecls.has(l)||Sa(e,l))return{...o,pendingCallDefault:{calleeName:l}};let p=e.valueImportBindingsByLocalName.get(l);if(p)return{...o,pendingCallDefault:{calleeName:l,importSource:p.source,importedName:p.importedName}}}return{...o,pendingCallDefault:{calleeName:l??Ue(e,s)??"call"}}}function ht(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var jf=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),qf=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function se(e,t,n){let i=an(t);if(!i)return;switch(i.type){case"UnaryExpression":{let{operator:r,argument:s}=i;if(r==="!"||r==="delete")return"boolean";if(r==="typeof")return"string";if(r==="void")return;if(r==="+")return"number";return se(e,s,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let{operator:r}=i;if(qf.has(r))return"boolean";let s=se(e,i.left,n),l=se(e,i.right,n);if(s==="bigint"&&l==="bigint")return"bigint";if(jf.has(r))return"number";if(r!=="+")return;if(s==="string"||l==="string")return"string";if(s==="number"&&l==="number")return"number";return}case"LogicalExpression":return ga([se(e,i.left,n),se(e,i.right,n)]);case"ConditionalExpression":return ga([se(e,i.consequent,n),se(e,i.alternate,n)]);case"SequenceExpression":return se(e,i.expressions[i.expressions.length-1],n);case"Identifier":{let{name:r}=i;if(r==="NaN"||r==="Infinity")return"number";if(r==="undefined")return;let s=dt(e,r)?.type;if(s)return s;if(n>=5)return;return se(e,cn(e,r),n+1)}default:{if(n>=5)return;let r=xe(e,i,n+1);return r.type??r.resolvedType}}}function ga(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function Me(e,t){let n=an(e),i=t==="widen";switch(n?.type){case"Literal":if("regex"in n&&n.regex)return"RegExp";if(n.value===null)return"null";return i?ht(n):n.raw??void 0;case"TemplateLiteral":if(n.expressions.length>0)return;return i?"string":`\`${n.quasis[0]?.value.raw??""}\``;case"Identifier":return n.name==="undefined"?"undefined":void 0;case"UnaryExpression":{let{operator:r,argument:s}=n;if(r!=="-"||s.type!=="Literal")return;let l=ht(s);if(l!=="number"&&l!=="bigint")return;return i?l:`-${s.raw}`}case"ArrayExpression":{let r=[];for(let o of n.elements){let a=o===null?void 0:Me(o,t);if(a===void 0)return;r.push(a)}if(t==="literal")return`[${r.join(", ")}]`;if(t==="const")return`readonly [${r.join(", ")}]`;let s=new Set(r);if(s.size===0)return"any[]";let l=[...s].join(" | ");return s.size===1?`${l}[]`:`(${l})[]`}case"ObjectExpression":{let r=new Map;for(let l of n.properties){if(l.type!=="Property"||l.kind!=="init"||l.computed||l.method||l.shorthand)return;let{key:o}=l,a=o.type==="Identifier"?o.name:o.type==="Literal"?o.raw:void 0,p=Me(l.value,t);if(a===void 0||p===void 0)return;r.delete(a),r.set(a,p)}if(r.size===0)return"{}";let s=t==="const"?"readonly ":"";return`{ ${[...r].map(([l,o])=>`${s}${l}: ${o}`).join("; ")} }`}default:return}}function ln(e,t,n=!1){let i=cn(e,t);if(i===void 0){let s=e.funcDecls.get(t);return s&&xa(e,t,s,n)}if(i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression")return va(e,i)??xa(e,t,i,n);if(i.type==="CallExpression"){let s=pn(e,i);if(s)return s;let l=oe(e,i.callee);if(l==="$state"||l==="$state.raw"||l==="$derived"){let o=i.typeArguments?.params[0];if(o)return F(e,o),oe(e,o);if(l==="$state.raw")return xe(e,i.arguments[0],1).type}}let r=xe(e,i);return r.type??r.resolvedType}function xa(e,t,n,i){let r=i?un(n):dn(n),s=$t(e,n,r);if(s.hasAnnotations)return s.signature;let l=ge(e,t);if(l?.type)return l.type;return i?Kr(l,n)??Lt(e,n):Ta(e,l,n)}var Vf=new Map([["writable","Writable"],["readable","Readable"],["derived","Readable"],["readonly","Readable"]]),Gf=/^(?:import\("svelte\/store"\)\.)?(?:Writable|Readable)<([\s\S]*)>$/;function pn(e,t){let n=b(t.callee)?e.valueImportBindingsByLocalName.get(t.callee.name):void 0,i=n?.source==="svelte/store"?Vf.get(n.importedName):void 0;if(!i)return;let r=n?.importedName==="derived",s=t.typeArguments?.params[r?1:0],l;if(s)F(e,s),l=oe(e,s);else if(n?.importedName==="readonly"){let[o]=t.arguments;l=(b(o)?ft(e,o.name)?.type??ln(e,o.name):o?.type==="CallExpression"?pn(e,o):void 0)?.trim().match(Gf)?.[1]}else if(r){let o=t.arguments[1];l=(o?.type==="ArrowFunctionExpression"||o?.type==="FunctionExpression")&&o.params.length<2?dn(o):void 0}else{let[o]=t.arguments;l=(b(o)?ft(e,o.name)?.type:void 0)??se(e,o,0)}return`import("svelte/store").${i}<${l??"any"}>`}function Hf(e){if(e.type!=="CallExpression"||e.arguments.length!==1)return e;let[t]=e.arguments;if(t.type==="SpreadElement")return e;let{callee:n}=e;return n.type==="Identifier"&&(n.name==="$state"||n.name==="$derived")||n.type==="MemberExpression"&&b(n.object)&&n.object.name==="$state"&&b(n.property)&&n.property.name==="raw"?t:e}function cn(e,t,n=!1){for(let i of e.vars){if(n&&i.kind!=="const")continue;for(let r of i.declarations)if(b(r.id)&&r.id.name===t&&r.init)return r.init}return}function It(e,t){return cn(e,t,!0)}function Wf(e,t){let n=ge(e,t);if(n?.returnType)return{type:n.returnType,declared:!0};let i=e.funcDecls.get(t)??Sa(e,t);if(!i)return;let r=Uf(e,i)??zf(e,t);if(r)return{type:r,declared:!0};let s=dn(i);return s==="any"?void 0:{type:s,declared:!1}}function Sa(e,t){let n=cn(e,t);return n?.type==="ArrowFunctionExpression"||n?.type==="FunctionExpression"?n:void 0}function zf(e,t){for(let n of e.vars)for(let i of n.declarations){let r=i.id;if(!b(r)||r.name!==t)continue;let s=r.typeAnnotation?.typeAnnotation;if(!s)return;return zo(q(e,s.start,s.end))}return}function Uf(e,t){let n=t.returnType?.typeAnnotation;return n&&q(e,n.start,n.end)}function Ta(e,t,n){let i=t?.returnType??"any",r=t?.params;if(r&&r.length>0)return`(${ye(r)}) => ${i}`;if(t?.returnType)return`() => ${i}`;return Ca(e,n)}function Ca(e,t){let n=dn(t),i=$t(e,t,n);if(i.hasAnnotations)return i.signature;return`(${Kf(t)}) => ${n}`}function Kf({params:e}){let t=[];for(let n of e){if(!b(n))return"...args: any[]";t.push(`${n.name}: any`)}return t.length>0?t.join(", "):"...args: any[]"}function Lt(e,t){let n=un(t),i=$t(e,t,n);if(i.hasAnnotations)return i.signature;return`(${ka(t)}) => ${n}`}function ka(e){let t=(i)=>e.params.length===1?"arg":`arg${i}`;return e.params.map((i,r)=>{if(i.type==="RestElement")return`...${b(i.argument)?i.argument.name:"args"}: any[]`;if(i.type==="AssignmentPattern")return`${b(i.left)?i.left.name:t(r)}?: any`;return`${b(i)?i.name:t(r)}: any`}).join(", ")}function Kr(e,t){if(!e?.params?.length&&!e?.returnType)return;return`(${e.params?.length?ye(e.params):ka(t)}) => ${e.returnType??un(t)}`}function un(e){return Jf(e)?e.async?"Promise<void>":"void":dn(e)}function Jf(e){return!e.generator&&e.body.type==="BlockStatement"&&zr(e.body).every((t)=>t===null)}function dn(e){if(e.async||e.generator)return"any";let{body:t}=e,n=t.type==="BlockStatement"?zr(t):[t],i=new Set(n.map(Xf)),[r]=i;return i.size===1&&r?r:"any"}function Xf(e){let t=an(e);switch(t?.type){case"Literal":{let{value:n}=t;if(typeof n==="string")return"string";if(typeof n==="number")return"number";if(typeof n==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let{callee:n}=t;if(!b(n))return null;if(n.name==="String")return"string";if(n.name==="Number")return"number";if(n.name==="Boolean")return"boolean";return null}default:return null}}function Yf(e,{params:t}){if(t.length===0)return"";return q(e,t[0].start,t[t.length-1].end)??""}function Ea(e,t){if(t.generator)return;let{body:n}=t,i=Yf(e,t),r=t.async?"async ":"",s=(a,p)=>a.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let a=Ke(e,n);return a===void 0?void 0:`${r}(${i}) => ${s(n,a)}`}let l=n.body;if(l.length===0)return`${r}(${i}) => {}`;let[o]=l;if(l.length===1&&o.type==="ReturnStatement"&&o.argument){let a=Ke(e,o.argument);if(a!==void 0)return`${r}(${i}) => ${s(o.argument,a)}`}return}function Qf(e){switch(e.type){case"Literal":case"UnaryExpression":return"literal";case"TemplateLiteral":return e.expressions.length===0?"literal":"expression";case"ArrayExpression":return"array";case"ObjectExpression":return"object";case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return"function";default:return"expression"}}function ba(e,t){let n=Ke(e,t);if(!n)return;let i=Qf(t);if(i!=="literal"&&i!=="array"&&i!=="object")return{raw:n,kind:i};let r=Ur(t);if(r.ok)return{raw:n,kind:i,value:r.value};return{raw:n,kind:t.type==="UnaryExpression"?"expression":i}}function Ur(e){let t=an(e);switch(t?.type){case"Literal":return typeof t.value==="bigint"||"regex"in t?{ok:!1}:{ok:!0,value:t.value};case"UnaryExpression":{let{operator:n,argument:i}=t;if(i.type!=="Literal")return{ok:!1};let{value:r}=i;if(typeof r==="number"){if(n==="-")return{ok:!0,value:-r};if(n==="+")return{ok:!0,value:r}}if(typeof r==="boolean"&&n==="!")return{ok:!0,value:!r};return{ok:!1}}case"TemplateLiteral":{let{expressions:n,quasis:i}=t;if(n.length>0||i.length!==1)return{ok:!1};return{ok:!0,value:i[0].value.cooked??i[0].value.raw}}case"ArrayExpression":{let n=[];for(let i of t.elements){if(!i)return{ok:!1};let r=Ur(i);if(!r.ok)return{ok:!1};n.push(r.value)}return{ok:!0,value:n}}case"ObjectExpression":{let n={};for(let i of t.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let r=K(i.key);if(!r)return{ok:!1};let s=Ur(i.value);if(!s.ok)return{ok:!1};n[r]=s.value}return{ok:!0,value:n}}default:return{ok:!1}}}var Zf=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),eh=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function th({object:e,property:t}){if(!b(e)||!b(t))return!1;if(e.name==="Number")return Zf.has(t.name);if(e.name==="Math")return eh.has(t.name);return!1}function fn(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function pi(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n]?.get(t);if(!i)continue;return i.kind==="prop"?i.publicPropName:void 0}return}function mt(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n];if(i===e.componentScope)return!1;if(i?.has(t))return!0}return!1}function ci(e,t){let n=t;while(He(n))n=n.object;return b(n)&&mt(e,n.name)}function Y(e,t=new Set){if(e)for(let n of vr(e))t.add(n.name);return t}function Jr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let n=pi(e,t.name);if(n)e.reactive_vars.add(n);return}if(t.type!=="ObjectPattern"&&t.type!=="ArrayPattern")return;for(let n of Y(t)){let i=pi(e,n);if(i)e.reactive_vars.add(i)}}function Mt(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function wa(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function nh(e){let t=[];if(e.id.type==="Identifier")return t.push({kind:"local",name:e.id.name}),t;if(e.id.type!=="ObjectPattern")return t;for(let n of e.id.properties){if(n.type==="RestElement"){if(n.argument.type==="Identifier")t.push({kind:"local",name:n.argument.name});continue}if(n.computed)continue;let i=K(n.key);if(!i)continue;let r=n.value.type==="AssignmentPattern"?n.value.left:n.value;if(r.type!=="Identifier"||!r.name)continue;t.push({kind:"prop",name:r.name,publicPropName:i})}return t}function Aa(e,t,n,i){let r=e.kind==="var"?n:t;for(let s of e.declarations){if(i?.allowRunesProps&&me(s.init,"$props")){for(let l of nh(s))fn(l.kind==="prop"?t:n,l.name,l.kind==="prop"?{kind:"prop",publicPropName:l.publicPropName}:{kind:"local"});continue}for(let l of Y(s.id))fn(r,l,i?.forceProp?{kind:"prop",publicPropName:l}:{kind:"local"})}}function Rt(e,...t){for(let n of t)for(let i of Y(n))fn(e,i,{kind:"local"})}function Pa(e,t,n,i){switch(e.type){case"VariableDeclaration":Aa(e,t,n,i);break;case"FunctionDeclaration":case"ClassDeclaration":Rt(t,e.id);break}}function ih(e,t){for(let{local:n,exported:i}of t){if(n.type!=="Identifier")continue;let r=i.type==="Identifier"?i.name:String(i.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:r})}}function rh(e,t){let n=e.componentScope;for(let i of t?.content.body??[])if(i.type==="ImportDeclaration")Rt(n,...i.specifiers.map((r)=>r.local));else if(i.type!=="ExportNamedDeclaration")Pa(i,n,n,{allowRunesProps:!0});else if(!i.declaration){if(i.source==null)ih(e,i.specifiers)}else if(i.declaration.type==="VariableDeclaration")Aa(i.declaration,n,n,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name){let{name:r}=i.declaration.id;fn(n,r,{kind:"prop",publicPropName:r})}}function _a(e){e.componentScope.clear(),e.activeScopes.length=0,rh(e,e.parsed?.instance)}function Da(e){return{varScopeStack:[e.componentScope]}}function Na(e,t,n){if(!Mt(n))return;let i=new Map,r=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Rt(i,n.id,...n.params.map((s)=>s.type==="TSParameterProperty"?s.parameter:s));break;case"BlockStatement":for(let s of n.body)Pa(s,i,r);break;case"CatchClause":Rt(i,n.param);break;case"EachBlock":if(Rt(i,n.context),typeof n.index==="string")fn(i,n.index,{kind:"local"});break;case"AwaitBlock":Rt(i,n.value,n.error);break}if(wa(n))t.varScopeStack.push(i);return i}function $a(e,t){if(wa(t))e.varScopeStack.pop()}function hn(e,t,n=!0){let i=ft(e,t);if(i||!n)return i;let r=ln(e,t,!0);if(!r)return null;let s=!ge(e,t)?.params?.length;return{type:r,...qr(e,t),inferred:s}}var sh=/\bany\b/;function Xr(e,t,n,i,r,s){if(r==="any"||!sh.test(r))return;D(e,"context-any-type",n,`Context "${t}" ${i} is inferred as "${r}"; annotate it to replace "any".`,C(e,s))}function oh(e,t,n){if(!b(t))return null;let i=It(e,t.name);if(re(i))return Fa(e,i,n).properties;let r=hn(e,t.name);return r?Re(r.type):null}function ah(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&K(n.key)===t)}function Ia(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let i=t[n];if(!i||typeof i!=="object"||!("typeAnnotation"in i))return;return oe(e,i.typeAnnotation)}function lh(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function ph(e,t,n,i,r){let s=()=>(D(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,C(e,i)),{type:"any"});if(b(r))return hn(e,r.name)??s();if(r?.type==="ArrowFunctionExpression"||r?.type==="FunctionExpression")return{type:Lt(e,r),inferred:!0};if(Ge(r))return{type:ht(r)??"null"};if(r?.type==="MemberExpression"&&!r.computed&&b(r.object)&&b(r.property)){let p=hn(e,r.object.name)?.type,c=p&&Vr(p,r.property.name);if(c)return{type:c}}if(r===void 0)return{type:"any"};let l=r.type==="CallExpression"?pn(e,r):void 0;if(l)return{type:l,inferred:!0};let o=xe(e,r),a=o.type??o.resolvedType;return a?{type:a,inferred:!0}:s()}function Fa(e,t,n){let i=[],r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){let h=oh(e,s.argument,n);if(h)i.push(...h);else r=!0,D(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,s));continue}if(s.type!=="Property")continue;let l=K(s.key);if(!l)continue;if(s.kind==="set"&&ah(t,l))continue;let o=s.kind==="get"||s.kind==="set"?s.value:void 0,a=j(e,s),p=!o&&(s.value.type==="ArrowFunctionExpression"||s.value.type==="FunctionExpression")?s.value:void 0,c=!a?.type&&p?Kr(a,p):void 0,u=o?s.kind==="get"?Ia(e,o,"returnType"):Ia(e,o.params[0],"typeAnnotation"):a?.type??c,f=u?{type:u,description:a?.description,inferred:c!==void 0&&!a?.params?.length}:ph(e,n,l,s,s.kind==="get"?lh(o):s.kind==="set"?void 0:s.value);if(f.inferred)Xr(e,n,l,`property "${l}"`,f.type,s);i.push({name:l,type:f.type,description:f.description||a?.description||void 0,optional:!1,...f.internal?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:r}}function La(e,t,n){let{properties:i,hasUnresolvedSpread:r}=Fa(e,t,n);return{key:n,typeName:Gr(n),properties:i,description:void 0,...r?{hasUnresolvedSpread:r}:{}}}function Ra(e,t,n){if(re(t))return La(e,t,n);let i=Gr(n),r=(p)=>({key:n,typeName:i,type:p,properties:[]});if(t.type==="CallExpression"){let p=pn(e,t);if(p)Xr(e,n,n,"value",p,t);return p?r(p):null}if(t.type==="Literal"&&t.value===null&&t.raw==="null")return r("null");if(b(t)&&t.name==="undefined")return r("undefined");if(!b(t))return null;let s=t.name,l=hn(e,s,!1),o=l?void 0:It(e,s);if(re(o)){let{internal:p}=qr(e,s);return{...La(e,o,n),...p?{internal:p}:{}}}let a=l??hn(e,s);if(a){if(a.inferred)Xr(e,n,s,`variable "${s}"`,a.type,t);let p=Re(a.type);return{key:n,typeName:i,...p?{}:{type:a.type},properties:p??[],description:a.description||void 0,...a.internal?{internal:!0}:{}}}return D(e,"context-any-type",s,`Context "${n}" variable "${s}" has no type annotation; defaulted to "any".`,C(e,t)),r("any")}function Ma(e){let t=e.callee,n=t.type==="Identifier"&&t.name==="Symbol",i=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!i)return null;let r=e.arguments[0];if(r?.type==="Literal"&&typeof r.value==="string")return r.value;if(r?.type==="TemplateLiteral"&&r.quasis.length===1)return r.quasis[0].value.cooked??"";return""}function Oa(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function ja(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let i=t;if(i.type==="Literal"||i.type==="TemplateLiteral"){let r=Wo(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="CallExpression"||i.type==="NewExpression"){let r=Ma(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let r=It(e,i.name);if(r&&typeof r==="object"&&"type"in r){let l=r;if((l.type==="CallExpression"||l.type==="NewExpression")&&Ma(l)==="")return{kind:"resolved",key:i.name};return ja(e,l,n+1)}let s=n===0&&mt(e,i.name)?void 0:e.valueImportBindingsByLocalName.get(i.name);return s?Oa(s):{kind:"unresolved"}}if(i.type==="MemberExpression"){let r=n===0&&ci(e,i)?void 0:oi(e,i);if(r)return Oa(r)}return{kind:"unresolved"}}function Ba(e,t,n,i,r){let s=oe(e,i)??"";D(e,"context-value-unresolved",t,`setContext(${n}, ${s}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,r)}function qa(e,t,n){let i=t.arguments[0];if(!i)return;let r=ja(e,i);if(r.kind==="unresolved"||r.kind==="resolved"&&!r.key){let c=oe(e,i)??"";D(e,"context-key-unresolved",c,`setContext key \`${c}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,C(e,t));return}let s=t.arguments[1];if(!s)return;let l=C(e,t),o=j(e,n)?.internal===!0;if(r.kind==="pending"){let c=rn(r),u=Ra(e,s,c);if(u)e.pendingContextKeyCandidates.push({importSource:r.importSource,importedName:r.importedName,...r.members?{members:r.members}:{},...u.type===void 0?{}:{type:u.type},properties:u.properties,description:u.description,...u.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...u.internal||o?{internal:!0}:{},source:l});else Ba(e,c,c,s,l);return}let a=r.key,p=Ra(e,s,a);if(!p){Ba(e,a,JSON.stringify(a),s,l);return}if(e.contexts.has(a)){D(e,"context-duplicate-key",a,`setContext("${a}", ...) was called more than once; only the first call's shape is used.`,l);return}e.contexts.set(a,{...p,...o?{internal:!0}:{},source:l})}var ch=/\n/g,uh=/^[A-Za-z_$][\w$]*$/;function Yr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return ft(e,n)?.type??ln(e,n)}}}function mn(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(b(t)){if(!mt(e,t.name))return n;let r=n??new Set;return r.add(t.name),r}let i=n;if(re(t)){for(let r of t.properties)if(r.type==="Property")i=mn(e,r.value,i)}else if(t.type==="ArrayExpression")for(let r of t.elements)i=mn(e,r,i);return i}function Va(e,t){if(b(t))return e.variableType(t.name);return dh(e,t)}function dh(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(re(t))return fh(e,t);if(t.type==="ArrayExpression")return hh(e,t);return}function Ga(e,t){return Va(e,t)??(Ge(t)?ht(t)??"null":"any")}function Qr(e,t){if(Ge(t)&&t.raw==="null")return"null";let n=Va(e,t);if(n!==void 0)return n;let i=Ge(t)?t.value:void 0;return i==null?"":mh(i)}function fh(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],i=!1;for(let r of t.properties){let s=r.type==="Property"&&!r.computed?K(r.key):void 0;if(r.type!=="Property"||!s){i=!0;continue}n.push({name:s,type:Ga(e,r.value)})}if(!i)return yn(n);if(n.length===0)return"Record<string, any>";return yn([...n,{name:"[key: string]",type:"any"}])}function hh(e,t){let n=new Set(t.elements.filter((i)=>i!=null).map((i)=>Ga(e,i)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Ha(e,t){for(let[n,i]of e.arguments.entries()){if(b(i)&&i.name===t)return{argumentIndex:n};if(!re(i))continue;for(let r of i.properties){if(r.type!=="Property"||!b(r.value))continue;if(r.value.name!==t)continue;let s=!r.computed&&b(r.key)?r.key.name:void 0;return{argumentIndex:n,property:s??""}}}return}function mh(e){return typeof e==="string"?JSON.stringify(e):String(e)}function Je(e,{name:t,detail:n,has_argument:i,description:r,deprecated:s,tags:l,internal:o,source:a}){let p=!i&&!n?"null":n||void 0,c=e.events.get(t);if(c?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:p,description:r||c.description,deprecated:s??c.deprecated,tags:l??c.tags,...o||c.internal?{internal:!0}:{},source:a||c.source});else if(c){let u=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...c,detail:c.detail===void 0||u?p:c.detail,description:c.description||r,deprecated:c.deprecated??s,tags:c.tags??l,...c.internal||o?{internal:!0}:{},source:a||c.source})}else e.events.set(t,{type:"dispatched",name:t,detail:p,description:r,deprecated:s,tags:l,...o?{internal:!0}:{},source:a})}function Wa(e,t){let n=t.arguments[0],i=Tr(n,"CustomEvent");if(!i&&!Tr(n,"Event"))return;let r=n.arguments[0],s=Ge(r)?r.value:void 0;if(s==null)return;let l=i?n.arguments[1]:void 0,o=!1,a;if(re(l)){let p=l.properties.find((c)=>c.type==="Property"&&b(c.key)&&c.key.name==="detail");if(p?.type==="Property")o=!0,a=p.value}return{name:String(s),detail:a,hasArgument:o,nestedBoundNames:mn(e,a),source:C(e,t)}}function za(e,t){Je(e,{name:t.name,detail:Qr(Yr(e,t.nestedBoundNames),t.detail),has_argument:t.hasArgument,source:t.source})}function yn(e,t=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:r,description:s,optional:l,default:o})=>{let a=l?"?":"",p=uh.test(i)||i.startsWith("[")?i:JSON.stringify(i),c=o?`@default ${o}`:"",u=Nt(s&&c?`${s} ${c}`:s||c);if(u){if(t)return`${u.includes(`
21
+ `).trim()}var gf=/\*\//g,xf=/[.*+?^${}()|[\]\\]/g;function en(e){return e.replace(xf,"\\$&")}function Nt(e){return e.replace(gf,"*\\/")}function ye(e){return e.map((t)=>`${t.name}${t.optional?"?":""}: ${t.type}`).join(", ")}var Ef=new Intl.Collator("en");function Re(e,t){return Ef.compare(e,t)}function pa(e){return e.type==="Identifier"?e.name:e.right.name}function ca(e){return e.type==="Identifier"?e.name:ca(e.left)}function ua(e,t,n){let i=t?.start,r=t?.end;if(i===void 0||r===void 0)return;return q(e,i+n,r)?.trim()}function ae(e,t){return ua(e,t,1)}function ct(e,t){return ua(e,t,0)}function Me(e,t,n,i,r=new Set){if(!t)return;let s=(a)=>Me(e,a,n,i,r);z(t,{enter(a){switch(a.type){case"TSInterfaceDeclaration":for(let o of a.extends??[])aa(e,o.expression,o.typeParameters?.params,n,i,r);return la(a.body.body,s),ie;case"TSTypeAliasDeclaration":case"TSTypeAnnotation":return s(a.typeAnnotation),ie;case"TSTypeLiteral":return la(a.members,s),ie;case"TSTypeReference":return aa(e,a.typeName,a.typeArguments?.params,n,i,r),ie}}})}function bf(e,t){let n=new Map;for(let i of Array.from(t).sort()){let r=e.valueImportBindingsByLocalName.get(i)??e.additionalImportedTypes.get(i),s=e.typeImportBindingsByLocalName.get(i)??(r?{...r,specifierType:"named"}:void 0);if(!s)continue;let a=n.get(s.source)??{default:[],named:[],namespace:[]};if(s.specifierType==="default")a.default.push(s.localName);else if(s.specifierType==="namespace")a.namespace.push(s.localName);else a.named.push({imported:s.importedName,local:s.localName});n.set(s.source,a)}return Array.from(n.entries()).sort(([i],[r])=>Re(i,r)).map(([i,r])=>{if(r.namespace.length>0)return r.namespace.map((l)=>`import type * as ${l} from "${i}";`).join(`
22
+ `);let s=r.named.map(({imported:l,local:p})=>{if(!l||l===p)return p;return`${l} as ${p}`}),a=r.default[0],o=s.length>0?`{ ${s.join(", ")} }`:"";if(a&&o)return`import type ${a}, ${o} from "${i}";`;if(a)return`import type ${a} from "${i}";`;return`import type ${o} from "${i}";`})}function aa(e,t,n,i,r,s){let a=ca(t);if(e.typeImportBindingsByLocalName.has(a)||e.valueImportBindingsByLocalName.has(a))i.add(a);let o=e.localTypeDeclarationsByName.get(a);if(o&&!s.has(a))r.add(a),s.add(a),Me(e,o.node,i,r,s),s.delete(a);for(let l of n??[])Me(e,l,i,r,s)}function la(e,t){for(let n of e)if(n.type==="TSPropertySignature")t(n.typeAnnotation?.typeAnnotation)}function F(e,t){if(t)e.additionalTypeDependencyNodes.push(t)}function vf(e){if(!e.const)return;let t=e.id.name,n=[];for(let i of e.members){let r=i.initializer;if(r?.type!=="Literal")return;let s=r.value;if(typeof s==="string")n.push(JSON.stringify(s));else if(typeof s==="number")n.push(String(s));else return}if(n.length===0)return;return`type ${t} = ${n.join(" | ")};`}function da(e,t){let n=vf(t);if(n)return n;let i=q(e,t.start,t.end)?.trim();return i?`declare ${i}`:void 0}var Sf=/\/\*\*((?:(?!\*\/)[\s\S])*)\*\/\s*$/;function Tf(e,t,n){if(t===void 0)return;let i=q(e,t,n),r=i&&Sf.exec(i);return r?ii(r[0]):void 0}function Vr(e,t){let n=[],i="start"in t&&typeof t.start==="number"?t.start:void 0,r=(s)=>t.params.length===1?"arg":`arg${s}`;for(let[s,a]of t.params.entries()){let o=Tf(e,i,a.start);i=a.end;let l=a.type==="TSParameterProperty"?a.parameter:a;if(l.type==="RestElement"){F(e,l.typeAnnotation?.typeAnnotation),n.push({name:l.argument.type==="Identifier"?l.argument.name:"rest",type:ae(e,l.typeAnnotation)??o,optional:!1,rest:!0});continue}let p=l.type==="AssignmentPattern",c=p?l.left:l,u="typeAnnotation"in c?c.typeAnnotation:void 0;F(e,u?.typeAnnotation),n.push({name:c.type==="Identifier"?c.name:r(s),type:ae(e,u)??o,optional:p||"optional"in l&&l.optional===!0,rest:!1})}F(e,t.returnType?.typeAnnotation);for(let s of t.typeParameters?.params??[])F(e,s.constraint),F(e,s.default);return{params:n,returnType:ae(e,t.returnType),typeParameters:ct(e,t.typeParameters)||void 0}}function $t(e,t,n="any"){let{params:i,returnType:r,typeParameters:s}=Vr(e,t),a=i.map(({name:l,type:p,optional:c,rest:u})=>u?`...${l}: ${p??"any[]"}`:`${l}${c?"?":""}: ${p??"any"}`),o=r!==void 0||s!==void 0||i.some((l)=>l.type!==void 0);return{signature:`${s??""}(${a.join(", ")}) => ${r??n}`,hasAnnotations:o}}function tn(e){return e.length>0?e.slice():void 0}function fa(e){let t=tn(e.pendingCallDefaultCandidates),n=tn(e.pendingConstDefaultCandidates.filter((o)=>o.location!=="props"||!e.explicitDefaultPropNames.has(o.propName))),i=tn(e.pendingContextKeyCandidates),r=tn(e.pendingDispatchEscapeCandidates);if(!t&&!n&&!i&&!r)return;let s=tn(e.deferredEventNoSourceDiagnostics),a=r&&e.untypedJsDocEventNames.size>0?Array.from(e.untypedJsDocEventNames):void 0;return{...t?{pendingCallDefaultCandidates:t}:{},...n?{pendingConstDefaultCandidates:n}:{},...i?{pendingContextKeyCandidates:i}:{},...r?{pendingDispatchEscapeCandidates:r}:{},...s?{deferredEventNoSourceDiagnostics:s}:{},...a?{untypedJsDocEventNames:a}:{}}}function ha(e){let t=new Set,n=new Set;for(let l of e.additionalTypeDependencyNodes)Me(e,l,t,n);for(let l of e.additionalImportedTypes.keys())t.add(l);let i=Array.from(e.localTypeDeclarationsByName.values()).filter((l)=>l.exported).sort((l,p)=>l.start-p.start);for(let l of i)Me(e,l.node,t,n);let r=i.map((l)=>`export ${l.code}`),s=e.typedRunesPropsDeclarations.length===1?e.typedRunesPropsDeclarations[0]:void 0,a=s?.canonicalType;if(s&&a){for(let l of s.referencedImportedTypes)t.add(l);for(let l of s.referencedLocalTypes)n.add(l)}if(!a&&t.size===0&&n.size===0&&r.length===0)return;let o=Array.from(n).map((l)=>e.localTypeDeclarationsByName.get(l)).filter((l)=>l!==void 0&&!l.exported).sort((l,p)=>l.start-p.start).map((l)=>l.code);return{...a?{canonicalPropsType:a}:{},canonicalPropNames:s&&a?Array.from(s.props.keys()).sort():[],localTypeDeclarations:o,...r.length>0?{moduleTypeDeclarations:r}:{},typeImportStatements:bf(e,t)}}function Cf(e,t,n,i,r){for(let s of e){if(s.type!=="Block"||s.start<n||s.end>i)continue;r.push({start:s.start,end:s.end,isJsDoc:s.end-s.start>4&&t.startsWith("/**",s.start)})}}function kf(e,t){for(let n of e){let{start:i}=n,r=n.type==="ExportNamedDeclaration"?n.declaration:n;if(r?.type==="FunctionDeclaration"){if(r.id?.name)t.push({name:r.id.name,start:i})}else if(r?.type==="VariableDeclaration"){for(let s of r.declarations)if(s.id.type==="Identifier"&&s.id.name)t.push({name:s.id.name,start:i})}}}function wf(e,t,n){let i=0,r=e.length;while(i<r){let s=i+r>>>1;if(e[s].end<=t)i=s+1;else r=s}for(let s=i-1;s>=0;s--){let a=e[s];if(!a.isJsDoc)continue;return Mr(n,a.end,t)?a:void 0}return}function Af(e){let t=new Map;if(!e.source)return t;let n=[],i=[],r=e.parsed?.comments??[];for(let s of[e.parsed?.module,e.parsed?.instance]){let a=s?.content;if(!a)continue;Cf(r,e.source,a.start,a.end,n),kf(a.body,i)}n.sort((s,a)=>s.end-a.end);for(let s of i){let a=wf(n,s.start,e.source);if(!a)continue;let o=Fr(e,e.source.slice(a.start,a.end)),{type:l,description:p,ignore:c,internal:u}=ri(o);if(c.length>0)Ue(e,"context-any-type",s.name,c);if(!l&&!p&&!u)continue;t.set(s.name,{type:l?we(l.type):void 0,description:p||l&&na(l),internal:u||void 0})}return t}function ya(e,t){return e.variableInfoCache??=Af(e),e.variableInfoCache.get(t)}function ut(e,t){let n=Dr(e,t);if(n?.type)return{type:n.type,description:n.description,internal:n.internal};let i=ya(e,t),r=e.explicitVariableTypesByName.get(t);if(r)return{type:r,description:i?.description,internal:i?.internal};if(!i?.type)return null;return{type:i.type,description:i.description,internal:i.internal}}function dt(e,t){let n=ut(e,t);if(n&&n.type===e.explicitVariableTypesByName.get(t))F(e,e.explicitVariableTypeNodesByName.get(t));return n}function Gr(e,t){let n=ya(e,t);return{...n?.description?{description:n.description}:{},...n?.internal?{internal:!0}:{}}}function ge(e,t){for(let i of e.vars)if(i.declarations.some((r)=>r.id.type==="Identifier"&&r.id.name===t))return ma(e,i);let n=e.funcDecls.get(t);return n&&ma(e,n)}function ma(e,t){let n=j(e,t);if(n)return n;for(let i of[e.parsed?.instance,e.parsed?.module])for(let r of i?.content.body??[])if(r.type==="ExportNamedDeclaration"&&r.declaration===t)return j(e,r);return}var Pf=/\w/,_f=/^readonly\s+/;function Hr(e,t){let n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return;let i=O(n.slice(1,-1),";,").map((r)=>r.trim().replace(_f,""));for(let r of i){if(!r.startsWith(t))continue;let s=r.slice(t.length);if(Pf.test(s.charAt(0)))continue;let a=s.trimStart(),o=a.startsWith("?");if(o)a=a.slice(1).trimStart();if(!a.startsWith(":"))continue;let l=a.slice(1).trim();return o?`${l} | undefined`:l}return}function ga(e,t){if(t.computed||t.object.type!=="Identifier"||t.property.type!=="Identifier")return;let n=t.object.name,i=t.property.name;if(e.wholePropsLocals.has(n))return Jt(e,i);let r=Jt(e,n)??ut(e,n)?.type;if(!r)return;return Hr(r,i)}var Df=/(?:_|[^\p{ID_Continue}$])+/u,Nf=/^[\p{ID_Start}$]/u;function Wr(e){let i=`${e.split(Df).map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}Context`;return Nf.test(i)?i:`_${i}`}var $f=/^\{([\s\S]*)\}$/,If=/^[A-Za-z_$][\w$]*$/,Lf=/^readonly\s+/,Rf=/^\[[\w$]+\s*:[^\]]+\]$/;function Oe(e,{skipIndexSignatures:t=!1}={}){let n=e.trim(),i=$f.exec(n);if(!i)return null;let r=i[1].trim();if(r==="")return[];let s=[];for(let a of O(r,";,")){let o=a.trim();if(!o)continue;let l=Kt(o,":");if(l===-1)return null;let p=o.slice(0,l).trim().replace(Lf,""),c=o.slice(l+1).trim();if(!c)return null;if(t&&Rf.test(p))continue;let u=!1;if(p.endsWith("?"))u=!0,p=p.slice(0,-1).trim();if(!If.test(p))return null;s.push({name:p,type:c,optional:u})}return s}function oi({imported:e}){return e.type==="Identifier"?e.name:e.value}function nn(e,t){let n=t.source.value;if(typeof n!=="string"||t.importKind==="type")return;for(let i of t.specifiers){if(i.type!=="ImportSpecifier"||i.importKind==="type")continue;let r=i.local.name,s=oi(i);e.valueImportBindingsByLocalName.set(r,{localName:r,importedName:s,source:n})}}function rn(e){return[e.importedName,...e.members??[]].join(".")}function zr(e,t){let n=[],i=t;while(We(i)){if(i.computed||!b(i.property))return;n.unshift(i.property.name),i=i.object}if(!b(i))return;return sn(e,i.name,n)}function sn(e,t,n=[]){let i=(s,a,o)=>o.length>0?{source:s,importedName:a,members:o}:{source:s,importedName:a},r=e.valueImportBindingsByLocalName.get(t);if(r)return i(r.source,r.importedName,n);for(let s of[e.parsed?.instance,e.parsed?.module])for(let a of s?.content.body??[]){if(a.type!=="ImportDeclaration")continue;let o=a.source.value;if(a.importKind==="type"||typeof o!=="string")continue;let l=a.specifiers.find((p)=>p.local.name===t);if(l?.type==="ImportDefaultSpecifier")return i(o,"default",n);if(l?.type==="ImportNamespaceSpecifier"&&n.length>0)return i(o,n[0],n.slice(1))}return}function ai(e,t){if(!We(t))return;return zr(e,t)}function xa(e){let t=new Map;for(let n of e.content.body){if(n.type!=="ImportDeclaration"||n.importKind==="type")continue;let i=n.source.value;if(typeof i!=="string")continue;for(let r of n.specifiers){if(r.type==="ImportSpecifier"&&r.importKind==="type")continue;let s=r.local.name,a;if(r.type==="ImportDefaultSpecifier")a="default";else if(r.type==="ImportNamespaceSpecifier")a="*";else a=oi(r);t.set(s,{from:i,imported:a})}}return t}function Ur(e,t){for(let n of t?.content.body??[]){if(n.type==="ImportDeclaration"){nn(e,n);continue}let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i)}}function li(e){return e==="TSTypeAnnotation"||e==="TSTypeAliasDeclaration"||e==="TSInterfaceDeclaration"||e==="TSTypeParameterDeclaration"||e==="TSTypeParameterInstantiation"}function Kr(e){let t=[];return z(e,{enter(n){if(n.type==="FunctionDeclaration"||n.type==="FunctionExpression"||n.type==="ArrowFunctionExpression")return ie;if(n.type==="ReturnStatement")t.push(n.argument??null)}}),t}function on(e,t,n){if(!t)return;Yn(e,t);let i=e.props.get(t);e.props.set(t,i?{...i,...n}:n)}function pi(e,t,n,i){if(t.pendingCallDefault)e.pendingCallDefaultCandidates.push({propName:n,location:i,...t.pendingCallDefault});if(t.pendingConstDefault)e.pendingConstDefaultCandidates.push({propName:n,location:i,...t.pendingConstDefault})}var Mf=new Map([["Date","Date"],["Map","Map<any, any>"],["Set","Set<any>"],["WeakMap","WeakMap<object, any>"],["WeakSet","WeakSet<object>"],["Array","any[]"],["RegExp","RegExp"],["Regexp","RegExp"],["Error","Error"]]);function xe(e,t,n=0){let i=Ff(e,t,n),r=t&&typeof t==="object"?Ca(e,t):void 0;return r===void 0?i:{...i,type:r}}var Of=/^\s*\(\s*$/;function Ca(e,t){let{constAssertions:n,typeAssertions:i}=e.typeCasts;if(n.has(t))return Be(t,"const");let r=i.get(t);if(r)return F(e,r),oe(e,r);return Bf(e,t)}function Bf(e,t){let n="start"in t&&typeof t.start==="number"?t.start:void 0;if(n===void 0)return;let i=e.parsed?.comments.findLast((r)=>r.end<=n);if(i?.type!=="Block"||!i.value.startsWith("*"))return;if(!Of.test(q(e,i.end,n)??""))return;return ii(i.value)}function an(e){return e&&typeof e==="object"&&"type"in e?e:void 0}function Ff(e,t,n){let i=an(t);if(!i)return{value:void 0,type:void 0,isFunction:!1};let r=Ta(e,i),s=(a,o)=>({value:a,type:o,isFunction:!1,defaultValue:r});switch(i.type){case"ObjectExpression":case"ArrayExpression":return s(Je(e,i),Be(i,"widen"));case"BinaryExpression":return s(Je(e,i),se(e,i,n));case"ArrowFunctionExpression":case"FunctionExpression":return{...s(Sa(e,i),Aa(e,i)),isFunction:!0};case"UnaryExpression":return s(Je(e,i),se(e,i,n));case"LogicalExpression":case"ConditionalExpression":case"SequenceExpression":{let a=Je(e,i),o=a!==void 0&&i.type==="SequenceExpression"?`(${a})`:a;return s(o,se(e,i,n))}case"NewExpression":{let{callee:a}=i,o=b(a)?Mf.get(a.name)??a.name:void 0;return s(Ke(e,i),o)}case"CallExpression":return jf(e,i,r,n);case"Identifier":{let{name:a}=i;if(n<5){let o=cn(e,a);if(o){let p=xe(e,Wf(o),n+1),c=ge(e,a);return{...p,resolvedType:c?.type??p.resolvedType,resolvedDescription:c?.description??p.resolvedDescription,resolvedParams:c?.params??p.resolvedParams,resolvedReturnType:c?.returnType??p.resolvedReturnType}}let l=e.funcDecls.get(a);if(l){let p=ge(e,a);return{value:Sa(e,l),type:void 0,isFunction:!0,defaultValue:Ta(e,l),resolvedType:p?.type??wa(e,p,l),resolvedDescription:p?.description,resolvedParams:p?.params,resolvedReturnType:p?.returnType}}}return Ea(s(Ke(e,i)),e.valueImportBindingsByLocalName.get(a))}case"MemberExpression":return Ea(s(Ke(e,i),nh(i)?"number":void 0),ai(e,i));case"TemplateLiteral":return s(Ke(e,i),"string");case"Literal":return typeof i.raw==="string"?s(i.raw,ft(i)):s(void 0);default:return s(void 0)}}function Ea(e,t){if(!t)return e;let{source:n,importedName:i,members:r}=t;return{...e,pendingConstDefault:{importSource:n,importedName:i,...r?{members:r}:{}}}}function jf(e,t,n,i){let r=Ke(e,t),{callee:s}=t,a=b(s)?s.name:void 0;if((a==="$derived"||a==="$state")&&t.arguments.length===1&&i<5)return{...xe(e,t.arguments[0],i+1),value:r,defaultValue:n};let o={value:r,type:void 0,isFunction:!1,defaultValue:n};if(a){let l=zf(e,a);if(l?.declared)return{...o,resolvedType:l.type};if(l)return{...o,type:l.type};if(e.funcDecls.has(a)||ka(e,a))return{...o,pendingCallDefault:{calleeName:a}};let p=e.valueImportBindingsByLocalName.get(a);if(p)return{...o,pendingCallDefault:{calleeName:a,importSource:p.source,importedName:p.importedName}}}return{...o,pendingCallDefault:{calleeName:a??Ke(e,s)??"call"}}}function ft(e){if("regex"in e&&e.regex)return"RegExp";if("bigint"in e&&e.bigint)return"bigint";return e.value==null?void 0:typeof e.value}var qf=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),Vf=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function se(e,t,n){let i=an(t);if(!i)return;switch(i.type){case"UnaryExpression":{let{operator:r,argument:s}=i;if(r==="!"||r==="delete")return"boolean";if(r==="typeof")return"string";if(r==="void")return;if(r==="+")return"number";return se(e,s,n)==="bigint"?"bigint":"number"}case"BinaryExpression":{let{operator:r}=i;if(Vf.has(r))return"boolean";let s=se(e,i.left,n),a=se(e,i.right,n);if(s==="bigint"&&a==="bigint")return"bigint";if(qf.has(r))return"number";if(r!=="+")return;if(s==="string"||a==="string")return"string";if(s==="number"&&a==="number")return"number";return}case"LogicalExpression":return ba([se(e,i.left,n),se(e,i.right,n)]);case"ConditionalExpression":return ba([se(e,i.consequent,n),se(e,i.alternate,n)]);case"SequenceExpression":return se(e,i.expressions[i.expressions.length-1],n);case"Identifier":{let{name:r}=i;if(r==="NaN"||r==="Infinity")return"number";if(r==="undefined")return;let s=ut(e,r)?.type;if(s)return s;if(n>=5)return;return se(e,cn(e,r),n+1)}default:{if(n>=5)return;let r=xe(e,i,n+1);return r.type??r.resolvedType}}}function ba(e){let t=new Set;for(let n of e){if(n===void 0)return;t.add(n.includes("=>")?`(${n})`:n)}return t.size===1?e[0]:[...t].join(" | ")}function Be(e,t){let n=an(e),i=t==="widen";switch(n?.type){case"Literal":if("regex"in n&&n.regex)return"RegExp";if(n.value===null)return"null";return i?ft(n):n.raw??void 0;case"TemplateLiteral":if(n.expressions.length>0)return;return i?"string":`\`${n.quasis[0]?.value.raw??""}\``;case"Identifier":return n.name==="undefined"?"undefined":void 0;case"UnaryExpression":{let{operator:r,argument:s}=n;if(r!=="-"||s.type!=="Literal")return;let a=ft(s);if(a!=="number"&&a!=="bigint")return;return i?a:`-${s.raw}`}case"ArrayExpression":{let r=[];for(let o of n.elements){let l=o===null?void 0:Be(o,t);if(l===void 0)return;r.push(l)}if(t==="literal")return`[${r.join(", ")}]`;if(t==="const")return`readonly [${r.join(", ")}]`;let s=new Set(r);if(s.size===0)return"any[]";let a=[...s].join(" | ");return s.size===1?`${a}[]`:`(${a})[]`}case"ObjectExpression":{let r=new Map;for(let a of n.properties){if(a.type!=="Property"||a.kind!=="init"||a.computed||a.method||a.shorthand)return;let{key:o}=a,l=o.type==="Identifier"?o.name:o.type==="Literal"?o.raw:void 0,p=Be(a.value,t);if(l===void 0||p===void 0)return;r.delete(l),r.set(l,p)}if(r.size===0)return"{}";let s=t==="const"?"readonly ":"";return`{ ${[...r].map(([a,o])=>`${s}${a}: ${o}`).join("; ")} }`}default:return}}function ln(e,t,n=!1){let i=cn(e,t);if(i===void 0){let s=e.funcDecls.get(t);return s&&va(e,t,s,n)}if(i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression")return Ca(e,i)??va(e,t,i,n);if(i.type==="CallExpression"){let s=pn(e,i);if(s)return s;let a=oe(e,i.callee);if(a==="$state"||a==="$state.raw"||a==="$derived"){let o=i.typeArguments?.params[0];if(o)return F(e,o),oe(e,o);if(a==="$state.raw")return xe(e,i.arguments[0],1).type}}let r=xe(e,i);return r.type??r.resolvedType}function va(e,t,n,i){let r=i?un(n):dn(n),s=$t(e,n,r);if(s.hasAnnotations)return s.signature;let a=ge(e,t);if(a?.type)return a.type;return i?Xr(a,n)??Lt(e,n):wa(e,a,n)}var Gf=new Map([["writable","Writable"],["readable","Readable"],["derived","Readable"],["readonly","Readable"]]),Hf=/^(?:import\("svelte\/store"\)\.)?(?:Writable|Readable)<([\s\S]*)>$/;function pn(e,t){let n=b(t.callee)?e.valueImportBindingsByLocalName.get(t.callee.name):void 0,i=n?.source==="svelte/store"?Gf.get(n.importedName):void 0;if(!i)return;let r=n?.importedName==="derived",s=t.typeArguments?.params[r?1:0],a;if(s)F(e,s),a=oe(e,s);else if(n?.importedName==="readonly"){let[o]=t.arguments;a=(b(o)?dt(e,o.name)?.type??ln(e,o.name):o?.type==="CallExpression"?pn(e,o):void 0)?.trim().match(Hf)?.[1]}else if(r){let o=t.arguments[1];a=(o?.type==="ArrowFunctionExpression"||o?.type==="FunctionExpression")&&o.params.length<2?dn(o):void 0}else{let[o]=t.arguments;a=(b(o)?dt(e,o.name)?.type:void 0)??se(e,o,0)}return`import("svelte/store").${i}<${a??"any"}>`}function Wf(e){if(e.type!=="CallExpression"||e.arguments.length!==1)return e;let[t]=e.arguments;if(t.type==="SpreadElement")return e;let{callee:n}=e;return n.type==="Identifier"&&(n.name==="$state"||n.name==="$derived")||n.type==="MemberExpression"&&b(n.object)&&n.object.name==="$state"&&b(n.property)&&n.property.name==="raw"?t:e}function cn(e,t,n=!1){for(let i of e.vars){if(n&&i.kind!=="const")continue;for(let r of i.declarations)if(b(r.id)&&r.id.name===t&&r.init)return r.init}return}function It(e,t){return cn(e,t,!0)}function zf(e,t){let n=ge(e,t);if(n?.returnType)return{type:n.returnType,declared:!0};let i=e.funcDecls.get(t)??ka(e,t);if(!i)return;let r=Kf(e,i)??Uf(e,t);if(r)return{type:r,declared:!0};let s=dn(i);return s==="any"?void 0:{type:s,declared:!1}}function ka(e,t){let n=cn(e,t);return n?.type==="ArrowFunctionExpression"||n?.type==="FunctionExpression"?n:void 0}function Uf(e,t){for(let n of e.vars)for(let i of n.declarations){let r=i.id;if(!b(r)||r.name!==t)continue;let s=r.typeAnnotation?.typeAnnotation;if(!s)return;return Jo(q(e,s.start,s.end))}return}function Kf(e,t){let n=t.returnType?.typeAnnotation;return n&&q(e,n.start,n.end)}function wa(e,t,n){let i=t?.returnType??"any",r=t?.params;if(r&&r.length>0)return`(${ye(r)}) => ${i}`;if(t?.returnType)return`() => ${i}`;return Aa(e,n)}function Aa(e,t){let n=dn(t),i=$t(e,t,n);if(i.hasAnnotations)return i.signature;return`(${Jf(t)}) => ${n}`}function Jf({params:e}){let t=[];for(let n of e){if(!b(n))return"...args: any[]";t.push(`${n.name}: any`)}return t.length>0?t.join(", "):"...args: any[]"}function Lt(e,t){let n=un(t),i=$t(e,t,n);if(i.hasAnnotations)return i.signature;return`(${Pa(t)}) => ${n}`}function Pa(e){let t=(i)=>e.params.length===1?"arg":`arg${i}`;return e.params.map((i,r)=>{if(i.type==="RestElement")return`...${b(i.argument)?i.argument.name:"args"}: any[]`;if(i.type==="AssignmentPattern")return`${b(i.left)?i.left.name:t(r)}?: any`;return`${b(i)?i.name:t(r)}: any`}).join(", ")}function Xr(e,t){if(!e?.params?.length&&!e?.returnType)return;return`(${e.params?.length?ye(e.params):Pa(t)}) => ${e.returnType??un(t)}`}function un(e){return Xf(e)?e.async?"Promise<void>":"void":dn(e)}function Xf(e){return!e.generator&&e.body.type==="BlockStatement"&&Kr(e.body).every((t)=>t===null)}function dn(e){if(e.async||e.generator)return"any";let{body:t}=e,n=t.type==="BlockStatement"?Kr(t):[t],i=new Set(n.map(Yf)),[r]=i;return i.size===1&&r?r:"any"}function Yf(e){let t=an(e);switch(t?.type){case"Literal":{let{value:n}=t;if(typeof n==="string")return"string";if(typeof n==="number")return"number";if(typeof n==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let{callee:n}=t;if(!b(n))return null;if(n.name==="String")return"string";if(n.name==="Number")return"number";if(n.name==="Boolean")return"boolean";return null}default:return null}}function Qf(e,{params:t}){if(t.length===0)return"";return q(e,t[0].start,t[t.length-1].end)??""}function Sa(e,t){if(t.generator)return;let{body:n}=t,i=Qf(e,t),r=t.async?"async ":"",s=(l,p)=>l.type==="ObjectExpression"?`(${p})`:p;if(n.type!=="BlockStatement"){let l=Je(e,n);return l===void 0?void 0:`${r}(${i}) => ${s(n,l)}`}let a=n.body;if(a.length===0)return`${r}(${i}) => {}`;let[o]=a;if(a.length===1&&o.type==="ReturnStatement"&&o.argument){let l=Je(e,o.argument);if(l!==void 0)return`${r}(${i}) => ${s(o.argument,l)}`}return}function Zf(e){switch(e.type){case"Literal":case"UnaryExpression":return"literal";case"TemplateLiteral":return e.expressions.length===0?"literal":"expression";case"ArrayExpression":return"array";case"ObjectExpression":return"object";case"ArrowFunctionExpression":case"FunctionExpression":case"FunctionDeclaration":return"function";default:return"expression"}}function Ta(e,t){let n=Je(e,t);if(!n)return;let i=Zf(t);if(i!=="literal"&&i!=="array"&&i!=="object")return{raw:n,kind:i};let r=Jr(t);if(r.ok)return{raw:n,kind:i,value:r.value};return{raw:n,kind:t.type==="UnaryExpression"?"expression":i}}function Jr(e){let t=an(e);switch(t?.type){case"Literal":return typeof t.value==="bigint"||"regex"in t?{ok:!1}:{ok:!0,value:t.value};case"UnaryExpression":{let{operator:n,argument:i}=t;if(i.type!=="Literal")return{ok:!1};let{value:r}=i;if(typeof r==="number"){if(n==="-")return{ok:!0,value:-r};if(n==="+")return{ok:!0,value:r}}if(typeof r==="boolean"&&n==="!")return{ok:!0,value:!r};return{ok:!1}}case"TemplateLiteral":{let{expressions:n,quasis:i}=t;if(n.length>0||i.length!==1)return{ok:!1};return{ok:!0,value:i[0].value.cooked??i[0].value.raw}}case"ArrayExpression":{let n=[];for(let i of t.elements){if(!i)return{ok:!1};let r=Jr(i);if(!r.ok)return{ok:!1};n.push(r.value)}return{ok:!0,value:n}}case"ObjectExpression":{let n={};for(let i of t.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let r=K(i.key);if(!r)return{ok:!1};let s=Jr(i.value);if(!s.ok)return{ok:!1};n[r]=s.value}return{ok:!0,value:n}}default:return{ok:!1}}}var eh=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),th=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function nh({object:e,property:t}){if(!b(e)||!b(t))return!1;if(e.name==="Number")return eh.has(t.name);if(e.name==="Math")return th.has(t.name);return!1}function fn(e,t,n){if(!t||e.has(t))return;e.set(t,n)}function ci(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n]?.get(t);if(!i)continue;return i.kind==="prop"?i.publicPropName:void 0}return}function ht(e,t){for(let n=e.activeScopes.length-1;n>=0;n-=1){let i=e.activeScopes[n];if(i===e.componentScope)return!1;if(i?.has(t))return!0}return!1}function ui(e,t){let n=t;while(We(n))n=n.object;return b(n)&&ht(e,n.name)}function Y(e,t=new Set){if(e)for(let n of Tr(e))t.add(n.name);return t}function Yr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let n=ci(e,t.name);if(n)e.reactive_vars.add(n);return}if(t.type!=="ObjectPattern"&&t.type!=="ArrayPattern")return;for(let n of Y(t)){let i=ci(e,n);if(i)e.reactive_vars.add(i)}}function Mt(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function _a(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function ih(e){let t=[];if(e.id.type==="Identifier")return t.push({kind:"local",name:e.id.name}),t;if(e.id.type!=="ObjectPattern")return t;for(let n of e.id.properties){if(n.type==="RestElement"){if(n.argument.type==="Identifier")t.push({kind:"local",name:n.argument.name});continue}if(n.computed)continue;let i=K(n.key);if(!i)continue;let r=n.value.type==="AssignmentPattern"?n.value.left:n.value;if(r.type!=="Identifier"||!r.name)continue;t.push({kind:"prop",name:r.name,publicPropName:i})}return t}function Da(e,t,n,i){let r=e.kind==="var"?n:t;for(let s of e.declarations){if(i?.allowRunesProps&&me(s.init,"$props")){for(let a of ih(s))fn(a.kind==="prop"?t:n,a.name,a.kind==="prop"?{kind:"prop",publicPropName:a.publicPropName}:{kind:"local"});continue}for(let a of Y(s.id))fn(r,a,i?.forceProp?{kind:"prop",publicPropName:a}:{kind:"local"})}}function Rt(e,...t){for(let n of t)for(let i of Y(n))fn(e,i,{kind:"local"})}function Na(e,t,n,i){switch(e.type){case"VariableDeclaration":Da(e,t,n,i);break;case"FunctionDeclaration":case"ClassDeclaration":Rt(t,e.id);break}}function rh(e,t){for(let{local:n,exported:i}of t){if(n.type!=="Identifier")continue;let r=i.type==="Identifier"?i.name:String(i.value);if(e.componentScope.get(n.name)?.kind==="prop")continue;e.componentScope.set(n.name,{kind:"prop",publicPropName:r})}}function sh(e,t){let n=e.componentScope;for(let i of t?.content.body??[])if(i.type==="ImportDeclaration")Rt(n,...i.specifiers.map((r)=>r.local));else if(i.type!=="ExportNamedDeclaration")Na(i,n,n,{allowRunesProps:!0});else if(!i.declaration){if(i.source==null)rh(e,i.specifiers)}else if(i.declaration.type==="VariableDeclaration")Da(i.declaration,n,n,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name){let{name:r}=i.declaration.id;fn(n,r,{kind:"prop",publicPropName:r})}}function $a(e){e.componentScope.clear(),e.activeScopes.length=0,sh(e,e.parsed?.instance)}function Ia(e){return{varScopeStack:[e.componentScope]}}function La(e,t,n){if(!Mt(n))return;let i=new Map,r=t.varScopeStack[t.varScopeStack.length-1]??e.componentScope;switch(n.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":Rt(i,n.id,...n.params.map((s)=>s.type==="TSParameterProperty"?s.parameter:s));break;case"BlockStatement":for(let s of n.body)Na(s,i,r);break;case"CatchClause":Rt(i,n.param);break;case"EachBlock":if(Rt(i,n.context),typeof n.index==="string")fn(i,n.index,{kind:"local"});break;case"AwaitBlock":Rt(i,n.value,n.error);break}if(_a(n))t.varScopeStack.push(i);return i}function Ra(e,t){if(_a(t))e.varScopeStack.pop()}function hn(e,t,n=!0){let i=dt(e,t);if(i||!n)return i;let r=ln(e,t,!0);if(!r)return null;let s=!ge(e,t)?.params?.length;return{type:r,...Gr(e,t),inferred:s}}var oh=/\bany\b/;function Qr(e,t,n,i,r,s){if(r==="any"||!oh.test(r))return;D(e,"context-any-type",n,`Context "${t}" ${i} is inferred as "${r}"; annotate it to replace "any".`,C(e,s))}function ah(e,t,n){if(!b(t))return null;let i=It(e,t.name);if(re(i))return Va(e,i,n).properties;let r=hn(e,t.name);return r?Oe(r.type):null}function lh(e,t){return e.properties.some((n)=>n.type==="Property"&&n.kind==="get"&&K(n.key)===t)}function Ma(e,t,n){if(!t||typeof t!=="object"||!(n in t))return;let i=t[n];if(!i||typeof i!=="object"||!("typeAnnotation"in i))return;return oe(e,i.typeAnnotation)}function ph(e){let t=e?.body.body;if(t?.length!==1||t[0].type!=="ReturnStatement")return;return t[0].argument??void 0}function ch(e,t,n,i,r){let s=()=>(D(e,"context-any-type",n,`Context "${t}" property "${n}" has no type annotation; defaulted to "any".`,C(e,i)),{type:"any"});if(b(r))return hn(e,r.name)??s();if(r?.type==="ArrowFunctionExpression"||r?.type==="FunctionExpression")return{type:Lt(e,r),inferred:!0};if(He(r))return{type:ft(r)??"null"};if(r?.type==="MemberExpression"&&!r.computed&&b(r.object)&&b(r.property)){let p=hn(e,r.object.name)?.type,c=p&&Hr(p,r.property.name);if(c)return{type:c}}if(r===void 0)return{type:"any"};let a=r.type==="CallExpression"?pn(e,r):void 0;if(a)return{type:a,inferred:!0};let o=xe(e,r),l=o.type??o.resolvedType;return l?{type:l,inferred:!0}:s()}function Va(e,t,n){let i=[],r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){let h=ah(e,s.argument,n);if(h)i.push(...h);else r=!0,D(e,"spread-unresolved",n,`Context "${n}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,s));continue}if(s.type!=="Property")continue;let a=K(s.key);if(!a)continue;if(s.kind==="set"&&lh(t,a))continue;let o=s.kind==="get"||s.kind==="set"?s.value:void 0,l=j(e,s),p=!o&&(s.value.type==="ArrowFunctionExpression"||s.value.type==="FunctionExpression")?s.value:void 0,c=!l?.type&&p?Xr(l,p):void 0,u=o?s.kind==="get"?Ma(e,o,"returnType"):Ma(e,o.params[0],"typeAnnotation"):l?.type??c,f=u?{type:u,description:l?.description,inferred:c!==void 0&&!l?.params?.length}:ch(e,n,a,s,s.kind==="get"?ph(o):s.kind==="set"?void 0:s.value);if(f.inferred)Qr(e,n,a,`property "${a}"`,f.type,s);i.push({name:a,type:f.type,description:f.description||l?.description||void 0,optional:!1,...f.internal?{internal:!0}:{}})}return{properties:i,hasUnresolvedSpread:r}}function Oa(e,t,n){let{properties:i,hasUnresolvedSpread:r}=Va(e,t,n);return{key:n,typeName:Wr(n),properties:i,description:void 0,...r?{hasUnresolvedSpread:r}:{}}}function Ba(e,t,n){if(re(t))return Oa(e,t,n);let i=Wr(n),r=(p)=>({key:n,typeName:i,type:p,properties:[]});if(t.type==="CallExpression"){let p=pn(e,t);if(p)Qr(e,n,n,"value",p,t);return p?r(p):null}if(t.type==="Literal"&&t.value===null&&t.raw==="null")return r("null");if(b(t)&&t.name==="undefined")return r("undefined");if(!b(t))return null;let s=t.name,a=hn(e,s,!1),o=a?void 0:It(e,s);if(re(o)){let{internal:p}=Gr(e,s);return{...Oa(e,o,n),...p?{internal:p}:{}}}let l=a??hn(e,s);if(l){if(l.inferred)Qr(e,n,s,`variable "${s}"`,l.type,t);let p=Oe(l.type);return{key:n,typeName:i,...p?{}:{type:l.type},properties:p??[],description:l.description||void 0,...l.internal?{internal:!0}:{}}}return D(e,"context-any-type",s,`Context "${n}" variable "${s}" has no type annotation; defaulted to "any".`,C(e,t)),r("any")}function Fa(e){let t=e.callee,n=t.type==="Identifier"&&t.name==="Symbol",i=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!n&&!i)return null;let r=e.arguments[0];if(r?.type==="Literal"&&typeof r.value==="string")return r.value;if(r?.type==="TemplateLiteral"&&r.quasis.length===1)return r.quasis[0].value.cooked??"";return""}function ja(e){return{kind:"pending",importSource:e.source,importedName:e.importedName,...e.members?{members:e.members}:{}}}function Ga(e,t,n=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let i=t;if(i.type==="Literal"||i.type==="TemplateLiteral"){let r=Ko(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="CallExpression"||i.type==="NewExpression"){let r=Fa(i);return r==null?{kind:"unresolved"}:{kind:"resolved",key:r}}if(i.type==="Identifier"){if(n>=5)return{kind:"unresolved"};let r=It(e,i.name);if(r&&typeof r==="object"&&"type"in r){let a=r;if((a.type==="CallExpression"||a.type==="NewExpression")&&Fa(a)==="")return{kind:"resolved",key:i.name};return Ga(e,a,n+1)}let s=n===0&&ht(e,i.name)?void 0:e.valueImportBindingsByLocalName.get(i.name);return s?ja(s):{kind:"unresolved"}}if(i.type==="MemberExpression"){let r=n===0&&ui(e,i)?void 0:ai(e,i);if(r)return ja(r)}return{kind:"unresolved"}}function qa(e,t,n,i,r){let s=oe(e,i)??"";D(e,"context-value-unresolved",t,`setContext(${n}, ${s}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,r)}function Ha(e,t,n){let i=t.arguments[0];if(!i)return;let r=Ga(e,i);if(r.kind==="unresolved"||r.kind==="resolved"&&!r.key){let c=oe(e,i)??"";D(e,"context-key-unresolved",c,`setContext key \`${c}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,C(e,t));return}let s=t.arguments[1];if(!s)return;let a=C(e,t),o=j(e,n)?.internal===!0;if(r.kind==="pending"){let c=rn(r),u=Ba(e,s,c);if(u)e.pendingContextKeyCandidates.push({importSource:r.importSource,importedName:r.importedName,...r.members?{members:r.members}:{},...u.type===void 0?{}:{type:u.type},properties:u.properties,description:u.description,...u.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...u.internal||o?{internal:!0}:{},source:a});else qa(e,c,c,s,a);return}let l=r.key,p=Ba(e,s,l);if(!p){qa(e,l,JSON.stringify(l),s,a);return}if(e.contexts.has(l)){D(e,"context-duplicate-key",l,`setContext("${l}", ...) was called more than once; only the first call's shape is used.`,a);return}e.contexts.set(l,{...p,...o?{internal:!0}:{},source:a})}var uh=/\n/g,dh=/^[A-Za-z_$][\w$]*$/;function Zr(e,t){return{variableType:(n)=>{if(t?.has(n))return;return dt(e,n)?.type??ln(e,n)}}}function mn(e,t,n){if(!t||typeof t!=="object"||!("type"in t))return n;if(b(t)){if(!ht(e,t.name))return n;let r=n??new Set;return r.add(t.name),r}let i=n;if(re(t)){for(let r of t.properties)if(r.type==="Property")i=mn(e,r.value,i)}else if(t.type==="ArrayExpression")for(let r of t.elements)i=mn(e,r,i);return i}function Wa(e,t){if(b(t))return e.variableType(t.name);return fh(e,t)}function fh(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(re(t))return hh(e,t);if(t.type==="ArrayExpression")return mh(e,t);return}function za(e,t){return Wa(e,t)??(He(t)?ft(t)??"null":"any")}function es(e,t){if(He(t)&&t.raw==="null")return"null";let n=Wa(e,t);if(n!==void 0)return n;let i=He(t)?t.value:void 0;return i==null?"":yh(i)}function hh(e,t){if(t.properties.length===0)return"Record<string, never>";let n=[],i=!1;for(let r of t.properties){let s=r.type==="Property"&&!r.computed?K(r.key):void 0;if(r.type!=="Property"||!s){i=!0;continue}n.push({name:s,type:za(e,r.value)})}if(!i)return yn(n);if(n.length===0)return"Record<string, any>";return yn([...n,{name:"[key: string]",type:"any"}])}function mh(e,t){let n=new Set(t.elements.filter((i)=>i!=null).map((i)=>za(e,i)));if(n.size===0)return"any[]";if(n.size===1)return`${[...n][0]}[]`;return`(${[...n].join(" | ")})[]`}function Ua(e,t){for(let[n,i]of e.arguments.entries()){if(b(i)&&i.name===t)return{argumentIndex:n};if(!re(i))continue;for(let r of i.properties){if(r.type!=="Property"||!b(r.value))continue;if(r.value.name!==t)continue;let s=!r.computed&&b(r.key)?r.key.name:void 0;return{argumentIndex:n,property:s??""}}}return}function yh(e){return typeof e==="string"?JSON.stringify(e):String(e)}function Xe(e,{name:t,detail:n,has_argument:i,description:r,deprecated:s,tags:a,internal:o,source:l}){let p=!i&&!n?"null":n||void 0,c=e.events.get(t);if(c?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:p,description:r||c.description,deprecated:s??c.deprecated,tags:a??c.tags,...o||c.internal?{internal:!0}:{},source:l||c.source});else if(c){let u=e.untypedJsDocEventNames.delete(t);e.events.set(t,{...c,detail:c.detail===void 0||u?p:c.detail,description:c.description||r,deprecated:c.deprecated??s,tags:c.tags??a,...c.internal||o?{internal:!0}:{},source:l||c.source})}else e.events.set(t,{type:"dispatched",name:t,detail:p,description:r,deprecated:s,tags:a,...o?{internal:!0}:{},source:l})}function Ka(e,t){let n=t.arguments[0],i=kr(n,"CustomEvent");if(!i&&!kr(n,"Event"))return;let r=n.arguments[0],s=He(r)?r.value:void 0;if(s==null)return;let a=i?n.arguments[1]:void 0,o=!1,l;if(re(a)){let p=a.properties.find((c)=>c.type==="Property"&&b(c.key)&&c.key.name==="detail");if(p?.type==="Property")o=!0,l=p.value}return{name:String(s),detail:l,hasArgument:o,nestedBoundNames:mn(e,l),source:C(e,t)}}function Ja(e,t){Xe(e,{name:t.name,detail:es(Zr(e,t.nestedBoundNames),t.detail),has_argument:t.hasArgument,source:t.source})}function yn(e,t=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:r,description:s,optional:a,default:o})=>{let l=a?"?":"",p=dh.test(i)||i.startsWith("[")?i:JSON.stringify(i),c=o?`@default ${o}`:"",u=Nt(s&&c?`${s} ${c}`:s||c);if(u){if(t)return`${u.includes(`
23
23
  `)?`/**
24
24
  ${u.split(`
25
25
  `).map((h)=>h?` * ${h}`:" *").join(`
26
26
  `)}
27
27
  */`:`/** ${u} */`}
28
- ${p}${a}: ${r};`;return`/** ${u.replace(ch," ")} */ ${p}${a}: ${r};`}return`${p}${a}: ${r};`}).join(t?`
28
+ ${p}${l}: ${r};`;return`/** ${u.replace(uh," ")} */ ${p}${l}: ${r};`}return`${p}${l}: ${r};`}).join(t?`
29
29
  `:" ");return t?`{
30
30
  ${n}
31
- }`:`{ ${n} }`}function yh({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:i}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(i!==void 0)return"inferred";return"unknown"}function gn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,i=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration||e.initializerIsFunction)&&t===e.typeSeed&&(i||e.isFunctionDeclaration&&n?.length))t=`${e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:""}(${ye(n??[])}) => ${i??"any"}`;let s=e.jsdocDescription??e.resolvedDescription;if(s===void 0&&t!==void 0)s=e.typedefs?.get(t)?.description;let l=yh({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),o=e.initializerIsFunction||e.isFunctionDeclaration||!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||Jn(e.jsdocType)||Jn(e.resolvedType)||Jn(e.explicitType),a=o?e.jsdocTypeParameters:void 0;return{type:t,typeSource:l,description:s,params:n,returnType:i,isFunction:o,typeParameters:a}}function xn(e,t,n){if(n?.explicitDefault===void 0)return n;return e.explicitDefaultPropNames.add(t),{...n,description:n.descriptionWithoutDefault}}function En(e){return{binding:e?.binding,deprecated:e?.deprecated,tags:e?.tags,...e?.internal?{internal:!0}:{}}}function ui(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Ua(e,t){for(let n of e?.body??[]){let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="VariableDeclaration"){let r=i.declarations.find((s)=>s.id.type==="Identifier"?s.id.name===t:Y(s.id).has(t));if(r)return{declaration:i,declarator:r,statement:n}}else if((i.type==="FunctionDeclaration"||i.type==="ClassDeclaration")&&i.id?.name===t)return{declaration:i,statement:n}}return}function gh(e,t){for(let n of e?.body??[]){if(n.type!=="LabeledStatement"||n.label.name!=="$")continue;if(n.body.type!=="ExpressionStatement")continue;let i=n.body.expression;if(i.type!=="AssignmentExpression"||i.operator!=="=")continue;if(i.left.type.startsWith("TS"))continue;if(!Y(i.left).has(t))continue;let r={type:"VariableDeclarator",id:i.left,init:i.right,start:i.start,end:i.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[r],start:n.start,end:n.end},declarator:r,statement:n}}return}function xh(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function Zr(e,t,n,i,r){let s=ui(n.local),l=ui(n.exported);if(!s||!l)return;if(t.source!=null)return{localName:s,exportedName:l};let o=Ua(i,s);if(!o&&r==="instance")o=Ua(e.parsed?.module?.content,s)??gh(i,s);return{localName:s,exportedName:l,...o}}function es(e,t,n,i){let r=t.source?.value,s=typeof r==="string"?`it re-exports from "${r}"`:e.valueImportBindingsByLocalName.has(n)?"it re-exports an imported binding":"no matching local declaration was found";D(e,"export-unresolved",i,`export "${i}" was skipped because ${s}; sveld only resolves exports of a local declaration.`,C(e,t))}function di(e,t,n){if(!n)return j(e,t);let i=t.specifiers.length===1?j(e,t):void 0,r=j(e,n.statement);if(!i||!r)return i??r;let s=Object.fromEntries(Object.entries(i).filter(([,l])=>l!==void 0));return{...r,...s,internal:i.internal||r.internal}}function ts(e,t,n,i){let r=[];if(t.type==="FunctionDeclaration"){if(!t.id)return r;let o=e.scriptLanguage==="ts"?$t(e,t,un(t)):void 0;return r.push({prop_name:n?.exportedName??t.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:o?.hasAnnotations?void 0:Lt(e,t),explicitType:o?.hasAnnotations?o.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:t.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),r}if(t.type!=="VariableDeclaration")return r;let s=xh(t.kind),l=n?.declarator?[n.declarator]:t.declarations;for(let{id:o,init:a}of l){if(o.type!=="Identifier"){for(let A of Y(o)){if(n&&n.localName!==A)continue;r.push({prop_name:n?.exportedName??A,kind:s,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:A,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let p=o.name,c=n?.exportedName??p,u=a==null?{isFunction:!1}:xe(e,a),{value:f,isFunction:h,defaultValue:m}=u,x=s==="const"&&(a?.type==="ObjectExpression"||a?.type==="ArrayExpression")&&!e.typeCasts.constAssertions.has(a),_=(s==="const"&&(a?.type==="ArrowFunctionExpression"||a?.type==="FunctionExpression")?Lt(e,a):void 0)??(x?Me(a,"literal"):void 0)??u.type;li(e,u,c,i),r.push({prop_name:c,kind:s,isFunctionDeclaration:!1,value:f,typeSeed:_,explicitType:Eh(e,o),initializerIsFunction:h,isRequired:s==="let"&&a==null,localName:p,defaultValue:m,inferredTypeForSource:_,resolvedJSDoc:u})}return r}function Eh(e,t){return F(e,t.typeAnnotation?.typeAnnotation),ae(e,t.typeAnnotation)}function ns(e,t,n){let{resolvedJSDoc:i}=t;return gn({explicitType:t.explicitType,typeSeed:t.typeSeed,inferredTypeForSource:t.inferredTypeForSource,jsdocType:n?.type,jsdocDescription:n?.description,jsdocParams:n?.params,jsdocReturnType:n?.returnType,jsdocTypeParameters:n?.typeParameters,resolvedType:i?.resolvedType,resolvedDescription:i?.resolvedDescription,resolvedParams:i?.resolvedParams,resolvedReturnType:i?.resolvedReturnType,initializerIsFunction:t.initializerIsFunction,isFunctionDeclaration:t.isFunctionDeclaration,typedefs:e.typedefs})}function bh(e,t,n){D(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,C(e,t))}function Ka(e,t,n,i){if(n.type==="ClassDeclaration"){if(n.id)bh(e,t,i?.exportedName??n.id.name);return}let r=ts(e,n,i,"props");if(r.length===0)return;let s=di(e,t,i);for(let l of r){let{prop_name:o,kind:a,localName:p}=l,c=xn(e,o,s),{type:u,typeSource:f,description:h,params:m,returnType:x,isFunction:y,typeParameters:_}=ns(e,l,c);Xt(e,o,s?.sveldIgnore),on(e,o,{name:o,...p!==void 0&&p!==o?{localName:p}:{},kind:a,description:h,...En(s),type:u,typeSource:f,value:c?.explicitDefault??l.value,defaultValue:l.defaultValue,params:m,returnType:x,typeParameters:_,isFunction:y,isFunctionDeclaration:l.isFunctionDeclaration,isRequired:l.isRequired,constant:a==="const",reactive:e.reactive_vars.has(o),source:C(e,t)})}}function Ja(e,t,n){if(t.declaration!=null){Ka(e,t,t.declaration);return}for(let i of t.specifiers){let r=Zr(e,t,i,n,"instance");if(!r)continue;if(r.declaration)Ka(e,t,r.declaration,r);else es(e,t,r.localName,r.exportedName)}}function vh(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Pt(t);if(!n&&!ct(t))return;let i="name"in e&&typeof e.name==="string"?e.name:void 0;if(!i)return;if(n)return{type:"InlineComponent",name:i};let r={type:"Element",name:i};if(i==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let s=e.tag;if(s.type==="Literal"&&typeof s.value==="string")r.thisValue=s.value}return r}function Ya(e,t,n){let i=vh(t);if(!i)return;if(e.rest_props!==void 0&&!(e.rest_props.type==="InlineComponent"&&i.type==="Element"))return;e.rest_props=i;let r=t&&typeof t==="object"&&"tag"in t?t.tag:void 0;e.restPropsTagLocal=i.name==="svelte:element"&&b(r)?r.name:void 0,e.restPropsSource=C(e,n)}function Xa(e,t){let n=At(t);if(me(n,"$derived"))n=At(n.arguments[0]);if(!re(n))return;for(let i of n.properties){if(i.type!=="SpreadElement"||!b(i.argument))continue;let{name:r}=i.argument;if(r==="$$restProps"||e.restPropLocals.has(r))return r}return}function Qa(e,t){let n=new Map;for(let i of t?.content.body??[]){if(i.type==="VariableDeclaration"){for(let{id:l,init:o}of i.declarations){let a=b(l)?Xa(e,o):void 0;if(a&&b(l))n.set(l.name,a)}continue}if(i.type!=="LabeledStatement"||i.label.name!=="$")continue;if(i.body.type!=="ExpressionStatement")continue;let r=i.body.expression;if(r.type!=="AssignmentExpression"||r.operator!=="="||!b(r.left))continue;let s=Xa(e,r.right);if(s)n.set(r.left.name,s)}return n}var Sh=/^[A-Za-z_$][\w$]*/,Th=/[A-Za-z_$][\w$]*/g,Ch=/^(?:(?:const|in|out)\s+)+/;function Za(e){let t=B(e,",").map((i)=>i.trim()).filter((i)=>i.length>0);if(t.length===0)return null;return[t.map((i)=>i.replace(Ch,"").match(Sh)?.[0]??i).join(", "),t.join(", ")]}function el(e,t,n){let i=e.scriptGenericsAttribute?.value;if(!i)return;for(let[r]of i.matchAll(Th)){if(e.typeImportBindingsByLocalName.has(r))t.add(r);if(n.has(r))continue;let s=e.localTypeDeclarationsByName.get(r);if(!s)continue;n.add(r),Le(e,s.node,t,n)}}function fi(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function tl(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function nl(e){let t=[e.instance,e.module].filter((i)=>i!==void 0),n=!1;for(let i of t){let r=i.attributes.find((s)=>s.name==="lang");if(!r){n=!0;continue}if(tl(r)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function il(e,t){let n=t.instance?.attributes.find((s)=>s.name==="generics");if(!n)return;let i=C(e,n),r=tl(n);if(!r)return;return{value:r,source:i}}var rl=/[A-Za-z_$][\w$]*/y,kh=/[\w$]/,wh=/^\s*\??\s*:/,Ah=/(?:^|[{;,(\n]|\breadonly)\s*$/,Ph=/^\s*\[/,_h=/\b(?:keyof|readonly|unique)\s+$/,Dh=/&\s*$/,Nh=/^\s*&/,$h=/(?:\||\bextends)\s*$/,Ih=/^\s*(?:\||extends\b)/,Lh=/^(?:keyof|readonly|unique|typeof|infer)\s/,Rh=/^(?:abstract\s+)?new\b/;function Mh(e){let t=e.trim();if(_t(t)!==-1||Kt(t,"?")!==-1||Rh.test(t))return 4;if(B(t,"|").length>1)return 3;if(B(t,"&").length>1)return 2;return Lh.test(t)?1:0}function Oh(e,t){if(Ph.test(t))return 0;if(_h.test(e))return 1;if(Dh.test(e)||Nh.test(t))return 2;if($h.test(e)||Ih.test(t))return 3;return 4}function Bh(e,t){for(let n=t+1;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===e[t])return n+1;return e.length}function Fh(e,t){for(let n=t;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]==="`")return{end:n+1,opensExpression:!1};else if(e[n]==="$"&&e[n+1]==="{")return{end:n+2,opensExpression:!0};return{end:e.length,opensExpression:!1}}function jh(e,t){if(t.size===0)return e;let n="",i=[],r=0;while(r<e.length){let s=e[r],l=i.length-1;if(s==='"'||s==="'"){let f=Bh(e,r);n+=e.slice(r,f),r=f;continue}if(s==="`"||s==="}"&&i[l]===0){if(s==="}")i.pop();let{end:f,opensExpression:h}=Fh(e,r+1);if(h)i.push(0);n+=e.slice(r,f),r=f;continue}if(l>=0&&s==="{")i[l]++;if(l>=0&&s==="}")i[l]--;rl.lastIndex=r;let o=kh.test(e[r-1]??"")?void 0:rl.exec(e)?.[0];if(!o){n+=s,r++;continue}r+=o.length;let a=t.get(o),p=e.slice(0,r-o.length),c=e.slice(r),u=p.trimEnd();if(a===void 0||u.endsWith(".")&&!u.endsWith("...")||Ah.test(p)&&wh.test(c))n+=o;else n+=Mh(a)>Oh(p,c)?`(${a})`:a}return n}function qh(e,t,n){let i=new Map,r=t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"?t.typeParameters?.params:void 0,s=n.typeArguments?.params;if(!r?.length||!s?.length)return i;for(let l=0;l<r.length;l++){let o=r[l]?.name,a=s[l];if(!o||a?.start===void 0||a?.end===void 0)continue;let p=q(e,a.start,a.end)?.trim();if(p)i.set(o,p)}return i}function hi(e,t,n,i=new Set){let r=new Map;if(!t?.type)return r;let s=(o)=>{for(let a of o){if(a?.type!=="TSPropertySignature"||a.computed||!a.key)continue;let p=K(a.key);if(!p)continue;let c=a.typeAnnotation?.start,u=a.typeAnnotation?.end;if(c===void 0||u===void 0)continue;let f=q(e,c+1,u)?.trim();if(!f)continue;F(e,a.typeAnnotation?.typeAnnotation);let h=j(e,a);r.set(p,{type:f,optional:a.optional===!0,source:C(e,a),...h?{jsdoc:h}:{}})}},l=(o)=>{let a=hi(e,o,n,i);for(let[p,c]of a)r.set(p,c)};switch(t.type){case"TSTypeLiteral":s(t.members??[]);break;case"TSInterfaceDeclaration":for(let o of t.extends??[]){let a={type:"TSTypeReference",typeName:o.expression,typeArguments:o.typeParameters,start:o.start,end:o.end};l(a)}s(t.body?.body??[]);break;case"TSTypeAliasDeclaration":case"TSParenthesizedType":l(t.typeAnnotation);break;case"TSTypeReference":{let o=oa(t.typeName);if(!o||i.has(o))break;let a=n.get(o);if(!a)break;i.add(o);let p=hi(e,a,n,i);i.delete(o);let c=qh(e,a,t);for(let[u,f]of p)r.set(u,c.size===0?f:{...f,type:jh(f.type,c)});break}case"TSIntersectionType":for(let o of t.types??[])l(o);break}return r}function sl(e){return new Map(Array.from(e.localTypeDeclarationsByName,([t,n])=>[t,n.node]))}function Vh(e){let t={};for(let[n,i]of Object.entries(e))t[n]={...i.attribute===void 0?{}:{attribute:i.attribute},...i.reflect===void 0?{}:{reflect:i.reflect},...i.type===void 0?{}:{type:i.type}};return t}function is(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let i of t.specifiers){let r=i.type==="ImportSpecifier";if(t.importKind!=="type"&&!(r&&i.importKind==="type"))continue;let s=i.local.name;e.typeImportBindingsByLocalName.set(s,{importedName:r?si(i):void 0,localName:s,source:String(t.source.value),specifierType:r?"named":i.type==="ImportDefaultSpecifier"?"default":"namespace"})}if(t.type==="TSEnumDeclaration"||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"){let i=t.type==="TSEnumDeclaration"?pa(e,t):q(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:i??"",node:t,start:t.start,...n?{exported:n}:{}})}}function ol(e,t){if(e.runesPropsDeclarationMetadataByDeclaratorStart.clear(),e.explicitVariableTypesByName.clear(),e.explicitVariableTypeNodesByName.clear(),e.typeImportBindingsByLocalName.clear(),e.localTypeDeclarationsByName.clear(),e.additionalTypeDependencyNodes.length=0,e.typedRunesPropsDeclarations.length=0,!e.source)return;e.scriptLanguage=nl(t);let n=t.options?.customElement;e.customElementTag=n?.tag,e.customElement=n?{...n.tag===void 0?{}:{tag:n.tag},...n.shadow==="open"||n.shadow==="none"?{shadow:n.shadow}:{},...n.props?{props:Vh(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=il(e,t);let i=new Set;for(let s of t.module?.content.body??[]){if(!s?.type)continue;if(s.type==="ExportNamedDeclaration"&&s.declaration)is(e,s.declaration,!0);else if(s.type==="ExportNamedDeclaration"&&!s.source)for(let l of s.specifiers){if(l.local.type!=="Identifier"||l.exported.type!=="Identifier")continue;if(l.local.name===l.exported.name)i.add(l.local.name)}else is(e,s,!1)}for(let s of i){let l=e.localTypeDeclarationsByName.get(s);if(l)l.exported=!0}let r=t.instance?.content.body??[];for(let s of r){if(is(e,s,!1),s.type!=="VariableDeclaration")continue;for(let{id:l}of s.declarations){if(l.type!=="Identifier")continue;let o=ae(e,l.typeAnnotation);if(!o)continue;let a=l.typeAnnotation?.typeAnnotation;if(e.explicitVariableTypesByName.set(l.name,o),a)e.explicitVariableTypeNodesByName.set(l.name,a)}}for(let s of r){if(s.type!=="VariableDeclaration")continue;for(let l of s.declarations){if(!me(At(l.init),"$props"))continue;let o="typeAnnotation"in l.id?l.id.typeAnnotation:void 0,a=o?void 0:Ho(l.init),p=o?.typeAnnotation??a,c=o?ae(e,o):ut(e,a),u=hi(e,p,sl(e)),f=new Set,h=new Set;Le(e,p,f,h),el(e,f,h);let m={canonicalType:c,props:u,referencedImportedTypes:f,referencedLocalTypes:h};if(e.runesPropsDeclarationMetadataByDeclaratorStart.set(l.start,m),c)e.typedRunesPropsDeclarations.push(m)}}}function Gh(e,t){let n=t?.trim();if(!n)return;let i=e.typedefMembersByName.get(n)??Re(n,{skipIndexSignatures:!0});return i?new Map(i.map((r)=>[r.name,r])):void 0}function Hh(e){return me(e,"$bindable")?{init:e.arguments[0],bindable:!0}:{init:e,bindable:!1}}function al(e,t){for(let n of t.declarations){if(!me(n.init,"$props"))continue;let i=e.runesPropsDeclarationMetadataByDeclaratorStart.get(n.start),r=j(e,t),s=i?.props.size?void 0:Gh(e,r?.type);if(n.id.type==="Identifier"){e.wholePropsLocals.add(n.id.name),e.restPropLocals.add(n.id.name);let o=[...Array.from(s?.values()??[],(a)=>({name:a.name,member:a,typeMetadata:void 0})),...Array.from(i?.props??[],([a,p])=>({name:a,member:void 0,typeMetadata:p}))];for(let{name:a,member:p,typeMetadata:c}of o){let u=xn(e,a,c?.jsdoc),{type:f,typeSource:h,description:m,params:x,returnType:y,isFunction:_}=gn({explicitType:c?.type,jsdocType:u?.type??p?.type,jsdocDescription:u?.description??p?.description,jsdocParams:u?.params,jsdocReturnType:u?.returnType,initializerIsFunction:!1,isFunctionDeclaration:!1,typedefs:e.typedefs});Xt(e,a,u?.sveldIgnore),on(e,a,{name:a,kind:"let",description:m,...En(u),type:f,typeSource:h,value:u?.explicitDefault,params:x,returnType:y,isFunction:_,isFunctionDeclaration:!1,isRequired:!(c?.optional??p?.optional),constant:!1,reactive:!1,source:c?.source})}continue}if(n.id.type!=="ObjectPattern")continue;let l=n.id.properties.filter((o)=>{if(o.type!=="Property"||o.computed)return!1;if(!K(o.key))return!1;if(o.value.type==="Identifier")return!0;return o.value.type==="AssignmentPattern"&&o.value.left.type==="Identifier"}).length;for(let o of n.id.properties){if(o.type==="RestElement"){if(o.argument.type==="Identifier")e.restPropLocals.add(o.argument.name);continue}let a=K(o.key);if(!a)continue;let p,c;if(o.value.type==="Identifier")p=o.value.name;else{let st=o.value;p=st.left.name,c=st.right}if(!p)continue;if(Xn(e,a,p),a==="children")e.snippetPropLocals.add(p);let u=s?.get(a),f=i?.props.get(a),h=xn(e,a,j(e,o)??f?.jsdoc??(l===1&&!s?r:void 0)),{init:m,bindable:x}=Hh(c),y=m==null?{isFunction:!1}:xe(e,m),{value:_,type:A,isFunction:R,defaultValue:v}=y,X=f?.type===void 0&&h?.type===void 0?y.resolvedType:void 0;li(e,y,a,"props");let{type:he,typeSource:_e,description:rt,params:Tt,returnType:S,isFunction:je}=gn({explicitType:f?.type,typeSeed:A,inferredTypeForSource:A,jsdocType:h?.type??u?.type,jsdocDescription:h?.description??u?.description,jsdocParams:h?.params,jsdocReturnType:h?.returnType,resolvedType:X,resolvedDescription:y.resolvedDescription,resolvedParams:y.resolvedParams,resolvedReturnType:y.resolvedReturnType,initializerIsFunction:R,isFunctionDeclaration:!1,typedefs:e.typedefs});if(x)e.reactive_vars.add(a);Xt(e,a,h?.sveldIgnore),on(e,a,{name:a,...p===a?{}:{localName:p},kind:"let",description:rt,...En(h),...x?{bindable:!0}:{},type:he,typeSource:_e,value:h?.explicitDefault??_,defaultValue:v,params:Tt,returnType:S,isFunction:je,isFunctionDeclaration:!1,isRequired:!x&&m==null&&f?.optional!==!0&&u?.optional!==!0,constant:!1,reactive:x,source:C(e,o)})}}}function Wh(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let i=n+15;while(e[i]===" ")i++;if(e[i]!=="<")return;let r=We(e,i);return r===-1?void 0:e.slice(i+1,r)}var zh=/^["']|["']$/g,Uh=/\?$/,Kh=/^\{/,Jh=/\}$/;function Xh(e){let t=Kt(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(Uh,"").replace(zh,""),i=e.slice(t+1).trim();if(!n||!i)return;return{name:n,type:i}}function ll(e,t,n,i){if(t){for(let[o,a]of hi(e,t,sl(e)))e.typedDispatcherEventNames.add(o),Je(e,{name:o,detail:a.type,has_argument:!0,source:a.source});return}let r=ge(e,n)?.type,s=r?Wh(r):void 0;if(!s)return;let l=s.trim().replace(Kh,"").replace(Jh,"");for(let o of B(l,";,")){let a=Xh(o.trim());if(!a)continue;e.typedDispatcherEventNames.add(a.name),Je(e,{name:a.name,detail:a.type,has_argument:!0,source:i})}}function pl(e,t){if(e.syntaxMode!=="runes")return;for(let[n,i]of Array.from(e.events.entries())){if(i.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let r=`on${n}`,s=e.props.get(r);if(!s)continue;let l=s.type!==void 0||s.params!==void 0||s.returnType!==void 0,o=i.detail===void 0||i.detail==="undefined"||i.detail==="null"?"() => void":`(detail: ${i.detail}) => void`;e.props.set(r,{...s,description:s.description??i.description,type:l?s.type:o,typeSource:l?s.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Xe=null;function Ye(e){return!e||e==="default"?Xe:e}function rs(e,t){switch(t.type){case"Identifier":return{value:t.name,replace:!0};case"Literal":return{value:typeof t.value==="string"?JSON.stringify(t.value):String(t.value),replace:!1};case"MemberExpression":return{value:ha(e,t),replace:!1};case"ObjectExpression":case"TemplateLiteral":return{value:q(e,t.start,t.end),replace:!1};default:return{value:void 0,replace:!1}}}function Yh(e,t,n){if(!b(t))return null;let i=It(e,t.name);if(re(i))return os(e,i,n).slot_props;let r=dt(e,t.name);if(!r)return null;let s=Re(r.type);if(!s)return null;let l={};for(let o of s)l[o.name]={value:o.type,replace:!1};return l}function ss(e,t,n,i,r){let s=Yh(e,n,r);if(s)return Object.assign(t,s),!0;if(r)return!1;return D(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,i)),!1}function os(e,t,n){let i={},r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){if(!ss(e,i,s.argument,s,n))r=!0;continue}if(s.type!=="Property"||s.computed)continue;let l=K(s.key);if(!l)continue;i[l]=rs(e,s.value)}return{slot_props:i,hasUnresolvedSpread:r}}function Qh(e,t){if(t.type==="Identifier"){let r=e.propLocalToPublicName.get(t.name);return r?{publicName:r,trackingName:t.name}:null}if(t.type!=="MemberExpression")return null;if(t.object.type!=="Identifier"||!e.wholePropsLocals.has(t.object.name))return null;let{property:n}=t,i;if(!t.computed&&n.type==="Identifier")i=n.name;else if(n.type==="Literal"&&n.value!=null)i=String(n.value);return i?{publicName:i,trackingName:i}:null}function as(e){return e.type==="ChainExpression"?e.expression:e}function cl(e,t){let n=as(t),i=Qh(e,n.callee);return i&&{...i,arguments:n.arguments}}function bn(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:i,slot_fallback:r,slot_description:s,slot_deprecated:l,slot_tags:o,slot_internal:a,source:p}){let c=Ye(t),u=e.slots.get(c);e.slots.set(c,{name:c,default:u?.default??c===Xe,fallback:r||void 0,slot_props:u?.slot_props??(n===""?void 0:n),slot_props_unresolved_spread:u?.slot_props_unresolved_spread||i,description:u?.description||s?.trim()||void 0,deprecated:u?.deprecated??l,tags:u?.tags||o,...u?.internal||a?{internal:!0}:{},source:p||u?.source})}var ul=/^@component/,Zh=/\r/g,em=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function dl(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function tm(e,t,n,i){let r=n.callee.type==="Identifier"?n.callee.name:void 0;if(r==="createEventDispatcher"){let s=dl(i);if(s!==void 0)t.dispatcherName=s,t.dispatcherDeclaratorNode=i;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(r==="$host"){let s=dl(i);if(s!==void 0)t.hostLocalNames.add(s)}if(r==="setContext")qa(e,n,i?.type==="ExpressionStatement"?i:null);if(n.arguments.length>0){if(t.callsWithArguments.push(n),ci(e,n.callee))t.locallyBoundCalls.add(n)}if(r)t.callees.push({name:r,arguments:n.arguments,node:n,nestedBoundDetailNames:mn(e,n.arguments[1])});if(He(n.callee)&&b(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(me(n.callee.object,"$host")||b(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let s=Wa(e,n);if(s)t.hostDispatchedEventNames.add(s.name),t.hostDispatches.push(s)}}function nm(e,t){let n=Array.isArray(t)?t[0]:t;if(n?.type==="Text")return{value:JSON.stringify(n.raw),replace:!1};if(n?.type==="ExpressionTag")return rs(e,n.expression);return{value:void 0,replace:!1}}function im(e,t){let n=t.attributes.find((p)=>("name"in p)&&p.name==="name"),i=n&&"value"in n?n.value:void 0,r=Array.isArray(i)?i[0]:void 0,s=r?.type==="Text"?r.data:void 0,l={},o=!1;for(let p of t.attributes){if(p.type==="SpreadAttribute"){let c=e.jsDocSlots.has(Ye(s));if(!ss(e,l,p.expression,p,c))o=!0;continue}if(!("value"in p)||p.name==="name"||p.value===!0)continue;l[p.name]=nm(e,p.value)}let a=t.fragment.nodes.map(({start:p,end:c})=>q(e,p,c)??"").join("").trim();e.renderedSlots.add(Ye(s)),bn(e,{slot_name:s,slot_props:l,slot_props_unresolved_spread:o||void 0,slot_fallback:a,source:C(e,t)})}function rm(e,t){let n=cl(e,t.expression);if(!n){let{callee:a}=as(t.expression);if(He(a)&&b(a.object)&&e.wholePropsLocals.has(a.object.name))e.slotsUntracked=!0;return}let i=n.publicName==="children"?void 0:n.publicName,[r,...s]=n.arguments,l,o=!1;if(r===void 0)l={};else if(s.length===0&&r.type==="ObjectExpression"){let a=os(e,r,e.jsDocSlots.has(Ye(i)));l=a.slot_props,o=a.hasUnresolvedSpread}if(e.renderedSlots.add(Ye(i)),l!==void 0)bn(e,{slot_name:i,slot_props:l,slot_props_unresolved_spread:o||void 0,source:C(e,t)});if(l!==void 0||e.slots.has(i??Xe))e.snippetPropLocals.add(n.trackingName)}function sm(e,t,n){let i=t.name;if(t.expression!=null||!i)return;if(n==null||!("name"in n)||typeof n.name!=="string"||!n.name)return;let r=Pt(n.type)?{type:"InlineComponent",name:n.name}:{type:"Element",name:n.name};e.forwardedEvents.set(i,r);let s=e.events.get(i),l=e.eventDescriptions.get(i);if(!s)e.events.set(i,{type:"forwarded",name:i,element:r,description:l,deprecated:void 0,source:C(e,t)});else if(s.type==="forwarded"&&l&&!s.description)e.events.set(i,{...s,description:l,source:s.source||C(e,t)})}function om(e){let{expression:t}=e;if(t.type==="Identifier")return{name:t.name,indexed:!1};if(t.type!=="MemberExpression")return;let n=t;while(n.type==="MemberExpression")n=n.object;if(n.type!=="Identifier")return;let i=e.name==="this"&&t.computed&&t.object.type==="Identifier";return{name:n.name,indexed:i}}function am(e,t,n,i){if(!n||!(ct(n.type)||Pt(n.type)))return;let r=om(t);if(!r)return;let s=pi(e,r.name);if(!s)return;e.reactive_vars.add(s);let l=t.expression.type==="MemberExpression";if(t.name!=="this"||l&&!r.indexed)return;if(!("name"in n)||typeof n.name!=="string")return;let o=r.indexed?"indexed":"direct",a=e.bindings.get(s)??{elements:[],components:[],target:o};if(a.target!==o)a.target="mixed";if(ct(n.type)){let p=n.name,c="tag"in n&&b(n.tag)?n.tag.name:void 0;if(!a.elements.some((f)=>f.tag===p&&f.namespace===i&&f.tagLocal===c))a.elements.push({tag:p,namespace:i,...c?{tagLocal:c}:{}})}else{let p=n.type==="Component"?sn(e,n.name):void 0;if(!p)return;if(!a.components.includes(n.name))a.components.push(n.name);e.additionalImportedTypes.set(n.name,{localName:n.name,...p})}e.bindings.set(s,a)}function fl(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set};_a(e),e.activeScopes.push(e.componentScope);let n=Da(e),i=new WeakMap,r=e.parsed?.options?.namespace,s=[r==="svg"||r==="mathml"?r:"html"],l=new Map,o={enter(a,p){if(ai(a.type))return ie;let c=Na(e,n,a);if(c)e.activeScopes.push(c);if(ct(a.type)){let u="name"in a?a.name:void 0,f=u==="svg"?"svg":u==="math"?"mathml":s[s.length-1];i.set(a,f),s.push(u==="foreignObject"?"html":f)}if(!em.has(a.type))return;switch(a.type){case"AssignmentExpression":Jr(e,a.left);break;case"UpdateExpression":Jr(e,a.argument);break;case"CallExpression":tm(e,t,a,p);break;case"SpreadAttribute":{let u=a.expression.type==="Identifier"?a.expression.name:void 0,f=(u!==void 0&&!mt(e,u)?l.get(u):void 0)??u,h=e.restPropLocals.has(f??"");if(f==="$$restProps"||h)Ya(e,p,a);if((f==="$$props"||h)&&p&&Pt(p.type))e.slotsUntracked=!0;break}case"FunctionDeclaration":if(a.id?.name)e.funcDecls.set(a.id.name,a);break;case"ImportDeclaration":nn(e,a);break;case"VariableDeclaration":if(e.vars.add(a),p?.type==="Program"&&a.declarations.some((u)=>me(u.init,"$props")))al(e,a);break;case"ExportNamedDeclaration":Ja(e,a,p?.type==="Program"?p:null);break;case"Comment":{let u=a.data.trim();if(ul.test(u))e.componentComment=u.replace(ul,"").replace(Zh,""),e.componentCommentSource=C(e,a);break}case"SlotElement":im(e,a);break;case"RenderTag":rm(e,a);break;case"OnDirective":sm(e,a,p);break;case"BindDirective":am(e,a,p,(p&&i.get(p))??"html");break}},leave(a){if(ct(a.type))s.pop();if(Mt(a))e.activeScopes.pop(),$a(n,a)}};if(e.parsed?.instance)z(e.parsed.instance,o);if(l=Qa(e,e.parsed?.instance),e.parsed?.fragment)z(e.parsed.fragment,o);return t}var ls={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"},ps="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",lm={5:ps,"5module":ps+" export import",6:ps+" const class extends export import super"},xl=/^in(stanceof)?$/,pm=/\p{ID_Start}/u,cm=/[\p{ID_Continue}\u200c\u200d]/u;function be(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e>65535&&t===!1)return!1;return e>=170&&pm.test(String.fromCodePoint(e))}function Oe(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e>65535&&t===!1)return!1;return e>=170&&cm.test(String.fromCodePoint(e))}var N=function(e,t){if(t===void 0)t={};this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function le(e,t){return new N(e,{beforeExpr:!0,binop:t})}var pe={beforeExpr:!0},Q={startsExpr:!0},fs={};function P(e,t){if(t===void 0)t={};return t.keyword=e,fs[e]=new N(e,t)}var d={num:new N("num",Q),regexp:new N("regexp",Q),string:new N("string",Q),name:new N("name",Q),privateId:new N("privateId",Q),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",pe),semi:new N(";",pe),colon:new N(":",pe),dot:new N("."),question:new N("?",pe),questionDot:new N("?."),arrow:new N("=>",pe),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",pe),backQuote:new N("`",Q),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:le("||",1),logicalAND:le("&&",2),bitwiseOR:le("|",3),bitwiseXOR:le("^",4),bitwiseAND:le("&",5),equality:le("==/!=/===/!==",6),relational:le("</>/<=/>=",7),bitShift:le("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:le("%",10),star:le("*",10),slash:le("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:le("??",1),_break:P("break"),_case:P("case",pe),_catch:P("catch"),_continue:P("continue"),_debugger:P("debugger"),_default:P("default",pe),_do:P("do",{isLoop:!0,beforeExpr:!0}),_else:P("else",pe),_finally:P("finally"),_for:P("for",{isLoop:!0}),_function:P("function",Q),_if:P("if"),_return:P("return",pe),_switch:P("switch"),_throw:P("throw",pe),_try:P("try"),_var:P("var"),_const:P("const"),_while:P("while",{isLoop:!0}),_with:P("with"),_new:P("new",{beforeExpr:!0,startsExpr:!0}),_this:P("this",Q),_super:P("super",Q),_class:P("class",Q),_extends:P("extends",pe),_export:P("export"),_import:P("import",Q),_null:P("null",Q),_true:P("true",Q),_false:P("false",Q),_in:P("in",{beforeExpr:!0,binop:7}),_instanceof:P("instanceof",{beforeExpr:!0,binop:7}),_typeof:P("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:P("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:P("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Z=/\r\n?|\n|\u2028|\u2029/,um=new RegExp(Z.source,"g");function Ot(e){return e===10||e===13||e===8232||e===8233}function El(e,t,n){if(n===void 0)n=e.length;for(var i=t;i<n;i++){var r=e.charCodeAt(i);if(Ot(r))return i<n-1&&r===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var bl=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,V=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,dm=Object.prototype,{hasOwnProperty:fm,toString:hm}=dm,Tn=Object.hasOwn||function(e,t){return fm.call(e,t)},hl=Array.isArray||function(e){return hm.call(e)==="[object Array]"},ml=Object.create(null);function mi(e){return ml[e]||(ml[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ei(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var mm=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Sn=function(e,t){this.line=e,this.column=t};Sn.prototype.offset=function(e){return new Sn(this.line,this.column+e)};var bi=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function vl(e,t){for(var n=1,i=0;;){var r=El(e,i,t);if(r<0)return new Sn(n,t-i);++n,i=r}}var cs={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},yl=!1;function ym(e){var t={};for(var n in cs)t[n]=e&&Tn(e,n)?e[n]:cs[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!yl&&typeof console==="object"&&console.warn)yl=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
32
- Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(hl(t.onToken)){var i=t.onToken;t.onToken=function(r){return i.push(r)}}if(hl(t.onComment))t.onComment=gm(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function gm(e,t){return function(n,i,r,s,l,o){var a={type:n?"Block":"Line",value:i,start:r,end:s};if(e.locations)a.loc=new bi(this,l,o);if(e.ranges)a.range=[r,s];t.push(a)}}var yt=1,gt=2,hs=4,Sl=8,ms=16,Tl=32,vi=64,Cl=128,xt=256,Cn=512,kl=1024,Si=yt|gt|xt;function ys(e,t){return gt|(e?hs:0)|(t?Sl:0)}var yi=0,gs=1,Be=2,wl=3,Al=4,Pl=5,O=function(e,t,n){this.options=e=ym(e),this.sourceFile=e.sourceFile,this.keywords=mi(lm[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";if(e.allowReserved!==!0){if(i=ls[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")i+=" await"}this.reservedWords=mi(i);var r=(i?i+" ":"")+ls.strict;if(this.reservedWordsStrict=mi(r),this.reservedWordsStrictBind=mi(r+" "+ls.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
33
- `,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Z).length}else this.lineStart=0;if(this.type=d.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=e.sourceType==="module",this.strict=this.inModule||e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?gt:yt),this.regexpState=null,this.privateNameStack=[]},ce={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}};O.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})};ce.inFunction.get=function(){return(this.currentVarScope().flags&gt)>0};ce.inGenerator.get=function(){return(this.currentVarScope().flags&Sl)>0};ce.inAsync.get=function(){return(this.currentVarScope().flags&hs)>0};ce.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(xt|Cn))return!1;if(n&gt)return(n&hs)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ce.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&yt)return!0;return!1};ce.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&vi)>0||this.options.allowSuperOutsideMethod};ce.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Cl)>0};ce.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ce.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(xt|Cn)||n&gt&&!(n&ms))return!0}return!1};ce.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&kl)return!1;if(!this.inModule&&t&yt)return!1;return!0};ce.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&xt)>0};O.extend=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var i=0;i<e.length;i++)n=e[i](n);return n};O.parse=function(e,t){return new this(t,e).parse()};O.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()};O.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(O.prototype,ce);var U=O.prototype,xm=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;U.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){V.lastIndex=e,e+=V.exec(this.input)[0].length;var t=xm.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){V.lastIndex=e+t[0].length;var n=V.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return r===";"||r==="}"||Z.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(i+1)==="=")}if(e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";")e++}};U.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};U.isContextual=function(e){return this.type===d.name&&this.value===e&&!this.containsEsc};U.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};U.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};U.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};U.canInsertSemicolon=function(){return this.type===d.eof||this.type===d.braceR||Z.test(this.input.slice(this.lastTokEnd,this.start))};U.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};U.semicolon=function(){if(!this.eat(d.semi)&&!this.insertSemicolon())this.unexpected()};U.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};U.expect=function(e){this.eat(e)||this.unexpected()};U.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var Ti=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};U.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1)this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")};U.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:i}=e;if(!t)return n>=0||i>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(i>=0)this.raiseRecoverable(i,"Redefinition of __proto__ property")};U.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")};U.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var g=O.prototype;g.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==d.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var xs={kind:"loop"},Em={kind:"switch"};g.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;V.lastIndex=this.pos;var t=V.exec(this.input),n=this.pos+t[0].length,i=this.fullCharCodeAt(n);if(i===91||i===92)return!0;if(e)return!1;if(i===123)return!0;if(be(i)){var r=n;do n+=i<=65535?1:2;while(Oe(i=this.fullCharCodeAt(n)));if(i===92)return!0;var s=this.input.slice(r,n);if(!xl.test(s))return!0}return!1};g.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,n;return!Z.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Oe(n=this.fullCharCodeAt(t+8))||n===92))};g.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;V.lastIndex=this.pos;var n=V.exec(this.input),i=this.pos+n[0].length;if(Z.test(this.input.slice(this.pos,i)))return!1;if(e){var r=i+5,s;if(this.input.slice(i,r)!=="using"||r===this.input.length||Oe(s=this.fullCharCodeAt(r))||s===92)return!1;V.lastIndex=r;var l=V.exec(this.input);if(i=r+l[0].length,l&&Z.test(this.input.slice(r,i)))return!1}var o=this.fullCharCodeAt(i);if(!be(o)&&o!==92)return!1;var a=i;do i+=o<=65535?1:2;while(Oe(o=this.fullCharCodeAt(i)));if(o===92)return!0;var p=this.input.slice(a,i);if(xl.test(p))return!1;if(t&&!e&&p==="of"){V.lastIndex=i;var c=V.exec(this.input);if(i=i+c[0].length,this.input.charCodeAt(i)!==61||(o=this.input.charCodeAt(i+1))===61||o===62)return!1}return!0};g.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};g.isUsing=function(e){return this.isUsingKeyword(!1,e)};g.parseStatement=function(e,t,n){var i=this.type,r=this.startNode(),s;if(this.isLet(e))i=d._var,s="let";switch(i){case d._break:case d._continue:return this.parseBreakContinueStatement(r,i.keyword);case d._debugger:return this.parseDebuggerStatement(r);case d._do:return this.parseDoStatement(r);case d._for:return this.parseForStatement(r);case d._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(r,!1,!e);case d._class:if(e)this.unexpected();return this.parseClass(r,!0);case d._if:return this.parseIfStatement(r);case d._return:return this.parseReturnStatement(r);case d._switch:return this.parseSwitchStatement(r);case d._throw:return this.parseThrowStatement(r);case d._try:return this.parseTryStatement(r);case d._const:case d._var:if(s=s||this.value,e&&s!=="var")this.unexpected();return this.parseVarStatement(r,s);case d._while:return this.parseWhileStatement(r);case d._with:return this.parseWithStatement(r);case d.braceL:return this.parseBlock(!0,r);case d.semi:return this.parseEmptyStatement(r);case d._export:case d._import:if(this.options.ecmaVersion>10&&i===d._import){V.lastIndex=this.pos;var l=V.exec(this.input),o=this.pos+l[0].length,a=this.input.charCodeAt(o);if(a===40||a===46)return this.parseExpressionStatement(r,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)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 i===d._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(r,!0,!e)}var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p){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(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(r,!1,p),this.semicolon(),this.finishNode(r,"VariableDeclaration")}var c=this.value,u=this.parseExpression();if(i===d.name&&u.type==="Identifier"&&this.eat(d.colon))return this.parseLabeledStatement(r,c,u,e);else return this.parseExpressionStatement(r,u)}};g.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.label=null;else if(this.type!==d.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var i=0;for(;i<this.labels.length;++i){var r=this.labels[i];if(e.label==null||r.name===e.label.name){if(r.kind!=null&&(n||r.kind==="loop"))break;if(e.label&&n)break}}if(i===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};g.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};g.parseDoStatement=function(e){if(this.next(),this.labels.push(xs),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(d._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(d.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};g.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(xs),this.enterScope(0),this.expect(d.parenL),this.type===d.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===d._var||this.type===d._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(e,i,t)}var s=this.isContextual("let"),l=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var a=this.startNode();if(this.next(),o==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(a,!0,o),this.finishNode(a,"VariableDeclaration"),this.parseForAfterInit(e,a,t)}var p=this.containsEsc,c=new Ti,u=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);if(this.type===d._in||(l=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===d._in)this.unexpected(t);e.await=!0}else if(l&&this.options.ecmaVersion>=8){if(f.start===u&&!p&&f.type==="Identifier"&&f.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(s&&l)this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)}else this.checkExpressionErrors(c,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,f)};g.parseForAfterInit=function(e,t,n){if((this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===d._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};g.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,vn|(n?0:us),!1,t)};g.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(d._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};g.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};g.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(d.braceL),this.labels.push(Em),this.enterScope(kl);var t;for(var n=!1;this.type!==d.braceR;)if(this.type===d._case||this.type===d._default){var i=this.type===d._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(d.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};g.parseThrowStatement=function(e){if(this.next(),Z.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var bm=[];g.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Tl:0),this.checkLValPattern(e,t?Al:Be),this.expect(d.parenR),e};g.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===d._catch){var t=this.startNode();if(this.next(),this.eat(d.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(d._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};g.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};g.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(xs),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};g.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};g.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};g.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1){var l=s[r];if(l.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var o=this.type.isLoop?"loop":this.type===d._switch?"switch":null;for(var a=this.labels.length-1;a>=0;a--){var p=this.labels[a];if(p.statementStart===e.start)p.statementStart=this.start,p.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};g.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};g.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(d.braceL),e)this.enterScope(0);while(this.type!==d.braceR){var i=this.parseStatement(null);t.body.push(i)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};g.parseFor=function(e,t){return e.init=t,this.expect(d.semi),e.test=this.type===d.semi?null:this.parseExpression(),this.expect(d.semi),e.update=this.type===d.parenR?null:this.parseExpression(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};g.parseForIn=function(e,t){var n=this.type===d._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};g.parseVar=function(e,t,n,i){e.declarations=[],e.kind=n;for(;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(d.eq))r.init=this.parseMaybeAssign(t);else if(!i&&n==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!i&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==d._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!i&&r.id.type!=="Identifier"&&!(t&&(this.type===d._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else r.init=null;if(e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(d.comma))break}return e};g.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?gs:Be,!1)};var vn=1,us=2,_l=4;g.parseFunction=function(e,t,n,i,r){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i){if(this.type===d.star&&t&us)this.unexpected();e.generator=this.eat(d.star)}if(this.options.ecmaVersion>=8)e.async=!!i;if(t&vn){if(e.id=t&_l&&this.type!==d.name?null:this.parseIdent(),e.id&&!(t&us))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?gs:Be:wl)}var s=this.yieldPos,l=this.awaitPos,o=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ys(e.async,e.generator)),!(t&vn))e.id=this.type===d.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=l,this.awaitIdentPos=o,this.finishNode(e,t&vn?"FunctionDeclaration":"FunctionExpression")};g.parseFunctionParams=function(e){this.expect(d.parenL),e.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};g.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;r.body=[],this.expect(d.braceL);while(this.type!==d.braceR){var l=this.parseClassElement(e.superClass!==null);if(l){if(r.body.push(l),l.type==="MethodDefinition"&&l.kind==="constructor"){if(s)this.raiseRecoverable(l.start,"Duplicate constructor in the same class");s=!0}else if(l.key&&l.key.type==="PrivateIdentifier"&&vm(i,l))this.raiseRecoverable(l.key.start,"Identifier '#"+l.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};g.parseClassElement=function(e){if(this.eat(d.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,l="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(d.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===d.star)o=!0;else i="static"}if(n.static=o,!i&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===d.star)&&!this.canInsertSemicolon())s=!0;else i="async";if(!i&&(t>=9||!s)&&this.eat(d.star))r=!0;if(!i&&!s&&!r){var a=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())l=a;else i=a}if(i)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===d.parenL||l!=="method"||r||s){var p=!n.static&&gi(n,"constructor"),c=p&&e;if(p&&l!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=p?"constructor":l,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n};g.isClassElementNameStart=function(){return this.type===d.name||this.type===d.privateId||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword};g.parseClassElementName=function(e){if(this.type===d.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};g.parseClassMethod=function(e,t,n,i){var r=e.key;if(e.kind==="constructor"){if(t)this.raise(r.start,"Constructor can't be a generator");if(n)this.raise(r.start,"Constructor can't be an async method")}else if(e.static&&gi(e,"prototype"))this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);if(e.kind==="get"&&s.params.length!==0)this.raiseRecoverable(s.start,"getter should have no params");if(e.kind==="set"&&s.params.length!==1)this.raiseRecoverable(s.start,"setter should have exactly one param");if(e.kind==="set"&&s.params[0].type==="RestElement")this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};g.parseClassField=function(e){if(gi(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&gi(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(d.eq))this.enterScope(Cn|vi),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};g.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(xt|vi);while(this.type!==d.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};g.parseClassId=function(e,t){if(this.type===d.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Be,!1)}else{if(t===!0)this.unexpected();e.id=null}};g.parseClassSuper=function(e){e.superClass=this.eat(d._extends)?this.parseExprSubscripts(null,!1):null};g.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};g.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var i=this.privateNameStack.length,r=i===0?null:this.privateNameStack[i-1];for(var s=0;s<n.length;++s){var l=n[s];if(!Tn(t,l.name))if(r)r.used.push(l);else this.raiseRecoverable(l.start,"Private field '#"+l.name+"' must be declared in an enclosing class")}};function vm(e,t){var n=t.key.name,i=e[n],r="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))r=(t.static?"s":"i")+t.kind;if(i==="iget"&&r==="iset"||i==="iset"&&r==="iget"||i==="sget"&&r==="sset"||i==="sset"&&r==="sget")return e[n]="true",!1;else if(!i)return e[n]=r,!1;else return!0}function gi(e,t){var{computed:n,key:i}=e;return!n&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}g.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};g.parseExport=function(e,t){if(this.next(),this.eat(d.star))return this.parseExportAllDeclaration(e,t);if(this.eat(d._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,i=e.specifiers;n<i.length;n+=1){var r=i[n];if(this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal")this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};g.parseExportDeclaration=function(e){return this.parseStatement(null)};g.parseExportDefaultDeclaration=function(){var e;if(this.type===d._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,vn|_l,!1,e)}else if(this.type===d._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};g.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Tn(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};g.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if(n==="ArrayPattern")for(var l=0,o=t.elements;l<o.length;l+=1){var a=o[l];if(a)this.checkPatternExport(e,a)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};g.checkVariableExport=function(e,t){if(!e)return;for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}};g.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};g.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};g.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!n){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};g.parseImport=function(e){if(this.next(),this.type===d.string)e.specifiers=bm,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===d.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};g.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,Be),this.finishNode(e,"ImportSpecifier")};g.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Be),this.finishNode(e,"ImportDefaultSpecifier")};g.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Be),this.finishNode(e,"ImportNamespaceSpecifier")};g.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===d.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(d.comma))return e}if(this.type===d.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!t){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};g.parseWithClause=function(){var e=[];if(!this.eat(d._with))return e;this.expect(d.braceL);var t={},n=!0;while(!this.eat(d.braceR)){if(!n){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else n=!1;var i=this.parseImportAttribute(),r=i.key.type==="Identifier"?i.key.name:i.key.value;if(Tn(t,r))this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+r+"'");t[r]=!0,e.push(i)}return e};g.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(d.colon),this.type!==d.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};g.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===d.string){var e=this.parseLiteral(this.value);if(mm.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};g.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};g.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var ue=O.prototype;ue.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",n)this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];if(this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern"))this.raise(s.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",n)this.checkPatternErrors(n,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(n)this.checkPatternErrors(n,!0);return e};ue.toAssignableList=function(e,t){var n=e.length;for(var i=0;i<n;i++){var r=e[i];if(r)this.toAssignable(r,t)}if(n){var s=e[n-1];if(this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier")this.unexpected(s.argument.start)}return e};ue.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};ue.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==d.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};ue.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case d.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(d.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case d.braceL:return this.parseObj(!0)}return this.parseIdent()};ue.parseBindingList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(s)s=!1;else this.expect(d.comma);if(t&&this.type===d.comma)r.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===d.ellipsis){var l=this.parseRestBinding();if(this.parseBindingListItem(l),r.push(l),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else r.push(this.parseAssignableListItem(i))}return r};ue.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};ue.parseBindingListItem=function(e){return e};ue.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(d.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};ue.checkLValSimple=function(e,t,n){if(t===void 0)t=yi;var i=t!==yi;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode");if(i){if(t===Be&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Tn(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==Pl)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(i)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(i)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};ue.checkLValPattern=function(e,t,n){if(t===void 0)t=yi;switch(e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var l=0,o=e.elements;l<o.length;l+=1){var a=o[l];if(a)this.checkLValInnerPattern(a,t,n)}break;default:this.checkLValSimple(e,t,n)}};ue.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=yi;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ee=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},M={b_stat:new Ee("{",!1),b_expr:new Ee("{",!0),b_tmpl:new Ee("${",!1),p_stat:new Ee("(",!1),p_expr:new Ee("(",!0),q_tmpl:new Ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ee("function",!1),f_expr:new Ee("function",!0),f_expr_gen:new Ee("function",!0,!1,null,!0),f_gen:new Ee("function",!1,!1,null,!0)},Bt=O.prototype;Bt.initialContext=function(){return[M.b_stat]};Bt.curContext=function(){return this.context[this.context.length-1]};Bt.braceIsBlock=function(e){var t=this.curContext();if(t===M.f_expr||t===M.f_stat)return!0;if(e===d.colon&&(t===M.b_stat||t===M.b_expr))return!t.isExpr;if(e===d._return||e===d.name&&this.exprAllowed)return Z.test(this.input.slice(this.lastTokEnd,this.start));if(e===d._else||e===d.semi||e===d.eof||e===d.parenR||e===d.arrow)return!0;if(e===d.braceL)return t===M.b_stat;if(e===d._var||e===d._const||e===d.name)return!1;return!this.exprAllowed};Bt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Bt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===d.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};Bt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===M.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};d.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?M.b_stat:M.b_expr),this.exprAllowed=!0};d.dollarBraceL.updateContext=function(){this.context.push(M.b_tmpl),this.exprAllowed=!0};d.parenL.updateContext=function(e){var t=e===d._if||e===d._for||e===d._with||e===d._while;this.context.push(t?M.p_stat:M.p_expr),this.exprAllowed=!0};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(e){if(e.beforeExpr&&e!==d._else&&!(e===d.semi&&this.curContext()!==M.p_stat)&&!(e===d._return&&Z.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===d.colon||e===d.braceL)&&this.curContext()===M.b_stat))this.context.push(M.f_expr);else this.context.push(M.f_stat);this.exprAllowed=!1};d.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};d.backQuote.updateContext=function(){if(this.curContext()===M.q_tmpl)this.context.pop();else this.context.push(M.q_tmpl);this.exprAllowed=!1};d.star.updateContext=function(e){if(e===d._function){var t=this.context.length-1;if(this.context[t]===M.f_expr)this.context[t]=M.f_expr_gen;else this.context[t]=M.f_gen}this.exprAllowed=!0};d.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==d.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var T=O.prototype;T.checkPropClash=function(e,t,n){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var i=e.key,r;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){if(r==="__proto__"&&s==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=i.start}else this.raiseRecoverable(i.start,"Redefinition of __proto__ property");t.proto=!0}return}r="$"+r;var l=t[r];if(l){var o;if(s==="init")o=this.strict&&l.init||l.get||l.set;else o=l.init||l[s];if(o)this.raiseRecoverable(i.start,"Redefinition of property")}else l=t[r]={init:!1,get:!1,set:!1};l[s]=!0};T.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:i,startLoc:r}=n,s=n.parseMaybeAssign(e,t);if(n.type===d.comma){var l=n.startNodeAt(i,r);l.expressions=[s];while(n.eat(d.comma))l.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(l,"SequenceExpression")}return s})};T.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var i=!1,r=-1,s=-1,l=-1;if(t)r=t.parenthesizedAssign,s=t.trailingComma,l=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new Ti,i=!0;var o=this.start,a=this.startLoc;if(this.type===d.parenL||this.type===d.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var p=this.parseMaybeConditional(e,t);if(n)p=n.call(this,p,o,a);if(this.type.isAssign){var c=this.startNodeAt(o,a);if(c.operator=this.value,this.type===d.eq)p=this.toAssignable(p,!1,t);if(!i)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=p.start)t.shorthandAssign=-1;if(this.type===d.eq)this.checkLValPattern(p);else this.checkLValSimple(p);if(c.left=p,this.next(),c.right=this.parseMaybeAssign(e),l>-1)t.doubleProto=l;return this.finishNode(c,"AssignmentExpression")}else if(i)this.checkExpressionErrors(t,!0);if(r>-1)t.parenthesizedAssign=r;if(s>-1)t.trailingComma=s;return p};T.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===n)&&this.eat(d.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(d.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r};T.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return r;return r.start===n&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,n,i,-1,e)};T.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(s!=null&&(!r||this.type!==d._in)){if(s>i){var l=this.type===d.logicalOR||this.type===d.logicalAND,o=this.type===d.coalesce;if(o)s=d.logicalAND.binop;var a=this.value;this.next();var p=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,s,r),f=this.buildBinary(t,n,e,u,a,l||o);if(l&&this.type===d.coalesce||o&&(this.type===d.logicalOR||this.type===d.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(f,t,n,i,r)}}return e};T.buildBinary=function(e,t,n,i,r,s){if(i.type==="PrivateIdentifier")this.raise(i.start,"Private identifier can only be left side of binary expression");var l=this.startNodeAt(e,t);return l.left=n,l.operator=r,l.right=i,this.finishNode(l,s?"LogicalExpression":"BinaryExpression")};T.parseMaybeUnary=function(e,t,n,i){var r=this.start,s=this.startLoc,l;if(this.isContextual("await")&&this.canAwait)l=this.parseAwait(i),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===d.incDec;if(o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,a,i),this.checkExpressionErrors(e,!0),a)this.checkLValSimple(o.argument);else if(this.strict&&o.operator==="delete"&&Dl(o.argument))this.raiseRecoverable(o.start,"Deleting local variable in strict mode");else if(o.operator==="delete"&&ds(o.argument))this.raiseRecoverable(o.start,"Private fields can not be deleted");else t=!0;l=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===d.privateId){if((i||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(l=this.parsePrivateIdent(),this.type!==d._in)this.unexpected()}else{if(l=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return l;while(this.type.postfix&&!this.canInsertSemicolon()){var p=this.startNodeAt(r,s);p.operator=this.value,p.prefix=!1,p.argument=l,this.checkLValSimple(l),this.next(),l=this.finishNode(p,"UpdateExpression")}}if(!n&&!(l.type==="ArrowFunctionExpression"&&l.start===r)&&this.eat(d.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(r,s,l,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return l};function Dl(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Dl(e.expression)}function ds(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ds(e.expression)||e.type==="ParenthesizedExpression"&&ds(e.expression)}T.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var s=this.parseSubscripts(r,n,i,!1,t);if(e&&s.type==="MemberExpression"){if(e.parenthesizedAssign>=s.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=s.start)e.parenthesizedBind=-1;if(e.trailingComma>=s.start)e.trailingComma=-1}return s};T.parseSubscripts=function(e,t,n,i,r){var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,l=!1;while(!0){var o=this.parseSubscript(e,t,n,i,s,l,r);if(o.optional)l=!0;if(o===e||o.type==="ArrowFunctionExpression"){if(l){var a=this.startNodeAt(t,n);a.expression=o,o=this.finishNode(a,"ChainExpression")}return o}e=o}};T.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(d.arrow)};T.parseSubscriptAsyncArrow=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,i)};T.parseSubscript=function(e,t,n,i,r,s,l){var o=this.options.ecmaVersion>=11,a=o&&this.eat(d.questionDot);if(i&&a)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(d.bracketL);if(p||a&&this.type!==d.parenL&&this.type!==d.backQuote||this.eat(d.dot)){var c=this.startNodeAt(t,n);if(c.object=e,p)c.property=this.parseExpression(),this.expect(d.bracketR);else if(this.type===d.privateId&&e.type!=="Super")c.property=this.parsePrivateIdent();else c.property=this.parseIdent(this.options.allowReserved!=="never");if(c.computed=!!p,o)c.optional=a;e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(d.parenL)){var u=new Ti,f=this.yieldPos,h=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var x=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1,u);if(r&&!a&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,x,l)}this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var y=this.startNodeAt(t,n);if(y.callee=e,y.arguments=x,o)y.optional=a;e=this.finishNode(y,"CallExpression")}else if(this.type===d.backQuote){if(a||s)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,"TaggedTemplateExpression")}return e};T.parseExprAtom=function(e,t,n){if(this.type===d.slash)this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case d._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(i=this.startNode(),this.next(),this.type===d.parenL&&!this.allowDirectSuper)this.raise(i.start,"super() call outside constructor of a subclass");if(this.type!==d.dot&&this.type!==d.bracketL&&this.type!==d.parenL)this.unexpected();return this.finishNode(i,"Super");case d._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case d.name:var s=this.start,l=this.startLoc,o=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&a.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function))return this.overrideContext(M.f_expr),this.parseFunction(this.startNodeAt(s,l),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(d.arrow))return this.parseArrowExpression(this.startNodeAt(s,l),[a],!1,t);if(this.options.ecmaVersion>=8&&a.name==="async"&&this.type===d.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(a=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(d.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(s,l),[a],!0,t)}}return a;case d.regexp:var p=this.value;return i=this.parseLiteral(p.value),i.regex={pattern:p.pattern,flags:p.flags},i;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:return i=this.startNode(),i.value=this.type===d._null?null:this.type===d._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case d.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(r,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u))e.parenthesizedAssign=c;if(e.parenthesizedBind<0)e.parenthesizedBind=c}return u;case d.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(d.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case d.braceL:return this.overrideContext(M.b_expr),this.parseObj(!1,e);case d._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case d._class:return this.parseClass(this.startNode(),!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};T.parseExprAtomDefault=function(){this.unexpected()};T.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===d.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===d.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};T.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(d.parenR))if(this.expect(d.comma),!this.afterTrailingComma(d.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(d.parenR)){if(this.expect(d.comma),!this.afterTrailingComma(d.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(d.parenR)){var t=this.start;if(this.eat(d.comma)&&this.eat(d.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};T.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};T.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};T.parseParenExpression=function(){this.expect(d.parenL);var e=this.parseExpression();return this.expect(d.parenR),e};T.shouldParseArrow=function(e){return!this.canInsertSemicolon()};T.parseParenAndDistinguishExpression=function(e,t){var n=this.start,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var l=this.start,o=this.startLoc,a=[],p=!0,c=!1,u=new Ti,f=this.yieldPos,h=this.awaitPos,m;this.yieldPos=0,this.awaitPos=0;while(this.type!==d.parenR)if(p?p=!1:this.expect(d.comma),s&&this.afterTrailingComma(d.parenR,!0)){c=!0;break}else if(this.type===d.ellipsis){if(m=this.start,a.push(this.parseParenItem(this.parseRestBinding())),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else a.push(this.parseMaybeAssign(!1,u,this.parseParenItem));var x=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(d.parenR),e&&this.shouldParseArrow(a)&&this.eat(d.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(n,i,a,t);if(!a.length||c)this.unexpected(this.lastTokStart);if(m)this.unexpected(m);if(this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,a.length>1)r=this.startNodeAt(l,o),r.expressions=a,this.finishNodeAt(r,"SequenceExpression",x,y);else r=a[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,i);return _.expression=r,this.finishNode(_,"ParenthesizedExpression")}else return r};T.parseParenItem=function(e){return e};T.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,i)};var Sm=[];T.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===d.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,r,!0,!1),e.callee.type==="Super")this.raiseRecoverable(i,"Invalid use of 'super'");if(this.eat(d.parenL))e.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Sm;return this.finishNode(e,"NewExpression")};T.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===d.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
31
+ }`:`{ ${n} }`}function gh({hasTypeScriptType:e,hasJSDocType:t,inferredType:n,finalType:i}){if(e)return"typescript";if(t)return"jsdoc";if(n!==void 0)return"default";if(i!==void 0)return"inferred";return"unknown"}function gn(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,n=e.jsdocParams??e.resolvedParams,i=e.jsdocReturnType??e.resolvedReturnType;if((e.isFunctionDeclaration||e.initializerIsFunction)&&t===e.typeSeed&&(i||e.isFunctionDeclaration&&n?.length))t=`${e.jsdocTypeParameters?`<${e.jsdocTypeParameters}>`:""}(${ye(n??[])}) => ${i??"any"}`;let s=e.jsdocDescription??e.resolvedDescription;if(s===void 0&&t!==void 0)s=e.typedefs?.get(t)?.description;let a=gh({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),o=e.initializerIsFunction||e.isFunctionDeclaration||!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||Xn(e.jsdocType)||Xn(e.resolvedType)||Xn(e.explicitType),l=o?e.jsdocTypeParameters:void 0;return{type:t,typeSource:a,description:s,params:n,returnType:i,isFunction:o,typeParameters:l}}function xn(e,t,n){if(n?.explicitDefault===void 0)return n;return e.explicitDefaultPropNames.add(t),{...n,description:n.descriptionWithoutDefault}}function En(e){return{binding:e?.binding,deprecated:e?.deprecated,tags:e?.tags,...e?.internal?{internal:!0}:{}}}function di(e){if(e?.type==="Identifier")return e.name;return typeof e?.value==="string"?e.value:void 0}function Xa(e,t){for(let n of e?.body??[]){let i=n.type==="ExportNamedDeclaration"&&n.declaration?n.declaration:n;if(i.type==="VariableDeclaration"){let r=i.declarations.find((s)=>s.id.type==="Identifier"?s.id.name===t:Y(s.id).has(t));if(r)return{declaration:i,declarator:r,statement:n}}else if((i.type==="FunctionDeclaration"||i.type==="ClassDeclaration")&&i.id?.name===t)return{declaration:i,statement:n}}return}function xh(e,t){for(let n of e?.body??[]){if(n.type!=="LabeledStatement"||n.label.name!=="$")continue;if(n.body.type!=="ExpressionStatement")continue;let i=n.body.expression;if(i.type!=="AssignmentExpression"||i.operator!=="=")continue;if(i.left.type.startsWith("TS"))continue;if(!Y(i.left).has(t))continue;let r={type:"VariableDeclarator",id:i.left,init:i.right,start:i.start,end:i.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[r],start:n.start,end:n.end},declarator:r,statement:n}}return}function Eh(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}function ts(e,t,n,i,r){let s=di(n.local),a=di(n.exported);if(!s||!a)return;if(t.source!=null)return{localName:s,exportedName:a};let o=Xa(i,s);if(!o&&r==="instance")o=Xa(e.parsed?.module?.content,s)??xh(i,s);return{localName:s,exportedName:a,...o}}function ns(e,t,n,i){let r=t.source?.value,s=typeof r==="string"?`it re-exports from "${r}"`:e.valueImportBindingsByLocalName.has(n)?"it re-exports an imported binding":"no matching local declaration was found";D(e,"export-unresolved",i,`export "${i}" was skipped because ${s}; sveld only resolves exports of a local declaration.`,C(e,t))}function fi(e,t,n){if(!n)return j(e,t);let i=t.specifiers.length===1?j(e,t):void 0,r=j(e,n.statement);if(!i||!r)return i??r;let s=Object.fromEntries(Object.entries(i).filter(([,a])=>a!==void 0));return{...r,...s,internal:i.internal||r.internal}}function is(e,t,n,i){let r=[];if(t.type==="FunctionDeclaration"){if(!t.id)return r;let o=e.scriptLanguage==="ts"?$t(e,t,un(t)):void 0;return r.push({prop_name:n?.exportedName??t.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:o?.hasAnnotations?void 0:Lt(e,t),explicitType:o?.hasAnnotations?o.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:t.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),r}if(t.type!=="VariableDeclaration")return r;let s=Eh(t.kind),a=n?.declarator?[n.declarator]:t.declarations;for(let{id:o,init:l}of a){if(o.type!=="Identifier"){for(let A of Y(o)){if(n&&n.localName!==A)continue;r.push({prop_name:n?.exportedName??A,kind:s,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:A,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let p=o.name,c=n?.exportedName??p,u=l==null?{isFunction:!1}:xe(e,l),{value:f,isFunction:h,defaultValue:m}=u,g=s==="const"&&(l?.type==="ObjectExpression"||l?.type==="ArrayExpression")&&!e.typeCasts.constAssertions.has(l),_=(s==="const"&&(l?.type==="ArrowFunctionExpression"||l?.type==="FunctionExpression")?Lt(e,l):void 0)??(g?Be(l,"literal"):void 0)??u.type;pi(e,u,c,i),r.push({prop_name:c,kind:s,isFunctionDeclaration:!1,value:f,typeSeed:_,explicitType:bh(e,o),initializerIsFunction:h,isRequired:s==="let"&&l==null,localName:p,defaultValue:m,inferredTypeForSource:_,resolvedJSDoc:u})}return r}function bh(e,t){return F(e,t.typeAnnotation?.typeAnnotation),ae(e,t.typeAnnotation)}function rs(e,t,n){let{resolvedJSDoc:i}=t;return gn({explicitType:t.explicitType,typeSeed:t.typeSeed,inferredTypeForSource:t.inferredTypeForSource,jsdocType:n?.type,jsdocDescription:n?.description,jsdocParams:n?.params,jsdocReturnType:n?.returnType,jsdocTypeParameters:n?.typeParameters,resolvedType:i?.resolvedType,resolvedDescription:i?.resolvedDescription,resolvedParams:i?.resolvedParams,resolvedReturnType:i?.resolvedReturnType,initializerIsFunction:t.initializerIsFunction,isFunctionDeclaration:t.isFunctionDeclaration,typedefs:e.typedefs})}function vh(e,t,n){D(e,"export-unresolved",n,`export "${n}" was skipped because a class can't be a prop; export it from the module script instead.`,C(e,t))}function Ya(e,t,n,i){if(n.type==="ClassDeclaration"){if(n.id)vh(e,t,i?.exportedName??n.id.name);return}let r=is(e,n,i,"props");if(r.length===0)return;let s=fi(e,t,i);for(let a of r){let{prop_name:o,kind:l,localName:p}=a,c=xn(e,o,s),{type:u,typeSource:f,description:h,params:m,returnType:g,isFunction:y,typeParameters:_}=rs(e,a,c);Xt(e,o,s?.sveldIgnore),on(e,o,{name:o,...p!==void 0&&p!==o?{localName:p}:{},kind:l,description:h,...En(s),type:u,typeSource:f,value:c?.explicitDefault??a.value,defaultValue:a.defaultValue,params:m,returnType:g,typeParameters:_,isFunction:y,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:a.isRequired,constant:l==="const",reactive:e.reactive_vars.has(o),source:C(e,t)})}}function Qa(e,t,n){if(t.declaration!=null){Ya(e,t,t.declaration);return}for(let i of t.specifiers){let r=ts(e,t,i,n,"instance");if(!r)continue;if(r.declaration)Ya(e,t,r.declaration,r);else ns(e,t,r.localName,r.exportedName)}}function Sh(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),n=Pt(t);if(!n&&!pt(t))return;let i="name"in e&&typeof e.name==="string"?e.name:void 0;if(!i)return;if(n)return{type:"InlineComponent",name:i};let r={type:"Element",name:i};if(i==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let s=e.tag;if(s.type==="Literal"&&typeof s.value==="string")r.thisValue=s.value}return r}function el(e,t,n){let i=Sh(t);if(!i)return;if(e.rest_props!==void 0&&!(e.rest_props.type==="InlineComponent"&&i.type==="Element"))return;e.rest_props=i;let r=t&&typeof t==="object"&&"tag"in t?t.tag:void 0;e.restPropsTagLocal=i.name==="svelte:element"&&b(r)?r.name:void 0,e.restPropsSource=C(e,n)}function Za(e,t){let n=At(t);if(me(n,"$derived"))n=At(n.arguments[0]);if(!re(n))return;for(let i of n.properties){if(i.type!=="SpreadElement"||!b(i.argument))continue;let{name:r}=i.argument;if(r==="$$restProps"||e.restPropLocals.has(r))return r}return}function tl(e,t){let n=new Map;for(let i of t?.content.body??[]){if(i.type==="VariableDeclaration"){for(let{id:a,init:o}of i.declarations){let l=b(a)?Za(e,o):void 0;if(l&&b(a))n.set(a.name,l)}continue}if(i.type!=="LabeledStatement"||i.label.name!=="$")continue;if(i.body.type!=="ExpressionStatement")continue;let r=i.body.expression;if(r.type!=="AssignmentExpression"||r.operator!=="="||!b(r.left))continue;let s=Za(e,r.right);if(s)n.set(r.left.name,s)}return n}var Th=/^[A-Za-z_$][\w$]*/,Ch=/[A-Za-z_$][\w$]*/g,kh=/^(?:(?:const|in|out)\s+)+/;function nl(e){let t=O(e,",").map((i)=>i.trim()).filter((i)=>i.length>0);if(t.length===0)return null;return[t.map((i)=>i.replace(kh,"").match(Th)?.[0]??i).join(", "),t.join(", ")]}function il(e,t,n){let i=e.scriptGenericsAttribute?.value;if(!i)return;for(let[r]of i.matchAll(Ch)){if(e.typeImportBindingsByLocalName.has(r))t.add(r);if(n.has(r))continue;let s=e.localTypeDeclarationsByName.get(r);if(!s)continue;n.add(r),Me(e,s.node,t,n)}}function hi(e,t,n){if(e.generics)e.generics=[`${e.generics[0]}, ${t}`,`${e.generics[1]}, ${n}`];else e.generics=[t,n]}function rl(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.type==="Text"?t.data:"").join("").trim()}function sl(e){let t=[e.instance,e.module].filter((i)=>i!==void 0),n=!1;for(let i of t){let r=i.attributes.find((s)=>s.name==="lang");if(!r){n=!0;continue}if(rl(r)?.toLowerCase()==="ts")return"ts"}return n?"js":void 0}function ol(e,t){let n=t.instance?.attributes.find((s)=>s.name==="generics");if(!n)return;let i=C(e,n),r=rl(n);if(!r)return;return{value:r,source:i}}var al=/[A-Za-z_$][\w$]*/y,wh=/[\w$]/,Ah=/^\s*\??\s*:/,Ph=/(?:^|[{;,(\n]|\breadonly)\s*$/,_h=/^\s*\[/,Dh=/\b(?:keyof|readonly|unique)\s+$/,Nh=/&\s*$/,$h=/^\s*&/,Ih=/(?:\||\bextends)\s*$/,Lh=/^\s*(?:\||extends\b)/,Rh=/^(?:keyof|readonly|unique|typeof|infer)\s/,Mh=/^(?:abstract\s+)?new\b/;function Oh(e){let t=e.trim();if(_t(t)!==-1||Kt(t,"?")!==-1||Mh.test(t))return 4;if(O(t,"|").length>1)return 3;if(O(t,"&").length>1)return 2;return Rh.test(t)?1:0}function Bh(e,t){if(_h.test(t))return 0;if(Dh.test(e))return 1;if(Nh.test(e)||$h.test(t))return 2;if(Ih.test(e)||Lh.test(t))return 3;return 4}function Fh(e,t){for(let n=t+1;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===e[t])return n+1;return e.length}function jh(e,t){for(let n=t;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]==="`")return{end:n+1,opensExpression:!1};else if(e[n]==="$"&&e[n+1]==="{")return{end:n+2,opensExpression:!0};return{end:e.length,opensExpression:!1}}function qh(e,t){if(t.size===0)return e;let n="",i=[],r=0;while(r<e.length){let s=e[r],a=i.length-1;if(s==='"'||s==="'"){let f=Fh(e,r);n+=e.slice(r,f),r=f;continue}if(s==="`"||s==="}"&&i[a]===0){if(s==="}")i.pop();let{end:f,opensExpression:h}=jh(e,r+1);if(h)i.push(0);n+=e.slice(r,f),r=f;continue}if(a>=0&&s==="{")i[a]++;if(a>=0&&s==="}")i[a]--;al.lastIndex=r;let o=wh.test(e[r-1]??"")?void 0:al.exec(e)?.[0];if(!o){n+=s,r++;continue}r+=o.length;let l=t.get(o),p=e.slice(0,r-o.length),c=e.slice(r),u=p.trimEnd();if(l===void 0||u.endsWith(".")&&!u.endsWith("...")||Ph.test(p)&&Ah.test(c))n+=o;else n+=Oh(l)>Bh(p,c)?`(${l})`:l}return n}function Vh(e,t,n){let i=new Map,r=t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"?t.typeParameters?.params:void 0,s=n.typeArguments?.params;if(!r?.length||!s?.length)return i;for(let a=0;a<r.length;a++){let o=r[a]?.name,l=s[a];if(!o||l?.start===void 0||l?.end===void 0)continue;let p=q(e,l.start,l.end)?.trim();if(p)i.set(o,p)}return i}function mi(e,t,n,i=new Set){let r=new Map;if(!t?.type)return r;let s=(o)=>{for(let l of o){if(l?.type!=="TSPropertySignature"||l.computed||!l.key)continue;let p=K(l.key);if(!p)continue;let c=l.typeAnnotation?.start,u=l.typeAnnotation?.end;if(c===void 0||u===void 0)continue;let f=q(e,c+1,u)?.trim();if(!f)continue;F(e,l.typeAnnotation?.typeAnnotation);let h=j(e,l);r.set(p,{type:f,optional:l.optional===!0,source:C(e,l),...h?{jsdoc:h}:{}})}},a=(o)=>{let l=mi(e,o,n,i);for(let[p,c]of l)r.set(p,c)};switch(t.type){case"TSTypeLiteral":s(t.members??[]);break;case"TSInterfaceDeclaration":for(let o of t.extends??[]){let l={type:"TSTypeReference",typeName:o.expression,typeArguments:o.typeParameters,start:o.start,end:o.end};a(l)}s(t.body?.body??[]);break;case"TSTypeAliasDeclaration":case"TSParenthesizedType":a(t.typeAnnotation);break;case"TSTypeReference":{let o=pa(t.typeName);if(!o||i.has(o))break;let l=n.get(o);if(!l)break;i.add(o);let p=mi(e,l,n,i);i.delete(o);let c=Vh(e,l,t);for(let[u,f]of p)r.set(u,c.size===0?f:{...f,type:qh(f.type,c)});break}case"TSIntersectionType":for(let o of t.types??[])a(o);break}return r}function ll(e){return new Map(Array.from(e.localTypeDeclarationsByName,([t,n])=>[t,n.node]))}function Gh(e){let t={};for(let[n,i]of Object.entries(e))t[n]={...i.attribute===void 0?{}:{attribute:i.attribute},...i.reflect===void 0?{}:{reflect:i.reflect},...i.type===void 0?{}:{type:i.type}};return t}function ss(e,t,n){if(t.type==="ImportDeclaration"&&t.source?.value)for(let i of t.specifiers){let r=i.type==="ImportSpecifier";if(t.importKind!=="type"&&!(r&&i.importKind==="type"))continue;let s=i.local.name;e.typeImportBindingsByLocalName.set(s,{importedName:r?oi(i):void 0,localName:s,source:String(t.source.value),specifierType:r?"named":i.type==="ImportDefaultSpecifier"?"default":"namespace"})}if(t.type==="TSEnumDeclaration"||t.type==="TSInterfaceDeclaration"||t.type==="TSTypeAliasDeclaration"){let i=t.type==="TSEnumDeclaration"?da(e,t):q(e,t.start,t.end)?.trim();e.localTypeDeclarationsByName.set(t.id.name,{code:i??"",node:t,start:t.start,...n?{exported:n}:{}})}}function pl(e,t){if(e.runesPropsDeclarationMetadataByDeclaratorStart.clear(),e.explicitVariableTypesByName.clear(),e.explicitVariableTypeNodesByName.clear(),e.typeImportBindingsByLocalName.clear(),e.localTypeDeclarationsByName.clear(),e.additionalTypeDependencyNodes.length=0,e.typedRunesPropsDeclarations.length=0,!e.source)return;e.scriptLanguage=sl(t);let n=t.options?.customElement;e.customElementTag=n?.tag,e.customElement=n?{...n.tag===void 0?{}:{tag:n.tag},...n.shadow==="open"||n.shadow==="none"?{shadow:n.shadow}:{},...n.props?{props:Gh(n.props)}:{},...n.extend===void 0?{}:{extend:!0}}:void 0,e.runesOptionOverride=t.options?.runes,e.scriptGenericsAttribute=ol(e,t);let i=new Set;for(let s of t.module?.content.body??[]){if(!s?.type)continue;if(s.type==="ExportNamedDeclaration"&&s.declaration)ss(e,s.declaration,!0);else if(s.type==="ExportNamedDeclaration"&&!s.source)for(let a of s.specifiers){if(a.local.type!=="Identifier"||a.exported.type!=="Identifier")continue;if(a.local.name===a.exported.name)i.add(a.local.name)}else ss(e,s,!1)}for(let s of i){let a=e.localTypeDeclarationsByName.get(s);if(a)a.exported=!0}let r=t.instance?.content.body??[];for(let s of r){if(ss(e,s,!1),s.type!=="VariableDeclaration")continue;for(let{id:a}of s.declarations){if(a.type!=="Identifier")continue;let o=ae(e,a.typeAnnotation);if(!o)continue;let l=a.typeAnnotation?.typeAnnotation;if(e.explicitVariableTypesByName.set(a.name,o),l)e.explicitVariableTypeNodesByName.set(a.name,l)}}for(let s of r){if(s.type!=="VariableDeclaration")continue;for(let a of s.declarations){if(!me(At(a.init),"$props"))continue;let o="typeAnnotation"in a.id?a.id.typeAnnotation:void 0,l=o?void 0:Uo(a.init),p=o?.typeAnnotation??l,c=o?ae(e,o):ct(e,l),u=mi(e,p,ll(e)),f=new Set,h=new Set;Me(e,p,f,h),il(e,f,h);let m={canonicalType:c,props:u,referencedImportedTypes:f,referencedLocalTypes:h};if(e.runesPropsDeclarationMetadataByDeclaratorStart.set(a.start,m),c)e.typedRunesPropsDeclarations.push(m)}}}function Hh(e,t){let n=t?.trim();if(!n)return;let i=e.typedefMembersByName.get(n)??Oe(n,{skipIndexSignatures:!0});return i?new Map(i.map((r)=>[r.name,r])):void 0}function Wh(e){return me(e,"$bindable")?{init:e.arguments[0],bindable:!0}:{init:e,bindable:!1}}function cl(e,t){for(let n of t.declarations){if(!me(n.init,"$props"))continue;let i=e.runesPropsDeclarationMetadataByDeclaratorStart.get(n.start),r=j(e,t),s=i?.props.size?void 0:Hh(e,r?.type);if(n.id.type==="Identifier"){e.wholePropsLocals.add(n.id.name),e.restPropLocals.add(n.id.name);let o=[...Array.from(s?.values()??[],(l)=>({name:l.name,member:l,typeMetadata:void 0})),...Array.from(i?.props??[],([l,p])=>({name:l,member:void 0,typeMetadata:p}))];for(let{name:l,member:p,typeMetadata:c}of o){let u=xn(e,l,c?.jsdoc),{type:f,typeSource:h,description:m,params:g,returnType:y,isFunction:_}=gn({explicitType:c?.type,jsdocType:u?.type??p?.type,jsdocDescription:u?.description??p?.description,jsdocParams:u?.params,jsdocReturnType:u?.returnType,initializerIsFunction:!1,isFunctionDeclaration:!1,typedefs:e.typedefs});Xt(e,l,u?.sveldIgnore),on(e,l,{name:l,kind:"let",description:m,...En(u),type:f,typeSource:h,value:u?.explicitDefault,params:g,returnType:y,isFunction:_,isFunctionDeclaration:!1,isRequired:!(c?.optional??p?.optional),constant:!1,reactive:!1,source:c?.source})}continue}if(n.id.type!=="ObjectPattern")continue;let a=n.id.properties.filter((o)=>{if(o.type!=="Property"||o.computed)return!1;if(!K(o.key))return!1;if(o.value.type==="Identifier")return!0;return o.value.type==="AssignmentPattern"&&o.value.left.type==="Identifier"}).length;for(let o of n.id.properties){if(o.type==="RestElement"){if(o.argument.type==="Identifier")e.restPropLocals.add(o.argument.name);continue}let l=K(o.key);if(!l)continue;let p,c;if(o.value.type==="Identifier")p=o.value.name;else{let Ne=o.value;p=Ne.left.name,c=Ne.right}if(!p)continue;if(Yn(e,l,p),l==="children")e.snippetPropLocals.add(p);let u=s?.get(l),f=i?.props.get(l),h=xn(e,l,j(e,o)??f?.jsdoc??(a===1&&!s?r:void 0)),{init:m,bindable:g}=Wh(c),y=m==null?{isFunction:!1}:xe(e,m),{value:_,type:A,isFunction:R,defaultValue:v}=y,X=f?.type===void 0&&h?.type===void 0?y.resolvedType:void 0;pi(e,y,l,"props");let{type:he,typeSource:_e,description:St,params:De,returnType:Tt,isFunction:S}=gn({explicitType:f?.type,typeSeed:A,inferredTypeForSource:A,jsdocType:h?.type??u?.type,jsdocDescription:h?.description??u?.description,jsdocParams:h?.params,jsdocReturnType:h?.returnType,resolvedType:X,resolvedDescription:y.resolvedDescription,resolvedParams:y.resolvedParams,resolvedReturnType:y.resolvedReturnType,initializerIsFunction:R,isFunctionDeclaration:!1,typedefs:e.typedefs});if(g)e.reactive_vars.add(l);Xt(e,l,h?.sveldIgnore),on(e,l,{name:l,...p===l?{}:{localName:p},kind:"let",description:St,...En(h),...g?{bindable:!0}:{},type:he,typeSource:_e,value:h?.explicitDefault??_,defaultValue:v,params:De,returnType:Tt,isFunction:S,isFunctionDeclaration:!1,isRequired:!g&&m==null&&f?.optional!==!0&&u?.optional!==!0,constant:!1,reactive:g,source:C(e,o)})}}}function zh(e){let n=e.indexOf("EventDispatcher");if(n===-1)return;let i=n+15;while(e[i]===" ")i++;if(e[i]!=="<")return;let r=ze(e,i);return r===-1?void 0:e.slice(i+1,r)}var Uh=/^["']|["']$/g,Kh=/\?$/,Jh=/^\{/,Xh=/\}$/;function Yh(e){let t=Kt(e,":");if(t===-1)return;let n=e.slice(0,t).trim().replace(Kh,"").replace(Uh,""),i=e.slice(t+1).trim();if(!n||!i)return;return{name:n,type:i}}function ul(e,t,n,i){if(t){for(let[o,l]of mi(e,t,ll(e)))e.typedDispatcherEventNames.add(o),Xe(e,{name:o,detail:l.type,has_argument:!0,source:l.source});return}let r=ge(e,n)?.type,s=r?zh(r):void 0;if(!s)return;let a=s.trim().replace(Jh,"").replace(Xh,"");for(let o of O(a,";,")){let l=Yh(o.trim());if(!l)continue;e.typedDispatcherEventNames.add(l.name),Xe(e,{name:l.name,detail:l.type,has_argument:!0,source:i})}}function dl(e,t){if(e.syntaxMode!=="runes")return;for(let[n,i]of Array.from(e.events.entries())){if(i.type!=="dispatched")continue;if(t.has(n)||e.forwardedEvents.has(n))continue;let r=`on${n}`,s=e.props.get(r);if(!s)continue;let a=s.type!==void 0||s.params!==void 0||s.returnType!==void 0,o=i.detail===void 0||i.detail==="undefined"||i.detail==="null"?"() => void":`(detail: ${i.detail}) => void`;e.props.set(r,{...s,description:s.description??i.description,type:a?s.type:o,typeSource:a?s.typeSource:"inferred",isFunction:!0}),e.events.delete(n)}}var Ye=null;function Qe(e){return!e||e==="default"?Ye:e}function os(e,t){switch(t.type){case"Identifier":return{value:t.name,replace:!0};case"Literal":return{value:typeof t.value==="string"?JSON.stringify(t.value):String(t.value),replace:!1};case"MemberExpression":return{value:ga(e,t),replace:!1};case"ObjectExpression":case"TemplateLiteral":return{value:q(e,t.start,t.end),replace:!1};default:return{value:void 0,replace:!1}}}function Qh(e,t,n){if(!b(t))return null;let i=It(e,t.name);if(re(i))return ls(e,i,n).slot_props;let r=ut(e,t.name);if(!r)return null;let s=Oe(r.type);if(!s)return null;let a={};for(let o of s)a[o.name]={value:o.type,replace:!1};return a}function as(e,t,n,i,r){let s=Qh(e,n,r);if(s)return Object.assign(t,s),!0;if(r)return!1;return D(e,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,C(e,i)),!1}function ls(e,t,n){let i={},r=!1;for(let s of t.properties){if(s.type==="SpreadElement"){if(!as(e,i,s.argument,s,n))r=!0;continue}if(s.type!=="Property"||s.computed)continue;let a=K(s.key);if(!a)continue;i[a]=os(e,s.value)}return{slot_props:i,hasUnresolvedSpread:r}}function Zh(e,t){if(t.type==="Identifier"){let r=e.propLocalToPublicName.get(t.name);return r?{publicName:r,trackingName:t.name}:null}if(t.type!=="MemberExpression")return null;if(t.object.type!=="Identifier"||!e.wholePropsLocals.has(t.object.name))return null;let{property:n}=t,i;if(!t.computed&&n.type==="Identifier")i=n.name;else if(n.type==="Literal"&&n.value!=null)i=String(n.value);return i?{publicName:i,trackingName:i}:null}function ps(e){return e.type==="ChainExpression"?e.expression:e}function fl(e,t){let n=ps(t),i=Zh(e,n.callee);return i&&{...i,arguments:n.arguments}}function bn(e,{slot_name:t,slot_props:n,slot_props_unresolved_spread:i,slot_fallback:r,slot_description:s,slot_deprecated:a,slot_tags:o,slot_internal:l,source:p}){let c=Qe(t),u=e.slots.get(c);e.slots.set(c,{name:c,default:u?.default??c===Ye,fallback:r||void 0,slot_props:u?.slot_props??(n===""?void 0:n),slot_props_unresolved_spread:u?.slot_props_unresolved_spread||i,description:u?.description||s?.trim()||void 0,deprecated:u?.deprecated??a,tags:u?.tags||o,...u?.internal||l?{internal:!0}:{},source:p||u?.source})}var hl=/^@component/,em=/\r/g,tm=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function ml(e){return e&&"id"in e&&e.id&&"name"in e.id?e.id.name:void 0}function nm(e,t,n,i){let r=n.callee.type==="Identifier"?n.callee.name:void 0;if(r==="createEventDispatcher"){let s=ml(i);if(s!==void 0)t.dispatcherName=s,t.dispatcherDeclaratorNode=i;t.dispatcherTypeArgument=n.typeArguments?.params?.[0]}if(r==="$host"){let s=ml(i);if(s!==void 0)t.hostLocalNames.add(s)}if(r==="setContext")Ha(e,n,i?.type==="ExpressionStatement"?i:null);if(n.arguments.length>0){if(t.callsWithArguments.push(n),ui(e,n.callee))t.locallyBoundCalls.add(n)}if(r)t.callees.push({name:r,arguments:n.arguments,node:n,nestedBoundDetailNames:mn(e,n.arguments[1])});if(We(n.callee)&&b(n.callee.property)&&n.callee.property.name==="dispatchEvent"&&(me(n.callee.object,"$host")||b(n.callee.object)&&t.hostLocalNames.has(n.callee.object.name))){let s=Ka(e,n);if(s)t.hostDispatchedEventNames.add(s.name),t.hostDispatches.push(s)}}function im(e,t){let n=Array.isArray(t)?t[0]:t;if(n?.type==="Text")return{value:JSON.stringify(n.raw),replace:!1};if(n?.type==="ExpressionTag")return os(e,n.expression);return{value:void 0,replace:!1}}function rm(e,t){let n=t.attributes.find((p)=>("name"in p)&&p.name==="name"),i=n&&"value"in n?n.value:void 0,r=Array.isArray(i)?i[0]:void 0,s=r?.type==="Text"?r.data:void 0,a={},o=!1;for(let p of t.attributes){if(p.type==="SpreadAttribute"){let c=e.jsDocSlots.has(Qe(s));if(!as(e,a,p.expression,p,c))o=!0;continue}if(!("value"in p)||p.name==="name"||p.value===!0)continue;a[p.name]=im(e,p.value)}let l=t.fragment.nodes.map(({start:p,end:c})=>q(e,p,c)??"").join("").trim();e.renderedSlots.add(Qe(s)),bn(e,{slot_name:s,slot_props:a,slot_props_unresolved_spread:o||void 0,slot_fallback:l,source:C(e,t)})}function sm(e,t){let n=fl(e,t.expression);if(!n){let{callee:l}=ps(t.expression);if(We(l)&&b(l.object)&&e.wholePropsLocals.has(l.object.name))e.slotsUntracked=!0;return}let i=n.publicName==="children"?void 0:n.publicName,[r,...s]=n.arguments,a,o=!1;if(r===void 0)a={};else if(s.length===0&&r.type==="ObjectExpression"){let l=ls(e,r,e.jsDocSlots.has(Qe(i)));a=l.slot_props,o=l.hasUnresolvedSpread}if(e.renderedSlots.add(Qe(i)),a!==void 0)bn(e,{slot_name:i,slot_props:a,slot_props_unresolved_spread:o||void 0,source:C(e,t)});if(a!==void 0||e.slots.has(i??Ye))e.snippetPropLocals.add(n.trackingName)}function om(e,t,n){let i=t.name;if(t.expression!=null||!i)return;if(n==null||!("name"in n)||typeof n.name!=="string"||!n.name)return;let r=Pt(n.type)?{type:"InlineComponent",name:n.name}:{type:"Element",name:n.name};e.forwardedEvents.set(i,r);let s=e.events.get(i),a=e.eventDescriptions.get(i);if(!s)e.events.set(i,{type:"forwarded",name:i,element:r,description:a,deprecated:void 0,source:C(e,t)});else if(s.type==="forwarded"&&a&&!s.description)e.events.set(i,{...s,description:a,source:s.source||C(e,t)})}function am(e){let{expression:t}=e;if(t.type==="Identifier")return{name:t.name,indexed:!1};if(t.type!=="MemberExpression")return;let n=t;while(n.type==="MemberExpression")n=n.object;if(n.type!=="Identifier")return;let i=e.name==="this"&&t.computed&&t.object.type==="Identifier";return{name:n.name,indexed:i}}function lm(e,t,n,i){if(!n||!(pt(n.type)||Pt(n.type)))return;let r=am(t);if(!r)return;let s=ci(e,r.name);if(!s)return;e.reactive_vars.add(s);let a=t.expression.type==="MemberExpression";if(t.name!=="this"||a&&!r.indexed)return;if(!("name"in n)||typeof n.name!=="string")return;let o=r.indexed?"indexed":"direct",l=e.bindings.get(s)??{elements:[],components:[],target:o};if(l.target!==o)l.target="mixed";if(pt(n.type)){let p=n.name,c="tag"in n&&b(n.tag)?n.tag.name:void 0;if(!l.elements.some((f)=>f.tag===p&&f.namespace===i&&f.tagLocal===c))l.elements.push({tag:p,namespace:i,...c?{tagLocal:c}:{}})}else{let p=n.type==="Component"?sn(e,n.name):void 0;if(!p)return;if(!l.components.includes(n.name))l.components.push(n.name);e.additionalImportedTypes.set(n.name,{localName:n.name,...p})}e.bindings.set(s,l)}function yl(e){let t={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set};$a(e),e.activeScopes.push(e.componentScope);let n=Ia(e),i=new WeakMap,r=e.parsed?.options?.namespace,s=[r==="svg"||r==="mathml"?r:"html"],a=new Map,o={enter(l,p){if(li(l.type))return ie;let c=La(e,n,l);if(c)e.activeScopes.push(c);if(pt(l.type)){let u="name"in l?l.name:void 0,f=u==="svg"?"svg":u==="math"?"mathml":s[s.length-1];i.set(l,f),s.push(u==="foreignObject"?"html":f)}if(!tm.has(l.type))return;switch(l.type){case"AssignmentExpression":Yr(e,l.left);break;case"UpdateExpression":Yr(e,l.argument);break;case"CallExpression":nm(e,t,l,p);break;case"SpreadAttribute":{let u=l.expression.type==="Identifier"?l.expression.name:void 0,f=(u!==void 0&&!ht(e,u)?a.get(u):void 0)??u,h=e.restPropLocals.has(f??"");if(f==="$$restProps"||h)el(e,p,l);if((f==="$$props"||h)&&p&&Pt(p.type))e.slotsUntracked=!0;break}case"FunctionDeclaration":if(l.id?.name)e.funcDecls.set(l.id.name,l);break;case"ImportDeclaration":nn(e,l);break;case"VariableDeclaration":if(e.vars.add(l),p?.type==="Program"&&l.declarations.some((u)=>me(u.init,"$props")))cl(e,l);break;case"ExportNamedDeclaration":Qa(e,l,p?.type==="Program"?p:null);break;case"Comment":{let u=l.data.trim();if(hl.test(u))e.componentComment=u.replace(hl,"").replace(em,""),e.componentCommentSource=C(e,l);break}case"SlotElement":rm(e,l);break;case"RenderTag":sm(e,l);break;case"OnDirective":om(e,l,p);break;case"BindDirective":lm(e,l,p,(p&&i.get(p))??"html");break}},leave(l){if(pt(l.type))s.pop();if(Mt(l))e.activeScopes.pop(),Ra(n,l)}};if(e.parsed?.instance)z(e.parsed.instance,o);if(a=tl(e,e.parsed?.instance),e.parsed?.fragment)z(e.parsed.fragment,o);return t}var cs={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"},us="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",pm={5:us,"5module":us+" export import",6:us+" const class extends export import super"},vl=/^in(stanceof)?$/,cm=/\p{ID_Start}/u,um=/[\p{ID_Continue}\u200c\u200d]/u;function be(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e>65535&&t===!1)return!1;return e>=170&&cm.test(String.fromCodePoint(e))}function Fe(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e>65535&&t===!1)return!1;return e>=170&&um.test(String.fromCodePoint(e))}var N=function(e,t){if(t===void 0)t={};this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function le(e,t){return new N(e,{beforeExpr:!0,binop:t})}var pe={beforeExpr:!0},Q={startsExpr:!0},ms={};function P(e,t){if(t===void 0)t={};return t.keyword=e,ms[e]=new N(e,t)}var d={num:new N("num",Q),regexp:new N("regexp",Q),string:new N("string",Q),name:new N("name",Q),privateId:new N("privateId",Q),eof:new N("eof"),bracketL:new N("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new N("]"),braceL:new N("{",{beforeExpr:!0,startsExpr:!0}),braceR:new N("}"),parenL:new N("(",{beforeExpr:!0,startsExpr:!0}),parenR:new N(")"),comma:new N(",",pe),semi:new N(";",pe),colon:new N(":",pe),dot:new N("."),question:new N("?",pe),questionDot:new N("?."),arrow:new N("=>",pe),template:new N("template"),invalidTemplate:new N("invalidTemplate"),ellipsis:new N("...",pe),backQuote:new N("`",Q),dollarBraceL:new N("${",{beforeExpr:!0,startsExpr:!0}),eq:new N("=",{beforeExpr:!0,isAssign:!0}),assign:new N("_=",{beforeExpr:!0,isAssign:!0}),incDec:new N("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new N("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:le("||",1),logicalAND:le("&&",2),bitwiseOR:le("|",3),bitwiseXOR:le("^",4),bitwiseAND:le("&",5),equality:le("==/!=/===/!==",6),relational:le("</>/<=/>=",7),bitShift:le("<</>>/>>>",8),plusMin:new N("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:le("%",10),star:le("*",10),slash:le("/",10),starstar:new N("**",{beforeExpr:!0}),coalesce:le("??",1),_break:P("break"),_case:P("case",pe),_catch:P("catch"),_continue:P("continue"),_debugger:P("debugger"),_default:P("default",pe),_do:P("do",{isLoop:!0,beforeExpr:!0}),_else:P("else",pe),_finally:P("finally"),_for:P("for",{isLoop:!0}),_function:P("function",Q),_if:P("if"),_return:P("return",pe),_switch:P("switch"),_throw:P("throw",pe),_try:P("try"),_var:P("var"),_const:P("const"),_while:P("while",{isLoop:!0}),_with:P("with"),_new:P("new",{beforeExpr:!0,startsExpr:!0}),_this:P("this",Q),_super:P("super",Q),_class:P("class",Q),_extends:P("extends",pe),_export:P("export"),_import:P("import",Q),_null:P("null",Q),_true:P("true",Q),_false:P("false",Q),_in:P("in",{beforeExpr:!0,binop:7}),_instanceof:P("instanceof",{beforeExpr:!0,binop:7}),_typeof:P("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:P("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:P("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Z=/\r\n?|\n|\u2028|\u2029/,dm=new RegExp(Z.source,"g");function Ot(e){return e===10||e===13||e===8232||e===8233}function Sl(e,t,n){if(n===void 0)n=e.length;for(var i=t;i<n;i++){var r=e.charCodeAt(i);if(Ot(r))return i<n-1&&r===13&&e.charCodeAt(i+1)===10?i+2:i+1}return-1}var Tl=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,V=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,fm=Object.prototype,{hasOwnProperty:hm,toString:mm}=fm,Tn=Object.hasOwn||function(e,t){return hm.call(e,t)},gl=Array.isArray||function(e){return mm.call(e)==="[object Array]"},xl=Object.create(null);function yi(e){return xl[e]||(xl[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function bi(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var ym=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Sn=function(e,t){this.line=e,this.column=t};Sn.prototype.offset=function(e){return new Sn(this.line,this.column+e)};var vi=function(e,t,n){if(this.start=t,this.end=n,e.sourceFile!==null)this.source=e.sourceFile};function Cl(e,t){for(var n=1,i=0;;){var r=Sl(e,i,t);if(r<0)return new Sn(n,t-i);++n,i=r}}var ds={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},El=!1;function gm(e){var t={};for(var n in ds)t[n]=e&&Tn(e,n)?e[n]:ds[n];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!El&&typeof console==="object"&&console.warn)El=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
32
+ Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(gl(t.onToken)){var i=t.onToken;t.onToken=function(r){return i.push(r)}}if(gl(t.onComment))t.onComment=xm(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function xm(e,t){return function(n,i,r,s,a,o){var l={type:n?"Block":"Line",value:i,start:r,end:s};if(e.locations)l.loc=new vi(this,a,o);if(e.ranges)l.range=[r,s];t.push(l)}}var mt=1,yt=2,ys=4,kl=8,gs=16,wl=32,Si=64,Al=128,gt=256,Cn=512,Pl=1024,Ti=mt|yt|gt;function xs(e,t){return yt|(e?ys:0)|(t?kl:0)}var gi=0,Es=1,je=2,_l=3,Dl=4,Nl=5,B=function(e,t,n){this.options=e=gm(e),this.sourceFile=e.sourceFile,this.keywords=yi(pm[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var i="";if(e.allowReserved!==!0){if(i=cs[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType==="module")i+=" await"}this.reservedWords=yi(i);var r=(i?i+" ":"")+cs.strict;if(this.reservedWordsStrict=yi(r),this.reservedWordsStrictBind=yi(r+" "+cs.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation)this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
33
+ `,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Z).length}else this.lineStart=0;if(this.type=d.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=e.sourceType==="module",this.strict=this.inModule||e.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&&e.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?yt:mt),this.regexpState=null,this.privateNameStack=[]},ce={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}};B.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})};ce.inFunction.get=function(){return(this.currentVarScope().flags&yt)>0};ce.inGenerator.get=function(){return(this.currentVarScope().flags&kl)>0};ce.inAsync.get=function(){return(this.currentVarScope().flags&ys)>0};ce.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(gt|Cn))return!1;if(n&yt)return(n&ys)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};ce.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&mt)return!0;return!1};ce.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Si)>0||this.options.allowSuperOutsideMethod};ce.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Al)>0};ce.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};ce.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(gt|Cn)||n&yt&&!(n&gs))return!0}return!1};ce.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Pl)return!1;if(!this.inModule&&t&mt)return!1;return!0};ce.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&gt)>0};B.extend=function(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var n=this;for(var i=0;i<e.length;i++)n=e[i](n);return n};B.parse=function(e,t){return new this(t,e).parse()};B.parseExpressionAt=function(e,t,n){var i=new this(n,e,t);return i.nextToken(),i.parseExpression()};B.tokenizer=function(e,t){return new this(t,e)};Object.defineProperties(B.prototype,ce);var U=B.prototype,Em=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;U.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){V.lastIndex=e,e+=V.exec(this.input)[0].length;var t=Em.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){V.lastIndex=e+t[0].length;var n=V.exec(this.input),i=n.index+n[0].length,r=this.input.charAt(i);return r===";"||r==="}"||Z.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(i+1)==="=")}if(e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";")e++}};U.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};U.isContextual=function(e){return this.type===d.name&&this.value===e&&!this.containsEsc};U.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};U.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};U.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};U.canInsertSemicolon=function(){return this.type===d.eof||this.type===d.braceR||Z.test(this.input.slice(this.lastTokEnd,this.start))};U.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};U.semicolon=function(){if(!this.eat(d.semi)&&!this.insertSemicolon())this.unexpected()};U.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};U.expect=function(e){this.eat(e)||this.unexpected()};U.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var Ci=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};U.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;if(n>-1)this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")};U.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:n,doubleProto:i}=e;if(!t)return n>=0||i>=0;if(n>=0)this.raise(n,"Shorthand property assignments are valid only in destructuring patterns");if(i>=0)this.raiseRecoverable(i,"Redefinition of __proto__ property")};U.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")};U.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var x=B.prototype;x.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==d.eof){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var i=0,r=Object.keys(this.undefinedExports);i<r.length;i+=1){var s=r[i];this.raiseRecoverable(this.undefinedExports[s].start,"Export '"+s+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var bs={kind:"loop"},bm={kind:"switch"};x.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;V.lastIndex=this.pos;var t=V.exec(this.input),n=this.pos+t[0].length,i=this.fullCharCodeAt(n);if(i===91||i===92)return!0;if(e)return!1;if(i===123)return!0;if(be(i)){var r=n;do n+=i<=65535?1:2;while(Fe(i=this.fullCharCodeAt(n)));if(i===92)return!0;var s=this.input.slice(r,n);if(!vl.test(s))return!0}return!1};x.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,n;return!Z.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Fe(n=this.fullCharCodeAt(t+8))||n===92))};x.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;V.lastIndex=this.pos;var n=V.exec(this.input),i=this.pos+n[0].length;if(Z.test(this.input.slice(this.pos,i)))return!1;if(e){var r=i+5,s;if(this.input.slice(i,r)!=="using"||r===this.input.length||Fe(s=this.fullCharCodeAt(r))||s===92)return!1;V.lastIndex=r;var a=V.exec(this.input);if(i=r+a[0].length,a&&Z.test(this.input.slice(r,i)))return!1}var o=this.fullCharCodeAt(i);if(!be(o)&&o!==92)return!1;var l=i;do i+=o<=65535?1:2;while(Fe(o=this.fullCharCodeAt(i)));if(o===92)return!0;var p=this.input.slice(l,i);if(vl.test(p))return!1;if(t&&!e&&p==="of"){V.lastIndex=i;var c=V.exec(this.input);if(i=i+c[0].length,this.input.charCodeAt(i)!==61||(o=this.input.charCodeAt(i+1))===61||o===62)return!1}return!0};x.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};x.isUsing=function(e){return this.isUsingKeyword(!1,e)};x.parseStatement=function(e,t,n){var i=this.type,r=this.startNode(),s;if(this.isLet(e))i=d._var,s="let";switch(i){case d._break:case d._continue:return this.parseBreakContinueStatement(r,i.keyword);case d._debugger:return this.parseDebuggerStatement(r);case d._do:return this.parseDoStatement(r);case d._for:return this.parseForStatement(r);case d._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(r,!1,!e);case d._class:if(e)this.unexpected();return this.parseClass(r,!0);case d._if:return this.parseIfStatement(r);case d._return:return this.parseReturnStatement(r);case d._switch:return this.parseSwitchStatement(r);case d._throw:return this.parseThrowStatement(r);case d._try:return this.parseTryStatement(r);case d._const:case d._var:if(s=s||this.value,e&&s!=="var")this.unexpected();return this.parseVarStatement(r,s);case d._while:return this.parseWhileStatement(r);case d._with:return this.parseWithStatement(r);case d.braceL:return this.parseBlock(!0,r);case d.semi:return this.parseEmptyStatement(r);case d._export:case d._import:if(this.options.ecmaVersion>10&&i===d._import){V.lastIndex=this.pos;var a=V.exec(this.input),o=this.pos+a[0].length,l=this.input.charCodeAt(o);if(l===40||l===46)return this.parseExpressionStatement(r,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)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 i===d._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(r,!0,!e)}var p=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(p){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(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(r,!1,p),this.semicolon(),this.finishNode(r,"VariableDeclaration")}var c=this.value,u=this.parseExpression();if(i===d.name&&u.type==="Identifier"&&this.eat(d.colon))return this.parseLabeledStatement(r,c,u,e);else return this.parseExpressionStatement(r,u)}};x.parseBreakContinueStatement=function(e,t){var n=t==="break";if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.label=null;else if(this.type!==d.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var i=0;for(;i<this.labels.length;++i){var r=this.labels[i];if(e.label==null||r.name===e.label.name){if(r.kind!=null&&(n||r.kind==="loop"))break;if(e.label&&n)break}}if(i===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,n?"BreakStatement":"ContinueStatement")};x.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};x.parseDoStatement=function(e){if(this.next(),this.labels.push(bs),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(d._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(d.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};x.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(bs),this.enterScope(0),this.expect(d.parenL),this.type===d.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var n=this.isLet();if(this.type===d._var||this.type===d._const||n){var i=this.startNode(),r=n?"let":this.value;return this.next(),this.parseVar(i,!0,r),this.finishNode(i,"VariableDeclaration"),this.parseForAfterInit(e,i,t)}var s=this.isContextual("let"),a=!1,o=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(o){var l=this.startNode();if(this.next(),o==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(l,!0,o),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var p=this.containsEsc,c=new Ci,u=this.start,f=t>-1?this.parseExprSubscripts(c,"await"):this.parseExpression(!0,c);if(this.type===d._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===d._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(f.start===u&&!p&&f.type==="Identifier"&&f.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(s&&a)this.raise(f.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(f,!1,c),this.checkLValPattern(f),this.parseForIn(e,f)}else this.checkExpressionErrors(c,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,f)};x.parseForAfterInit=function(e,t,n){if((this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===d._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&n>-1)this.unexpected(n)}else if(this.options.ecmaVersion>=9)e.await=n>-1;return this.parseForIn(e,t)}if(n>-1)this.unexpected(n);return this.parseFor(e,t)};x.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,vn|(n?0:fs),!1,t)};x.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(d._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};x.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};x.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(d.braceL),this.labels.push(bm),this.enterScope(Pl);var t;for(var n=!1;this.type!==d.braceR;)if(this.type===d._case||this.type===d._default){var i=this.type===d._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i)t.test=this.parseExpression();else{if(n)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");n=!0,t.test=null}this.expect(d.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};x.parseThrowStatement=function(e){if(this.next(),Z.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var vm=[];x.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?wl:0),this.checkLValPattern(e,t?Dl:je),this.expect(d.parenR),e};x.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===d._catch){var t=this.startNode();if(this.next(),this.eat(d.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(d._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};x.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};x.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(bs),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};x.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};x.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};x.parseLabeledStatement=function(e,t,n,i){for(var r=0,s=this.labels;r<s.length;r+=1){var a=s[r];if(a.name===t)this.raise(n.start,"Label '"+t+"' is already declared")}var o=this.type.isLoop?"loop":this.type===d._switch?"switch":null;for(var l=this.labels.length-1;l>=0;l--){var p=this.labels[l];if(p.statementStart===e.start)p.statementStart=this.start,p.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(i?i.indexOf("label")===-1?i+"label":i:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};x.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};x.parseBlock=function(e,t,n){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(d.braceL),e)this.enterScope(0);while(this.type!==d.braceR){var i=this.parseStatement(null);t.body.push(i)}if(n)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};x.parseFor=function(e,t){return e.init=t,this.expect(d.semi),e.test=this.type===d.semi?null:this.parseExpression(),this.expect(d.semi),e.update=this.type===d.parenR?null:this.parseExpression(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};x.parseForIn=function(e,t){var n=this.type===d._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};x.parseVar=function(e,t,n,i){e.declarations=[],e.kind=n;for(;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(d.eq))r.init=this.parseMaybeAssign(t);else if(!i&&n==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!i&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==d._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration");else if(!i&&r.id.type!=="Identifier"&&!(t&&(this.type===d._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else r.init=null;if(e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(d.comma))break}return e};x.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Es:je,!1)};var vn=1,fs=2,$l=4;x.parseFunction=function(e,t,n,i,r){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!i){if(this.type===d.star&&t&fs)this.unexpected();e.generator=this.eat(d.star)}if(this.options.ecmaVersion>=8)e.async=!!i;if(t&vn){if(e.id=t&$l&&this.type!==d.name?null:this.parseIdent(),e.id&&!(t&fs))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Es:je:_l)}var s=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xs(e.async,e.generator)),!(t&vn))e.id=this.type===d.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,r),this.yieldPos=s,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&vn?"FunctionDeclaration":"FunctionExpression")};x.parseFunctionParams=function(e){this.expect(d.parenL),e.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};x.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var i=this.enterClassBody(),r=this.startNode(),s=!1;r.body=[],this.expect(d.braceL);while(this.type!==d.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(r.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(s)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");s=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&Sm(i,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared")}}return this.strict=n,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};x.parseClassElement=function(e){if(this.eat(d.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),i="",r=!1,s=!1,a="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(d.braceL))return this.parseClassStaticBlock(n),n;if(this.isClassElementNameStart()||this.type===d.star)o=!0;else i="static"}if(n.static=o,!i&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===d.star)&&!this.canInsertSemicolon())s=!0;else i="async";if(!i&&(t>=9||!s)&&this.eat(d.star))r=!0;if(!i&&!s&&!r){var l=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=l;else i=l}if(i)n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=i,this.finishNode(n.key,"Identifier");else this.parseClassElementName(n);if(t<13||this.type===d.parenL||a!=="method"||r||s){var p=!n.static&&xi(n,"constructor"),c=p&&e;if(p&&a!=="method")this.raise(n.key.start,"Constructor can't have get/set modifier");n.kind=p?"constructor":a,this.parseClassMethod(n,r,s,c)}else this.parseClassField(n);return n};x.isClassElementNameStart=function(){return this.type===d.name||this.type===d.privateId||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword};x.parseClassElementName=function(e){if(this.type===d.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};x.parseClassMethod=function(e,t,n,i){var r=e.key;if(e.kind==="constructor"){if(t)this.raise(r.start,"Constructor can't be a generator");if(n)this.raise(r.start,"Constructor can't be an async method")}else if(e.static&&xi(e,"prototype"))this.raise(r.start,"Classes may not have a static property named prototype");var s=e.value=this.parseMethod(t,n,i);if(e.kind==="get"&&s.params.length!==0)this.raiseRecoverable(s.start,"getter should have no params");if(e.kind==="set"&&s.params.length!==1)this.raiseRecoverable(s.start,"setter should have exactly one param");if(e.kind==="set"&&s.params[0].type==="RestElement")this.raiseRecoverable(s.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};x.parseClassField=function(e){if(xi(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&xi(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(d.eq))this.enterScope(Cn|Si),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};x.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(gt|Si);while(this.type!==d.braceR){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};x.parseClassId=function(e,t){if(this.type===d.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,je,!1)}else{if(t===!0)this.unexpected();e.id=null}};x.parseClassSuper=function(e){e.superClass=this.eat(d._extends)?this.parseExprSubscripts(null,!1):null};x.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};x.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:n}=e;if(!this.options.checkPrivateFields)return;var i=this.privateNameStack.length,r=i===0?null:this.privateNameStack[i-1];for(var s=0;s<n.length;++s){var a=n[s];if(!Tn(t,a.name))if(r)r.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function Sm(e,t){var n=t.key.name,i=e[n],r="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))r=(t.static?"s":"i")+t.kind;if(i==="iget"&&r==="iset"||i==="iset"&&r==="iget"||i==="sget"&&r==="sset"||i==="sset"&&r==="sget")return e[n]="true",!1;else if(!i)return e[n]=r,!1;else return!0}function xi(e,t){var{computed:n,key:i}=e;return!n&&(i.type==="Identifier"&&i.name===t||i.type==="Literal"&&i.value===t)}x.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};x.parseExport=function(e,t){if(this.next(),this.eat(d.star))return this.parseExportAllDeclaration(e,t);if(this.eat(d._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var n=0,i=e.specifiers;n<i.length;n+=1){var r=i[n];if(this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal")this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};x.parseExportDeclaration=function(e){return this.parseStatement(null)};x.parseExportDefaultDeclaration=function(){var e;if(this.type===d._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,vn|$l,!1,e)}else if(this.type===d._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var i=this.parseMaybeAssign();return this.semicolon(),i}};x.checkExport=function(e,t,n){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(Tn(e,t))this.raiseRecoverable(n,"Duplicate export '"+t+"'");e[t]=!0};x.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var i=0,r=t.properties;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s)}else if(n==="ArrayPattern")for(var a=0,o=t.elements;a<o.length;a+=1){var l=o[a];if(l)this.checkPatternExport(e,l)}else if(n==="Property")this.checkPatternExport(e,t.value);else if(n==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(n==="RestElement")this.checkPatternExport(e,t.argument)};x.checkVariableExport=function(e,t){if(!e)return;for(var n=0,i=t;n<i.length;n+=1){var r=i[n];this.checkPatternExport(e,r.id)}};x.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};x.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};x.parseExportSpecifiers=function(e){var t=[],n=!0;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!n){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else n=!1;t.push(this.parseExportSpecifier(e))}return t};x.parseImport=function(e){if(this.next(),this.type===d.string)e.specifiers=vm,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===d.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};x.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,je),this.finishNode(e,"ImportSpecifier")};x.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,je),this.finishNode(e,"ImportDefaultSpecifier")};x.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,je),this.finishNode(e,"ImportNamespaceSpecifier")};x.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===d.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(d.comma))return e}if(this.type===d.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!t){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};x.parseWithClause=function(){var e=[];if(!this.eat(d._with))return e;this.expect(d.braceL);var t={},n=!0;while(!this.eat(d.braceR)){if(!n){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else n=!1;var i=this.parseImportAttribute(),r=i.key.type==="Identifier"?i.key.name:i.key.value;if(Tn(t,r))this.raiseRecoverable(i.key.start,"Duplicate attribute key '"+r+"'");t[r]=!0,e.push(i)}return e};x.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(d.colon),this.type!==d.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};x.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===d.string){var e=this.parseLiteral(this.value);if(ym.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};x.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};x.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var ue=B.prototype;ue.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",n)this.checkPatternErrors(n,!0);for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];if(this.toAssignable(s,t),s.type==="RestElement"&&(s.argument.type==="ArrayPattern"||s.argument.type==="ObjectPattern"))this.raise(s.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",n)this.checkPatternErrors(n,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(n)this.checkPatternErrors(n,!0);return e};ue.toAssignableList=function(e,t){var n=e.length;for(var i=0;i<n;i++){var r=e[i];if(r)this.toAssignable(r,t)}if(n){var s=e[n-1];if(this.options.ecmaVersion===6&&t&&s&&s.type==="RestElement"&&s.argument.type!=="Identifier")this.unexpected(s.argument.start)}return e};ue.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};ue.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==d.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};ue.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case d.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(d.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case d.braceL:return this.parseObj(!0)}return this.parseIdent()};ue.parseBindingList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(s)s=!1;else this.expect(d.comma);if(t&&this.type===d.comma)r.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===d.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),r.push(a),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else r.push(this.parseAssignableListItem(i))}return r};ue.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};ue.parseBindingListItem=function(e){return e};ue.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(d.eq))return n;var i=this.startNodeAt(e,t);return i.left=n,i.right=this.parseMaybeAssign(),this.finishNode(i,"AssignmentPattern")};ue.checkLValSimple=function(e,t,n){if(t===void 0)t=gi;var i=t!==gi;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(i?"Binding ":"Assigning to ")+e.name+" in strict mode");if(i){if(t===je&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(n){if(Tn(n,e.name))this.raiseRecoverable(e.start,"Argument name clash");n[e.name]=!0}if(t!==Nl)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(i)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(i)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(i?"Binding":"Assigning to")+" rvalue")}};ue.checkLValPattern=function(e,t,n){if(t===void 0)t=gi;switch(e.type){case"ObjectPattern":for(var i=0,r=e.properties;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,t,n)}break;case"ArrayPattern":for(var a=0,o=e.elements;a<o.length;a+=1){var l=o[a];if(l)this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};ue.checkLValInnerPattern=function(e,t,n){if(t===void 0)t=gi;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ee=function(e,t,n,i,r){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=i,this.generator=!!r},M={b_stat:new Ee("{",!1),b_expr:new Ee("{",!0),b_tmpl:new Ee("${",!1),p_stat:new Ee("(",!1),p_expr:new Ee("(",!0),q_tmpl:new Ee("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ee("function",!1),f_expr:new Ee("function",!0),f_expr_gen:new Ee("function",!0,!1,null,!0),f_gen:new Ee("function",!1,!1,null,!0)},Bt=B.prototype;Bt.initialContext=function(){return[M.b_stat]};Bt.curContext=function(){return this.context[this.context.length-1]};Bt.braceIsBlock=function(e){var t=this.curContext();if(t===M.f_expr||t===M.f_stat)return!0;if(e===d.colon&&(t===M.b_stat||t===M.b_expr))return!t.isExpr;if(e===d._return||e===d.name&&this.exprAllowed)return Z.test(this.input.slice(this.lastTokEnd,this.start));if(e===d._else||e===d.semi||e===d.eof||e===d.parenR||e===d.arrow)return!0;if(e===d.braceL)return t===M.b_stat;if(e===d._var||e===d._const||e===d.name)return!1;return!this.exprAllowed};Bt.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};Bt.updateContext=function(e){var t,n=this.type;if(n.keyword&&e===d.dot)this.exprAllowed=!1;else if(t=n.updateContext)t.call(this,e);else this.exprAllowed=n.beforeExpr};Bt.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===M.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};d.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?M.b_stat:M.b_expr),this.exprAllowed=!0};d.dollarBraceL.updateContext=function(){this.context.push(M.b_tmpl),this.exprAllowed=!0};d.parenL.updateContext=function(e){var t=e===d._if||e===d._for||e===d._with||e===d._while;this.context.push(t?M.p_stat:M.p_expr),this.exprAllowed=!0};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(e){if(e.beforeExpr&&e!==d._else&&!(e===d.semi&&this.curContext()!==M.p_stat)&&!(e===d._return&&Z.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===d.colon||e===d.braceL)&&this.curContext()===M.b_stat))this.context.push(M.f_expr);else this.context.push(M.f_stat);this.exprAllowed=!1};d.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};d.backQuote.updateContext=function(){if(this.curContext()===M.q_tmpl)this.context.pop();else this.context.push(M.q_tmpl);this.exprAllowed=!1};d.star.updateContext=function(e){if(e===d._function){var t=this.context.length-1;if(this.context[t]===M.f_expr)this.context[t]=M.f_expr_gen;else this.context[t]=M.f_gen}this.exprAllowed=!0};d.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==d.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var T=B.prototype;T.checkPropClash=function(e,t,n){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var i=e.key,r;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var s=e.kind;if(this.options.ecmaVersion>=6){if(r==="__proto__"&&s==="init"){if(t.proto)if(n){if(n.doubleProto<0)n.doubleProto=i.start}else this.raiseRecoverable(i.start,"Redefinition of __proto__ property");t.proto=!0}return}r="$"+r;var a=t[r];if(a){var o;if(s==="init")o=this.strict&&a.init||a.get||a.set;else o=a.init||a[s];if(o)this.raiseRecoverable(i.start,"Redefinition of property")}else a=t[r]={init:!1,get:!1,set:!1};a[s]=!0};T.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var{start:i,startLoc:r}=n,s=n.parseMaybeAssign(e,t);if(n.type===d.comma){var a=n.startNodeAt(i,r);a.expressions=[s];while(n.eat(d.comma))a.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(a,"SequenceExpression")}return s})};T.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var i=!1,r=-1,s=-1,a=-1;if(t)r=t.parenthesizedAssign,s=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new Ci,i=!0;var o=this.start,l=this.startLoc;if(this.type===d.parenL||this.type===d.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var p=this.parseMaybeConditional(e,t);if(n)p=n.call(this,p,o,l);if(this.type.isAssign){var c=this.startNodeAt(o,l);if(c.operator=this.value,this.type===d.eq)p=this.toAssignable(p,!1,t);if(!i)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=p.start)t.shorthandAssign=-1;if(this.type===d.eq)this.checkLValPattern(p);else this.checkLValSimple(p);if(c.left=p,this.next(),c.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(c,"AssignmentExpression")}else if(i)this.checkExpressionErrors(t,!0);if(r>-1)t.parenthesizedAssign=r;if(s>-1)t.trailingComma=s;return p};T.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===n)&&this.eat(d.question)){var s=this.startNodeAt(n,i);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(d.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return r};T.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return r;return r.start===n&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,n,i,-1,e)};T.parseExprOp=function(e,t,n,i,r){var s=this.type.binop;if(s!=null&&(!r||this.type!==d._in)){if(s>i){var a=this.type===d.logicalOR||this.type===d.logicalAND,o=this.type===d.coalesce;if(o)s=d.logicalAND.binop;var l=this.value;this.next();var p=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),p,c,s,r),f=this.buildBinary(t,n,e,u,l,a||o);if(a&&this.type===d.coalesce||o&&(this.type===d.logicalOR||this.type===d.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(f,t,n,i,r)}}return e};T.buildBinary=function(e,t,n,i,r,s){if(i.type==="PrivateIdentifier")this.raise(i.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=r,a.right=i,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")};T.parseMaybeUnary=function(e,t,n,i){var r=this.start,s=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(i),t=!0;else if(this.type.prefix){var o=this.startNode(),l=this.type===d.incDec;if(o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,l,i),this.checkExpressionErrors(e,!0),l)this.checkLValSimple(o.argument);else if(this.strict&&o.operator==="delete"&&Il(o.argument))this.raiseRecoverable(o.start,"Deleting local variable in strict mode");else if(o.operator==="delete"&&hs(o.argument))this.raiseRecoverable(o.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(o,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===d.privateId){if((i||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==d._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,i),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var p=this.startNodeAt(r,s);p.operator=this.value,p.prefix=!1,p.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(p,"UpdateExpression")}}if(!n&&!(a.type==="ArrowFunctionExpression"&&a.start===r)&&this.eat(d.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(r,s,a,this.parseMaybeUnary(null,!1,!1,i),"**",!1);else return a};function Il(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Il(e.expression)}function hs(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&hs(e.expression)||e.type==="ParenthesizedExpression"&&hs(e.expression)}T.parseExprSubscripts=function(e,t){var n=this.start,i=this.startLoc,r=this.parseExprAtom(e,t);if(r.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return r;var s=this.parseSubscripts(r,n,i,!1,t);if(e&&s.type==="MemberExpression"){if(e.parenthesizedAssign>=s.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=s.start)e.parenthesizedBind=-1;if(e.trailingComma>=s.start)e.trailingComma=-1}return s};T.parseSubscripts=function(e,t,n,i,r){var s=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;while(!0){var o=this.parseSubscript(e,t,n,i,s,a,r);if(o.optional)a=!0;if(o===e||o.type==="ArrowFunctionExpression"){if(a){var l=this.startNodeAt(t,n);l.expression=o,o=this.finishNode(l,"ChainExpression")}return o}e=o}};T.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(d.arrow)};T.parseSubscriptAsyncArrow=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,i)};T.parseSubscript=function(e,t,n,i,r,s,a){var o=this.options.ecmaVersion>=11,l=o&&this.eat(d.questionDot);if(i&&l)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var p=this.eat(d.bracketL);if(p||l&&this.type!==d.parenL&&this.type!==d.backQuote||this.eat(d.dot)){var c=this.startNodeAt(t,n);if(c.object=e,p)c.property=this.parseExpression(),this.expect(d.bracketR);else if(this.type===d.privateId&&e.type!=="Super")c.property=this.parsePrivateIdent();else c.property=this.parseIdent(this.options.allowReserved!=="never");if(c.computed=!!p,o)c.optional=l;e=this.finishNode(c,"MemberExpression")}else if(!i&&this.eat(d.parenL)){var u=new Ci,f=this.yieldPos,h=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1,u);if(r&&!l&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=f,this.awaitPos=h,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,g,a)}this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var y=this.startNodeAt(t,n);if(y.callee=e,y.arguments=g,o)y.optional=l;e=this.finishNode(y,"CallExpression")}else if(this.type===d.backQuote){if(l||s)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,"TaggedTemplateExpression")}return e};T.parseExprAtom=function(e,t,n){if(this.type===d.slash)this.readRegexp();var i,r=this.potentialArrowAt===this.start;switch(this.type){case d._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(i=this.startNode(),this.next(),this.type===d.parenL&&!this.allowDirectSuper)this.raise(i.start,"super() call outside constructor of a subclass");if(this.type!==d.dot&&this.type!==d.bracketL&&this.type!==d.parenL)this.unexpected();return this.finishNode(i,"Super");case d._this:return i=this.startNode(),this.next(),this.finishNode(i,"ThisExpression");case d.name:var s=this.start,a=this.startLoc,o=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function))return this.overrideContext(M.f_expr),this.parseFunction(this.startNodeAt(s,a),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(d.arrow))return this.parseArrowExpression(this.startNodeAt(s,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===d.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(l=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(d.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(s,a),[l],!0,t)}}return l;case d.regexp:var p=this.value;return i=this.parseLiteral(p.value),i.regex={pattern:p.pattern,flags:p.flags},i;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:return i=this.startNode(),i.value=this.type===d._null?null:this.type===d._true,i.raw=this.type.keyword,this.next(),this.finishNode(i,"Literal");case d.parenL:var c=this.start,u=this.parseParenAndDistinguishExpression(r,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u))e.parenthesizedAssign=c;if(e.parenthesizedBind<0)e.parenthesizedBind=c}return u;case d.bracketL:return i=this.startNode(),this.next(),i.elements=this.parseExprList(d.bracketR,!0,!0,e),this.finishNode(i,"ArrayExpression");case d.braceL:return this.overrideContext(M.b_expr),this.parseObj(!1,e);case d._function:return i=this.startNode(),this.next(),this.parseFunction(i,0);case d._class:return this.parseClass(this.startNode(),!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(n);else return this.unexpected();default:return this.parseExprAtomDefault()}};T.parseExprAtomDefault=function(){this.unexpected()};T.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===d.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===d.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};T.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(d.parenR))if(this.expect(d.comma),!this.afterTrailingComma(d.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(d.parenR)){if(this.expect(d.comma),!this.afterTrailingComma(d.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(d.parenR)){var t=this.start;if(this.eat(d.comma)&&this.eat(d.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};T.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};T.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};T.parseParenExpression=function(){this.expect(d.parenL);var e=this.parseExpression();return this.expect(d.parenR),e};T.shouldParseArrow=function(e){return!this.canInsertSemicolon()};T.parseParenAndDistinguishExpression=function(e,t){var n=this.start,i=this.startLoc,r,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,o=this.startLoc,l=[],p=!0,c=!1,u=new Ci,f=this.yieldPos,h=this.awaitPos,m;this.yieldPos=0,this.awaitPos=0;while(this.type!==d.parenR)if(p?p=!1:this.expect(d.comma),s&&this.afterTrailingComma(d.parenR,!0)){c=!0;break}else if(this.type===d.ellipsis){if(m=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,u,this.parseParenItem));var g=this.lastTokEnd,y=this.lastTokEndLoc;if(this.expect(d.parenR),e&&this.shouldParseArrow(l)&&this.eat(d.arrow))return this.checkPatternErrors(u,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=h,this.parseParenArrowList(n,i,l,t);if(!l.length||c)this.unexpected(this.lastTokStart);if(m)this.unexpected(m);if(this.checkExpressionErrors(u,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=h||this.awaitPos,l.length>1)r=this.startNodeAt(a,o),r.expressions=l,this.finishNodeAt(r,"SequenceExpression",g,y);else r=l[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,i);return _.expression=r,this.finishNode(_,"ParenthesizedExpression")}else return r};T.parseParenItem=function(e){return e};T.parseParenArrowList=function(e,t,n,i){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,i)};var Tm=[];T.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===d.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(n)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var i=this.start,r=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),i,r,!0,!1),e.callee.type==="Super")this.raiseRecoverable(i,"Invalid use of 'super'");if(this.eat(d.parenL))e.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Tm;return this.finishNode(e,"NewExpression")};T.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();if(this.type===d.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");n.value={raw:this.value.replace(/\r\n?/g,`
34
34
  `),cooked:null}}else n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
35
- `),cooked:this.value};return this.next(),n.tail=this.type===d.backQuote,this.finishNode(n,"TemplateElement")};T.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});n.quasis=[i];while(!i.tail){if(this.type===d.eof)this.raise(this.pos,"Unterminated template literal");this.expect(d.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(d.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};T.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!Z.test(this.input.slice(this.lastTokEnd,this.start))};T.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};n.properties=[],this.next();while(!this.eat(d.braceR)){if(!i){if(this.expect(d.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR))break}else i=!1;var s=this.parseProperty(e,t);if(!e)this.checkPropClash(s,r,t);n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};T.parseProperty=function(e,t){var n=this.startNode(),i,r,s,l;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===d.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)s=this.start,l=this.startLoc;if(!e)i=this.eat(d.star)}var o=this.containsEsc;if(this.parsePropertyName(n),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n))r=!0,i=this.options.ecmaVersion>=9&&this.eat(d.star),this.parsePropertyName(n);else r=!1;return this.parsePropertyValue(n,e,i,r,s,l,t,o),this.finishNode(n,"Property")};T.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var i=e.value.start;if(e.kind==="get")this.raiseRecoverable(i,"getter should have no params");else this.raiseRecoverable(i,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};T.parsePropertyValue=function(e,t,n,i,r,s,l,o){if((n||i)&&this.type===d.colon)this.unexpected();if(this.eat(d.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,l),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===d.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,i),e.kind="init"}else if(!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==d.comma&&this.type!==d.braceR&&this.type!==d.eq)){if(n||i)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||i)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=r;if(t)e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key));else if(this.type===d.eq&&l){if(l.shorthandAssign<0)l.shorthandAssign=this.start;e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};T.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(d.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(d.bracketR),e.key;else e.computed=!1;return e.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};T.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};T.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,l=this.awaitIdentPos;if(this.initFunction(i),this.options.ecmaVersion>=6)i.generator=e;if(this.options.ecmaVersion>=8)i.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ys(t,i.generator)|vi|(n?Cl:0)),this.expect(d.parenL),i.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=l,this.finishNode(i,"FunctionExpression")};T.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,l=this.awaitIdentPos;if(this.enterScope(ys(n,!1)|ms),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=l,this.finishNode(e,"ArrowFunctionExpression")};T.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==d.braceL,s=this.strict,l=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!s||o){if(l=this.strictDirective(this.end),l&&o)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var a=this.labels;if(this.labels=[],l)this.strict=!0;if(this.checkParams(e,!s&&!l&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,Pl);e.body=this.parseBlock(!1,void 0,l&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=a}this.exitScope()};T.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var i=n[t];if(i.type!=="Identifier")return!1}return!0};T.checkParams=function(e,t){var n=Object.create(null);for(var i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,gs,t?null:n)}};T.parseExprList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(!s){if(this.expect(d.comma),t&&this.afterTrailingComma(e))break}else s=!1;var l=void 0;if(n&&this.type===d.comma)l=null;else if(this.type===d.ellipsis){if(l=this.parseSpread(i),i&&this.type===d.comma&&i.trailingComma<0)i.trailingComma=this.start}else l=this.parseMaybeAssign(!1,i);r.push(l)}return r};T.checkUnreserved=function(e){var{start:t,end:n,name:i}=e;if(this.inGenerator&&i==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Si)&&i==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(i==="arguments"||i==="await"))this.raise(t,"Cannot use "+i+" in class static initialization block");if(this.keywords.test(i))this.raise(t,"Unexpected keyword '"+i+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var r=this.strict?this.reservedWordsStrict:this.reservedWords;if(r.test(i)){if(!this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+i+"' is reserved")}};T.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};T.parseIdentNode=function(){var e=this.startNode();if(this.type===d.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=d.name}else this.unexpected();return e};T.parsePrivateIdent=function(){var e=this.startNode();if(this.type===d.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};T.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===d.semi||this.canInsertSemicolon()||this.type!==d.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(d.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};T.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var xi=O.prototype;xi.raise=function(e,t){var n=vl(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var i=SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i};xi.raiseRecoverable=xi.raise;xi.curPosition=function(){if(this.options.locations)return new Sn(this.curLine,this.pos-this.lineStart)};var Qe=O.prototype,Tm=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Qe.enterScope=function(e){this.scopeStack.push(new Tm(e))};Qe.exitScope=function(){this.scopeStack.pop()};Qe.treatFunctionsAsVarInScope=function(e){return e.flags&gt||!this.inModule&&e.flags&yt};Qe.declareName=function(e,t,n){var i=!1;if(t===Be){var r=this.currentScope();if(i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&yt)delete this.undefinedExports[e]}else if(t===Al){var s=this.currentScope();s.lexical.push(e)}else if(t===wl){var l=this.currentScope();if(this.treatFunctionsAsVar)i=l.lexical.indexOf(e)>-1;else i=l.lexical.indexOf(e)>-1||l.var.indexOf(e)>-1;l.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var a=this.scopeStack[o];if(a.lexical.indexOf(e)>-1&&!(a.flags&Tl&&a.lexical[0]===e)||!this.treatFunctionsAsVarInScope(a)&&a.functions.indexOf(e)>-1){i=!0;break}if(a.var.push(e),this.inModule&&a.flags&yt)delete this.undefinedExports[e];if(a.flags&Si)break}if(i)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};Qe.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};Qe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Qe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Si|Cn|xt))return t}};Qe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Si|Cn|xt)&&!(t.flags&ms))return t}};var Ci=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new bi(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},kn=O.prototype;kn.startNode=function(){return new Ci(this,this.start,this.startLoc)};kn.startNodeAt=function(e,t){return new Ci(this,e,t)};function Nl(e,t,n,i){if(e.type=t,e.end=n,this.options.locations)e.loc.end=i;if(this.options.ranges)e.range[1]=n;return e}kn.finishNode=function(e,t){return Nl.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};kn.finishNodeAt=function(e,t,n,i){return Nl.call(this,e,t,n,i)};kn.copyNode=function(e){var t=new Ci(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var $l=function(){};$l.prototype.reset=function(){};O.prototype.validateRegExpFlags=function(){};O.prototype.validateRegExpPattern=function(){};var Es=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new bi(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},k=O.prototype;k.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new Es(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};k.getToken=function(){return this.next(),new Es(this)};if(typeof Symbol<"u")k[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===d.eof,value:t}}}};k.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(d.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};k.readToken=function(e){if(be(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};k.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};k.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};k.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=n+2,this.options.locations)for(var i=void 0,r=t;(i=El(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=i;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};k.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Ot(i))i=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};k.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){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(e>8&&e<14||e>=5760&&bl.test(String.fromCharCode(e)))++this.pos;else break e}}};k.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var n=this.type;this.type=e,this.value=t,this.updateContext(n)};k.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(d.ellipsis);else return++this.pos,this.finishToken(d.dot)};k.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.slash,1)};k.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=e===42?d.star:d.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,i=d.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(d.assign,n+1);return this.finishOp(i,n)};k.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(d.assign,3)}return this.finishOp(e===124?d.logicalOR:d.logicalAND,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(e===124?d.bitwiseOR:d.bitwiseAND,1)};k.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.bitwiseXOR,1)};k.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Z.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(d.incDec,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(d.plusMin,1)};k.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(d.assign,n+1);return this.finishOp(d.bitShift,n)}if(t===33&&e===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(t===61)n=2;return this.finishOp(d.relational,n)};k.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(d.arrow);return this.finishOp(e===61?d.eq:d.prefix,1)};k.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(d.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(d.assign,3)}return this.finishOp(d.coalesce,2)}}return this.finishOp(d.question,1)};k.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),be(t,!0)||t===92)return this.finishToken(d.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Ei(t)+"'")};k.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(d.parenL);case 41:return++this.pos,this.finishToken(d.parenR);case 59:return++this.pos,this.finishToken(d.semi);case 44:return++this.pos,this.finishToken(d.comma);case 91:return++this.pos,this.finishToken(d.bracketL);case 93:return++this.pos,this.finishToken(d.bracketR);case 123:return++this.pos,this.finishToken(d.braceL);case 125:return++this.pos,this.finishToken(d.braceR);case 58:return++this.pos,this.finishToken(d.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(d.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(d.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ei(e)+"'")};k.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};k.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Z.test(i))this.raise(n,"Unterminated regular expression");if(!e){if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}else e=!1;++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,l=this.readWord1();if(this.containsEsc)this.unexpected(s);var o=this.regexpState||(this.regexpState=new $l(this));o.reset(n,r,l),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var a=null;try{a=new RegExp(r,l)}catch(p){}return this.finishToken(d.regexp,{pattern:r,flags:l,value:a})};k.readInt=function(e,t,n){var i=this.options.ecmaVersion>=12&&t===void 0,r=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,l=0,o=0;for(var a=0,p=t==null?1/0:t;a<p;++a,++this.pos){var c=this.input.charCodeAt(this.pos),u=void 0;if(i&&c===95){if(r)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(o===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(a===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");o=c;continue}if(c>=97)u=c-97+10;else if(c>=65)u=c-65+10;else if(c>=48&&c<=57)u=c-48;else u=1/0;if(u>=e)break;o=c,l=l*e+u}if(i&&o===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===s||t!=null&&this.pos-s!==t)return null;return l};function Cm(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function Il(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}k.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)n=Il(this.input.slice(t,this.pos)),++this.pos;else if(be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,n)};k.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict)this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&i===110){var r=Il(this.input.slice(t,this.pos));if(++this.pos,be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,r)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(i===46&&!n)++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos);if((i===69||i===101)&&!n){if(i=this.input.charCodeAt(++this.pos),i===43||i===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var s=Cm(this.input.slice(t,this.pos),n);return this.finishToken(d.num,s)};k.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var n=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};k.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;if(i===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(i===8232||i===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(Ot(i))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(d.string,t)};var Ll={};k.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ll)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};k.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ll;else this.raise(e,t)};k.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(d.dollarBraceL);else return++this.pos,this.finishToken(d.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(d.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ot(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
35
+ `),cooked:this.value};return this.next(),n.tail=this.type===d.backQuote,this.finishNode(n,"TemplateElement")};T.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var n=this.startNode();this.next(),n.expressions=[];var i=this.parseTemplateElement({isTagged:t});n.quasis=[i];while(!i.tail){if(this.type===d.eof)this.raise(this.pos,"Unterminated template literal");this.expect(d.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(d.braceR),n.quasis.push(i=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(n,"TemplateLiteral")};T.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!Z.test(this.input.slice(this.lastTokEnd,this.start))};T.parseObj=function(e,t){var n=this.startNode(),i=!0,r={};n.properties=[],this.next();while(!this.eat(d.braceR)){if(!i){if(this.expect(d.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR))break}else i=!1;var s=this.parseProperty(e,t);if(!e)this.checkPropClash(s,r,t);n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};T.parseProperty=function(e,t){var n=this.startNode(),i,r,s,a;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis)){if(e){if(n.argument=this.parseIdent(!1),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(n,"RestElement")}if(n.argument=this.parseMaybeAssign(!1,t),this.type===d.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(n,"SpreadElement")}if(this.options.ecmaVersion>=6){if(n.method=!1,n.shorthand=!1,e||t)s=this.start,a=this.startLoc;if(!e)i=this.eat(d.star)}var o=this.containsEsc;if(this.parsePropertyName(n),!e&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(n))r=!0,i=this.options.ecmaVersion>=9&&this.eat(d.star),this.parsePropertyName(n);else r=!1;return this.parsePropertyValue(n,e,i,r,s,a,t,o),this.finishNode(n,"Property")};T.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var i=e.value.start;if(e.kind==="get")this.raiseRecoverable(i,"getter should have no params");else this.raiseRecoverable(i,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};T.parsePropertyValue=function(e,t,n,i,r,s,a,o){if((n||i)&&this.type===d.colon)this.unexpected();if(this.eat(d.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===d.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(n,i),e.kind="init"}else if(!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==d.comma&&this.type!==d.braceR&&this.type!==d.eq)){if(n||i)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(n||i)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=r;if(t)e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key));else if(this.type===d.eq&&a){if(a.shorthandAssign<0)a.shorthandAssign=this.start;e.value=this.parseMaybeDefault(r,s,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};T.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(d.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(d.bracketR),e.key;else e.computed=!1;return e.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};T.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};T.parseMethod=function(e,t,n){var i=this.startNode(),r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;if(this.initFunction(i),this.options.ecmaVersion>=6)i.generator=e;if(this.options.ecmaVersion>=8)i.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(xs(t,i.generator)|Si|(n?Al:0)),this.expect(d.parenL),i.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(i,!1,!0,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(i,"FunctionExpression")};T.parseArrowExpression=function(e,t,n,i){var r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(xs(n,!1)|gs),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!n;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,i),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};T.parseFunctionBody=function(e,t,n,i){var r=t&&this.type!==d.braceL,s=this.strict,a=!1;if(r)e.body=this.parseMaybeAssign(i),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!s||o){if(a=this.strictDirective(this.end),a&&o)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!s&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,Nl);e.body=this.parseBlock(!1,void 0,a&&!s),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};T.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var i=n[t];if(i.type!=="Identifier")return!1}return!0};T.checkParams=function(e,t){var n=Object.create(null);for(var i=0,r=e.params;i<r.length;i+=1){var s=r[i];this.checkLValInnerPattern(s,Es,t?null:n)}};T.parseExprList=function(e,t,n,i){var r=[],s=!0;while(!this.eat(e)){if(!s){if(this.expect(d.comma),t&&this.afterTrailingComma(e))break}else s=!1;var a=void 0;if(n&&this.type===d.comma)a=null;else if(this.type===d.ellipsis){if(a=this.parseSpread(i),i&&this.type===d.comma&&i.trailingComma<0)i.trailingComma=this.start}else a=this.parseMaybeAssign(!1,i);r.push(a)}return r};T.checkUnreserved=function(e){var{start:t,end:n,name:i}=e;if(this.inGenerator&&i==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Ti)&&i==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(i==="arguments"||i==="await"))this.raise(t,"Cannot use "+i+" in class static initialization block");if(this.keywords.test(i))this.raise(t,"Unexpected keyword '"+i+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)return;var r=this.strict?this.reservedWordsStrict:this.reservedWords;if(r.test(i)){if(!this.inAsync&&i==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+i+"' is reserved")}};T.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};T.parseIdentNode=function(){var e=this.startNode();if(this.type===d.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=d.name}else this.unexpected();return e};T.parsePrivateIdent=function(){var e=this.startNode();if(this.type===d.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};T.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===d.semi||this.canInsertSemicolon()||this.type!==d.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(d.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};T.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Ei=B.prototype;Ei.raise=function(e,t){var n=Cl(this.input,e);if(t+=" ("+n.line+":"+n.column+")",this.sourceFile)t+=" in "+this.sourceFile;var i=SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i};Ei.raiseRecoverable=Ei.raise;Ei.curPosition=function(){if(this.options.locations)return new Sn(this.curLine,this.pos-this.lineStart)};var Ze=B.prototype,Cm=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Ze.enterScope=function(e){this.scopeStack.push(new Cm(e))};Ze.exitScope=function(){this.scopeStack.pop()};Ze.treatFunctionsAsVarInScope=function(e){return e.flags&yt||!this.inModule&&e.flags&mt};Ze.declareName=function(e,t,n){var i=!1;if(t===je){var r=this.currentScope();if(i=r.lexical.indexOf(e)>-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&mt)delete this.undefinedExports[e]}else if(t===Dl){var s=this.currentScope();s.lexical.push(e)}else if(t===_l){var a=this.currentScope();if(this.treatFunctionsAsVar)i=a.lexical.indexOf(e)>-1;else i=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var l=this.scopeStack[o];if(l.lexical.indexOf(e)>-1&&!(l.flags&wl&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){i=!0;break}if(l.var.push(e),this.inModule&&l.flags&mt)delete this.undefinedExports[e];if(l.flags&Ti)break}if(i)this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};Ze.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};Ze.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Ze.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ti|Cn|gt))return t}};Ze.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ti|Cn|gt)&&!(t.flags&gs))return t}};var ki=function(e,t,n){if(this.type="",this.start=t,this.end=0,e.options.locations)this.loc=new vi(e,n);if(e.options.directSourceFile)this.sourceFile=e.options.directSourceFile;if(e.options.ranges)this.range=[t,0]},kn=B.prototype;kn.startNode=function(){return new ki(this,this.start,this.startLoc)};kn.startNodeAt=function(e,t){return new ki(this,e,t)};function Ll(e,t,n,i){if(e.type=t,e.end=n,this.options.locations)e.loc.end=i;if(this.options.ranges)e.range[1]=n;return e}kn.finishNode=function(e,t){return Ll.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};kn.finishNodeAt=function(e,t,n,i){return Ll.call(this,e,t,n,i)};kn.copyNode=function(e){var t=new ki(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Rl=function(){};Rl.prototype.reset=function(){};B.prototype.validateRegExpFlags=function(){};B.prototype.validateRegExpPattern=function(){};var vs=function(e){if(this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations)this.loc=new vi(e,e.startLoc,e.endLoc);if(e.options.ranges)this.range=[e.start,e.end]},k=B.prototype;k.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new vs(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};k.getToken=function(){return this.next(),new vs(this)};if(typeof Symbol<"u")k[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===d.eof,value:t}}}};k.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(d.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};k.readToken=function(e){if(be(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};k.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888};k.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};k.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=n+2,this.options.locations)for(var i=void 0,r=t;(i=Sl(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=i;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};k.skipLineComment=function(e){var t=this.pos,n=this.options.onComment&&this.curPosition(),i=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Ot(i))i=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};k.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){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(e>8&&e<14||e>=5760&&Tl.test(String.fromCharCode(e)))++this.pos;else break e}}};k.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var n=this.type;this.type=e,this.value=t,this.updateContext(n)};k.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(d.ellipsis);else return++this.pos,this.finishToken(d.dot)};k.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.slash,1)};k.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=e===42?d.star:d.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++n,i=d.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(d.assign,n+1);return this.finishOp(i,n)};k.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(d.assign,3)}return this.finishOp(e===124?d.logicalOR:d.logicalAND,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(e===124?d.bitwiseOR:d.bitwiseAND,1)};k.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.bitwiseXOR,1)};k.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Z.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(d.incDec,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(d.plusMin,1)};k.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;if(t===e){if(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61)return this.finishOp(d.assign,n+1);return this.finishOp(d.bitShift,n)}if(t===33&&e===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(t===61)n=2;return this.finishOp(d.relational,n)};k.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(d.arrow);return this.finishOp(e===61?d.eq:d.prefix,1)};k.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(d.questionDot,2)}if(t===63){if(e>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(d.assign,3)}return this.finishOp(d.coalesce,2)}}return this.finishOp(d.question,1)};k.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),be(t,!0)||t===92)return this.finishToken(d.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+bi(t)+"'")};k.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(d.parenL);case 41:return++this.pos,this.finishToken(d.parenR);case 59:return++this.pos,this.finishToken(d.semi);case 44:return++this.pos,this.finishToken(d.comma);case 91:return++this.pos,this.finishToken(d.bracketL);case 93:return++this.pos,this.finishToken(d.bracketR);case 123:return++this.pos,this.finishToken(d.braceL);case 125:return++this.pos,this.finishToken(d.braceR);case 58:return++this.pos,this.finishToken(d.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(d.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(d.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+bi(e)+"'")};k.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};k.readRegexp=function(){var e,t,n=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(n,"Unterminated regular expression");var i=this.input.charAt(this.pos);if(Z.test(i))this.raise(n,"Unterminated regular expression");if(!e){if(i==="[")t=!0;else if(i==="]"&&t)t=!1;else if(i==="/"&&!t)break;e=i==="\\"}else e=!1;++this.pos}var r=this.input.slice(n,this.pos);++this.pos;var s=this.pos,a=this.readWord1();if(this.containsEsc)this.unexpected(s);var o=this.regexpState||(this.regexpState=new Rl(this));o.reset(n,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var l=null;try{l=new RegExp(r,a)}catch(p){}return this.finishToken(d.regexp,{pattern:r,flags:a,value:l})};k.readInt=function(e,t,n){var i=this.options.ecmaVersion>=12&&t===void 0,r=n&&this.input.charCodeAt(this.pos)===48,s=this.pos,a=0,o=0;for(var l=0,p=t==null?1/0:t;l<p;++l,++this.pos){var c=this.input.charCodeAt(this.pos),u=void 0;if(i&&c===95){if(r)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(o===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(l===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");o=c;continue}if(c>=97)u=c-97+10;else if(c>=65)u=c-65+10;else if(c>=48&&c<=57)u=c-48;else u=1/0;if(u>=e)break;o=c,a=a*e+u}if(i&&o===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===s||t!=null&&this.pos-s!==t)return null;return a};function km(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function Ml(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}k.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);if(n==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)n=Ml(this.input.slice(t,this.pos)),++this.pos;else if(be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,n)};k.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(n&&this.strict)this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&i===110){var r=Ml(this.input.slice(t,this.pos));if(++this.pos,be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,r)}if(n&&/[89]/.test(this.input.slice(t,this.pos)))n=!1;if(i===46&&!n)++this.pos,this.readInt(10),i=this.input.charCodeAt(this.pos);if((i===69||i===101)&&!n){if(i=this.input.charCodeAt(++this.pos),i===43||i===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(be(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var s=km(this.input.slice(t,this.pos),n);return this.finishToken(d.num,s)};k.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var n=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};k.readString=function(e){var t="",n=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;if(i===92)t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos;else if(i===8232||i===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(Ot(i))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(n,this.pos++),this.finishToken(d.string,t)};var Ol={};k.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ol)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};k.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ol;else this.raise(e,t)};k.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate))if(n===36)return this.pos+=2,this.finishToken(d.dollarBraceL);else return++this.pos,this.finishToken(d.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(d.template,e)}if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ot(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
36
36
  `;break;default:e+=String.fromCharCode(n);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};k.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(d.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
37
37
  `)++this.pos;case`
38
38
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};k.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
39
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ei(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(e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);if(r>255)i=i.slice(0,-1),r=parseInt(i,8);if(this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(r)}if(Ot(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};k.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};k.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var r=this.fullCharCodeAtPos();if(Oe(r,i))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var l=this.readCodePoint();if(!(t?be:Oe)(l,i))this.invalidStringToken(s,"Invalid Unicode escape");e+=Ei(l),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};k.readWord=function(){var e=this.readWord1(),t=d.name;if(this.keywords.test(e))t=fs[e];return this.finishToken(t,e)};var km="8.18.0";O.acorn={Parser:O,version:km,defaultOptions:cs,Position:Sn,SourceLocation:bi,getLineInfo:vl,Node:Ci,TokenType:N,tokTypes:d,keywordTypes:fs,TokContext:Ee,tokContexts:M,isIdentifierChar:Oe,isIdentifierStart:be,Token:Es,isNewLine:Ot,lineBreak:Z,lineBreakG:um,nonASCIIwhitespace:bl};function wn(e){return(t)=>e(t)}function ki(...e){return O.extend(...e)}function An(e,t,n){for(let i=t;i<n;i++){let r=e.charCodeAt(i);if(r===10||r===13||r===8232||r===8233)return!0}return!1}var gl=new WeakMap;function ee(e,t){if(e===void 0)return!1;if(e.length<16)return e.includes(t);let n=gl.get(e);if(n===void 0||n.length>e.length)n={names:new Set,length:0},gl.set(e,n);while(n.length<e.length)n.names.add(e[n.length++]);return n.names.has(t)}var bs=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,wm=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"]]),Am=new Set("public private protected readonly declare abstract override static accessor".split(" ")),Pm=new Set("public private protected readonly override".split(" ")),_m=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),Dm=new Set("var let const function class interface enum".split(" ")),Rl=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),Ml=1,Nm=32,$m=256,Im=0,Lm=1,Pn=2,Rm=3,Mm=4,vs=6,Ol=7,Gl=256,ks=1024,Om=8|ks,Bm=Pn|Gl,Bl=1,Fm=2,Fl=40,jm=41,qm=44,jl=46,ql=58,wi=61,Vl=60,Ai=123,Vm=91,Ss=42,Gm=35,Ts=34,Cs=39,Hm=SyntaxError("speculative parse failed"),Pi=wn((e)=>{let{tokTypes:t,keywordTypes:n,isIdentifierChar:i,isIdentifierStart:r}=e.acorn,s=new e.acorn.TokenType("@");class l extends e{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(o,a,p){super(o,a,p);let c=this.options.onComment;if(typeof c==="function")this.options.onComment=(u,f,h,m,x,y)=>{if(h<this.$t)return;this.$t=m,c.call(this,u,f,h,m,x,y)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$k=null,this.$l=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(o){if(o===64)return++this.pos,this.finishToken(s);return super.getTokenFromCode(o)}readToken_lt_gt(o){if(this.inType)return this.finishOp(t.relational,1);return super.readToken_lt_gt(o)}$a(o){let a=this.inType;this.inType=!0;let p=o();if(this.inType=a,!a&&this.type===t.relational)this.pos=this.start,this.nextToken();return p}$1(){return this.type===t.relational&&this.value==="<"}$p(){if(this.type===t.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(t.relational,"<");return this.$1()}$c(){return this.type===t.relational&&this.value===">"}$u(){return this.type===t.prefix&&this.value==="!"}hasPrecedingLineBreak(){return An(this.input,this.lastTokEnd,this.start)}$d(o=this.pos){return bs.lastIndex=o,bs.exec(this.input),bs.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let o=this.$d(),a=o;while(a<this.input.length&&i(this.input.charCodeAt(a)))a++;return this.input.slice(o,a)}$b(){return!An(this.input,this.pos,this.$d())}$14(){return this.$b()&&r(this.$2())&&!Object.hasOwn(n,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(o){this.pos=o.pos,this.type=o.type,this.value=o.value,this.start=o.start,this.end=o.end,this.startLoc=o.startLoc,this.endLoc=o.endLoc,this.lastTokStart=o.lastTokStart,this.lastTokEnd=o.lastTokEnd,this.lastTokStartLoc=o.lastTokStartLoc,this.lastTokEndLoc=o.lastTokEndLoc,this.curLine=o.curLine,this.lineStart=o.lineStart,this.context=o.context,this.exprAllowed=o.exprAllowed,this.containsEsc=o.containsEsc,this.inType=o.inType,this.$4=o.$4,this.$5=o.$5,this.$7=o.$7,this.scopeStack.length=o.scopes,this.privateNameStack.length=o.privateNames,this.labels=o.labels,this.labels.length=o.labelCount,this.strict=o.strict,this.yieldPos=o.yieldPos,this.awaitPos=o.awaitPos,this.awaitIdentPos=o.awaitIdentPos,this.potentialArrowAt=o.potentialArrowAt,this.potentialArrowInForAwait=o.potentialArrowInForAwait}raise(o,a){if(this.$n>0)throw Hm;return super.raise(o,a)}$1y(o,a){try{super.raise(o,a)}catch(p){if(p instanceof SyntaxError)p.$1z=!0;throw p}throw Error("unreachable")}$g(o,a=!1){let p=this.$15();this.$n++;try{let c=o();if(a||c===void 0)this.$16(p);return c}catch(c){if(!(c instanceof SyntaxError)||!a&&c.$1z)throw c;this.$16(p);return}finally{this.$n--}}$v(o){return this.$g(o,!0)===!0}$17(o){if(o.end=this.lastTokEnd,this.options.locations)o.loc.end=this.lastTokEndLoc}$q(o,a){if(o.start=a.start,this.options.locations)o.loc.start=a.loc.start}$6(o=!1){let a=this.startNode();return a.typeAnnotation=this.$a(()=>(this.next(),o?this.$20():this.$0())),this.finishNode(a,"TSTypeAnnotation")}$h(o,a){if(a&&this.eat(t.question))o.optional=!0,this.$17(o);if(this.type===t.colon)o.typeAnnotation=this.$6(),this.$17(o);return o}$20(){if(this.type!==t.name&&this.type!==t._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&r(this.$2())){let o=this.startNode();if(this.next(),o.parameterName=this.type===t._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(o,!0);return o.asserts=!0,o.typeAnnotation=null,this.finishNode(o,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let o=this.startNode();return o.parameterName=this.type===t._this?this.$w():this.parseIdent(!0),this.$x(o,!1)}return this.$0()}$x(o,a){this.next();let p=this.startNode();return p.typeAnnotation=this.$0(),o.typeAnnotation=this.finishNode(p,"TSTypeAnnotation"),o.asserts=a,this.finishNode(o,"TSTypePredicate")}$w(){let o=this.startNode();return this.next(),this.finishNode(o,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let o=this.$0();if(this.type!==t.eof)this.unexpected();return o}$0(){let o=this.$18();if(this.$4||this.type!==t._extends||this.hasPrecedingLineBreak())return o;let a=this.startNodeAt(o.start,o.loc?.start);return this.next(),a.checkType=o,a.extendsType=this.$i(!0,()=>this.$18()),this.expect(t.question),a.trueType=this.$i(!1,()=>this.$0()),this.expect(t.colon),a.falseType=this.$i(!1,()=>this.$0()),this.finishNode(a,"TSConditionalType")}$i(o,a){let p=this.$4;this.$4=o;let c=a();return this.$4=p,c}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===t._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",t.bitwiseOR,()=>this.$1a("TSIntersectionType",t.bitwiseAND,()=>this.$1b()))}$19(o){let a=this.startNode();if(o==="TSConstructorType"){if(a.abstract=this.isContextual("abstract"),a.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(a,t.arrow)),this.finishNode(a,o)}$r(o,a){if(this.$1())o.typeParameters=this.$8();if(this.expect(t.parenL),o.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===a)o.typeAnnotation=this.$6(!0);else if(a===t.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==t.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===t.parenR||this.type===t.ellipsis)return!0;if(this.type===t.name||this.type===t._this)this.next();else if(this.type===t.braceL||this.type===t.bracketL)this.parseBindingAtom();else return!1;let o=this.type;if(o===t.colon||o===t.comma||o===t.question||o===t.eq)return!0;if(o!==t.parenR)return!1;return this.next(),this.type===t.arrow})}$1a(o,a,p){let c=this.startNode(),u=this.eat(a),f=[];do f.push(p());while(this.eat(a));if(f.length===1&&!u)return f[0];return c.types=f,this.finishNode(c,o)}$1b(){if(this.type===t.name&&!this.containsEsc){let o=this.value;if(o==="keyof"||o==="unique"||o==="readonly"){let a=this.startNode();return this.next(),a.operator=o,a.typeAnnotation=this.$1b(),this.finishNode(a,"TSTypeOperator")}if(o==="infer"){let a=this.startNode();this.next();let p=this.startNode();p.name=this.$y();let c=this.$g(()=>this.$22());if(c)p.constraint=c;return a.typeParameter=this.finishNode(p,"TSTypeParameter"),this.finishNode(a,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(t._extends))return;let o=this.$i(!0,()=>this.$0());return this.$4||this.type!==t.question?o:void 0}$y(){if(this.type!==t.name&&!this.type.keyword)this.unexpected();let o=this.type===t.name?this.value:this.type.keyword;return this.next(),o}$23(){let o=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(t.bracketL)){let a=this.startNodeAt(o.start,o.loc?.start);if(this.eat(t.bracketR))a.elementType=o,o=this.finishNode(a,"TSArrayType");else a.objectType=o,a.indexType=this.$0(),this.expect(t.bracketR),o=this.finishNode(a,"TSIndexedAccessType")}return o}$24(){switch(this.type){case t.name:case t._void:case t._null:{let o=wm.get(this.value);if(o&&(this.type!==t.name||!this.containsEsc&&this.$2()!==jl)){let a=this.startNode();return this.next(),this.finishNode(a,o)}return this.$1c()}case t.string:case t.num:case t._true:case t._false:{let o=this.startNode();return o.literal=this.parseExprAtom(),this.finishNode(o,"TSLiteralType")}case t.plusMin:{if(this.value!=="-")break;let o=this.startNode(),a=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return a.operator="-",a.prefix=!0,a.argument=this.parseExprAtom(),o.literal=this.finishNode(a,"UnaryExpression"),this.finishNode(o,"TSLiteralType")}case t.backQuote:return this.$25();case t._this:{let o=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let a=this.startNodeAt(o.start,o.loc?.start);return a.parameterName=o,this.$x(a,!1)}return o}case t._typeof:return this.$26();case t._import:return this.$1d();case t.braceL:return this.$27()?this.$28():this.$29();case t.bracketL:return this.$2a();case t.parenL:{let o=this.startNode();return this.next(),o.typeAnnotation=this.$0(),this.expect(t.parenR),this.finishNode(o,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let o=this.startNode();if(o.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeReference")}$j(){let o=this.parseIdent(!0);while(this.eat(t.dot)){let a=this.startNodeAt(o.start,o.loc?.start);a.left=o,a.right=this.parseIdent(!0),o=this.finishNode(a,"TSQualifiedName")}return o}$26(){let o=this.startNode();if(this.next(),o.exprName=this.type===t._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeQuery")}$1d(){let o=this.startNode();if(this.next(),o.argument=this.$1e(),this.eat(t.dot))o.qualifier=this.$j();if(this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSImportType")}$z(){if(this.type!==t.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(t.parenL);let o=this.$z();return this.expect(t.parenR),o}$25(){let o=this.startNode(),a=this.startNode();this.next(),a.expressions=[];let p=this.parseTemplateElement({isTagged:!1});a.quasis=[p];while(!p.tail){if(this.type===t.eof)this.raise(this.pos,"Unterminated template literal");this.expect(t.dollarBraceL),a.expressions.push(this.$0()),this.expect(t.braceR),p=this.parseTemplateElement({isTagged:!1}),a.quasis.push(p)}return this.next(),o.literal=this.finishNode(a,"TemplateLiteral"),this.finishNode(o,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===t.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==t.bracketL)return!1;if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t._in})}$28(){let o=this.startNode();if(this.expect(t.braceL),this.type===t.plusMin)o.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))o.readonly=!0;this.expect(t.bracketL);let a=this.startNode();if(a.name=this.$y(),this.expect(t._in),a.constraint=this.$0(),o.typeParameter=this.finishNode(a,"TSTypeParameter"),o.nameType=this.eatContextual("as")?this.$0():null,this.expect(t.bracketR),this.type===t.plusMin)o.optional=this.value,this.next(),this.expect(t.question);else if(this.eat(t.question))o.optional=!0;if(this.eat(t.colon))o.typeAnnotation=this.$0();return this.semicolon(),this.expect(t.braceR),this.finishNode(o,"TSMappedType")}$29(){let o=this.startNode();return o.members=this.$1f(),this.finishNode(o,"TSTypeLiteral")}$1f(){this.expect(t.braceL);let o=[];while(!this.eat(t.braceR))o.push(this.$2b());return o}$2b(){let o=this.startNode(),a="TSPropertySignature",p=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())a="TSCallSignatureDeclaration",this.$r(o,t.colon);else if(p===Fl||p===Vl)a="TSConstructSignatureDeclaration",this.next(),this.$r(o,t.colon);else{let c=this.type===t._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),o.readonly=!0;if(this.type===t.bracketL&&this.$1g())return this.$1h(o);let u="method";if(c)o.key=c;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))u=this.value,this.next();this.parsePropertyName(o)}if(this.eat(t.question))o.optional=!0;if(this.type===t.parenL||this.$1()){if(a="TSMethodSignature",u!=="method")o.kind=u;this.$r(o,t.colon),o.kind=u}else if(this.type===t.colon)o.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(o,a)}$1i(){if(!this.eat(t.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t.colon})}$1h(o){if(this.expect(t.bracketL),o.parameters=[this.$h(this.parseIdent(),!1)],this.expect(t.bracketR),this.type===t.colon)o.typeAnnotation=this.$6();return this.$1i(),this.finishNode(o,"TSIndexSignature")}$2a(){let o=this.startNode();this.expect(t.bracketL),o.elementTypes=[];while(!this.eat(t.bracketR))if(o.elementTypes.push(this.$2c()),this.type!==t.bracketR)this.expect(t.comma);return this.finishNode(o,"TSTupleType")}$2c(){let o=this.start,a=this.startLoc,p=this.eat(t.ellipsis),c;if((this.type===t.name||this.type.keyword)&&this.$2d()){let u=this.startNode();u.label=this.parseIdent(!0),u.optional=this.eat(t.question),this.expect(t.colon),u.elementType=this.$0(),c=this.finishNode(u,"TSNamedTupleMember")}else if(c=this.$0(),this.eat(t.question)){let u=this.startNodeAt(c.start,c.loc?.start);u.typeAnnotation=c,c=this.finishNode(u,"TSOptionalType")}if(p){let u=this.startNodeAt(o,a);u.typeAnnotation=c,c=this.finishNode(u,"TSRestType")}return c}$2d(){let o=this.$d();if(this.input.charCodeAt(o)===63)o=this.$d(o+1);return this.input.charCodeAt(o)===ql}$8(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c()){let a=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&r(this.$2()))a[this.value]=!0,this.next();if(a.name=this.$y(),this.eat(t._extends))a.constraint=this.$0();if(this.eat(t.eq))a.default=this.$0();if(o.params.push(this.finishNode(a,"TSTypeParameter")),!this.$c()){if(this.expect(t.comma),this.$c())o.extra={trailingComma:this.lastTokStart}}}if(this.next(),o.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(o,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c())if(o.params.push(this.$0()),!this.$c())this.expect(t.comma);if(o.params.length===0)this.unexpected();return this.next(),this.finishNode(o,"TSTypeParameterInstantiation")})}$1j(){let o=[];do{let a=this.startNode();if(a.expression=this.$j(),this.$1())a.typeParameters=this.$e();o.push(this.finishNode(a,"TSExpressionWithTypeArguments"))}while(this.eat(t.comma));return o}$1k(o=!1){if(this.type!==t.name||this.containsEsc){if(this.type===t._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(o);return this.$1l(this.startNode(),this.value)}$2e(o){switch(o){case"interface":case"type":case"namespace":return this.$14();case"enum":return r(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let a=this.$2();return this.$b()&&(a===Ts||a===Cs||r(a))}case"declare":return this.$b()&&_m.has(this.$3());case"global":return this.$b()&&this.$2()===Ai}return!1}$1l(o,a){switch(a){case"interface":return this.$1m(o);case"type":return this.$2g(o);case"enum":return this.$10(o);case"abstract":return this.$1n(o,!0);case"global":return o.global=!0,o.id=this.parseIdent(),o.body=this.$11(),this.finishNode(o,"TSModuleDeclaration")}return this.$2h(o)}$2f(o){let a=this.$5;this.$5=!0;let p=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")p.const=!0;if(!o&&Dm.has(c))p.declare=!0;let u;if(p.const)u=this.$10(p);else if(c==="var"||c==="let"||c==="const")u=this.parseVarStatement(p,c,!0);else if(c==="function")this.next(),u=this.parseFunction(p,Bl,!1,!1);else if(c==="class")u=this.parseClass(p,!0);else u=this.$1l(p,c);return u.declare=!0,this.$5=a,u}$1n(o,a){return this.next(),o.abstract=!0,this.parseClass(o,a)}$1m(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Ol),this.$1())o.typeParameters=this.$8();return this.$a(()=>{if(this.eat(t._extends))o.extends=this.$1j();let a=this.startNode();a.body=this.$1f(),o.body=this.finishNode(a,"TSInterfaceBody")}),this.finishNode(o,"TSInterfaceDeclaration")}$2g(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,vs),this.$1())o.typeParameters=this.$8();return o.typeAnnotation=this.$a(()=>(this.expect(t.eq),this.$0())),this.semicolon(),this.finishNode(o,"TSTypeAliasDeclaration")}$10(o){if(this.type===t._const)o.const=!0,this.next();this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Bm),this.expect(t.braceL),o.members=[];while(!this.eat(t.braceR)){let a=this.startNode();if(a.id=this.type===t.string?this.parseExprAtom():this.parseIdent(!0),this.eat(t.eq))a.initializer=this.parseMaybeAssign();if(o.members.push(this.finishNode(a,"TSEnumMember")),this.type!==t.braceR)this.expect(t.comma)}return this.finishNode(o,"TSEnumDeclaration")}$2h(o){if(this.next(),this.type===t.string){if(o.id=this.parseExprAtom(),this.type===t.braceL)o.body=this.$11();else this.semicolon();return this.finishNode(o,"TSModuleDeclaration")}return o.id=this.parseIdent(),this.checkLValSimple(o.id,Om),this.$1o(o)}$1o(o){if(this.eat(t.dot)){let a=this.startNode();a.id=this.parseIdent(),o.body=this.$1o(a)}else o.body=this.$11();return this.finishNode(o,"TSModuleDeclaration")}$11(){this.enterScope($m);let o=this.startNode();this.enterScope(0),this.expect(t.braceL),o.body=[];while(!this.eat(t.braceR))o.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(o,"TSModuleBlock")}$1p(o,a){if(o.isExport=a,o.id=this.parseIdent(),this.checkLValSimple(o.id,Pn),this.expect(t.eq),this.isContextual("require")&&this.$2()===Fl){let p=this.startNode();this.next(),p.expression=this.$1e(),o.moduleReference=this.finishNode(p,"TSExternalModuleReference")}else o.moduleReference=this.$j();return this.semicolon(),this.finishNode(o,"TSImportEqualsDeclaration")}$2i(){let o=this.$d();if(this.input.charCodeAt(o)!==wi)return!1;let a=this.input.charCodeAt(o+1);return a!==wi&&a!==62}parseStatement(o,a,p){if(this.type===s)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(o,a,p)}parseVarStatement(o,a,p){return super.parseVarStatement(o,a,p||this.$5)}parseVarId(o,a){if(super.parseVarId(o,a),o.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),o.definite=!0;this.$h(o.id,!1)}parseCatchClauseParam(){let o=this.$h(this.parseBindingAtom(),!1),a=o.type==="Identifier";return this.enterScope(a?Nm:0),this.checkLValPattern(o,a?Mm:Pn),this.expect(t.parenR),o}parseImport(o){if(this.next(),o.importKind="value",this.type===t.string)o.specifiers=[],o.source=this.parseExprAtom();else{if(this.isContextual("type")){let a=this.$2();if(a===Ai||a===Ss||r(a)&&this.$3()!=="from")o.importKind="type",this.next()}if(this.type===t.name&&this.$2i())return this.$1p(o,!1);o.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),o.source=this.$z()}return this.$1r(o),this.semicolon(),this.finishNode(o,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=t._with;return this.type===t._with?super.parseWithClause():void 0}$1r(o){let a=this.parseWithClause();if(a)o.attributes=a}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(o){return this.$1s("exportKind",()=>super.parseExportSpecifier(o))}$1s(o,a){let p=this.isContextual("type")?this.$2():-1;if(p===Ts||p===Cs||r(p)&&this.$3()!=="as"){let u=this.startNode();this.next();let f=a();return this.$q(f,u),f[o]="type",f}let c=a();return c[o]="value",c}parseExport(o,a){if(this.next(),this.eat(t._import)){if(o.importKind="value",this.isContextual("type")&&r(this.$2())&&this.$3()!=="from")o.importKind="type",this.next();return this.$1p(o,!0)}if(this.eat(t.eq))return o.expression=this.parseExpression(),this.semicolon(),this.finishNode(o,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),o.id=this.parseIdent(),this.semicolon(),this.finishNode(o,"TSNamespaceExportDeclaration");if(o.exportKind="value",this.isContextual("type")){let u=this.$2();if(u===Ai||u===Ss)o.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(o,a);if(this.eat(t._default)){if(this.isContextual("interface")&&this.$14())o.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")o.declaration=this.$1n(this.startNode(),"nullableID");else o.declaration=this.parseExportDefaultDeclaration();return this.finishNode(o,"ExportDefaultDeclaration")}let p=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(o.declaration=c??this.parseStatement(null),p||o.declaration.type==="TSInterfaceDeclaration"||o.declaration.type==="TSTypeAliasDeclaration")o.exportKind="type";return o.specifiers=[],o.source=null,this.finishNode(o,"ExportNamedDeclaration")}if(o.declaration=null,o.specifiers=this.parseExportSpecifiers(a),this.eatContextual("from"))o.source=this.$z(),this.$1r(o);else{for(let u of o.specifiers)if(this.checkUnreserved(u.local),this.checkLocalExport(u.local),u.local.type==="Literal")this.raise(u.local.start,"A string literal cannot be used as an exported binding without `from`.");o.source=null}return this.semicolon(),this.finishNode(o,"ExportNamedDeclaration")}parseFunction(o,a,p,c,u){let f=a&Bl;if(f)this.$f=o,this.$o=o.start;super.parseFunction(o,a,p,c,u),this.$f=null;let h=!o.body;if(h)o.type="TSDeclareFunction";if(f&&o.id){if(h){if(this.$5&&this.currentScope().flags&Ml)this.declareName(o.id.name,ks,o.id.start);this.checkLValSimple(o.id,Im)}else if(!(a&Fm)){let m=Rm;if(this.strict||o.generator||o.async)m=this.treatFunctionsAsVar?Lm:Pn;this.checkLValSimple(o.id,m)}}return o}parseFunctionParams(o){if(this.$1())o.typeParameters=this.$8();if(super.parseFunctionParams(o),this.type===t.colon)o.returnType=this.$6(!0)}parseFunctionBody(o,a,p,c){if(p&&this.type===t.colon)o.returnType=this.$6(!0);if(a||this.type===t.braceL||o.start!==this.$o){super.parseFunctionBody(o,a,p,c);return}this.semicolon(),this.exitScope()}parseMethod(o,a,p){let c=this.$k;this.$k=null;let u=super.parseMethod(o,a,p);if(!u.body)u.type="TSDeclareMethod";if(c)u.typeParameters=c;return u}parseBindingList(o,a,p,c){let u=c===!0||this.$l;return this.$l=!1,super.parseBindingList(o,a,p,u)}$s(o){if(!o&&!this.$b())return!1;let a=this.$2();return a===Vm||a===Ai||a===Ss||a===jl||a===Gm||a===Ts||a===Cs||a>=48&&a<=57||r(a)}parseAssignableListItem(o){let a=this.$12(),p=this.start,c=this.startLoc,u,f=!1,h=!1;if(o)while(this.type===t.name&&Pm.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")f=!0;else if(this.value==="override")h=!0;else u=this.value;this.next()}let m;if(this.type===t._this)m=this.startNode(),m.name="this",this.next(),this.finishNode(m,"Identifier");else m=this.parseBindingAtom();let x=this.type===t.eq?this.parseMaybeDefault(p,c,m):this.parseMaybeDefault(m.start,m.loc?.start,this.$h(m,!0));if(a.length>0)x.decorators=a;if(!u&&!f&&!h)return x;let y=this.startNodeAt(p,c);if(u)y.accessibility=u;if(f)y.readonly=!0;if(h)y.override=!0;return y.parameter=x,this.finishNode(y,"TSParameterProperty")}parseBindingListItem(o){if(o.type==="RestElement")this.$h(o,!0);return o}checkLValSimple(o,a,p){if(this.$f&&o===this.$f.id){this.$f=null;return}if(!a&&Rl.has(o.type)){this.checkLValSimple(o.expression,a,p);return}switch(o.type){case"TSParameterProperty":this.checkLValInnerPattern(o.parameter,a,p);return;case"Identifier":if(o.name==="this")return}super.checkLValSimple(o,a,p)}toAssignable(o,a,p){if(o&&!a&&Rl.has(o.type))return o;return super.toAssignable(o,a,p)}declareName(o,a,p){let c=this.currentScope();if(a&ks){this.$1t(c,o),c.$1u??=[],c.$1u.push(o);return}if(a===vs||a===Ol){if(c.$13??=[],a===vs&&ee(c.$13,o))this.raise(p,`type '${o}' has already been declared.`);c.$13.push(o),this.$1t(c,o);return}if(a&Gl){if(c.$1v??=[],ee(c.$1v,o))return;super.declareName(o,Pn,p),c.$1v.push(o);return}super.declareName(o,a,p)}$1t(o,a){if(this.inModule&&o.flags&Ml)delete this.undefinedExports[a]}checkLocalExport(o){for(let a=this.scopeStack.length-1;a>=0;a--){let p=this.scopeStack[a];if(ee(p.$13,o.name)||ee(p.$1u,o.name))return}super.checkLocalExport(o)}checkExport(){}raiseRecoverable(o,a){if(a==="Duplicate constructor in the same class")return;super.raiseRecoverable(o,a)}$12(){let o=[];while(this.type===s)o.push(this.$1w());return o}$1q(o){let a=this.$9[this.$9.length-1];while(this.type===s)a.push(this.$1w());if(this.type===t._export){if(!o)this.unexpected()}else if(this.type!==t._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 o=this.startNode();this.next(),this.$9.push([]);let a=this.start,p=this.startLoc,c;if(this.type===t.parenL){if(this.next(),c=this.parseExpression(),this.expect(t.parenR),this.options.preserveParens){let f=this.startNodeAt(a,p);f.expression=c,c=this.finishNode(f,"ParenthesizedExpression")}}else{c=this.parseIdent(!1);while(this.eat(t.dot)){let f=this.startNodeAt(a,p);f.object=c,f.property=this.parseIdent(!0),f.computed=!1,c=this.finishNode(f,"MemberExpression")}}let u=this.$p()?this.$e():void 0;if(this.eat(t.parenL)){let f=this.startNodeAt(c.start,c.loc?.start);if(f.callee=c,f.arguments=this.parseExprList(t.parenR,!1,!1),u)f.typeArguments=u;c=this.finishNode(f,"CallExpression")}else if(u){let f=this.startNodeAt(c.start,c.loc?.start);f.expression=c,f.typeArguments=u,c=this.finishNode(f,"TSInstantiationExpression")}return o.expression=c,this.$9.pop(),this.finishNode(o,"Decorator")}shouldParseExportStatement(){return this.type===s||super.shouldParseExportStatement()}parseExprAtom(o,a,p){if(this.type===s)this.$1q(!1);return super.parseExprAtom(o,a,p)}parseProperty(o,a){if(o||this.type!==s)return super.parseProperty(o,a);let p=this.$12(),c=super.parseProperty(o,a);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=p,c}parseClassId(o,a){let p=this.$9.length-1,c=this.$9[p];if(c.length>0)o.decorators=c,this.$q(o,c[0]),this.$9[p]=[];if(!this.isContextual("implements")||a===!0)super.parseClassId(o,a);if(this.$1())o.typeParameters=this.$8()}parseClassSuper(o){if(super.parseClassSuper(o),o.superClass&&this.$1())o.superTypeParameters=this.$e();if(this.eatContextual("implements"))o.implements=this.$a(()=>this.$1j())}parseClassElement(o){if(this.type===s){let h=this.$12();if(this.type===t.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let m=this.parseClassElement(o);return m.decorators=h,this.$q(m,h[0]),m}if(this.eat(t.semi))return null;let a=this.startNode();while(this.type===t.name&&Am.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===t.braceL)return this.next(),this.parseClassStaticBlock(a),a;if(h==="public"||h==="private"||h==="protected")a.accessibility=h;else a[h]=!0}if(this.type===t.bracketL&&this.$1g())return this.$1h(a);a.static??=!1;let p="",c=!1,u=!1,f="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===t.star)&&!this.canInsertSemicolon())u=!0;else p="async";if(!p&&this.eat(t.star))c=!0;if(!p&&!u&&!c){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=h;else p=h}if(p)a.computed=!1,a.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),a.key.name=p,this.finishNode(a.key,"Identifier");else this.parseClassElementName(a);if(this.eat(t.question))a.optional=!0;if(this.type===t.parenL||this.$1()||f!=="method"||c||u){let h=a.key,m=!a.static&&!a.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(a.kind=m?"constructor":f,this.$1())a.typeParameters=this.$8();this.$l=m,this.$o=this.start,this.parseClassMethod(a,c,u,m&&o)}else{if(!a.optional&&this.$u())this.next(),a.definite=!0;if(this.type===t.colon)a.typeAnnotation=this.$6();this.parseClassField(a)}return a}parseMaybeAssign(o,a,p){if(this.$p()){let c=this.$g(()=>{let u=this.$8(),f=super.parseMaybeAssign(o,a,p);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=u,this.$q(f,u),f});if(c)return c}return super.parseMaybeAssign(o,a,p)}parseMaybeUnary(o,a,p,c){if(this.$p()){let u=this.startNode();return u.typeAnnotation=this.$a(()=>{this.next();let f=this.$0();if(!this.$c())this.unexpected();return this.next(),f}),u.expression=this.parseMaybeUnary(null,!1,!1,c),this.finishNode(u,"TSTypeAssertion")}return super.parseMaybeUnary(o,a,p,c)}parseMaybeConditional(o,a){let p=this.start,c=this.startLoc,u=this.parseExprOps(o,a);if(this.checkExpressionErrors(a))return u;if(this.type===t.question&&!(u.type==="ArrowFunctionExpression"&&u.start===p)&&!this.$2j()){this.next();let f=this.startNodeAt(p,c);return f.test=u,f.consequent=this.parseMaybeAssign(),this.expect(t.colon),f.alternate=this.parseMaybeAssign(o),this.finishNode(f,"ConditionalExpression")}return u}$2j(){let o=this.$d(),a=this.input.charCodeAt(o);if(a===ql||a===qm||a===jm)return!0;return a===wi&&this.input.charCodeAt(o+1)!==wi}parseParenItem(o){return this.$h(o,!0)}$1x(){if(this.type!==t.colon)return!0;let o=this.$g(()=>{let a=this.$6(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?a:void 0});if(!o)return!1;return this.$7=o,!0}shouldParseArrow(o){return this.$1x()&&super.shouldParseArrow(o)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(o,a,p,c){if(this.$7)o.returnType=this.$7,this.$7=null;return super.parseArrowExpression(o,a,p,c)}parseExprList(o,a,p,c){if(!this.$m)return super.parseExprList(o,a,p,c);this.$m=!1;let u=[],f=!0;while(!this.eat(o)){if(f)f=!1;else if(this.expect(t.comma),a&&this.afterTrailingComma(o))break;if(this.type===t.ellipsis){let h=this.parseSpread(c);if(this.eat(t.question))h.optional=!0;if(this.type===t.colon)h.typeAnnotation=this.$6();u.push(h)}else u.push(this.parseMaybeAssign(!1,c,this.parseParenItem))}return u}parseSubscript(o,a,p,c,u,f,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let x=this.startNodeAt(a,p);return this.exprAllowed=!1,this.next(),x.expression=o,this.finishNode(x,"TSNonNullExpression")}if(u&&this.$1()){let x=this.$g(()=>this.$2k(a,p,h));if(x)return x}let m=this.type===t.questionDot&&this.$2()===Vl;if(this.$1()||m||this.type===t.bitShift&&this.value==="<<"){let x=this.$g(()=>{if(m)this.next();this.$p();let y=this.$e();if(this.type===t.parenL&&!c)return y;if(this.type===t.backQuote)return m?void 0:y;if(m)return;if(this.$c()||this.type===t.bitShift||this.type.startsExpr&&this.type!==t.parenL&&!this.hasPrecedingLineBreak())return;return y});if(x){let y=this.startNodeAt(a,p);if(this.type===t.parenL&&!c){if(this.next(),y.callee=o,y.arguments=this.parseExprList(t.parenR,!0,!1),y.typeArguments=x,m)o.optional=!0;if(m||f)y.optional=m;return this.finishNode(y,"CallExpression")}if(this.type===t.backQuote)return y.tag=o,y.quasi=this.parseTemplate({isTagged:!0}),y.typeArguments=x,this.finishNode(y,"TaggedTemplateExpression");return y.expression=o,y.typeArguments=x,this.finishNode(y,"TSInstantiationExpression")}}if(u&&this.type===t.parenL)this.$m=!0;return super.parseSubscript(o,a,p,c,u,f,h)}$2k(o,a,p){let c=this.startNodeAt(o,a);if(c.typeParameters=this.$8(),this.expect(t.parenL),c.params=this.parseBindingList(t.parenR,!1,!0),this.type===t.colon)c.returnType=this.$6(!0);if(this.type!==t.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(c,c.params,!0,p)}parseDynamicImport(o){if(this.next(),o.source=this.parseMaybeAssign(),this.eat(t.comma)&&this.type!==t.parenR)o.arguments=[this.parseExpression()];return this.expect(t.parenR),this.finishNode(o,"ImportExpression")}parseNew(){let o=super.parseNew();if(o.callee?.type!=="TSInstantiationExpression")return o;let a=this.startNodeAt(o.start,o.loc?.start);return a.callee=o.callee.expression,a.typeArguments=o.callee.typeArguments,a.arguments=o.arguments,this.finishNodeAt(a,"NewExpression",o.end,o.loc?.end)}parseExprOp(o,a,p,c,u){if(t._in.binop>c&&this.type===t.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let f=this.value==="satisfies",h=this.startNodeAt(a,p);return h.expression=o,h.typeAnnotation=this.$a(()=>{if(this.next(),!f&&this.type===t._const){let m=this.startNode();return m.typeName=this.parseIdent(!0),this.finishNode(m,"TSTypeReference")}return this.$0()}),this.finishNode(h,f?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,a,p,c,u)}return super.parseExprOp(o,a,p,c,u)}parseGetterSetter(o){o.kind=o.key.name,super.parseGetterSetter(o)}parsePropertyValue(o,a,p,c,u,f,h,m){if(!a&&this.$1()){if(this.$k=this.$8(),this.type!==t.parenL)this.unexpected();o.kind="init"}return super.parsePropertyValue(o,a,p,c,u,f,h,m)}}return l});var ws=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),Wm=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),zm=new Set("get set new readonly static public private protected".split(" "));function Hl(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function _i(e){return e>=48&&e<=57}function As(e){return Hl(e)||_i(e)}class Wl{text;pos=0;constructor(e){this.text=e}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let e=this.text,t=this.pos,n=e.charCodeAt(t);while(n===32||n===9)n=e.charCodeAt(++t);return this.pos=t,n}eat(e){if(this.peek()!==e.charCodeAt(0))return!1;return this.pos++,!0}word(){let e=this.pos;return this.skipWord()?this.text.slice(e,this.pos):void 0}skipWord(){if(!Hl(this.peek()))return!1;let e=this.pos+1;while(As(this.text.charCodeAt(e)))e++;return this.pos=e,!0}keyword(e){this.peek();let t=this.pos+e.length;if(!this.text.startsWith(e,this.pos)||As(this.text.charCodeAt(t)))return!1;return this.pos=t,!0}name(){let e=this.word();return e!==void 0&&!ws.has(e)}string(){let e=this.peek();if(e!==34&&e!==39)return!1;let t=this.text;for(let n=this.pos+1;n<t.length;n++){let i=t.charCodeAt(n);if(i===e)return this.pos=n+1,!0;if(i===92||i===10||i===13||i===8232||i===8233)return!1}return!1}number(){let e=this.text,t=this.pos;if(e.charCodeAt(t)===45)t++;let n=t;while(_i(e.charCodeAt(t)))t++;if(t===n||t-n>1&&e.charCodeAt(n)===48)return!1;if(e.charCodeAt(t)===46){let r=++t;while(_i(e.charCodeAt(t)))t++;if(t===r)return!1}let i=e.charCodeAt(t);if(As(i)||i===46)return!1;return this.pos=t,!0}type(){if(this.peek()===40){let e=this.pos;if(this.functionType())return!0;this.pos=e}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){if(this.keyword("keyof"))return this.operatorType();if(!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let e=this.peek();if(e===40)return this.pos++,this.type()&&this.eat(")");if(e===123)return this.objectType();if(e===91)return this.tupleType();if(e===34||e===39)return this.string();if(e===45||_i(e))return this.number();let t=this.word();if(t===void 0)return!1;if(t==="typeof")return this.typeQuery();if(t==="import")return this.importType(!0);if(Wm.has(t)){let n=this.peek();return n!==46&&n!==60}if(ws.has(t))return!1;while(this.eat("."))if(!this.skipWord())return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){if(this.keyword("import"))return this.importType(!1);do if(!this.name())return!1;while(this.eat("."));return!0}importType(e){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!e||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let e=this.peek();if(this.eat("[")){let t=this.peek();if(t===34||t===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(e===34||e===39){if(!this.string())return!1}else{let t=this.word();if(t===void 0||zm.has(t))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let e=new Set;for(;;){this.peek();let t=this.text.startsWith("...",this.pos);if(t)this.pos+=3;let n=this.word();if(n===void 0||ws.has(n)||e.has(n))return!1;if(e.add(n),!t)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(t||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Um(e){return new Wl(e).readAll()}var Km=O.extend(Pi);function _n(e,t={}){return Um(e)||Jm(e,t.inline??!1)}function Jm(e,t){let n=!1,i=new Km(t?{ecmaVersion:16,sourceType:"module",onComment:(r,s,l,o)=>{if(!r&&o===e.length)n=!0}}:{ecmaVersion:16,sourceType:"module"},e);try{return i.parseWholeType(),!n}catch(r){if(r instanceof SyntaxError)return!1;throw r}}var Ps=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function Ni(e){return e.charCodeAt(0)===65279?e.slice(1):e}function Ze(e){return e>=48&&e<=57}function J(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function L(e,t){let n=t;while(n<e.length&&J(e.charCodeAt(n)))n++;return n}function $i(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){Ps.lastIndex=t;let i=Ps.exec(e);if(i){if(n===115)return i[2]==="ts";t=e.indexOf("<",Ps.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}function Ii(e,t){let n=e.indexOf("</script",t);while(n!==-1){if(e.charCodeAt(L(e,n+8))===Di)return n;n=e.indexOf("</script",n+8)}return-1}function Li(e,t){return L(e,t+8)+1}var Xm=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function Dn(e){return Xm.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function Ri(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===47&&e.charCodeAt(n+1)===42){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(i===34||i===39){n++;while(n<e.length){let r=e.charCodeAt(n);if(r===i||r===10)break;n+=r===92?2:1}n++}else if(i===60&&e.startsWith("</style",n))break;else n++}return Math.min(n,e.length)}var Ym=34,Qm=39,zl=47,Ul=61,Di=62,ve=(e)=>e===Ym||e===Qm;function Et(e,t,n){let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(J(r)||r===zl||r===Di)break;if(n&&(ve(r)||r===Ul))break}return i}function Mi(e,t){let n=e.charCodeAt(t);return J(n)||ve(n)||n===Ul||n===60||n===Di||n===96||n===zl&&e.charCodeAt(t+1)===Di}var Kl=0,I=1,Nn=2,W=3,Zm=0;var ey=2,Jl=3,Ql=4,$n=4,ty=5,ny=6,iy=7,ry={await:I,case:I,default:I,delete:I,extends:I,in:I,instanceof:I,new:I,of:I,return:I,throw:I,typeof:I,void:I,yield:I,do:Nn,else:Nn,finally:Nn,try:Nn,for:$n,if:$n,while:$n,with:$n,import:ty,export:ny,require:iy},Zl=10,_s=Array(Ds(128,0)).fill(null);for(let e of Object.entries(ry)){let t=Ds(e[0].charCodeAt(0),e[0].length),n=_s[t]??[];n.push(e),_s[t]=n}function Ds(e,t){return e*(Zl+1)+t}function sy(e,t,n){let i=e.charCodeAt(t);if(i>=128||n-t>Zl)return W;let r=Ds(i,n-t),s=_s[r];if(s===null)return W;for(let l=0;l<s.length;l++)if(e.startsWith(s[l][0],t))return s[l][1];return W}var ep=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let t=e.charCodeAt(0);t<=e.charCodeAt(1);t++)ep[t]=1;function Ns(e){return e>=128?!J(e):ep[e]===1}function tp(e,t,n){let i=e.length,r=[],s=t,l=I,o=!1;while(s<i){let a=e.charCodeAt(s);if(a===32||a===10||J(a)){s++;continue}if(a===47){let c=ay(e,s);if(c!==-1){s=c;continue}}let p=o;if(o=!1,Ns(a)||a===35){let c=s;if(s=ly(e,s+1),!p&&n?.(c,s))return-1;let u=p?W:sy(e,c,s);l=u===I||u===Nn||u===$n?I:W;continue}switch(s++,a){case 34:case 39:s=py(e,s,a),l=W;break;case 96:s=Yl(e,s,r),l=e.charCodeAt(s-1)===123?I:W;break;case 47:{let c=l===W?-1:cy(e,s);if(c===-1)l=I;else s=Xl(e,c),l=W;break}case 40:r.push(Zm),l=I;break;case 41:if(r.length===0)return s-1;r.pop(),l=W;break;case 123:r.push(l===I?Jl:ey),l=Kl;break;case 125:{if(r.length===0)return s-1;let c=r.pop();if(c===Ql)s=Yl(e,s,r),l=e.charCodeAt(s-1)===123?I:W;else l=c===Jl?W:Kl;break}case 93:l=W;break;case 46:if(Ze(e.charCodeAt(s)))s=Xl(e,s),l=W;else if(e.startsWith("..",s))s+=2,l=I;else o=!0,l=I;break;case 63:if(e.charCodeAt(s)===46&&!Ze(e.charCodeAt(s+1)))s++,o=!0;l=I;break;case 33:l=l===W&&!J(e.charCodeAt(s-2))?W:I;break;case 43:case 45:if(e.charCodeAt(s)===a&&l===W)s++;else l=I;break;case 61:if(e.charCodeAt(s)===62)s++;l=I;break;default:l=I}}return i}function np(e){return e===10||e===13||e===8232||e===8233}function oy(e,t){for(let n=t;n<e.length;n++)if(np(e.charCodeAt(n)))return n;return e.length}function ay(e,t){let n=e.charCodeAt(t+1);if(n===47)return oy(e,t+2);if(n!==42)return-1;let i=e.indexOf("*/",t+2);return i===-1?e.length:i+2}function ly(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===92)n+=2;else if(Ns(i))n++;else break}return n}function Xl(e,t){let n=t;while(n<e.length&&Ns(e.charCodeAt(n)))n++;return n}function py(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===n)return i+1;if(r===92)i+=e.startsWith(`\r
40
- `,i+1)?2:1;else if(r===10||r===13)return i}return e.length}function Yl(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===96)return i+1;if(r===92)i++;else if(r===36&&e.charCodeAt(i+1)===123)return n.push(Ql),i+2}return e.length}function cy(e,t){let n=!1;for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(np(r))return-1;if(r===92)i++;else if(r===91)n=!0;else if(r===93)n=!1;else if(r===47&&!n)return i+1}return-1}var ip={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function Oi(e,t){return Object.hasOwn(ip,e)&&ip[e].includes(t)}var rp="{",ap=60,Is=62,bt=47,lp=61,Ln=123,sp=/\s*>/y,$s=/<\/textarea(\s[^>]*)?>/iy,uy=["cript","tyle","velte:options"],op="</svelte:options";function Bi(e){let t=Ni(e).trimEnd();return dy(t,$i(t),null)}function dy(e,t,n){let i={typescript:t,instance:null,module:null,css:null,options:null},r=fy(e),s=[],l=0;while(l<=r){let o=e.charCodeAt(l);if(o===ap)l=yy(e,l,s,i,n);else if(o===Ln)l=my(e,l,s);else l++}return i}function fy(e){let t=-1,n=e.indexOf("<s");while(n!==-1){let i=hy(e,n+2);if(i!==-1){let r=e.charCodeAt(i);if(i===e.length||J(r)||r===bt||r===Is)t=n}n=e.indexOf("<s",n+2)}return t}function hy(e,t){for(let n of uy)if(e.startsWith(n,t))return t+n.length;return-1}function Rn(e,t){return Math.min(tp(e,t)+1,e.length)}function my(e,t,n){let i=L(e,t+1),r=e.charCodeAt(i),s=e.charCodeAt(i+1);if(r===35||r===58||r===64||r===bt&&s!==bt&&s!==42){i++;while(i<e.length){let l=e.charCodeAt(i);if(l<97||l>122)break;i++}if(r===35)n.push(rp);else if(r===bt){let l=n.lastIndexOf(rp);if(l!==-1)n.length=l}}return Rn(e,i)}function yy(e,t,n,i,r){if(e.startsWith("!--",t+1)){let c=e.indexOf("-->",t+4),u=c===-1?e.length:c+3;if(r&&n.length===0)r.comments.push(t,u);return u}if(e.charCodeAt(t+1)===bt){let c=t+2,u=e.slice(c,Et(e,c,!1)),f=n.lastIndexOf(u);if(f!==-1)n.length=f;return In(e,L(e,c+u.length))}let s=e.slice(t+1,Et(e,t+1,!1)),l=L(e,t+1+s.length),o=n[n.length-1];if(o!==void 0&&Oi(o,s))n.pop();let a=n.length===0;if(r&&a&&(s==="script"||s==="style"||s==="svelte:options"))r.tags.push(t);if(a&&(s==="script"||s==="style")){let c=[];if(l=In(e,Ey(e,l,c)),s==="script"){let f=gy(e,t,l,c);if(f.context==="module")i.module??=f;else i.instance??=f;return f.end}let u=xy(e,t,l,c);return i.css??=u,u.end}let p=a&&s==="svelte:options"?[]:null;if(l=by(e,l,p),e.charCodeAt(l)===bt||Dn(s)){if(e.charCodeAt(l)===bt)l++;l=In(e,l)}else{if(l=In(e,l),s==="textarea")return Sy(e,l);if(s==="script"||s==="style"){let c=`</${s}>`,u=e.indexOf(c,l);return u===-1?e.length:u+c.length}if(p&&e.startsWith(op,l))l=In(e,L(e,l+op.length));else return n.push(s),l}if(p)i.options??={start:t,end:l,attributes:p};return l}function In(e,t){return e.charCodeAt(t)===Is?t+1:t}function gy(e,t,n,i){let r=Ii(e,n),s=r===-1?e.length:r,l=i.some((o)=>o.name==="module"||o.name==="context");return{start:t,end:r===-1?e.length:Li(e,r),context:l?"module":"default",attributes:i,content:{start:n,end:s}}}function xy(e,t,n,i){let r=Ri(e,n),s=r;if(e.startsWith("</style",s)){s+=7,sp.lastIndex=s;let l=sp.exec(e);if(l)s+=l[0].length}return{start:t,end:s,attributes:i,content:{start:n,end:r}}}function Ey(e,t,n){let i=t;for(;;){let r=i,s=Et(e,i,!0);if(s===r)return i;i=s;let l=!0;if(e.charCodeAt(i)===lp){let o=L(e,i+1),a=e.charCodeAt(o),p=-1;if(ve(a)){let u=e.indexOf(e[o],o+1);if(u!==-1)p=u+1}if(p===-1){p=o;while(p<e.length&&e.charCodeAt(p)!==Is&&!J(e.charCodeAt(p)))p++}let c=ve(a)?1:0;l=e.slice(o+c,p-c),i=p}n.push({name:e.slice(r,s),value:l,start:r,end:i}),i=L(e,i)}}function by(e,t,n){let i=t;for(;;){for(;;){if(e.startsWith("/*",i)){let a=e.indexOf("*/",i+2);i=a===-1?e.length:a+2}else if(e.startsWith("//",i)){let a=e.indexOf(`
41
- `,i+2);i=a===-1?e.length:a}else break;i=L(e,i)}let r=i;if(e.charCodeAt(i)===Ln){i=L(e,Rn(e,i+1));continue}let s=Et(e,i,!0);if(s===r)return i;let l=s,o=!0;if(i=L(e,s),e.charCodeAt(i)===lp){let a=L(e,i+1);l=e.startsWith("/>",a)?a+1:vy(e,a),o=ve(e.charCodeAt(a))?e.slice(a+1,Math.max(a+1,l-1)):e.slice(a,l),i=L(e,l)}n?.push({name:e.slice(r,s),value:o,start:r,end:l})}}function vy(e,t){let n=e.charCodeAt(t);if(ve(n)){let r=t+1;while(r<e.length){let s=e.charCodeAt(r);if(s===n)return r+1;r=s===Ln?Rn(e,r+1):r+1}return e.length}let i=t;while(i<e.length&&!Mi(e,i))i=e.charCodeAt(i)===Ln?Rn(e,i+1):i+1;return i}function Sy(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===ap){if($s.lastIndex=n,$s.test(e))return $s.lastIndex}n=i===Ln?Rn(e,n+1):n+1}return e.length}function Fi(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var Ty=/^\t+/;class E extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(e,t,n){super(`${n}
42
- https://svelte.dev/e/${t}`);this.code=t,this.reason=n;let i=typeof e==="number"?e:e?.start,r=typeof e==="number"?e:e?.end;if(i!==void 0)this.position=[i,r??i],this.start=ke(this.position[0]),this.end=ke(this.position[1]),this.frame=Cy(this.start.line-1,this.end.column)}}var pp=(e)=>e.replace(Ty,(t)=>" ".repeat(t.length));function Cy(e,t){let n=Math.max(0,e-2),i=[];for(let s=n;s<e+3;s++){let l=Vo(s);if(l===void 0)break;i.push(l)}let r=String(n+i.length+1).length;return i.map((s,l)=>{let o=`${String(n+l+1).padStart(r," ")}: ${pp(s)}`;if(n+l!==e)return o;return`${o}
43
- ${" ".repeat(r+2+pp(s.slice(0,t)).length)}^`}).join(`
44
- `)}function dp(e){throw new E(e,"attribute_duplicate","Attributes need to be unique")}function fp(e){throw new E(e,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function hp(e,t){throw new E(e,"block_duplicate_clause",`${t} cannot appear more than once within a block`)}function mp(e){throw new E(e,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function yp(e){throw new E(e,"block_invalid_elseif","'elseif' should be 'else if'")}function gp(e,t,n){throw new E(e,"block_invalid_placement",`{#${t} ...} block cannot be ${n}`)}function xp(e){throw new E(e,"block_unclosed","Block was left open")}function Ep(e){throw new E(e,"block_unexpected_close","Unexpected block closing tag")}function bp(e){throw new E(e,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function vp(e){throw new E(e,"css_empty_declaration","Declaration cannot be empty")}function Ms(e){throw new E(e,"css_expected_identifier","Expected a valid CSS identifier")}function Sp(e){throw new E(e,"css_selector_invalid","Invalid selector")}function Tp(e){throw new E(e,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function Os(e){throw new E(e,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function Cp(e){throw new E(e,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function kp(e,t){throw new E(e,"directive_missing_name",`\`${t}\` name cannot be empty`)}function wp(e,t){throw new E(e,"element_invalid_closing_tag",`\`</${t}>\` attempted to close an element that was not open`)}function Ap(e,t,n){throw new E(e,"element_invalid_closing_tag_autoclosed",`\`</${t}>\` attempted to close element that was already automatically closed by \`<${n}>\` (cannot nest \`<${n}>\` inside \`<${t}>\`)`)}function Bs(e,t){throw new E(e,"element_unclosed",`\`<${t}>\` was left open`)}function Fs(e){throw new E(e,"expected_attribute_value","Expected attribute value")}function Pp(e){throw new E(e,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function js(e){throw new E(e,"expected_identifier","Expected an identifier")}function _p(e){throw new E(e,"expected_pattern","Expected identifier or destructure pattern")}function Dp(e){throw new E(e,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function et(e,t){throw new E(e,"expected_token",`Expected token ${t}`)}function Np(e){throw new E(e,"expected_whitespace","Expected whitespace")}function ky(e,t){throw new E(e,"js_parse_error",`${t}`)}function $p(e){throw new E(e,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Ip(e){throw new E(e,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function Lp(e,t){throw new E(e,"script_invalid_attribute_value",`If the \`${t}\` attribute is supplied, it must be a boolean attribute`)}function Rp(e){throw new E(e,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Mp(e,t){throw new E(e,"script_reserved_attribute",`The \`${t}\` attribute is reserved and cannot be used`)}function Op(e){throw new E(e,"style_duplicate","A component can have a single top-level `<style>` element")}function Bp(e){throw new E(e,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function Fp(e){throw new E(e,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function qs(e){throw new E(e,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function jp(e,t){throw new E(e,"svelte_meta_duplicate",`A component can only have one \`<${t}>\` element`)}function qp(e,t){throw new E(e,"svelte_meta_invalid_content",`<${t}> cannot have children`)}function Vp(e,t){throw new E(e,"svelte_meta_invalid_placement",`\`<${t}>\` tags cannot be inside elements or blocks`)}function Gp(e,t){throw new E(e,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${t}`)}function Hp(e){throw new E(e,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Wp(e){throw new E(e,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function qi(e,t){throw new E(e,"svelte_options_invalid_attribute_value",`Value must be ${t}, if specified`)}function zp(e){throw new E(e,"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 Up(e){throw new E(e,"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 Kp(e){throw new E(e,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function Vs(e){throw new E(e,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Jp(e){throw new E(e,"svelte_options_reserved_tagname","Tag name is reserved")}function Xp(e,t){throw new E(e,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${t}'`)}function Yp(e){throw new E(e,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function Qp(e,t,n){throw new E(e,"tag_invalid_placement",`{@${t} ...} tag cannot be ${n}`)}function de(e){throw new E(e,"unexpected_eof","Unexpected end of input")}function Zp(e,t){throw new E(e,"unexpected_reserved_word",`'${t}' is a reserved word in JavaScript and cannot be used here`)}function ec(e){throw new E(e,"unterminated_string_constant","Unterminated string constant")}function tc(e){throw new E(e,"void_element_invalid_content","Void elements cannot have children or closing tags")}var Ft="",nc=[],Vi=0,G=[],H=0;function wy(e,t){Ft=e,nc=t,Vi=0}function Ay(){return Vi}function Py(e,t,n,i){Vi=i}function _y(e,t,n,i,r,s){Vi=i;let l=t;if(e&&l.includes(`
45
- `)){let a=Ft.lastIndexOf(`
46
- `,n-1)+1,p=a,c=Ft.charCodeAt(p);while(c===32||c===9)c=Ft.charCodeAt(++p);if(p>a)l=Dy(l,Ft.slice(a,p))}let o={type:e?"Block":"Line",value:l,start:n,end:i};if(r&&s)o.loc={start:r,end:s};nc.push(o)}function Dy(e,t){let n=e.startsWith(t)?t.length:0,i="",r=e.indexOf(`
39
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return bi(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(e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(i,8);if(r>255)i=i.slice(0,-1),r=parseInt(i,8);if(this.pos+=i.length-1,t=this.input.charCodeAt(this.pos),(i!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-i.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(r)}if(Ot(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};k.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);if(n===null)this.invalidStringToken(t,"Bad character escape sequence");return n};k.readWord1=function(){this.containsEsc=!1;var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var r=this.fullCharCodeAtPos();if(Fe(r,i))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var s=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var a=this.readCodePoint();if(!(t?be:Fe)(a,i))this.invalidStringToken(s,"Invalid Unicode escape");e+=bi(a),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};k.readWord=function(){var e=this.readWord1(),t=d.name;if(this.keywords.test(e))t=ms[e];return this.finishToken(t,e)};var wm="8.18.0";B.acorn={Parser:B,version:wm,defaultOptions:ds,Position:Sn,SourceLocation:vi,getLineInfo:Cl,Node:ki,TokenType:N,tokTypes:d,keywordTypes:ms,TokContext:Ee,tokContexts:M,isIdentifierChar:Fe,isIdentifierStart:be,Token:vs,isNewLine:Ot,lineBreak:Z,lineBreakG:dm,nonASCIIwhitespace:Tl};function wn(e){return(t)=>e(t)}function wi(...e){return B.extend(...e)}function An(e,t,n){for(let i=t;i<n;i++){let r=e.charCodeAt(i);if(r===10||r===13||r===8232||r===8233)return!0}return!1}var bl=new WeakMap;function ee(e,t){if(e===void 0)return!1;if(e.length<16)return e.includes(t);let n=bl.get(e);if(n===void 0||n.length>e.length)n={names:new Set,length:0},bl.set(e,n);while(n.length<e.length)n.names.add(e[n.length++]);return n.names.has(t)}var Ss=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,Am=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"]]),Pm=new Set("public private protected readonly declare abstract override static accessor".split(" ")),_m=new Set("public private protected readonly override".split(" ")),Dm=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),Nm=new Set("var let const function class interface enum".split(" ")),Bl=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),Fl=1,$m=32,Im=256,Lm=0,Rm=1,Pn=2,Mm=3,Om=4,Ts=6,jl=7,zl=256,As=1024,Bm=8|As,Fm=Pn|zl,ql=1,jm=2,Vl=40,qm=41,Vm=44,Gl=46,Hl=58,Ai=61,Wl=60,Pi=123,Gm=91,Cs=42,Hm=35,ks=34,ws=39,Wm=SyntaxError("speculative parse failed"),_i=wn((e)=>{let{tokTypes:t,keywordTypes:n,isIdentifierChar:i,isIdentifierStart:r}=e.acorn,s=new e.acorn.TokenType("@");class a extends e{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(o,l,p){super(o,l,p);let c=this.options.onComment;if(typeof c==="function")this.options.onComment=(u,f,h,m,g,y)=>{if(h<this.$t)return;this.$t=m,c.call(this,u,f,h,m,g,y)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$k=null,this.$l=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(o){if(o===64)return++this.pos,this.finishToken(s);return super.getTokenFromCode(o)}readToken_lt_gt(o){if(this.inType)return this.finishOp(t.relational,1);return super.readToken_lt_gt(o)}$a(o){let l=this.inType;this.inType=!0;let p=o();if(this.inType=l,!l&&this.type===t.relational)this.pos=this.start,this.nextToken();return p}$1(){return this.type===t.relational&&this.value==="<"}$p(){if(this.type===t.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(t.relational,"<");return this.$1()}$c(){return this.type===t.relational&&this.value===">"}$u(){return this.type===t.prefix&&this.value==="!"}hasPrecedingLineBreak(){return An(this.input,this.lastTokEnd,this.start)}$d(o=this.pos){return Ss.lastIndex=o,Ss.exec(this.input),Ss.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let o=this.$d(),l=o;while(l<this.input.length&&i(this.input.charCodeAt(l)))l++;return this.input.slice(o,l)}$b(){return!An(this.input,this.pos,this.$d())}$14(){return this.$b()&&r(this.$2())&&!Object.hasOwn(n,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(o){this.pos=o.pos,this.type=o.type,this.value=o.value,this.start=o.start,this.end=o.end,this.startLoc=o.startLoc,this.endLoc=o.endLoc,this.lastTokStart=o.lastTokStart,this.lastTokEnd=o.lastTokEnd,this.lastTokStartLoc=o.lastTokStartLoc,this.lastTokEndLoc=o.lastTokEndLoc,this.curLine=o.curLine,this.lineStart=o.lineStart,this.context=o.context,this.exprAllowed=o.exprAllowed,this.containsEsc=o.containsEsc,this.inType=o.inType,this.$4=o.$4,this.$5=o.$5,this.$7=o.$7,this.scopeStack.length=o.scopes,this.privateNameStack.length=o.privateNames,this.labels=o.labels,this.labels.length=o.labelCount,this.strict=o.strict,this.yieldPos=o.yieldPos,this.awaitPos=o.awaitPos,this.awaitIdentPos=o.awaitIdentPos,this.potentialArrowAt=o.potentialArrowAt,this.potentialArrowInForAwait=o.potentialArrowInForAwait}raise(o,l){if(this.$n>0)throw Wm;return super.raise(o,l)}$1y(o,l){try{super.raise(o,l)}catch(p){if(p instanceof SyntaxError)p.$1z=!0;throw p}throw Error("unreachable")}$g(o,l=!1){let p=this.$15();this.$n++;try{let c=o();if(l||c===void 0)this.$16(p);return c}catch(c){if(!(c instanceof SyntaxError)||!l&&c.$1z)throw c;this.$16(p);return}finally{this.$n--}}$v(o){return this.$g(o,!0)===!0}$17(o){if(o.end=this.lastTokEnd,this.options.locations)o.loc.end=this.lastTokEndLoc}$q(o,l){if(o.start=l.start,this.options.locations)o.loc.start=l.loc.start}$6(o=!1){let l=this.startNode();return l.typeAnnotation=this.$a(()=>(this.next(),o?this.$20():this.$0())),this.finishNode(l,"TSTypeAnnotation")}$h(o,l){if(l&&this.eat(t.question))o.optional=!0,this.$17(o);if(this.type===t.colon)o.typeAnnotation=this.$6(),this.$17(o);return o}$20(){if(this.type!==t.name&&this.type!==t._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&r(this.$2())){let o=this.startNode();if(this.next(),o.parameterName=this.type===t._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(o,!0);return o.asserts=!0,o.typeAnnotation=null,this.finishNode(o,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let o=this.startNode();return o.parameterName=this.type===t._this?this.$w():this.parseIdent(!0),this.$x(o,!1)}return this.$0()}$x(o,l){this.next();let p=this.startNode();return p.typeAnnotation=this.$0(),o.typeAnnotation=this.finishNode(p,"TSTypeAnnotation"),o.asserts=l,this.finishNode(o,"TSTypePredicate")}$w(){let o=this.startNode();return this.next(),this.finishNode(o,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let o=this.$0();if(this.type!==t.eof)this.unexpected();return o}$0(){let o=this.$18();if(this.$4||this.type!==t._extends||this.hasPrecedingLineBreak())return o;let l=this.startNodeAt(o.start,o.loc?.start);return this.next(),l.checkType=o,l.extendsType=this.$i(!0,()=>this.$18()),this.expect(t.question),l.trueType=this.$i(!1,()=>this.$0()),this.expect(t.colon),l.falseType=this.$i(!1,()=>this.$0()),this.finishNode(l,"TSConditionalType")}$i(o,l){let p=this.$4;this.$4=o;let c=l();return this.$4=p,c}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===t._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",t.bitwiseOR,()=>this.$1a("TSIntersectionType",t.bitwiseAND,()=>this.$1b()))}$19(o){let l=this.startNode();if(o==="TSConstructorType"){if(l.abstract=this.isContextual("abstract"),l.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(l,t.arrow)),this.finishNode(l,o)}$r(o,l){if(this.$1())o.typeParameters=this.$8();if(this.expect(t.parenL),o.parameters=this.parseBindingList(t.parenR,!1,!0),this.type===l)o.typeAnnotation=this.$6(!0);else if(l===t.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==t.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===t.parenR||this.type===t.ellipsis)return!0;if(this.type===t.name||this.type===t._this)this.next();else if(this.type===t.braceL||this.type===t.bracketL)this.parseBindingAtom();else return!1;let o=this.type;if(o===t.colon||o===t.comma||o===t.question||o===t.eq)return!0;if(o!==t.parenR)return!1;return this.next(),this.type===t.arrow})}$1a(o,l,p){let c=this.startNode(),u=this.eat(l),f=[];do f.push(p());while(this.eat(l));if(f.length===1&&!u)return f[0];return c.types=f,this.finishNode(c,o)}$1b(){if(this.type===t.name&&!this.containsEsc){let o=this.value;if(o==="keyof"||o==="unique"||o==="readonly"){let l=this.startNode();return this.next(),l.operator=o,l.typeAnnotation=this.$1b(),this.finishNode(l,"TSTypeOperator")}if(o==="infer"){let l=this.startNode();this.next();let p=this.startNode();p.name=this.$y();let c=this.$g(()=>this.$22());if(c)p.constraint=c;return l.typeParameter=this.finishNode(p,"TSTypeParameter"),this.finishNode(l,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(t._extends))return;let o=this.$i(!0,()=>this.$0());return this.$4||this.type!==t.question?o:void 0}$y(){if(this.type!==t.name&&!this.type.keyword)this.unexpected();let o=this.type===t.name?this.value:this.type.keyword;return this.next(),o}$23(){let o=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(t.bracketL)){let l=this.startNodeAt(o.start,o.loc?.start);if(this.eat(t.bracketR))l.elementType=o,o=this.finishNode(l,"TSArrayType");else l.objectType=o,l.indexType=this.$0(),this.expect(t.bracketR),o=this.finishNode(l,"TSIndexedAccessType")}return o}$24(){switch(this.type){case t.name:case t._void:case t._null:{let o=Am.get(this.value);if(o&&(this.type!==t.name||!this.containsEsc&&this.$2()!==Gl)){let l=this.startNode();return this.next(),this.finishNode(l,o)}return this.$1c()}case t.string:case t.num:case t._true:case t._false:{let o=this.startNode();return o.literal=this.parseExprAtom(),this.finishNode(o,"TSLiteralType")}case t.plusMin:{if(this.value!=="-")break;let o=this.startNode(),l=this.startNode();if(this.next(),this.type!==t.num)this.unexpected();return l.operator="-",l.prefix=!0,l.argument=this.parseExprAtom(),o.literal=this.finishNode(l,"UnaryExpression"),this.finishNode(o,"TSLiteralType")}case t.backQuote:return this.$25();case t._this:{let o=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let l=this.startNodeAt(o.start,o.loc?.start);return l.parameterName=o,this.$x(l,!1)}return o}case t._typeof:return this.$26();case t._import:return this.$1d();case t.braceL:return this.$27()?this.$28():this.$29();case t.bracketL:return this.$2a();case t.parenL:{let o=this.startNode();return this.next(),o.typeAnnotation=this.$0(),this.expect(t.parenR),this.finishNode(o,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let o=this.startNode();if(o.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeReference")}$j(){let o=this.parseIdent(!0);while(this.eat(t.dot)){let l=this.startNodeAt(o.start,o.loc?.start);l.left=o,l.right=this.parseIdent(!0),o=this.finishNode(l,"TSQualifiedName")}return o}$26(){let o=this.startNode();if(this.next(),o.exprName=this.type===t._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSTypeQuery")}$1d(){let o=this.startNode();if(this.next(),o.argument=this.$1e(),this.eat(t.dot))o.qualifier=this.$j();if(this.$1())o.typeArguments=this.$e();return this.finishNode(o,"TSImportType")}$z(){if(this.type!==t.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(t.parenL);let o=this.$z();return this.expect(t.parenR),o}$25(){let o=this.startNode(),l=this.startNode();this.next(),l.expressions=[];let p=this.parseTemplateElement({isTagged:!1});l.quasis=[p];while(!p.tail){if(this.type===t.eof)this.raise(this.pos,"Unterminated template literal");this.expect(t.dollarBraceL),l.expressions.push(this.$0()),this.expect(t.braceR),p=this.parseTemplateElement({isTagged:!1}),l.quasis.push(p)}return this.next(),o.literal=this.finishNode(l,"TemplateLiteral"),this.finishNode(o,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===t.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==t.bracketL)return!1;if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t._in})}$28(){let o=this.startNode();if(this.expect(t.braceL),this.type===t.plusMin)o.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))o.readonly=!0;this.expect(t.bracketL);let l=this.startNode();if(l.name=this.$y(),this.expect(t._in),l.constraint=this.$0(),o.typeParameter=this.finishNode(l,"TSTypeParameter"),o.nameType=this.eatContextual("as")?this.$0():null,this.expect(t.bracketR),this.type===t.plusMin)o.optional=this.value,this.next(),this.expect(t.question);else if(this.eat(t.question))o.optional=!0;if(this.eat(t.colon))o.typeAnnotation=this.$0();return this.semicolon(),this.expect(t.braceR),this.finishNode(o,"TSMappedType")}$29(){let o=this.startNode();return o.members=this.$1f(),this.finishNode(o,"TSTypeLiteral")}$1f(){this.expect(t.braceL);let o=[];while(!this.eat(t.braceR))o.push(this.$2b());return o}$2b(){let o=this.startNode(),l="TSPropertySignature",p=this.type===t._new?this.$2():-1;if(this.type===t.parenL||this.$1())l="TSCallSignatureDeclaration",this.$r(o,t.colon);else if(p===Vl||p===Wl)l="TSConstructSignatureDeclaration",this.next(),this.$r(o,t.colon);else{let c=this.type===t._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),o.readonly=!0;if(this.type===t.bracketL&&this.$1g())return this.$1h(o);let u="method";if(c)o.key=c;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))u=this.value,this.next();this.parsePropertyName(o)}if(this.eat(t.question))o.optional=!0;if(this.type===t.parenL||this.$1()){if(l="TSMethodSignature",u!=="method")o.kind=u;this.$r(o,t.colon),o.kind=u}else if(this.type===t.colon)o.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(o,l)}$1i(){if(!this.eat(t.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==t.name)return!1;return this.next(),this.type===t.colon})}$1h(o){if(this.expect(t.bracketL),o.parameters=[this.$h(this.parseIdent(),!1)],this.expect(t.bracketR),this.type===t.colon)o.typeAnnotation=this.$6();return this.$1i(),this.finishNode(o,"TSIndexSignature")}$2a(){let o=this.startNode();this.expect(t.bracketL),o.elementTypes=[];while(!this.eat(t.bracketR))if(o.elementTypes.push(this.$2c()),this.type!==t.bracketR)this.expect(t.comma);return this.finishNode(o,"TSTupleType")}$2c(){let o=this.start,l=this.startLoc,p=this.eat(t.ellipsis),c;if((this.type===t.name||this.type.keyword)&&this.$2d()){let u=this.startNode();u.label=this.parseIdent(!0),u.optional=this.eat(t.question),this.expect(t.colon),u.elementType=this.$0(),c=this.finishNode(u,"TSNamedTupleMember")}else if(c=this.$0(),this.eat(t.question)){let u=this.startNodeAt(c.start,c.loc?.start);u.typeAnnotation=c,c=this.finishNode(u,"TSOptionalType")}if(p){let u=this.startNodeAt(o,l);u.typeAnnotation=c,c=this.finishNode(u,"TSRestType")}return c}$2d(){let o=this.$d();if(this.input.charCodeAt(o)===63)o=this.$d(o+1);return this.input.charCodeAt(o)===Hl}$8(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c()){let l=this.startNode();while((this.type===t._const||this.type===t._in||this.isContextual("out"))&&r(this.$2()))l[this.value]=!0,this.next();if(l.name=this.$y(),this.eat(t._extends))l.constraint=this.$0();if(this.eat(t.eq))l.default=this.$0();if(o.params.push(this.finishNode(l,"TSTypeParameter")),!this.$c()){if(this.expect(t.comma),this.$c())o.extra={trailingComma:this.lastTokStart}}}if(this.next(),o.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(o,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let o=this.startNode();this.next(),o.params=[];while(!this.$c())if(o.params.push(this.$0()),!this.$c())this.expect(t.comma);if(o.params.length===0)this.unexpected();return this.next(),this.finishNode(o,"TSTypeParameterInstantiation")})}$1j(){let o=[];do{let l=this.startNode();if(l.expression=this.$j(),this.$1())l.typeParameters=this.$e();o.push(this.finishNode(l,"TSExpressionWithTypeArguments"))}while(this.eat(t.comma));return o}$1k(o=!1){if(this.type!==t.name||this.containsEsc){if(this.type===t._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(o);return this.$1l(this.startNode(),this.value)}$2e(o){switch(o){case"interface":case"type":case"namespace":return this.$14();case"enum":return r(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let l=this.$2();return this.$b()&&(l===ks||l===ws||r(l))}case"declare":return this.$b()&&Dm.has(this.$3());case"global":return this.$b()&&this.$2()===Pi}return!1}$1l(o,l){switch(l){case"interface":return this.$1m(o);case"type":return this.$2g(o);case"enum":return this.$10(o);case"abstract":return this.$1n(o,!0);case"global":return o.global=!0,o.id=this.parseIdent(),o.body=this.$11(),this.finishNode(o,"TSModuleDeclaration")}return this.$2h(o)}$2f(o){let l=this.$5;this.$5=!0;let p=this.startNode();this.next();let c=this.value;if(c==="const"&&this.$3()==="enum")p.const=!0;if(!o&&Nm.has(c))p.declare=!0;let u;if(p.const)u=this.$10(p);else if(c==="var"||c==="let"||c==="const")u=this.parseVarStatement(p,c,!0);else if(c==="function")this.next(),u=this.parseFunction(p,ql,!1,!1);else if(c==="class")u=this.parseClass(p,!0);else u=this.$1l(p,c);return u.declare=!0,this.$5=l,u}$1n(o,l){return this.next(),o.abstract=!0,this.parseClass(o,l)}$1m(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,jl),this.$1())o.typeParameters=this.$8();return this.$a(()=>{if(this.eat(t._extends))o.extends=this.$1j();let l=this.startNode();l.body=this.$1f(),o.body=this.finishNode(l,"TSInterfaceBody")}),this.finishNode(o,"TSInterfaceDeclaration")}$2g(o){if(this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Ts),this.$1())o.typeParameters=this.$8();return o.typeAnnotation=this.$a(()=>(this.expect(t.eq),this.$0())),this.semicolon(),this.finishNode(o,"TSTypeAliasDeclaration")}$10(o){if(this.type===t._const)o.const=!0,this.next();this.next(),o.id=this.parseIdent(),this.checkLValSimple(o.id,Fm),this.expect(t.braceL),o.members=[];while(!this.eat(t.braceR)){let l=this.startNode();if(l.id=this.type===t.string?this.parseExprAtom():this.parseIdent(!0),this.eat(t.eq))l.initializer=this.parseMaybeAssign();if(o.members.push(this.finishNode(l,"TSEnumMember")),this.type!==t.braceR)this.expect(t.comma)}return this.finishNode(o,"TSEnumDeclaration")}$2h(o){if(this.next(),this.type===t.string){if(o.id=this.parseExprAtom(),this.type===t.braceL)o.body=this.$11();else this.semicolon();return this.finishNode(o,"TSModuleDeclaration")}return o.id=this.parseIdent(),this.checkLValSimple(o.id,Bm),this.$1o(o)}$1o(o){if(this.eat(t.dot)){let l=this.startNode();l.id=this.parseIdent(),o.body=this.$1o(l)}else o.body=this.$11();return this.finishNode(o,"TSModuleDeclaration")}$11(){this.enterScope(Im);let o=this.startNode();this.enterScope(0),this.expect(t.braceL),o.body=[];while(!this.eat(t.braceR))o.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(o,"TSModuleBlock")}$1p(o,l){if(o.isExport=l,o.id=this.parseIdent(),this.checkLValSimple(o.id,Pn),this.expect(t.eq),this.isContextual("require")&&this.$2()===Vl){let p=this.startNode();this.next(),p.expression=this.$1e(),o.moduleReference=this.finishNode(p,"TSExternalModuleReference")}else o.moduleReference=this.$j();return this.semicolon(),this.finishNode(o,"TSImportEqualsDeclaration")}$2i(){let o=this.$d();if(this.input.charCodeAt(o)!==Ai)return!1;let l=this.input.charCodeAt(o+1);return l!==Ai&&l!==62}parseStatement(o,l,p){if(this.type===s)this.$1q(!0);let c=this.$1k();if(c)return c;return super.parseStatement(o,l,p)}parseVarStatement(o,l,p){return super.parseVarStatement(o,l,p||this.$5)}parseVarId(o,l){if(super.parseVarId(o,l),o.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),o.definite=!0;this.$h(o.id,!1)}parseCatchClauseParam(){let o=this.$h(this.parseBindingAtom(),!1),l=o.type==="Identifier";return this.enterScope(l?$m:0),this.checkLValPattern(o,l?Om:Pn),this.expect(t.parenR),o}parseImport(o){if(this.next(),o.importKind="value",this.type===t.string)o.specifiers=[],o.source=this.parseExprAtom();else{if(this.isContextual("type")){let l=this.$2();if(l===Pi||l===Cs||r(l)&&this.$3()!=="from")o.importKind="type",this.next()}if(this.type===t.name&&this.$2i())return this.$1p(o,!1);o.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),o.source=this.$z()}return this.$1r(o),this.semicolon(),this.finishNode(o,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=t._with;return this.type===t._with?super.parseWithClause():void 0}$1r(o){let l=this.parseWithClause();if(l)o.attributes=l}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(o){return this.$1s("exportKind",()=>super.parseExportSpecifier(o))}$1s(o,l){let p=this.isContextual("type")?this.$2():-1;if(p===ks||p===ws||r(p)&&this.$3()!=="as"){let u=this.startNode();this.next();let f=l();return this.$q(f,u),f[o]="type",f}let c=l();return c[o]="value",c}parseExport(o,l){if(this.next(),this.eat(t._import)){if(o.importKind="value",this.isContextual("type")&&r(this.$2())&&this.$3()!=="from")o.importKind="type",this.next();return this.$1p(o,!0)}if(this.eat(t.eq))return o.expression=this.parseExpression(),this.semicolon(),this.finishNode(o,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),o.id=this.parseIdent(),this.semicolon(),this.finishNode(o,"TSNamespaceExportDeclaration");if(o.exportKind="value",this.isContextual("type")){let u=this.$2();if(u===Pi||u===Cs)o.exportKind="type",this.next()}if(this.eat(t.star))return this.parseExportAllDeclaration(o,l);if(this.eat(t._default)){if(this.isContextual("interface")&&this.$14())o.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")o.declaration=this.$1n(this.startNode(),"nullableID");else o.declaration=this.parseExportDefaultDeclaration();return this.finishNode(o,"ExportDefaultDeclaration")}let p=this.isContextual("declare"),c=this.$1k(!0);if(c||this.shouldParseExportStatement()){if(o.declaration=c??this.parseStatement(null),p||o.declaration.type==="TSInterfaceDeclaration"||o.declaration.type==="TSTypeAliasDeclaration")o.exportKind="type";return o.specifiers=[],o.source=null,this.finishNode(o,"ExportNamedDeclaration")}if(o.declaration=null,o.specifiers=this.parseExportSpecifiers(l),this.eatContextual("from"))o.source=this.$z(),this.$1r(o);else{for(let u of o.specifiers)if(this.checkUnreserved(u.local),this.checkLocalExport(u.local),u.local.type==="Literal")this.raise(u.local.start,"A string literal cannot be used as an exported binding without `from`.");o.source=null}return this.semicolon(),this.finishNode(o,"ExportNamedDeclaration")}parseFunction(o,l,p,c,u){let f=l&ql;if(f)this.$f=o,this.$o=o.start;super.parseFunction(o,l,p,c,u),this.$f=null;let h=!o.body;if(h)o.type="TSDeclareFunction";if(f&&o.id){if(h){if(this.$5&&this.currentScope().flags&Fl)this.declareName(o.id.name,As,o.id.start);this.checkLValSimple(o.id,Lm)}else if(!(l&jm)){let m=Mm;if(this.strict||o.generator||o.async)m=this.treatFunctionsAsVar?Rm:Pn;this.checkLValSimple(o.id,m)}}return o}parseFunctionParams(o){if(this.$1())o.typeParameters=this.$8();if(super.parseFunctionParams(o),this.type===t.colon)o.returnType=this.$6(!0)}parseFunctionBody(o,l,p,c){if(p&&this.type===t.colon)o.returnType=this.$6(!0);if(l||this.type===t.braceL||o.start!==this.$o){super.parseFunctionBody(o,l,p,c);return}this.semicolon(),this.exitScope()}parseMethod(o,l,p){let c=this.$k;this.$k=null;let u=super.parseMethod(o,l,p);if(!u.body)u.type="TSDeclareMethod";if(c)u.typeParameters=c;return u}parseBindingList(o,l,p,c){let u=c===!0||this.$l;return this.$l=!1,super.parseBindingList(o,l,p,u)}$s(o){if(!o&&!this.$b())return!1;let l=this.$2();return l===Gm||l===Pi||l===Cs||l===Gl||l===Hm||l===ks||l===ws||l>=48&&l<=57||r(l)}parseAssignableListItem(o){let l=this.$12(),p=this.start,c=this.startLoc,u,f=!1,h=!1;if(o)while(this.type===t.name&&_m.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")f=!0;else if(this.value==="override")h=!0;else u=this.value;this.next()}let m;if(this.type===t._this)m=this.startNode(),m.name="this",this.next(),this.finishNode(m,"Identifier");else m=this.parseBindingAtom();let g=this.type===t.eq?this.parseMaybeDefault(p,c,m):this.parseMaybeDefault(m.start,m.loc?.start,this.$h(m,!0));if(l.length>0)g.decorators=l;if(!u&&!f&&!h)return g;let y=this.startNodeAt(p,c);if(u)y.accessibility=u;if(f)y.readonly=!0;if(h)y.override=!0;return y.parameter=g,this.finishNode(y,"TSParameterProperty")}parseBindingListItem(o){if(o.type==="RestElement")this.$h(o,!0);return o}checkLValSimple(o,l,p){if(this.$f&&o===this.$f.id){this.$f=null;return}if(!l&&Bl.has(o.type)){this.checkLValSimple(o.expression,l,p);return}switch(o.type){case"TSParameterProperty":this.checkLValInnerPattern(o.parameter,l,p);return;case"Identifier":if(o.name==="this")return}super.checkLValSimple(o,l,p)}toAssignable(o,l,p){if(o&&!l&&Bl.has(o.type))return o;return super.toAssignable(o,l,p)}declareName(o,l,p){let c=this.currentScope();if(l&As){this.$1t(c,o),c.$1u??=[],c.$1u.push(o);return}if(l===Ts||l===jl){if(c.$13??=[],l===Ts&&ee(c.$13,o))this.raise(p,`type '${o}' has already been declared.`);c.$13.push(o),this.$1t(c,o);return}if(l&zl){if(c.$1v??=[],ee(c.$1v,o))return;super.declareName(o,Pn,p),c.$1v.push(o);return}super.declareName(o,l,p)}$1t(o,l){if(this.inModule&&o.flags&Fl)delete this.undefinedExports[l]}checkLocalExport(o){for(let l=this.scopeStack.length-1;l>=0;l--){let p=this.scopeStack[l];if(ee(p.$13,o.name)||ee(p.$1u,o.name))return}super.checkLocalExport(o)}checkExport(){}raiseRecoverable(o,l){if(l==="Duplicate constructor in the same class")return;super.raiseRecoverable(o,l)}$12(){let o=[];while(this.type===s)o.push(this.$1w());return o}$1q(o){let l=this.$9[this.$9.length-1];while(this.type===s)l.push(this.$1w());if(this.type===t._export){if(!o)this.unexpected()}else if(this.type!==t._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 o=this.startNode();this.next(),this.$9.push([]);let l=this.start,p=this.startLoc,c;if(this.type===t.parenL){if(this.next(),c=this.parseExpression(),this.expect(t.parenR),this.options.preserveParens){let f=this.startNodeAt(l,p);f.expression=c,c=this.finishNode(f,"ParenthesizedExpression")}}else{c=this.parseIdent(!1);while(this.eat(t.dot)){let f=this.startNodeAt(l,p);f.object=c,f.property=this.parseIdent(!0),f.computed=!1,c=this.finishNode(f,"MemberExpression")}}let u=this.$p()?this.$e():void 0;if(this.eat(t.parenL)){let f=this.startNodeAt(c.start,c.loc?.start);if(f.callee=c,f.arguments=this.parseExprList(t.parenR,!1,!1),u)f.typeArguments=u;c=this.finishNode(f,"CallExpression")}else if(u){let f=this.startNodeAt(c.start,c.loc?.start);f.expression=c,f.typeArguments=u,c=this.finishNode(f,"TSInstantiationExpression")}return o.expression=c,this.$9.pop(),this.finishNode(o,"Decorator")}shouldParseExportStatement(){return this.type===s||super.shouldParseExportStatement()}parseExprAtom(o,l,p){if(this.type===s)this.$1q(!1);return super.parseExprAtom(o,l,p)}parseProperty(o,l){if(o||this.type!==s)return super.parseProperty(o,l);let p=this.$12(),c=super.parseProperty(o,l);if(c.type==="SpreadElement")this.raise(c.start,"Decorators can't be used with SpreadElement");return c.decorators=p,c}parseClassId(o,l){let p=this.$9.length-1,c=this.$9[p];if(c.length>0)o.decorators=c,this.$q(o,c[0]),this.$9[p]=[];if(!this.isContextual("implements")||l===!0)super.parseClassId(o,l);if(this.$1())o.typeParameters=this.$8()}parseClassSuper(o){if(super.parseClassSuper(o),o.superClass&&this.$1())o.superTypeParameters=this.$e();if(this.eatContextual("implements"))o.implements=this.$a(()=>this.$1j())}parseClassElement(o){if(this.type===s){let h=this.$12();if(this.type===t.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let m=this.parseClassElement(o);return m.decorators=h,this.$q(m,h[0]),m}if(this.eat(t.semi))return null;let l=this.startNode();while(this.type===t.name&&Pm.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===t.braceL)return this.next(),this.parseClassStaticBlock(l),l;if(h==="public"||h==="private"||h==="protected")l.accessibility=h;else l[h]=!0}if(this.type===t.bracketL&&this.$1g())return this.$1h(l);l.static??=!1;let p="",c=!1,u=!1,f="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===t.star)&&!this.canInsertSemicolon())u=!0;else p="async";if(!p&&this.eat(t.star))c=!0;if(!p&&!u&&!c){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())f=h;else p=h}if(p)l.computed=!1,l.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),l.key.name=p,this.finishNode(l.key,"Identifier");else this.parseClassElementName(l);if(this.eat(t.question))l.optional=!0;if(this.type===t.parenL||this.$1()||f!=="method"||c||u){let h=l.key,m=!l.static&&!l.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(l.kind=m?"constructor":f,this.$1())l.typeParameters=this.$8();this.$l=m,this.$o=this.start,this.parseClassMethod(l,c,u,m&&o)}else{if(!l.optional&&this.$u())this.next(),l.definite=!0;if(this.type===t.colon)l.typeAnnotation=this.$6();this.parseClassField(l)}return l}parseMaybeAssign(o,l,p){if(this.$p()){let c=this.$g(()=>{let u=this.$8(),f=super.parseMaybeAssign(o,l,p);if(f.type!=="ArrowFunctionExpression")return;return f.typeParameters=u,this.$q(f,u),f});if(c)return c}return super.parseMaybeAssign(o,l,p)}parseMaybeUnary(o,l,p,c){if(this.$p()){let u=this.startNode();return u.typeAnnotation=this.$a(()=>{this.next();let f=this.$0();if(!this.$c())this.unexpected();return this.next(),f}),u.expression=this.parseMaybeUnary(null,!1,!1,c),this.finishNode(u,"TSTypeAssertion")}return super.parseMaybeUnary(o,l,p,c)}parseMaybeConditional(o,l){let p=this.start,c=this.startLoc,u=this.parseExprOps(o,l);if(this.checkExpressionErrors(l))return u;if(this.type===t.question&&!(u.type==="ArrowFunctionExpression"&&u.start===p)&&!this.$2j()){this.next();let f=this.startNodeAt(p,c);return f.test=u,f.consequent=this.parseMaybeAssign(),this.expect(t.colon),f.alternate=this.parseMaybeAssign(o),this.finishNode(f,"ConditionalExpression")}return u}$2j(){let o=this.$d(),l=this.input.charCodeAt(o);if(l===Hl||l===Vm||l===qm)return!0;return l===Ai&&this.input.charCodeAt(o+1)!==Ai}parseParenItem(o){return this.$h(o,!0)}$1x(){if(this.type!==t.colon)return!0;let o=this.$g(()=>{let l=this.$6(!0);return this.type===t.arrow&&!this.canInsertSemicolon()?l:void 0});if(!o)return!1;return this.$7=o,!0}shouldParseArrow(o){return this.$1x()&&super.shouldParseArrow(o)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(o,l,p,c){if(this.$7)o.returnType=this.$7,this.$7=null;return super.parseArrowExpression(o,l,p,c)}parseExprList(o,l,p,c){if(!this.$m)return super.parseExprList(o,l,p,c);this.$m=!1;let u=[],f=!0;while(!this.eat(o)){if(f)f=!1;else if(this.expect(t.comma),l&&this.afterTrailingComma(o))break;if(this.type===t.ellipsis){let h=this.parseSpread(c);if(this.eat(t.question))h.optional=!0;if(this.type===t.colon)h.typeAnnotation=this.$6();u.push(h)}else u.push(this.parseMaybeAssign(!1,c,this.parseParenItem))}return u}parseSubscript(o,l,p,c,u,f,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let g=this.startNodeAt(l,p);return this.exprAllowed=!1,this.next(),g.expression=o,this.finishNode(g,"TSNonNullExpression")}if(u&&this.$1()){let g=this.$g(()=>this.$2k(l,p,h));if(g)return g}let m=this.type===t.questionDot&&this.$2()===Wl;if(this.$1()||m||this.type===t.bitShift&&this.value==="<<"){let g=this.$g(()=>{if(m)this.next();this.$p();let y=this.$e();if(this.type===t.parenL&&!c)return y;if(this.type===t.backQuote)return m?void 0:y;if(m)return;if(this.$c()||this.type===t.bitShift||this.type.startsExpr&&this.type!==t.parenL&&!this.hasPrecedingLineBreak())return;return y});if(g){let y=this.startNodeAt(l,p);if(this.type===t.parenL&&!c){if(this.next(),y.callee=o,y.arguments=this.parseExprList(t.parenR,!0,!1),y.typeArguments=g,m)o.optional=!0;if(m||f)y.optional=m;return this.finishNode(y,"CallExpression")}if(this.type===t.backQuote)return y.tag=o,y.quasi=this.parseTemplate({isTagged:!0}),y.typeArguments=g,this.finishNode(y,"TaggedTemplateExpression");return y.expression=o,y.typeArguments=g,this.finishNode(y,"TSInstantiationExpression")}}if(u&&this.type===t.parenL)this.$m=!0;return super.parseSubscript(o,l,p,c,u,f,h)}$2k(o,l,p){let c=this.startNodeAt(o,l);if(c.typeParameters=this.$8(),this.expect(t.parenL),c.params=this.parseBindingList(t.parenR,!1,!0),this.type===t.colon)c.returnType=this.$6(!0);if(this.type!==t.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(c,c.params,!0,p)}parseDynamicImport(o){if(this.next(),o.source=this.parseMaybeAssign(),this.eat(t.comma)&&this.type!==t.parenR)o.arguments=[this.parseExpression()];return this.expect(t.parenR),this.finishNode(o,"ImportExpression")}parseNew(){let o=super.parseNew();if(o.callee?.type!=="TSInstantiationExpression")return o;let l=this.startNodeAt(o.start,o.loc?.start);return l.callee=o.callee.expression,l.typeArguments=o.callee.typeArguments,l.arguments=o.arguments,this.finishNodeAt(l,"NewExpression",o.end,o.loc?.end)}parseExprOp(o,l,p,c,u){if(t._in.binop>c&&this.type===t.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let f=this.value==="satisfies",h=this.startNodeAt(l,p);return h.expression=o,h.typeAnnotation=this.$a(()=>{if(this.next(),!f&&this.type===t._const){let m=this.startNode();return m.typeName=this.parseIdent(!0),this.finishNode(m,"TSTypeReference")}return this.$0()}),this.finishNode(h,f?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,l,p,c,u)}return super.parseExprOp(o,l,p,c,u)}parseGetterSetter(o){o.kind=o.key.name,super.parseGetterSetter(o)}parsePropertyValue(o,l,p,c,u,f,h,m){if(!l&&this.$1()){if(this.$k=this.$8(),this.type!==t.parenL)this.unexpected();o.kind="init"}return super.parsePropertyValue(o,l,p,c,u,f,h,m)}}return a});var Ps=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),zm=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),Um=new Set("get set new readonly static public private protected".split(" "));function Ul(e){return e>=97&&e<=122||e>=65&&e<=90||e===95||e===36}function Di(e){return e>=48&&e<=57}function _s(e){return Ul(e)||Di(e)}class Kl{text;pos=0;constructor(e){this.text=e}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let e=this.text,t=this.pos,n=e.charCodeAt(t);while(n===32||n===9)n=e.charCodeAt(++t);return this.pos=t,n}eat(e){if(this.peek()!==e.charCodeAt(0))return!1;return this.pos++,!0}word(){let e=this.pos;return this.skipWord()?this.text.slice(e,this.pos):void 0}skipWord(){if(!Ul(this.peek()))return!1;let e=this.pos+1;while(_s(this.text.charCodeAt(e)))e++;return this.pos=e,!0}keyword(e){this.peek();let t=this.pos+e.length;if(!this.text.startsWith(e,this.pos)||_s(this.text.charCodeAt(t)))return!1;return this.pos=t,!0}name(){let e=this.word();return e!==void 0&&!Ps.has(e)}string(){let e=this.peek();if(e!==34&&e!==39)return!1;let t=this.text;for(let n=this.pos+1;n<t.length;n++){let i=t.charCodeAt(n);if(i===e)return this.pos=n+1,!0;if(i===92||i===10||i===13||i===8232||i===8233)return!1}return!1}number(){let e=this.text,t=this.pos;if(e.charCodeAt(t)===45)t++;let n=t;while(Di(e.charCodeAt(t)))t++;if(t===n||t-n>1&&e.charCodeAt(n)===48)return!1;if(e.charCodeAt(t)===46){let r=++t;while(Di(e.charCodeAt(t)))t++;if(t===r)return!1}let i=e.charCodeAt(t);if(_s(i)||i===46)return!1;return this.pos=t,!0}type(){if(this.peek()===40){let e=this.pos;if(this.functionType())return!0;this.pos=e}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){if(this.keyword("keyof"))return this.operatorType();if(!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let e=this.peek();if(e===40)return this.pos++,this.type()&&this.eat(")");if(e===123)return this.objectType();if(e===91)return this.tupleType();if(e===34||e===39)return this.string();if(e===45||Di(e))return this.number();let t=this.word();if(t===void 0)return!1;if(t==="typeof")return this.typeQuery();if(t==="import")return this.importType(!0);if(zm.has(t)){let n=this.peek();return n!==46&&n!==60}if(Ps.has(t))return!1;while(this.eat("."))if(!this.skipWord())return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){if(this.keyword("import"))return this.importType(!1);do if(!this.name())return!1;while(this.eat("."));return!0}importType(e){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!e||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let e=this.peek();if(this.eat("[")){let t=this.peek();if(t===34||t===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(e===34||e===39){if(!this.string())return!1}else{let t=this.word();if(t===void 0||Um.has(t))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let e=new Set;for(;;){this.peek();let t=this.text.startsWith("...",this.pos);if(t)this.pos+=3;let n=this.word();if(n===void 0||Ps.has(n)||e.has(n))return!1;if(e.add(n),!t)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(t||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Km(e){return new Kl(e).readAll()}var Jm=B.extend(_i);function _n(e,t={}){return Km(e)||Xm(e,t.inline??!1)}function Xm(e,t){let n=!1,i=new Jm(t?{ecmaVersion:16,sourceType:"module",onComment:(r,s,a,o)=>{if(!r&&o===e.length)n=!0}}:{ecmaVersion:16,sourceType:"module"},e);try{return i.parseWholeType(),!n}catch(r){if(r instanceof SyntaxError)return!1;throw r}}var Ds=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function $i(e){return e.charCodeAt(0)===65279?e.slice(1):e}function et(e){return e>=48&&e<=57}function J(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function L(e,t){let n=t;while(n<e.length&&J(e.charCodeAt(n)))n++;return n}function Ii(e){let t=e.indexOf("<");while(t!==-1){let n=e.charCodeAt(t+1);if(n===33||n===115){Ds.lastIndex=t;let i=Ds.exec(e);if(i){if(n===115)return i[2]==="ts";t=e.indexOf("<",Ds.lastIndex);continue}}t=e.indexOf("<",t+1)}return!1}function Li(e,t){let n=e.indexOf("</script",t);while(n!==-1){if(e.charCodeAt(L(e,n+8))===Ni)return n;n=e.indexOf("</script",n+8)}return-1}function Ri(e,t){return L(e,t+8)+1}var Ym=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function Dn(e){return Ym.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}function Mi(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===47&&e.charCodeAt(n+1)===42){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(i===34||i===39){n++;while(n<e.length){let r=e.charCodeAt(n);if(r===i||r===10)break;n+=r===92?2:1}n++}else if(i===60&&e.startsWith("</style",n))break;else n++}return Math.min(n,e.length)}var Qm=34,Zm=39,Jl=47,Xl=61,Ni=62,ve=(e)=>e===Qm||e===Zm;function xt(e,t,n){let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(J(r)||r===Jl||r===Ni)break;if(n&&(ve(r)||r===Xl))break}return i}function Oi(e,t){let n=e.charCodeAt(t);return J(n)||ve(n)||n===Xl||n===60||n===Ni||n===96||n===Jl&&e.charCodeAt(t+1)===Ni}var Yl=0,I=1,Nn=2,W=3,ey=0;var ty=2,Ql=3,tp=4,$n=4,ny=5,iy=6,ry=7,sy={await:I,case:I,default:I,delete:I,extends:I,in:I,instanceof:I,new:I,of:I,return:I,throw:I,typeof:I,void:I,yield:I,do:Nn,else:Nn,finally:Nn,try:Nn,for:$n,if:$n,while:$n,with:$n,import:ny,export:iy,require:ry},np=10,Ns=Array($s(128,0)).fill(null);for(let e of Object.entries(sy)){let t=$s(e[0].charCodeAt(0),e[0].length),n=Ns[t]??[];n.push(e),Ns[t]=n}function $s(e,t){return e*(np+1)+t}function oy(e,t,n){let i=e.charCodeAt(t);if(i>=128||n-t>np)return W;let r=$s(i,n-t),s=Ns[r];if(s===null)return W;for(let a=0;a<s.length;a++)if(e.startsWith(s[a][0],t))return s[a][1];return W}var ip=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let t=e.charCodeAt(0);t<=e.charCodeAt(1);t++)ip[t]=1;function Is(e){return e>=128?!J(e):ip[e]===1}function rp(e,t,n){let i=e.length,r=[],s=t,a=I,o=!1;while(s<i){let l=e.charCodeAt(s);if(l===32||l===10||J(l)){s++;continue}if(l===47){let c=ly(e,s);if(c!==-1){s=c;continue}}let p=o;if(o=!1,Is(l)||l===35){let c=s;if(s=py(e,s+1),!p&&n?.(c,s))return-1;let u=p?W:oy(e,c,s);a=u===I||u===Nn||u===$n?I:W;continue}switch(s++,l){case 34:case 39:s=cy(e,s,l),a=W;break;case 96:s=ep(e,s,r),a=e.charCodeAt(s-1)===123?I:W;break;case 47:{let c=a===W?-1:uy(e,s);if(c===-1)a=I;else s=Zl(e,c),a=W;break}case 40:r.push(ey),a=I;break;case 41:if(r.length===0)return s-1;r.pop(),a=W;break;case 123:r.push(a===I?Ql:ty),a=Yl;break;case 125:{if(r.length===0)return s-1;let c=r.pop();if(c===tp)s=ep(e,s,r),a=e.charCodeAt(s-1)===123?I:W;else a=c===Ql?W:Yl;break}case 93:a=W;break;case 46:if(et(e.charCodeAt(s)))s=Zl(e,s),a=W;else if(e.startsWith("..",s))s+=2,a=I;else o=!0,a=I;break;case 63:if(e.charCodeAt(s)===46&&!et(e.charCodeAt(s+1)))s++,o=!0;a=I;break;case 33:a=a===W&&!J(e.charCodeAt(s-2))?W:I;break;case 43:case 45:if(e.charCodeAt(s)===l&&a===W)s++;else a=I;break;case 61:if(e.charCodeAt(s)===62)s++;a=I;break;default:a=I}}return i}function sp(e){return e===10||e===13||e===8232||e===8233}function ay(e,t){for(let n=t;n<e.length;n++)if(sp(e.charCodeAt(n)))return n;return e.length}function ly(e,t){let n=e.charCodeAt(t+1);if(n===47)return ay(e,t+2);if(n!==42)return-1;let i=e.indexOf("*/",t+2);return i===-1?e.length:i+2}function py(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===92)n+=2;else if(Is(i))n++;else break}return n}function Zl(e,t){let n=t;while(n<e.length&&Is(e.charCodeAt(n)))n++;return n}function cy(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===n)return i+1;if(r===92)i+=e.startsWith(`\r
40
+ `,i+1)?2:1;else if(r===10||r===13)return i}return e.length}function ep(e,t,n){for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(r===96)return i+1;if(r===92)i++;else if(r===36&&e.charCodeAt(i+1)===123)return n.push(tp),i+2}return e.length}function uy(e,t){let n=!1;for(let i=t;i<e.length;i++){let r=e.charCodeAt(i);if(sp(r))return-1;if(r===92)i++;else if(r===91)n=!0;else if(r===93)n=!1;else if(r===47&&!n)return i+1}return-1}var op={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function Bi(e,t){return Object.hasOwn(op,e)&&op[e].includes(t)}var ap="{",cp=60,Rs=62,Et=47,up=61,Ln=123,lp=/\s*>/y,Ls=/<\/textarea(\s[^>]*)?>/iy,dy=["cript","tyle","velte:options"],pp="</svelte:options";function Fi(e){let t=$i(e).trimEnd();return fy(t,Ii(t),null)}function fy(e,t,n){let i={typescript:t,instance:null,module:null,css:null,options:null},r=hy(e),s=[],a=0;while(a<=r){let o=e.charCodeAt(a);if(o===cp)a=gy(e,a,s,i,n);else if(o===Ln)a=yy(e,a,s);else a++}return i}function hy(e){let t=-1,n=e.indexOf("<s");while(n!==-1){let i=my(e,n+2);if(i!==-1){let r=e.charCodeAt(i);if(i===e.length||J(r)||r===Et||r===Rs)t=n}n=e.indexOf("<s",n+2)}return t}function my(e,t){for(let n of dy)if(e.startsWith(n,t))return t+n.length;return-1}function Rn(e,t){return Math.min(rp(e,t)+1,e.length)}function yy(e,t,n){let i=L(e,t+1),r=e.charCodeAt(i),s=e.charCodeAt(i+1);if(r===35||r===58||r===64||r===Et&&s!==Et&&s!==42){i++;while(i<e.length){let a=e.charCodeAt(i);if(a<97||a>122)break;i++}if(r===35)n.push(ap);else if(r===Et){let a=n.lastIndexOf(ap);if(a!==-1)n.length=a}}return Rn(e,i)}function gy(e,t,n,i,r){if(e.startsWith("!--",t+1)){let c=e.indexOf("-->",t+4),u=c===-1?e.length:c+3;if(r&&n.length===0)r.comments.push(t,u);return u}if(e.charCodeAt(t+1)===Et){let c=t+2,u=e.slice(c,xt(e,c,!1)),f=n.lastIndexOf(u);if(f!==-1)n.length=f;return In(e,L(e,c+u.length))}let s=e.slice(t+1,xt(e,t+1,!1)),a=L(e,t+1+s.length),o=n[n.length-1];if(o!==void 0&&Bi(o,s))n.pop();let l=n.length===0;if(r&&l&&(s==="script"||s==="style"||s==="svelte:options"))r.tags.push(t);if(l&&(s==="script"||s==="style")){let c=[];if(a=In(e,by(e,a,c)),s==="script"){let f=xy(e,t,a,c);if(f.context==="module")i.module??=f;else i.instance??=f;return f.end}let u=Ey(e,t,a,c);return i.css??=u,u.end}let p=l&&s==="svelte:options"?[]:null;if(a=vy(e,a,p),e.charCodeAt(a)===Et||Dn(s)){if(e.charCodeAt(a)===Et)a++;a=In(e,a)}else{if(a=In(e,a),s==="textarea")return Ty(e,a);if(s==="script"||s==="style"){let c=`</${s}>`,u=e.indexOf(c,a);return u===-1?e.length:u+c.length}if(p&&e.startsWith(pp,a))a=In(e,L(e,a+pp.length));else return n.push(s),a}if(p)i.options??={start:t,end:a,attributes:p};return a}function In(e,t){return e.charCodeAt(t)===Rs?t+1:t}function xy(e,t,n,i){let r=Li(e,n),s=r===-1?e.length:r,a=i.some((o)=>o.name==="module"||o.name==="context");return{start:t,end:r===-1?e.length:Ri(e,r),context:a?"module":"default",attributes:i,content:{start:n,end:s}}}function Ey(e,t,n,i){let r=Mi(e,n),s=r;if(e.startsWith("</style",s)){s+=7,lp.lastIndex=s;let a=lp.exec(e);if(a)s+=a[0].length}return{start:t,end:s,attributes:i,content:{start:n,end:r}}}function by(e,t,n){let i=t;for(;;){let r=i,s=xt(e,i,!0);if(s===r)return i;i=s;let a=!0;if(e.charCodeAt(i)===up){let o=L(e,i+1),l=e.charCodeAt(o),p=-1;if(ve(l)){let u=e.indexOf(e[o],o+1);if(u!==-1)p=u+1}if(p===-1){p=o;while(p<e.length&&e.charCodeAt(p)!==Rs&&!J(e.charCodeAt(p)))p++}let c=ve(l)?1:0;a=e.slice(o+c,p-c),i=p}n.push({name:e.slice(r,s),value:a,start:r,end:i}),i=L(e,i)}}function vy(e,t,n){let i=t;for(;;){for(;;){if(e.startsWith("/*",i)){let l=e.indexOf("*/",i+2);i=l===-1?e.length:l+2}else if(e.startsWith("//",i)){let l=e.indexOf(`
41
+ `,i+2);i=l===-1?e.length:l}else break;i=L(e,i)}let r=i;if(e.charCodeAt(i)===Ln){i=L(e,Rn(e,i+1));continue}let s=xt(e,i,!0);if(s===r)return i;let a=s,o=!0;if(i=L(e,s),e.charCodeAt(i)===up){let l=L(e,i+1);a=e.startsWith("/>",l)?l+1:Sy(e,l),o=ve(e.charCodeAt(l))?e.slice(l+1,Math.max(l+1,a-1)):e.slice(l,a),i=L(e,a)}n?.push({name:e.slice(r,s),value:o,start:r,end:a})}}function Sy(e,t){let n=e.charCodeAt(t);if(ve(n)){let r=t+1;while(r<e.length){let s=e.charCodeAt(r);if(s===n)return r+1;r=s===Ln?Rn(e,r+1):r+1}return e.length}let i=t;while(i<e.length&&!Oi(e,i))i=e.charCodeAt(i)===Ln?Rn(e,i+1):i+1;return i}function Ty(e,t){let n=t;while(n<e.length){let i=e.charCodeAt(n);if(i===cp){if(Ls.lastIndex=n,Ls.test(e))return Ls.lastIndex}n=i===Ln?Rn(e,n+1):n+1}return e.length}function ji(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var Cy=/^\t+/;class E extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(e,t,n){super(`${n}
42
+ https://svelte.dev/e/${t}`);this.code=t,this.reason=n;let i=typeof e==="number"?e:e?.start,r=typeof e==="number"?e:e?.end;if(i!==void 0)this.position=[i,r??i],this.start=ke(this.position[0]),this.end=ke(this.position[1]),this.frame=ky(this.start.line-1,this.end.column)}}var dp=(e)=>e.replace(Cy,(t)=>" ".repeat(t.length));function ky(e,t){let n=Math.max(0,e-2),i=[];for(let s=n;s<e+3;s++){let a=Wo(s);if(a===void 0)break;i.push(a)}let r=String(n+i.length+1).length;return i.map((s,a)=>{let o=`${String(n+a+1).padStart(r," ")}: ${dp(s)}`;if(n+a!==e)return o;return`${o}
43
+ ${" ".repeat(r+2+dp(s.slice(0,t)).length)}^`}).join(`
44
+ `)}function mp(e){throw new E(e,"attribute_duplicate","Attributes need to be unique")}function yp(e){throw new E(e,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function gp(e,t){throw new E(e,"block_duplicate_clause",`${t} cannot appear more than once within a block`)}function xp(e){throw new E(e,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function Ep(e){throw new E(e,"block_invalid_elseif","'elseif' should be 'else if'")}function bp(e,t,n){throw new E(e,"block_invalid_placement",`{#${t} ...} block cannot be ${n}`)}function vp(e){throw new E(e,"block_unclosed","Block was left open")}function Sp(e){throw new E(e,"block_unexpected_close","Unexpected block closing tag")}function Tp(e){throw new E(e,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function Cp(e){throw new E(e,"css_empty_declaration","Declaration cannot be empty")}function Bs(e){throw new E(e,"css_expected_identifier","Expected a valid CSS identifier")}function kp(e){throw new E(e,"css_selector_invalid","Invalid selector")}function wp(e){throw new E(e,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function Fs(e){throw new E(e,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function Ap(e){throw new E(e,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Pp(e,t){throw new E(e,"directive_missing_name",`\`${t}\` name cannot be empty`)}function _p(e,t){throw new E(e,"element_invalid_closing_tag",`\`</${t}>\` attempted to close an element that was not open`)}function Dp(e,t,n){throw new E(e,"element_invalid_closing_tag_autoclosed",`\`</${t}>\` attempted to close element that was already automatically closed by \`<${n}>\` (cannot nest \`<${n}>\` inside \`<${t}>\`)`)}function js(e,t){throw new E(e,"element_unclosed",`\`<${t}>\` was left open`)}function qs(e){throw new E(e,"expected_attribute_value","Expected attribute value")}function Np(e){throw new E(e,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function Vs(e){throw new E(e,"expected_identifier","Expected an identifier")}function $p(e){throw new E(e,"expected_pattern","Expected identifier or destructure pattern")}function Ip(e){throw new E(e,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function tt(e,t){throw new E(e,"expected_token",`Expected token ${t}`)}function Lp(e){throw new E(e,"expected_whitespace","Expected whitespace")}function wy(e,t){throw new E(e,"js_parse_error",`${t}`)}function Rp(e){throw new E(e,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Mp(e){throw new E(e,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function Op(e,t){throw new E(e,"script_invalid_attribute_value",`If the \`${t}\` attribute is supplied, it must be a boolean attribute`)}function Bp(e){throw new E(e,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Fp(e,t){throw new E(e,"script_reserved_attribute",`The \`${t}\` attribute is reserved and cannot be used`)}function jp(e){throw new E(e,"style_duplicate","A component can have a single top-level `<style>` element")}function qp(e){throw new E(e,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function Vp(e){throw new E(e,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function Gs(e){throw new E(e,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function Gp(e,t){throw new E(e,"svelte_meta_duplicate",`A component can only have one \`<${t}>\` element`)}function Hp(e,t){throw new E(e,"svelte_meta_invalid_content",`<${t}> cannot have children`)}function Wp(e,t){throw new E(e,"svelte_meta_invalid_placement",`\`<${t}>\` tags cannot be inside elements or blocks`)}function zp(e,t){throw new E(e,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${t}`)}function Up(e){throw new E(e,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Kp(e){throw new E(e,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function Vi(e,t){throw new E(e,"svelte_options_invalid_attribute_value",`Value must be ${t}, if specified`)}function Jp(e){throw new E(e,"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 Xp(e){throw new E(e,"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 Yp(e){throw new E(e,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function Hs(e){throw new E(e,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Qp(e){throw new E(e,"svelte_options_reserved_tagname","Tag name is reserved")}function Zp(e,t){throw new E(e,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${t}'`)}function ec(e){throw new E(e,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function tc(e,t,n){throw new E(e,"tag_invalid_placement",`{@${t} ...} tag cannot be ${n}`)}function de(e){throw new E(e,"unexpected_eof","Unexpected end of input")}function nc(e,t){throw new E(e,"unexpected_reserved_word",`'${t}' is a reserved word in JavaScript and cannot be used here`)}function ic(e){throw new E(e,"unterminated_string_constant","Unterminated string constant")}function rc(e){throw new E(e,"void_element_invalid_content","Void elements cannot have children or closing tags")}var Ft="",sc=[],Gi=0,G=[],H=0;function Ay(e,t){Ft=e,sc=t,Gi=0}function Py(){return Gi}function _y(e,t,n,i){Gi=i}function Dy(e,t,n,i,r,s){Gi=i;let a=t;if(e&&a.includes(`
45
+ `)){let l=Ft.lastIndexOf(`
46
+ `,n-1)+1,p=l,c=Ft.charCodeAt(p);while(c===32||c===9)c=Ft.charCodeAt(++p);if(p>l)a=Ny(a,Ft.slice(l,p))}let o={type:e?"Block":"Line",value:a,start:n,end:i};if(r&&s)o.loc={start:r,end:s};sc.push(o)}function Ny(e,t){let n=e.startsWith(t)?t.length:0,i="",r=e.indexOf(`
47
47
  `,n);while(r!==-1){if(i+=e.slice(n,r+1),n=r+1,e.startsWith(t,n))n+=t.length;r=e.indexOf(`
48
- `,n)}return i+e.slice(n)}function Ny(e,t,n){let i=0,r=t.length;while(i<r){let s=i+r>>>1;if(t[s].start<n)i=s+1;else r=s}if(i>=t.length)return;if(G=t.slice(i).map(({type:s,value:l,start:o,end:a})=>({type:s,value:l,start:o,end:a})),H=0,Rs(e,void 0,!1),H<G.length&&(G[H].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(H<G.length)e.trailingComments.push(G[H++])}}var $y=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function cp(e,t){for(let n=e;n<t;n++){let i=Ft.charCodeAt(n);if(i!==44&&i!==41&&i!==32&&i!==9)return!0}return!1}function Rs(e,t,n){while(H<G.length&&G[H].start<e.start)e.leadingComments??=[],e.leadingComments.push(G[H++]);if(H>=G.length)return;let i=G[H].start;if(i<e.end||!cp(e.end,i)){let r=at(e),s=$y.get(e.type),l=s===void 0?void 0:r[s],o=Array.isArray(l)&&l.length===0;for(let a in r){if(H>=G.length)return;if(a==="type")continue;let p=r[a];if(Array.isArray(p)){let c=a===s;for(let u=0;u<p.length;u++){let f=p[u];if(Ne(f))Rs(f,e,c?u===p.length-1:o)}}else if(Ne(p))Rs(p,e,o)}if(H>=G.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(H<G.length){if(t&&G[H].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(G[H++])}else if(e.end<=G[H].start&&!cp(e.end,G[H].start))e.trailingComments=[G[H++]]}var Gi=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(" ")),Hi=!1,Mn=1,Iy=2,Ly=32,Ry=256,My=Mn|Iy|Ry,Oy=2,By=3,Fy=4,jy=/\r\n?|\n|\u2028|\u2029/,up=new Map;function ji(e){if(!(e instanceof RegExp))return e;let t=up.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(i)=>n.has(i)},up.set(e,t)}return t}var Gs=wn((e)=>class extends e{declareName(t,n,i){let r=!1;if(n===Oy){let s=this.currentScope();if(r=ee(s.lexical,t)||ee(s.functions,t)||ee(s.var,t),s.lexical.push(t),this.inModule&&s.flags&Mn)delete this.undefinedExports[t]}else if(n===Fy)this.currentScope().lexical.push(t);else if(n===By){let s=this.currentScope();r=this.treatFunctionsAsVar?ee(s.lexical,t):ee(s.lexical,t)||ee(s.var,t),s.functions.push(t)}else for(let s=this.scopeStack.length-1;s>=0;--s){let l=this.scopeStack[s];if(ee(l.lexical,t)&&!(l.flags&Ly&&l.lexical[0]===t)||!this.treatFunctionsAsVarInScope(l)&&ee(l.functions,t)){r=!0;break}if(l.var.push(t),this.inModule&&l.flags&Mn)delete this.undefinedExports[t];if(l.flags&My)break}if(r)this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)}}),Hs=wn((e)=>{let{keywordTypes:t,tokTypes:n}=e.acorn,i=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((s)=>[s,t[s]])),r;return class extends e{constructor(s,l,o){super(s,l,o);this.keywords=ji(this.keywords),this.reservedWords=ji(this.reservedWords),this.reservedWordsStrict=ji(this.reservedWordsStrict),this.reservedWordsStrictBind=ji(this.reservedWordsStrictBind),r??=this.context[0]}reset(s,l,o){if(super.reset?.(s,l,o),this.input=s,this.containsEsc=!1,this.pos=l,o)this.lineStart=l-o.column,this.curLine=o.line;else this.lineStart=s.lastIndexOf(`
49
- `,l-1)+1,this.curLine=this.options.locations?s.slice(0,this.lineStart).split(jy).length:1;this.type=n.eof,this.value=null,this.start=this.end=l,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=l;let a=this.context;if(a.length!==1||a[0]!==r)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 u in this.undefinedExports){this.undefinedExports=Object.create(null);break}let p=this.scopeStack,c=p[0];if(p.length!==1||c.flags!==Mn||c.var.length>0||c.lexical.length>0||c.functions.length>0||c.tsTypes!==void 0||c.tsExportOnly!==void 0||c.tsEnums!==void 0)this.scopeStack=[],this.enterScope(Mn);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(s,l){let o=super.parseParenAndDistinguishExpression(s,l);if(o.type==="ParenthesizedExpression")Hi=!0;return o}checkUnreserved(s){if(Gi.has(s.name))super.checkUnreserved(s)}canInsertSemicolon(){let s=this.type;return s===n.eof||s===n.braceR||An(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let s=this.input,l=this.options.locations,o=this.pos,a=s.charCodeAt(o);for(;;)if(a===32||a===9)a=s.charCodeAt(++o);else if(a===10){if(a=s.charCodeAt(++o),l)this.curLine++,this.lineStart=o}else break;if(this.pos=o,a===47||a<33||a>=128)super.skipSpace()}readWord1(){let s=this.input,l=this.pos,o=l,a=s.charCodeAt(o),p=0;while(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===95||a===36)p=Math.imul(p,31)+a|0,a=s.charCodeAt(++o);if(a>=128||a===92)return super.readWord1();return this.containsEsc=!1,this.pos=o,Bo(s,l,o,p)}readWord(){let s=this.readWord1();return this.finishToken(i.get(s)??n.name,s)}}}),ic=ki(Gs,Hs),qy=/ \(\d+:\d+\)$/;function On(e){return e}function rc(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function Ws(e,t,n,i,r,s=e.root.comments.length){let l=e.root.comments;wy(t,l);let o={onComment:e.comments?_y:Py,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:i};if(e.lfOnly)o.startLocation=ke(n);let a=e.isTypeScript?e.typescript:ic;if(!a)Fi();let p;try{p=r(a,o)}catch(c){if(!rc(c))throw c;ky(c.pos,c.message.replace(qy,""))}if(l.length>s)Ny(On(p),l,n);return p}function sc(e,t,n=0){return On(Ws(e,t,0,!1,(i,r)=>{if(n>0&&r.locations)r.startLocation=ke(n);let s=new i(r,t,n).parse();return s.start=0,s},0))}function Vy(e,t){if(!t)return{line:1,column:0};let{column:n}=ke(e);return{line:qo(e-n)+1,column:n}}var Gy={count:0},Ls,Hy=(e)=>e.parseExpression();function Wy(e,t,n,i,r){let s=Ls;if(Ls=void 0,s?.ParserClass===e&&s.onComment===t.onComment&&s.locations===t.locations&&s.parser.reset)s.parser.reset(n,i,t.startLocation);else s={ParserClass:e,onComment:t.onComment,locations:t.locations,parser:new e(t,n,i)};let l=s.parser;l.nextToken();let o=r(l);return l.input="",Ls=s,o}function oc(e,t,n,i){return Gy.count+=1,Hi=!1,Ws(e,t,n,!0,(r,s)=>(s.startLocation??=Vy(n,s.locations),Wy(r,s,t,n,i)))}function jt(e,t,n,i=!1){let r=On(oc(e,t,n,Hy)),s=Math.max(r.end,Ay());return{node:Hi&&!i?zs(r):r,end:s}}function ac(e,t,n){let i=e.root.comments.length,r=!0,s=oc(e,t,n,(o)=>{let a={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},p=o.parseMaybeConditional(void 0,a);if(o.type!==ic.acorn.tokTypes.eof)return r=!1,p;let c=o.toAssignable(p,!1,a);return o.checkLValPattern(c),c});if(!r){e.root.comments.length=i;return}let l=On(s);return Hi?zs(l):l}function lc(e,t,n){return On(Ws(e,t,n,!1,(i,r)=>{let s=new i(r,t,n);try{return s.nextToken(),s.parseStatement(null,!0,Object.create(null))}catch(l){if(rc(l)&&l.pos===t.length)de(t.length);throw l}}))}function zs(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return zt(t,zs),t}var zy=[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],Uy=/[:!]/;function Us(e){let t;return()=>(t??=Ky(e),t)}function Ky(e){let t=new Map,n=0,i="";for(let r of e.split(" ")){let s=r.search(Uy);i=i.slice(0,Number.parseInt(r[0],36))+r.slice(1,s);let l=Number.parseInt(r.slice(s+1),36);if(t.set(`${i};`,l),r[s]==="!")t.set(i,l);n=Math.max(n,i.length+1)}return{table:t,longest:n}}var _1=Us("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),Ks=(e)=>e>=48&&e<=57,Jy=(e)=>Ks(e)||e>=65&&e<=70||e>=97&&e<=102,pc=(e)=>Ks(e)||e>=65&&e<=90||e>=97&&e<=122,Wi=0;function Xy(e,t,n,i){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,a=t+(o?2:1),p=a;while(p<e.length&&(o?Jy:Ks)(e.charCodeAt(p)))p++;if(p===a)return 0;return Wi=e.charCodeAt(p)===59?p+1:p,Number.parseInt(e.slice(a,p),o?16:10)}let{table:r,longest:s}=i(),l=t;while(l-t<s&&pc(e.charCodeAt(l)))l++;if(e.charCodeAt(l)===59){let o=r.get(e.slice(t,l+1));if(o!==void 0)return Wi=l+1,o}for(let o=l;o>t;o--){let a=r.get(e.slice(t,o));if(a===void 0)continue;if(n){let p=e.charCodeAt(o);if(pc(p)||p===95||p===61)continue}return Wi=o,a}return 0}function Yy(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return zy[e-128];if(e>=55296&&e<=57343)return 0;if(e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return 0}function zi(e,t,n){let i=e.indexOf("&");if(i===-1)return e;let r="",s=0;while(i!==-1){let l=Xy(e,i+1,t,n);if(l)r+=e.slice(s,i)+String.fromCodePoint(Yy(l,t)),s=Wi;i=e.indexOf("&",l?s:i+1)}return r+e.slice(s)}var Qy=/\r(?!\n)|[\u2028\u2029]/,Ac=/\s*}/y;function Ys(e,t){let n=e.codePointAt(t);if(n===void 0||!be(n,!0))return t;let i=t+(n<=65535?1:2),r=e.codePointAt(i);while(r!==void 0&&Oe(r,!0))i+=r<=65535?1:2,r=e.codePointAt(i);return i}class Pc{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(e,t,n,i={}){if(this.source=e,this.loc=i.loc??!1,this.lfOnly=this.loc&&!Qy.test(e),this.isTypeScript=$i(e),this.typescript=n.typescript,this.isTypeScript&&!this.typescript)Fi();this.entityNames=n.entityNames,this.css=i.css??!0,this.script=i.script??!0,this.comments=i.comments??!0,this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){return e.lastIndex=this.index,e.exec(this.source)?.[0]??null}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)et(this.index,e);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)de(this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,i=this.source.slice(this.index,n);return this.index=n,i}allowWhitespace(){this.index=L(this.source,this.index)}requireWhitespace(){if(!J(this.source.charCodeAt(this.index)))Np(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:ke(e),end:ke(t)}:void 0}readIdentifierName(){let e=this.index,t=Ys(this.source,e),n=this.source.slice(e,t);if(this.index=t,Gi.has(n))Zp(e,n);let i={type:"Identifier",name:n,start:e,end:t};if(this.loc)i.loc=this.sourceLocation(e,t);return i}current(){return this.stack[this.stack.length-1]}append(e){this.fragments[this.fragments.length-1].nodes.push(e)}open(e,t){this.append(e),this.stack.push(e),this.fragments.push(t)}setFragment(e){this.fragments[this.fragments.length-1]=e}close(){this.stack.pop(),this.fragments.pop()}}var Zy={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function Qs(e,t,n,i){return{type:"Literal",start:t,end:n,value:i,raw:e.slice(t,n)}}function cc(e,t){let n=e.charCodeAt(t);if(n===34||n===39){for(let r=t+1;r<e.length;r++){let s=e.charCodeAt(r);if(s===n)return Qs(e,t,r+1,e.slice(t+1,r));if(s===92||s===10||s===13)return null}return null}let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(r<48||r>57)break}if(i===t||n===48&&i-t>1)return null;return Qs(e,t,i,Number(e.slice(t,i)))}function eg(e,t,n){let i=Ys(e,t);if(i===t)return cc(e,t);let r=e.slice(t,i);if(r==="true"||r==="false"||r==="null")return Qs(e,t,i,r==="null"?null:r==="true");if(Gi.has(r))return null;let s={type:"Identifier",start:t,end:i,name:r};for(let l=i;;){let o=e.charCodeAt(l);if(o===40){let c=tg(e,l+1,n);if(!c)return null;s={type:"CallExpression",start:t,end:c.end,callee:s,arguments:c.arguments,optional:!1},l=c.end;continue}let a,p;if(o===46){if(p=Ys(e,l+1),p===l+1)return null;a={type:"Identifier",start:l+1,end:p,name:e.slice(l+1,p)}}else if(o===91){if(a=cc(e,l+1),!a||e.charCodeAt(a.end)!==93)return null;p=a.end+1}else return s;s={type:"MemberExpression",start:t,end:p,object:s,property:a,computed:o===91,optional:!1},l=p}}function tg(e,t,n){let i=[],r=L(e,t);if(e.charCodeAt(r)===41)return{arguments:i,end:r+1};for(;;){let s=Ki(e,r,n);if(!s)return null;i.push(s),r=L(e,s.end);let l=e.charCodeAt(r);if(l===41)return{arguments:i,end:r+1};if(l!==44)return null;if(r=L(e,r+1),e.charCodeAt(r)===41)return null}}function io(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);if(!(i===33&&r!==61)&&!(i===45&&r!==45&&r!==61))return eg(e,t,n);let s=io(e,L(e,t+1),n);if(!s)return null;return{type:"UnaryExpression",start:t,end:s.end,operator:i===33?"!":"-",prefix:!0,argument:s}}function uc(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);switch(i){case 124:return r===124&&e.charCodeAt(t+2)!==61?"||":null;case 38:return r===38&&e.charCodeAt(t+2)!==61?"&&":null;case 63:return r===63&&e.charCodeAt(t+2)!==61?"??":null;case 61:if(r!==61)return null;return e.charCodeAt(t+2)===61?"===":"==";case 33:if(r!==61)return null;return e.charCodeAt(t+2)===61?"!==":"!=";case 60:case 62:if(n||r===i)return null;if(r===61)return i===60?"<=":">=";return i===60?"<":">";case 43:return r===43||r===61?null:"+";case 45:return r===45||r===61?null:"-";case 42:return r===42||r===61?null:"*";case 47:return r===47||r===42||r===61?null:"/";case 37:return r===61?null:"%";default:return null}}function Zs(e,t,n,i){if(_c(e.charCodeAt(t.end)))return t;let r=L(e,t.end),s=uc(e,r,i);if(s===null)return t;let l=Zy[s];if(l<=n)return t;let o=io(e,L(e,r+s.length),i);if(!o)return null;let a=Zs(e,o,s==="??"?2:l,i);if(!a)return null;let p;if(s==="||"||s==="&&"||s==="??"){let c=uc(e,L(e,a.end),i);if(s==="??"?c==="||"||c==="&&":c==="??")return null;p={type:"LogicalExpression",start:t.start,end:a.end,left:t,operator:s,right:a}}else p={type:"BinaryExpression",start:t.start,end:a.end,left:t,operator:s,right:a};return Zs(e,p,n,i)}function Ki(e,t,n){let i=io(e,t,n);if(!i)return null;let r=Zs(e,i,-1,n);if(!r||_c(e.charCodeAt(r.end)))return r;let s=L(e,r.end);if(e.charCodeAt(s)!==63)return r;let l=e.charCodeAt(s+1);if(l===46||l===63)return null;let o=Ki(e,L(e,s+1),n);if(!o)return null;let a=L(e,o.end);if(e.charCodeAt(a)!==58)return null;let p=Ki(e,L(e,a+1),n);if(!p)return null;return{type:"ConditionalExpression",start:r.start,end:p.end,test:r,consequent:o,alternate:p}}function _c(e){return e===125||e===41||e===44||e===58}function ng(e,t){let n=e.charCodeAt(L(e,t));return n===125||n===41}function ig(e,t,n){let i=Ki(e,t,n);return i&&ng(e,i.end)?i:null}function Se(e){switch(e.loc={start:ot(e.start),end:ot(e.end)},e.type){case"MemberExpression":Se(e.object),Se(e.property);break;case"CallExpression":Se(e.callee);for(let t of e.arguments)Se(t);break;case"UnaryExpression":Se(e.argument);break;case"BinaryExpression":case"LogicalExpression":Se(e.left),Se(e.right);break;case"ConditionalExpression":Se(e.test),Se(e.consequent),Se(e.alternate);break}}function te(e){let t=!e.loc||e.lfOnly?ig(e.source,e.index,e.isTypeScript):null;if(t){if(e.index=t.end,e.loc)Se(t);return t}let{node:n,end:i}=jt(e,e.source,e.index);return e.index=i,n}var rg=new Set(["server","client","worker","test","default"]);function sg(e,t,n){let{source:i,index:r}=e;if(r>=i.length)de(i.length);let s=Ii(i,r);if(s===-1)Bs(i.length,"script");e.index=Li(i,s);let l=e.script?sc(e,i.slice(0,s),r):{type:"Program",start:r,end:s,body:[],sourceType:"module"};if(l.start=r,l.loc)Object.assign(l.loc.start,ot(t)),Object.assign(l.loc.end,ot(e.index));else if(e.loc)l.loc={start:ot(t),end:ot(e.index)};let o="default";for(let a of n){if(rg.has(a.name))Mp(a,a.name);if(a.name==="module"){if(a.value!==!0)Lp(a,a.name);o="module"}if(a.name==="context"){let p=a.value;if(!Array.isArray(p)||p.length!==1||p[0].type!=="Text"||p[0].data!=="module")Rp(a);o="module"}}return{type:"Script",start:t,end:e.index,context:o,content:l,attributes:n}}var og=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,ag=/\d+(\.\d+)?%/y,lg=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,pg=/\s*>/y,tt=-1,Dc=34,cg=35,ug=36,dg=38,Nc=39,fg=40,hg=41,Yi=42,mg=43,yg=45,gg=46,$c=47,eo=58,xg=59,Eg=60,dc=61,bg=62,vg=91,ro=92,Sg=93,Tg=94,Ic=123,to=124,Cg=125,Lc=126,Ji=[];function kg(e,t,n){let i=e.index;Ji=[];let r=e.css?Ag(e):wg(e),s=e.index;return e.eat("</style",!0),e.read(pg),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:r,comments:Ji,content:{start:i,end:s,styles:e.source.slice(i,s),comment:null}}}function wg(e){return e.index=Ri(e.source,e.index),[]}function Ag(e){let t=[];for(;;){if(qt(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?Rc(e):Mc(e))}return t}function Rc(e){let t=e.index;e.eat("@",!0);let n=vt(e),i=so(e,!0),r=null;if(e.match("{"))r=Fc(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:i,block:r}}function Mc(e){let t=e.index;return{type:"Rule",prelude:Oc(e,!1),block:Fc(e),start:t,end:e.index}}function Oc(e,t){let n=[];qt(e,!0);let i=e.index;while(e.index<e.source.length){n.push(Pg(e,t));let r=e.index;if(qt(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:i,end:r,children:n};e.eat(",",!0),qt(e,!0)}return de(e.source.length)}function fc(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function Pg(e,t){let{source:n,index:i}=e,r=[],s=fc(null,e.index);while(e.index<n.length){let l=e.index,o=n.charCodeAt(l),a=s.selectors;if(o===dg)e.index++,a.push({type:"NestingSelector",name:"&",start:l,end:e.index});else if(o===Yi)e.index++,a.push(hc(e,l,"*"));else if(o===cg)e.index++,a.push({type:"IdSelector",name:vt(e),start:l,end:e.index});else if(o===gg)e.index++,a.push({type:"ClassSelector",name:vt(e),start:l,end:e.index});else if(o===eo){let f=n.charCodeAt(l+1)===eo;e.index+=f?2:1;let h=vt(e),m=null;if(e.eat("("))m=Oc(e,!0),e.eat(")",!0);if(f)a.push({type:"PseudoElementSelector",name:h,start:l,end:e.index,...m&&{args:m}});else a.push({type:"PseudoClassSelector",name:h,args:m,start:l,end:e.index})}else if(o===vg)e.index++,a.push(_g(e,l));else{let f=t?e.read(og):null,h=!f&&Ze(o)?e.read(ag):null;if(f)a.push({type:"Nth",value:f,start:l,end:e.index});else if(h)a.push({type:"Percentage",value:h,start:l,end:e.index});else if(Bc(n,l)===0){let m=vt(e);a.push(hc(e,l,m))}}let p=e.index;qt(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=p,c)return s.end=p,r.push(s),{type:"ComplexSelector",start:i,end:p,children:r};let u=Dg(e);if(u){if(s.selectors.length>0)s.end=p,r.push(s);if(s=fc(u,u.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))Sp(e.index)}}return de(n.length)}function hc(e,t,n){let i=n,r;if(e.eat("|"))r=i,i=e.eat("*")?"*":vt(e);return{type:"TypeSelector",name:i,...r!==void 0&&{namespace:r},start:t,end:e.index}}function _g(e,t){let n=e.source;e.allowWhitespace();let i=vt(e);e.allowWhitespace();let r=null,s=null,l=n.charCodeAt(e.index);if(l===dc)s="=";else if((l===Lc||l===Tg||l===ug||l===Yi||l===to)&&n.charCodeAt(e.index+1)===dc)s=n.slice(e.index,e.index+2);if(s)e.index+=s.length,e.allowWhitespace(),r=Lg(e);e.allowWhitespace();let o=e.index;while(qc(n.charCodeAt(e.index)))e.index++;let a=e.index>o?n.slice(o,e.index):null;return e.allowWhitespace(),e.eat("]",!0),{type:"AttributeSelector",start:t,end:e.index,name:i,matcher:s,value:r,flags:a}}function Bc(e,t){let n=e.charCodeAt(t);if(n===mg||n===Lc||n===bg)return 1;if(n===to&&e.charCodeAt(t+1)===to)return 2;return 0}function Dg(e){let t=e.index;e.allowWhitespace();let n=e.index,i=Bc(e.source,n);if(i>0){e.index+=i;let r=e.index;return e.allowWhitespace(),{type:"Combinator",name:e.source.slice(n,r),start:n,end:r}}if(e.index!==t)return{type:"Combinator",name:" ",start:t,end:e.index};return null}function Fc(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(qt(e,!0),e.match("}"))break;n.push(Ng(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function Ng(e){if(e.match("@"))return Rc(e);let t=e.index;so(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===Ic?Mc(e):$g(e)}function $g(e){let{source:t,index:n}=e;if(n>=t.length)de(t.length);let i=n;while(i<t.length){let a=t.charCodeAt(i);if(a===eo||J(a))break;i++}let r=t.slice(n,i);e.index=i,e.allowWhitespace(),e.eat(":");let s=e.index;e.allowWhitespace();let l=so(e,!0);if(!l&&!r.startsWith("--"))vp({start:n,end:s});let o=e.index;if(!e.match("}"))e.eat(";",!0);return{type:"Declaration",start:n,end:o,property:r,value:l}}function so(e,t){let n=e.source,i=n.length,r="",s=e.index,l=null,o=!1,a=!1,p=tt,c=e.index;while(c<i){let u=n.charCodeAt(c);if(o){o=!1,c++;continue}if(u===ro){o=!0,c++;continue}if(u===p)p=tt;else if(u===hg)a=!1;else if(p===tt&&(u===Dc||u===Nc))p=u;else if(u===fg){if(Ig(n,r,s,c))a=!0}else if((u===xg||u===Ic||u===Cg)&&!a&&p===tt){if(e.index=c,!t)return"";if(r+=n.slice(s,c),l){let f=r.length-r.trimStart().length;for(let h of l)h.position=Math.max(0,(h.position??0)-f)}return r.trim()}else if(u===$c&&!a&&p===tt&&n.charCodeAt(c+1)===Yi){r+=n.slice(s,c),e.index=c;let f=jc(e);if(t)f.position=r.length,Ji.push(f),l??=[],l.push(f);c=e.index,s=c;continue}c++}return e.index=i,de(i)}function Ig(e,t,n,i){if(i-n>=3)return e.charCodeAt(i-3)===117&&e.charCodeAt(i-2)===114&&e.charCodeAt(i-1)===108;return(t+e.slice(n,i)).endsWith("url")}function Lg(e){let t=e.source,n=tt;if(e.eat('"'))n=Dc;else if(e.eat("'"))n=Nc;let i=e.index,r=!1,s=i;while(s<t.length){let l=t.charCodeAt(s);if(r)r=!1;else if(l===ro)r=!0;else if(n===tt?l===Sg||J(l):l===n)return e.index=n===tt?s:s+1,t.slice(i,s).trim();s++}return e.index=s,de(t.length)}function vt(e){let{source:t,index:n}=e,i=t.charCodeAt(n);if(Ze(i)||i===yg&&Ze(t.charCodeAt(n+1)))Ms(n);let r="",s=n,l=n;while(l<t.length){let o=t.charCodeAt(l);if(o===ro){r+=t.slice(s,l),e.index=l;let a=e.matchRegex(lg);if(a){let p=String.fromCodePoint(Number.parseInt(a.slice(1),16));r+=p==="\\"?"\\\\":p,l+=a.length}else r+=`\\${t[l+1]}`,l+=2;s=l}else if(o>=160||Rg(o))l++;else break}if(r+=t.slice(s,l),e.index=l,r==="")Ms(n);return r}function qt(e,t){let n=e.source;e.allowWhitespace();for(;;){let i=n.charCodeAt(e.index);if(i===$c&&n.charCodeAt(e.index+1)===Yi){let r=jc(e);if(t)Ji.push(r)}else if(i===Eg&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function jc(e){let t=e.index;e.eat("/*",!0);let n=e.readUntil("*/");return e.eat("*/",!0),{type:"CSSComment",value:n,start:t,end:e.index}}function qc(e){return e>=65&&e<=90||e>=97&&e<=122}function Rg(e){return qc(e)||Ze(e)||e===95||e===45}var Js=/<\/textarea(\s[^>]*)?>/iy,Mg=/^![a-zA-Z]+$/,Og=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Bg=/^[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,Xs="\\u200C\\u200D",Fg=new RegExp(`^(?:\\p{Lu}[$${Xs}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Xs}\\p{ID_Continue}]*(?:\\.[$${Xs}\\p{ID_Continue}]+)+)$`,"u"),jg=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),oo=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]]]),mc=[...oo.keys()],qg=`${mc.slice(0,-1).join(", ")} or ${mc.at(-1)}`,Vg=62,yc=123;function Qi(e,t){let n=e.index;if(n>=e.source.length)de(e.source.length);let i=Et(e.source,n,t);return e.index=i,{name:e.source.slice(n,i),start:n,end:i,loc:e.sourceLocation(n,i)}}var Bn=(e,t,n,i=n)=>({start:e,end:t,type:"Text",raw:n,data:i});function Gg(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return Fg.test(e)}function Hg(e){let t=!0;for(let n=0;n<e.length&&t;n++){let i=e.charCodeAt(n);t=i>=97&&i<=122||n>0&&i>=48&&i<=57}return t&&e.length>0||Mg.test(e)||Og.test(e)||Bg.test(e)}function gc(e,t){for(let n=e.length-1;n>=0;n--){let i=t(e[n]);if(i!==void 0)return i}return!1}function Wg(e,t,n){let i=oo.get(t);if(i)return i[0];if(n)return"Component";if(t==="title"){if(gc(e.stack,({type:r})=>{if(r==="SvelteHead")return!0;return r==="RegularElement"||r==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!gc(e.stack,(r)=>r.type==="RegularElement"&&r.attributes.some((s)=>s.type==="Attribute"&&s.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function zg(e){let t=e.index++;if(e.eat("!--")){let n=e.readUntil("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:n})}else if(e.eat("/"))Ug(e,t);else Jg(e,t)}function Ug(e,t){let{name:n}=Qi(e,!1);if(e.allowWhitespace(),e.eat(">",!0),Dn(n))tc(t);let i=e.current();while(!("name"in i)||i.name!==n){if(i.type!=="RegularElement"){let r=e.lastAutoClosedTag;if(r?.tag===n)Ap(t,n,r.reason);wp(t,n)}i.end=t,e.close(),i=e.current()}if(i.end=e.index,e.close(),e.stack.length<(e.lastAutoClosedTag?.depth??0))e.lastAutoClosedTag=void 0}function Kg(e,t,n){return{type:e,start:t,end:-1,name:n}}function Jg(e,t){let n=Qi(e,!1),{name:i}=n,r=oo.get(i);if(!r&&i.startsWith("svelte:"))Gp(n,qg);let s=Gg(i);if(!s&&!Hg(i))Yp(n);if(r?.[1]){if(e.metaTags.has(i))jp(t,i);if(e.current().type!=="Root")Vp(t,i);e.metaTags.add(i)}let l=Kg(Wg(e,i,s),t,i);if(e.loc)l.name_loc=n.loc;l.attributes=[],l.fragment={type:"Fragment",nodes:[]},e.allowWhitespace();let o=e.current();if(o.type==="RegularElement"&&Oi(o.name,i))o.end=t,e.close(),e.lastAutoClosedTag={tag:o.name,reason:i,depth:e.stack.length};if((i==="script"||i==="style")&&e.current().type==="Root"){let a=[];l.attributes=a,vc(e,a,tx),Yg(e,l,t,a);return}if(vc(e,l.attributes,ix),l.type==="SvelteComponent"){let a=xc(l);if(!a)Fp(t);if(!Ec(a.value))Bp(a.start);l.expression=bc(a.value)}else if(l.type==="SvelteElement"){let a=xc(l);if(!a)qs(t);if(a.value===!0)qs(a);l.tag=Ec(a.value)?bc(a.value):ex(a.value[0])}if(!e.eat("/")&&!Dn(i))if(e.eat(">",!0),i==="textarea")l.fragment.nodes=Gc(e,(a,p)=>(Js.lastIndex=p,Js.test(a)),"inside <textarea>"),e.read(Js);else if(i==="script"||i==="style")l.fragment.nodes.push(Xg(e,`</${i}>`));else{e.open(l,l.fragment);return}else e.eat(">",!0);l.end=e.index,e.append(l)}function Xg(e,t){let n=e.index,i=e.source.indexOf(t,n);e.index=i===-1?e.source.length:i;let r=Bn(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),r}function Yg(e,t,n,i){e.eat(">",!0);let r=Qg(e.root.fragment.nodes,n);if(t.name==="style"){let o=kg(e,n,i);if(o.content.comment=r,e.root.css)Op(n);e.root.css=o;return}let s=sg(e,n,i);if(r&&e.comments)s.content.leadingComments=[{type:"Line",value:r.data}];let l=s.context==="module"?"module":"instance";if(e.root[l])Ip(n);e.root[l]=s}function Qg(e,t){let n=e.length-1;if(n<0||e[n].end!==t)return null;for(let i=n;i>=0;i--){let r=e[i];if(r.type==="Comment")return r;if(r.type!=="Text"||r.data.trim())return null}return null}var Zg=(e)=>e.type==="Attribute"&&e.name==="this";function xc(e){let t=e.attributes.find(Zg);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function Ec(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function bc(e){return(Array.isArray(e)?e[0]:e).expression}function ex(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function vc(e,t,n){let i=new Set;for(;;){let r=n(e);if(!r)return;let{type:s}=r;if(s==="Attribute"||s==="BindDirective"||s==="StyleDirective"||s==="ClassDirective"){let l=`${s==="BindDirective"?"Attribute":s}${r.name}`;if(i.has(l))dp(r);if(r.name!=="this")i.add(l)}t.push(r),e.allowWhitespace()}}function ao(e,t,n,i,r){return e.loc?{type:"Attribute",start:n,end:i,name:t.name,name_loc:t.loc,value:r}:{type:"Attribute",start:n,end:i,name:t.name,value:r}}function Vc(e){if(ve(e.source.charCodeAt(e.index)))et(e.index,"=")}function tx(e){let t=e.index,n=Qi(e,!0);if(!n.name)return null;let i=!0;if(e.eat("=")){e.allowWhitespace();let{source:r}=e,s=e.index,l=ve(r.charCodeAt(s)),o=-1;if(l){let c=r.indexOf(r[s],s+1);if(c!==-1)o=c+1}if(o===-1){o=s;while(o<r.length&&r.charCodeAt(o)!==Vg&&!J(r.charCodeAt(o)))o++;if(o===s)Fs(s)}e.index=o;let a=l?1:0,p=r.slice(s+a,o-a);i=[Bn(o-p.length-a,o-a,p,zi(p,!0,e.entityNames))]}return Vc(e),ao(e,n,t,e.index,i)}function nx(e){let t=e.index,n=e.match("/*");if(!n&&!e.match("//"))return!1;e.index+=2;let i=e.readUntil(n?"*/":`
50
- `);if(n)e.eat("*/");let r={type:n?"Block":"Line",start:t,end:e.index,value:i},s=e.sourceLocation(t,e.index);if(s)r.loc=s;if(e.comments)e.root.comments.push(r);return!0}function ix(e){while(nx(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return rx(e,t);let n=Qi(e,!0);if(!n.name)return null;let i=e.index;e.allowWhitespace();let r=!0;if(e.eat("=")){if(e.allowWhitespace(),e.match("/>"))r=[Bn(e.index,e.index+1,"/")],e.index++;else r=ax(e);i=e.index}else Vc(e);let s=n.name.indexOf(":"),l=s>0?jg.get(n.name.slice(0,s)):void 0;return l?ox(e,l,n,s,t,i,r):ao(e,n,t,i,r)}function rx(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let r=te(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:r}}if(e.eat("...")){let r=te(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:r}}let n=e.readIdentifierName();if(n.name==="")fp(t);e.eatClosingBrace();let i={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return ao(e,n,t,e.index,i)}function sx(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function ox(e,t,n,i,r,s,l){let[o,...a]=n.name.slice(i+1).split("|");if(o==="")kp({start:r,end:r+i+1},n.name);let p={start:r,end:s,type:t,name:o};if(e.loc)p.name_loc=n.loc;if(t==="StyleDirective")return p.modifiers=a,p.value=l,p;let c=sx(l);if(c&&(Array.isArray(l)&&l.length>1||c.type==="Text"))Cp(c.start);if(p.expression=c?.expression??null,p.modifiers=a,t==="TransitionDirective"){let u=n.name.slice(0,i);p.intro=u!=="out",p.outro=u!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!p.expression)p.expression={start:r+i+1,end:s,type:"Identifier",name:o};return p}function ax(e){let t=e.source.charCodeAt(e.index),n=ve(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[Bn(e.index-1,e.index-1,"")]}let i;try{i=Gc(e,n?(r,s)=>r.charCodeAt(s)===t:Mi,"in attribute value",n?t:void 0)}catch(r){let s=r instanceof E&&r.code==="js_parse_error"?r.position?.[0]:void 0;if(s!==void 0&&e.source.startsWith("/>",s-1))e.index=s,et(s,n?String.fromCharCode(t):"}");throw r}if(n)e.index++;else if(i.length===0)Fs(e.index);return n||i.length>1||i[0].type==="Text"?i:i[0]}function Gc(e,t,n,i){let{source:r}=e,s=[],l=e.index,o=(a)=>{if(a<=l)return;let p=r.slice(l,a);s.push(Bn(l,a,p,zi(p,!0,e.entityNames)))};while(e.index<r.length){let a=e.index;if(t(r,a))return o(a),s;if(r.charCodeAt(a)!==yc){if(e.index++,i!==void 0)while(e.index<r.length&&r.charCodeAt(e.index)!==yc&&r.charCodeAt(e.index)!==i)e.index++;continue}e.index++;let p=r.charCodeAt(e.index);if(p===35||p===64){e.index++;let u=e.index;while(e.index<r.length&&r.charCodeAt(e.index)>=97&&r.charCodeAt(e.index)<=122)e.index++;let f=r.slice(u,e.index);(p===35?gp:Qp)(a,f,n)}o(a),e.allowWhitespace();let c=te(e);e.eatClosingBrace(),s.push({type:"ExpressionTag",start:a,end:e.index,expression:c}),l=e.index}de(r.length)}var lx=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),px=new Map([["type",(e,t)=>{if(t!=="String"&&t!=="Number"&&t!=="Boolean"&&t!=="Array"&&t!=="Object")return!1;return e.type=t,!0}],["reflect",(e,t)=>{if(typeof t!=="boolean")return!1;return e.reflect=t,!0}],["attribute",(e,t)=>{if(typeof t!=="string")return!1;return e.attribute=t,!0}]]),Sc="[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}-]",cx=new RegExp(`^[a-z]${Sc}*-${Sc}*$`,"u"),ux=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),Ui=(e)=>(t,n)=>{let i=Xi(n);if(typeof i!=="boolean")qi(n,"true or false");t[e]=i},dx=new Map([["runes",Ui("runes")],["immutable",Ui("immutable")],["preserveWhitespace",Ui("preserveWhitespace")],["accessors",Ui("accessors")],["namespace",(e,t)=>{let n=lx.get(Xi(t));if(!n)qi(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(Xi(t)!=="injected")qi(t,'"injected"');e.css="injected"}],["tag",(e,t)=>Hp(t)],["customElement",(e,t)=>{let n=mx(t);if(n)e.customElement=n}]]);function fx(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let i of e.attributes){if(i.type!=="Attribute")Wp(i);t.push(i);let r=dx.get(i.name);if(!r)Xp(i,i.name);r(n,i)}return n}function Xi({value:e}){if(e===!0)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;if(t.length>1)return null;let[n]=t;if(n.type==="Text")return n.data;return n.expression.type==="Literal"?n.expression.value:null}function Tc(e,t){if(typeof t!=="string")Vs(e);if(!t)return;if(!cx.test(t))Vs(e);if(ux.has(t))Jp(e)}function no(e){return e.type==="Property"&&!e.computed&&e.key.type==="Identifier"}function hx(e,t){let n=new Map;for(let i of e.properties){if(!no(i))t();if(!n.has(i.key.name))n.set(i.key.name,i.value)}return n}function mx(e){let t=()=>zp(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=Xi(e);return Tc(e,c),{tag:c}}let{expression:i}=n;if(i.type!=="ObjectExpression"){if(i.type==="Literal"&&i.value===null)return;t()}let r=hx(i,t),s={},l=r.get("tag");if(l){let c=l.type==="Literal"?l.value:void 0;Tc(null,c),s.tag=c}let o=r.get("props");if(o){let c=()=>Up(e);if(o.type!=="ObjectExpression")c();s.props={};for(let u of o.properties){if(!no(u)||u.value.type!=="ObjectExpression")c();let f={};s.props[u.key.name]=f;for(let h of u.value.properties){if(!no(h)||h.value.type!=="Literal")c();if(!px.get(h.key.name)?.(f,h.value.value))c()}}}let a=r.get("shadow");if(a)if(a.type==="ObjectExpression")s.shadow=a;else if(a.type==="Literal"&&(a.value==="open"||a.value==="none"))s.shadow=a.value;else Kp(e);let p=r.get("extend");if(p)s.extend=p;return s}var yx={"{":"}","(":")","[":"]"};function lo(e,t,n=yx){let i=Object.values(n),r=[],s=t;while(s<e.length){let l=e[s++];if(l==="'"||l==='"'||l==="`")s=gx(e,s,l);else if(Object.hasOwn(n,l))r.push(l);else if(i.includes(l)){let o=n[r.pop()??""];if(l!==o)et(s-1,o);if(r.length===0)return s}}de(e.length)}function gx(e,t,n){let i=t;while(i<e.length){let r=e[i++];if(r===n)return i;if(r==="\\")i++;else if(n==="`"&&r==="$"&&e[i]==="{")i=lo(e,i)}ec(t)}var xx=/\?\s*:/g;function Zi(e){let t=e.index,n=e.readIdentifierName();if(n.name!=="")return{...n,typeAnnotation:Cc(e)};let i=e.source[e.index];if(i!=="{"&&i!=="[")_p(e.index);e.index=lo(e.source,t);let r=ac(e,e.source.slice(0,e.index),t)??Ex(e,t);zn(r,"ObjectPattern","ArrayPattern");let s=Cc(e);if(r.typeAnnotation=s,s)r.end=s.end;return r}function Ex(e,t){let{node:n}=jt(e,`${e.source.slice(0,e.index)} = 1`,t);return zn(n,"AssignmentExpression"),n.left}function Cc(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",i=e.index-n.length,r=e.source.slice(0,i)+n+e.source.slice(e.index).replace(xx,":"),s=jt(e,r,i).node;if(s.type==="AssignmentExpression"){let l=s.right.start;while(r[l]!=="=")l-=1;s=jt(e,r.slice(0,l),i).node}if(s.type==="SequenceExpression")s=s.expressions[0];return zn(s,"TSAsExpression"),e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var bx={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},Fe=()=>({type:"Fragment",nodes:[]});function vx(e,t){if(e.eat("if")){e.requireWhitespace();let n=te(e);e.eatClosingBrace();let i=Fe();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:i,alternate:null},i)}else if(e.eat("each"))Tx(e,t);else if(e.eat("await")){e.requireWhitespace();let n=te(e);e.allowWhitespace();let i={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},r=Fe();if(e.eat("then"))i.value=kc(e),i.then=r;else if(e.eat("catch"))i.error=kc(e),i.catch=r;else i.pending=r;e.eat("}",!0),e.open(i,r)}else if(e.eat("key")){e.requireWhitespace();let n=te(e);e.eatClosingBrace();let i=Fe();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:i},i)}else if(e.eat("snippet"))Cx(e,t);else Pp(e.index)}function kc(e){if(e.matchRegex(Ac))return e.allowWhitespace(),null;e.requireWhitespace();let t=Zi(e);return e.allowWhitespace(),t}function Sx(e){let t={assertion:null},n=e.end,i=(s)=>{if(s.type==="TSAsExpression"&&s.end===e.end)return t.assertion=s,n=s.expression.end,s.expression;return zt(s,i),s},r=e;if(e.type==="TSAsExpression")t.assertion=e,r=e.expression,n=r.end;else zt(e,i);return r.end=n,{expression:r,assertion:t.assertion}}function Tx(e,t){e.requireWhitespace();let n=e.source,i;while(!i)try{i=te(e)}catch(a){let p=((a instanceof E?a.position:void 0)?.[0]??t)-2;while(p>t&&e.source.slice(p,p+2)!=="as")p-=1;if(p<=t)throw e.source=n,a;e.source=n.slice(0,p)}if(e.source=n,e.allowWhitespace(),!e.match("as")){if(i.type==="SequenceExpression")i=i.expressions[0];let a=Sx(i);if(i=a.expression,a.assertion){let p=a.assertion.typeAnnotation.start-2;while(e.source.slice(p,p+2)!=="as")p-=1;e.index=p}}let r=null,s,l;if(e.eat("as"))e.requireWhitespace(),r=Zi(e);else e.index=i.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),s=e.readIdentifierName().name,!s)js(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),l=te(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let o=Fe();e.open({type:"EachBlock",start:t,end:-1,expression:i,body:o,context:r,index:s,key:l},o)}function Cx(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")js(e.index);e.allowWhitespace();let i=e.index,r;if(e.isTypeScript&&e.match("<")){let a=lo(e.source,i,{"<":">"});r=e.source.slice(i+1,a-1),e.index=a}e.allowWhitespace(),e.eat("(",!0);let s=1;while(e.index<e.source.length&&(!e.match(")")||s!==1)){if(e.match("("))s++;if(e.match(")"))s--;e.index+=1}e.eat(")",!0);let{node:l}=jt(e,`${e.source.slice(0,e.index)} => {}`,i,!0);e.eatClosingBrace();let o=Fe();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:l.type==="ArrowFunctionExpression"?l.params:void 0,body:o},o)}function kx(e,t){let n=e.index-1,i=e.current();if(i.type==="IfBlock"){if(!e.eat("else"))et(n,"{:else} or {:else if}");if(e.eat("if"))yp(n);if(e.allowWhitespace(),i.alternate=Fe(),e.setFragment(i.alternate),e.eat("if")){e.requireWhitespace();let r=te(e);e.eatClosingBrace();let s=Fe();e.open({start:t,end:-1,type:"IfBlock",elseif:!0,test:r,consequent:s,alternate:null},s)}else e.eatClosingBrace()}else if(i.type==="EachBlock"){if(!e.eat("else"))et(n,"{:else}");e.eatClosingBrace(),i.fallback=Fe(),e.setFragment(i.fallback)}else if(i.type==="AwaitBlock"){let r;if(e.eat("then"))r="then";else if(e.eat("catch"))r="catch";else et(n,"{:then ...} or {:catch ...}");if(i[r])hp(n,`{:${r}}`);if(!e.eat("}")){e.requireWhitespace();let l=Zi(e);if(r==="then")i.value=l;else i.error=l;e.eatClosingBrace()}let s=Fe();i[r]=s,e.setFragment(s)}else mp(n)}function wx(e){let t=e.current(),n=bx[t.type];if(!n)Ep(e.index-1);e.eat(n,!0),e.eatClosingBrace();while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.close(),t=e.current();t.end=e.index,e.close()}function Ax(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function Px(e,t){if(e.eat("html")){e.requireWhitespace();let n=te(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(Ac)){let i=te(e),r=i.type==="SequenceExpression"?i.expressions:[i];for(let s of r){if(s.type!=="Identifier")Tp(s.start);n.push(s)}e.eatClosingBrace()}e.append({type:"DebugTag",start:t,end:e.index,identifiers:n})}else if(e.eat("const")){e.requireWhitespace();let n=Zi(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let i=e.index,r=te(e),s=e.index;if(r.type==="SequenceExpression"&&!e.source.slice(i,r.start).includes("("))bp(r);e.eatClosingBrace();let l={type:"VariableDeclarator",id:n,init:r,start:n.start,end:s};e.append({type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[l],start:t+2,end:e.index-1}})}else if(e.eat("render")){e.requireWhitespace();let n=te(e);if(!Ax(n))$p(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else Dp(e.index)}var _x=/(?:var|interface|enum)\b/y,Dx=/(?:let|const|type)\b/y;function Nx(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))vx(e,t);else if(e.eat(":"))kx(e,t);else if(e.eat("@"))Px(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,wx(e);else if(!$x(e,t)){let n=te(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function $x(e,t){let n=e.index,i=e.matchRegex(_x);if(i)Os({start:n,end:n+i.length});if(!e.matchRegex(Dx))return!1;let r=e.root.comments.length,s=lc(e,e.source,n);if(s.type==="ExpressionStatement")return e.root.comments.length=r,!1;if(s.type!=="VariableDeclaration"||s.kind!=="let"&&s.kind!=="const")Os(s);return e.index=s.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:s}),!0}function Ix(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=wc(t,"<",n);if(e.nextBrace<n)e.nextBrace=wc(t,"{",n);let i=Math.min(e.nextAngle,e.nextBrace);e.index=i;let r=t.slice(n,i);e.append({type:"Text",start:n,end:i,raw:r,data:zi(r,!1,e.entityNames)})}function wc(e,t,n){let i=e.indexOf(t,n);return i===-1?e.length:i}function Hc(e,t,n){let i=Lx(e,t,n);while(i.index<i.source.length)Mx(i);return Rx(i)}function Lx(e,t,n){let i=Ni(e);return Fo(i),new Pc(i.trimEnd(),i.length,n,t)}function Rx(e){if(e.stack.length>1){let r=e.current();if(r.end=r.start+1,r.type==="RegularElement")Bs(r,r.name);xp(r)}let{nodes:t}=e.root.fragment,n=t.findIndex((r)=>r.type==="SvelteOptions"),i=t[n];if(i?.type==="SvelteOptions"){t.splice(n,1),e.root.options=fx(i);let{nodes:r}=i.fragment;if(r.length>0)qp({start:r[0].start,end:r[r.length-1].end},i.name)}return e.root}function Mx(e){if(e.match("<"))zg(e);else if(e.match("{"))Nx(e);else Ix(e)}var Ox="0AElig!5i 1MP!12 1acute!5d 1breve:76 1circ!5e 2y:sw 1fr:2kn8 1grave!5c 1lpha:pd 1macr:74 1nd:8cz 1ogon:78 2pf:2koo 1pplyFunction:6e9 1ring!5h 1scr:2kkc 2sign:6s4 1tilde!5f 1uml!5g 0Backslash:6qe 2rv:8h3 3wed:6x2 1cy:sx 1ecause:6r9 2rnoullis:6jw 2ta:pe 1fr:2kn9 1opf:2kop 1reve:k8 1scr:6jw 1umpeq:6ry 0CHcy:tj 1OPY!4p 1acute:7a 2p:6vm 3italDifferentialD:6kl 2yleys:6jx 1caron:7g 2edil!5j 2irc:7c 2onint:6r4 1dot:7e 1edilla:54 2nterDot:53 1fr:6jx 1hi:pz 1ircleDot:6u1 6Minus:6ty 6Plus:6tx 6Times:6tz 1lockwiseContourIntegral:6r6 3seCurlyDoubleQuote:6cd aQuote:6c9 1olon:6rb 5e:8dw 2ngruent:6sh 3int:6r3 3tourIntegral:6r2 2pf:6iq 3roduct:6q8 2unterClockwiseContourIntegral:6r7 1ross:8bz 1scr:2kke 1up:6vn 3Cap:6rx 0DD:6kl 2otrahd:841 1Jcy:si 1Scy:sl 1Zcy:sv 1agger:6ch 2rr:6n5 2shv:8h0 1caron:7i 2y:t0 1el:6pz 3ta:pg 1fr:2knb 1iacriticalAcute:50 bDot:k9 dubleAcute:kd bGrave:2o bTilde:kc 3mond:6v8 2fferentialD:6km 1opf:2kor 2t:4o 3Dot:6ho 3Equal:6s0 2ubleContourIntegral:6r3 6Dot:4o 8wnArrow:6oj 6LeftArrow:6og aRightArrow:6ok aTee:8h0 7ongLeftArrow:7w8 eRightArrow:7wa aRightArrow:7w9 6RightArrow:6oi bTee:6ug 6UpArrow:6oh 8DownArrow:6ol 6VerticalBar:6qt 2wnArrow:6mr 9Bar:843 9UpArrow:6ph 4Breve:lt 4LeftRightVector:85s 8TeeVector:866 8Vector:6nx eBar:85y 4RightTeeVector:867 9Vector:6o1 fBar:85z 4Tee:6uc 7Arrow:6nb 4arrow:6oj 1scr:2kkf 2trok:7k 0ENG:96 1TH!5s 1acute!5l 1caron:7u 2irc!5m 2y:tp 1dot:7q 1fr:2knc 1grave!5k 1lement:6q0 1macr:7m 2ptySmallSquare:7i3 5VerySmallSquare:7fv 1ogon:7s 2pf:2kos 1psilon:ph 1qual:8dx 5Tilde:6rm 3ilibrium:6oc 1scr:6k0 2im:8dv 1ta:pj 1uml!5n 1xists:6pv 2ponentialE:6kn 0Fcy:tg 1fr:2knd 1illedSmallSquare:7i4 6VerySmallSquare:7fu 1opf:2kot 2rAll:6ps 2uriertrf:6k1 1scr:6k1 0GJcy:sj 1T!1q 1amma:pf 5d:rg 1breve:7y 1cedil:82 2irc:7w 2y:sz 1dot:80 1fr:2kne 1g:6vt 1opf:2kou 1reaterEqual:6sl cLess:6vv 7FullEqual:6sn 7Greater:8f6 7Less:6t3 7SlantEqual:8e6 7Tilde:6sz 1scr:2kki 1t:6sr 0HARDcy:tm 1acek:jr 2t:2m 1circ:84 1fr:6j0 1ilbertSpace:6iz 1opf:6j1 2rizontalLine:7b4 1scr:6iz 2trok:86 1umpDownHump:6ry 4Equal:6rz 0IEcy:t1 1Jlig:8i 1Ocy:sh 1acute!5p 1circ!5q 2y:t4 1dot:8g 1fr:6j5 1grave!5o 1m:6j5 2acr:8a 3ginaryI:6ko 2plies:6oi 1nt:6r0 3egral:6qz 4rsection:6v6 2visibleComma:6eb 9Times:6ea 1ogon:8e 2pf:2kow 2ta:pl 1scr:6j4 1tilde:88 1ukcy:sm 2ml!5r 0Jcirc:8k 2y:t5 1fr:2knh 1opf:2kox 1scr:2kkl 2ercy:so 1ukcy:sk 0KHcy:th 1Jcy:ss 1appa:pm 1cedil:8m 2y:t6 1fr:2kni 1opf:2koy 1scr:2kkm 0LJcy:sp 1T!1o 1acute:8p 2mbda:pn 2ng:7vu 2placetrf:6j6 2rr:6n2 1caron:8t 2edil:8r 2y:t7 1eftAngleBracket:7vs 5rrow:6mo 9Bar:6p0 9RightArrow:6o6 4Ceiling:6x4 4DoubleBracket:7vq 6wnTeeVector:869 8Vector:6o3 eBar:861 4Floor:6x6 4RightArrow:6ms 9Vector:85q 4Tee:6ub 7Arrow:6n8 7Vector:862 5riangle:6uq cBar:89b cEqual:6us 4UpDownVector:85t 6TeeVector:868 6Vector:6nz cBar:860 4Vector:6nw aBar:85u 4arrow:6og 4rightarrow:6ok 2ssEqualGreater:6vu 4FullEqual:6sm 4Greater:6t2 4Less:8f5 4SlantEqual:8e5 4Tilde:6sy 1fr:2knj 1l:6vs 2eftarrow:6oq 1midot:8v 1ongLeftArrow:7w5 8RightArrow:7w7 4RightArrow:7w6 4leftarrow:7w8 8rightarrow:7wa 4rightarrow:7w9 2pf:2koz 2werLeftArrow:6mx 5RightArrow:6mw 1scr:6j6 2h:6nk 2trok:8x 1t:6sq 0Map:83p 1cy:t8 1ediumSpace:6e7 2llintrf:6k3 1fr:2knk 1inusPlus:6qb 1opf:2kp0 1scr:6k3 1u:po 0NJcy:sq 1acute:8z 1caron:93 2edil:91 2y:t9 1egativeMediumSpace:6bv 8ThickSpace:6bv bnSpace:6bv 8VeryThinSpace:6bv 2stedGreaterGreater:6sr 6LessLess:6sq 2wLine:a 1fr:2knl 1oBreak:6e8 2nBreakingSpace:4g 2pf:6j9 2t:8h8 3Congruent:6si 4upCap:6st 3DoubleVerticalBar:6qu 3Element:6q1 4qual:6sg 8Tilde:6rm 4xists:6pw 3Greater:6sv aEqual:6sx aFullEqual:6sn aGreater:6sr aLess:6t5 aSlantEqual:8e6 aTilde:6t1 3HumpDownHump:6ry 7Equal:6rz 3LeftTriangle:6wa fBar:89b fEqual:6wc 5ss:6su 7Equal:6sw 7Greater:6t4 7Less:6sq 7SlantEqual:8e5 7Tilde:6t0 3NestedGreaterGreater:8f6 9LessLess:8f5 3Precedes:6tc bEqual:8fj bSlantEqual:6w0 3ReverseElement:6q4 4ightTriangle:6wb gBar:89c gEqual:6wd 3SquareSubset:6tr fEqual:6w2 bperset:6ts hEqual:6w3 4ubset:6te 9Equal:6tk 5cceeds:6td bEqual:8fk bSlantEqual:6w1 bTilde:6tb 5perset:6tf bEqual:6tl 3Tilde:6rl 8Equal:6ro 8FullEqual:6rr 8Tilde:6rt 3VerticalBar:6qs 1scr:2kkp 1tilde!5t 1u:pp 0OElig:9e 1acute!5v 1circ!5w 2y:ta 1dblac:9c 1fr:2knm 1grave!5u 1macr:98 2ega:q1 2icron:pr 1opf:2kp2 1penCurlyDoubleQuote:6cc 9Quote:6c8 1r:8d0 1scr:2kkq 2lash!60 1tilde!5x 3mes:8c7 1uml!5y 1verBar:6da 5race:732 8ket:71w 4Parenthesis:730 0PartialD:6pu 1cy:tb 1fr:2knn 1hi:py 1i:ps 1lusMinus:4x 1oincareplane:6j0 2pf:6jd 1r:8fv 2ecedes:6t6 8Equal:8fj 8SlantEqual:6t8 8Tilde:6ta 2ime:6cz 2oduct:6q7 3portion:6rb aal:6ql 1scr:2kkr 2i:q0 0QUOT!y 1fr:2kno 1opf:6je 1scr:2kks 0RBarr:840 1EG!4u 1acute:9g 2ng:7vv 2rr:6n4 4tl:846 1caron:9k 2edil:9i 2y:tc 1e:6jg 2verseElement:6q3 8quilibrium:6ob 7UpEquilibrium:86n 1fr:6jg 1ho:pt 1ightAngleBracket:7vt 6rrow:6mq aBar:6p1 aLeftArrow:6o4 5Ceiling:6x5 5DoubleBracket:7vr 7wnTeeVector:865 9Vector:6o2 fBar:85x 5Floor:6x7 5Tee:6ua 8Arrow:6na 8Vector:863 6riangle:6ur dBar:89c dEqual:6ut 5UpDownVector:85r 7TeeVector:864 7Vector:6ny dBar:85w 5Vector:6o0 bBar:85v 5arrow:6oi 1opf:6jh 2undImplies:86o 1rightarrow:6or 1scr:6jf 2h:6nl 1uleDelayed:8ac 0SHCHcy:tl 2cy:tk 1OFTcy:to 1acute:9m 1c:8fw 2aron:9s 2edil:9q 2irc:9o 2y:td 1fr:2knq 1hortDownArrow:6mr 5LeftArrow:6mo 5RightArrow:6mq 5UpArrow:6mp 1igma:pv 1mallCircle:6qg 1opf:2kp6 1qrt:6qi 2uare:7fl 6Intersection:6tv 6Subset:6tr cEqual:6tt 8perset:6ts eEqual:6tu 6Union:6tw 1scr:2kku 1tar:6va 1ub:6vk 3set:6vk 6Equal:6ti 2cceeds:6t7 8Equal:8fk 8SlantEqual:6t9 8Tilde:6tb 3hThat:6q3 2m:6q9 2p:6vl 3erset:6tf 8Equal:6tj 3set:6vl 0THORN!66 1RADE:6jm 1SHcy:sr 2cy:ti 1ab:9 2u:pw 1caron:9w 2edil:9u 2y:te 1fr:2knr 1herefore:6r8 3ta:pk 2ickSpace:6e7 3nSpace:6bt 1ilde:6rg 5Equal:6rn 5FullEqual:6rp 5Tilde:6rs 1opf:2kp7 1ripleDot:6hn 1scr:2kkv 2trok:9y 0Uacute!62 2rr:6n3 4ocir:85l 1brcy:su 3eve:a4 1circ!63 2y:tf 1dblac:a8 1fr:2kns 1grave!61 1macr:a2 1nderBar:2n 6race:733 9ket:71x 5Parenthesis:731 2ion:6v7 5Plus:6tq 1ogon:aa 2pf:2kp8 1pArrow:6mp 7Bar:842 7DownArrow:6o5 2DownArrow:6mt 2Equilibrium:86m 2Tee:6ud 5Arrow:6n9 2arrow:6oh 2downarrow:6ol 2perLeftArrow:6mu 5RightArrow:6mv 2si:r6 4lon:px 1ring:a6 1scr:2kkw 1tilde:a0 1uml!64 0VDash:6uj 1bar:8h7 1cy:sy 1dash:6uh 5l:8h2 1ee:6v5 2rbar:6c6 3t:6c6 4icalBar:6qr 8Line:3g 8Separator:7rs 8Tilde:6rk 3yThinSpace:6bu 1fr:2knt 1opf:2kp9 1scr:2kkx 1vdash:6ui 0Wcirc:ac 1edge:6v4 1fr:2knu 1opf:2kpa 1scr:2kky 0Xfr:2knv 1i:pq 1opf:2kpb 1scr:2kkz 0YAcy:tr 1Icy:sn 1Ucy:tq 1acute!65 1circ:ae 2y:tn 1fr:2knw 1opf:2kpc 1scr:2kl0 1uml:ag 0ZHcy:t2 1acute:ah 1caron:al 2y:t3 1dot:aj 1eroWidthSpace:6bv 2ta:pi 1fr:6js 1opf:6jo 1scr:2kl1 0aacute!69 1breve:77 1c:6ri 2E:6ri 2d:6rj 2irc!6a 2ute!50 2y:ts 1elig!6e 1f:6e9 2r:2kny 1grave!68 1lefsym:6k5 3ph:6k5 2pha:q9 1macr:75 3lg:8cf 2p!12 1nd:6qv 3and:8d1 3d:8d8 3slope:8d4 3v:8d6 2g:6qo 3e:884 3le:6qo 3msd:6qp 6aa:888 7b:889 7c:88a 7d:88b 7e:88c 7f:88d 7g:88e 7h:88f 3rt:6qn 5vb:6v2 7d:87x 3sph:6qq 4t:5h 3zarr:70c 1ogon:79 2pf:2kpe 1p:6rs 2E:8ds 2acir:8dr 2e:6ru 2id:6rv 2os:13 2prox:6rs 6eq:6ru 1ring!6d 1scr:2kl2 2t:16 2ymp:6rs 5eq:6rx 1tilde!6b 1uml!6c 1wconint:6r7 2int:8b5 0bNot:8h9 1ackcong:6rw 4epsilon:s6 4prime:6d1 4sim:6rh 7eq:6vh 2rvee:6v1 3wed:6x1 6ge:6x1 1brk:71x 4tbrk:71y 1cong:6rw 2y:tt 1dquo:6ce 1ecaus:6r9 6e:6r9 2mptyv:88g 2psi:s6 2rnou:6jw 2ta:qa 3h:6k6 3ween:6ss 1fr:2knz 1igcap:6v6 4irc:7hr 4up:6v7 3odot:8ao 4plus:8ap 4times:8aq 3sqcup:8au 4tar:7id 3triangledown:7gd bup:7g3 3uplus:8as 3vee:6v5 3wedge:6v4 1karow:83x 1lacklozenge:8a3 5square:7fu 5triangle:7g4 ddown:7ge dleft:7gi dright:7g8 3nk:74z 2k12:7f6 44:7f5 334:7f7 2ock:7ew 1ne:1p 3quiv:6sh 2ot:6xc 1opf:2kpf 2t:6ud 3tom:6ud 2wtie:6vc 2xDL:7dj 4R:7dg 4l:7di 4r:7df 3H:7dc 4D:7dy 4U:7e1 4d:7dw 4u:7dz 3UL:7dp 4R:7dm 4l:7do 4r:7dl 3V:7dd 4H:7e4 4L:7dv 4R:7ds 4h:7e3 4l:7du 4r:7dr 3box:895 3dL:7dh 4R:7de 4l:7bk 4r:7bg 3h:7b4 4D:7dx 4U:7e0 4d:7cc 4u:7ck 3minus:6u7 3plus:6u6 3times:6u8 3uL:7dn 4R:7dk 4l:7bs 4r:7bo 3v:7b6 4H:7e2 4L:7dt 4R:7dq 4h:7cs 4l:7c4 4r:7bw 1prime:6d1 1reve:k8 2vbar!4m 1scr:2kl3 2emi:6dr 2im:6rh 4e:6vh 2ol:2k 4b:891 4hsub:7uw 1ull:6ci 4et:6ci 2mp:6ry 4E:8fi 4e:6rz 5q:6rz 0cacute:7b 2p:6qx 3and:8ck 3brcup:8cp 3cap:8cr 4up:8cn 3dot:8cg 3s:6qx 2ret:6dd 3on:jr 1caps:8ct 3ron:7h 2edil!6f 2irc:7d 2ups:8cs 5sm:8cw 1dot:7f 1edil!54 2mptyv:88i 2nt!4i 4erdot:53 1fr:2ko0 1hcy:uf 2eck:7pv 5mark:7pv 2i:qv 1ir:7gr 3E:88z 3c:jq 4eq:6s7 4learrowleft:6nu bright:6nv 6dR:4u 7S:79k 7ast:6u3 7circ:6u2 7dash:6u5 3e:6s7 3fnint:8b4 3mid:8hb 3scir:88y 1lubs:7kz 5uit:7kz 1olon:1m 5e:6s4 6q:6s4 2mma:18 5t:1s 3p:6pt 4fn:6qg 4lement:6pt 6xes:6iq 2ng:6rp 4dot:8dp 3int:6r2 2pf:2kpg 3rod:6q8 3y!4p 4sr:6jb 1rarr:6np 2oss:7pz 1scr:2kl4 2ub:8gf 4e:8gh 3p:8gg 4e:8gi 1tdot:6wf 1udarrl:854 6r:851 2epr:6vy 3sc:6vz 2larr:6nq 6p:859 2p:6qy 3brcap:8co 3cap:8cm 4up:8cq 3dot:6tp 3or:8cl 3s:6qy 2rarr:6nr 6m:858 3lyeqprec:6vy 7succ:6vz 5vee:6vi 5wedge:6vj 3ren!4k 3vearrowleft:6nq aright:6nr 2vee:6vi 2wed:6vj 1wconint:6r6 2int:6r5 1ylcty:6y5 0dArr:6oj 1Har:86d 1agger:6cg 2leth:6k8 2rr:6mr 2sh:6c0 4v:6ub 1bkarow:83z 2lac:kd 1caron:7j 2y:tw 1d:6km 2agger:6ch 3rr:6oa 2otseq:8dz 1eg!4w 2lta:qc 2mptyv:88h 1fisht:873 2r:2ko1 1harl:6o3 4r:6o2 1iam:6v8 4ond:6v8 7suit:7l2 4s:7l2 2e:4o 2gamma:rh 2sin:6wi 2v:6v 3ide!6v 6ontimes:6vb 3onx:6vb 1jcy:uq 1lcorn:6xq 3rop:6x9 1ollar:10 2pf:2kph 2t:k9 3eq:6s0 5dot:6s1 3minus:6rc 3plus:6qc 3square:6u9 2ublebarwedge:6x2 2wnarrow:6mr 4downarrows:6oa 4harpoonleft:6o3 bright:6o2 1rbkarow:840 2corn:6xr 3rop:6x8 1scr:2kl5 3y:ut 2ol:8ae 2trok:7l 1tdot:6wh 2ri:7gf 4f:7ge 1uarr:6ph 2har:86n 1wangle:886 1zcy:v3 2igrarr:7wf 0eDDot:8dz 2ot:6s1 1acute!6h 2ster:8dq 1caron:7v 2ir:6s6 4c!6i 2olon:6s5 2y:ul 1dot:7r 1e:6kn 1fDot:6s2 2r:2ko2 1g:8ey 2rave!6g 2s:8eu 3dot:8ew 1l:8ex 2inters:73b 2l:6j7 2s:8et 3dot:8ev 1macr:7n 2pty:6px 5set:6px 5v:6px 2sp:6bn 413:6bo 54:6bp 1ng:97 2sp:6bm 1ogon:7t 2pf:2kpi 1par:6vp 4sl:89v 2lus:8dt 2si:qd 4lon:qd 4v:s5 1qcirc:6s6 3olon:6s5 2sim:6rm 3lantgtr:8eu 7less:8et 2uals:1p 3est:6sf 3iv:6sh 5DD:8e0 2vparsl:89x 1rDot:6s3 2arr:86p 1scr:6jz 2dot:6s0 2im:6rm 1ta:qf 2h!6o 1uml!6j 2ro:6gc 1xcl:x 2ist:6pv 2pectation:6k0 3onentiale:6kn 0fallingdotseq:6s2 1cy:uc 1emale:7k0 1filig:1dkz 2lig:1dkw 3lig:1dl0 2r:2ko3 1ilig:1dkx 1jlig:2u 1lat:7l9 2lig:1dky 2tns:7g1 1nof:b6 1opf:2kpj 2rall:6ps 3k:6vo 4v:8gp 1partint:8b1 1rac12!59 53:6kz 54!58 55:6l1 56:6l5 58:6l7 423:6l0 55:6l2 434!5a 55:6l3 58:6l8 445:6l4 456:6l6 58:6l9 478:6la 3sl:6dg 2own:6xu 1scr:2kl7 0gE:6sn 2l:8ek 1acute:dx 2mma:qb 5d:rh 2p:8ee 1breve:7z 1circ:7x 2y:tv 1dot:81 1e:6sl 2l:6vv 2q:6sl 3q:6sn 3slant:8e6 2s:8e6 3cc:8fd 3dot:8e8 6o:8ea 7l:8ec 3l:6vv 4es:8es 1fr:2ko4 1g:6sr 2g:6vt 1imel:6k7 1jcy:ur 1l:6t3 2E:8eq 2a:8f9 2j:8f8 1nE:6sp 2ap:8ei 4prox:8ei 2e:8eg 3q:8eg 4q:6sp 2sim:6w7 1opf:2kpk 1rave:2o 1scr:6iy 2im:6sz 4e:8em 4l:8eo 1t!1q 2cc:8fb 3ir:8e2 2dot:6vr 2lPar:87p 2quest:8e4 2rapprox:8ee 4rr:86w 3dot:6vr 3eqless:6vv 5qless:8ek 3less:6t3 3sim:6sz 1vertneqq:6sp 2nE:6sp 0hArr:6ok 1airsp:6bu 2lf:59 2milt:6iz 2rdcy:ui 3r:6ms 4cir:85k 4w:6nh 1bar:6j3 1circ:85 1earts:7l1 6uit:7l1 2llip:6cm 2rcon:6ux 1fr:2ko5 1ksearow:84l 3warow:84m 1oarr:6pr 2mtht:6rf 2okleftarrow:6nd 4rightarrow:6ne 2pf:2kpl 2rbar:6c5 1scr:2kl9 2lash:6j3 2trok:87 1ybull:6df 2phen:6c0 0iacute!6l 1c:6eb 2irc!6m 2y:u0 1ecy:tx 2xcl!4h 1ff:6ok 2r:2ko6 1grave!6k 1i:6ko 2iint:8b0 3nt:6r1 2nfin:89o 2ota:6jt 1jlig:8j 1macr:8b 3ge:6j5 4line:6j4 4part:6j5 3th:8h 2of:6uv 2ped:c5 1n:6q0 2care:6it 2fin:6qm 5tie:89p 2odot:8h 2t:6qz 3cal:6uy 3egers:6jo 4rcal:6uy 3larhk:8bb 3prod:8cc 1ocy:up 2gon:8f 2pf:2kpm 2ta:qh 1prod:8cc 1quest!5b 1scr:2kla 2in:6q0 4E:6wp 4dot:6wl 4s:6wk 5v:6wj 4v:6q0 1t:6ea 2ilde:89 1ukcy:uu 2ml!6n 0jcirc:8l 2y:u1 1fr:2ko7 1math:fr 1opf:2kpn 1scr:2klb 2ercy:uw 1ukcy:us 0kappa:qi 5v:s0 1cedil:8n 2y:u2 1fr:2ko8 1green:8o 1hcy:ud 1jcy:v0 1opf:2kpo 1scr:2klc 0lAarr:6oq 2rr:6og 2tail:84b 1Barr:83y 1E:6sm 2g:8ej 1Har:86a 1acute:8q 2emptyv:88k 2gran:6j6 2mbda:qj 2ng:7vs 4d:87l 4le:7vs 2p:8ed 2quo!4r 2rr:6mo 4b:6p0 5fs:84f 4fs:84d 4hk:6nd 4lp:6nf 4pl:855 4sim:86r 4tl:6n6 2t:8ff 3ail:849 3e:8fh 4s:8fh 1barr:83w 2brk:7si 2race:3f 5k:2j 3ke:87f 4sld:87j 6u:87h 1caron:8u 2edil:8s 3il:6x4 2ub:3f 2y:u3 1dca:852 2quo:6cc 5r:6ce 2rdhar:86f 3ushar:85n 2sh:6nm 1e:6sk 2ftarrow:6mo 9tail:6n6 4harpoondown:6nx bup:6nw 4leftarrows:6o7 4rightarrow:6ms es:6o6 9harpoons:6ob 9squigarrow:6nh 4threetimes:6vf 2g:6vu 2q:6sk 3q:6sm 3slant:8e5 2s:8e5 3cc:8fc 3dot:8e7 6o:8e9 7r:8eb 3g:6vu 4es:8er 3sapprox:8ed 4dot:6vq 4eqgtr:6vu 6qgtr:8ej 4gtr:6t2 4sim:6sy 1fisht:870 2loor:6x6 2r:2ko9 1g:6t2 2E:8ep 1hard:6nx 4u:6nw 5l:86i 2blk:7es 1jcy:ux 1l:6sq 2arr:6o7 2corner:6xq 2hard:86j 2tri:7i2 1midot:8w 2oust:71s 6ache:71s 1nE:6so 2ap:8eh 4prox:8eh 2e:8ef 3q:8ef 4q:6so 2sim:6w6 1oang:7vw 3rr:6pp 2brk:7vq 2ngleftarrow:7w5 8rightarrow:7w7 4mapsto:7wc 4rightarrow:7w6 2oparrowleft:6nf 9right:6ng 2par:879 3f:2kpp 3lus:8bx 2times:8c4 2wast:6qf 3bar:2n 2z:7gq 3enge:7gq 3f:8a3 1par:14 4lt:87n 1rarr:6o6 2corner:6xr 2har:6ob 5d:86l 2m:6by 2tri:6v3 1saquo:6d5 2cr:2kld 2h:6nk 2im:6sy 4e:8el 4g:8en 2qb:2j 3uo:6c8 5r:6ca 2trok:8y 1t!1o 2cc:8fa 3ir:8e1 2dot:6vq 2hree:6vf 2imes:6vd 2larr:86u 2quest:8e3 2rPar:87q 3i:7gj 4e:6us 4f:7gi 1urdshar:85m 3uhar:86e 1vertneqq:6so 2nE:6so 0mDDot:6re 1acr!4v 2le:7k2 3t:7q8 4ese:7q8 2p:6na 3sto:6na 6down:6nb 6left:6n8 6up:6n9 2rker:7fy 1comma:8bt 2y:u4 1dash:6c4 1easuredangle:6qp 1fr:2koa 1ho:6jr 1icro!51 2d:6qr 3ast:16 3cir:8hc 3dot!53 2nus:6qa 5b:6u7 5d:6rc 6u:8bu 1lcp:8gr 2dr:6cm 1nplus:6qb 1odels:6uf 2pf:2kpq 1p:6qb 1scr:2kle 2tpos:6ri 1u:qk 2ltimap:6uw 2map:6uw 0nGg:6vt 2t:6sr 3v:6sr 1Leftarrow:6od 5rightarrow:6oe 2l:6vs 2t:6sq 3v:6sq 1Rightarrow:6of 1VDash:6un 2dash:6um 1abla:6pz 2cute:90 2ng:6qo 2p:6rt 3E:8ds 3id:6rv 3os:95 3prox:6rt 2tur:7la 5al:7la 7s:6j9 1bsp!4g 2ump:6ry 5e:6rz 1cap:8cj 3ron:94 2edil:92 2ong:6rr 5dot:8dp 2up:8ci 2y:u5 1dash:6c3 1e:6sg 2Arr:6on 2arhk:84k 4r:6mv 5ow:6mv 2dot:6s0 2quiv:6si 2sear:84o 3im:6rm 2xist:6pw 6s:6pw 1fr:2kob 1gE:6sn 2e:6sx 3q:6sx 4q:6sn 4slant:8e6 3s:8e6 2sim:6t1 2t:6sv 3r:6sv 1hArr:6oe 2arr:6ni 2par:8he 1i:6q3 2s:6ws 3d:6wq 2v:6q3 1jcy:uy 1lArr:6od 2E:6sm 2arr:6my 2dr:6cl 2e:6sw 3ftarrow:6my 5rightarrow:6ni 3q:6sw 4q:6sm 4slant:8e5 3s:8e5 4s:6su 2sim:6t0 2t:6su 3ri:6wa 5e:6wc 1mid:6qs 1opf:2kpr 2t!4s 3in:6q1 5E:6wp 5dot:6wl 5va:6q1 6b:6wn 6c:6wm 3ni:6q4 5va:6q4 6b:6wu 6c:6wt 1par:6qu 4allel:6qu 4sl:8hp 4t:6pu 2olint:8b8 2r:6tc 3cue:6w0 3e:8fj 4c:6tc 5eq:8fj 1rArr:6of 2arr:6mz 5c:84z 5w:6n1 2ightarrow:6mz 2tri:6wb 5e:6wd 1sc:6td 3cue:6w1 3e:8fk 3r:2klf 2hortmid:6qs 6parallel:6qu 2im:6rl 4e:6ro 5q:6ro 2mid:6qs 2par:6qu 2qsube:6w2 5pe:6w3 2ub:6tg 4E:8g5 4e:6tk 4set:6te 7eq:6tk 9q:8g5 3cc:6td 5eq:8fk 3p:6th 4E:8g6 4e:6tl 4set:6tf 7eq:6tl 9q:8g6 1tgl:6t5 2ilde!6p 2lg:6t4 2riangleleft:6wa deq:6wc 9right:6wb eeq:6wd 1u:ql 2m:z 3ero:6ja 3sp:6br 1vDash:6ul 2Harr:83o 2ap:6rx 2dash:6uk 2ge:6sl 3t:1q 2infin:89q 2lArr:83m 3e:6sk 3t:1o 4rie:6us 2rArr:83n 3trie:6ut 2sim:6rg 1wArr:6om 2arhk:84j 4r:6mu 5ow:6mu 2near:84n 0oS:79k 1acute!6r 2st:6u3 1cir:6u2 4c!6s 2y:u6 1dash:6u5 2blac:9d 2iv:8c8 2ot:6u1 2sold:88s 1elig:9f 1fcir:88v 2r:2koc 1gon:kb 2rave!6q 2t:88x 1hbar:88l 2m:q1 1int:6r2 1larr:6nu 2cir:88u 3ross:88r 2ine:6da 2t:88w 1macr:99 2ega:qx 2icron:qn 3d:88m 3nus:6ty 1opf:2kps 1par:88n 2erp:88p 2lus:6tx 1r:6qw 2arr:6nv 2d:8d9 3er:6k4 5of:6k4 3f!4q 3m!56 2igof:6uu 2or:8d2 2slope:8d3 2v:8d7 1scr:6k4 2lash!6w 2ol:6u0 1tilde!6t 3mes:6tz 6as:8c6 1uml!6u 1vbar:6yl 0par:6qt 3a!52 4llel:6qt 3sim:8hf 4l:8hp 3t:6pu 1cy:u7 1ercnt:11 3iod:1a 3mil:6cw 3p:6ud 3tenk:6cx 1fr:2kod 1hi:qu 3v:r9 2mmat:6k3 2one:7im 1i:qo 2tchfork:6vo 2v:ra 1lanck:6j3 6h:6j2 4kv:6j3 2us:17 4acir:8bn 4b:6u6 4cir:8bm 4do:6qc 5u:8bp 4e:8du 4mn!4x 4sim:8bq 4two:8br 1m:4x 1ointint:8b9 2pf:2kpt 2und!4j 1r:6t6 2E:8fn 2ap:8fr 2cue:6t8 2e:8fj 3c:6t6 4approx:8fr 4curlyeq:6t8 4eq:8fj 4napprox:8ft 5eqq:8fp 5sim:6w8 4sim:6ta 2ime:6cy 5s:6jd 2nE:8fp 3ap:8ft 3sim:6w8 2od:6q7 3falar:6y6 4line:6xe 4surf:6xf 3p:6ql 4to:6ql 2sim:6ta 2urel:6uo 1scr:2klh 2i:qw 1uncsp:6bs 0qfr:2koe 1int:8b0 1opf:2kpu 1prime:6dz 1scr:2kli 1uaternions:6j1 4int:8ba 2est:1r 5eq:6sf 2ot!y 0rAarr:6or 2rr:6oi 2tail:84c 1Barr:83z 1Har:86c 1ace:6rh 3ute:9h 2dic:6qi 2emptyv:88j 2ng:7vt 4d:87m 4e:885 4le:7vt 2quo!57 2rr:6mq 4ap:86t 4b:6p1 5fs:84g 4c:84z 4fs:84e 4hk:6ne 4lp:6ng 4pl:85h 4sim:86s 4tl:6n7 4w:6n1 2tail:84a 3io:6ra 5nals:6je 1barr:83x 2brk:7sj 2race:3h 5k:2l 3ke:87g 4sld:87i 6u:87k 1caron:9l 2edil:9j 3il:6x5 2ub:3h 2y:u8 1dca:853 2ldhar:86h 2quo:6cd 5r:6cd 2sh:6nn 1eal:6jg 4ine:6jf 4part:6jg 4s:6jh 2ct:7fx 2g!4u 1fisht:871 2loor:6x7 2r:2kof 1hard:6o1 4u:6o0 5l:86k 2o:qp 3v:s1 1ightarrow:6mq atail:6n7 5harpoondown:6o1 cup:6o0 5leftarrows:6o4 9harpoons:6oc 5rightarrows:6o9 5squigarrow:6n1 5threetimes:6vg 2ng:ka 2singdotseq:6s3 1larr:6o4 2har:6oc 2m:6bz 1moust:71t 6ache:71t 1nmid:8ha 1oang:7vx 3rr:6pq 2brk:7vr 2par:87a 3f:2kpv 3lus:8by 2times:8c5 1par:15 4gt:87o 2polint:8b6 1rarr:6o9 1saquo:6d6 2cr:2klj 2h:6nl 2qb:2l 3uo:6c9 5r:6c9 1three:6vg 2imes:6ve 2ri:7g9 4e:6ut 4f:7g8 4ltri:89a 1uluhar:86g 1x:6ji 0sacute:9n 1bquo:6ca 1c:6t7 2E:8fo 2ap:8fs 3ron:9t 2cue:6t9 2e:8fk 3dil:9r 2irc:9p 2nE:8fq 3ap:8fu 3sim:6w9 2polint:8b7 2sim:6tb 2y:u9 1dot:6v9 4b:6u9 4e:8di 1eArr:6oo 2arhk:84l 4r:6mw 5ow:6mw 2ct!4n 2mi:1n 2swar:84p 2tminus:6qe 4n:6qe 2xt:7qu 1fr:2kog 3own:6xu 1harp:7lb 2chcy:uh 3y:ug 2ortmid:6qr 5parallel:6qt 2y!4t 1igma:qr 5f:qq 5v:qq 2m:6rg 3dot:8dm 3e:6rn 4q:6rn 3g:8f2 4E:8f4 3l:8f1 4E:8f3 3ne:6rq 3plus:8bo 3rarr:86q 1larr:6mo 1mallsetminus:6qe 3shp:8c3 2eparsl:89w 2id:6qr 3le:6xv 2t:8fe 3e:8fg 4s:8fg 1oftcy:uk 2l:1b 3b:890 4ar:6yn 2pf:2kpw 1pades:7kw 6uit:7kw 3r:6qt 1qcap:6tv 5s:6tv 3up:6tw 5s:6tw 2sub:6tr 5e:6tt 5set:6tr 8eq:6tt 4p:6ts 5e:6tu 5set:6ts 8eq:6tu 2u:7fl 3are:7fl 5f:7fu 3f:7fu 1rarr:6mq 1scr:2klk 2etmn:6qe 2mile:6xv 2tarf:6va 1tar:7ie 4f:7id 2raightepsilon:s5 8phi:r9 3ns:4v 1ub:6te 3E:8g5 3dot:8fx 3e:6ti 4dot:8g3 3mult:8g1 3nE:8gb 4e:6tm 3plus:8fz 3rarr:86x 3set:6te 6eq:6ti 8q:8g5 6neq:6tm 9q:8gb 4im:8g7 4ub:8gl 5p:8gj 2cc:6t7 4approx:8fs 4curlyeq:6t9 4eq:8fk 4napprox:8fu 5eqq:8fq 5sim:6w9 4sim:6tb 2m:6q9 2ng:7l6 2p:6tf 31!55 32!4y 33!4z 3E:8g6 3dot:8fy 4sub:8go 3e:6tj 4dot:8g4 3hsol:7ux 5ub:8gn 3larr:86z 3mult:8g2 3nE:8gc 4e:6tn 3plus:8g0 3set:6tf 6eq:6tj 8q:8g6 6neq:6tn 9q:8gc 4im:8g8 4ub:8gk 5p:8gm 1wArr:6op 2arhk:84m 4r:6mx 5ow:6mx 2nwar:84q 1zlig!67 0target:6xi 2u:qs 1brk:71w 1caron:9x 2edil:9v 2y:ua 1dot:6hn 1elrec:6xh 1fr:2koh 1here4:6r8 5fore:6r8 3ta:qg 5sym:r5 5v:r5 2ickapprox:6rs 5sim:6rg 3nsp:6bt 2kap:6rs 3sim:6rg 2orn!72 1ilde:kc 2mes!5z 5b:6u8 6ar:8c1 5d:8c0 2nt:6r1 1oea:84o 2p:6uc 3bot:6ye 3cir:8hd 3f:2kpx 4ork:8gq 2sa:84p 1prime:6d0 1rade:6jm 2iangle:7g5 8down:7gf 8left:7gj ceq:6us 8q:6sc 8right:7g9 deq:6ut 3dot:7ho 3e:6sc 3minus:8ca 3plus:8c9 3sb:899 3time:8cb 2pezium:736 1scr:2kll 3y:ue 2hcy:uz 2trok:9z 1wixt:6ss 2oheadleftarrow:6n2 7rightarrow:6n4 0uArr:6oh 1Har:86b 1acute!6y 2rr:6mp 1brcy:v2 3eve:a5 1circ!6z 2y:ub 1darr:6o5 2blac:a9 2har:86m 1fisht:872 2r:2koi 1grave!6x 1harl:6nz 4r:6ny 2blk:7eo 1lcorn:6xo 6er:6xo 3rop:6xb 2tri:7i0 1macr:a3 2l!4o 1ogon:ab 2pf:2kpy 1parrow:6mp 2downarrow:6mt 2harpoonleft:6nz 9right:6ny 2lus:6tq 2si:qt 4h:r6 4lon:qt 2uparrows:6o8 1rcorn:6xp 6er:6xp 3rop:6xa 2ing:a7 2tri:7i1 1scr:2klm 1tdot:6wg 2ilde:a1 2ri:7g5 4f:7g4 1uarr:6o8 2ml!70 1wangle:887 0vArr:6ol 1Bar:8h4 4v:8h5 1Dash:6ug 1angrt:87w 2repsilon:s5 3kappa:s0 3nothing:6px 3phi:r9 4i:ra 4ropto:6ql 3r:6mt 4ho:s1 3sigma:qq 4ubsetneq:6tm cq:8gb 5psetneq:6tn cq:8gc 3theta:r5 4riangleleft:6uq bright:6ur 1cy:tu 1dash:6ua 1ee:6qw 3bar:6uz 3eq:6sa 2llip:6we 2rbar:3g 3t:3g 1fr:2koj 1ltri:6uq 1nsub:6te 4p:6tf 1opf:2kpz 1prop:6ql 1rtri:6ur 1scr:2kln 2ubnE:8gb 5e:6tm 3pnE:8gc 5e:6tn 1zigzag:87u 0wcirc:ad 1edbar:8db 3ge:6qv 5q:6s9 2ierp:6jc 1fr:2kok 1opf:2kq0 1p:6jc 1r:6rk 2eath:6rk 1scr:2klo 0xcap:6v6 2irc:7hr 2up:6v7 1dtri:7gd 1fr:2kol 1hArr:7wa 2arr:7w7 1i:qm 1lArr:7w8 2arr:7w5 1map:7wc 1nis:6wr 1odot:8ao 2pf:2kq1 3lus:8ap 2time:8aq 1rArr:7w9 2arr:7w6 1scr:2klp 2qcup:8au 1uplus:8as 2tri:7g3 1vee:6v5 1wedge:6v4 0yacute!71 3y:un 1circ:af 2y:uj 1en!4l 1fr:2kom 1icy:uv 1opf:2kq2 1scr:2klq 1ucy:um 2ml!73 0zacute:ai 1caron:am 2y:tz 1dot:ak 1eetrf:6js 2ta:qe 1fr:2kon 1hcy:ty 1igrarr:6ot 1opf:2kq3 1scr:2klr 1wj:6bx 2nj:6bw",Wc=Us(Ox);var zc=ki(Gs,Pi,Hs);var Bx={typescript:zc,entityNames:Wc};function er(e,t){return Hc(e,t,Bx)}var Uc={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",bgsound:"HTMLUnknownElement",blink:"HTMLUnknownElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLUnknownElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",listing:"HTMLPreElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",multicol:"HTMLUnknownElement",nav:"HTMLElement",nextid:"HTMLUnknownElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",spacer:"HTMLUnknownElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement",xmp:"HTMLPreElement"},Kc={a:"SVGAElement",animate:"SVGAnimateElement",animateMotion:"SVGAnimateMotionElement",animateTransform:"SVGAnimateTransformElement",circle:"SVGCircleElement",clipPath:"SVGClipPathElement",defs:"SVGDefsElement",desc:"SVGDescElement",ellipse:"SVGEllipseElement",feBlend:"SVGFEBlendElement",feColorMatrix:"SVGFEColorMatrixElement",feComponentTransfer:"SVGFEComponentTransferElement",feComposite:"SVGFECompositeElement",feConvolveMatrix:"SVGFEConvolveMatrixElement",feDiffuseLighting:"SVGFEDiffuseLightingElement",feDisplacementMap:"SVGFEDisplacementMapElement",feDistantLight:"SVGFEDistantLightElement",feDropShadow:"SVGFEDropShadowElement",feFlood:"SVGFEFloodElement",feFuncA:"SVGFEFuncAElement",feFuncB:"SVGFEFuncBElement",feFuncG:"SVGFEFuncGElement",feFuncR:"SVGFEFuncRElement",feGaussianBlur:"SVGFEGaussianBlurElement",feImage:"SVGFEImageElement",feMerge:"SVGFEMergeElement",feMergeNode:"SVGFEMergeNodeElement",feMorphology:"SVGFEMorphologyElement",feOffset:"SVGFEOffsetElement",fePointLight:"SVGFEPointLightElement",feSpecularLighting:"SVGFESpecularLightingElement",feSpotLight:"SVGFESpotLightElement",feTile:"SVGFETileElement",feTurbulence:"SVGFETurbulenceElement",filter:"SVGFilterElement",foreignObject:"SVGForeignObjectElement",g:"SVGGElement",image:"SVGImageElement",line:"SVGLineElement",linearGradient:"SVGLinearGradientElement",marker:"SVGMarkerElement",mask:"SVGMaskElement",metadata:"SVGMetadataElement",mpath:"SVGMPathElement",path:"SVGPathElement",pattern:"SVGPatternElement",polygon:"SVGPolygonElement",polyline:"SVGPolylineElement",radialGradient:"SVGRadialGradientElement",rect:"SVGRectElement",script:"SVGScriptElement",set:"SVGSetElement",stop:"SVGStopElement",style:"SVGStyleElement",svg:"SVGSVGElement",switch:"SVGSwitchElement",symbol:"SVGSymbolElement",text:"SVGTextElement",textPath:"SVGTextPathElement",title:"SVGTitleElement",tspan:"SVGTSpanElement",use:"SVGUseElement",view:"SVGViewElement"},Jc=new Set(["a","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"]);function tr(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Xc(e,t="html"){if(t==="svg")return tr(Kc,e)??"SVGElement";if(t==="mathml")return Jc.has(e)?"MathMLElement":tr(Uc,e)??"MathMLElement";return tr(Uc,e)??tr(Kc,e)??(Jc.has(e)?"MathMLElement":"HTMLElement")}var Yc=new Map;function Qc(e){let t=Yc.get(e);if(t!==void 0)return t;let n=_n(e,{inline:!0});return Yc.set(e,n),n}function Zc(e,t){let n=Ie(e.name,t.name);if(n!==0)return n;let i=Ie(e.type,t.type);if(i!==0)return i;if(e.type==="forwarded"&&t.type==="forwarded"){let r=Ie(e.element,t.element);if(r!==0)return r}return Ie(e.detail??"",t.detail??"")}var Fx=/^["']|["']$/g,jx=/^([\w$]+)\s+extends\s/,qx=/^\{\s*\}$/;function Vt(e){return Array.from(e.values())}function po(e,t){if(!e||typeof e!=="object"||!("type"in e)){t.dynamic=!0;return}if(e.type==="Literal"){let{value:n}=e;if(typeof n==="string"||typeof n==="number")t.names.push(String(n));else t.dynamic=!0}else if(e.type==="ConditionalExpression"){let n=e;po(n.consequent,t),po(n.alternate,t)}else if(e.type==="TemplateLiteral"){let n=e.quasis.map((i)=>i.value.cooked??i.value.raw);if(n.length===1)t.names.push(n[0]);else t.patterns.push(new RegExp(`^${n.map(en).join("[^]*")}$`))}else t.dynamic=!0}function Vx(e,t){let{dispatcherName:n,callees:i}=t,r=new Set(t.hostDispatchedEventNames),s=[],l=!1;for(let o of t.hostDispatches)za(e,o);if(n!==void 0){ll(e,t.dispatcherTypeArgument,n,C(e,t.dispatcherDeclaratorNode));for(let o of i){if(o.name!==n||o.arguments.length===0)continue;let a={names:[],patterns:[],dynamic:!1};if(po(o.arguments[0],a),s.push(...a.patterns),l||=a.dynamic,a.names.length===0)continue;let p=o.arguments[1],c=Qr(Yr(e,o.nestedBoundDetailNames),p);for(let u of a.names)Je(e,{name:u,detail:c,has_argument:Boolean(p),source:C(e,o.node)}),r.add(u)}}return e.forwardedEvents.forEach((o,a)=>{let p=e.events.get(a);if(p&&p.type==="dispatched"&&!r.has(a)){let c=e.eventDescriptions.get(a),u={type:"forwarded",name:a,element:o,description:c,deprecated:p.deprecated,tags:p.tags,source:p.source};if(p.internal)u.internal=!0;if(p.detail!==void 0&&p.detail!=="undefined")u.detail=p.detail;e.events.set(a,u)}}),{names:r,mayDispatch:(o)=>l||s.some((a)=>a.test(o))}}function Gx(e){return`(typeof ${e} extends abstract new (...args: any) => infer I ? I : typeof ${e} extends (...args: any) => infer R ? R : never)`}function eu(e,t){let n=[...tu(e,t),...e.components.sort().map(Gx)].join(" | ");return e.target==="indexed"?`(null | ${n})[]`:`null | ${n}`}function tu(e,t){return e.elements.sort((n,i)=>n.tag<i.tag?-1:n.tag>i.tag?1:0).map(({tag:n,namespace:i,tagLocal:r})=>{let s=r&&t?.get(r);return s?`HTMLElementTagNameMap[${s}]`:Xc(n,i)})}function Hx(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>Ar(e,n))):new Set;return Vt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?Xe:n.name))).map((n)=>{let i=n.reactive||e.reactive_vars.has(n.name),r=e.bindings.get(n.name),s=r?.target==="indexed"&&n.type!==void 0&&!n.type.endsWith("[]"),l=n.typeSource==="typescript"||n.typeSource==="jsdoc";if(!r||r.target==="mixed"||s||l)return{...n,reactive:i};return{...n,type:eu(r),typeSource:"inferred",reactive:i}})}function Wx(e){return Vt(e.slots).map((t)=>{let{slot_props_unresolved_spread:n,...i}=t;if(!t.slot_props)return i;if(typeof t.slot_props==="string")return qx.test(t.slot_props)?{...i,slot_props:"Record<string, never>"}:i;let r=[];for(let[o,a]of Object.entries(t.slot_props)){if(a.replace&&a.value!==void 0)a.value=Jt(e,a.value);a.value??="any",r.push(`${o}: ${a.value}`)}let s=n?" & Record<string, any>":"",l=r.length===0?n?"Record<string, any>":"Record<string, never>":r.length===1?`{ ${r[0]} }${s}`:`{
48
+ `,n)}return i+e.slice(n)}function $y(e,t,n){let i=0,r=t.length;while(i<r){let s=i+r>>>1;if(t[s].start<n)i=s+1;else r=s}if(i>=t.length)return;if(G=t.slice(i).map(({type:s,value:a,start:o,end:l})=>({type:s,value:a,start:o,end:l})),H=0,Os(e,void 0,!1),H<G.length&&(G[H].start>=e.end||e.type==="Program")){e.trailingComments??=[];while(H<G.length)e.trailingComments.push(G[H++])}}var Iy=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function fp(e,t){for(let n=e;n<t;n++){let i=Ft.charCodeAt(n);if(i!==44&&i!==41&&i!==32&&i!==9)return!0}return!1}function Os(e,t,n){while(H<G.length&&G[H].start<e.start)e.leadingComments??=[],e.leadingComments.push(G[H++]);if(H>=G.length)return;let i=G[H].start;if(i<e.end||!fp(e.end,i)){let r=ot(e),s=Iy.get(e.type),a=s===void 0?void 0:r[s],o=Array.isArray(a)&&a.length===0;for(let l in r){if(H>=G.length)return;if(l==="type")continue;let p=r[l];if(Array.isArray(p)){let c=l===s;for(let u=0;u<p.length;u++){let f=p[u];if(Ie(f))Os(f,e,c?u===p.length-1:o)}}else if(Ie(p))Os(p,e,o)}if(H>=G.length)return}if(t!==void 0&&e.end===t.end)return;if(n)while(H<G.length){if(t&&G[H].start>=t.end)break;e.trailingComments??=[],e.trailingComments.push(G[H++])}else if(e.end<=G[H].start&&!fp(e.end,G[H].start))e.trailingComments=[G[H++]]}var Hi=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(" ")),Wi=!1,Mn=1,Ly=2,Ry=32,My=256,Oy=Mn|Ly|My,By=2,Fy=3,jy=4,qy=/\r\n?|\n|\u2028|\u2029/,hp=new Map;function qi(e){if(!(e instanceof RegExp))return e;let t=hp.get(e);if(!t){let n=new Set(e.source.slice(4,-2).split("|"));t={test:(i)=>n.has(i)},hp.set(e,t)}return t}var Ws=wn((e)=>class extends e{declareName(t,n,i){let r=!1;if(n===By){let s=this.currentScope();if(r=ee(s.lexical,t)||ee(s.functions,t)||ee(s.var,t),s.lexical.push(t),this.inModule&&s.flags&Mn)delete this.undefinedExports[t]}else if(n===jy)this.currentScope().lexical.push(t);else if(n===Fy){let s=this.currentScope();r=this.treatFunctionsAsVar?ee(s.lexical,t):ee(s.lexical,t)||ee(s.var,t),s.functions.push(t)}else for(let s=this.scopeStack.length-1;s>=0;--s){let a=this.scopeStack[s];if(ee(a.lexical,t)&&!(a.flags&Ry&&a.lexical[0]===t)||!this.treatFunctionsAsVarInScope(a)&&ee(a.functions,t)){r=!0;break}if(a.var.push(t),this.inModule&&a.flags&Mn)delete this.undefinedExports[t];if(a.flags&Oy)break}if(r)this.raiseRecoverable(i,`Identifier '${t}' has already been declared`)}}),zs=wn((e)=>{let{keywordTypes:t,tokTypes:n}=e.acorn,i=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((s)=>[s,t[s]])),r;return class extends e{constructor(s,a,o){super(s,a,o);this.keywords=qi(this.keywords),this.reservedWords=qi(this.reservedWords),this.reservedWordsStrict=qi(this.reservedWordsStrict),this.reservedWordsStrictBind=qi(this.reservedWordsStrictBind),r??=this.context[0]}reset(s,a,o){if(super.reset?.(s,a,o),this.input=s,this.containsEsc=!1,this.pos=a,o)this.lineStart=a-o.column,this.curLine=o.line;else this.lineStart=s.lastIndexOf(`
49
+ `,a-1)+1,this.curLine=this.options.locations?s.slice(0,this.lineStart).split(qy).length:1;this.type=n.eof,this.value=null,this.start=this.end=a,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=a;let l=this.context;if(l.length!==1||l[0]!==r)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 u in this.undefinedExports){this.undefinedExports=Object.create(null);break}let p=this.scopeStack,c=p[0];if(p.length!==1||c.flags!==Mn||c.var.length>0||c.lexical.length>0||c.functions.length>0||c.tsTypes!==void 0||c.tsExportOnly!==void 0||c.tsEnums!==void 0)this.scopeStack=[],this.enterScope(Mn);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(s,a){let o=super.parseParenAndDistinguishExpression(s,a);if(o.type==="ParenthesizedExpression")Wi=!0;return o}checkUnreserved(s){if(Hi.has(s.name))super.checkUnreserved(s)}canInsertSemicolon(){let s=this.type;return s===n.eof||s===n.braceR||An(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let s=this.input,a=this.options.locations,o=this.pos,l=s.charCodeAt(o);for(;;)if(l===32||l===9)l=s.charCodeAt(++o);else if(l===10){if(l=s.charCodeAt(++o),a)this.curLine++,this.lineStart=o}else break;if(this.pos=o,l===47||l<33||l>=128)super.skipSpace()}readWord1(){let s=this.input,a=this.pos,o=a,l=s.charCodeAt(o),p=0;while(l>=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57||l===95||l===36)p=Math.imul(p,31)+l|0,l=s.charCodeAt(++o);if(l>=128||l===92)return super.readWord1();return this.containsEsc=!1,this.pos=o,qo(s,a,o,p)}readWord(){let s=this.readWord1();return this.finishToken(i.get(s)??n.name,s)}}}),oc=wi(Ws,zs),Vy=/ \(\d+:\d+\)$/;function On(e){return e}function ac(e){return e instanceof SyntaxError&&"pos"in e&&typeof e.pos==="number"}function Us(e,t,n,i,r,s=e.root.comments.length){let a=e.root.comments;Ay(t,a);let o={onComment:e.comments?Dy:_y,sourceType:"module",ecmaVersion:16,locations:e.loc,preserveParens:i};if(e.lfOnly)o.startLocation=ke(n);let l=e.isTypeScript?e.typescript:oc;if(!l)ji();let p;try{p=r(l,o)}catch(c){if(!ac(c))throw c;wy(c.pos,c.message.replace(Vy,""))}if(a.length>s)$y(On(p),a,n);return p}function lc(e,t,n=0){return On(Us(e,t,0,!1,(i,r)=>{if(n>0&&r.locations)r.startLocation=ke(n);let s=new i(r,t,n).parse();return s.start=0,s},0))}function Gy(e,t){if(!t)return{line:1,column:0};let{column:n}=ke(e);return{line:Ho(e-n)+1,column:n}}var Hy={count:0},Ms,Wy=(e)=>e.parseExpression();function zy(e,t,n,i,r){let s=Ms;if(Ms=void 0,s?.ParserClass===e&&s.onComment===t.onComment&&s.locations===t.locations&&s.parser.reset)s.parser.reset(n,i,t.startLocation);else s={ParserClass:e,onComment:t.onComment,locations:t.locations,parser:new e(t,n,i)};let a=s.parser;a.nextToken();let o=r(a);return a.input="",Ms=s,o}function pc(e,t,n,i){return Hy.count+=1,Wi=!1,Us(e,t,n,!0,(r,s)=>(s.startLocation??=Gy(n,s.locations),zy(r,s,t,n,i)))}function jt(e,t,n,i=!1){let r=On(pc(e,t,n,Wy)),s=Math.max(r.end,Py());return{node:Wi&&!i?Ks(r):r,end:s}}function cc(e,t,n){let i=e.root.comments.length,r=!0,s=pc(e,t,n,(o)=>{let l={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},p=o.parseMaybeConditional(void 0,l);if(o.type!==oc.acorn.tokTypes.eof)return r=!1,p;let c=o.toAssignable(p,!1,l);return o.checkLValPattern(c),c});if(!r){e.root.comments.length=i;return}let a=On(s);return Wi?Ks(a):a}function uc(e,t,n){return On(Us(e,t,n,!1,(i,r)=>{let s=new i(r,t,n);try{return s.nextToken(),s.parseStatement(null,!0,Object.create(null))}catch(a){if(ac(a)&&a.pos===t.length)de(t.length);throw a}}))}function Ks(e){let t=e;while(t.type==="ParenthesizedExpression")t=t.expression;return zt(t,Ks),t}var Uy=[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],Ky=/[:!]/;function Js(e){let t;return()=>(t??=Jy(e),t)}function Jy(e){let t=new Map,n=0,i="";for(let r of e.split(" ")){let s=r.search(Ky);i=i.slice(0,Number.parseInt(r[0],36))+r.slice(1,s);let a=Number.parseInt(r.slice(s+1),36);if(t.set(`${i};`,a),r[s]==="!")t.set(i,a);n=Math.max(n,i.length+1)}return{table:t,longest:n}}var N1=Js("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),Xs=(e)=>e>=48&&e<=57,Xy=(e)=>Xs(e)||e>=65&&e<=70||e>=97&&e<=102,dc=(e)=>Xs(e)||e>=65&&e<=90||e>=97&&e<=122,zi=0;function Yy(e,t,n,i){if(e.charCodeAt(t)===35){let o=(e.charCodeAt(t+1)|32)===120,l=t+(o?2:1),p=l;while(p<e.length&&(o?Xy:Xs)(e.charCodeAt(p)))p++;if(p===l)return 0;return zi=e.charCodeAt(p)===59?p+1:p,Number.parseInt(e.slice(l,p),o?16:10)}let{table:r,longest:s}=i(),a=t;while(a-t<s&&dc(e.charCodeAt(a)))a++;if(e.charCodeAt(a)===59){let o=r.get(e.slice(t,a+1));if(o!==void 0)return zi=a+1,o}for(let o=a;o>t;o--){let l=r.get(e.slice(t,o));if(l===void 0)continue;if(n){let p=e.charCodeAt(o);if(dc(p)||p===95||p===61)continue}return zi=o,l}return 0}function Qy(e,t){if(e===10&&!t)return 32;if(e<128)return e;if(e<=159)return Uy[e-128];if(e>=55296&&e<=57343)return 0;if(e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return 0}function Ui(e,t,n){let i=e.indexOf("&");if(i===-1)return e;let r="",s=0;while(i!==-1){let a=Yy(e,i+1,t,n);if(a)r+=e.slice(s,i)+String.fromCodePoint(Qy(a,t)),s=zi;i=e.indexOf("&",a?s:i+1)}return r+e.slice(s)}var Zy=/\r(?!\n)|[\u2028\u2029]/,Dc=/\s*}/y;function Zs(e,t){let n=e.codePointAt(t);if(n===void 0||!be(n,!0))return t;let i=t+(n<=65535?1:2),r=e.codePointAt(i);while(r!==void 0&&Fe(r,!0))i+=r<=65535?1:2,r=e.codePointAt(i);return i}class Nc{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(e,t,n,i={}){if(this.source=e,this.loc=i.loc??!1,this.lfOnly=this.loc&&!Zy.test(e),this.isTypeScript=Ii(e),this.typescript=n.typescript,this.isTypeScript&&!this.typescript)ji();this.entityNames=n.entityNames,this.css=i.css??!0,this.script=i.script??!0,this.comments=i.comments??!0,this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){return e.lastIndex=this.index,e.exec(this.source)?.[0]??null}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)tt(this.index,e);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)de(this.source.length);let t=this.source.indexOf(e,this.index),n=t===-1?this.source.length:t,i=this.source.slice(this.index,n);return this.index=n,i}allowWhitespace(){this.index=L(this.source,this.index)}requireWhitespace(){if(!J(this.source.charCodeAt(this.index)))Lp(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(e,t){return this.loc?{start:ke(e),end:ke(t)}:void 0}readIdentifierName(){let e=this.index,t=Zs(this.source,e),n=this.source.slice(e,t);if(this.index=t,Hi.has(n))nc(e,n);let i={type:"Identifier",name:n,start:e,end:t};if(this.loc)i.loc=this.sourceLocation(e,t);return i}current(){return this.stack[this.stack.length-1]}append(e){this.fragments[this.fragments.length-1].nodes.push(e)}open(e,t){this.append(e),this.stack.push(e),this.fragments.push(t)}setFragment(e){this.fragments[this.fragments.length-1]=e}close(){this.stack.pop(),this.fragments.pop()}}var eg={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function eo(e,t,n,i){return{type:"Literal",start:t,end:n,value:i,raw:e.slice(t,n)}}function fc(e,t){let n=e.charCodeAt(t);if(n===34||n===39){for(let r=t+1;r<e.length;r++){let s=e.charCodeAt(r);if(s===n)return eo(e,t,r+1,e.slice(t+1,r));if(s===92||s===10||s===13)return null}return null}let i=t;for(;i<e.length;i++){let r=e.charCodeAt(i);if(r<48||r>57)break}if(i===t||n===48&&i-t>1)return null;return eo(e,t,i,Number(e.slice(t,i)))}function tg(e,t,n){let i=Zs(e,t);if(i===t)return fc(e,t);let r=e.slice(t,i);if(r==="true"||r==="false"||r==="null")return eo(e,t,i,r==="null"?null:r==="true");if(Hi.has(r))return null;let s={type:"Identifier",start:t,end:i,name:r};for(let a=i;;){let o=e.charCodeAt(a);if(o===40){let c=ng(e,a+1,n);if(!c)return null;s={type:"CallExpression",start:t,end:c.end,callee:s,arguments:c.arguments,optional:!1},a=c.end;continue}let l,p;if(o===46){if(p=Zs(e,a+1),p===a+1)return null;l={type:"Identifier",start:a+1,end:p,name:e.slice(a+1,p)}}else if(o===91){if(l=fc(e,a+1),!l||e.charCodeAt(l.end)!==93)return null;p=l.end+1}else return s;s={type:"MemberExpression",start:t,end:p,object:s,property:l,computed:o===91,optional:!1},a=p}}function ng(e,t,n){let i=[],r=L(e,t);if(e.charCodeAt(r)===41)return{arguments:i,end:r+1};for(;;){let s=Ji(e,r,n);if(!s)return null;i.push(s),r=L(e,s.end);let a=e.charCodeAt(r);if(a===41)return{arguments:i,end:r+1};if(a!==44)return null;if(r=L(e,r+1),e.charCodeAt(r)===41)return null}}function so(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);if(!(i===33&&r!==61)&&!(i===45&&r!==45&&r!==61))return tg(e,t,n);let s=so(e,L(e,t+1),n);if(!s)return null;return{type:"UnaryExpression",start:t,end:s.end,operator:i===33?"!":"-",prefix:!0,argument:s}}function hc(e,t,n){let i=e.charCodeAt(t),r=e.charCodeAt(t+1);switch(i){case 124:return r===124&&e.charCodeAt(t+2)!==61?"||":null;case 38:return r===38&&e.charCodeAt(t+2)!==61?"&&":null;case 63:return r===63&&e.charCodeAt(t+2)!==61?"??":null;case 61:if(r!==61)return null;return e.charCodeAt(t+2)===61?"===":"==";case 33:if(r!==61)return null;return e.charCodeAt(t+2)===61?"!==":"!=";case 60:case 62:if(n||r===i)return null;if(r===61)return i===60?"<=":">=";return i===60?"<":">";case 43:return r===43||r===61?null:"+";case 45:return r===45||r===61?null:"-";case 42:return r===42||r===61?null:"*";case 47:return r===47||r===42||r===61?null:"/";case 37:return r===61?null:"%";default:return null}}function to(e,t,n,i){if($c(e.charCodeAt(t.end)))return t;let r=L(e,t.end),s=hc(e,r,i);if(s===null)return t;let a=eg[s];if(a<=n)return t;let o=so(e,L(e,r+s.length),i);if(!o)return null;let l=to(e,o,s==="??"?2:a,i);if(!l)return null;let p;if(s==="||"||s==="&&"||s==="??"){let c=hc(e,L(e,l.end),i);if(s==="??"?c==="||"||c==="&&":c==="??")return null;p={type:"LogicalExpression",start:t.start,end:l.end,left:t,operator:s,right:l}}else p={type:"BinaryExpression",start:t.start,end:l.end,left:t,operator:s,right:l};return to(e,p,n,i)}function Ji(e,t,n){let i=so(e,t,n);if(!i)return null;let r=to(e,i,-1,n);if(!r||$c(e.charCodeAt(r.end)))return r;let s=L(e,r.end);if(e.charCodeAt(s)!==63)return r;let a=e.charCodeAt(s+1);if(a===46||a===63)return null;let o=Ji(e,L(e,s+1),n);if(!o)return null;let l=L(e,o.end);if(e.charCodeAt(l)!==58)return null;let p=Ji(e,L(e,l+1),n);if(!p)return null;return{type:"ConditionalExpression",start:r.start,end:p.end,test:r,consequent:o,alternate:p}}function $c(e){return e===125||e===41||e===44||e===58}function ig(e,t){let n=e.charCodeAt(L(e,t));return n===125||n===41}function rg(e,t,n){let i=Ji(e,t,n);return i&&ig(e,i.end)?i:null}function Se(e){switch(e.loc={start:st(e.start),end:st(e.end)},e.type){case"MemberExpression":Se(e.object),Se(e.property);break;case"CallExpression":Se(e.callee);for(let t of e.arguments)Se(t);break;case"UnaryExpression":Se(e.argument);break;case"BinaryExpression":case"LogicalExpression":Se(e.left),Se(e.right);break;case"ConditionalExpression":Se(e.test),Se(e.consequent),Se(e.alternate);break}}function te(e){let t=!e.loc||e.lfOnly?rg(e.source,e.index,e.isTypeScript):null;if(t){if(e.index=t.end,e.loc)Se(t);return t}let{node:n,end:i}=jt(e,e.source,e.index);return e.index=i,n}var sg=new Set(["server","client","worker","test","default"]);function og(e,t,n){let{source:i,index:r}=e;if(r>=i.length)de(i.length);let s=Li(i,r);if(s===-1)js(i.length,"script");e.index=Ri(i,s);let a=e.script?lc(e,i.slice(0,s),r):{type:"Program",start:r,end:s,body:[],sourceType:"module"};if(a.start=r,a.loc)Object.assign(a.loc.start,st(t)),Object.assign(a.loc.end,st(e.index));else if(e.loc)a.loc={start:st(t),end:st(e.index)};let o="default";for(let l of n){if(sg.has(l.name))Fp(l,l.name);if(l.name==="module"){if(l.value!==!0)Op(l,l.name);o="module"}if(l.name==="context"){let p=l.value;if(!Array.isArray(p)||p.length!==1||p[0].type!=="Text"||p[0].data!=="module")Bp(l);o="module"}}return{type:"Script",start:t,end:e.index,context:o,content:a,attributes:n}}var ag=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,lg=/\d+(\.\d+)?%/y,pg=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,cg=/\s*>/y,nt=-1,Ic=34,ug=35,dg=36,fg=38,Lc=39,hg=40,mg=41,Qi=42,yg=43,gg=45,xg=46,Rc=47,no=58,Eg=59,bg=60,mc=61,vg=62,Sg=91,oo=92,Tg=93,Cg=94,Mc=123,io=124,kg=125,Oc=126,Xi=[];function wg(e,t,n){let i=e.index;Xi=[];let r=e.css?Pg(e):Ag(e),s=e.index;return e.eat("</style",!0),e.read(cg),{type:"StyleSheet",start:t,end:e.index,attributes:n,children:r,comments:Xi,content:{start:i,end:s,styles:e.source.slice(i,s),comment:null}}}function Ag(e){return e.index=Mi(e.source,e.index),[]}function Pg(e){let t=[];for(;;){if(qt(e,!0),e.match("</style")||e.index>=e.source.length)break;t.push(e.match("@")?Bc(e):Fc(e))}return t}function Bc(e){let t=e.index;e.eat("@",!0);let n=bt(e),i=ao(e,!0),r=null;if(e.match("{"))r=Vc(e);else e.eat(";",!0);return{type:"Atrule",start:t,end:e.index,name:n,prelude:i,block:r}}function Fc(e){let t=e.index;return{type:"Rule",prelude:jc(e,!1),block:Vc(e),start:t,end:e.index}}function jc(e,t){let n=[];qt(e,!0);let i=e.index;while(e.index<e.source.length){n.push(_g(e,t));let r=e.index;if(qt(e,!0),e.match(t?")":"{"))return{type:"SelectorList",start:i,end:r,children:n};e.eat(",",!0),qt(e,!0)}return de(e.source.length)}function yc(e,t){return{type:"RelativeSelector",combinator:e,selectors:[],start:t,end:-1}}function _g(e,t){let{source:n,index:i}=e,r=[],s=yc(null,e.index);while(e.index<n.length){let a=e.index,o=n.charCodeAt(a),l=s.selectors;if(o===fg)e.index++,l.push({type:"NestingSelector",name:"&",start:a,end:e.index});else if(o===Qi)e.index++,l.push(gc(e,a,"*"));else if(o===ug)e.index++,l.push({type:"IdSelector",name:bt(e),start:a,end:e.index});else if(o===xg)e.index++,l.push({type:"ClassSelector",name:bt(e),start:a,end:e.index});else if(o===no){let f=n.charCodeAt(a+1)===no;e.index+=f?2:1;let h=bt(e),m=null;if(e.eat("("))m=jc(e,!0),e.eat(")",!0);if(f)l.push({type:"PseudoElementSelector",name:h,start:a,end:e.index,...m&&{args:m}});else l.push({type:"PseudoClassSelector",name:h,args:m,start:a,end:e.index})}else if(o===Sg)e.index++,l.push(Dg(e,a));else{let f=t?e.read(ag):null,h=!f&&et(o)?e.read(lg):null;if(f)l.push({type:"Nth",value:f,start:a,end:e.index});else if(h)l.push({type:"Percentage",value:h,start:a,end:e.index});else if(qc(n,a)===0){let m=bt(e);l.push(gc(e,a,m))}}let p=e.index;qt(e,!1);let c=e.match(",")||e.match(t?")":"{");if(e.index=p,c)return s.end=p,r.push(s),{type:"ComplexSelector",start:i,end:p,children:r};let u=Ng(e);if(u){if(s.selectors.length>0)s.end=p,r.push(s);if(s=yc(u,u.start),e.allowWhitespace(),e.match(",")||e.match(t?")":"{"))kp(e.index)}}return de(n.length)}function gc(e,t,n){let i=n,r;if(e.eat("|"))r=i,i=e.eat("*")?"*":bt(e);return{type:"TypeSelector",name:i,...r!==void 0&&{namespace:r},start:t,end:e.index}}function Dg(e,t){let n=e.source;e.allowWhitespace();let i=bt(e);e.allowWhitespace();let r=null,s=null,a=n.charCodeAt(e.index);if(a===mc)s="=";else if((a===Oc||a===Cg||a===dg||a===Qi||a===io)&&n.charCodeAt(e.index+1)===mc)s=n.slice(e.index,e.index+2);if(s)e.index+=s.length,e.allowWhitespace(),r=Rg(e);e.allowWhitespace();let o=e.index;while(Hc(n.charCodeAt(e.index)))e.index++;let l=e.index>o?n.slice(o,e.index):null;return e.allowWhitespace(),e.eat("]",!0),{type:"AttributeSelector",start:t,end:e.index,name:i,matcher:s,value:r,flags:l}}function qc(e,t){let n=e.charCodeAt(t);if(n===yg||n===Oc||n===vg)return 1;if(n===io&&e.charCodeAt(t+1)===io)return 2;return 0}function Ng(e){let t=e.index;e.allowWhitespace();let n=e.index,i=qc(e.source,n);if(i>0){e.index+=i;let r=e.index;return e.allowWhitespace(),{type:"Combinator",name:e.source.slice(n,r),start:n,end:r}}if(e.index!==t)return{type:"Combinator",name:" ",start:t,end:e.index};return null}function Vc(e){let t=e.index;e.eat("{",!0);let n=[];while(e.index<e.source.length){if(qt(e,!0),e.match("}"))break;n.push($g(e))}return e.eat("}",!0),{type:"Block",start:t,end:e.index,children:n}}function $g(e){if(e.match("@"))return Bc(e);let t=e.index;ao(e,!1);let n=e.source.charCodeAt(e.index);return e.index=t,n===Mc?Fc(e):Ig(e)}function Ig(e){let{source:t,index:n}=e;if(n>=t.length)de(t.length);let i=n;while(i<t.length){let l=t.charCodeAt(i);if(l===no||J(l))break;i++}let r=t.slice(n,i);e.index=i,e.allowWhitespace(),e.eat(":");let s=e.index;e.allowWhitespace();let a=ao(e,!0);if(!a&&!r.startsWith("--"))Cp({start:n,end:s});let o=e.index;if(!e.match("}"))e.eat(";",!0);return{type:"Declaration",start:n,end:o,property:r,value:a}}function ao(e,t){let n=e.source,i=n.length,r="",s=e.index,a=null,o=!1,l=!1,p=nt,c=e.index;while(c<i){let u=n.charCodeAt(c);if(o){o=!1,c++;continue}if(u===oo){o=!0,c++;continue}if(u===p)p=nt;else if(u===mg)l=!1;else if(p===nt&&(u===Ic||u===Lc))p=u;else if(u===hg){if(Lg(n,r,s,c))l=!0}else if((u===Eg||u===Mc||u===kg)&&!l&&p===nt){if(e.index=c,!t)return"";if(r+=n.slice(s,c),a){let f=r.length-r.trimStart().length;for(let h of a)h.position=Math.max(0,(h.position??0)-f)}return r.trim()}else if(u===Rc&&!l&&p===nt&&n.charCodeAt(c+1)===Qi){r+=n.slice(s,c),e.index=c;let f=Gc(e);if(t)f.position=r.length,Xi.push(f),a??=[],a.push(f);c=e.index,s=c;continue}c++}return e.index=i,de(i)}function Lg(e,t,n,i){if(i-n>=3)return e.charCodeAt(i-3)===117&&e.charCodeAt(i-2)===114&&e.charCodeAt(i-1)===108;return(t+e.slice(n,i)).endsWith("url")}function Rg(e){let t=e.source,n=nt;if(e.eat('"'))n=Ic;else if(e.eat("'"))n=Lc;let i=e.index,r=!1,s=i;while(s<t.length){let a=t.charCodeAt(s);if(r)r=!1;else if(a===oo)r=!0;else if(n===nt?a===Tg||J(a):a===n)return e.index=n===nt?s:s+1,t.slice(i,s).trim();s++}return e.index=s,de(t.length)}function bt(e){let{source:t,index:n}=e,i=t.charCodeAt(n);if(et(i)||i===gg&&et(t.charCodeAt(n+1)))Bs(n);let r="",s=n,a=n;while(a<t.length){let o=t.charCodeAt(a);if(o===oo){r+=t.slice(s,a),e.index=a;let l=e.matchRegex(pg);if(l){let p=String.fromCodePoint(Number.parseInt(l.slice(1),16));r+=p==="\\"?"\\\\":p,a+=l.length}else r+=`\\${t[a+1]}`,a+=2;s=a}else if(o>=160||Mg(o))a++;else break}if(r+=t.slice(s,a),e.index=a,r==="")Bs(n);return r}function qt(e,t){let n=e.source;e.allowWhitespace();for(;;){let i=n.charCodeAt(e.index);if(i===Rc&&n.charCodeAt(e.index+1)===Qi){let r=Gc(e);if(t)Xi.push(r)}else if(i===bg&&e.eat("<!--"))e.readUntil("-->"),e.eat("-->",!0);else break;e.allowWhitespace()}}function Gc(e){let t=e.index;e.eat("/*",!0);let n=e.readUntil("*/");return e.eat("*/",!0),{type:"CSSComment",value:n,start:t,end:e.index}}function Hc(e){return e>=65&&e<=90||e>=97&&e<=122}function Mg(e){return Hc(e)||et(e)||e===95||e===45}var Ys=/<\/textarea(\s[^>]*)?>/iy,Og=/^![a-zA-Z]+$/,Bg=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Fg=/^[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,Qs="\\u200C\\u200D",jg=new RegExp(`^(?:\\p{Lu}[$${Qs}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Qs}\\p{ID_Continue}]*(?:\\.[$${Qs}\\p{ID_Continue}]+)+)$`,"u"),qg=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),lo=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]]]),xc=[...lo.keys()],Vg=`${xc.slice(0,-1).join(", ")} or ${xc.at(-1)}`,Gg=62,Ec=123;function Zi(e,t){let n=e.index;if(n>=e.source.length)de(e.source.length);let i=xt(e.source,n,t);return e.index=i,{name:e.source.slice(n,i),start:n,end:i,loc:e.sourceLocation(n,i)}}var Bn=(e,t,n,i=n)=>({start:e,end:t,type:"Text",raw:n,data:i});function Hg(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return jg.test(e)}function Wg(e){let t=!0;for(let n=0;n<e.length&&t;n++){let i=e.charCodeAt(n);t=i>=97&&i<=122||n>0&&i>=48&&i<=57}return t&&e.length>0||Og.test(e)||Bg.test(e)||Fg.test(e)}function bc(e,t){for(let n=e.length-1;n>=0;n--){let i=t(e[n]);if(i!==void 0)return i}return!1}function zg(e,t,n){let i=lo.get(t);if(i)return i[0];if(n)return"Component";if(t==="title"){if(bc(e.stack,({type:r})=>{if(r==="SvelteHead")return!0;return r==="RegularElement"||r==="Component"?!1:void 0}))return"TitleElement"}if(t==="slot"){if(!bc(e.stack,(r)=>r.type==="RegularElement"&&r.attributes.some((s)=>s.type==="Attribute"&&s.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function Ug(e){let t=e.index++;if(e.eat("!--")){let n=e.readUntil("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:n})}else if(e.eat("/"))Kg(e,t);else Xg(e,t)}function Kg(e,t){let{name:n}=Zi(e,!1);if(e.allowWhitespace(),e.eat(">",!0),Dn(n))rc(t);let i=e.current();while(!("name"in i)||i.name!==n){if(i.type!=="RegularElement"){let r=e.lastAutoClosedTag;if(r?.tag===n)Dp(t,n,r.reason);_p(t,n)}i.end=t,e.close(),i=e.current()}if(i.end=e.index,e.close(),e.stack.length<(e.lastAutoClosedTag?.depth??0))e.lastAutoClosedTag=void 0}function Jg(e,t,n){return{type:e,start:t,end:-1,name:n}}function Xg(e,t){let n=Zi(e,!1),{name:i}=n,r=lo.get(i);if(!r&&i.startsWith("svelte:"))zp(n,Vg);let s=Hg(i);if(!s&&!Wg(i))ec(n);if(r?.[1]){if(e.metaTags.has(i))Gp(t,i);if(e.current().type!=="Root")Wp(t,i);e.metaTags.add(i)}let a=Jg(zg(e,i,s),t,i);if(e.loc)a.name_loc=n.loc;a.attributes=[],a.fragment={type:"Fragment",nodes:[]},e.allowWhitespace();let o=e.current();if(o.type==="RegularElement"&&Bi(o.name,i))o.end=t,e.close(),e.lastAutoClosedTag={tag:o.name,reason:i,depth:e.stack.length};if((i==="script"||i==="style")&&e.current().type==="Root"){let l=[];a.attributes=l,Cc(e,l,nx),Qg(e,a,t,l);return}if(Cc(e,a.attributes,rx),a.type==="SvelteComponent"){let l=vc(a);if(!l)Vp(t);if(!Sc(l.value))qp(l.start);a.expression=Tc(l.value)}else if(a.type==="SvelteElement"){let l=vc(a);if(!l)Gs(t);if(l.value===!0)Gs(l);a.tag=Sc(l.value)?Tc(l.value):tx(l.value[0])}if(!e.eat("/")&&!Dn(i))if(e.eat(">",!0),i==="textarea")a.fragment.nodes=zc(e,(l,p)=>(Ys.lastIndex=p,Ys.test(l)),"inside <textarea>"),e.read(Ys);else if(i==="script"||i==="style")a.fragment.nodes.push(Yg(e,`</${i}>`));else{e.open(a,a.fragment);return}else e.eat(">",!0);a.end=e.index,e.append(a)}function Yg(e,t){let n=e.index,i=e.source.indexOf(t,n);e.index=i===-1?e.source.length:i;let r=Bn(n,e.index,e.source.slice(n,e.index));return e.eat(t,!0),r}function Qg(e,t,n,i){e.eat(">",!0);let r=Zg(e.root.fragment.nodes,n);if(t.name==="style"){let o=wg(e,n,i);if(o.content.comment=r,e.root.css)jp(n);e.root.css=o;return}let s=og(e,n,i);if(r&&e.comments)s.content.leadingComments=[{type:"Line",value:r.data}];let a=s.context==="module"?"module":"instance";if(e.root[a])Mp(n);e.root[a]=s}function Zg(e,t){let n=e.length-1;if(n<0||e[n].end!==t)return null;for(let i=n;i>=0;i--){let r=e[i];if(r.type==="Comment")return r;if(r.type!=="Text"||r.data.trim())return null}return null}var ex=(e)=>e.type==="Attribute"&&e.name==="this";function vc(e){let t=e.attributes.find(ex);if(t)e.attributes.splice(e.attributes.indexOf(t),1);return t}function Sc(e){if(e===!0)return!1;if(!Array.isArray(e))return!0;return e.length===1&&e[0].type==="ExpressionTag"}function Tc(e){return(Array.isArray(e)?e[0]:e).expression}function tx(e){if(e.type!=="Text")return e.expression;return{type:"Literal",value:e.data,raw:`'${e.raw}'`,start:e.start,end:e.end}}function Cc(e,t,n){let i=new Set;for(;;){let r=n(e);if(!r)return;let{type:s}=r;if(s==="Attribute"||s==="BindDirective"||s==="StyleDirective"||s==="ClassDirective"){let a=`${s==="BindDirective"?"Attribute":s}${r.name}`;if(i.has(a))mp(r);if(r.name!=="this")i.add(a)}t.push(r),e.allowWhitespace()}}function po(e,t,n,i,r){return e.loc?{type:"Attribute",start:n,end:i,name:t.name,name_loc:t.loc,value:r}:{type:"Attribute",start:n,end:i,name:t.name,value:r}}function Wc(e){if(ve(e.source.charCodeAt(e.index)))tt(e.index,"=")}function nx(e){let t=e.index,n=Zi(e,!0);if(!n.name)return null;let i=!0;if(e.eat("=")){e.allowWhitespace();let{source:r}=e,s=e.index,a=ve(r.charCodeAt(s)),o=-1;if(a){let c=r.indexOf(r[s],s+1);if(c!==-1)o=c+1}if(o===-1){o=s;while(o<r.length&&r.charCodeAt(o)!==Gg&&!J(r.charCodeAt(o)))o++;if(o===s)qs(s)}e.index=o;let l=a?1:0,p=r.slice(s+l,o-l);i=[Bn(o-p.length-l,o-l,p,Ui(p,!0,e.entityNames))]}return Wc(e),po(e,n,t,e.index,i)}function ix(e){let t=e.index,n=e.match("/*");if(!n&&!e.match("//"))return!1;e.index+=2;let i=e.readUntil(n?"*/":`
50
+ `);if(n)e.eat("*/");let r={type:n?"Block":"Line",start:t,end:e.index,value:i},s=e.sourceLocation(t,e.index);if(s)r.loc=s;if(e.comments)e.root.comments.push(r);return!0}function rx(e){while(ix(e))e.allowWhitespace();let t=e.index;if(e.eat("{"))return sx(e,t);let n=Zi(e,!0);if(!n.name)return null;let i=e.index;e.allowWhitespace();let r=!0;if(e.eat("=")){if(e.allowWhitespace(),e.match("/>"))r=[Bn(e.index,e.index+1,"/")],e.index++;else r=lx(e);i=e.index}else Wc(e);let s=n.name.indexOf(":"),a=s>0?qg.get(n.name.slice(0,s)):void 0;return a?ax(e,a,n,s,t,i,r):po(e,n,t,i,r)}function sx(e,t){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let r=te(e);return e.eatClosingBrace(),{type:"AttachTag",start:t,end:e.index,expression:r}}if(e.eat("...")){let r=te(e);return e.eatClosingBrace(),{type:"SpreadAttribute",start:t,end:e.index,expression:r}}let n=e.readIdentifierName();if(n.name==="")yp(t);e.eatClosingBrace();let i={type:"ExpressionTag",start:n.start,end:n.end,expression:n};return po(e,n,t,e.index,i)}function ox(e){if(e===!0)return;return Array.isArray(e)?e[0]:e}function ax(e,t,n,i,r,s,a){let[o,...l]=n.name.slice(i+1).split("|");if(o==="")Pp({start:r,end:r+i+1},n.name);let p={start:r,end:s,type:t,name:o};if(e.loc)p.name_loc=n.loc;if(t==="StyleDirective")return p.modifiers=l,p.value=a,p;let c=ox(a);if(c&&(Array.isArray(a)&&a.length>1||c.type==="Text"))Ap(c.start);if(p.expression=c?.expression??null,p.modifiers=l,t==="TransitionDirective"){let u=n.name.slice(0,i);p.intro=u!=="out",p.outro=u!=="in"}if((t==="BindDirective"||t==="ClassDirective")&&!p.expression)p.expression={start:r+i+1,end:s,type:"Identifier",name:o};return p}function lx(e){let t=e.source.charCodeAt(e.index),n=ve(t);if(n){if(e.index++,e.source.charCodeAt(e.index)===t)return e.index++,[Bn(e.index-1,e.index-1,"")]}let i;try{i=zc(e,n?(r,s)=>r.charCodeAt(s)===t:Oi,"in attribute value",n?t:void 0)}catch(r){let s=r instanceof E&&r.code==="js_parse_error"?r.position?.[0]:void 0;if(s!==void 0&&e.source.startsWith("/>",s-1))e.index=s,tt(s,n?String.fromCharCode(t):"}");throw r}if(n)e.index++;else if(i.length===0)qs(e.index);return n||i.length>1||i[0].type==="Text"?i:i[0]}function zc(e,t,n,i){let{source:r}=e,s=[],a=e.index,o=(l)=>{if(l<=a)return;let p=r.slice(a,l);s.push(Bn(a,l,p,Ui(p,!0,e.entityNames)))};while(e.index<r.length){let l=e.index;if(t(r,l))return o(l),s;if(r.charCodeAt(l)!==Ec){if(e.index++,i!==void 0)while(e.index<r.length&&r.charCodeAt(e.index)!==Ec&&r.charCodeAt(e.index)!==i)e.index++;continue}e.index++;let p=r.charCodeAt(e.index);if(p===35||p===64){e.index++;let u=e.index;while(e.index<r.length&&r.charCodeAt(e.index)>=97&&r.charCodeAt(e.index)<=122)e.index++;let f=r.slice(u,e.index);(p===35?bp:tc)(l,f,n)}o(l),e.allowWhitespace();let c=te(e);e.eatClosingBrace(),s.push({type:"ExpressionTag",start:l,end:e.index,expression:c}),a=e.index}de(r.length)}var px=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),cx=new Map([["type",(e,t)=>{if(t!=="String"&&t!=="Number"&&t!=="Boolean"&&t!=="Array"&&t!=="Object")return!1;return e.type=t,!0}],["reflect",(e,t)=>{if(typeof t!=="boolean")return!1;return e.reflect=t,!0}],["attribute",(e,t)=>{if(typeof t!=="string")return!1;return e.attribute=t,!0}]]),kc="[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}-]",ux=new RegExp(`^[a-z]${kc}*-${kc}*$`,"u"),dx=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),Ki=(e)=>(t,n)=>{let i=Yi(n);if(typeof i!=="boolean")Vi(n,"true or false");t[e]=i},fx=new Map([["runes",Ki("runes")],["immutable",Ki("immutable")],["preserveWhitespace",Ki("preserveWhitespace")],["accessors",Ki("accessors")],["namespace",(e,t)=>{let n=px.get(Yi(t));if(!n)Vi(t,'"html", "mathml" or "svg"');e.namespace=n}],["css",(e,t)=>{if(Yi(t)!=="injected")Vi(t,'"injected"');e.css="injected"}],["tag",(e,t)=>Up(t)],["customElement",(e,t)=>{let n=yx(t);if(n)e.customElement=n}]]);function hx(e){let t=[],n={start:e.start,end:e.end,attributes:t};for(let i of e.attributes){if(i.type!=="Attribute")Kp(i);t.push(i);let r=fx.get(i.name);if(!r)Zp(i,i.name);r(n,i)}return n}function Yi({value:e}){if(e===!0)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;if(t.length>1)return null;let[n]=t;if(n.type==="Text")return n.data;return n.expression.type==="Literal"?n.expression.value:null}function wc(e,t){if(typeof t!=="string")Hs(e);if(!t)return;if(!ux.test(t))Hs(e);if(dx.has(t))Qp(e)}function ro(e){return e.type==="Property"&&!e.computed&&e.key.type==="Identifier"}function mx(e,t){let n=new Map;for(let i of e.properties){if(!ro(i))t();if(!n.has(i.key.name))n.set(i.key.name,i.value)}return n}function yx(e){let t=()=>Jp(e);if(e.value===!0)t();let n=Array.isArray(e.value)?e.value[0]:e.value;if(n.type==="Text"){let c=Yi(e);return wc(e,c),{tag:c}}let{expression:i}=n;if(i.type!=="ObjectExpression"){if(i.type==="Literal"&&i.value===null)return;t()}let r=mx(i,t),s={},a=r.get("tag");if(a){let c=a.type==="Literal"?a.value:void 0;wc(null,c),s.tag=c}let o=r.get("props");if(o){let c=()=>Xp(e);if(o.type!=="ObjectExpression")c();s.props={};for(let u of o.properties){if(!ro(u)||u.value.type!=="ObjectExpression")c();let f={};s.props[u.key.name]=f;for(let h of u.value.properties){if(!ro(h)||h.value.type!=="Literal")c();if(!cx.get(h.key.name)?.(f,h.value.value))c()}}}let l=r.get("shadow");if(l)if(l.type==="ObjectExpression")s.shadow=l;else if(l.type==="Literal"&&(l.value==="open"||l.value==="none"))s.shadow=l.value;else Yp(e);let p=r.get("extend");if(p)s.extend=p;return s}var gx={"{":"}","(":")","[":"]"};function co(e,t,n=gx){let i=Object.values(n),r=[],s=t;while(s<e.length){let a=e[s++];if(a==="'"||a==='"'||a==="`")s=xx(e,s,a);else if(Object.hasOwn(n,a))r.push(a);else if(i.includes(a)){let o=n[r.pop()??""];if(a!==o)tt(s-1,o);if(r.length===0)return s}}de(e.length)}function xx(e,t,n){let i=t;while(i<e.length){let r=e[i++];if(r===n)return i;if(r==="\\")i++;else if(n==="`"&&r==="$"&&e[i]==="{")i=co(e,i)}ic(t)}var Ex=/\?\s*:/g;function er(e){let t=e.index,n=e.readIdentifierName();if(n.name!=="")return{...n,typeAnnotation:Ac(e)};let i=e.source[e.index];if(i!=="{"&&i!=="[")$p(e.index);e.index=co(e.source,t);let r=cc(e,e.source.slice(0,e.index),t)??bx(e,t);Un(r,"ObjectPattern","ArrayPattern");let s=Ac(e);if(r.typeAnnotation=s,s)r.end=s.end;return r}function bx(e,t){let{node:n}=jt(e,`${e.source.slice(0,e.index)} = 1`,t);return Un(n,"AssignmentExpression"),n.left}function Ac(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let n="_ as ",i=e.index-n.length,r=e.source.slice(0,i)+n+e.source.slice(e.index).replace(Ex,":"),s=jt(e,r,i).node;if(s.type==="AssignmentExpression"){let a=s.right.start;while(r[a]!=="=")a-=1;s=jt(e,r.slice(0,a),i).node}if(s.type==="SequenceExpression")s=s.expressions[0];return Un(s,"TSAsExpression"),e.index=s.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:s.typeAnnotation}}var vx={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},qe=()=>({type:"Fragment",nodes:[]});function Sx(e,t){if(e.eat("if")){e.requireWhitespace();let n=te(e);e.eatClosingBrace();let i=qe();e.open({type:"IfBlock",elseif:!1,start:t,end:-1,test:n,consequent:i,alternate:null},i)}else if(e.eat("each"))Cx(e,t);else if(e.eat("await")){e.requireWhitespace();let n=te(e);e.allowWhitespace();let i={type:"AwaitBlock",start:t,end:-1,expression:n,value:null,error:null,pending:null,then:null,catch:null},r=qe();if(e.eat("then"))i.value=Pc(e),i.then=r;else if(e.eat("catch"))i.error=Pc(e),i.catch=r;else i.pending=r;e.eat("}",!0),e.open(i,r)}else if(e.eat("key")){e.requireWhitespace();let n=te(e);e.eatClosingBrace();let i=qe();e.open({type:"KeyBlock",start:t,end:-1,expression:n,fragment:i},i)}else if(e.eat("snippet"))kx(e,t);else Np(e.index)}function Pc(e){if(e.matchRegex(Dc))return e.allowWhitespace(),null;e.requireWhitespace();let t=er(e);return e.allowWhitespace(),t}function Tx(e){let t={assertion:null},n=e.end,i=(s)=>{if(s.type==="TSAsExpression"&&s.end===e.end)return t.assertion=s,n=s.expression.end,s.expression;return zt(s,i),s},r=e;if(e.type==="TSAsExpression")t.assertion=e,r=e.expression,n=r.end;else zt(e,i);return r.end=n,{expression:r,assertion:t.assertion}}function Cx(e,t){e.requireWhitespace();let n=e.source,i;while(!i)try{i=te(e)}catch(l){let p=((l instanceof E?l.position:void 0)?.[0]??t)-2;while(p>t&&e.source.slice(p,p+2)!=="as")p-=1;if(p<=t)throw e.source=n,l;e.source=n.slice(0,p)}if(e.source=n,e.allowWhitespace(),!e.match("as")){if(i.type==="SequenceExpression")i=i.expressions[0];let l=Tx(i);if(i=l.expression,l.assertion){let p=l.assertion.typeAnnotation.start-2;while(e.source.slice(p,p+2)!=="as")p-=1;e.index=p}}let r=null,s,a;if(e.eat("as"))e.requireWhitespace(),r=er(e);else e.index=i.end;if(e.allowWhitespace(),e.eat(",")){if(e.allowWhitespace(),s=e.readIdentifierName().name,!s)Vs(e.index);e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),a=te(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let o=qe();e.open({type:"EachBlock",start:t,end:-1,expression:i,body:o,context:r,index:s,key:a},o)}function kx(e,t){e.requireWhitespace();let n=e.readIdentifierName();if(n.name==="")Vs(e.index);e.allowWhitespace();let i=e.index,r;if(e.isTypeScript&&e.match("<")){let l=co(e.source,i,{"<":">"});r=e.source.slice(i+1,l-1),e.index=l}e.allowWhitespace(),e.eat("(",!0);let s=1;while(e.index<e.source.length&&(!e.match(")")||s!==1)){if(e.match("("))s++;if(e.match(")"))s--;e.index+=1}e.eat(")",!0);let{node:a}=jt(e,`${e.source.slice(0,e.index)} => {}`,i,!0);e.eatClosingBrace();let o=qe();e.open({type:"SnippetBlock",start:t,end:-1,expression:n,typeParams:r,parameters:a.type==="ArrowFunctionExpression"?a.params:void 0,body:o},o)}function wx(e,t){let n=e.index-1,i=e.current();if(i.type==="IfBlock"){if(!e.eat("else"))tt(n,"{:else} or {:else if}");if(e.eat("if"))Ep(n);if(e.allowWhitespace(),i.alternate=qe(),e.setFragment(i.alternate),e.eat("if")){e.requireWhitespace();let r=te(e);e.eatClosingBrace();let s=qe();e.open({start:t,end:-1,type:"IfBlock",elseif:!0,test:r,consequent:s,alternate:null},s)}else e.eatClosingBrace()}else if(i.type==="EachBlock"){if(!e.eat("else"))tt(n,"{:else}");e.eatClosingBrace(),i.fallback=qe(),e.setFragment(i.fallback)}else if(i.type==="AwaitBlock"){let r;if(e.eat("then"))r="then";else if(e.eat("catch"))r="catch";else tt(n,"{:then ...} or {:catch ...}");if(i[r])gp(n,`{:${r}}`);if(!e.eat("}")){e.requireWhitespace();let a=er(e);if(r==="then")i.value=a;else i.error=a;e.eatClosingBrace()}let s=qe();i[r]=s,e.setFragment(s)}else xp(n)}function Ax(e){let t=e.current(),n=vx[t.type];if(!n)Sp(e.index-1);e.eat(n,!0),e.eatClosingBrace();while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.close(),t=e.current();t.end=e.index,e.close()}function Px(e){return e.type==="CallExpression"||e.type==="ChainExpression"&&e.expression.type==="CallExpression"}function _x(e,t){if(e.eat("html")){e.requireWhitespace();let n=te(e);e.eatClosingBrace(),e.append({type:"HtmlTag",start:t,end:e.index,expression:n})}else if(e.eat("debug")){let n=[];if(!e.read(Dc)){let i=te(e),r=i.type==="SequenceExpression"?i.expressions:[i];for(let s of r){if(s.type!=="Identifier")wp(s.start);n.push(s)}e.eatClosingBrace()}e.append({type:"DebugTag",start:t,end:e.index,identifiers:n})}else if(e.eat("const")){e.requireWhitespace();let n=er(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let i=e.index,r=te(e),s=e.index;if(r.type==="SequenceExpression"&&!e.source.slice(i,r.start).includes("("))Tp(r);e.eatClosingBrace();let a={type:"VariableDeclarator",id:n,init:r,start:n.start,end:s};e.append({type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[a],start:t+2,end:e.index-1}})}else if(e.eat("render")){e.requireWhitespace();let n=te(e);if(!Px(n))Rp(n);e.eatClosingBrace(),e.append({type:"RenderTag",start:t,end:e.index,expression:n})}else Ip(e.index)}var Dx=/(?:var|interface|enum)\b/y,Nx=/(?:let|const|type)\b/y;function $x(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#"))Sx(e,t);else if(e.eat(":"))wx(e,t);else if(e.eat("@"))_x(e,t);else if(e.match("/")&&!e.match("/*")&&!e.match("//"))e.index+=1,Ax(e);else if(!Ix(e,t)){let n=te(e);e.eatClosingBrace(),e.append({type:"ExpressionTag",start:t,end:e.index,expression:n})}}function Ix(e,t){let n=e.index,i=e.matchRegex(Dx);if(i)Fs({start:n,end:n+i.length});if(!e.matchRegex(Nx))return!1;let r=e.root.comments.length,s=uc(e,e.source,n);if(s.type==="ExpressionStatement")return e.root.comments.length=r,!1;if(s.type!=="VariableDeclaration"||s.kind!=="let"&&s.kind!=="const")Fs(s);return e.index=s.end,e.eatClosingBrace(),e.append({type:"DeclarationTag",start:t,end:e.index,declaration:s}),!0}function Lx(e){let{source:t,index:n}=e;if(e.nextAngle<n)e.nextAngle=_c(t,"<",n);if(e.nextBrace<n)e.nextBrace=_c(t,"{",n);let i=Math.min(e.nextAngle,e.nextBrace);e.index=i;let r=t.slice(n,i);e.append({type:"Text",start:n,end:i,raw:r,data:Ui(r,!1,e.entityNames)})}function _c(e,t,n){let i=e.indexOf(t,n);return i===-1?e.length:i}function Uc(e,t,n){let i=Rx(e,t,n);while(i.index<i.source.length)Ox(i);return Mx(i)}function Rx(e,t,n){let i=$i(e);return Vo(i),new Nc(i.trimEnd(),i.length,n,t)}function Mx(e){if(e.stack.length>1){let r=e.current();if(r.end=r.start+1,r.type==="RegularElement")js(r,r.name);vp(r)}let{nodes:t}=e.root.fragment,n=t.findIndex((r)=>r.type==="SvelteOptions"),i=t[n];if(i?.type==="SvelteOptions"){t.splice(n,1),e.root.options=hx(i);let{nodes:r}=i.fragment;if(r.length>0)Hp({start:r[0].start,end:r[r.length-1].end},i.name)}return e.root}function Ox(e){if(e.match("<"))Ug(e);else if(e.match("{"))$x(e);else Lx(e)}var Bx="0AElig!5i 1MP!12 1acute!5d 1breve:76 1circ!5e 2y:sw 1fr:2kn8 1grave!5c 1lpha:pd 1macr:74 1nd:8cz 1ogon:78 2pf:2koo 1pplyFunction:6e9 1ring!5h 1scr:2kkc 2sign:6s4 1tilde!5f 1uml!5g 0Backslash:6qe 2rv:8h3 3wed:6x2 1cy:sx 1ecause:6r9 2rnoullis:6jw 2ta:pe 1fr:2kn9 1opf:2kop 1reve:k8 1scr:6jw 1umpeq:6ry 0CHcy:tj 1OPY!4p 1acute:7a 2p:6vm 3italDifferentialD:6kl 2yleys:6jx 1caron:7g 2edil!5j 2irc:7c 2onint:6r4 1dot:7e 1edilla:54 2nterDot:53 1fr:6jx 1hi:pz 1ircleDot:6u1 6Minus:6ty 6Plus:6tx 6Times:6tz 1lockwiseContourIntegral:6r6 3seCurlyDoubleQuote:6cd aQuote:6c9 1olon:6rb 5e:8dw 2ngruent:6sh 3int:6r3 3tourIntegral:6r2 2pf:6iq 3roduct:6q8 2unterClockwiseContourIntegral:6r7 1ross:8bz 1scr:2kke 1up:6vn 3Cap:6rx 0DD:6kl 2otrahd:841 1Jcy:si 1Scy:sl 1Zcy:sv 1agger:6ch 2rr:6n5 2shv:8h0 1caron:7i 2y:t0 1el:6pz 3ta:pg 1fr:2knb 1iacriticalAcute:50 bDot:k9 dubleAcute:kd bGrave:2o bTilde:kc 3mond:6v8 2fferentialD:6km 1opf:2kor 2t:4o 3Dot:6ho 3Equal:6s0 2ubleContourIntegral:6r3 6Dot:4o 8wnArrow:6oj 6LeftArrow:6og aRightArrow:6ok aTee:8h0 7ongLeftArrow:7w8 eRightArrow:7wa aRightArrow:7w9 6RightArrow:6oi bTee:6ug 6UpArrow:6oh 8DownArrow:6ol 6VerticalBar:6qt 2wnArrow:6mr 9Bar:843 9UpArrow:6ph 4Breve:lt 4LeftRightVector:85s 8TeeVector:866 8Vector:6nx eBar:85y 4RightTeeVector:867 9Vector:6o1 fBar:85z 4Tee:6uc 7Arrow:6nb 4arrow:6oj 1scr:2kkf 2trok:7k 0ENG:96 1TH!5s 1acute!5l 1caron:7u 2irc!5m 2y:tp 1dot:7q 1fr:2knc 1grave!5k 1lement:6q0 1macr:7m 2ptySmallSquare:7i3 5VerySmallSquare:7fv 1ogon:7s 2pf:2kos 1psilon:ph 1qual:8dx 5Tilde:6rm 3ilibrium:6oc 1scr:6k0 2im:8dv 1ta:pj 1uml!5n 1xists:6pv 2ponentialE:6kn 0Fcy:tg 1fr:2knd 1illedSmallSquare:7i4 6VerySmallSquare:7fu 1opf:2kot 2rAll:6ps 2uriertrf:6k1 1scr:6k1 0GJcy:sj 1T!1q 1amma:pf 5d:rg 1breve:7y 1cedil:82 2irc:7w 2y:sz 1dot:80 1fr:2kne 1g:6vt 1opf:2kou 1reaterEqual:6sl cLess:6vv 7FullEqual:6sn 7Greater:8f6 7Less:6t3 7SlantEqual:8e6 7Tilde:6sz 1scr:2kki 1t:6sr 0HARDcy:tm 1acek:jr 2t:2m 1circ:84 1fr:6j0 1ilbertSpace:6iz 1opf:6j1 2rizontalLine:7b4 1scr:6iz 2trok:86 1umpDownHump:6ry 4Equal:6rz 0IEcy:t1 1Jlig:8i 1Ocy:sh 1acute!5p 1circ!5q 2y:t4 1dot:8g 1fr:6j5 1grave!5o 1m:6j5 2acr:8a 3ginaryI:6ko 2plies:6oi 1nt:6r0 3egral:6qz 4rsection:6v6 2visibleComma:6eb 9Times:6ea 1ogon:8e 2pf:2kow 2ta:pl 1scr:6j4 1tilde:88 1ukcy:sm 2ml!5r 0Jcirc:8k 2y:t5 1fr:2knh 1opf:2kox 1scr:2kkl 2ercy:so 1ukcy:sk 0KHcy:th 1Jcy:ss 1appa:pm 1cedil:8m 2y:t6 1fr:2kni 1opf:2koy 1scr:2kkm 0LJcy:sp 1T!1o 1acute:8p 2mbda:pn 2ng:7vu 2placetrf:6j6 2rr:6n2 1caron:8t 2edil:8r 2y:t7 1eftAngleBracket:7vs 5rrow:6mo 9Bar:6p0 9RightArrow:6o6 4Ceiling:6x4 4DoubleBracket:7vq 6wnTeeVector:869 8Vector:6o3 eBar:861 4Floor:6x6 4RightArrow:6ms 9Vector:85q 4Tee:6ub 7Arrow:6n8 7Vector:862 5riangle:6uq cBar:89b cEqual:6us 4UpDownVector:85t 6TeeVector:868 6Vector:6nz cBar:860 4Vector:6nw aBar:85u 4arrow:6og 4rightarrow:6ok 2ssEqualGreater:6vu 4FullEqual:6sm 4Greater:6t2 4Less:8f5 4SlantEqual:8e5 4Tilde:6sy 1fr:2knj 1l:6vs 2eftarrow:6oq 1midot:8v 1ongLeftArrow:7w5 8RightArrow:7w7 4RightArrow:7w6 4leftarrow:7w8 8rightarrow:7wa 4rightarrow:7w9 2pf:2koz 2werLeftArrow:6mx 5RightArrow:6mw 1scr:6j6 2h:6nk 2trok:8x 1t:6sq 0Map:83p 1cy:t8 1ediumSpace:6e7 2llintrf:6k3 1fr:2knk 1inusPlus:6qb 1opf:2kp0 1scr:6k3 1u:po 0NJcy:sq 1acute:8z 1caron:93 2edil:91 2y:t9 1egativeMediumSpace:6bv 8ThickSpace:6bv bnSpace:6bv 8VeryThinSpace:6bv 2stedGreaterGreater:6sr 6LessLess:6sq 2wLine:a 1fr:2knl 1oBreak:6e8 2nBreakingSpace:4g 2pf:6j9 2t:8h8 3Congruent:6si 4upCap:6st 3DoubleVerticalBar:6qu 3Element:6q1 4qual:6sg 8Tilde:6rm 4xists:6pw 3Greater:6sv aEqual:6sx aFullEqual:6sn aGreater:6sr aLess:6t5 aSlantEqual:8e6 aTilde:6t1 3HumpDownHump:6ry 7Equal:6rz 3LeftTriangle:6wa fBar:89b fEqual:6wc 5ss:6su 7Equal:6sw 7Greater:6t4 7Less:6sq 7SlantEqual:8e5 7Tilde:6t0 3NestedGreaterGreater:8f6 9LessLess:8f5 3Precedes:6tc bEqual:8fj bSlantEqual:6w0 3ReverseElement:6q4 4ightTriangle:6wb gBar:89c gEqual:6wd 3SquareSubset:6tr fEqual:6w2 bperset:6ts hEqual:6w3 4ubset:6te 9Equal:6tk 5cceeds:6td bEqual:8fk bSlantEqual:6w1 bTilde:6tb 5perset:6tf bEqual:6tl 3Tilde:6rl 8Equal:6ro 8FullEqual:6rr 8Tilde:6rt 3VerticalBar:6qs 1scr:2kkp 1tilde!5t 1u:pp 0OElig:9e 1acute!5v 1circ!5w 2y:ta 1dblac:9c 1fr:2knm 1grave!5u 1macr:98 2ega:q1 2icron:pr 1opf:2kp2 1penCurlyDoubleQuote:6cc 9Quote:6c8 1r:8d0 1scr:2kkq 2lash!60 1tilde!5x 3mes:8c7 1uml!5y 1verBar:6da 5race:732 8ket:71w 4Parenthesis:730 0PartialD:6pu 1cy:tb 1fr:2knn 1hi:py 1i:ps 1lusMinus:4x 1oincareplane:6j0 2pf:6jd 1r:8fv 2ecedes:6t6 8Equal:8fj 8SlantEqual:6t8 8Tilde:6ta 2ime:6cz 2oduct:6q7 3portion:6rb aal:6ql 1scr:2kkr 2i:q0 0QUOT!y 1fr:2kno 1opf:6je 1scr:2kks 0RBarr:840 1EG!4u 1acute:9g 2ng:7vv 2rr:6n4 4tl:846 1caron:9k 2edil:9i 2y:tc 1e:6jg 2verseElement:6q3 8quilibrium:6ob 7UpEquilibrium:86n 1fr:6jg 1ho:pt 1ightAngleBracket:7vt 6rrow:6mq aBar:6p1 aLeftArrow:6o4 5Ceiling:6x5 5DoubleBracket:7vr 7wnTeeVector:865 9Vector:6o2 fBar:85x 5Floor:6x7 5Tee:6ua 8Arrow:6na 8Vector:863 6riangle:6ur dBar:89c dEqual:6ut 5UpDownVector:85r 7TeeVector:864 7Vector:6ny dBar:85w 5Vector:6o0 bBar:85v 5arrow:6oi 1opf:6jh 2undImplies:86o 1rightarrow:6or 1scr:6jf 2h:6nl 1uleDelayed:8ac 0SHCHcy:tl 2cy:tk 1OFTcy:to 1acute:9m 1c:8fw 2aron:9s 2edil:9q 2irc:9o 2y:td 1fr:2knq 1hortDownArrow:6mr 5LeftArrow:6mo 5RightArrow:6mq 5UpArrow:6mp 1igma:pv 1mallCircle:6qg 1opf:2kp6 1qrt:6qi 2uare:7fl 6Intersection:6tv 6Subset:6tr cEqual:6tt 8perset:6ts eEqual:6tu 6Union:6tw 1scr:2kku 1tar:6va 1ub:6vk 3set:6vk 6Equal:6ti 2cceeds:6t7 8Equal:8fk 8SlantEqual:6t9 8Tilde:6tb 3hThat:6q3 2m:6q9 2p:6vl 3erset:6tf 8Equal:6tj 3set:6vl 0THORN!66 1RADE:6jm 1SHcy:sr 2cy:ti 1ab:9 2u:pw 1caron:9w 2edil:9u 2y:te 1fr:2knr 1herefore:6r8 3ta:pk 2ickSpace:6e7 3nSpace:6bt 1ilde:6rg 5Equal:6rn 5FullEqual:6rp 5Tilde:6rs 1opf:2kp7 1ripleDot:6hn 1scr:2kkv 2trok:9y 0Uacute!62 2rr:6n3 4ocir:85l 1brcy:su 3eve:a4 1circ!63 2y:tf 1dblac:a8 1fr:2kns 1grave!61 1macr:a2 1nderBar:2n 6race:733 9ket:71x 5Parenthesis:731 2ion:6v7 5Plus:6tq 1ogon:aa 2pf:2kp8 1pArrow:6mp 7Bar:842 7DownArrow:6o5 2DownArrow:6mt 2Equilibrium:86m 2Tee:6ud 5Arrow:6n9 2arrow:6oh 2downarrow:6ol 2perLeftArrow:6mu 5RightArrow:6mv 2si:r6 4lon:px 1ring:a6 1scr:2kkw 1tilde:a0 1uml!64 0VDash:6uj 1bar:8h7 1cy:sy 1dash:6uh 5l:8h2 1ee:6v5 2rbar:6c6 3t:6c6 4icalBar:6qr 8Line:3g 8Separator:7rs 8Tilde:6rk 3yThinSpace:6bu 1fr:2knt 1opf:2kp9 1scr:2kkx 1vdash:6ui 0Wcirc:ac 1edge:6v4 1fr:2knu 1opf:2kpa 1scr:2kky 0Xfr:2knv 1i:pq 1opf:2kpb 1scr:2kkz 0YAcy:tr 1Icy:sn 1Ucy:tq 1acute!65 1circ:ae 2y:tn 1fr:2knw 1opf:2kpc 1scr:2kl0 1uml:ag 0ZHcy:t2 1acute:ah 1caron:al 2y:t3 1dot:aj 1eroWidthSpace:6bv 2ta:pi 1fr:6js 1opf:6jo 1scr:2kl1 0aacute!69 1breve:77 1c:6ri 2E:6ri 2d:6rj 2irc!6a 2ute!50 2y:ts 1elig!6e 1f:6e9 2r:2kny 1grave!68 1lefsym:6k5 3ph:6k5 2pha:q9 1macr:75 3lg:8cf 2p!12 1nd:6qv 3and:8d1 3d:8d8 3slope:8d4 3v:8d6 2g:6qo 3e:884 3le:6qo 3msd:6qp 6aa:888 7b:889 7c:88a 7d:88b 7e:88c 7f:88d 7g:88e 7h:88f 3rt:6qn 5vb:6v2 7d:87x 3sph:6qq 4t:5h 3zarr:70c 1ogon:79 2pf:2kpe 1p:6rs 2E:8ds 2acir:8dr 2e:6ru 2id:6rv 2os:13 2prox:6rs 6eq:6ru 1ring!6d 1scr:2kl2 2t:16 2ymp:6rs 5eq:6rx 1tilde!6b 1uml!6c 1wconint:6r7 2int:8b5 0bNot:8h9 1ackcong:6rw 4epsilon:s6 4prime:6d1 4sim:6rh 7eq:6vh 2rvee:6v1 3wed:6x1 6ge:6x1 1brk:71x 4tbrk:71y 1cong:6rw 2y:tt 1dquo:6ce 1ecaus:6r9 6e:6r9 2mptyv:88g 2psi:s6 2rnou:6jw 2ta:qa 3h:6k6 3ween:6ss 1fr:2knz 1igcap:6v6 4irc:7hr 4up:6v7 3odot:8ao 4plus:8ap 4times:8aq 3sqcup:8au 4tar:7id 3triangledown:7gd bup:7g3 3uplus:8as 3vee:6v5 3wedge:6v4 1karow:83x 1lacklozenge:8a3 5square:7fu 5triangle:7g4 ddown:7ge dleft:7gi dright:7g8 3nk:74z 2k12:7f6 44:7f5 334:7f7 2ock:7ew 1ne:1p 3quiv:6sh 2ot:6xc 1opf:2kpf 2t:6ud 3tom:6ud 2wtie:6vc 2xDL:7dj 4R:7dg 4l:7di 4r:7df 3H:7dc 4D:7dy 4U:7e1 4d:7dw 4u:7dz 3UL:7dp 4R:7dm 4l:7do 4r:7dl 3V:7dd 4H:7e4 4L:7dv 4R:7ds 4h:7e3 4l:7du 4r:7dr 3box:895 3dL:7dh 4R:7de 4l:7bk 4r:7bg 3h:7b4 4D:7dx 4U:7e0 4d:7cc 4u:7ck 3minus:6u7 3plus:6u6 3times:6u8 3uL:7dn 4R:7dk 4l:7bs 4r:7bo 3v:7b6 4H:7e2 4L:7dt 4R:7dq 4h:7cs 4l:7c4 4r:7bw 1prime:6d1 1reve:k8 2vbar!4m 1scr:2kl3 2emi:6dr 2im:6rh 4e:6vh 2ol:2k 4b:891 4hsub:7uw 1ull:6ci 4et:6ci 2mp:6ry 4E:8fi 4e:6rz 5q:6rz 0cacute:7b 2p:6qx 3and:8ck 3brcup:8cp 3cap:8cr 4up:8cn 3dot:8cg 3s:6qx 2ret:6dd 3on:jr 1caps:8ct 3ron:7h 2edil!6f 2irc:7d 2ups:8cs 5sm:8cw 1dot:7f 1edil!54 2mptyv:88i 2nt!4i 4erdot:53 1fr:2ko0 1hcy:uf 2eck:7pv 5mark:7pv 2i:qv 1ir:7gr 3E:88z 3c:jq 4eq:6s7 4learrowleft:6nu bright:6nv 6dR:4u 7S:79k 7ast:6u3 7circ:6u2 7dash:6u5 3e:6s7 3fnint:8b4 3mid:8hb 3scir:88y 1lubs:7kz 5uit:7kz 1olon:1m 5e:6s4 6q:6s4 2mma:18 5t:1s 3p:6pt 4fn:6qg 4lement:6pt 6xes:6iq 2ng:6rp 4dot:8dp 3int:6r2 2pf:2kpg 3rod:6q8 3y!4p 4sr:6jb 1rarr:6np 2oss:7pz 1scr:2kl4 2ub:8gf 4e:8gh 3p:8gg 4e:8gi 1tdot:6wf 1udarrl:854 6r:851 2epr:6vy 3sc:6vz 2larr:6nq 6p:859 2p:6qy 3brcap:8co 3cap:8cm 4up:8cq 3dot:6tp 3or:8cl 3s:6qy 2rarr:6nr 6m:858 3lyeqprec:6vy 7succ:6vz 5vee:6vi 5wedge:6vj 3ren!4k 3vearrowleft:6nq aright:6nr 2vee:6vi 2wed:6vj 1wconint:6r6 2int:6r5 1ylcty:6y5 0dArr:6oj 1Har:86d 1agger:6cg 2leth:6k8 2rr:6mr 2sh:6c0 4v:6ub 1bkarow:83z 2lac:kd 1caron:7j 2y:tw 1d:6km 2agger:6ch 3rr:6oa 2otseq:8dz 1eg!4w 2lta:qc 2mptyv:88h 1fisht:873 2r:2ko1 1harl:6o3 4r:6o2 1iam:6v8 4ond:6v8 7suit:7l2 4s:7l2 2e:4o 2gamma:rh 2sin:6wi 2v:6v 3ide!6v 6ontimes:6vb 3onx:6vb 1jcy:uq 1lcorn:6xq 3rop:6x9 1ollar:10 2pf:2kph 2t:k9 3eq:6s0 5dot:6s1 3minus:6rc 3plus:6qc 3square:6u9 2ublebarwedge:6x2 2wnarrow:6mr 4downarrows:6oa 4harpoonleft:6o3 bright:6o2 1rbkarow:840 2corn:6xr 3rop:6x8 1scr:2kl5 3y:ut 2ol:8ae 2trok:7l 1tdot:6wh 2ri:7gf 4f:7ge 1uarr:6ph 2har:86n 1wangle:886 1zcy:v3 2igrarr:7wf 0eDDot:8dz 2ot:6s1 1acute!6h 2ster:8dq 1caron:7v 2ir:6s6 4c!6i 2olon:6s5 2y:ul 1dot:7r 1e:6kn 1fDot:6s2 2r:2ko2 1g:8ey 2rave!6g 2s:8eu 3dot:8ew 1l:8ex 2inters:73b 2l:6j7 2s:8et 3dot:8ev 1macr:7n 2pty:6px 5set:6px 5v:6px 2sp:6bn 413:6bo 54:6bp 1ng:97 2sp:6bm 1ogon:7t 2pf:2kpi 1par:6vp 4sl:89v 2lus:8dt 2si:qd 4lon:qd 4v:s5 1qcirc:6s6 3olon:6s5 2sim:6rm 3lantgtr:8eu 7less:8et 2uals:1p 3est:6sf 3iv:6sh 5DD:8e0 2vparsl:89x 1rDot:6s3 2arr:86p 1scr:6jz 2dot:6s0 2im:6rm 1ta:qf 2h!6o 1uml!6j 2ro:6gc 1xcl:x 2ist:6pv 2pectation:6k0 3onentiale:6kn 0fallingdotseq:6s2 1cy:uc 1emale:7k0 1filig:1dkz 2lig:1dkw 3lig:1dl0 2r:2ko3 1ilig:1dkx 1jlig:2u 1lat:7l9 2lig:1dky 2tns:7g1 1nof:b6 1opf:2kpj 2rall:6ps 3k:6vo 4v:8gp 1partint:8b1 1rac12!59 53:6kz 54!58 55:6l1 56:6l5 58:6l7 423:6l0 55:6l2 434!5a 55:6l3 58:6l8 445:6l4 456:6l6 58:6l9 478:6la 3sl:6dg 2own:6xu 1scr:2kl7 0gE:6sn 2l:8ek 1acute:dx 2mma:qb 5d:rh 2p:8ee 1breve:7z 1circ:7x 2y:tv 1dot:81 1e:6sl 2l:6vv 2q:6sl 3q:6sn 3slant:8e6 2s:8e6 3cc:8fd 3dot:8e8 6o:8ea 7l:8ec 3l:6vv 4es:8es 1fr:2ko4 1g:6sr 2g:6vt 1imel:6k7 1jcy:ur 1l:6t3 2E:8eq 2a:8f9 2j:8f8 1nE:6sp 2ap:8ei 4prox:8ei 2e:8eg 3q:8eg 4q:6sp 2sim:6w7 1opf:2kpk 1rave:2o 1scr:6iy 2im:6sz 4e:8em 4l:8eo 1t!1q 2cc:8fb 3ir:8e2 2dot:6vr 2lPar:87p 2quest:8e4 2rapprox:8ee 4rr:86w 3dot:6vr 3eqless:6vv 5qless:8ek 3less:6t3 3sim:6sz 1vertneqq:6sp 2nE:6sp 0hArr:6ok 1airsp:6bu 2lf:59 2milt:6iz 2rdcy:ui 3r:6ms 4cir:85k 4w:6nh 1bar:6j3 1circ:85 1earts:7l1 6uit:7l1 2llip:6cm 2rcon:6ux 1fr:2ko5 1ksearow:84l 3warow:84m 1oarr:6pr 2mtht:6rf 2okleftarrow:6nd 4rightarrow:6ne 2pf:2kpl 2rbar:6c5 1scr:2kl9 2lash:6j3 2trok:87 1ybull:6df 2phen:6c0 0iacute!6l 1c:6eb 2irc!6m 2y:u0 1ecy:tx 2xcl!4h 1ff:6ok 2r:2ko6 1grave!6k 1i:6ko 2iint:8b0 3nt:6r1 2nfin:89o 2ota:6jt 1jlig:8j 1macr:8b 3ge:6j5 4line:6j4 4part:6j5 3th:8h 2of:6uv 2ped:c5 1n:6q0 2care:6it 2fin:6qm 5tie:89p 2odot:8h 2t:6qz 3cal:6uy 3egers:6jo 4rcal:6uy 3larhk:8bb 3prod:8cc 1ocy:up 2gon:8f 2pf:2kpm 2ta:qh 1prod:8cc 1quest!5b 1scr:2kla 2in:6q0 4E:6wp 4dot:6wl 4s:6wk 5v:6wj 4v:6q0 1t:6ea 2ilde:89 1ukcy:uu 2ml!6n 0jcirc:8l 2y:u1 1fr:2ko7 1math:fr 1opf:2kpn 1scr:2klb 2ercy:uw 1ukcy:us 0kappa:qi 5v:s0 1cedil:8n 2y:u2 1fr:2ko8 1green:8o 1hcy:ud 1jcy:v0 1opf:2kpo 1scr:2klc 0lAarr:6oq 2rr:6og 2tail:84b 1Barr:83y 1E:6sm 2g:8ej 1Har:86a 1acute:8q 2emptyv:88k 2gran:6j6 2mbda:qj 2ng:7vs 4d:87l 4le:7vs 2p:8ed 2quo!4r 2rr:6mo 4b:6p0 5fs:84f 4fs:84d 4hk:6nd 4lp:6nf 4pl:855 4sim:86r 4tl:6n6 2t:8ff 3ail:849 3e:8fh 4s:8fh 1barr:83w 2brk:7si 2race:3f 5k:2j 3ke:87f 4sld:87j 6u:87h 1caron:8u 2edil:8s 3il:6x4 2ub:3f 2y:u3 1dca:852 2quo:6cc 5r:6ce 2rdhar:86f 3ushar:85n 2sh:6nm 1e:6sk 2ftarrow:6mo 9tail:6n6 4harpoondown:6nx bup:6nw 4leftarrows:6o7 4rightarrow:6ms es:6o6 9harpoons:6ob 9squigarrow:6nh 4threetimes:6vf 2g:6vu 2q:6sk 3q:6sm 3slant:8e5 2s:8e5 3cc:8fc 3dot:8e7 6o:8e9 7r:8eb 3g:6vu 4es:8er 3sapprox:8ed 4dot:6vq 4eqgtr:6vu 6qgtr:8ej 4gtr:6t2 4sim:6sy 1fisht:870 2loor:6x6 2r:2ko9 1g:6t2 2E:8ep 1hard:6nx 4u:6nw 5l:86i 2blk:7es 1jcy:ux 1l:6sq 2arr:6o7 2corner:6xq 2hard:86j 2tri:7i2 1midot:8w 2oust:71s 6ache:71s 1nE:6so 2ap:8eh 4prox:8eh 2e:8ef 3q:8ef 4q:6so 2sim:6w6 1oang:7vw 3rr:6pp 2brk:7vq 2ngleftarrow:7w5 8rightarrow:7w7 4mapsto:7wc 4rightarrow:7w6 2oparrowleft:6nf 9right:6ng 2par:879 3f:2kpp 3lus:8bx 2times:8c4 2wast:6qf 3bar:2n 2z:7gq 3enge:7gq 3f:8a3 1par:14 4lt:87n 1rarr:6o6 2corner:6xr 2har:6ob 5d:86l 2m:6by 2tri:6v3 1saquo:6d5 2cr:2kld 2h:6nk 2im:6sy 4e:8el 4g:8en 2qb:2j 3uo:6c8 5r:6ca 2trok:8y 1t!1o 2cc:8fa 3ir:8e1 2dot:6vq 2hree:6vf 2imes:6vd 2larr:86u 2quest:8e3 2rPar:87q 3i:7gj 4e:6us 4f:7gi 1urdshar:85m 3uhar:86e 1vertneqq:6so 2nE:6so 0mDDot:6re 1acr!4v 2le:7k2 3t:7q8 4ese:7q8 2p:6na 3sto:6na 6down:6nb 6left:6n8 6up:6n9 2rker:7fy 1comma:8bt 2y:u4 1dash:6c4 1easuredangle:6qp 1fr:2koa 1ho:6jr 1icro!51 2d:6qr 3ast:16 3cir:8hc 3dot!53 2nus:6qa 5b:6u7 5d:6rc 6u:8bu 1lcp:8gr 2dr:6cm 1nplus:6qb 1odels:6uf 2pf:2kpq 1p:6qb 1scr:2kle 2tpos:6ri 1u:qk 2ltimap:6uw 2map:6uw 0nGg:6vt 2t:6sr 3v:6sr 1Leftarrow:6od 5rightarrow:6oe 2l:6vs 2t:6sq 3v:6sq 1Rightarrow:6of 1VDash:6un 2dash:6um 1abla:6pz 2cute:90 2ng:6qo 2p:6rt 3E:8ds 3id:6rv 3os:95 3prox:6rt 2tur:7la 5al:7la 7s:6j9 1bsp!4g 2ump:6ry 5e:6rz 1cap:8cj 3ron:94 2edil:92 2ong:6rr 5dot:8dp 2up:8ci 2y:u5 1dash:6c3 1e:6sg 2Arr:6on 2arhk:84k 4r:6mv 5ow:6mv 2dot:6s0 2quiv:6si 2sear:84o 3im:6rm 2xist:6pw 6s:6pw 1fr:2kob 1gE:6sn 2e:6sx 3q:6sx 4q:6sn 4slant:8e6 3s:8e6 2sim:6t1 2t:6sv 3r:6sv 1hArr:6oe 2arr:6ni 2par:8he 1i:6q3 2s:6ws 3d:6wq 2v:6q3 1jcy:uy 1lArr:6od 2E:6sm 2arr:6my 2dr:6cl 2e:6sw 3ftarrow:6my 5rightarrow:6ni 3q:6sw 4q:6sm 4slant:8e5 3s:8e5 4s:6su 2sim:6t0 2t:6su 3ri:6wa 5e:6wc 1mid:6qs 1opf:2kpr 2t!4s 3in:6q1 5E:6wp 5dot:6wl 5va:6q1 6b:6wn 6c:6wm 3ni:6q4 5va:6q4 6b:6wu 6c:6wt 1par:6qu 4allel:6qu 4sl:8hp 4t:6pu 2olint:8b8 2r:6tc 3cue:6w0 3e:8fj 4c:6tc 5eq:8fj 1rArr:6of 2arr:6mz 5c:84z 5w:6n1 2ightarrow:6mz 2tri:6wb 5e:6wd 1sc:6td 3cue:6w1 3e:8fk 3r:2klf 2hortmid:6qs 6parallel:6qu 2im:6rl 4e:6ro 5q:6ro 2mid:6qs 2par:6qu 2qsube:6w2 5pe:6w3 2ub:6tg 4E:8g5 4e:6tk 4set:6te 7eq:6tk 9q:8g5 3cc:6td 5eq:8fk 3p:6th 4E:8g6 4e:6tl 4set:6tf 7eq:6tl 9q:8g6 1tgl:6t5 2ilde!6p 2lg:6t4 2riangleleft:6wa deq:6wc 9right:6wb eeq:6wd 1u:ql 2m:z 3ero:6ja 3sp:6br 1vDash:6ul 2Harr:83o 2ap:6rx 2dash:6uk 2ge:6sl 3t:1q 2infin:89q 2lArr:83m 3e:6sk 3t:1o 4rie:6us 2rArr:83n 3trie:6ut 2sim:6rg 1wArr:6om 2arhk:84j 4r:6mu 5ow:6mu 2near:84n 0oS:79k 1acute!6r 2st:6u3 1cir:6u2 4c!6s 2y:u6 1dash:6u5 2blac:9d 2iv:8c8 2ot:6u1 2sold:88s 1elig:9f 1fcir:88v 2r:2koc 1gon:kb 2rave!6q 2t:88x 1hbar:88l 2m:q1 1int:6r2 1larr:6nu 2cir:88u 3ross:88r 2ine:6da 2t:88w 1macr:99 2ega:qx 2icron:qn 3d:88m 3nus:6ty 1opf:2kps 1par:88n 2erp:88p 2lus:6tx 1r:6qw 2arr:6nv 2d:8d9 3er:6k4 5of:6k4 3f!4q 3m!56 2igof:6uu 2or:8d2 2slope:8d3 2v:8d7 1scr:6k4 2lash!6w 2ol:6u0 1tilde!6t 3mes:6tz 6as:8c6 1uml!6u 1vbar:6yl 0par:6qt 3a!52 4llel:6qt 3sim:8hf 4l:8hp 3t:6pu 1cy:u7 1ercnt:11 3iod:1a 3mil:6cw 3p:6ud 3tenk:6cx 1fr:2kod 1hi:qu 3v:r9 2mmat:6k3 2one:7im 1i:qo 2tchfork:6vo 2v:ra 1lanck:6j3 6h:6j2 4kv:6j3 2us:17 4acir:8bn 4b:6u6 4cir:8bm 4do:6qc 5u:8bp 4e:8du 4mn!4x 4sim:8bq 4two:8br 1m:4x 1ointint:8b9 2pf:2kpt 2und!4j 1r:6t6 2E:8fn 2ap:8fr 2cue:6t8 2e:8fj 3c:6t6 4approx:8fr 4curlyeq:6t8 4eq:8fj 4napprox:8ft 5eqq:8fp 5sim:6w8 4sim:6ta 2ime:6cy 5s:6jd 2nE:8fp 3ap:8ft 3sim:6w8 2od:6q7 3falar:6y6 4line:6xe 4surf:6xf 3p:6ql 4to:6ql 2sim:6ta 2urel:6uo 1scr:2klh 2i:qw 1uncsp:6bs 0qfr:2koe 1int:8b0 1opf:2kpu 1prime:6dz 1scr:2kli 1uaternions:6j1 4int:8ba 2est:1r 5eq:6sf 2ot!y 0rAarr:6or 2rr:6oi 2tail:84c 1Barr:83z 1Har:86c 1ace:6rh 3ute:9h 2dic:6qi 2emptyv:88j 2ng:7vt 4d:87m 4e:885 4le:7vt 2quo!57 2rr:6mq 4ap:86t 4b:6p1 5fs:84g 4c:84z 4fs:84e 4hk:6ne 4lp:6ng 4pl:85h 4sim:86s 4tl:6n7 4w:6n1 2tail:84a 3io:6ra 5nals:6je 1barr:83x 2brk:7sj 2race:3h 5k:2l 3ke:87g 4sld:87i 6u:87k 1caron:9l 2edil:9j 3il:6x5 2ub:3h 2y:u8 1dca:853 2ldhar:86h 2quo:6cd 5r:6cd 2sh:6nn 1eal:6jg 4ine:6jf 4part:6jg 4s:6jh 2ct:7fx 2g!4u 1fisht:871 2loor:6x7 2r:2kof 1hard:6o1 4u:6o0 5l:86k 2o:qp 3v:s1 1ightarrow:6mq atail:6n7 5harpoondown:6o1 cup:6o0 5leftarrows:6o4 9harpoons:6oc 5rightarrows:6o9 5squigarrow:6n1 5threetimes:6vg 2ng:ka 2singdotseq:6s3 1larr:6o4 2har:6oc 2m:6bz 1moust:71t 6ache:71t 1nmid:8ha 1oang:7vx 3rr:6pq 2brk:7vr 2par:87a 3f:2kpv 3lus:8by 2times:8c5 1par:15 4gt:87o 2polint:8b6 1rarr:6o9 1saquo:6d6 2cr:2klj 2h:6nl 2qb:2l 3uo:6c9 5r:6c9 1three:6vg 2imes:6ve 2ri:7g9 4e:6ut 4f:7g8 4ltri:89a 1uluhar:86g 1x:6ji 0sacute:9n 1bquo:6ca 1c:6t7 2E:8fo 2ap:8fs 3ron:9t 2cue:6t9 2e:8fk 3dil:9r 2irc:9p 2nE:8fq 3ap:8fu 3sim:6w9 2polint:8b7 2sim:6tb 2y:u9 1dot:6v9 4b:6u9 4e:8di 1eArr:6oo 2arhk:84l 4r:6mw 5ow:6mw 2ct!4n 2mi:1n 2swar:84p 2tminus:6qe 4n:6qe 2xt:7qu 1fr:2kog 3own:6xu 1harp:7lb 2chcy:uh 3y:ug 2ortmid:6qr 5parallel:6qt 2y!4t 1igma:qr 5f:qq 5v:qq 2m:6rg 3dot:8dm 3e:6rn 4q:6rn 3g:8f2 4E:8f4 3l:8f1 4E:8f3 3ne:6rq 3plus:8bo 3rarr:86q 1larr:6mo 1mallsetminus:6qe 3shp:8c3 2eparsl:89w 2id:6qr 3le:6xv 2t:8fe 3e:8fg 4s:8fg 1oftcy:uk 2l:1b 3b:890 4ar:6yn 2pf:2kpw 1pades:7kw 6uit:7kw 3r:6qt 1qcap:6tv 5s:6tv 3up:6tw 5s:6tw 2sub:6tr 5e:6tt 5set:6tr 8eq:6tt 4p:6ts 5e:6tu 5set:6ts 8eq:6tu 2u:7fl 3are:7fl 5f:7fu 3f:7fu 1rarr:6mq 1scr:2klk 2etmn:6qe 2mile:6xv 2tarf:6va 1tar:7ie 4f:7id 2raightepsilon:s5 8phi:r9 3ns:4v 1ub:6te 3E:8g5 3dot:8fx 3e:6ti 4dot:8g3 3mult:8g1 3nE:8gb 4e:6tm 3plus:8fz 3rarr:86x 3set:6te 6eq:6ti 8q:8g5 6neq:6tm 9q:8gb 4im:8g7 4ub:8gl 5p:8gj 2cc:6t7 4approx:8fs 4curlyeq:6t9 4eq:8fk 4napprox:8fu 5eqq:8fq 5sim:6w9 4sim:6tb 2m:6q9 2ng:7l6 2p:6tf 31!55 32!4y 33!4z 3E:8g6 3dot:8fy 4sub:8go 3e:6tj 4dot:8g4 3hsol:7ux 5ub:8gn 3larr:86z 3mult:8g2 3nE:8gc 4e:6tn 3plus:8g0 3set:6tf 6eq:6tj 8q:8g6 6neq:6tn 9q:8gc 4im:8g8 4ub:8gk 5p:8gm 1wArr:6op 2arhk:84m 4r:6mx 5ow:6mx 2nwar:84q 1zlig!67 0target:6xi 2u:qs 1brk:71w 1caron:9x 2edil:9v 2y:ua 1dot:6hn 1elrec:6xh 1fr:2koh 1here4:6r8 5fore:6r8 3ta:qg 5sym:r5 5v:r5 2ickapprox:6rs 5sim:6rg 3nsp:6bt 2kap:6rs 3sim:6rg 2orn!72 1ilde:kc 2mes!5z 5b:6u8 6ar:8c1 5d:8c0 2nt:6r1 1oea:84o 2p:6uc 3bot:6ye 3cir:8hd 3f:2kpx 4ork:8gq 2sa:84p 1prime:6d0 1rade:6jm 2iangle:7g5 8down:7gf 8left:7gj ceq:6us 8q:6sc 8right:7g9 deq:6ut 3dot:7ho 3e:6sc 3minus:8ca 3plus:8c9 3sb:899 3time:8cb 2pezium:736 1scr:2kll 3y:ue 2hcy:uz 2trok:9z 1wixt:6ss 2oheadleftarrow:6n2 7rightarrow:6n4 0uArr:6oh 1Har:86b 1acute!6y 2rr:6mp 1brcy:v2 3eve:a5 1circ!6z 2y:ub 1darr:6o5 2blac:a9 2har:86m 1fisht:872 2r:2koi 1grave!6x 1harl:6nz 4r:6ny 2blk:7eo 1lcorn:6xo 6er:6xo 3rop:6xb 2tri:7i0 1macr:a3 2l!4o 1ogon:ab 2pf:2kpy 1parrow:6mp 2downarrow:6mt 2harpoonleft:6nz 9right:6ny 2lus:6tq 2si:qt 4h:r6 4lon:qt 2uparrows:6o8 1rcorn:6xp 6er:6xp 3rop:6xa 2ing:a7 2tri:7i1 1scr:2klm 1tdot:6wg 2ilde:a1 2ri:7g5 4f:7g4 1uarr:6o8 2ml!70 1wangle:887 0vArr:6ol 1Bar:8h4 4v:8h5 1Dash:6ug 1angrt:87w 2repsilon:s5 3kappa:s0 3nothing:6px 3phi:r9 4i:ra 4ropto:6ql 3r:6mt 4ho:s1 3sigma:qq 4ubsetneq:6tm cq:8gb 5psetneq:6tn cq:8gc 3theta:r5 4riangleleft:6uq bright:6ur 1cy:tu 1dash:6ua 1ee:6qw 3bar:6uz 3eq:6sa 2llip:6we 2rbar:3g 3t:3g 1fr:2koj 1ltri:6uq 1nsub:6te 4p:6tf 1opf:2kpz 1prop:6ql 1rtri:6ur 1scr:2kln 2ubnE:8gb 5e:6tm 3pnE:8gc 5e:6tn 1zigzag:87u 0wcirc:ad 1edbar:8db 3ge:6qv 5q:6s9 2ierp:6jc 1fr:2kok 1opf:2kq0 1p:6jc 1r:6rk 2eath:6rk 1scr:2klo 0xcap:6v6 2irc:7hr 2up:6v7 1dtri:7gd 1fr:2kol 1hArr:7wa 2arr:7w7 1i:qm 1lArr:7w8 2arr:7w5 1map:7wc 1nis:6wr 1odot:8ao 2pf:2kq1 3lus:8ap 2time:8aq 1rArr:7w9 2arr:7w6 1scr:2klp 2qcup:8au 1uplus:8as 2tri:7g3 1vee:6v5 1wedge:6v4 0yacute!71 3y:un 1circ:af 2y:uj 1en!4l 1fr:2kom 1icy:uv 1opf:2kq2 1scr:2klq 1ucy:um 2ml!73 0zacute:ai 1caron:am 2y:tz 1dot:ak 1eetrf:6js 2ta:qe 1fr:2kon 1hcy:ty 1igrarr:6ot 1opf:2kq3 1scr:2klr 1wj:6bx 2nj:6bw",Kc=Js(Bx);var Jc=wi(Ws,_i,zs);var Fx={typescript:Jc,entityNames:Kc};function tr(e,t){return Uc(e,t,Fx)}var Xc={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",bgsound:"HTMLUnknownElement",blink:"HTMLUnknownElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLUnknownElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",listing:"HTMLPreElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",multicol:"HTMLUnknownElement",nav:"HTMLElement",nextid:"HTMLUnknownElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",spacer:"HTMLUnknownElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement",xmp:"HTMLPreElement"},Yc={a:"SVGAElement",animate:"SVGAnimateElement",animateMotion:"SVGAnimateMotionElement",animateTransform:"SVGAnimateTransformElement",circle:"SVGCircleElement",clipPath:"SVGClipPathElement",defs:"SVGDefsElement",desc:"SVGDescElement",ellipse:"SVGEllipseElement",feBlend:"SVGFEBlendElement",feColorMatrix:"SVGFEColorMatrixElement",feComponentTransfer:"SVGFEComponentTransferElement",feComposite:"SVGFECompositeElement",feConvolveMatrix:"SVGFEConvolveMatrixElement",feDiffuseLighting:"SVGFEDiffuseLightingElement",feDisplacementMap:"SVGFEDisplacementMapElement",feDistantLight:"SVGFEDistantLightElement",feDropShadow:"SVGFEDropShadowElement",feFlood:"SVGFEFloodElement",feFuncA:"SVGFEFuncAElement",feFuncB:"SVGFEFuncBElement",feFuncG:"SVGFEFuncGElement",feFuncR:"SVGFEFuncRElement",feGaussianBlur:"SVGFEGaussianBlurElement",feImage:"SVGFEImageElement",feMerge:"SVGFEMergeElement",feMergeNode:"SVGFEMergeNodeElement",feMorphology:"SVGFEMorphologyElement",feOffset:"SVGFEOffsetElement",fePointLight:"SVGFEPointLightElement",feSpecularLighting:"SVGFESpecularLightingElement",feSpotLight:"SVGFESpotLightElement",feTile:"SVGFETileElement",feTurbulence:"SVGFETurbulenceElement",filter:"SVGFilterElement",foreignObject:"SVGForeignObjectElement",g:"SVGGElement",image:"SVGImageElement",line:"SVGLineElement",linearGradient:"SVGLinearGradientElement",marker:"SVGMarkerElement",mask:"SVGMaskElement",metadata:"SVGMetadataElement",mpath:"SVGMPathElement",path:"SVGPathElement",pattern:"SVGPatternElement",polygon:"SVGPolygonElement",polyline:"SVGPolylineElement",radialGradient:"SVGRadialGradientElement",rect:"SVGRectElement",script:"SVGScriptElement",set:"SVGSetElement",stop:"SVGStopElement",style:"SVGStyleElement",svg:"SVGSVGElement",switch:"SVGSwitchElement",symbol:"SVGSymbolElement",text:"SVGTextElement",textPath:"SVGTextPathElement",title:"SVGTitleElement",tspan:"SVGTSpanElement",use:"SVGUseElement",view:"SVGViewElement"},Qc=new Set(["a","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"]);function nr(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Zc(e,t="html"){if(t==="svg")return nr(Yc,e)??"SVGElement";if(t==="mathml")return Qc.has(e)?"MathMLElement":nr(Xc,e)??"MathMLElement";return nr(Xc,e)??nr(Yc,e)??(Qc.has(e)?"MathMLElement":"HTMLElement")}var eu=new Map;function tu(e){let t=eu.get(e);if(t!==void 0)return t;let n=_n(e,{inline:!0});return eu.set(e,n),n}function nu(e,t){let n=Re(e.name,t.name);if(n!==0)return n;let i=Re(e.type,t.type);if(i!==0)return i;if(e.type==="forwarded"&&t.type==="forwarded"){let r=Re(e.element,t.element);if(r!==0)return r}return Re(e.detail??"",t.detail??"")}var jx=/^["']|["']$/g,qx=/^([\w$]+)\s+extends\s/,Vx=/^\{\s*\}$/;function Vt(e){return Array.from(e.values())}function uo(e,t){if(!e||typeof e!=="object"||!("type"in e)){t.dynamic=!0;return}if(e.type==="Literal"){let{value:n}=e;if(typeof n==="string"||typeof n==="number")t.names.push(String(n));else t.dynamic=!0}else if(e.type==="ConditionalExpression"){let n=e;uo(n.consequent,t),uo(n.alternate,t)}else if(e.type==="TemplateLiteral"){let n=e.quasis.map((i)=>i.value.cooked??i.value.raw);if(n.length===1)t.names.push(n[0]);else t.patterns.push(new RegExp(`^${n.map(en).join("[^]*")}$`))}else t.dynamic=!0}function Gx(e,t){let{dispatcherName:n,callees:i}=t,r=new Set(t.hostDispatchedEventNames),s=[],a=!1;for(let o of t.hostDispatches)Ja(e,o);if(n!==void 0){ul(e,t.dispatcherTypeArgument,n,C(e,t.dispatcherDeclaratorNode));for(let o of i){if(o.name!==n||o.arguments.length===0)continue;let l={names:[],patterns:[],dynamic:!1};if(uo(o.arguments[0],l),s.push(...l.patterns),a||=l.dynamic,l.names.length===0)continue;let p=o.arguments[1],c=es(Zr(e,o.nestedBoundDetailNames),p);for(let u of l.names)Xe(e,{name:u,detail:c,has_argument:Boolean(p),source:C(e,o.node)}),r.add(u)}}return e.forwardedEvents.forEach((o,l)=>{let p=e.events.get(l);if(p&&p.type==="dispatched"&&!r.has(l)){let c=e.eventDescriptions.get(l),u={type:"forwarded",name:l,element:o,description:c,deprecated:p.deprecated,tags:p.tags,source:p.source};if(p.internal)u.internal=!0;if(p.detail!==void 0&&p.detail!=="undefined")u.detail=p.detail;e.events.set(l,u)}}),{names:r,mayDispatch:(o)=>a||s.some((l)=>l.test(o))}}function Hx(e){return`(typeof ${e} extends abstract new (...args: any) => infer I ? I : typeof ${e} extends (...args: any) => infer R ? R : never)`}function iu(e,t){let n=[...ru(e,t),...e.components.sort().map(Hx)].join(" | ");return e.target==="indexed"?`(null | ${n})[]`:`null | ${n}`}function ru(e,t){return e.elements.sort((n,i)=>n.tag<i.tag?-1:n.tag>i.tag?1:0).map(({tag:n,namespace:i,tagLocal:r})=>{let s=r&&t?.get(r);return s?`HTMLElementTagNameMap[${s}]`:Zc(n,i)})}function Wx(e){let t=e.syntaxMode==="runes"?new Set(Array.from(e.snippetPropLocals,(n)=>_r(e,n))):new Set;return Vt(e.props).filter((n)=>!(t.has(n.name)&&e.slots.has(n.name==="children"?Ye:n.name))).map((n)=>{let i=n.reactive||e.reactive_vars.has(n.name),r=e.bindings.get(n.name),s=r?.target==="indexed"&&n.type!==void 0&&!n.type.endsWith("[]"),a=n.typeSource==="typescript"||n.typeSource==="jsdoc";if(!r||r.target==="mixed"||s||a)return{...n,reactive:i};return{...n,type:iu(r),typeSource:"inferred",reactive:i}})}function zx(e){return Vt(e.slots).map((t)=>{let{slot_props_unresolved_spread:n,...i}=t;if(!t.slot_props)return i;if(typeof t.slot_props==="string")return Vx.test(t.slot_props)?{...i,slot_props:"Record<string, never>"}:i;let r=[];for(let[o,l]of Object.entries(t.slot_props)){if(l.replace&&l.value!==void 0)l.value=Jt(e,l.value);l.value??="any",r.push(`${o}: ${l.value}`)}let s=n?" & Record<string, any>":"",a=r.length===0?n?"Record<string, any>":"Record<string, never>":r.length===1?`{ ${r[0]} }${s}`:`{
51
51
  ${r.join(`;
52
52
  `)};
53
- }${s}`;return{...i,slot_props:l}}).sort((t,n)=>{let i=t.name??"",r=n.name??"";if(i<r)return-1;if(i>r)return 1;return 0})}function zx(e,t,n){if(e.deferredSlotBlockGenerics.length>0){let i=[...t.map((r)=>r.type??""),...n.map((r)=>r.slot_props??"")].join(`
54
- `);for(let{name:r,constraint:s}of e.deferredSlotBlockGenerics){if(!new RegExp(`\\b${en(r)}\\b`).test(i))continue;fi(e,r,s)}}if(e.scriptGenericsAttribute){if(e.generics)D(e,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',e.scriptGenericsAttribute.source);e.generics=Za(e.scriptGenericsAttribute.value)}}function Ux(e){return Vt(e.events).map((t)=>t.type==="forwarded"?{...t,element:t.element.name}:t).sort(Zc)}function Kx(e,t){let n=new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="props").map((i)=>[i.propName,i]));for(let i of t)if(i.typeSource==="unknown"){let r=n.get(i.name),s=r?r.importSource?`Prop "${i.name}" default calls "${r.calleeName}()" imported from "${r.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${i.name}" default calls "${r.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${i.name}" type could not be inferred; falling back to "any".`;D(e,"prop-unknown-type",i.name,s,i.source)}}function nr(e,t,n,i){if(t===void 0||Qc(t))return!0;let r=_n(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return D(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${r}; falling back to "any".`,i),!1}function Jx(e,t,n,i,r){for(let s of t)if(s.typeSource==="jsdoc"&&!nr(e,s.type,s.name,s.source))s.type="any";for(let s of n)if(s.type==="dispatched"&&!nr(e,s.detail,s.name,s.source))s.detail="any";for(let s of i)if(!nr(e,s.slot_props,s.name??"default",s.source))s.slot_props="any";for(let s of r)if(!nr(e,s.type,s.name,s.source))s.type="any",s.ts=`type ${s.name} = any;`}function Xx(e,t){let{dispatcherName:n}=t,i=[];if(n===void 0)return i;let r=[];for(let l of t.callsWithArguments){let o=Ha(l,n);if(o)r.push({call:l,...o})}if(r.length>0)ze(e,"dispatch-escapes",n,ge(e,n)?.sveldIgnore);let s=Nr(e,"dispatch-escapes",n);for(let{call:l,argumentIndex:o,property:a}of r){let p=t.locallyBoundCalls.has(l)?void 0:Hr(e,l.callee);if(!p){i.push(l);continue}let c=C(e,l);e.pendingDispatchEscapeCandidates.push({importSource:p.source,importedName:p.importedName,...p.members?{members:p.members}:{},calleeText:oe(e,l.callee)??p.importedName,dispatcherName:n,argumentIndex:o,...a===void 0?{}:{property:a},...c?{source:c}:{},...s?{ignored:s}:{}})}return i}function Yx(e,t,n){for(let i of e.jsDocEventNames){if(t.names.has(i)||t.mayDispatch(i))continue;if(e.forwardedEvents.has(i)||e.typedDispatcherEventNames.has(i))continue;if(e.props.has(`on${i}`))continue;if(n.length>0)continue;let r=Dr(e,"event-no-source",i,`@event "${i}" has no matching dispatch or callback prop.`,e.jsDocEventSources.get(i));if(e.pendingDispatchEscapeCandidates.length>0)e.deferredEventNoSourceDiagnostics.push(r);else e.diagnosticRecords.push(r)}}function Qx(e){if(e.slotsUntracked)return;let t=e.syntaxMode==="runes";for(let[n,{tag:i,source:r}]of e.jsDocSlots){let s=n??"children";if(e.renderedSlots.has(n)||t&&e.props.has(s))continue;let l=n===Xe?"default <slot>":`<slot name="${n}">`,o=t?`{@render ${s}()} or "${s}" prop`:l,a=n===Xe?`@${i} documents the default slot, but the component has no ${o}.`:`@${i} "${n}" has no matching ${o} in the component.`;D(e,"slot-not-rendered",n??"default",a,r)}}function Zx(e){let t=e.rest_props;if(t?.type!=="InlineComponent")return;let n=sn(e,t.name),i=e.extends?.import.replace(Fx,"");if(n?.importedName==="default"&&n.source===i)return;D(e,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${t.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`,e.restPropsSource)}function eE(e,t){let n=t.typedefs.filter((r)=>r.internal).map((r)=>{let s=r.name.split("<")[0];return{name:s,regex:new RegExp(`\\b${s}\\b`)}});if(n.length===0)return;let i=(r,s,l)=>{if(!s)return;for(let{name:o,regex:a}of n){if(!a.test(s))continue;D(e,"internal-typedef-referenced",r,`"${r}" references "${o}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,l)}};for(let r of[...t.props,...t.moduleExports]){if(r.internal)continue;i(r.name,r.type,r.source)}for(let r of t.typedefs){if(r.internal)continue;i(r.name,r.ts)}for(let r of t.events){if(r.internal||r.type!=="dispatched")continue;i(r.name,r.detail,r.source)}for(let r of t.slots){if(r.internal)continue;i(r.name??"default",r.slot_props,r.source)}for(let r of t.contexts){if(r.internal)continue;if(r.type!==void 0)i(r.typeName,r.type,r.source);for(let s of r.properties)i(s.name,s.type)}}function tE(e){let t=new Set;for(let n of B(e?.[1]??"",",")){let i=n.trim().match(jx)?.[1];if(i)t.add(i)}return t}function nE(e,t){let n=tE(e.generics),i=new Map;for(let r of t){let s=r.type?.trim();if(s&&n.has(s))i.set(r.localName??r.name,s)}return i}function iE(e,t,n){if(n.size===0)return;let i=e.rest_props,r=e.restPropsTagLocal===void 0?void 0:n.get(e.restPropsTagLocal);if(i?.type==="Element"&&i.name==="svelte:element"&&!i.thisValue&&r)e.rest_props={...i,thisType:r};for(let[s,l]of t.entries()){let o=e.bindings.get(l.name);if(l.typeSource!=="inferred"||!o?.elements.some(({tagLocal:a})=>a&&n.has(a)))continue;t[s]={...l,type:eu(o,n)}}}var rE=/^(?:(?:HTML|SVG|MathML)\w*)?Element$|^HTMLElementTagNameMap\[[\w$]+\]$/;function sE(e,t,n){for(let i of t){if(i.typeSource!=="typescript"&&i.typeSource!=="jsdoc")continue;let r=e.bindings.get(i.name);if(r?.target!=="direct"||r.components.length>0||i.type===void 0)continue;let s=({tag:h,tagLocal:m})=>h==="svelte:element"&&!(m&&n.has(m));if(r.elements.some(s))continue;let l=(h)=>h==="null"||h==="undefined",o=B(i.type,"|").map((h)=>h.trim()).filter(Boolean),a=o.filter(l),p=o.filter((h)=>!l(h));if(!p.every((h)=>rE.test(h)))continue;let c=[...new Set(tu(r,n))];if(p.every((h)=>c.includes(h)))continue;let u=r.elements.map(({tag:h,tagLocal:m})=>h==="svelte:element"?`<svelte:element this={${m}}>`:`<${h}>`),f=(l(o[0]??"")?[...a,...c]:[...c,...a]).join(" | ");D(e,"bind-this-type-mismatch",i.name,`Prop "${i.name}" is declared as "${i.type}", but \`bind:this\` only binds it to ${oE(u)}. Declare "${f}" instead.`,i.source)}}function oE(e){return e.length<2?e.join(""):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function nu(e,t){let n=Vx(e,t);pl(e,n.names);let i=Hx(e);e.activeScopes.length=0;let r=Wx(e);zx(e,i,r);let s=nE(e,i);iE(e,i,s);let l=Vt(e.moduleExports),o=Ux(e),a=Vt(e.typedefs),p=Vt(e.contexts);Kx(e,i),sE(e,i,s),Jx(e,i,o,r,a);let c=Xx(e,t);Yx(e,n,c),Qx(e);let{dispatcherName:u}=t;for(let x of c){let y=oe(e,x.callee)??"";D(e,"dispatch-escapes",u??"",`\`${u}\` is passed to \`${y}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,C(e,x))}Zx(e),eE(e,{props:i,moduleExports:l,typedefs:a,events:o,slots:r,contexts:p});let f={source:ri(e,0,e.source?.length),syntaxMode:e.syntaxMode,...e.scriptLanguage?{scriptLanguage:e.scriptLanguage}:{},props:i,moduleExports:l,slots:r,events:o,typedefs:a,generics:e.generics,rest_props:e.rest_props,extends:e.extends,componentComment:e.componentComment,componentCommentSource:e.componentCommentSource,contexts:p,customElementTag:e.customElementTag,customElement:e.customElement,...e.cssParts.length>0?{cssParts:e.cssParts.slice()}:{},...e.cssProperties.length>0?{cssProperties:e.cssProperties.slice()}:{},diagnostics:e.diagnosticRecords.slice()},h=ua(e);if(h)f[De]=h;if(e.propIgnoreCodes.size>0)f[Mo]=Object.fromEntries(e.propIgnoreCodes);let m=ca(e);return m?{component:f,pending:m}:{component:f}}function aE(e){if(e.computed)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function iu(e){return e==="private"||e==="protected"}function Gt(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function su(e){return e?.slice(1,-1).trim()||void 0}function lE(e){let t=e?.type==="TSParameterProperty"?e.parameter:e;return t?.type==="AssignmentPattern"?Me(t.right,"widen"):void 0}function co(e,t,n){let i=jr(e,t),r=new Map((n?.params??[]).map((a)=>[a.name,a])),s=i.params.map(({name:a,type:p,optional:c,rest:u},f)=>{let h=r.get(a);return{name:u?`...${a}`:a,type:p??h?.type??lE(t.params[f])??(u?"any[]":"any"),...h?.description?{description:h.description}:{},...!u&&(c||h?.optional)?{optional:!0}:{}}}),l=i.returnType??n?.returnType??(t.async?"Promise<any>":void 0),o=su(i.typeParameters)??n?.typeParameters;return{...s.length>0?{params:s}:{},...l?{returnType:l}:{},...o?{typeParameters:o}:{}}}function ou(e,t){let n=[],i=new Map,r=new Set,s=new Set,l,o=-1;for(let c of t.body.body){if(c.type==="TSIndexSignature"){let[y]=c.parameters;if(!y)continue;F(e,c.typeAnnotation?.typeAnnotation),n.push({kind:"index",name:`[${y.name}: ${ae(e,y.typeAnnotation)??"string"}]`,type:ae(e,c.typeAnnotation)??"any",...c.static?{static:!0}:{},...c.readonly?{readonly:!0}:{}});continue}if(c.type!=="MethodDefinition"&&c.type!=="PropertyDefinition")continue;if(iu(c.accessibility))continue;let u=aE(c);if(u===void 0)continue;let f=j(e,c);if(f?.internal)continue;let h=`${c.static?"static ":""}${u}`,m={...c.static?{static:!0}:{},...c.optional?{optional:!0}:{},...c.abstract?{abstract:!0}:{}};if(c.type!=="MethodDefinition"){if(F(e,c.typeAnnotation?.typeAnnotation),!c.static)s.add(u);n.push({kind:"property",name:u,type:ae(e,c.typeAnnotation)??f?.type??Me(c.value,"widen")??"any",...m,...c.readonly?{readonly:!0}:{},...Gt(f)});continue}let x=c.typeParameters?{...c.value,typeParameters:c.typeParameters}:c.value;if(c.kind==="constructor"){let y=co(e,x,f);n.push({kind:"constructor",name:"constructor",params:y.params,...Gt(f)}),o=n.length,l=x.type==="FunctionExpression"?x.body.body:void 0;for(let[_,A]of x.params.entries()){if(A.type!=="TSParameterProperty"||iu(A.accessibility))continue;let R=y.params?.[_];if(!R)continue;s.add(R.name),n.push({kind:"property",name:R.name,type:R.type,...A.readonly?{readonly:!0}:{},...R.description?{description:R.description}:{}})}continue}if(c.kind==="get"||c.kind==="set"){let y=co(e,x,f),_=c.kind==="get"?y.returnType??f?.type:y.params?.[0]?.type??f?.type,A=i.get(h);if(A){if(c.kind==="set")A.readonly=void 0;if(_&&_!=="any"&&(A.type==="any"||c.kind==="get"))A.type=_;if(!A.description&&!A.deprecated)Object.assign(A,Gt(f));continue}let R={kind:"property",name:u,type:_??"any",...m,...c.kind==="get"?{readonly:!0}:{},...Gt(f)};i.set(h,R),n.push(R);continue}if(x.type==="TSDeclareMethod"&&!c.abstract)r.add(h);else if(x.type!=="TSDeclareMethod"&&r.has(h))continue;n.push({kind:"method",name:u,...m,...co(e,x,f),...Gt(f)})}if(e.scriptLanguage!=="ts"&&l)n.splice(o,0,...cE(e,l,s));for(let c of t.typeParameters?.params??[])F(e,c.constraint),F(e,c.default);let a=su(ut(e,t.typeParameters)),p=pE(e,t);return{members:n,...a?{typeParameters:a}:{},...p}}function pE(e,t){let n={},i=t.superClass;if(i){if(n.extends=ut(e,{start:i.start,end:t.superTypeParameters?.end??i.end}),i.type==="Identifier")ru(e,i,t.superTypeParameters)}let r=(t.implements??[]).map((s)=>(ru(e,s.expression,s.typeParameters),ut(e,s))).filter((s)=>Boolean(s));if(r.length>0)n.implements=r;return n}function ru(e,t,n){F(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function cE(e,t,n){let i=[];for(let r of t){let s=r.type==="ExpressionStatement"?r.expression:void 0;if(s?.type!=="AssignmentExpression"||s.operator!=="=")continue;let l=s.left;if(l.type!=="MemberExpression"||l.computed||l.object.type!=="ThisExpression")continue;let o=l.property.type==="Identifier"?l.property.name:void 0;if(!o||n.has(o))continue;n.add(o);let a=j(e,r);if(a?.internal)continue;i.push({kind:"property",name:o,type:a?.type??"any",...Gt(a)})}return i}var uE=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function uo(e,t,n){if(!t)return;let i=e.moduleExports.get(t);e.moduleExports.set(t,i?{...i,...n}:n)}function au(e,t,n,i){let r=j(e,t);uo(e,n==="*"?`* from ${i.from}`:n,{name:n,kind:"re-export",description:r?.description,deprecated:r?.deprecated,tags:r?.tags,...r?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:i,source:C(e,t)})}function lu(e,t){D(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,C(e,t))}function dE(e,t,n,i){let r=n.id?.name;if(!r)return;let s=i?.exportedName??r,l=di(e,t,i),{members:o,typeParameters:a,extends:p,implements:c}=ou(e,n),u=a??l?.typeParameters;uo(e,s,{name:s,...r===s?{}:{localName:r},kind:"class",description:l?.description,deprecated:l?.deprecated,tags:l?.tags,...l?.internal?{internal:!0}:{},type:`typeof ${r}`,...u?{typeParameters:u}:{},members:o,...n.abstract?{abstract:!0}:{},...p?{extends:p}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:C(e,t)})}function pu(e,t,n,i){if(n.type==="ClassDeclaration"){dE(e,t,n,i);return}let r=ts(e,n,i,"moduleExports");if(r.length===0)return;let s=di(e,t,i);for(let l of r){let{prop_name:o,kind:a}=l,{type:p,typeSource:c,description:u,params:f,returnType:h,isFunction:m,typeParameters:x}=ns(e,l,s);uo(e,o,{name:o,kind:a,description:u,deprecated:s?.deprecated,tags:s?.tags,...s?.internal?{internal:!0}:{},type:p,typeSource:c,value:l.value,defaultValue:l.defaultValue,params:f,returnType:h,typeParameters:x,isFunction:m,isFunctionDeclaration:l.isFunctionDeclaration,isRequired:!1,constant:a==="const",reactive:!1,source:C(e,t)})}}function fE(e){let t=Array.from(e.moduleExports.values()).filter((i)=>i.kind==="class"),n=new Set(t.map((i)=>i.localName??i.name));for(let i of t){if(!i.extends)continue;let r=uE.exec(i.extends)?.[0];if(r&&(n.has(r)||e.valueImportBindingsByLocalName.has(r)||e.typeImportBindingsByLocalName.has(r)))continue;D(e,"export-unresolved",i.name,`class "${i.name}" extends \`${i.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,i.source),i.extends=void 0}}function cu(e){let t=e.parsed?.module;if(!t)return;let n=ma(t);z(t,{enter(i,r){if(i.type==="ImportDeclaration")nn(e,i);if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i);if(i.type==="VariableDeclaration")e.vars.add(i);if(i.type==="ExportNamedDeclaration"){if(i.declaration!=null){pu(e,i,i.declaration);return}let s=i.source?.value,l=r?.type==="Program"?r:null;for(let o of i.specifiers){let a=Zr(e,i,o,l,"module");if(!a)continue;if(a.exportedName==="default"){lu(e,i);continue}let p=typeof s==="string"?{from:s,imported:a.localName}:n.get(a.localName);if(a.declaration)pu(e,i,a.declaration,a);else if(p)au(e,i,a.exportedName,p);else if(!e.localTypeDeclarationsByName.get(a.localName)?.exported)es(e,i,a.localName,a.exportedName)}}if(i.type==="ExportAllDeclaration"&&typeof i.source.value==="string"){let s=(i.exported&&ui(i.exported))??"*";if(s==="default"){lu(e,i);return}au(e,i,s,{from:i.source.value,imported:"*"})}}}),fE(e)}function uu(e){return er(e,{css:!1})}function hE(e,t){let n=e.length+1,i=t.length+1,r=Array.from({length:n},()=>Array(i).fill(0));for(let s=0;s<n;s++)r[s][0]=s;for(let s=0;s<i;s++)r[0][s]=s;for(let s=1;s<n;s++)for(let l=1;l<i;l++){let o=e[s-1]===t[l-1]?0:1;if(r[s][l]=Math.min(r[s-1][l]+1,r[s][l-1]+1,r[s-1][l-1]+o),s>1&&l>1&&e[s-1]===t[l-2]&&e[s-2]===t[l-1])r[s][l]=Math.min(r[s][l],r[s-2][l-2]+1)}return r[n-1][i-1]}function du(e,t,n=3){let i,r=Number.POSITIVE_INFINITY;for(let s of t){let l=hE(e,s);if(l<r)i=s,r=l}return r<=n?i:void 0}var mE=/\s*=\s*/,yE=/^[^"'`\s]\S*$/;function gE(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),i=e.slice(t+1,-1),r=B(i,",").map((s)=>s.trim().replace(mE," = ")).join(", ");return`${n}<${r}>`}var xE=new Set(["restProps","slot","snippet","event","typedef","callback"]),fo=new Set(["property","type"]),fu=new Set(["slot","snippet","typedef","callback"]);function ir(e){if(e.length===0)return;return Dt(e[Rr(e)].content)}function hu(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function EE(e){return e.text.split(`
55
- `).length===e.lines.length}function rr(e,t){if(t<=0)return e;return e.split(`
53
+ }${s}`;return{...i,slot_props:a}}).sort((t,n)=>{let i=t.name??"",r=n.name??"";if(i<r)return-1;if(i>r)return 1;return 0})}function Ux(e,t,n){if(e.deferredSlotBlockGenerics.length>0){let i=[...t.map((r)=>r.type??""),...n.map((r)=>r.slot_props??"")].join(`
54
+ `);for(let{name:r,constraint:s}of e.deferredSlotBlockGenerics){if(!new RegExp(`\\b${en(r)}\\b`).test(i))continue;hi(e,r,s)}}if(e.scriptGenericsAttribute){if(e.generics)D(e,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',e.scriptGenericsAttribute.source);e.generics=nl(e.scriptGenericsAttribute.value)}}function Kx(e){return Vt(e.events).map((t)=>t.type==="forwarded"?{...t,element:t.element.name}:t).sort(nu)}function Jx(e,t){let n=new Map(e.pendingCallDefaultCandidates.filter((i)=>i.location==="props").map((i)=>[i.propName,i]));for(let i of t)if(i.typeSource==="unknown"){let r=n.get(i.name),s=r?r.importSource?`Prop "${i.name}" default calls "${r.calleeName}()" imported from "${r.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${i.name}" default calls "${r.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${i.name}" type could not be inferred; falling back to "any".`;D(e,"prop-unknown-type",i.name,s,i.source)}}function ir(e,t,n,i){if(t===void 0||tu(t))return!0;let r=_n(t)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return D(e,"type-syntax-error",n,`Type \`${t}\` of "${n}" ${r}; falling back to "any".`,i),!1}function Xx(e,t,n,i,r){for(let s of t)if(s.typeSource==="jsdoc"&&!ir(e,s.type,s.name,s.source))s.type="any";for(let s of n)if(s.type==="dispatched"&&!ir(e,s.detail,s.name,s.source))s.detail="any";for(let s of i)if(!ir(e,s.slot_props,s.name??"default",s.source))s.slot_props="any";for(let s of r)if(!ir(e,s.type,s.name,s.source))s.type="any",s.ts=`type ${s.name} = any;`}function Yx(e,t){let{dispatcherName:n}=t,i=[];if(n===void 0)return i;let r=[];for(let a of t.callsWithArguments){let o=Ua(a,n);if(o)r.push({call:a,...o})}if(r.length>0)Ue(e,"dispatch-escapes",n,ge(e,n)?.sveldIgnore);let s=Ir(e,"dispatch-escapes",n);for(let{call:a,argumentIndex:o,property:l}of r){let p=t.locallyBoundCalls.has(a)?void 0:zr(e,a.callee);if(!p){i.push(a);continue}let c=C(e,a);e.pendingDispatchEscapeCandidates.push({importSource:p.source,importedName:p.importedName,...p.members?{members:p.members}:{},calleeText:oe(e,a.callee)??p.importedName,dispatcherName:n,argumentIndex:o,...l===void 0?{}:{property:l},...c?{source:c}:{},...s?{ignored:s}:{}})}return i}function Qx(e,t,n){for(let i of e.jsDocEventNames){if(t.names.has(i)||t.mayDispatch(i))continue;if(e.forwardedEvents.has(i)||e.typedDispatcherEventNames.has(i))continue;if(e.props.has(`on${i}`))continue;if(n.length>0)continue;let r=$r(e,"event-no-source",i,`@event "${i}" has no matching dispatch or callback prop.`,e.jsDocEventSources.get(i));if(e.pendingDispatchEscapeCandidates.length>0)e.deferredEventNoSourceDiagnostics.push(r);else e.diagnosticRecords.push(r)}}function Zx(e){if(e.slotsUntracked)return;let t=e.syntaxMode==="runes";for(let[n,{tag:i,source:r}]of e.jsDocSlots){let s=n??"children";if(e.renderedSlots.has(n)||t&&e.props.has(s))continue;let a=n===Ye?"default <slot>":`<slot name="${n}">`,o=t?`{@render ${s}()} or "${s}" prop`:a,l=n===Ye?`@${i} documents the default slot, but the component has no ${o}.`:`@${i} "${n}" has no matching ${o} in the component.`;D(e,"slot-not-rendered",n??"default",l,r)}}function eE(e){let t=e.rest_props;if(t?.type!=="InlineComponent")return;let n=sn(e,t.name),i=e.extends?.import.replace(jx,"");if(n?.importedName==="default"&&n.source===i)return;D(e,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${t.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`,e.restPropsSource)}function tE(e,t){let n=t.typedefs.filter((r)=>r.internal).map((r)=>{let s=r.name.split("<")[0];return{name:s,regex:new RegExp(`\\b${s}\\b`)}});if(n.length===0)return;let i=(r,s,a)=>{if(!s)return;for(let{name:o,regex:l}of n){if(!l.test(s))continue;D(e,"internal-typedef-referenced",r,`"${r}" references "${o}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,a)}};for(let r of[...t.props,...t.moduleExports]){if(r.internal)continue;i(r.name,r.type,r.source)}for(let r of t.typedefs){if(r.internal)continue;i(r.name,r.ts)}for(let r of t.events){if(r.internal||r.type!=="dispatched")continue;i(r.name,r.detail,r.source)}for(let r of t.slots){if(r.internal)continue;i(r.name??"default",r.slot_props,r.source)}for(let r of t.contexts){if(r.internal)continue;if(r.type!==void 0)i(r.typeName,r.type,r.source);for(let s of r.properties)i(s.name,s.type)}}function nE(e){let t=new Set;for(let n of O(e?.[1]??"",",")){let i=n.trim().match(qx)?.[1];if(i)t.add(i)}return t}function iE(e,t){let n=nE(e.generics),i=new Map;for(let r of t){let s=r.type?.trim();if(s&&n.has(s))i.set(r.localName??r.name,s)}return i}function rE(e,t,n){if(n.size===0)return;let i=e.rest_props,r=e.restPropsTagLocal===void 0?void 0:n.get(e.restPropsTagLocal);if(i?.type==="Element"&&i.name==="svelte:element"&&!i.thisValue&&r)e.rest_props={...i,thisType:r};for(let[s,a]of t.entries()){let o=e.bindings.get(a.name);if(a.typeSource!=="inferred"||!o?.elements.some(({tagLocal:l})=>l&&n.has(l)))continue;t[s]={...a,type:iu(o,n)}}}var sE=/^(?:(?:HTML|SVG|MathML)\w*)?Element$|^HTMLElementTagNameMap\[[\w$]+\]$/;function oE(e,t,n){for(let i of t){if(i.typeSource!=="typescript"&&i.typeSource!=="jsdoc")continue;let r=e.bindings.get(i.name);if(r?.target!=="direct"||r.components.length>0||i.type===void 0)continue;let s=({tag:h,tagLocal:m})=>h==="svelte:element"&&!(m&&n.has(m));if(r.elements.some(s))continue;let a=(h)=>h==="null"||h==="undefined",o=O(i.type,"|").map((h)=>h.trim()).filter(Boolean),l=o.filter(a),p=o.filter((h)=>!a(h));if(!p.every((h)=>sE.test(h)))continue;let c=[...new Set(ru(r,n))];if(p.every((h)=>c.includes(h)))continue;let u=r.elements.map(({tag:h,tagLocal:m})=>h==="svelte:element"?`<svelte:element this={${m}}>`:`<${h}>`),f=(a(o[0]??"")?[...l,...c]:[...c,...l]).join(" | ");D(e,"bind-this-type-mismatch",i.name,`Prop "${i.name}" is declared as "${i.type}", but \`bind:this\` only binds it to ${aE(u)}. Declare "${f}" instead.`,i.source)}}function aE(e){return e.length<2?e.join(""):`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function su(e,t){let n=Gx(e,t);dl(e,n.names);let i=Wx(e);e.activeScopes.length=0;let r=zx(e);Ux(e,i,r);let s=iE(e,i);rE(e,i,s);let a=Vt(e.moduleExports),o=Kx(e),l=Vt(e.typedefs),p=Vt(e.contexts);Jx(e,i),oE(e,i,s),Xx(e,i,o,r,l);let c=Yx(e,t);Qx(e,n,c),Zx(e);let{dispatcherName:u}=t;for(let g of c){let y=oe(e,g.callee)??"";D(e,"dispatch-escapes",u??"",`\`${u}\` is passed to \`${y}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,C(e,g))}eE(e),tE(e,{props:i,moduleExports:a,typedefs:l,events:o,slots:r,contexts:p});let f={source:si(e,0,e.source?.length),syntaxMode:e.syntaxMode,...e.scriptLanguage?{scriptLanguage:e.scriptLanguage}:{},props:i,moduleExports:a,slots:r,events:o,typedefs:l,generics:e.generics,rest_props:e.rest_props,extends:e.extends,componentComment:e.componentComment,componentCommentSource:e.componentCommentSource,contexts:p,customElementTag:e.customElementTag,customElement:e.customElement,...e.cssParts.length>0?{cssParts:e.cssParts.slice()}:{},...e.cssProperties.length>0?{cssProperties:e.cssProperties.slice()}:{},diagnostics:e.diagnosticRecords.slice()},h=ha(e);if(h)f[$e]=h;if(e.propIgnoreCodes.size>0)f[Fo]=Object.fromEntries(e.propIgnoreCodes);let m=fa(e);return m?{component:f,pending:m}:{component:f}}function lE(e){if(e.computed)return;if(e.key.type==="Identifier")return e.key.name;if(e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number"))return String(e.key.value);return}function ou(e){return e==="private"||e==="protected"}function Gt(e){return{...e?.description?{description:e.description}:{},...e?.deprecated===void 0?{}:{deprecated:e.deprecated},...e?.tags?{tags:e.tags}:{}}}function lu(e){return e?.slice(1,-1).trim()||void 0}function pE(e){let t=e?.type==="TSParameterProperty"?e.parameter:e;return t?.type==="AssignmentPattern"?Be(t.right,"widen"):void 0}function fo(e,t,n){let i=Vr(e,t),r=new Map((n?.params??[]).map((l)=>[l.name,l])),s=i.params.map(({name:l,type:p,optional:c,rest:u},f)=>{let h=r.get(l);return{name:u?`...${l}`:l,type:p??h?.type??pE(t.params[f])??(u?"any[]":"any"),...h?.description?{description:h.description}:{},...!u&&(c||h?.optional)?{optional:!0}:{}}}),a=i.returnType??n?.returnType??(t.async?"Promise<any>":void 0),o=lu(i.typeParameters)??n?.typeParameters;return{...s.length>0?{params:s}:{},...a?{returnType:a}:{},...o?{typeParameters:o}:{}}}function pu(e,t){let n=[],i=new Map,r=new Set,s=new Set,a,o=-1;for(let c of t.body.body){if(c.type==="TSIndexSignature"){let[y]=c.parameters;if(!y)continue;F(e,c.typeAnnotation?.typeAnnotation),n.push({kind:"index",name:`[${y.name}: ${ae(e,y.typeAnnotation)??"string"}]`,type:ae(e,c.typeAnnotation)??"any",...c.static?{static:!0}:{},...c.readonly?{readonly:!0}:{}});continue}if(c.type!=="MethodDefinition"&&c.type!=="PropertyDefinition")continue;if(ou(c.accessibility))continue;let u=lE(c);if(u===void 0)continue;let f=j(e,c);if(f?.internal)continue;let h=`${c.static?"static ":""}${u}`,m={...c.static?{static:!0}:{},...c.optional?{optional:!0}:{},...c.abstract?{abstract:!0}:{}};if(c.type!=="MethodDefinition"){if(F(e,c.typeAnnotation?.typeAnnotation),!c.static)s.add(u);n.push({kind:"property",name:u,type:ae(e,c.typeAnnotation)??f?.type??Be(c.value,"widen")??"any",...m,...c.readonly?{readonly:!0}:{},...Gt(f)});continue}let g=c.typeParameters?{...c.value,typeParameters:c.typeParameters}:c.value;if(c.kind==="constructor"){let y=fo(e,g,f);n.push({kind:"constructor",name:"constructor",params:y.params,...Gt(f)}),o=n.length,a=g.type==="FunctionExpression"?g.body.body:void 0;for(let[_,A]of g.params.entries()){if(A.type!=="TSParameterProperty"||ou(A.accessibility))continue;let R=y.params?.[_];if(!R)continue;s.add(R.name),n.push({kind:"property",name:R.name,type:R.type,...A.readonly?{readonly:!0}:{},...R.description?{description:R.description}:{}})}continue}if(c.kind==="get"||c.kind==="set"){let y=fo(e,g,f),_=c.kind==="get"?y.returnType??f?.type:y.params?.[0]?.type??f?.type,A=i.get(h);if(A){if(c.kind==="set")A.readonly=void 0;if(_&&_!=="any"&&(A.type==="any"||c.kind==="get"))A.type=_;if(!A.description&&!A.deprecated)Object.assign(A,Gt(f));continue}let R={kind:"property",name:u,type:_??"any",...m,...c.kind==="get"?{readonly:!0}:{},...Gt(f)};i.set(h,R),n.push(R);continue}if(g.type==="TSDeclareMethod"&&!c.abstract)r.add(h);else if(g.type!=="TSDeclareMethod"&&r.has(h))continue;n.push({kind:"method",name:u,...m,...fo(e,g,f),...Gt(f)})}if(e.scriptLanguage!=="ts"&&a)n.splice(o,0,...uE(e,a,s));for(let c of t.typeParameters?.params??[])F(e,c.constraint),F(e,c.default);let l=lu(ct(e,t.typeParameters)),p=cE(e,t);return{members:n,...l?{typeParameters:l}:{},...p}}function cE(e,t){let n={},i=t.superClass;if(i){if(n.extends=ct(e,{start:i.start,end:t.superTypeParameters?.end??i.end}),i.type==="Identifier")au(e,i,t.superTypeParameters)}let r=(t.implements??[]).map((s)=>(au(e,s.expression,s.typeParameters),ct(e,s))).filter((s)=>Boolean(s));if(r.length>0)n.implements=r;return n}function au(e,t,n){F(e,{type:"TSTypeReference",typeName:t,start:t.start,end:n?.end??t.end,...n?{typeArguments:n}:{}})}function uE(e,t,n){let i=[];for(let r of t){let s=r.type==="ExpressionStatement"?r.expression:void 0;if(s?.type!=="AssignmentExpression"||s.operator!=="=")continue;let a=s.left;if(a.type!=="MemberExpression"||a.computed||a.object.type!=="ThisExpression")continue;let o=a.property.type==="Identifier"?a.property.name:void 0;if(!o||n.has(o))continue;n.add(o);let l=j(e,r);if(l?.internal)continue;i.push({kind:"property",name:o,type:l?.type??"any",...Gt(l)})}return i}var dE=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function ho(e,t,n){if(!t)return;let i=e.moduleExports.get(t);e.moduleExports.set(t,i?{...i,...n}:n)}function cu(e,t,n,i){let r=j(e,t);ho(e,n==="*"?`* from ${i.from}`:n,{name:n,kind:"re-export",description:r?.description,deprecated:r?.deprecated,tags:r?.tags,...r?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:i,source:C(e,t)})}function uu(e,t){D(e,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,C(e,t))}function fE(e,t,n,i){let r=n.id?.name;if(!r)return;let s=i?.exportedName??r,a=fi(e,t,i),{members:o,typeParameters:l,extends:p,implements:c}=pu(e,n),u=l??a?.typeParameters;ho(e,s,{name:s,...r===s?{}:{localName:r},kind:"class",description:a?.description,deprecated:a?.deprecated,tags:a?.tags,...a?.internal?{internal:!0}:{},type:`typeof ${r}`,...u?{typeParameters:u}:{},members:o,...n.abstract?{abstract:!0}:{},...p?{extends:p}:{},...c?{implements:c}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:C(e,t)})}function du(e,t,n,i){if(n.type==="ClassDeclaration"){fE(e,t,n,i);return}let r=is(e,n,i,"moduleExports");if(r.length===0)return;let s=fi(e,t,i);for(let a of r){let{prop_name:o,kind:l}=a,{type:p,typeSource:c,description:u,params:f,returnType:h,isFunction:m,typeParameters:g}=rs(e,a,s);ho(e,o,{name:o,kind:l,description:u,deprecated:s?.deprecated,tags:s?.tags,...s?.internal?{internal:!0}:{},type:p,typeSource:c,value:a.value,defaultValue:a.defaultValue,params:f,returnType:h,typeParameters:g,isFunction:m,isFunctionDeclaration:a.isFunctionDeclaration,isRequired:!1,constant:l==="const",reactive:!1,source:C(e,t)})}}function hE(e){let t=Array.from(e.moduleExports.values()).filter((i)=>i.kind==="class"),n=new Set(t.map((i)=>i.localName??i.name));for(let i of t){if(!i.extends)continue;let r=dE.exec(i.extends)?.[0];if(r&&(n.has(r)||e.valueImportBindingsByLocalName.has(r)||e.typeImportBindingsByLocalName.has(r)))continue;D(e,"export-unresolved",i.name,`class "${i.name}" extends \`${i.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,i.source),i.extends=void 0}}function fu(e){let t=e.parsed?.module;if(!t)return;let n=xa(t);z(t,{enter(i,r){if(i.type==="ImportDeclaration")nn(e,i);if(i.type==="FunctionDeclaration"&&i.id?.name)e.funcDecls.set(i.id.name,i);if(i.type==="VariableDeclaration")e.vars.add(i);if(i.type==="ExportNamedDeclaration"){if(i.declaration!=null){du(e,i,i.declaration);return}let s=i.source?.value,a=r?.type==="Program"?r:null;for(let o of i.specifiers){let l=ts(e,i,o,a,"module");if(!l)continue;if(l.exportedName==="default"){uu(e,i);continue}let p=typeof s==="string"?{from:s,imported:l.localName}:n.get(l.localName);if(l.declaration)du(e,i,l.declaration,l);else if(p)cu(e,i,l.exportedName,p);else if(!e.localTypeDeclarationsByName.get(l.localName)?.exported)ns(e,i,l.localName,l.exportedName)}}if(i.type==="ExportAllDeclaration"&&typeof i.source.value==="string"){let s=(i.exported&&di(i.exported))??"*";if(s==="default"){uu(e,i);return}cu(e,i,s,{from:i.source.value,imported:"*"})}}}),hE(e)}function hu(e){return tr(e,{css:!1})}function mE(e,t){let n=e.length+1,i=t.length+1,r=Array.from({length:n},()=>Array(i).fill(0));for(let s=0;s<n;s++)r[s][0]=s;for(let s=0;s<i;s++)r[0][s]=s;for(let s=1;s<n;s++)for(let a=1;a<i;a++){let o=e[s-1]===t[a-1]?0:1;if(r[s][a]=Math.min(r[s-1][a]+1,r[s][a-1]+1,r[s-1][a-1]+o),s>1&&a>1&&e[s-1]===t[a-2]&&e[s-2]===t[a-1])r[s][a]=Math.min(r[s][a],r[s-2][a-2]+1)}return r[n-1][i-1]}function mu(e,t,n=3){let i,r=Number.POSITIVE_INFINITY;for(let s of t){let a=mE(e,s);if(a<r)i=s,r=a}return r<=n?i:void 0}var yE=/\s*=\s*/,gE=/^[^"'`\s]\S*$/;function xE(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let n=e.slice(0,t),i=e.slice(t+1,-1),r=O(i,",").map((s)=>s.trim().replace(yE," = ")).join(", ");return`${n}<${r}>`}var EE=new Set(["restProps","slot","snippet","event","typedef","callback"]),mo=new Set(["property","type"]),yu=new Set(["slot","snippet","typedef","callback"]);function rr(e){if(e.length===0)return;return Dt(e[Or(e)].content)}function gu(e){return!e||!e.tag&&!e.continuesType&&e.content.trim()===""}function bE(e){return e.text.split(`
55
+ `).length===e.lines.length}function sr(e,t){if(t<=0)return e;return e.split(`
56
56
  `).slice(0,-t).join(`
57
- `).trimEnd()}var bE=new Set(["abstract","access","alias","alpha","arg","argument","async","augments","author","beta","borrows","const","constructs","copyright","defaultValue","description","emits","experimental","exports","external","fires","function","global","import","inner","instance","kind","lends","license","link","listens","member","name","override","package","private","prop","protected","public","readonly","remarks","requires","satisfies","sealed","static","summary","throws","todo","tutorial","typeParam","version","virtual","yields"]),vE=[...ei,...Mr,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],SE=/;$/;function TE(e){let t=e.trim().replace(SE,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;return We(t,0)===t.length-1}var CE=/[\w$]+/g,kE=new Set(["property","param","returns","return"]);function wE(e,t,n){let i=[e[t].type];for(let s=t+1;kE.has(e[s]?.tag);s++)i.push(e[s].type);let r=new Set(i.join(" ").match(CE));return n.some(({name:s})=>r.has(s))}function AE(e){let t=e.trim();return!t||t==="object"||t==="Object"}function mu(e,t){if(t.usedGenericsTag&&t.usedTemplateTag&&!t.warnedMixedGenericsTags){t.warnedMixedGenericsTags=!0;let n=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${n}; their declarations are combined in the order encountered.`)}}function yu(e,t,n,i){if(t.seenGenericNames.has(n))D(e,"generics-conflict",n,`Duplicate generic name "${n}".`,i);else t.seenGenericNames.add(n)}function gu(e,t,n){if(e.generics){let r=B(e.generics[0],",").map((s)=>s.trim()).indexOf(t.trim());if(r!==-1){let s=B(e.generics[1],",").map((l)=>l.trim());s[r]=n,e.generics=[e.generics[0],s.join(", ")];return}}fi(e,t,n)}function xu(e,{name:t,description:n,tags:i,internal:r,source:s},l,o){if(e.typedefs.has(t))D(e,"typedef-duplicate",t,`Duplicate typedef/callback name "${t}"; the later declaration overwrites the earlier one.`,s);e.typedefs.set(t,{type:l,name:t,description:n||void 0,ts:o,tags:i.length>0?i:void 0,...r?{internal:!0}:{},source:s})}function PE(e,t,n,i,r){let s=t.findIndex((l)=>l.name===n.name);if(s===-1)t.push(n);else{let l=i?` of "${i}"`:"";D(e,"property-duplicate",n.name,`Duplicate property "${n.name}"${l}; the later declaration overwrites the earlier one.`,r),t[s]=n}}class Eu{tags;lines;commentDescription;commentDescriptionUsed=!1;isFirstTag=!0;event;typedef;callback;typeDeclaration;attachTrailingTag;pendingTags=[];pendingDeprecated;pendingInternal=!1;pendingTypeParameters=[];lineDescriptions=new Map;tagLineNumbers=new Set;consumedDescriptionLines=new Set;indentedContinuationLines=new Set;trimBodyAbove;trimThisBody;hasSlotOrSnippetTag;hasExtendsTag;ctx;generics;documentsFunction;constructor(e,t,n,i){this.ctx=e,this.generics=t,this.documentsFunction=i;let{tags:r,lines:s}=n;this.tags=r,this.lines=s,this.commentDescription=n.description,this.hasSlotOrSnippetTag=r.some((a)=>a.tag==="slot"||a.tag==="snippet"),this.hasExtendsTag=r.some((a)=>a.tag==="extends"||a.tag==="extendProps");for(let a of r)if(a.lines.length>0)this.tagLineNumbers.add(a.lines[0].number);for(let a of s)if(a.continuesType)this.tagLineNumbers.add(a.number);let l=!1,o=!1;for(let a of s){if(!a.tag&&!a.continuesType&&a.content&&(o||a.content.trim()!=="}"))this.lineDescriptions.set(a.number,a.content);if(a.tag!==void 0||a.continuesType)l=!0;else if(!a.content.trim());else if(l&&(a.indent||o))this.indentedContinuationLines.add(a.number);else l=!1;if(Qt(a.content))o=!o}}orCommentDescription(e){if(e||!this.isFirstTag||this.commentDescriptionUsed||!this.commentDescription)return e;return this.commentDescriptionUsed=!0,this.commentDescription}typeDeclarationName(e){if(this.pendingTypeParameters.length===0)return gE(e);let t=`${e}<${this.pendingTypeParameters.join(", ")}>`;return this.pendingTypeParameters.length=0,t}joinBlockLines(e,t){let n=t?t.text.split(`
58
- `):[],i=t?.line;for(let r of e){if(i!==void 0&&r-i>1){let l=i+1;while(l<r&&hu(this.lines[l]))l++;if(l===r)for(let o=i+1;o<r;o++)n.push("")}let s=this.lines[r];n.push(s.indent+s.content),i=r}return Zn(n)}getPrecedingDescription(e){if(e.length===0)return;let t=e[0].number,n=[],i=!1;for(let r=t-1;r>=0;r--){if(this.tagLineNumbers.has(r)||this.indentedContinuationLines.has(r)||this.consumedDescriptionLines.has(r))break;if(this.lineDescriptions.has(r))n.unshift(r),i=!0;else if(i&&!hu(this.lines[r]))break}if(n.length===0)return;for(let r of n)this.consumedDescriptionLines.add(r);return this.trimBodyAbove?.(n[0]),this.joinBlockLines(n)}claimBodyLines(e,t){if(!EE(e)){for(let i=1;i<e.lines.length;i++)this.consumedDescriptionLines.add(e.lines[i].number);return}let n=e.lines[e.lines.length-1].number;this.trimThisBody=(i)=>t(n-i+1)}getTagDescription(e,t,n=!1){let i=ir(e),r=t!==void 0&&xE.has(t.tag)&&!ir(t.lines),s=n&&(t===void 0||!fo.has(t.tag)),l=[];for(let o=1;o<e.length;o++){let a=e[o];if((r||s)&&!this.indentedContinuationLines.has(a.number))continue;if(!this.lineDescriptions.get(a.number)?.trim()||this.consumedDescriptionLines.has(a.number))continue;l.push(a.number),this.consumedDescriptionLines.add(a.number)}if(l.length===0)return i;return this.joinBlockLines(l,{text:i??"",line:e[Rr(e)].number})}flagDescriptionAfterEvent(e,t,n,i){let{event:r}=this;if(r===void 0||r.description)return;if(r.tagLine!==void 0&&this.indentedContinuationLines.has(r.tagLine+1))return;if(i?.tag!=="event"&&!fo.has(i?.tag??""))return;if(ir(n))return;let s=t?`@${e} "${t}"`:`@${e}`;D(this.ctx,"event-description-ambiguous",r.name,`Text after @event "${r.name}" was used as the description of ${s}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Ae(this.ctx,n))}takePrecedingDescription(e){let{tag:t,name:n,lines:i}=this.tags[e],r=this.getPrecedingDescription(i);if(r)this.flagDescriptionAfterEvent(t,n,i,this.tags[e-1]);return r}finalizeEvent(){let{ctx:e,event:t}=this;if(t===void 0)return;this.event=void 0;let i=(t.type&&t.type!=="object"&&t.type!=="Object"?t.type:void 0)??(t.properties.length>0?yn(t.properties,!0):t.type||""),{tagLine:r}=t;if(r!==void 0){let p=this.tags.find((u)=>{let f=u.lines[0]?.number;return f!==void 0&&f>r&&!fo.has(u.tag)})?.lines[0].number,c=Array.from(this.lineDescriptions.keys()).sort((u,f)=>u-f).filter((u)=>u>r&&(p===void 0||u<p)&&!this.consumedDescriptionLines.has(u)&&this.lineDescriptions.get(u)?.trim());for(let u of c)this.consumedDescriptionLines.add(u);if(c.length>0)t.description=this.joinBlockLines(c,t.description?{text:t.description,line:r}:void 0)}let{name:s,description:l,source:o}=t,a=i===""&&(!e.events.has(s)||e.untypedJsDocEventNames.has(s));if(Je(e,{name:s,detail:i,has_argument:!1,description:l,deprecated:t.deprecated,tags:t.tags.length>0?t.tags:void 0,internal:t.internal||void 0,source:o}),a)e.untypedJsDocEventNames.add(s);e.eventDescriptions.set(s,l),e.jsDocEventNames.add(s),e.jsDocEventSources.set(s,o),ze(e,"event-no-source",s,t.ignores)}finalizeTypedef(){let{ctx:e,typedef:t}=this;if(t===void 0)return;this.typedef=void 0;let{properties:n}=t,i=n.length>0,r=i?yn(n,!0):t.type||"{}",s=!i&&t.type&&TE(r)?`interface ${t.name} ${r}`:`type ${t.name} = ${r};`,l=i?n.filter(({name:o})=>!o.includes(".")&&!o.startsWith("[")).map(({name:o,type:a,optional:p,description:c})=>({name:o,type:a,optional:p===!0,...c?{description:c}:{}})):Re(r,{skipIndexSignatures:!0});if(l)e.typedefMembersByName.set(t.name,l);xu(e,t,r,s)}finalizeCallback(){let{callback:e}=this;if(e===void 0)return;this.callback=void 0;let t=`(${ye(e.params)}) => ${e.returnType||"void"}`;xu(this.ctx,e,t,`type ${e.name} = ${t};`)}openTypeDeclaration(e){let{name:t,lines:n}=this.tags[e],i={name:this.typeDeclarationName(t),source:Ae(this.ctx,n),description:this.orCommentDescription(this.getTagDescription(n,this.tags[e+1])||this.takePrecedingDescription(e)),tags:this.pendingTags.splice(0),internal:this.pendingInternal},{tags:r}=i;if(this.pendingDeprecated!==void 0)r.push({name:"deprecated",body:this.pendingDeprecated===!0?"":this.pendingDeprecated}),this.pendingDeprecated=void 0;return this.pendingInternal=!1,this.attachTrailingTag=(s)=>r.push(s),this.isFirstTag=!1,i}readExtends(e,t){let{name:n,lines:i}=this.tags[e];if(this.ctx.extends!==void 0)D(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,Ae(this.ctx,i));this.ctx.extends={interface:n,import:yE.test(t)?JSON.stringify(t):t},this.isFirstTag=!1}readRestProps(e,t){let{name:n,description:i}=this.tags[e],r=n?i?`${n} ${i}`:n:i,s=Dt(r),l=this.orCommentDescription(s||this.takePrecedingDescription(e)),o={type:"Element",name:t,description:l||void 0};if(this.ctx.rest_props=o,s)this.claimBodyLines(this.tags[e],(a)=>{o.description=Dt(rr(r,a))||void 0});this.isFirstTag=!1}readSlot(e,t){let{tag:n,name:i,lines:r}=this.tags[e],s=i==="-"||n==="snippet"&&i==="children"?void 0:i,l=this.orCommentDescription(this.getTagDescription(r,this.tags[e+1]));if(!l&&this.pendingTags.length===0)l=this.takePrecedingDescription(e);this.isFirstTag=!1;let o=t||"Record<string, never>",a=Ae(this.ctx,r);if(!t)D(this.ctx,"slot-missing-type",s||"default",`@${n}${s?` "${s}"`:""} is missing a required {Type} annotation; falling back to "${o}".`,a);let p=this.pendingTags.splice(0),c=Ye(s);this.ctx.jsDocSlots.set(c,{tag:n,source:a}),bn(this.ctx,{slot_name:s,slot_props:o,slot_description:l||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:p.length>0?p:void 0,slot_internal:this.pendingInternal||void 0,source:a}),this.pendingDeprecated=void 0,this.pendingInternal=!1,this.typeDeclaration=void 0,this.attachTrailingTag=(u)=>{let f=this.ctx.slots.get(c);if(f)f.tags=[...f.tags??[],u]}}readEvent(e,t){let{name:n,lines:i}=this.tags[e],r=ir(i)||this.takePrecedingDescription(e);this.finalizeEvent();let s=this.pendingTags.splice(0);this.event={name:n,type:t,tagLine:i.length>0?i[0].number:void 0,description:this.orCommentDescription(r),source:Ae(this.ctx,i),tags:s,internal:this.pendingInternal,deprecated:this.pendingDeprecated,ignores:[],properties:[]},this.pendingInternal=!1,this.pendingDeprecated=void 0,this.typeDeclaration=void 0,this.attachTrailingTag=(l)=>s.push(l),this.isFirstTag=!1}readProperty(e,t){let{name:n,optional:i,default:r,lines:s}=this.tags[e],l=this.getTagDescription(s,this.tags[e+1],this.event!==void 0),o=this.event??(this.typedef&&AE(this.typedef.type)?this.typedef:void 0);if(o===void 0)return;PE(this.ctx,o.properties,{name:n,type:t,description:l,optional:i||!1,default:r},o.name,Ae(this.ctx,s))}readTypedef(e,t){this.finalizeTypedef(),this.typedef={...this.openTypeDeclaration(e),type:t,properties:[]},this.typeDeclaration=this.typedef}readCallback(e){this.finalizeCallback(),this.callback={...this.openTypeDeclaration(e),params:[],returnType:void 0},this.typeDeclaration=this.callback}readGenerics(e,t){let{name:n,lines:i}=this.tags[e],r=Ae(this.ctx,i);for(let s of B(n,","))yu(this.ctx,this.generics,s.trim(),r);this.generics.usedGenericsTag=!0,mu(this.ctx,this.generics),gu(this.ctx,n,t||n),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,i=Br(n[e],t),r=e+1;while(n[r]?.tag==="template")r++;let s=n[r];if((s?.tag==="typedef"||s?.tag==="callback")&&!s.name.includes("<")&&wE(n,r,i)){this.pendingTypeParameters.push(...i.map(({constraint:o})=>o));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...i);return}if(this.documentsFunction)return;let l=Ae(this.ctx,n[e].lines);for(let o of i)yu(this.ctx,this.generics,o.name,l),gu(this.ctx,o.name,o.constraint);this.generics.usedTemplateTag=!0,mu(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(e){let{text:t}=this.tags[e],{event:n}=this;if(!n&&this.typeDeclaration){let r={name:"deprecated",body:t};this.typeDeclaration.tags.push(r),this.claimBodyLines(this.tags[e],(s)=>{r.body=rr(t,s)});return}if((n?n.deprecated:this.pendingDeprecated)!==void 0)return;let i=(r)=>{if(n)n.deprecated=r;else this.pendingDeprecated=r};i(ti(t)),this.claimBodyLines(this.tags[e],(r)=>{i(ti(rr(t,r)))})}readPassthrough(e){let{tag:t,text:n,lines:i}=this.tags[e],r={name:t,body:n};if(this.claimBodyLines(this.tags[e],(s)=>{r.body=rr(n,s)}),!ei.has(t)&&!Mr.has(t)){let s=bE.has(t)?void 0:du(t,vE,t.length<=4?1:2);D(this.ctx,"jsdoc-unknown-tag",t,s?`Unknown JSDoc tag "@${t}"; did you mean "@${s}"? Passed through unchanged.`:`Unknown JSDoc tag "@${t}"; passed through unchanged. If this is a typo, fix the tag name.`,Ae(this.ctx,i))}if(this.attachTrailingTag)this.attachTrailingTag(r);else this.pendingTags.push(r)}read(){let{tags:e}=this;for(let i=0;i<e.length;i++){let{tag:r,type:s,name:l,optional:o}=e[i],a=we(s);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,r){case"extends":case"extendProps":this.readExtends(i,a);break;case"restProps":this.readRestProps(i,a);break;case"slot":case"snippet":this.readSlot(i,a);break;case"csspart":{let p=this.getTagDescription(e[i].lines,e[i+1]);this.ctx.cssParts.push({name:l,...p?{description:p}:{}});break}case"cssprop":case"cssproperty":{let p=this.getTagDescription(e[i].lines,e[i+1]),c=e[i].default;this.ctx.cssProperties.push({name:l,...a?{type:a}:{},...c===void 0?{}:{default:c},...p?{description:p}:{}});break}case"event":this.readEvent(i,a);break;case"type":if(this.event)this.event.type=a;break;case"param":this.callback?.params.push({name:l,type:a,optional:o||!1});break;case"returns":case"return":if(this.callback)this.callback.returnType=a;break;case"property":this.readProperty(i,a);break;case"typedef":this.readTypedef(i,a);break;case"callback":this.readCallback(i);break;case"generics":this.readGenerics(i,a);break;case"template":this.readTemplate(i,a);break;case"deprecated":this.readDeprecated(i);break;case"ignore":case"internal":if(this.event)this.event.internal=!0;else if(this.typeDeclaration)this.typeDeclaration.internal=!0;else this.pendingInternal=!0;break;case"sveld-ignore":this.event?.ignores.push(l);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(i);break}if(fu.has(r))this.finalizeEvent()}this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback();let t=[...this.pendingTags,...this.pendingDeprecated===void 0?[]:[{name:"deprecated"}],...this.pendingInternal?[{name:"internal"}]:[]];if(t.length===0)return;if(!e.some((i)=>i.tag==="event"||fu.has(i.tag)))return;for(let i of t)D(this.ctx,"jsdoc-tag-dropped",i.name,`@${i.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`)}}function bu(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},i=t.includes("@template")?na(e):new Set;e.functionDocCommentStarts=i;let r=Zt(t);for(let s of r)e.jsDocBlocksByStart.set(s.start,s);for(let s of r)new Eu(e,n,s,i.has(s.start)).read()}var Su=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]),_E=Array.from(Su);function vu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function DE(e){if(e.includes("\\u"))return!0;for(let t of _E){let n=e.indexOf(t);while(n!==-1){if(!vu(e.charCodeAt(n-1))&&!vu(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function NE(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function $E(e){let t=new Set;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":if(e.type!=="ArrowFunctionExpression"&&e.id)t.add(e.id.name);for(let n of e.params)Y(n,t);break;case"BlockStatement":sr(e.body,t);break;case"CatchClause":Y(e.param,t);break;case"EachBlock":if(Y(e.context,t),e.index)t.add(e.index);break;case"AwaitBlock":Y(e.value,t),Y(e.error,t);break}return t}function sr(e,t){for(let n of e??[])switch(n.type){case"ImportDeclaration":for(let i of n.specifiers)t.add(i.local.name);break;case"VariableDeclaration":for(let i of n.declarations)Y(i.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)t.add(n.id.name);break;case"ExportNamedDeclaration":if(n.declaration)sr([n.declaration],t);break}}function ho(e,t){if(!e)return!1;let n=[...t],i=!1;return z(e,{enter(r,s){if(ai(r.type))return ie;if(Mt(r))n.push($E(r));if(r.type==="Identifier"&&Su.has(r.name)&&Sr(r,s)&&!NE(r.name,n))return i=!0,Ut},leave(r){if(Mt(r))n.pop()}}),i}function Tu(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!DE(e.source))return"legacy";let n=new Set;sr(t.module?.content.body,n);let i=new Set;return sr(t.instance?.content.body,i),ho(t.module,[n])||ho(t.instance,[n,i])||ho(t.fragment,[n,i])?"runes":"legacy"}var IE=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function LE(e){if(e.type!=="TSAsExpression"&&e.type!=="TSTypeAssertion")return!1;let t="typeAnnotation"in e?e.typeAnnotation:void 0;return t?.type==="TSTypeReference"&&t.typeName.type==="Identifier"&&t.typeName.name==="const"}function or(e,t){if(!e)return;z(e,{enter(n){if(!IE.has(n.type)||!("expression"in n)||!n.expression)return;let{expression:i}=n;if(typeof i!=="object")return i;let r=t.typeAssertions.get(n);if(t.constAssertions.has(n)||r===void 0&&LE(n))t.constAssertions.add(i);else if(r!==void 0)t.typeAssertions.set(i,r);else if((n.type==="TSAsExpression"||n.type==="TSTypeAssertion")&&"typeAnnotation"in n)t.typeAssertions.set(i,n.typeAnnotation);return i}})}var RE=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function ME(e){if(!e.includes("@ts-"))return e;let t=e.charCodeAt(0)===65279?1:0,{instance:n,module:i}=Bi(e),r=[n,i].flatMap((o)=>o?[o.content]:[]).sort((o,a)=>o.start-a.start),s="",l=0;for(let{start:o,end:a}of r)s+=e.slice(l,o+t),s+=e.slice(o+t,a+t).replace(RE,""),l=a+t;return s+e.slice(l)}function Cu(e,t,n){e.componentFilePath=n;let i=ME(t);e.source=i;let r=uu(i);if(ol(e,r),e.parsed=r,e.scriptLanguage==="ts")or(r.module,e.typeCasts),or(r.instance,e.typeCasts),or(r.fragment,e.typeCasts);e.syntaxMode=Tu(e);let s=r.css,l=s?i.slice(0,s.start)+" ".repeat(s.end-s.start)+i.slice(s.end):i;Wr(e,r.module),Wr(e,r.instance),bu(e,l)}class mo{ctx=wr();cleanup(){this.ctx=wr()}parseSvelteComponent(e,t){let{component:n,pending:i}=this.parse(e,t);if(i)n[De]={...n[De]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...i};return n}parse(e,t){this.cleanup();let n=this.ctx;Cu(n,e,t.filePath),cu(n);let i=fl(n);return nu(n,i)}}var OE=/\.$/,yo="resolving it needs file access (generateBundle or the CLI)";function BE(e,t={}){let n=e[De];if(!n)return e;let{pendingCallDefaultCandidates:i,pendingConstDefaultCandidates:r,pendingContextKeyCandidates:s,pendingDispatchEscapeCandidates:l,deferredEventNoSourceDiagnostics:o,untypedJsDocEventNames:a,...p}=n,c=(i??[]).filter((v)=>v.importSource!==void 0);if(c.length===0&&!r&&!s&&!l&&!o)return e;let u=e.filePath,f=t.filePath??(typeof u==="string"?u:""),h=[],m=(v,X,he,_e)=>{h.push(Yn({component:f,kind:"cross-file-unresolved",name:v,message:X,...he?{source:he}:{},..._e?{ignored:_e}:{}}))},x=(v,X)=>(v==="props"?e.props:e.moduleExports).find((he)=>he.name===X)?.source,y=(v)=>v==="props"?"Prop":"Module export";for(let v of s??[]){let X=rn(v);m(X,`setContext key \`${X}\` is imported from "${v.importSource}"; ${yo}, so the context is omitted.`,v.source)}for(let v of r??[])m(v.propName,`${y(v.location)} "${v.propName}" defaults to \`${rn(v)}\` imported from "${v.importSource}"; ${yo}, so the default shows the identifier and its type isn't read.`,x(v.location,v.propName));for(let v of c)m(v.propName,`${y(v.location)} "${v.propName}" defaults to \`${v.calleeName}()\` imported from "${v.importSource}"; ${yo}, so its return type isn't read and the prop falls back to "any".`,x(v.location,v.propName));for(let v of l??[])m(v.calleeText,`\`${v.dispatcherName}\` is passed to \`${v.calleeText}\`, imported from "${v.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,v.source,v.ignored);let _=Array.from(new Set((l??[]).map((v)=>`\`${v.calleeText}\``))).join(", "),A=(o??[]).map((v)=>_?{...v,message:`${v.message.replace(OE,"")} in this file; ${_} may dispatch it, but imported helpers aren't read without file access.`}:v),R={...e,diagnostics:[...e.diagnostics??[],...A,...h]};return R[De]=p,R}var wu="sveld",Au="0.40.1";var go="5.57.2";var Pu=1;function nt(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function jE(e){return{...e,props:nt(e.props),moduleExports:nt(e.moduleExports),slots:nt(e.slots),events:nt(e.events),typedefs:nt(e.typedefs),...e.contexts?{contexts:nt(e.contexts).map((t)=>({...t,properties:nt(t.properties)}))}:{}}}function xo(e,t={}){let n=Array.from(e.values(),(s)=>{let{diagnostics:l,...o}=s;return jE(o)}).sort((s,l)=>Ie(s.moduleName,l.moduleName)),i={schemaVersion:Pu,generator:{name:wu,version:Au,svelteVersion:go},total:n.length,components:n},r=t.entryExports?nt(t.entryExports):void 0;if(r&&r.length>0)i.totalExports=r.length,i.exports=r;return i}var qE=" ",VE=120,GE=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,HE=200,$u=/\s/,WE=/\s{2}|[^\S ]/,zE=/["'`{}/]/g,UE=/["'`{};/]/g,Iu=9,Eo=10,KE=13,Fn=32,lr=34,JE=38,pr=39,XE=40,YE=41,ar=42,_u=46,vo=47,Lu=59,QE=62,ZE=91,So=92,eb=93,cr=96,To=123,tb=124,Co=125;function nb(e){return GE.test(rb(e,HE))}var Du=[""];function ib(e){let t=Du[e];if(t===void 0)t=qE.repeat(e),Du[e]=t;return t}function rb(e,t){let n="";for(let i=e.length-1;i>=0&&n.length<t;i--)n=e[i]+n;return n.length>t?n.slice(-t):n}function sb(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===Eo}function ob(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let i=t.charCodeAt(n-1);if(i!==Fn&&i!==Iu)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function ab(e){while(e.length>0){let t=e[e.length-1];if(!$u.test(t[t.length-1]))return;let n=t.trimEnd();if(n.length===t.length)return;if(n.length===0){e.pop();continue}e[e.length-1]=n;return}}function lb(e){if(e.includes("{"))return!1;let t=0,n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(t!==0){if(r===t&&e.charCodeAt(i-1)!==So)t=0;continue}if(r===lr||r===pr||r===cr){t=r;continue}if(r===Lu&&++n>=2)return!0}return!1}function pb(e){if(!WE.test(e))return e.trimEnd();let t="",n=null,i=!1;for(let r=0;r<e.length;r++){let s=e[r],l=e[r-1];if(n){if(t+=s,n==="double"&&s==='"'&&l!=="\\"||n==="single"&&s==="'"&&l!=="\\"||n==="template"&&s==="`"&&l!=="\\")n=null;i=!1;continue}if(s==='"'||s==="'"||s==="`"){n=s==='"'?"double":s==="'"?"single":"template",t+=s,i=!1;continue}if($u.test(s)){if(!i&&t.length>0)t+=" ",i=!0;continue}t+=s,i=!1}return t.trimEnd()}function Ru(e,t){let n=e[t],i=e.indexOf(n,t+1);while(i!==-1&&e.charCodeAt(i-1)===So)i=e.indexOf(n,i+1);return i}function Mu(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function cb(e){let t=new Map,n=[],i=zE,r=0;while(r<e.length){if(i.lastIndex=r,!i.test(e))break;r=i.lastIndex-1;let s=e.charCodeAt(r);if(s===vo){if(e.charCodeAt(r+1)===ar){let l=Mu(e,r);if(l===-1)break;r=l}}else if(s===lr||s===pr||s===cr){let l=Ru(e,r);if(l===-1)break;r=l}else if(s===To)n.push(r);else if(s===Co&&n.length>0)t.set(n.pop(),r);r++}return t}function ub(e,t,n){for(let i=t;i<n;i++)if(!bo(e.charCodeAt(i)))return!1;return!0}function bo(e){if(e<=Fn)return e===Fn||e>=Iu&&e<=KE;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function Ou(e,t,n,i){let r=[],s=UE,l=t,o=t;while(o<n){if(s.lastIndex=o,!s.test(e))break;if(o=s.lastIndex-1,o>=n)break;let a=e.charCodeAt(o);if(a===vo){if(e.charCodeAt(o+1)===ar){let p=Mu(e,o);if(p===-1)break;o=p}o++;continue}if(a===lr||a===pr||a===cr){let p=Ru(e,o);if(p===-1)break;o=p+1;continue}if(a===To){let p=i.get(o);if(p===void 0||p>=n){o++;continue}if(l<o)r.push(e.slice(l,o));let c=o+1;if(ub(e,c,p)){r.push("{}"),o=p+1,l=o;continue}let u=e.slice(c,p),f=e.charCodeAt(c)===Eo;if(!f&&!u.includes("/*")&&!lb(u)&&!nb(r)){let h=Ou(e,c,p,i),m=h.trim();if(!m.includes(`
59
- `)){let x=m.endsWith(";")?m.slice(0,-1):m,y=`{ ${pb(x)} }`;if(y.length<=VE){r.push(y),o=p+1,l=o;continue}}if(r.push("{"),h.charCodeAt(0)!==Lu)r.push(`
60
- `);if(h.length>0)r.push(h);o=p,l=p;continue}if(r.push("{"),!f)r.push(`
61
- `);o=c,l=c;continue}if(a===Co){if(l<o)r.push(e.slice(l,o));if(ob(r),!sb(r))r.push(`
62
- `);r.push("}"),o++,l=o;continue}if(l<o)r.push(e.slice(l,o));if(ab(r),r.push(";"),e.charCodeAt(o+1)!==Eo)r.push(`
63
- `);o++,l=o}if(l<n)r.push(e.slice(l,n));return r.join("")}function db(e){if(!e.includes(" "))return e;let t="",n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(n!==0){if(t+=e[i],r===n&&e.charCodeAt(i-1)!==So)n=0;continue}if(r===lr||r===pr||r===cr){n=r,t+=e[i];continue}if(r===Fn&&t.charCodeAt(t.length-1)===Fn)continue;t+=e[i]}return t}function fb(e){return e===Co||e===eb||e===YE||e===QE}function hb(e,t,n){return n-t>=3&&e.charCodeAt(t)===vo&&e.charCodeAt(t+1)===ar&&e.charCodeAt(t+2)===ar}function Nu(e,t,n){let i=e.indexOf("*/",t);return i!==-1&&i+2<=n}function mb(e,t,n){let i=e.charCodeAt(t);if(i===tb||i===JE)return!0;return i===_u&&t+1<n&&e.charCodeAt(t+1)!==_u}function yb(e){let t=[],n=[],i=e.length,r=0,s=!1,l=0,o=0;while(o<=i){let c=e.indexOf(`
64
- `,o);if(c===-1)c=i;let u=c+1,f=o,h=c;while(f<h&&bo(e.charCodeAt(f)))f++;while(h>f&&bo(e.charCodeAt(h-1)))h--;if(f===h){let A=n.length>0?n[n.length-1]:void 0;if(A!==void 0&&A!==""){let R=A.charCodeAt(A.length-1);if(R!==To&&R!==XE&&R!==ZE)t.push(0),n.push("")}o=u;continue}if(s){if(t.push(l),n.push(` ${e.slice(f,h)}`),Nu(e,f,h))s=!1;o=u;continue}let m=hb(e,f,h),x=m&&Nu(e,f,h);if(m&&!x){t.push(r),n.push(e.slice(f,h)),s=!0,l=r,o=u;continue}let y=fb(e.charCodeAt(f)),_=Math.max(0,r-(y?1:0))+(mb(e,f,h)?1:0);if(y&&_===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(_),n.push(db(e.slice(f,h))),o=u,x)continue;r=Kn(e,void 0,f,h,r)}let a=n.length;while(a>0&&n[a-1]==="")a--;let p=[];for(let c=0;c<a;c++){if(c>0)p.push(`
65
- `);let u=t[c];if(u>0)p.push(ib(u));p.push(n[c])}return p.join("")}function Bu(e){return`${yb(Ou(e,0,e.length,cb(e)))}
66
- `}var fe="any",gb="Record<string, any>",jn="Record<string, never>",Hu=/^[A-Za-z_$][A-Za-z0-9_$]*$/,xb=/CustomEvent/,Eb=/^[A-Z]/,bb=/\n/,vb=/=>/,Sb=/^\s*[(<]/,Tb=/(?:^|\n)@default\b/,Cb=/^([ \t]*\*) +$/gm,kb=/[^\S\r\n]*[\r\n]\s*/g,wb=/(^|[^.\w])Snippet(?:\s*<|\b)/,Ab=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,Pb=/^const\s+/,_b=/^export /,Db=/[^\w$]/g;function Wu(e){return e.replace(Pb,"")}function Pe(e){if(e.length===0)return"";return`/**
57
+ `).trimEnd()}var vE=new Set(["abstract","access","alias","alpha","arg","argument","async","augments","author","beta","borrows","const","constructs","copyright","defaultValue","description","emits","experimental","exports","external","fires","function","global","import","inner","instance","kind","lends","license","link","listens","member","name","override","package","private","prop","protected","public","readonly","remarks","requires","satisfies","sealed","static","summary","throws","todo","tutorial","typeParam","version","virtual","yields"]),SE=[...ti,...Br,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],TE=/;$/;function CE(e){let t=e.trim().replace(TE,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;return ze(t,0)===t.length-1}var kE=/[\w$]+/g,wE=new Set(["property","param","returns","return"]);function AE(e,t,n){let i=[e[t].type];for(let s=t+1;wE.has(e[s]?.tag);s++)i.push(e[s].type);let r=new Set(i.join(" ").match(kE));return n.some(({name:s})=>r.has(s))}function PE(e){let t=e.trim();return!t||t==="object"||t==="Object"}function xu(e,t){if(t.usedGenericsTag&&t.usedTemplateTag&&!t.warnedMixedGenericsTags){t.warnedMixedGenericsTags=!0;let n=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${n}; their declarations are combined in the order encountered.`)}}function Eu(e,t,n,i){if(t.seenGenericNames.has(n))D(e,"generics-conflict",n,`Duplicate generic name "${n}".`,i);else t.seenGenericNames.add(n)}function bu(e,t,n){if(e.generics){let r=O(e.generics[0],",").map((s)=>s.trim()).indexOf(t.trim());if(r!==-1){let s=O(e.generics[1],",").map((a)=>a.trim());s[r]=n,e.generics=[e.generics[0],s.join(", ")];return}}hi(e,t,n)}function vu(e,{name:t,description:n,tags:i,internal:r,source:s},a,o){if(e.typedefs.has(t))D(e,"typedef-duplicate",t,`Duplicate typedef/callback name "${t}"; the later declaration overwrites the earlier one.`,s);e.typedefs.set(t,{type:a,name:t,description:n||void 0,ts:o,tags:i.length>0?i:void 0,...r?{internal:!0}:{},source:s})}function _E(e,t,n,i,r){let s=t.findIndex((a)=>a.name===n.name);if(s===-1)t.push(n);else{let a=i?` of "${i}"`:"";D(e,"property-duplicate",n.name,`Duplicate property "${n.name}"${a}; the later declaration overwrites the earlier one.`,r),t[s]=n}}class Su{tags;lines;commentDescription;commentDescriptionUsed=!1;isFirstTag=!0;event;typedef;callback;typeDeclaration;attachTrailingTag;pendingTags=[];pendingDeprecated;pendingInternal=!1;pendingTypeParameters=[];lineDescriptions=new Map;tagLineNumbers=new Set;consumedDescriptionLines=new Set;indentedContinuationLines=new Set;trimBodyAbove;trimThisBody;hasSlotOrSnippetTag;hasExtendsTag;ctx;generics;documentsFunction;constructor(e,t,n,i){this.ctx=e,this.generics=t,this.documentsFunction=i;let{tags:r,lines:s}=n;this.tags=r,this.lines=s,this.commentDescription=n.description,this.hasSlotOrSnippetTag=r.some((l)=>l.tag==="slot"||l.tag==="snippet"),this.hasExtendsTag=r.some((l)=>l.tag==="extends"||l.tag==="extendProps");for(let l of r)if(l.lines.length>0)this.tagLineNumbers.add(l.lines[0].number);for(let l of s)if(l.continuesType)this.tagLineNumbers.add(l.number);let a=!1,o=!1;for(let l of s){if(!l.tag&&!l.continuesType&&l.content&&(o||l.content.trim()!=="}"))this.lineDescriptions.set(l.number,l.content);if(l.tag!==void 0||l.continuesType)a=!0;else if(!l.content.trim());else if(a&&(l.indent||o))this.indentedContinuationLines.add(l.number);else a=!1;if(Qt(l.content))o=!o}}orCommentDescription(e){if(e||!this.isFirstTag||this.commentDescriptionUsed||!this.commentDescription)return e;return this.commentDescriptionUsed=!0,this.commentDescription}typeDeclarationName(e){if(this.pendingTypeParameters.length===0)return xE(e);let t=`${e}<${this.pendingTypeParameters.join(", ")}>`;return this.pendingTypeParameters.length=0,t}joinBlockLines(e,t){let n=t?t.text.split(`
58
+ `):[],i=t?.line;for(let r of e){if(i!==void 0&&r-i>1){let a=i+1;while(a<r&&gu(this.lines[a]))a++;if(a===r)for(let o=i+1;o<r;o++)n.push("")}let s=this.lines[r];n.push(s.indent+s.content),i=r}return ei(n)}getPrecedingDescription(e){if(e.length===0)return;let t=e[0].number,n=[],i=!1;for(let r=t-1;r>=0;r--){if(this.tagLineNumbers.has(r)||this.indentedContinuationLines.has(r)||this.consumedDescriptionLines.has(r))break;if(this.lineDescriptions.has(r))n.unshift(r),i=!0;else if(i&&!gu(this.lines[r]))break}if(n.length===0)return;for(let r of n)this.consumedDescriptionLines.add(r);return this.trimBodyAbove?.(n[0]),this.joinBlockLines(n)}claimBodyLines(e,t){if(!bE(e)){for(let i=1;i<e.lines.length;i++)this.consumedDescriptionLines.add(e.lines[i].number);return}let n=e.lines[e.lines.length-1].number;this.trimThisBody=(i)=>t(n-i+1)}getTagDescription(e,t,n=!1){let i=rr(e),r=t!==void 0&&EE.has(t.tag)&&!rr(t.lines),s=n&&(t===void 0||!mo.has(t.tag)),a=[];for(let o=1;o<e.length;o++){let l=e[o];if((r||s)&&!this.indentedContinuationLines.has(l.number))continue;if(!this.lineDescriptions.get(l.number)?.trim()||this.consumedDescriptionLines.has(l.number))continue;a.push(l.number),this.consumedDescriptionLines.add(l.number)}if(a.length===0)return i;return this.joinBlockLines(a,{text:i??"",line:e[Or(e)].number})}flagDescriptionAfterEvent(e,t,n,i){let{event:r}=this;if(r===void 0||r.description)return;if(r.tagLine!==void 0&&this.indentedContinuationLines.has(r.tagLine+1))return;if(i?.tag!=="event"&&!mo.has(i?.tag??""))return;if(rr(n))return;let s=t?`@${e} "${t}"`:`@${e}`;D(this.ctx,"event-description-ambiguous",r.name,`Text after @event "${r.name}" was used as the description of ${s}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,Ae(this.ctx,n))}takePrecedingDescription(e){let{tag:t,name:n,lines:i}=this.tags[e],r=this.getPrecedingDescription(i);if(r)this.flagDescriptionAfterEvent(t,n,i,this.tags[e-1]);return r}finalizeEvent(){let{ctx:e,event:t}=this;if(t===void 0)return;this.event=void 0;let i=(t.type&&t.type!=="object"&&t.type!=="Object"?t.type:void 0)??(t.properties.length>0?yn(t.properties,!0):t.type||""),{tagLine:r}=t;if(r!==void 0){let p=this.tags.find((u)=>{let f=u.lines[0]?.number;return f!==void 0&&f>r&&!mo.has(u.tag)})?.lines[0].number,c=Array.from(this.lineDescriptions.keys()).sort((u,f)=>u-f).filter((u)=>u>r&&(p===void 0||u<p)&&!this.consumedDescriptionLines.has(u)&&this.lineDescriptions.get(u)?.trim());for(let u of c)this.consumedDescriptionLines.add(u);if(c.length>0)t.description=this.joinBlockLines(c,t.description?{text:t.description,line:r}:void 0)}let{name:s,description:a,source:o}=t,l=i===""&&(!e.events.has(s)||e.untypedJsDocEventNames.has(s));if(Xe(e,{name:s,detail:i,has_argument:!1,description:a,deprecated:t.deprecated,tags:t.tags.length>0?t.tags:void 0,internal:t.internal||void 0,source:o}),l)e.untypedJsDocEventNames.add(s);e.eventDescriptions.set(s,a),e.jsDocEventNames.add(s),e.jsDocEventSources.set(s,o),Ue(e,"event-no-source",s,t.ignores)}finalizeTypedef(){let{ctx:e,typedef:t}=this;if(t===void 0)return;this.typedef=void 0;let{properties:n}=t,i=n.length>0,r=i?yn(n,!0):t.type||"{}",s=!i&&t.type&&CE(r)?`interface ${t.name} ${r}`:`type ${t.name} = ${r};`,a=i?n.filter(({name:o})=>!o.includes(".")&&!o.startsWith("[")).map(({name:o,type:l,optional:p,description:c})=>({name:o,type:l,optional:p===!0,...c?{description:c}:{}})):Oe(r,{skipIndexSignatures:!0});if(a)e.typedefMembersByName.set(t.name,a);vu(e,t,r,s)}finalizeCallback(){let{callback:e}=this;if(e===void 0)return;this.callback=void 0;let t=`(${ye(e.params)}) => ${e.returnType||"void"}`;vu(this.ctx,e,t,`type ${e.name} = ${t};`)}openTypeDeclaration(e){let{name:t,lines:n}=this.tags[e],i={name:this.typeDeclarationName(t),source:Ae(this.ctx,n),description:this.orCommentDescription(this.getTagDescription(n,this.tags[e+1])||this.takePrecedingDescription(e)),tags:this.pendingTags.splice(0),internal:this.pendingInternal},{tags:r}=i;if(this.pendingDeprecated!==void 0)r.push({name:"deprecated",body:this.pendingDeprecated===!0?"":this.pendingDeprecated}),this.pendingDeprecated=void 0;return this.pendingInternal=!1,this.attachTrailingTag=(s)=>r.push(s),this.isFirstTag=!1,i}readExtends(e,t){let{name:n,lines:i}=this.tags[e];if(this.ctx.extends!==void 0)D(this.ctx,"extend-props-duplicate",n,`A second @extends/@extendProps tag ("${n}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,Ae(this.ctx,i));this.ctx.extends={interface:n,import:gE.test(t)?JSON.stringify(t):t},this.isFirstTag=!1}readRestProps(e,t){let{name:n,description:i}=this.tags[e],r=n?i?`${n} ${i}`:n:i,s=Dt(r),a=this.orCommentDescription(s||this.takePrecedingDescription(e)),o={type:"Element",name:t,description:a||void 0};if(this.ctx.rest_props=o,s)this.claimBodyLines(this.tags[e],(l)=>{o.description=Dt(sr(r,l))||void 0});this.isFirstTag=!1}readSlot(e,t){let{tag:n,name:i,lines:r}=this.tags[e],s=i==="-"||n==="snippet"&&i==="children"?void 0:i,a=this.orCommentDescription(this.getTagDescription(r,this.tags[e+1]));if(!a&&this.pendingTags.length===0)a=this.takePrecedingDescription(e);this.isFirstTag=!1;let o=t||"Record<string, never>",l=Ae(this.ctx,r);if(!t)D(this.ctx,"slot-missing-type",s||"default",`@${n}${s?` "${s}"`:""} is missing a required {Type} annotation; falling back to "${o}".`,l);let p=this.pendingTags.splice(0),c=Qe(s);this.ctx.jsDocSlots.set(c,{tag:n,source:l}),bn(this.ctx,{slot_name:s,slot_props:o,slot_description:a||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:p.length>0?p:void 0,slot_internal:this.pendingInternal||void 0,source:l}),this.pendingDeprecated=void 0,this.pendingInternal=!1,this.typeDeclaration=void 0,this.attachTrailingTag=(u)=>{let f=this.ctx.slots.get(c);if(f)f.tags=[...f.tags??[],u]}}readEvent(e,t){let{name:n,lines:i}=this.tags[e],r=rr(i)||this.takePrecedingDescription(e);this.finalizeEvent();let s=this.pendingTags.splice(0);this.event={name:n,type:t,tagLine:i.length>0?i[0].number:void 0,description:this.orCommentDescription(r),source:Ae(this.ctx,i),tags:s,internal:this.pendingInternal,deprecated:this.pendingDeprecated,ignores:[],properties:[]},this.pendingInternal=!1,this.pendingDeprecated=void 0,this.typeDeclaration=void 0,this.attachTrailingTag=(a)=>s.push(a),this.isFirstTag=!1}readProperty(e,t){let{name:n,optional:i,default:r,lines:s}=this.tags[e],a=this.getTagDescription(s,this.tags[e+1],this.event!==void 0),o=this.event??(this.typedef&&PE(this.typedef.type)?this.typedef:void 0);if(o===void 0)return;_E(this.ctx,o.properties,{name:n,type:t,description:a,optional:i||!1,default:r},o.name,Ae(this.ctx,s))}readTypedef(e,t){this.finalizeTypedef(),this.typedef={...this.openTypeDeclaration(e),type:t,properties:[]},this.typeDeclaration=this.typedef}readCallback(e){this.finalizeCallback(),this.callback={...this.openTypeDeclaration(e),params:[],returnType:void 0},this.typeDeclaration=this.callback}readGenerics(e,t){let{name:n,lines:i}=this.tags[e],r=Ae(this.ctx,i);for(let s of O(n,","))Eu(this.ctx,this.generics,s.trim(),r);this.generics.usedGenericsTag=!0,xu(this.ctx,this.generics),bu(this.ctx,n,t||n),this.isFirstTag=!1}readTemplate(e,t){let{tags:n}=this,i=jr(n[e],t),r=e+1;while(n[r]?.tag==="template")r++;let s=n[r];if((s?.tag==="typedef"||s?.tag==="callback")&&!s.name.includes("<")&&AE(n,r,i)){this.pendingTypeParameters.push(...i.map(({constraint:o})=>o));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...i);return}if(this.documentsFunction)return;let a=Ae(this.ctx,n[e].lines);for(let o of i)Eu(this.ctx,this.generics,o.name,a),bu(this.ctx,o.name,o.constraint);this.generics.usedTemplateTag=!0,xu(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(e){let{text:t}=this.tags[e],{event:n}=this;if(!n&&this.typeDeclaration){let r={name:"deprecated",body:t};this.typeDeclaration.tags.push(r),this.claimBodyLines(this.tags[e],(s)=>{r.body=sr(t,s)});return}if((n?n.deprecated:this.pendingDeprecated)!==void 0)return;let i=(r)=>{if(n)n.deprecated=r;else this.pendingDeprecated=r};i(ni(t)),this.claimBodyLines(this.tags[e],(r)=>{i(ni(sr(t,r)))})}readPassthrough(e){let{tag:t,text:n,lines:i}=this.tags[e],r={name:t,body:n};if(this.claimBodyLines(this.tags[e],(s)=>{r.body=sr(n,s)}),!ti.has(t)&&!Br.has(t)){let s=vE.has(t)?void 0:mu(t,SE,t.length<=4?1:2);D(this.ctx,"jsdoc-unknown-tag",t,s?`Unknown JSDoc tag "@${t}"; did you mean "@${s}"? Passed through unchanged.`:`Unknown JSDoc tag "@${t}"; passed through unchanged. If this is a typo, fix the tag name.`,Ae(this.ctx,i))}if(this.attachTrailingTag)this.attachTrailingTag(r);else this.pendingTags.push(r)}read(){let{tags:e}=this;for(let i=0;i<e.length;i++){let{tag:r,type:s,name:a,optional:o}=e[i],l=we(s);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,r){case"extends":case"extendProps":this.readExtends(i,l);break;case"restProps":this.readRestProps(i,l);break;case"slot":case"snippet":this.readSlot(i,l);break;case"csspart":{let p=this.getTagDescription(e[i].lines,e[i+1]);this.ctx.cssParts.push({name:a,...p?{description:p}:{}});break}case"cssprop":case"cssproperty":{let p=this.getTagDescription(e[i].lines,e[i+1]),c=e[i].default;this.ctx.cssProperties.push({name:a,...l?{type:l}:{},...c===void 0?{}:{default:c},...p?{description:p}:{}});break}case"event":this.readEvent(i,l);break;case"type":if(this.event)this.event.type=l;break;case"param":this.callback?.params.push({name:a,type:l,optional:o||!1});break;case"returns":case"return":if(this.callback)this.callback.returnType=l;break;case"property":this.readProperty(i,l);break;case"typedef":this.readTypedef(i,l);break;case"callback":this.readCallback(i);break;case"generics":this.readGenerics(i,l);break;case"template":this.readTemplate(i,l);break;case"deprecated":this.readDeprecated(i);break;case"ignore":case"internal":if(this.event)this.event.internal=!0;else if(this.typeDeclaration)this.typeDeclaration.internal=!0;else this.pendingInternal=!0;break;case"sveld-ignore":this.event?.ignores.push(a);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(i);break}if(yu.has(r))this.finalizeEvent()}this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback();let t=[...this.pendingTags,...this.pendingDeprecated===void 0?[]:[{name:"deprecated"}],...this.pendingInternal?[{name:"internal"}]:[]];if(t.length===0)return;if(!e.some((i)=>i.tag==="event"||yu.has(i.tag)))return;for(let i of t)D(this.ctx,"jsdoc-tag-dropped",i.name,`@${i.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`)}}function Tu(e,t=e.source){if(!t)return;let n={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},i=t.includes("@template")?sa(e):new Set;e.functionDocCommentStarts=i;let r=Zt(t);for(let s of r)e.jsDocBlocksByStart.set(s.start,s);for(let s of r)new Su(e,n,s,i.has(s.start)).read()}var ku=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]),DE=Array.from(ku);function Cu(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function NE(e){if(e.includes("\\u"))return!0;for(let t of DE){let n=e.indexOf(t);while(n!==-1){if(!Cu(e.charCodeAt(n-1))&&!Cu(e.charCodeAt(n+t.length)))return!0;n=e.indexOf(t,n+1)}}return!1}function $E(e,t){for(let n=t.length-1;n>=0;n-=1)if(t[n]?.has(e))return!0;return!1}function IE(e){let t=new Set;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":if(e.type!=="ArrowFunctionExpression"&&e.id)t.add(e.id.name);for(let n of e.params)Y(n,t);break;case"BlockStatement":or(e.body,t);break;case"CatchClause":Y(e.param,t);break;case"EachBlock":if(Y(e.context,t),e.index)t.add(e.index);break;case"AwaitBlock":Y(e.value,t),Y(e.error,t);break}return t}function or(e,t){for(let n of e??[])switch(n.type){case"ImportDeclaration":for(let i of n.specifiers)t.add(i.local.name);break;case"VariableDeclaration":for(let i of n.declarations)Y(i.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":if(n.id?.name)t.add(n.id.name);break;case"ExportNamedDeclaration":if(n.declaration)or([n.declaration],t);break}}function yo(e,t){if(!e)return!1;let n=[...t],i=!1;return z(e,{enter(r,s){if(li(r.type))return ie;if(Mt(r))n.push(IE(r));if(r.type==="Identifier"&&ku.has(r.name)&&Cr(r,s)&&!$E(r.name,n))return i=!0,Ut},leave(r){if(Mt(r))n.pop()}}),i}function wu(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!NE(e.source))return"legacy";let n=new Set;or(t.module?.content.body,n);let i=new Set;return or(t.instance?.content.body,i),yo(t.module,[n])||yo(t.instance,[n,i])||yo(t.fragment,[n,i])?"runes":"legacy"}var LE=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function RE(e){if(e.type!=="TSAsExpression"&&e.type!=="TSTypeAssertion")return!1;let t="typeAnnotation"in e?e.typeAnnotation:void 0;return t?.type==="TSTypeReference"&&t.typeName.type==="Identifier"&&t.typeName.name==="const"}function ar(e,t){if(!e)return;z(e,{enter(n){if(!LE.has(n.type)||!("expression"in n)||!n.expression)return;let{expression:i}=n;if(typeof i!=="object")return i;let r=t.typeAssertions.get(n);if(t.constAssertions.has(n)||r===void 0&&RE(n))t.constAssertions.add(i);else if(r!==void 0)t.typeAssertions.set(i,r);else if((n.type==="TSAsExpression"||n.type==="TSTypeAssertion")&&"typeAnnotation"in n)t.typeAssertions.set(i,n.typeAnnotation);return i}})}var ME=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function OE(e){if(!e.includes("@ts-"))return e;let t=e.charCodeAt(0)===65279?1:0,{instance:n,module:i}=Fi(e),r=[n,i].flatMap((o)=>o?[o.content]:[]).sort((o,l)=>o.start-l.start),s="",a=0;for(let{start:o,end:l}of r)s+=e.slice(a,o+t),s+=e.slice(o+t,l+t).replace(ME,""),a=l+t;return s+e.slice(a)}function Au(e,t,n){e.componentFilePath=n;let i=OE(t);e.source=i;let r=hu(i);if(pl(e,r),e.parsed=r,e.scriptLanguage==="ts")ar(r.module,e.typeCasts),ar(r.instance,e.typeCasts),ar(r.fragment,e.typeCasts);e.syntaxMode=wu(e);let s=r.css,a=s?i.slice(0,s.start)+" ".repeat(s.end-s.start)+i.slice(s.end):i;Ur(e,r.module),Ur(e,r.instance),Tu(e,a)}class go{ctx=Pr();cleanup(){this.ctx=Pr()}parseSvelteComponent(e,t){let{component:n,pending:i}=this.parse(e,t);if(i)n[$e]={...n[$e]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...i};return n}parse(e,t){this.cleanup();let n=this.ctx;Au(n,e,t.filePath),fu(n);let i=yl(n);return su(n,i)}}var BE=/\.$/,xo="resolving it needs file access (generateBundle or the CLI)";function FE(e,t={}){let n=e[$e];if(!n)return e;let{pendingCallDefaultCandidates:i,pendingConstDefaultCandidates:r,pendingContextKeyCandidates:s,pendingDispatchEscapeCandidates:a,deferredEventNoSourceDiagnostics:o,untypedJsDocEventNames:l,...p}=n,c=(i??[]).filter((v)=>v.importSource!==void 0);if(c.length===0&&!r&&!s&&!a&&!o)return e;let u=e.filePath,f=t.filePath??(typeof u==="string"?u:""),h=[],m=(v,X,he,_e)=>{h.push(Qn({component:f,kind:"cross-file-unresolved",name:v,message:X,...he?{source:he}:{},..._e?{ignored:_e}:{}}))},g=(v,X)=>(v==="props"?e.props:e.moduleExports).find((he)=>he.name===X)?.source,y=(v)=>v==="props"?"Prop":"Module export";for(let v of s??[]){let X=rn(v);m(X,`setContext key \`${X}\` is imported from "${v.importSource}"; ${xo}, so the context is omitted.`,v.source)}for(let v of r??[])m(v.propName,`${y(v.location)} "${v.propName}" defaults to \`${rn(v)}\` imported from "${v.importSource}"; ${xo}, so the default shows the identifier and its type isn't read.`,g(v.location,v.propName));for(let v of c)m(v.propName,`${y(v.location)} "${v.propName}" defaults to \`${v.calleeName}()\` imported from "${v.importSource}"; ${xo}, so its return type isn't read and the prop falls back to "any".`,g(v.location,v.propName));for(let v of a??[])m(v.calleeText,`\`${v.dispatcherName}\` is passed to \`${v.calleeText}\`, imported from "${v.importSource}"; reading the events it dispatches needs file access (generateBundle or the CLI), so they're omitted.`,v.source,v.ignored);let _=Array.from(new Set((a??[]).map((v)=>`\`${v.calleeText}\``))).join(", "),A=(o??[]).map((v)=>_?{...v,message:`${v.message.replace(BE,"")} in this file; ${_} may dispatch it, but imported helpers aren't read without file access.`}:v),R={...e,diagnostics:[...e.diagnostics??[],...A,...h]};return R[$e]=p,R}var _u="sveld",Du="0.40.3";var Eo="5.57.2";var Nu=1;function it(e){return e.some((t)=>t.internal)?e.filter((t)=>!t.internal):e}function qE(e){return{...e,props:it(e.props),moduleExports:it(e.moduleExports),slots:it(e.slots),events:it(e.events),typedefs:it(e.typedefs),...e.contexts?{contexts:it(e.contexts).map((t)=>({...t,properties:it(t.properties)}))}:{}}}function bo(e,t={}){let n=Array.from(e.values(),(s)=>{let{diagnostics:a,...o}=s;return qE(o)}).sort((s,a)=>Re(s.moduleName,a.moduleName)),i={schemaVersion:Nu,generator:{name:_u,version:Du,svelteVersion:Eo},total:n.length,components:n},r=t.entryExports?it(t.entryExports):void 0;if(r&&r.length>0)i.totalExports=r.length,i.exports=r;return i}var VE=" ",GE=120,HE=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/,WE=200,Ru=/\s/,zE=/\s{2}|[^\S ]/,UE=/["'`{}/]/g,KE=/["'`{};/]/g,Mu=9,vo=10,JE=13,Fn=32,pr=34,XE=38,cr=39,YE=40,QE=41,lr=42,$u=46,To=47,Ou=59,ZE=62,eb=91,Co=92,tb=93,ur=96,ko=123,nb=124,wo=125;function ib(e){return HE.test(sb(e,WE))}var Iu=[""];function rb(e){let t=Iu[e];if(t===void 0)t=VE.repeat(e),Iu[e]=t;return t}function sb(e,t){let n="";for(let i=e.length-1;i>=0&&n.length<t;i--)n=e[i]+n;return n.length>t?n.slice(-t):n}function ob(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===vo}function ab(e){while(e.length>0){let t=e[e.length-1],n=t.length;while(n>0){let i=t.charCodeAt(n-1);if(i!==Fn&&i!==Mu)break;n--}if(n===t.length)return;if(n===0){e.pop();continue}e[e.length-1]=t.slice(0,n);return}}function lb(e){while(e.length>0){let t=e[e.length-1];if(!Ru.test(t[t.length-1]))return;let n=t.trimEnd();if(n.length===t.length)return;if(n.length===0){e.pop();continue}e[e.length-1]=n;return}}function pb(e){if(e.includes("{"))return!1;let t=0,n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(t!==0){if(r===t&&e.charCodeAt(i-1)!==Co)t=0;continue}if(r===pr||r===cr||r===ur){t=r;continue}if(r===Ou&&++n>=2)return!0}return!1}function cb(e){if(!zE.test(e))return e.trimEnd();let t="",n=null,i=!1;for(let r=0;r<e.length;r++){let s=e[r],a=e[r-1];if(n){if(t+=s,n==="double"&&s==='"'&&a!=="\\"||n==="single"&&s==="'"&&a!=="\\"||n==="template"&&s==="`"&&a!=="\\")n=null;i=!1;continue}if(s==='"'||s==="'"||s==="`"){n=s==='"'?"double":s==="'"?"single":"template",t+=s,i=!1;continue}if(Ru.test(s)){if(!i&&t.length>0)t+=" ",i=!0;continue}t+=s,i=!1}return t.trimEnd()}function Bu(e,t){let n=e[t],i=e.indexOf(n,t+1);while(i!==-1&&e.charCodeAt(i-1)===Co)i=e.indexOf(n,i+1);return i}function Fu(e,t){let n=e.indexOf("*/",t+1);return n===-1?-1:n+1}function ub(e){let t=new Map,n=[],i=UE,r=0;while(r<e.length){if(i.lastIndex=r,!i.test(e))break;r=i.lastIndex-1;let s=e.charCodeAt(r);if(s===To){if(e.charCodeAt(r+1)===lr){let a=Fu(e,r);if(a===-1)break;r=a}}else if(s===pr||s===cr||s===ur){let a=Bu(e,r);if(a===-1)break;r=a}else if(s===ko)n.push(r);else if(s===wo&&n.length>0)t.set(n.pop(),r);r++}return t}function db(e,t,n){for(let i=t;i<n;i++)if(!So(e.charCodeAt(i)))return!1;return!0}function So(e){if(e<=Fn)return e===Fn||e>=Mu&&e<=JE;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function ju(e,t,n,i){let r=[],s=KE,a=t,o=t;while(o<n){if(s.lastIndex=o,!s.test(e))break;if(o=s.lastIndex-1,o>=n)break;let l=e.charCodeAt(o);if(l===To){if(e.charCodeAt(o+1)===lr){let p=Fu(e,o);if(p===-1)break;o=p}o++;continue}if(l===pr||l===cr||l===ur){let p=Bu(e,o);if(p===-1)break;o=p+1;continue}if(l===ko){let p=i.get(o);if(p===void 0||p>=n){o++;continue}if(a<o)r.push(e.slice(a,o));let c=o+1;if(db(e,c,p)){r.push("{}"),o=p+1,a=o;continue}let u=e.slice(c,p),f=e.charCodeAt(c)===vo;if(!f&&!u.includes("/*")&&!pb(u)&&!ib(r)){let h=ju(e,c,p,i),m=h.trim();if(!m.includes(`
59
+ `)){let g=m.endsWith(";")?m.slice(0,-1):m,y=`{ ${cb(g)} }`;if(y.length<=GE){r.push(y),o=p+1,a=o;continue}}if(r.push("{"),h.charCodeAt(0)!==Ou)r.push(`
60
+ `);if(h.length>0)r.push(h);o=p,a=p;continue}if(r.push("{"),!f)r.push(`
61
+ `);o=c,a=c;continue}if(l===wo){if(a<o)r.push(e.slice(a,o));if(ab(r),!ob(r))r.push(`
62
+ `);r.push("}"),o++,a=o;continue}if(a<o)r.push(e.slice(a,o));if(lb(r),r.push(";"),e.charCodeAt(o+1)!==vo)r.push(`
63
+ `);o++,a=o}if(a<n)r.push(e.slice(a,n));return r.join("")}function fb(e){if(!e.includes(" "))return e;let t="",n=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);if(n!==0){if(t+=e[i],r===n&&e.charCodeAt(i-1)!==Co)n=0;continue}if(r===pr||r===cr||r===ur){n=r,t+=e[i];continue}if(r===Fn&&t.charCodeAt(t.length-1)===Fn)continue;t+=e[i]}return t}function hb(e){return e===wo||e===tb||e===QE||e===ZE}function mb(e,t,n){return n-t>=3&&e.charCodeAt(t)===To&&e.charCodeAt(t+1)===lr&&e.charCodeAt(t+2)===lr}function Lu(e,t,n){let i=e.indexOf("*/",t);return i!==-1&&i+2<=n}function yb(e,t,n){let i=e.charCodeAt(t);if(i===nb||i===XE)return!0;return i===$u&&t+1<n&&e.charCodeAt(t+1)!==$u}function gb(e){let t=[],n=[],i=e.length,r=0,s=!1,a=0,o=0;while(o<=i){let c=e.indexOf(`
64
+ `,o);if(c===-1)c=i;let u=c+1,f=o,h=c;while(f<h&&So(e.charCodeAt(f)))f++;while(h>f&&So(e.charCodeAt(h-1)))h--;if(f===h){let A=n.length>0?n[n.length-1]:void 0;if(A!==void 0&&A!==""){let R=A.charCodeAt(A.length-1);if(R!==ko&&R!==YE&&R!==eb)t.push(0),n.push("")}o=u;continue}if(s){if(t.push(a),n.push(` ${e.slice(f,h)}`),Lu(e,f,h))s=!1;o=u;continue}let m=mb(e,f,h),g=m&&Lu(e,f,h);if(m&&!g){t.push(r),n.push(e.slice(f,h)),s=!0,a=r,o=u;continue}let y=hb(e.charCodeAt(f)),_=Math.max(0,r-(y?1:0))+(yb(e,f,h)?1:0);if(y&&_===0&&n.length>0&&n[n.length-1]==="")t.pop(),n.pop();if(t.push(_),n.push(fb(e.slice(f,h))),o=u,g)continue;r=Jn(e,void 0,f,h,r)}let l=n.length;while(l>0&&n[l-1]==="")l--;let p=[];for(let c=0;c<l;c++){if(c>0)p.push(`
65
+ `);let u=t[c];if(u>0)p.push(rb(u));p.push(n[c])}return p.join("")}function qu(e){return`${gb(ju(e,0,e.length,ub(e)))}
66
+ `}var fe="any",xb="Record<string, any>",jn="Record<string, never>",Uu=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Eb=/CustomEvent/,bb=/^[A-Z]/,vb=/\n/,Sb=/=>/,Tb=/^\s*[(<]/,Cb=/(?:^|\n)@default\b/,kb=/^([ \t]*\*) +$/gm,wb=/[^\S\r\n]*[\r\n]\s*/g,Ab=/(^|[^.\w])Snippet(?:\s*<|\b)/,Pb=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,_b=/^const\s+/,Db=/^export /,Nb=/[^\w$]/g;function Po(e){return e.replace(_b,"")}function Pe(e){if(e.length===0)return"";return`/**
67
67
  * ${Nt(e.join(`
68
68
  * `))}
69
69
  */`}function qn(e){return e?e.split(`
70
- `):[]}function zu(e){if(e===void 0)return[];return(e===!0?"@deprecated":`@deprecated ${e}`).split(`
71
- `)}function wo(e){let t=[];for(let{name:n,body:i}of e??[])if(!i)t.push(`@${n}`);else if(i.includes(`
70
+ `):[]}function Ku(e){if(e===void 0)return[];return(e===!0?"@deprecated":`@deprecated ${e}`).split(`
71
+ `)}function _o(e){let t=[];for(let{name:n,body:i}of e??[])if(!i)t.push(`@${n}`);else if(i.includes(`
72
72
  `))t.push(`@${n}`,...i.split(`
73
- `));else t.push(`@${n} ${i}`);return t}function Ht(e,t,n){return[...qn(e),...zu(t),...wo(n)]}function Uu(e){if(!e)return"";return`/** ${Nt(e)} */`}function Ao(e){return e?.includes(`
74
- `)?Pe(qn(e)):Uu(e)}function Po(e,t,n){let i=[...wo(t),...zu(n)];if(i.length===0)return Ao(e);return Pe([...qn(e),...i])}function Ku(e){if(e===void 0)return fe;return`${e}
75
- `}function ur(e){if(e.typedefs.length===0)return"";return e.typedefs.map((t)=>{let n=Pe([...qn(t.description),...wo(t.tags)]);return`${n?`${n}
76
- `:""}export ${t.ts}`.replace(Cb,"$1")}).join(`
73
+ `));else t.push(`@${n} ${i}`);return t}function Ht(e,t,n){return[...qn(e),...Ku(t),..._o(n)]}function Ju(e){if(!e)return"";return`/** ${Nt(e)} */`}function Do(e){return e?.includes(`
74
+ `)?Pe(qn(e)):Ju(e)}function No(e,t,n){let i=[..._o(t),...Ku(n)];if(i.length===0)return Do(e);return Pe([...qn(e),...i])}function Xu(e){if(e===void 0)return fe;return`${e}
75
+ `}function fr(e){if(e.typedefs.length===0)return"";return e.typedefs.map((t)=>{let n=Pe([...qn(t.description),..._o(t.tags)]);return`${n?`${n}
76
+ `:""}export ${t.ts}`.replace(kb,"$1")}).join(`
77
77
 
78
- `)}var Fu=new Map;function Nb(e,t){let n=Fu.get(t);if(n===void 0)n=new RegExp(`\\b${en(t)}\\b`),Fu.set(t,n);return n.test(e)}var ju,qu=[];function Ju(e){if(e!==ju)ju=e,qu=B(e,",");return qu}function $b(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(Ju(e[1]??"")[n]??t).trim()}))}function Xu(e,t){let n=$b(e).filter(({name:i})=>Nb(t,i));if(n.length===0)return{declSuffix:"",refSuffix:""};return{declSuffix:`<${n.map(({constraint:i})=>Wu(i)).join(", ")}>`,refSuffix:`<${n.map(({name:i})=>i).join(", ")}>`}}function Yu(e){if(!e.contexts||e.contexts.length===0)return"";return e.contexts.map((t)=>{let n=t.properties.map((l)=>{let o=l.description?`${Ao(l.description)}
79
- `:"",a=l.optional?"?":"";return`${o}${Te(l.name)}${a}: ${l.type};`}).join(`
78
+ `)}var Vu=new Map;function $b(e,t){let n=Vu.get(t);if(n===void 0)n=new RegExp(`\\b${en(t)}\\b`),Vu.set(t,n);return n.test(e)}var Gu,Hu=[];function dr(e){if(e!==Gu)Gu=e,Hu=O(e,",");return Hu}function Ib(e){if(e===null)return[];return e[0].split(",").map((t,n)=>({name:t.trim(),constraint:(dr(e[1]??"")[n]??t).trim()}))}function Yu(e,t){let n=Ib(e).filter(({name:i})=>$b(t,i));if(n.length===0)return{declSuffix:"",refSuffix:""};return{declSuffix:`<${n.map(({constraint:i})=>Po(i)).join(", ")}>`,refSuffix:`<${n.map(({name:i})=>i).join(", ")}>`}}function Qu(e){if(!e.contexts||e.contexts.length===0)return"";return e.contexts.map((t)=>{let n=t.properties.map((a)=>{let o=a.description?`${Do(a.description)}
79
+ `:"",l=a.optional?"?":"";return`${o}${Te(a.name)}${l}: ${a.type};`}).join(`
80
80
  `),i=t.description?`${Pe(qn(t.description))}
81
- `:"",{declSuffix:r}=Xu(e.generics,[t.type??"",...t.properties.map((l)=>l.type)].join(`
81
+ `:"",{declSuffix:r}=Yu(e.generics,[t.type??"",...t.properties.map((a)=>a.type)].join(`
82
82
  `));if(t.type!==void 0)return`${i}export type ${t.typeName}${r} = ${t.type};`;if(t.properties.length===0)return`${i}export type ${t.typeName} = ${t.hasUnresolvedSpread?"Record<string, any>":jn};`;let s=t.hasUnresolvedSpread?" & Record<string, any>":"";return`${i}export type ${t.typeName}${r} = {
83
83
  ${n}
84
84
  }${s};`}).join(`
85
85
 
86
- `)}function Te(e){return Hu.test(e)?e:JSON.stringify(e)}function Vu(e,t){let n=Po(t.description,t.tags,t.deprecated),i=n?`${n}
87
- `:"",r=!t.slot_props||t.slot_props===jn?"[]":Lb(t.slot_props),s=r==="[]"?"(this: void) => void":`(this: void, ...args: ${r}) => void`;return`
88
- ${i}${e}?: ${s};`}function Ib(e){let t=e.props.filter((S)=>!dr(S)),n=new Set([...t.map((S)=>S.name),...Array.from(e.canonicalPropNames??[])]),r=(e.canonicalPropsType?t.filter((S)=>!e.canonicalPropNames?.has(S.name)):t).map((S)=>{let je=typeof S.value==="string"?S.value.replace(kb," "):S.value,st=Tb.test(S.description??"")||S.value===void 0||S.value==="undefined",Gn=Pe([...Ht(S.description,S.deprecated,S.tags),...S.constant?["@constant"]:[],...st?[]:[`@default ${je}`]]),Hn=S.constant&&!S.isFunction?S.value:S.type||fe;return`
89
- ${Gn}
90
- ${Te(S.name)}${S.isRequired?"":"?"}: ${Hn};`});for(let S of e.slots)if(!S.default&&S.name!=null&&!n.has(S.name))r.push(Vu(Te(S.name),S));let s=e.slots.find((S)=>S.default||S.name===null);if(s&&!n.has("children"))r.push(Vu("children",s));let l=r.join(`
91
- `),o=Qb(e.moduleName),a=e.generics?`<${Ju(e.generics[1]).map((S)=>Wu(S.trim())).join(", ")}>`:"",p=e.generics?`<${e.generics[0]}>`:"",u=`${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${p}> & `}$Props${p}`,f=(S)=>`export type ${o}${a} = ${S};`,h=`{${l}
92
- }`;if(e.rest_props?.type!=="Element"){let S;if(e.canonicalPropsType){let je=l.trim()===""?"":` & ${h}`;S=[`type $Props${a} = ${e.canonicalPropsType}${je};`,f(u)]}else if(l.trim()==="")S=[f(e.extends?.interface??jn)];else if(e.extends===void 0)S=[f(h)];else S=[`type $Props${a} = ${h};`,f(u)];return{props_name:o,prop_def:S.join(`
86
+ `)}function Te(e){return Uu.test(e)?e:JSON.stringify(e)}function Wu(e,t){let n=No(t.description,t.tags,t.deprecated),i=n?`${n}
87
+ `:"",r=!t.slot_props||t.slot_props===jn?"[]":Mb(t.slot_props),s=r==="[]"?"(this: void) => void":`(this: void, ...args: ${r}) => void`;return`
88
+ ${i}${e}?: ${s};`}function Lb(e){let t=e.props.filter((S)=>!hr(S)),n=new Set([...t.map((S)=>S.name),...Array.from(e.canonicalPropNames??[])]),r=(e.canonicalPropsType?t.filter((S)=>!e.canonicalPropNames?.has(S.name)):t).map((S)=>{let Ne=typeof S.value==="string"?S.value.replace(wb," "):S.value,Gn=Cb.test(S.description??"")||S.value===void 0||S.value==="undefined",Hn=Pe([...Ht(S.description,S.deprecated,S.tags),...S.constant?["@constant"]:[],...Gn?[]:[`@default ${Ne}`]]),Wn=S.constant&&!S.isFunction?S.value:S.type||fe;return`
89
+ ${Hn}
90
+ ${Te(S.name)}${S.isRequired?"":"?"}: ${Wn};`});for(let S of e.slots)if(!S.default&&S.name!=null&&!n.has(S.name))r.push(Wu(Te(S.name),S));let s=e.slots.find((S)=>S.default||S.name===null);if(s&&!n.has("children"))r.push(Wu("children",s));let a=r.join(`
91
+ `),o=ev(e.moduleName),l=e.generics?`<${dr(e.generics[1]).map((S)=>Po(S.trim())).join(", ")}>`:"",p=e.generics?`<${e.generics[0]}>`:"",u=`${e.extends===void 0?"":`Omit<${e.extends.interface}, keyof $Props${p}> & `}$Props${p}`,f=(S)=>`export type ${o}${l} = ${S};`,h=`{${a}
92
+ }`;if(e.rest_props?.type!=="Element"){let S;if(e.canonicalPropsType){let Ne=a.trim()===""?"":` & ${h}`;S=[`type $Props${l} = ${e.canonicalPropsType}${Ne};`,f(u)]}else if(a.trim()==="")S=[f(e.extends?.interface??jn)];else if(e.extends===void 0)S=[f(h)];else S=[`type $Props${l} = ${h};`,f(u)];return{props_name:o,prop_def:S.join(`
93
93
 
94
- `),elementsImport:void 0}}let{name:m,thisValue:x,thisType:y,description:_}=e.rest_props,A;if(m!=="svelte:element")A=m.split("|").map((S)=>`SvelteHTMLElements["${S.trim()}"]`).join(" & ");else if(x)A=`SvelteHTMLElements["${x}"]`;else if(y)A=`NoInfer<SvelteHTMLElements[${y}]>`;else A="HTMLAttributes<HTMLElement>";let R="[key: `data-${string}`]: unknown;",v=_?`${Ao(_)}
95
- `:"",X=e.canonicalPropsType?`(${e.canonicalPropsType}) & `:"",he=y?{name:a,ref:p}:{name:"",ref:""},_e=e.extends===void 0?`keyof $Props${p}`:`keyof ($Props${p} & ${e.extends.interface})`,rt=`Omit<$RestProps${he.ref}, ${_e}>`,Tt=y?`(${y} extends any ? ${rt} : never)`:rt;return{props_name:o,prop_def:[`${v}type $RestProps${he.name} = ${A};`,`type $Props${a} = ${X}{${l}
94
+ `),elementsImport:void 0}}let{name:m,thisValue:g,thisType:y,description:_}=e.rest_props,A;if(m!=="svelte:element")A=m.split("|").map((S)=>`SvelteHTMLElements["${S.trim()}"]`).join(" & ");else if(g)A=`SvelteHTMLElements["${g}"]`;else if(y)A=`NoInfer<SvelteHTMLElements[${y}]>`;else A="HTMLAttributes<HTMLElement>";let R="[key: `data-${string}`]: unknown;",v=_?`${Do(_)}
95
+ `:"",X=e.canonicalPropsType?`(${e.canonicalPropsType}) & `:"",he=y?{name:l,ref:p}:{name:"",ref:""},_e=e.extends===void 0?`keyof $Props${p}`:`keyof ($Props${p} & ${e.extends.interface})`,St=`Omit<$RestProps${he.ref}, ${_e}>`,De=y?Rb(y,e.generics,e.extends?.interface):void 0,Tt=De?De.ref:St;return{props_name:o,prop_def:[`${v}type $RestProps${he.name} = ${A};`,...De?[De.declaration]:[],`type $Props${l} = ${X}{${a}
96
96
 
97
97
  ${R}
98
98
  };`,f(`${Tt} & ${u}`)].join(`
99
99
 
100
- `),elementsImport:A.startsWith("HTMLAttributes")?"HTMLAttributes":"SvelteHTMLElements"}}function Lb(e){return kr(e)?e:`[${e}]`}function Rb(e){let t=e.slots.filter((i)=>!kr(i.slot_props??""));if(t.length===0)return jn;let n=t.map(({name:i,slot_props:r,...s})=>{let l=s.default||i===null?"default":Te(i??""),o=Po(s.description,s.tags,s.deprecated);return`${o?`${o}
101
- `:""}${l}: ${Ku(r)};`}).join(`
100
+ `),elementsImport:A.startsWith("HTMLAttributes")?"HTMLAttributes":"SvelteHTMLElements"}}function Rb(e,t,n){if(!t)return;let i=dr(t[0]).map((m)=>m.trim()),r=dr(t[1]).map((m)=>Po(m.trim())),s=i.indexOf(e),a=r[s];if(s===-1||!a?.startsWith(`${e} extends `))return;let o=O(a.slice(`${e} extends `.length),"=")[0]?.trim();if(!o)return;let l=i.filter((m,g)=>g!==s),p=r.filter((m,g)=>g!==s),c=p.length>0?`<${p.join(", ")}>`:"",u=l.length>0?`<${l.join(", ")}>`:"",f=`<${i.map((m)=>m===e?"$Tag":m).join(", ")}>`,h=n===void 0?`keyof $Props${f}`:`keyof ($Props${f} & ${n})`;return{declaration:`type $Elements${c} = { [$Tag in ${o}]: Omit<$RestProps${f}, ${h}> };`,ref:`$Elements${u}[${e}]`}}function Mb(e){return Ar(e)?e:`[${e}]`}function Ob(e){let t=e.slots.filter((i)=>!Ar(i.slot_props??""));if(t.length===0)return jn;let n=t.map(({name:i,slot_props:r,...s})=>{let a=s.default||i===null?"default":Te(i??""),o=No(s.description,s.tags,s.deprecated);return`${o?`${o}
101
+ `:""}${a}: ${Xu(r)};`}).join(`
102
102
  `);return t.length===1?`{${n}}`:`{
103
103
  ${n}
104
- }`}var Mb=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function ko(e=fe){if(xb.test(e))return e;return`CustomEvent<${e}>`}function Ob(e){switch(e.type){case"dispatched":return ko(e.detail);case"forwarded":{let t=e.element,n=t&&Eb.test(t),i=!n||Mb.has(e.name);if(e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&i&&!n))return ko(e.detail);if(!i)return ko();return`${t==="svelte:document"?"DocumentEventMap":"WindowEventMap"}["${e.name}"]`}default:return e}}function Gu(e){if(e.events.length===0)return gb;let t=e.events.map((n)=>{let i=Po(n.description,n.tags,n.deprecated);return`${i?`${i}
105
- `:""}${Te(n.name)}: ${Ob(n)};
104
+ }`}var Bb=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function Ao(e=fe){if(Eb.test(e))return e;return`CustomEvent<${e}>`}function Fb(e){switch(e.type){case"dispatched":return Ao(e.detail);case"forwarded":{let t=e.element,n=t&&bb.test(t),i=!n||Bb.has(e.name);if(e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&i&&!n))return Ao(e.detail);if(!i)return Ao();return`${t==="svelte:document"?"DocumentEventMap":"WindowEventMap"}["${e.name}"]`}default:return e}}function zu(e){if(e.events.length===0)return xb;let t=e.events.map((n)=>{let i=No(n.description,n.tags,n.deprecated);return`${i?`${i}
105
+ `:""}${Te(n.name)}: ${Fb(n)};
106
106
  `}).join("");return e.events.length===1?`{${t}}`:`{
107
- ${t}}`}function Bb(e){let t=e.type==="() => any";if(e.type&&vb.test(e.type)&&!t)return e.type;if(e.params&&e.params.length>0)return`(${ye(e.params)}) => ${e.returnType||fe}`;if(e.returnType)return`() => ${e.returnType}`;return e.type||fe}function dr(e){return e.isFunctionDeclaration===!0||e.kind==="const"}function Qu(e){return e.props.filter(dr).map((t)=>`
107
+ ${t}}`}function jb(e){let t=e.type==="() => any";if(e.type&&Sb.test(e.type)&&!t)return e.type;if(e.params&&e.params.length>0)return`(${ye(e.params)}) => ${e.returnType||fe}`;if(e.returnType)return`() => ${e.returnType}`;return e.type||fe}function hr(e){return e.isFunctionDeclaration===!0||e.kind==="const"}function Zu(e){return e.props.filter(hr).map((t)=>`
108
108
  ${Pe(Ht(t.description,t.deprecated,t.tags))}
109
- ${Te(t.name)}: ${Bb(t)};`).join(`
110
- `)}function Fb(e){let t=Zb(e.moduleName),n=Qu({props:e.props});if(n.trim()==="")return{exports_ref:t,exports_def:`export type ${t} = ${jn};`};let{declSuffix:i,refSuffix:r}=Xu(e.generics,n);return{exports_ref:`${t}${r}`,exports_def:`export type ${t}${i} = {${n}
111
- };`}}function jb(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length>0?t.join(" | "):'""'}function Zu(e){return e==="default"?"$$Component":e}function qb(e){let t=Zu(e.moduleName);return`declare const ${t}: Component<
109
+ ${Te(t.name)}: ${jb(t)};`).join(`
110
+ `)}function qb(e){let t=tv(e.moduleName),n=Zu({props:e.props});if(n.trim()==="")return{exports_ref:t,exports_def:`export type ${t} = ${jn};`};let{declSuffix:i,refSuffix:r}=Yu(e.generics,n);return{exports_ref:`${t}${r}`,exports_def:`export type ${t}${i} = {${n}
111
+ };`}}function Vb(e){let t=e.props.filter((n)=>n.bindable===!0||n.binding==="writable").map((n)=>JSON.stringify(n.name));return t.length>0?t.join(" | "):'""'}function ed(e){return e==="default"?"$$Component":e}function Gb(e){let t=ed(e.moduleName);return`declare const ${t}: Component<
112
112
  ${e.propsRef},
113
113
  ${e.exportsRef},
114
114
  ${e.bindings}
115
115
  >;
116
- export default ${t};`}function Vb(e){let t=Zu(e.moduleName),n=`${t}Component`,i=e.eventsRef?`$on?<K extends keyof ${e.eventsRef} & string>(type: K, callback: (e: ${e.eventsRef}[K]) => void): () => void;`:"$on?(type: string, callback: (e: any) => void): () => void;";return`interface ${n} {
116
+ export default ${t};`}function Hb(e){let t=ed(e.moduleName),n=`${t}Component`,i=e.eventsRef?`$on?<K extends keyof ${e.eventsRef} & string>(type: K, callback: (e: ${e.eventsRef}[K]) => void): () => void;`:"$on?(type: string, callback: (e: any) => void): () => void;";return`interface ${n} {
117
117
  new ${e.generic}(
118
118
  options: ComponentConstructorOptions<${e.propsRef}>
119
119
  ): SvelteComponent<${e.propsRef}${e.eventsRef?`, ${e.eventsRef}`:""}> & ${e.exportsRef};
@@ -129,83 +129,84 @@ ${t}}`}function Bb(e){let t=e.type==="() => any";if(e.type&&vb.test(e.type)&&!t)
129
129
  z_$$bindings?: ${e.bindings};
130
130
  }
131
131
  declare const ${t}: ${n};
132
- export default ${t};`}function Gb(e){if(e.extends===void 0)return"";return`import type { ${Hb(e.extends.interface)} } from ${e.extends.import};`}function Hb(e){let t=e.indexOf("<");return(t===-1?e:e.slice(0,t)).trim()}function Wb(e){if(!e.componentComment)return"";if(!bb.test(e.componentComment))return Uu(e.componentComment.trim());return`/*${Nt(e.componentComment).split(`
132
+ export default ${t};`}function Wb(e){if(e.extends===void 0)return"";return`import type { ${zb(e.extends.interface)} } from ${e.extends.import};`}function zb(e){let t=e.indexOf("<");return(t===-1?e:e.slice(0,t)).trim()}function Ub(e){if(!e.componentComment)return"";if(!vb.test(e.componentComment))return Ju(e.componentComment.trim());return`/*${Nt(e.componentComment).split(`
133
133
  `).map((t)=>`* ${t}`).join(`
134
134
  `)}
135
- */`}function zb(e){let t=[],n=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:r,imported:s}=i.reExport,l=Pe(Ht(i.description,i.deprecated,i.tags)),o=Te(i.name);if(s==="*"){let c=i.name==="*"?"*":`* as ${o}`;t.push(`${l}
136
- export ${c} from ${JSON.stringify(r)};`);continue}let a=`${r}\x00${l}`,p=n.get(a);if(!p)p={comment:l,from:r,specifiers:[]},n.set(a,p),t.push(a);p.specifiers.push(s===i.name?o:`${Te(s)} as ${o}`)}return t.map((i)=>{let r=n.get(i);if(!r)return i;return`${r.comment}
135
+ */`}function Kb(e){let t=[],n=new Map;for(let i of e.moduleExports){if(i.kind!=="re-export"||!i.reExport)continue;let{from:r,imported:s}=i.reExport,a=Pe(Ht(i.description,i.deprecated,i.tags)),o=Te(i.name);if(s==="*"){let c=i.name==="*"?"*":`* as ${o}`;t.push(`${a}
136
+ export ${c} from ${JSON.stringify(r)};`);continue}let l=`${r}\x00${a}`,p=n.get(l);if(!p)p={comment:a,from:r,specifiers:[]},n.set(l,p),t.push(l);p.specifiers.push(s===i.name?o:`${Te(s)} as ${o}`)}return t.map((i)=>{let r=n.get(i);if(!r)return i;return`${r.comment}
137
137
  export { ${r.specifiers.join(", ")} } from ${JSON.stringify(r.from)};`}).join(`
138
138
 
139
- `)}function _o(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${Te(e.name)}${n}: ${e.type??fe}`;if(e.kind==="index")return`${t}${e.name}: ${e.type??fe}`;let i=ye(e.params??[]);if(e.kind==="constructor")return`constructor(${i})`;let r=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${Te(e.name)}${n}${r}(${i}): ${e.returnType??fe}`}function Ub(e,t){let n=e.localName??e.name,i=n!==e.name,r=`export { ${n}${i?` as ${Te(e.name)}`:""} };`;if(t.has(n))return r;t.add(n);let s=e.typeParameters?`<${e.typeParameters}>`:"",l=(e.members??[]).map((c)=>[Pe(Ht(c.description,c.deprecated,c.tags)),`${_o(c)};`].filter(Boolean).join(`
139
+ `)}function $o(e){let t=[e.static?"static ":"",e.abstract?"abstract ":"",e.readonly?"readonly ":""].join(""),n=e.optional?"?":"";if(e.kind==="property")return`${t}${Te(e.name)}${n}: ${e.type??fe}`;if(e.kind==="index")return`${t}${e.name}: ${e.type??fe}`;let i=ye(e.params??[]);if(e.kind==="constructor")return`constructor(${i})`;let r=e.typeParameters?`<${e.typeParameters}>`:"";return`${t}${Te(e.name)}${n}${r}(${i}): ${e.returnType??fe}`}function Jb(e,t){let n=e.localName??e.name,i=n!==e.name,r=`export { ${n}${i?` as ${Te(e.name)}`:""} };`;if(t.has(n))return r;t.add(n);let s=e.typeParameters?`<${e.typeParameters}>`:"",a=(e.members??[]).map((c)=>[Pe(Ht(c.description,c.deprecated,c.tags)),`${$o(c)};`].filter(Boolean).join(`
140
140
  `)).join(`
141
141
 
142
- `),o=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,a=`${i?"":"export "}declare ${e.abstract?"abstract ":""}class ${n}${s}${o}`;return`
143
- ${[Pe(Ht(e.description,e.deprecated,e.tags)),l?`${a} {
144
- ${l}
145
- }`:`${a} {}`,i?r:""].filter(Boolean).join(`
146
- `)}`}function Kb(e){let t=zb(e),n=new Set,i=e.moduleExports.filter((r)=>r.kind!=="re-export").map((r)=>{if(r.kind==="class")return Ub(r,n);let s=!Hu.test(r.name),l=s?{...r,name:Jb(r.name)}:r,o,a=l.type&&Sb.test(l.type)?_t(l.type):-1,p=l.typeParameters?`<${l.typeParameters}>`:"";if(l.kind==="const"&&a===-1)o=`export declare const ${l.name}: ${l.type||fe};
147
- `;else if(l.kind==="let")o=`export declare let ${l.name}: ${l.type||fe};`;else if(l.params&&l.params.length>0)o=`export declare function ${l.name}${p}(${ye(l.params)}): ${l.returnType||fe};`;else if(l.returnType)o=`export declare function ${l.name}${p}(): ${l.returnType};`;else if(l.type&&a!==-1){let c=l.type.slice(0,a).trimEnd(),u=l.type.slice(a+2).trim();o=`export declare function ${l.name}${c}: ${u};`}else o=`export declare let ${l.name}: ${l.type||fe};`;if(s)o=`${o.replace(_b,"").trimEnd()}
148
- export { ${l.name} as ${JSON.stringify(r.name)} };`;return`
149
- ${Pe(Ht(l.description,l.deprecated,l.tags))}
142
+ `),o=`${e.extends?` extends ${e.extends}`:""}${e.implements?.length?` implements ${e.implements.join(", ")}`:""}`,l=`${i?"":"export "}declare ${e.abstract?"abstract ":""}class ${n}${s}${o}`;return`
143
+ ${[Pe(Ht(e.description,e.deprecated,e.tags)),a?`${l} {
144
+ ${a}
145
+ }`:`${l} {}`,i?r:""].filter(Boolean).join(`
146
+ `)}`}function Xb(e){let t=Kb(e),n=new Set,i=e.moduleExports.filter((r)=>r.kind!=="re-export").map((r)=>{if(r.kind==="class")return Jb(r,n);let s=!Uu.test(r.name),a=s?{...r,name:Yb(r.name)}:r,o,l=a.type&&Tb.test(a.type)?_t(a.type):-1,p=a.typeParameters?`<${a.typeParameters}>`:"";if(a.kind==="const"&&l===-1)o=`export declare const ${a.name}: ${a.type||fe};
147
+ `;else if(a.kind==="let")o=`export declare let ${a.name}: ${a.type||fe};`;else if(a.params&&a.params.length>0)o=`export declare function ${a.name}${p}(${ye(a.params)}): ${a.returnType||fe};`;else if(a.returnType)o=`export declare function ${a.name}${p}(): ${a.returnType};`;else if(a.type&&l!==-1){let c=a.type.slice(0,l).trimEnd(),u=a.type.slice(l+2).trim();o=`export declare function ${a.name}${c}: ${u};`}else o=`export declare let ${a.name}: ${a.type||fe};`;if(s)o=`${o.replace(Db,"").trimEnd()}
148
+ export { ${a.name} as ${JSON.stringify(r.name)} };`;return`
149
+ ${Pe(Ht(a.description,a.deprecated,a.tags))}
150
150
  ${o}`}).join(`
151
151
  `);return[t,i].filter(Boolean).join(`
152
152
 
153
- `)}function Jb(e){return`__export_${e.replace(Db,"_")}`}var Xb=120;function Yb(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,i=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&i.every((r)=>!r.includes(`
154
- `))){let r=`${n}${i.join(", ")}> {}`;if(r.length<=Xb)return r}return`${n}
153
+ `)}function Yb(e){return`__export_${e.replace(Nb,"_")}`}var Qb=120;function Zb(e){let n=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,i=[e.genericProps,e.events,e.slots],s=[e.ownConstructor?`constructor(options: ComponentConstructorOptions<${e.genericProps}>);`:"",e.accessors.trim()].filter(Boolean).join(`
154
+ `);if(s===""&&i.every((a)=>!a.includes(`
155
+ `))){let a=`${n}${i.join(", ")}> {}`;if(a.length<=Qb)return a}return`${n}
155
156
  ${e.genericProps},
156
157
  ${e.events},
157
158
  ${e.slots}
158
159
  > {
159
- ${e.accessors}
160
- }`}function Qb(e){return`${e}Props`}function Zb(e){return`${e}Exports`}function ev(e,t){let n=Oo(e),{moduleName:i,typedefs:r,generics:s,props:l,moduleExports:o,slots:a,events:p,rest_props:c,extends:u,componentComment:f,contexts:h}=e,m=t?.format==="component",x=s!==null,{props_name:y,prop_def:_,elementsImport:A}=Ib({moduleName:i,props:l,rest_props:c,extends:u,generics:s,slots:a,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType}),R=s?`<${s[1]}>`:"",v=s?`${y}<${s[0]}>`:y,X=m&&p.length>0?`type $Events${R} = ${Gu({events:p})};`:"",he=s?`$Events<${s[0]}>`:"$Events",_e=m&&(x||X!==""),rt=Kb({moduleExports:o}),Tt=ur({typedefs:r}),S=Yu({contexts:h,generics:s}),je=(n?.typeImportStatements??[]).join(`
161
- `),st=[...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
160
+ ${s}
161
+ }`}function ev(e){return`${e}Props`}function tv(e){return`${e}Exports`}function nv(e,t){let n=jo(e),{moduleName:i,typedefs:r,generics:s,props:a,moduleExports:o,slots:l,events:p,rest_props:c,extends:u,componentComment:f,contexts:h}=e,m=t?.format==="component",g=s!==null,{props_name:y,prop_def:_,elementsImport:A}=Lb({moduleName:i,props:a,rest_props:c,extends:u,generics:s,slots:l,canonicalPropNames:new Set(n?.canonicalPropNames??[]),canonicalPropsType:n?.canonicalPropsType}),R=s?`<${s[1]}>`:"",v=s?`${y}<${s[0]}>`:y,X=m&&p.length>0?`type $Events${R} = ${zu({events:p})};`:"",he=s?`$Events<${s[0]}>`:"$Events",_e=m&&(g||X!==""),St=Xb({moduleExports:o}),De=fr({typedefs:r}),Tt=Qu({contexts:h,generics:s}),S=(n?.typeImportStatements??[]).join(`
162
+ `),Ne=[...n?.localTypeDeclarations??[],...n?.moduleTypeDeclarations??[]].join(`
162
163
 
163
- `),{exports_ref:Gn,exports_def:Hn}=m?Fb({props:l,moduleName:i,generics:s}):{exports_ref:"",exports_def:""},Ro=m?jb({props:l}):"",mr=!Ab.test(je)&&[_,rt,Tt,S,st,Hn].some((yr)=>wb.test(yr)),gd=[m?_e?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${mr?", Snippet":""} } from "svelte";`:`import type { Component${mr?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${mr?", type Snippet":""} } from "svelte";`,A?`import type { ${A} } from "svelte/elements";`:"",je,Gb({extends:u})].filter(Boolean).join(`
164
- `),xd=m?_e?Vb({moduleName:i,generic:R,propsRef:v,exportsRef:Gn,bindings:Ro,...X?{eventsRef:he}:{}}):qb({moduleName:i,propsRef:v,exportsRef:Gn,bindings:Ro}):Yb({moduleName:i,generic:R,genericProps:v,events:Gu({events:p}),slots:Rb({slots:a}),accessors:Qu({props:l})}),Ed=[rt,Tt,st,S,_,Hn,X,[Wb({componentComment:f}),xd].filter(Boolean).join(`
165
- `)].map((yr)=>yr.trim()).filter(Boolean).join(`
164
+ `),{exports_ref:Gn,exports_def:Hn}=m?qb({props:a,moduleName:i,generics:s}):{exports_ref:"",exports_def:""},Wn=m?Vb({props:a}):"",Bo=c?.type==="Element"&&c.thisType!==void 0,gr=!Pb.test(S)&&[_,St,De,Tt,Ne,Hn].some((xr)=>Ab.test(xr)),xd=[m?_e?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${gr?", Snippet":""} } from "svelte";`:`import type { Component${gr?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${Bo?", type ComponentConstructorOptions":""}${gr?", type Snippet":""} } from "svelte";`,A?`import type { ${A} } from "svelte/elements";`:"",S,Wb({extends:u})].filter(Boolean).join(`
165
+ `),Ed=m?_e?Hb({moduleName:i,generic:R,propsRef:v,exportsRef:Gn,bindings:Wn,...X?{eventsRef:he}:{}}):Gb({moduleName:i,propsRef:v,exportsRef:Gn,bindings:Wn}):Zb({moduleName:i,generic:R,genericProps:v,events:zu({events:p}),slots:Ob({slots:l}),accessors:Zu({props:a}),ownConstructor:Bo}),bd=[St,De,Ne,Tt,_,Hn,X,[Ub({componentComment:f}),Ed].filter(Boolean).join(`
166
+ `)].map((xr)=>xr.trim()).filter(Boolean).join(`
166
167
 
167
- `);return Bu([gd,Ed].filter(Boolean).join(`
168
+ `);return qu([xd,bd].filter(Boolean).join(`
168
169
 
169
- `))}var ed=/`/g,td=/\s+/g,it="--",nd=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
170
+ `))}var td=/`/g,nd=/\s+/g,rt="--",id=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
170
171
  | :- | :- | :- | :- | :- | :- | :- | :- |
171
- `,id=`| Slot name | Default | Props | Fallback | Description |
172
+ `,rd=`| Slot name | Default | Props | Fallback | Description |
172
173
  | :- | :- | :- | :- | :- |
173
- `,rd=`| Event name | Type | Detail | Description |
174
+ `,sd=`| Event name | Type | Detail | Description |
174
175
  | :- | :- | :- | :- |
175
- `,Do=`| Name | Kind | Type | Description |
176
+ `,Io=`| Name | Kind | Type | Description |
176
177
  | :- | :- | :- | :- |
177
- `,tv=`| Member | Signature | Description |
178
+ `,iv=`| Member | Signature | Description |
178
179
  | :- | :- | :- |
179
- `,sd=`| Part name | Description |
180
+ `,od=`| Part name | Description |
180
181
  | :- | :- |
181
- `,od=`| Property name | Type | Default value | Description |
182
+ `,ad=`| Property name | Type | Default value | Description |
182
183
  | :- | :- | :- | :- |
183
- `,ad=/\|/g,nv=/</g,iv=/>/g,fr=/\n/g,rv=/^[A-Za-z_$][\w$]*$/,sv=/\s*\n\s*/g,ov=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,av=/[&<|`*\\_]/;function No(e){if(!av.test(e))return e;return e.replace(ov,(t)=>t==="&"?"&amp;":t==="<"?"&lt;":t==="_"?"&#95;":`&#${t.charCodeAt(0)};`)}function lv(e){return`<code>${No(e.includes(`
184
- `)?e.replace(sv," "):e)}</code>`}var pv=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function cv(e){if(!e.includes("{@link"))return e;return e.replace(pv,(t,n,i)=>`[${i===void 0?n:i.trim()}](${n})`)}function uv(e){return e.includes("```")||e.includes("~~~")}function dv(e){return ud(cv(e))}var fv=/^([ \t]*)(`{3,}|~{3,})(.*)$/,hv=/^\n/,mv=/\n$/;function ld(e){let t=(s)=>({kind:"prose",text:dv(s.join(`
185
- `))});if(!uv(e))return[t([e])];let n=e.split(`
186
- `),i=[],r=[];for(let s=0;s<n.length;s++){let l=fv.exec(n[s]),[,o="",a="",p=""]=l??[];if(!l||a[0]==="`"&&p.includes("`")){r.push(n[s]);continue}if(r.push(""),r.length>1)i.push(t(r));let c=[],u=new RegExp(`^[ \\t]*${a[0]}{${a.length},}[ \\t]*$`);for(s++;s<n.length&&!u.test(n[s]);s++){let f=n[s],h=0;while(h<o.length&&(f[h]===" "||f[h]==="\t"))h++;c.push(f.slice(h))}i.push({kind:"code",code:c.join(`
187
- `)}),r=[""]}if(r.length>1||i.length===0)i.push(t(r));return i}function pd(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i.kind==="code"){t+=`<pre><code>${No(i.code).replace(fr,"<br />")}</code></pre>`;continue}let r=i.text;if(e[n-1]?.kind==="code")r=r.replace(hv,"");if(e[n+1]?.kind==="code")r=r.replace(mv,"");t+=r.replace(ad,"&#124;").replace(fr,"<br />")}return t}function ne(e){if(e===void 0)return it;return lv(e)}function cd(e){if(!e.reExport)return ne(e.type);let{from:t,imported:n}=e.reExport,i=n==="*"?"":rv.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return ne(`typeof import(${JSON.stringify(t)})${i}`)}function ud(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(nv,"&lt;").replace(iv,"&gt;")}function St(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${ud(t).replace(fr," ").replace(ad,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function hr(e){if(e===void 0||e.trim().length===0)return it;return pd(ld(e))}function dd(e){if(e===void 0||e==="{}"||e==="Record<string, never>")return it;return ne(e.trim())}function fd(e){if(e===void 0)return it;return`<code>${No(e).replace(fr,"<br />")}</code>`}function Wt(e,t){let n=[],i=(s)=>{let l=n.at(-1);if(l?.kind==="prose")l.text+=s;else n.push({kind:"prose",text:s})},r=(s,l)=>{if(n.length>0)i(`
188
- `);if(s)i(s);for(let o of ld(l))if(o.kind==="prose")i(o.text);else n.push(o)};if(e?.trim())r("",e);for(let{name:s,body:l}of t??[]){let o=l?.trim();r(o?`@${s} `:`@${s}`,o??"")}if(n.length===0)return it;return pd(n)}function hd(e){return ne(e)}function yv(e){let t=[e.extends?`Extends ${ne(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>ne(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function md(e,t){let n=new Set;for(let i of t){if(i.kind!=="class")continue;let r=yv(i);if(!i.members?.length&&!r)continue;let s=i.localName??i.name;if(n.has(s))continue;if(n.add(s),e.append("h4",`\`${s}\` members`),r)e.append("raw",`${r}
184
+ `,ld=/\|/g,rv=/</g,sv=/>/g,mr=/\n/g,ov=/^[A-Za-z_$][\w$]*$/,av=/\s*\n\s*/g,lv=/&(?=#?\w+;)|<(?=[A-Za-z/!?])|[|`*]|\\(?=[!-/:-@[-`{-~])|(?<![A-Za-z0-9])_|_(?![A-Za-z0-9])/g,pv=/[&<|`*\\_]/;function Lo(e){if(!pv.test(e))return e;return e.replace(lv,(t)=>t==="&"?"&amp;":t==="<"?"&lt;":t==="_"?"&#95;":`&#${t.charCodeAt(0)};`)}function cv(e){return`<code>${Lo(e.includes(`
185
+ `)?e.replace(av," "):e)}</code>`}var uv=/\{@link\s+([^{}\s|]+)(?:\|([^{}]+))?\}/g;function dv(e){if(!e.includes("{@link"))return e;return e.replace(uv,(t,n,i)=>`[${i===void 0?n:i.trim()}](${n})`)}function fv(e){return e.includes("```")||e.includes("~~~")}function hv(e){return dd(dv(e))}var mv=/^([ \t]*)(`{3,}|~{3,})(.*)$/,yv=/^\n/,gv=/\n$/;function pd(e){let t=(s)=>({kind:"prose",text:hv(s.join(`
186
+ `))});if(!fv(e))return[t([e])];let n=e.split(`
187
+ `),i=[],r=[];for(let s=0;s<n.length;s++){let a=mv.exec(n[s]),[,o="",l="",p=""]=a??[];if(!a||l[0]==="`"&&p.includes("`")){r.push(n[s]);continue}if(r.push(""),r.length>1)i.push(t(r));let c=[],u=new RegExp(`^[ \\t]*${l[0]}{${l.length},}[ \\t]*$`);for(s++;s<n.length&&!u.test(n[s]);s++){let f=n[s],h=0;while(h<o.length&&(f[h]===" "||f[h]==="\t"))h++;c.push(f.slice(h))}i.push({kind:"code",code:c.join(`
188
+ `)}),r=[""]}if(r.length>1||i.length===0)i.push(t(r));return i}function cd(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i.kind==="code"){t+=`<pre><code>${Lo(i.code).replace(mr,"<br />")}</code></pre>`;continue}let r=i.text;if(e[n-1]?.kind==="code")r=r.replace(yv,"");if(e[n+1]?.kind==="code")r=r.replace(gv,"");t+=r.replace(ld,"&#124;").replace(mr,"<br />")}return t}function ne(e){if(e===void 0)return rt;return cv(e)}function ud(e){if(!e.reExport)return ne(e.type);let{from:t,imported:n}=e.reExport,i=n==="*"?"":ov.test(n)?`.${n}`:`[${JSON.stringify(n)}]`;return ne(`typeof import(${JSON.stringify(t)})${i}`)}function dd(e){if(!e.includes("<")&&!e.includes(">"))return e;return e.replace(rv,"&lt;").replace(sv,"&gt;")}function vt(e,t){if(t===void 0)return e;let n=typeof t==="string"&&t.trim().length>0?`: ${dd(t).replace(mr," ").replace(ld,"&#124;")}`:"";return`<s>${e}</s><br />**Deprecated**${n}`}function yr(e){if(e===void 0||e.trim().length===0)return rt;return cd(pd(e))}function fd(e){if(e===void 0||e==="{}"||e==="Record<string, never>")return rt;return ne(e.trim())}function hd(e){if(e===void 0)return rt;return`<code>${Lo(e).replace(mr,"<br />")}</code>`}function Wt(e,t){let n=[],i=(s)=>{let a=n.at(-1);if(a?.kind==="prose")a.text+=s;else n.push({kind:"prose",text:s})},r=(s,a)=>{if(n.length>0)i(`
189
+ `);if(s)i(s);for(let o of pd(a))if(o.kind==="prose")i(o.text);else n.push(o)};if(e?.trim())r("",e);for(let{name:s,body:a}of t??[]){let o=a?.trim();r(o?`@${s} `:`@${s}`,o??"")}if(n.length===0)return rt;return cd(n)}function md(e){return ne(e)}function xv(e){let t=[e.extends?`Extends ${ne(e.extends)}.`:"",e.implements?.length?`Implements ${e.implements.map((n)=>ne(n)).join(", ")}.`:""].filter(Boolean);return t.length>0?t.join(" "):void 0}function yd(e,t){let n=new Set;for(let i of t){if(i.kind!=="class")continue;let r=xv(i);if(!i.members?.length&&!r)continue;let s=i.localName??i.name;if(n.has(s))continue;if(n.add(s),e.append("h4",`\`${s}\` members`),r)e.append("raw",`${r}
189
190
 
190
- `);if(!i.members?.length)continue;e.append("raw",tv);for(let l of i.members)e.append("raw",`| ${St(l.name,l.deprecated)} | ${ne(_o(l))} | ${Wt(l.description,l.tags)} |
191
+ `);if(!i.members?.length)continue;e.append("raw",iv);for(let a of i.members)e.append("raw",`| ${vt(a.name,a.deprecated)} | ${ne($o(a))} | ${Wt(a.description,a.tags)} |
191
192
  `);e.append("raw",`
192
- `)}}var gv=/[^\w\- ]+/g,xv=/\s+/g,$o="<!-- __TOC__ -->";function Ev(e,t){let n=e.toLowerCase().replace(ed,"").replace(gv,"").replace(xv,"-"),i=t.get(n)??0;return t.set(n,i+1),i===0?n:`${n}-${i}`}class Vn{sourceParts=[];hasToC=!1;toc=[];onAppend;constructor(e={}){this.onAppend=e.onAppend}get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
193
+ `)}}var Ev=/[^\w\- ]+/g,bv=/\s+/g,Ro="<!-- __TOC__ -->";function vv(e,t){let n=e.toLowerCase().replace(td,"").replace(Ev,"").replace(bv,"-"),i=t.get(n)??0;return t.set(n,i+1),i===0?n:`${n}-${i}`}class Vn{sourceParts=[];hasToC=!1;toc=[];onAppend;constructor(e={}){this.onAppend=e.onAppend}get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
193
194
 
194
- `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{if(this.sourceParts.push(`${"#".repeat(Number(e.slice(-1)))} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this.onAppend?.call(this,e,this),this}tableOfContents(){return this.sourceParts.push($o),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t=e.indexOf($o);if(t===-1)return e;let n=new Map,i=this.toc.map(({indent:r,raw:s})=>`${" ".repeat(r)}- [${s}](#${Ev(s,n)})`).join(`
195
- `);return e.slice(0,t)+i+e.slice(t+$o.length)}}class yd extends Vn{}function Lo(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)bv(e,n);for(let i of xo(t).components)Sv(e,i)}function bv(e,t){e.append("h2","Exports"),e.append("raw",Do);for(let n of t){let i=(n.type??n.value)?.replace(td," ").trim();e.append("raw",`| ${St(n.name,n.deprecated)} | <code>${n.kind}</code> | ${ne(i)} | ${hr(n.description)} |
195
+ `),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{if(this.sourceParts.push(`${"#".repeat(Number(e.slice(-1)))} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this.onAppend?.call(this,e,this),this}tableOfContents(){return this.sourceParts.push(Ro),this.hasToC=!0,this.appendLineBreaks(),this}end(){let e=this.sourceParts.join("");if(!this.hasToC)return e;let t=e.indexOf(Ro);if(t===-1)return e;let n=new Map,i=this.toc.map(({indent:r,raw:s})=>`${" ".repeat(r)}- [${s}](#${vv(s,n)})`).join(`
196
+ `);return e.slice(0,t)+i+e.slice(t+Ro.length)}}class gd extends Vn{}function Oo(e,t,n){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),n&&n.length>0)Sv(e,n);for(let i of bo(t).components)Cv(e,i)}function Sv(e,t){e.append("h2","Exports"),e.append("raw",Io);for(let n of t){let i=(n.type??n.value)?.replace(nd," ").trim();e.append("raw",`| ${vt(n.name,n.deprecated)} | <code>${n.kind}</code> | ${ne(i)} | ${yr(n.description)} |
196
197
  `)}e.append("raw",`
197
- `),e.append("divider")}function vv(e,t){e.append("h3","Module exports"),e.append("raw",Do);for(let n of t)e.append("raw",`| ${St(n.name,n.deprecated)} | <code>${n.kind}</code> | ${cd(n)} | ${Wt(n.description,n.tags)} |
198
+ `),e.append("divider")}function Tv(e,t){e.append("h3","Module exports"),e.append("raw",Io);for(let n of t)e.append("raw",`| ${vt(n.name,n.deprecated)} | <code>${n.kind}</code> | ${ud(n)} | ${Wt(n.description,n.tags)} |
198
199
  `);e.append("raw",`
199
- `),md(e,t)}function Io(e,t,n){if(t.length>0)n(),e.append("raw",`
200
- `);else e.append("p","None.")}function Sv(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${ne(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
201
- ${ur({typedefs:t.typedefs})}
200
+ `),yd(e,t)}function Mo(e,t,n){if(t.length>0)n(),e.append("raw",`
201
+ `);else e.append("p","None.")}function Cv(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${ne(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
202
+ ${fr({typedefs:t.typedefs})}
202
203
  \`\`\`
203
204
 
204
- `);if(e.append("h3","Props"),Io(e,t.props,()=>{e.append("raw",nd);let n=(r)=>r.reactive?0:r.constant?2:1,i=t.props.map((r,s)=>({prop:r,index:s})).sort((r,s)=>n(r.prop)-n(s.prop)||r.index-s.index).map(({prop:r})=>r);for(let r of i){let s=dr(r)?"accessor":r.kind;e.append("raw",`| ${St(r.name,r.deprecated)} | ${r.isRequired?"Yes":"No"} | <code>${s}</code> | ${r.reactive?"Yes":"No"} | ${r.binding??"--"} | ${ne(r.type)} | ${ne(r.value)} | ${Wt(r.description,r.tags)} |
205
- `)}}),t.moduleExports.length>0)vv(e,t.moduleExports);if(e.append("h3","Slots"),Io(e,t.slots,()=>{e.append("raw",id);for(let n of t.slots)e.append("raw",`| ${St(n.default?it:n.name??it,n.deprecated)} | ${n.default?"Yes":"No"} | ${dd(n.slot_props)} | ${fd(n.fallback)} | ${Wt(n.description,n.tags)} |
206
- `)}),e.append("h3","Events"),Io(e,t.events,()=>{e.append("raw",rd);for(let n of t.events)e.append("raw",`| ${St(n.name,n.deprecated)} | ${n.type} | ${hd(n.detail)} | ${Wt(n.description,n.tags)} |
207
- `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",sd);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${hr(n.description)} |
205
+ `);if(e.append("h3","Props"),Mo(e,t.props,()=>{e.append("raw",id);let n=(r)=>r.reactive?0:r.constant?2:1,i=t.props.map((r,s)=>({prop:r,index:s})).sort((r,s)=>n(r.prop)-n(s.prop)||r.index-s.index).map(({prop:r})=>r);for(let r of i){let s=hr(r)?"accessor":r.kind;e.append("raw",`| ${vt(r.name,r.deprecated)} | ${r.isRequired?"Yes":"No"} | <code>${s}</code> | ${r.reactive?"Yes":"No"} | ${r.binding??"--"} | ${ne(r.type)} | ${ne(r.value)} | ${Wt(r.description,r.tags)} |
206
+ `)}}),t.moduleExports.length>0)Tv(e,t.moduleExports);if(e.append("h3","Slots"),Mo(e,t.slots,()=>{e.append("raw",rd);for(let n of t.slots)e.append("raw",`| ${vt(n.default?rt:n.name??rt,n.deprecated)} | ${n.default?"Yes":"No"} | ${fd(n.slot_props)} | ${hd(n.fallback)} | ${Wt(n.description,n.tags)} |
207
+ `)}),e.append("h3","Events"),Mo(e,t.events,()=>{e.append("raw",sd);for(let n of t.events)e.append("raw",`| ${vt(n.name,n.deprecated)} | ${n.type} | ${md(n.detail)} | ${Wt(n.description,n.tags)} |
208
+ `)}),t.cssParts&&t.cssParts.length>0){e.append("h3","CSS Parts"),e.append("raw",od);for(let n of t.cssParts)e.append("raw",`| ${n.name} | ${yr(n.description)} |
208
209
  `);e.append("raw",`
209
- `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",od);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${ne(n.type)} | ${ne(n.default)} | ${hr(n.description)} |
210
+ `)}if(t.cssProperties&&t.cssProperties.length>0){e.append("h3","CSS Custom Properties"),e.append("raw",ad);for(let n of t.cssProperties)e.append("raw",`| ${n.name} | ${ne(n.type)} | ${ne(n.default)} | ${yr(n.description)} |
210
211
  `);e.append("raw",`
211
- `)}}function Tv(e,t){return new Vn({onAppend:(n,i)=>{t?.onAppend?.call(null,n,i,e)}})}function Cv(e,t){let n=Tv(e,t);return Lo(n,e,t.entryExports),n.end()}function kv(e,t){return Cv(e,{onAppend:t?.onAppend})}export{yd as BrowserWriterMarkdown,Pu as COMPONENT_API_SCHEMA_VERSION,mo as ComponentParser,Vn as MarkdownDocument,bd as asNormalizedPath,xo as buildComponentApiDocument,BE as finalizeWithoutCrossFileResolution,Ku as formatTsProps,Yu as getContextDefs,ur as getTypeDefs,Lo as renderComponentsToMarkdown,kv as writeMarkdownCore,ev as writeTsDefinition};
212
+ `)}}function kv(e,t){return new Vn({onAppend:(n,i)=>{t?.onAppend?.call(null,n,i,e)}})}function wv(e,t){let n=kv(e,t);return Oo(n,e,t.entryExports),n.end()}function Av(e,t){return wv(e,{onAppend:t?.onAppend})}export{gd as BrowserWriterMarkdown,Nu as COMPONENT_API_SCHEMA_VERSION,go as ComponentParser,Vn as MarkdownDocument,vd as asNormalizedPath,bo as buildComponentApiDocument,FE as finalizeWithoutCrossFileResolution,Xu as formatTsProps,Qu as getContextDefs,fr as getTypeDefs,Oo as renderComponentsToMarkdown,Av as writeMarkdownCore,nv as writeTsDefinition};